From 8894a9b79c043c8eb0eb0f41d98483454a8dcf73 Mon Sep 17 00:00:00 2001 From: Toon Willems Date: Tue, 3 Jul 2012 15:41:45 +0200 Subject: [PATCH 001/798] Change where files are stored It is crucial you update $MODULEPATH after this also, you can manually migrate by moving: easybuild -> $HOME/.local/easybuild/install easybuild_build -> $HOME/.local/easybuild/build easybuild_ebfiles_repo -> $HOME/.local/easybuild/ebfiles_repo easybuild_sources -> $HOME/.local/easybuild/sources --- easybuild/easybuild_config.py | 14 ++++++++------ 1 file changed, 8 insertions(+), 6 deletions(-) diff --git a/easybuild/easybuild_config.py b/easybuild/easybuild_config.py index c9a7080dbc..bbf943a805 100644 --- a/easybuild/easybuild_config.py +++ b/easybuild/easybuild_config.py @@ -28,17 +28,19 @@ # buildPath possibly overridden by EASYBUILDBUILDPATH # installPath possibly overridden by EASYBUILDINSTALLPATH -buildDir = 'easybuild_build' -installDir = 'easybuild' -sourceDir = "easybuild_sources" + +# this should result in a MODULEPATH=($HOME|$EASYBUILDPREFIX)/.local/easybuild/install/modules/all +buildDir = 'build' +installDir = 'install' +sourceDir = 'sources' if os.getenv('EASYBUILDPREFIX'): prefix = os.getenv('EASYBUILDPREFIX') else: - prefix = os.getenv('HOME') + prefix = os.path.join(os.getenv('HOME'), ".local", "easybuild") if not prefix: - prefix = "/tmp" + prefix = "/tmp/easybuild" buildPath = os.path.join(prefix, buildDir) installPath = os.path.join(prefix, installDir) @@ -56,7 +58,7 @@ ## repositoryPath = ("svn+ssh://user@server/path/to/repo/path/inside/repo") ## this requires pysvn repositoryType = 'fs' -repositoryPath = (os.path.join(prefix, 'easybuild_ebfiles_repo')) +repositoryPath = (os.path.join(prefix, 'ebfiles_repo')) # log format: (dir, filename template) # supported in template: name, version, data, time From 45e5cc36efc7cf53ec21c98cca160cad874db653 Mon Sep 17 00:00:00 2001 From: Toon Willems Date: Tue, 3 Jul 2012 16:20:29 +0200 Subject: [PATCH 002/798] Add myself to copyright notice --- easybuild/easybuild_config.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/easybuild/easybuild_config.py b/easybuild/easybuild_config.py index bbf943a805..b91394b32c 100644 --- a/easybuild/easybuild_config.py +++ b/easybuild/easybuild_config.py @@ -1,5 +1,5 @@ ## -# Copyright 2009-2012 Stijn Deweirdt, Dries Verdegem, Kenneth Hoste, Pieter De Baets, Jens Timmerman +# Copyright 2009-2012 Stijn Deweirdt, Dries Verdegem, Kenneth Hoste, Pieter De Baets, Jens Timmerman, Toon Willems # # This file is part of EasyBuild, # originally created by the HPC team of the University of Ghent (http://ugent.be/hpc). From 5941aa8e3ab623754f908a24e43c651d870ad849 Mon Sep 17 00:00:00 2001 From: Toon Willems Date: Tue, 3 Jul 2012 16:39:24 +0200 Subject: [PATCH 003/798] correct documentation --- easybuild/easybuild_config.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/easybuild/easybuild_config.py b/easybuild/easybuild_config.py index b91394b32c..c486a9c0cc 100644 --- a/easybuild/easybuild_config.py +++ b/easybuild/easybuild_config.py @@ -29,7 +29,7 @@ # buildPath possibly overridden by EASYBUILDBUILDPATH # installPath possibly overridden by EASYBUILDINSTALLPATH -# this should result in a MODULEPATH=($HOME|$EASYBUILDPREFIX)/.local/easybuild/install/modules/all +# this should result in a MODULEPATH=($HOME/.local/easybuild|$EASYBUILDPREFIX)/install/modules/all buildDir = 'build' installDir = 'install' sourceDir = 'sources' From ff61006ff0027d6af813f22fbe948dd0aa4302c2 Mon Sep 17 00:00:00 2001 From: Toon Willems Date: Wed, 4 Jul 2012 10:26:03 +0200 Subject: [PATCH 004/798] Add configurable sanity check command example: sanityCheckCommand = "bin/gzip -h" --- easybuild/framework/application.py | 41 ++++++++++++++++++++---------- 1 file changed, 28 insertions(+), 13 deletions(-) diff --git a/easybuild/framework/application.py b/easybuild/framework/application.py index ea2eef0ebe..3ff219f832 100644 --- a/easybuild/framework/application.py +++ b/easybuild/framework/application.py @@ -1,5 +1,5 @@ ## -# Copyright 2009-2012 Stijn Deweirdt, Dries Verdegem, Kenneth Hoste, Pieter De Baets, Jens Timmerman +# Copyright 2009-2012 Stijn Deweirdt, Dries Verdegem, Kenneth Hoste, Pieter De Baets, Jens Timmerman, Toon Willems # # This file is part of EasyBuild, # originally created by the HPC team of the University of Ghent (http://ugent.be/hpc). @@ -147,6 +147,7 @@ def __init__(self, name=None, version=None, newBuild=True, debug=False): 'patches': [[], "List of patches to apply"], 'tests': [[], "List of test-scripts to run after install. A test script should return a non-zero exit status to fail"], 'sanityCheckPaths': [{}, "List of files and directories to check (format: {'files':, 'dirs':}, default: {})"], + 'sanityCheckCommand': ['', "Single command that will be run after install (e.g. -h)"], 'buildstats' : [None, "A list of dicts with buildstats: build_time, platform, core_count, cpu_model, install_size, timestamp"], } @@ -349,7 +350,7 @@ def parse_dependency(self, dep): return result - ## process EasyBuild spec file + ## process EasyBuild spec file def process_ebfile(self, fn): """ @@ -499,7 +500,7 @@ def check_osdeps(self, osdeps): else: self.log.error("One or more OS dependencies were not found: %s" % not_found) - ## BUILD + ## BUILD def ready2build(self): """ @@ -668,7 +669,7 @@ def download(filename, url, path): if foundfile: return foundfile else: - # try and download source files from specified source URLs + # try and download source files from specified source URLs sourceURLs = self.getcfg('sourceURLs') targetdir = candidate_filepaths[0] if not os.path.isdir(targetdir): @@ -871,8 +872,8 @@ def postproc(self): def cleanup(self): """ Cleanup leftover mess: remove/clean build directory - - except when we're building in the installation directory, + + except when we're building in the installation directory, otherwise we remove the installation """ if not self.build_in_installdir: @@ -885,7 +886,7 @@ def cleanup(self): def sanitycheck(self): """ Do a sanity check on the installation - - if *any* of the files/subdirectories in the installation directory listed + - if *any* of the files/subdirectories in the installation directory listed in sanityCheckPaths are non-existent (or empty), the sanity check fails """ # prepare sanity check paths @@ -918,7 +919,7 @@ def sanitycheck(self): self.log.debug("Sanity check: found file %s in %s" % (f, self.installdir)) if self.sanityCheckOK: - # check if directories exist, and whether they are non-empty + # check if directories exist, and whether they are non-empty for d in self.sanityCheckPaths['dirs']: p = os.path.join(self.installdir, d) if not os.path.isdir(p) or not os.listdir(p): @@ -928,6 +929,20 @@ def sanitycheck(self): else: self.log.debug("Sanity check: found non-empty directory %s in %s" % (d, self.installdir)) + + # run sanity check command + command = self.getcfg('sanityCheckCommand') + if command: + # TODO: when issue 312 gets resolved and merged, place check in verify_config so that + # the sanityCheckCommand is not an absolute path + command = os.path.join(self.installdir, command) + # chdir to installdir otherwise os.getcwd() will fail + os.chdir(self.installdir) + out, ec = run_cmd(command, simple=False) + if ec != 0: + self.sanityCheckOK = False + self.log.debug("sanityCheckCommand exited with code %s (output: %s)" % (ec, out)) + # pass or fail if not self.sanityCheckOK: self.log.error("Sanity check failed!") @@ -1004,7 +1019,7 @@ def make_builddir(self): """ if not self.build_in_installdir: # make a unique build dir - ## if a tookitversion starts with a -, remove the - so prevent a -- in the path name + ## if a tookitversion starts with a -, remove the - so prevent a -- in the path name tkversion = self.tk.version if tkversion.startswith('-'): tkversion = tkversion[1:] @@ -1222,7 +1237,7 @@ def make_module_extra_packages(self): def packages(self): """ After make install, run this. - - only if variable len(pkglist) > 0 + - only if variable len(pkglist) > 0 - optionally: load module that was just created using temp module file - find source for packages, in pkgs - run extraPackages @@ -1275,7 +1290,7 @@ def find_package_patches(self, pkgName): def find_package_sources(self): """ - Find source file for packages. + Find source file for packages. """ pkgSources = [] for pkg in self.getcfg('pkglist'): @@ -1378,7 +1393,7 @@ def filter_packages(self): """ Called when self.skip is True - use this to detect existing packages and to remove them from self.pkgs - - based on initial R version + - based on initial R version """ cmdtmpl = self.getcfg('pkgfilter')[0] cmdinputtmpl = self.getcfg('pkgfilter')[1] @@ -1509,7 +1524,7 @@ def get_instance(easyblock, log, name=None): """ Get instance for a particular application class (or Application) """ - #TODO: create proper factory for this, as explained here + #TODO: create proper factory for this, as explained here #http://stackoverflow.com/questions/456672/class-factory-in-python try: if not easyblock: From f296b885cd1707ae30be24cd5ef21dccd38b2906 Mon Sep 17 00:00:00 2001 From: Jens Timmerman Date: Wed, 4 Jul 2012 11:35:14 +0200 Subject: [PATCH 005/798] added support for installing binary packages + ecore as an example --- easybuild/easyblocks/b/binary.py | 53 ++++++++++++++++++++ easybuild/easyconfigs/e/ecore/ecore-1.5.2.eb | 16 ++++++ 2 files changed, 69 insertions(+) create mode 100644 easybuild/easyblocks/b/binary.py create mode 100644 easybuild/easyconfigs/e/ecore/ecore-1.5.2.eb diff --git a/easybuild/easyblocks/b/binary.py b/easybuild/easyblocks/b/binary.py new file mode 100644 index 0000000000..d22bd6efc2 --- /dev/null +++ b/easybuild/easyblocks/b/binary.py @@ -0,0 +1,53 @@ +## +# Copyright 2009-2012 Stijn Deweirdt, Dries Verdegem, Kenneth Hoste, Pieter De Baets, Jens Timmerman +# +# This file is part of EasyBuild, +# originally created by the HPC team of the University of Ghent (http://ugent.be/hpc). +# +# http://github.com/hpcugent/easybuild +# +# EasyBuild is free software: you can redistribute it and/or modify +# it under the terms of the GNU General Public License as published by +# the Free Software Foundation v2. +# +# EasyBuild is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with EasyBuild. If not, see . +## +import shutil +import os +from easybuild.framework.application import Application + +class Binary(Application): + """Support for installing a binary package.""" + + def configure(self): + """No configuration, this is a binary package""" + pass + + def make(self): + """No compilation, this is a binary package""" + pass + + def make_installdir(self): + """Not doing anything, copytree in make_install doesn't like it's destination directory to already exist""" + pass + + def make_install(self): + """Copy the unpacked source to the install directory""" + shutil.copytree(os.path.join(self.builddir, '%s-%s' % (self.name().lower(), self.version())), self.installdir, symlinks=True) + + def make_module_extra(self): + """ + Sets optional variables (SOFTROOT, MPI tuning variables). + """ + txt = Application.make_module_extra(self) + txt += self.moduleGenerator.prependPaths("PATH", [""]) + + self.log.debug("make_module_extra added this: %s" % txt) + + return txt diff --git a/easybuild/easyconfigs/e/ecore/ecore-1.5.2.eb b/easybuild/easyconfigs/e/ecore/ecore-1.5.2.eb new file mode 100644 index 0000000000..f890ca028f --- /dev/null +++ b/easybuild/easyconfigs/e/ecore/ecore-1.5.2.eb @@ -0,0 +1,16 @@ +name='ECore' +version='1.5.2' +easyblock='Binary' + +homepage='http://www.numericalrocks.com/index.php?option=com_content&task=blogcategory&id=25&Itemid=25' +description="""The e-Core technology simulates the natural processes of sedimentary rock formation; i.e. sedimentation, compaction and diagenesis.""" + +toolkit={'name':'dummy','version':'dummy'} + +sources=['%s-%s.tgz'%(name.lower(),version)] + + +sanityCheckPaths = { + 'files':["ecore.sh"], + 'dirs':['arch', 'noarch'] + } From 857d2393cb070a841446cd7a18ed0af5d28f89e2 Mon Sep 17 00:00:00 2001 From: Jens Timmerman Date: Wed, 4 Jul 2012 11:57:13 +0200 Subject: [PATCH 006/798] do create path leading up to installdir, since this is needed in python < 2.5 --- easybuild/easyblocks/b/binary.py | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/easybuild/easyblocks/b/binary.py b/easybuild/easyblocks/b/binary.py index d22bd6efc2..b117e752d1 100644 --- a/easybuild/easyblocks/b/binary.py +++ b/easybuild/easyblocks/b/binary.py @@ -34,8 +34,9 @@ def make(self): pass def make_installdir(self): - """Not doing anything, copytree in make_install doesn't like it's destination directory to already exist""" - pass + """Do not actually create installdir, copytree in make_install doesn't like it's destination directory to already exist + But before python 2.5 the actuall path has to exist.""" + self.make_dir(self.installdir, clean=True, dontcreateinstalldir=True) def make_install(self): """Copy the unpacked source to the install directory""" From 8b166e5d4c410d9694296b693fcbd4d7012bb00f Mon Sep 17 00:00:00 2001 From: Toon Willems Date: Wed, 4 Jul 2012 11:58:12 +0200 Subject: [PATCH 007/798] add parse_cmd_output method This method will log and error based on strictness setting. --- easybuild/tools/filetools.py | 83 +++++++++++++++++++++--------------- 1 file changed, 48 insertions(+), 35 deletions(-) diff --git a/easybuild/tools/filetools.py b/easybuild/tools/filetools.py index 464ab6745d..3f1c9deb64 100644 --- a/easybuild/tools/filetools.py +++ b/easybuild/tools/filetools.py @@ -36,6 +36,8 @@ log = getLog('fileTools') errorsFoundInLog = 0 +strictness = None + def unpack(fn, dest, extra_options=None, overwrite=False): """ Given filename fn, try to unpack in directory dest @@ -76,7 +78,7 @@ def findBaseDir(): """ Try to locate a possible new base directory - this is typically a single subdir, e.g. from untarring a tarball - - when unpacking multiple tarballs in the same directory, + - when unpacking multiple tarballs in the same directory, expect only the first one to give the correct path """ def getLocalDirsPurged(): @@ -108,7 +110,7 @@ def getLocalDirsPurged(): def extractCmd(fn, overwrite=False): """ - Determines the file type of file fn, returns extract cmd + Determines the file type of file fn, returns extract cmd - based on file suffix - better to use Python magic? """ @@ -254,6 +256,7 @@ def run_cmd(cmd, log_ok=True, log_all=False, simple=False, inp=None, regexp=True """ log.debug("run_cmd: running cmd %s (in %s)" % (cmd, os.getcwd())) + ## Log command output if log_output: runLog = tempfile.NamedTemporaryFile(suffix='.log', prefix='easybuild-run_cmd-') @@ -290,7 +293,7 @@ def run_cmd(cmd, log_ok=True, log_all=False, simple=False, inp=None, regexp=True ec = p.poll() stdouterr = '' while ec < 0: - # need to read from time to time. + # need to read from time to time. # - otherwise the stdout/stderr buffer gets filled and it all stops working output = p.stdout.read(readSize) if runLog: @@ -305,35 +308,16 @@ def run_cmd(cmd, log_ok=True, log_all=False, simple=False, inp=None, regexp=True # not needed anymore. subprocess does this correct? # ec=os.WEXITSTATUS(ec) - ## log: if ec > 0, dump to output - if ec and (log_all or log_ok): - log.error('run_cmd "%s" exited with exitcode %s and output:\n%s' % (cmd, ec, stdouterr)) - if not ec: - if log_all: - log.info('run_cmd "%s" exited with exitcode %s and output:\n%s' % (cmd, ec, stdouterr)) - else: - log.debug('run_cmd "%s" exited with exitcode %s and output:\n%s' % (cmd, ec, stdouterr)) - ## Command log output if log_output: runLog.close() - ## parse the stdout/stderr for errors? - if regexp: - parselogForError(stdouterr, regexp, msg="Command used: %s" % cmd) - - if simple: - if ec: - return False - else: - return True - else: - return (stdouterr, ec) + return parse_cmd_output(cmd, stdouterr, ec, simple, log_all, log_ok) def run_cmd_qa(cmd, qa, no_qa=None, log_ok=True, log_all=False, simple=False, regexp=True, std_qa=None): """ Executes a command cmd - - looks for questions and tries to answer + - looks for questions and tries to answer - returns exitcode and stdout+stderr (mixed) - no input though stdin """ @@ -354,7 +338,7 @@ def run_cmd_qa(cmd, qa, no_qa=None, log_ok=True, log_all=False, simple=False, re # Part 1: process the QandA dictionary # given initial set of Q and A (in dict), return dict of reg. exp. and A # - # make regular expression that matches the string with + # make regular expression that matches the string with # - replace whitespace # - replace newline @@ -427,7 +411,7 @@ def processQA(q, a): hitCount = 0 while ec < 0: - # need to read from time to time. + # need to read from time to time. # - otherwise the stdout/stderr buffer gets filled and it all stops working try: tmpOut = recv_some(p) @@ -496,26 +480,55 @@ def processQA(q, a): # Not needed anymore. Subprocess does this correct? # ec=os.WEXITSTATUS(ec) - ## log: if ec > 0, dump to output + return parse_cmd_output(cmd, stdoutErr, ec, simple, log_all, log_ok) + +def parse_cmd_output(cmd, stdouterr, ec, simple, log_all, log_ok): + """ + will parse and perform error checks based on strictness setting + """ + # Strict defaults + check_ec = True + regexp = True + + if strictness != None: + log.debug("strictness option has been set (%s), using that" % strictness) + if strictness == 0: + check_ec = False + regexp = False + elif strictness == 5: + check_ec = True + regexp = False + else: + check_ec = True + regexp = True + if ec and (log_all or log_ok): - log.error('runqanda cmd "%s" exited with exitcode %s and output\n%s' % (cmd, ec, stdoutErr)) + # We don't want to error if the user doesn't care + if check_ec: + log.error('cmd "%s" exited with exitcode %s and output:\n%s' % (cmd, ec, stdouterr)) + else: + log.warn('cmd "%s" exited with exitcode %s and output:\n%s' % (cmd, ec, stdouterr)) + if not ec: if log_all: - log.info('runqanda cmd "%s" exited with exitcode %s and output\n%s' % (cmd, ec, stdoutErr)) + log.info('cmd "%s" exited with exitcode %s and output:\n%s' % (cmd, ec, stdouterr)) else: - log.debug('runqanda cmd "%s" exited with exitcode %s and output\n%s' % (cmd, ec, stdoutErr)) + log.debug('cmd "%s" exited with exitcode %s and output:\n%s' % (cmd, ec, stdouterr)) + - ## parse the stdouterr? + ## parse the stdout/stderr for errors? if regexp: - parselogForError(stdoutErr, regexp, msg="Command used: %s" % cmd) + parselogForError(stdouterr, regexp, msg="Command used: %s" % cmd) if simple: if ec: - return False + # If the user does not care -> will return true + return not check_ec else: return True else: - return (stdoutErr, ec) + # eventhough strictness could be set, you still want to know the exit code here + return (stdouterr, ec) def modifyEnv(old, new): """ @@ -567,7 +580,7 @@ def parselogForError(txt, regExp=None, stdout=True, msg=None): txt is multiline string. - in memory regExp is a one-line regular expression - - default + - default """ global errorsFoundInLog From f9b6a932dce8ad3ad16e9608d5eb3bd6bfa76ac1 Mon Sep 17 00:00:00 2001 From: Jens Timmerman Date: Wed, 4 Jul 2012 12:07:51 +0200 Subject: [PATCH 008/798] added patch for ECore to use a variable for the license path --- .../easyconfigs/e/{ecore => ECore}/ecore-1.5.2.eb | 2 +- .../easyconfigs/e/ECore/ecore-license-var.patch | 13 +++++++++++++ 2 files changed, 14 insertions(+), 1 deletion(-) rename easybuild/easyconfigs/e/{ecore => ECore}/ecore-1.5.2.eb (93%) create mode 100644 easybuild/easyconfigs/e/ECore/ecore-license-var.patch diff --git a/easybuild/easyconfigs/e/ecore/ecore-1.5.2.eb b/easybuild/easyconfigs/e/ECore/ecore-1.5.2.eb similarity index 93% rename from easybuild/easyconfigs/e/ecore/ecore-1.5.2.eb rename to easybuild/easyconfigs/e/ECore/ecore-1.5.2.eb index f890ca028f..552daaf3d5 100644 --- a/easybuild/easyconfigs/e/ecore/ecore-1.5.2.eb +++ b/easybuild/easyconfigs/e/ECore/ecore-1.5.2.eb @@ -9,7 +9,7 @@ toolkit={'name':'dummy','version':'dummy'} sources=['%s-%s.tgz'%(name.lower(),version)] - +patches=['ecore-license-var.patch'] sanityCheckPaths = { 'files':["ecore.sh"], 'dirs':['arch', 'noarch'] diff --git a/easybuild/easyconfigs/e/ECore/ecore-license-var.patch b/easybuild/easyconfigs/e/ECore/ecore-license-var.patch new file mode 100644 index 0000000000..6bc491c375 --- /dev/null +++ b/easybuild/easyconfigs/e/ECore/ecore-license-var.patch @@ -0,0 +1,13 @@ +--- noarch/launch.sh.orig 2012-02-15 14:59:33.000000000 +0100 ++++ noarch/launch.sh 2012-07-04 12:03:45.713759133 +0200 +@@ -50,7 +50,8 @@ + export QTDIR QT_PLUGIN_PATH + + ## Edit next line if you need to move the license file +-LM_LICENSE_FILE="${dirname}/license/ecore_floating.lic" ++LM_LICENSE_FILE2="${dirname}/license/ecore_floating.lic" ++LM_LICENSE_FILE=${LM_LICENSE_FILE-LM_LICENSE_FILE2} + export LM_LICENSE_FILE + + exec "${dirname}/${archstr}/bin/${exename}" "$@" + From bc83de9a5abb7268776d2b9cc3806d81d120fbcd Mon Sep 17 00:00:00 2001 From: Jens Timmerman Date: Wed, 4 Jul 2012 12:13:55 +0200 Subject: [PATCH 009/798] fix in patch --- easybuild/easyconfigs/e/ECore/ecore-license-var.patch | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/easybuild/easyconfigs/e/ECore/ecore-license-var.patch b/easybuild/easyconfigs/e/ECore/ecore-license-var.patch index 6bc491c375..a0fbd8fe1a 100644 --- a/easybuild/easyconfigs/e/ECore/ecore-license-var.patch +++ b/easybuild/easyconfigs/e/ECore/ecore-license-var.patch @@ -1,12 +1,12 @@ --- noarch/launch.sh.orig 2012-02-15 14:59:33.000000000 +0100 -+++ noarch/launch.sh 2012-07-04 12:03:45.713759133 +0200 ++++ noarch/launch.sh 2012-07-04 12:12:01.599792424 +0200 @@ -50,7 +50,8 @@ export QTDIR QT_PLUGIN_PATH ## Edit next line if you need to move the license file -LM_LICENSE_FILE="${dirname}/license/ecore_floating.lic" +LM_LICENSE_FILE2="${dirname}/license/ecore_floating.lic" -+LM_LICENSE_FILE=${LM_LICENSE_FILE-LM_LICENSE_FILE2} ++LM_LICENSE_FILE=${LM_LICENSE_FILE-$LM_LICENSE_FILE2} export LM_LICENSE_FILE exec "${dirname}/${archstr}/bin/${exename}" "$@" From beaa527619675cc52516057aa77a76e747f46107 Mon Sep 17 00:00:00 2001 From: Toon Willems Date: Thu, 5 Jul 2012 09:50:01 +0200 Subject: [PATCH 010/798] move reading of config files into seperate class --- easybuild/framework/application.py | 146 +++++---------------------- easybuild/framework/easy_block.py | 152 +++++++++++++++++++++++++++++ 2 files changed, 174 insertions(+), 124 deletions(-) create mode 100644 easybuild/framework/easy_block.py diff --git a/easybuild/framework/application.py b/easybuild/framework/application.py index ea2eef0ebe..3ea824d4f1 100644 --- a/easybuild/framework/application.py +++ b/easybuild/framework/application.py @@ -28,6 +28,7 @@ import urllib import easybuild +from easybuild.framework.easy_block import EasyBlock from easybuild.tools.build_log import EasyBuildError, initLogger, removeLogHandler,print_msg from easybuild.tools.config import source_path, buildPath, installPath from easybuild.tools.filetools import unpack, patch, run_cmd, convertName @@ -66,11 +67,8 @@ def __init__(self, name=None, version=None, newBuild=True, debug=False): ## final version self.installversion = 'NOT_VALID' - ## valid moduleclasses - self.validmoduleclasses = ['base', 'compiler', 'lib'] - - ## vaild stop options - self.validstops = ['cfg', 'source', 'patch', 'configure', 'make', 'install', 'test', 'postproc', 'cleanup', 'packages'] + # Easyblock for this Application + self.easyblock = None # module generator self.moduleGenerator = None @@ -78,8 +76,6 @@ def __init__(self, name=None, version=None, newBuild=True, debug=False): # extra stuff for module file required by packages self.moduleExtraPackages = '' - # sanity check paths and result - self.sanityCheckPaths = None self.sanityCheckOK = False # indicates whether build should be performed in installation dir @@ -92,66 +88,6 @@ def __init__(self, name=None, version=None, newBuild=True, debug=False): # allow a post message to be set, which can be shown as last output self.postmsg = '' - # generic configuration parameters - self.cfg = { - 'name':[None, "Name of software"], - 'version':[None, "Version of software"], - 'easybuildVersion': [None, "EasyBuild-version this spec-file was written for"], - 'group':[None, "Name of the user group for which the software should be available"], - 'versionsuffix':['', 'Additional suffix for software version (placed after toolkit name)'], - 'versionprefix':['', 'Additional prefix for software version (placed before version and toolkit name)'], - 'runtest':[None, 'Indicates if a test should be run after make; should specify argument after make (for e.g., "test" for make test) (Default: None)'], - 'preconfigopts':['', 'Extra options pre-passed to configure.'], - 'configopts':['', 'Extra options passed to configure (Default already has --prefix)'], - 'premakeopts':['', 'Extra options pre-passed to make.'], - 'makeopts':['', 'Extra options passed to make (Default already has -j X)'], - 'installopts':['', 'Extra options for installation (Default: nothing)'], - 'moduleclass':['base', 'Module class to be used for this software (Default: base) (Valid: %s)' % self.validmoduleclasses], - 'moduleforceunload':[False, 'Force unload of all modules when loading the package (Default: False)'], - 'moduleloadnoconflict':[False, "Don't check for conflicts, unload other versions instead (Default: False)"], - 'startfrom':[None, 'Path to start the make in. If the path is absolute, use that path. If not, this is added to the guessed path.'], - 'onlytkmod':[False, 'Boolean/string to indicate if the toolkit should only load the enviornment with module (True) or also set all other variables (False) like compiler CC etc (If string: comma separated list of variables that will be ignored). (Default: False)'], - 'stop':[None, 'Keyword to halt the buildprocess at certain points. Valid are %s' % self.validstops], - 'homepage':[None, 'The homepage of the software'], - 'description':[None, 'A short description of the software'], - 'parallel':[None, 'Degree of parallelism for e.g. make (default: based on the number of cores and restrictions in ulimit)'], - 'maxparallel':[None, 'Max degree of parallelism (default: None)'], - 'keeppreviousinstall':[False, 'Boolean to keep the previous installation with identical name. Default False, expert s only!'], - 'cleanupoldbuild':[True, 'Boolean to remove (True) or backup (False) the previous build directory with identical name or not. Default True'], - 'cleanupoldinstall':[True, 'Boolean to remove (True) or backup (False) the previous install directory with identical name or not. Default True'], - 'dontcreateinstalldir':[False, 'Boolean to create (False) or not create (True) the install directory (Default False)'], - 'toolkit':[None, 'Name and version of toolkit'], - 'toolkitopts':['', 'Extra options for compilers'], - 'keepsymlinks':[False, 'Boolean to determine whether symlinks are to be kept during copying or if the content of the files pointed to should be copied'], - 'licenseServer':[None, 'License server for software'], - 'licenseServerPort':[None, 'Port for license server'], - 'key':[None, 'Key for installing software'], - 'pkglist':[[], 'List with packages added to the baseinstallation (Default: [])'], - 'pkgmodulenames':[{}, 'Dictionary with real modules names for packages, if they are different from the package name (Default: {})'], - 'pkgloadmodule':[True, 'Load the to-be installed software using temporary module (Default: True)'], - 'pkgtemplate':["%s-%s.tar.gz", "Template for package source file names (Default: %s-%s.tar.gz)"], - 'pkgfindsource':[True, "Find sources for packages (Default: True)"], - 'pkginstalldeps':[True, "Install dependencies for specified packages if necessary (Default: True)"], - 'pkgdefaultclass':[None, "List of module for and name of the default package class (Default: None)"], - 'skip':[False, "Skip existing software (Default: False)"], - 'pkgfilter':[None, "Package filter details. List with template for cmd and input to cmd (templates for name, version and src). (Default: None)"], - 'pkgpatches':[[], 'List with patches for packages (default: [])'], - 'pkgcfgs':[{}, 'Dictionary with config parameters for packages (default: {})'], - 'dependencies':[[], "List of dependencies (default: [])"], - 'builddependencies':[[], "List of build dependencies (default: [])"], - 'unpackOptions':[None, "Extra options for unpacking source (default: None)"], - 'modextravars':[{}, "Extra environment variables to be added to module file (default: {})"], - 'osdependencies':[[], "Packages that should be present on the system"], - 'sources': [[], "List of source files"], - 'sourceURLs' : [[], "List of URLs for source files"], - 'patches': [[], "List of patches to apply"], - 'tests': [[], "List of test-scripts to run after install. A test script should return a non-zero exit status to fail"], - 'sanityCheckPaths': [{}, "List of files and directories to check (format: {'files':, 'dirs':}, default: {})"], - 'buildstats' : [None, "A list of dicts with buildstats: build_time, platform, core_count, cpu_model, install_size, timestamp"], - } - - # mandatory config entries - self.mandatory = ['name', 'version', 'homepage', 'description', 'toolkit'] def autobuild(self, ebfile, runTests): """ @@ -349,34 +285,21 @@ def parse_dependency(self, dep): return result - ## process EasyBuild spec file + ## process EasyBuild spec file def process_ebfile(self, fn): """ Read file fn, eval and add info - assume certain predefined variable names """ - if not os.path.isfile(fn) and self.log: - self.log.error("Can't import config from unknown filename %s" % fn) - try: - locs = {"self": self} - execfile(fn, {}, locs) - except (IOError, SyntaxError), err: - msg = "Parsing eb file %s failed: %s" % (fn, err) - if self.log: - self.log.exception(msg) - else: - raise EasyBuildError("%s: %s" % (msg, err)) + self.easyblock = EasyBlock(fn) - ## initialize logger - if 'name' in locs and 'version' in locs: - self.set_name_version(locs['name'], locs['version']) - else: - self.setlogger() + # initialize logger + self.setlogger() ## check EasyBuild version - easybuildVersion = locs.get('easybuildVersion', None) + easybuildVersion = self.getcfg('easybuildVersion') if not easybuildVersion: self.log.warn("Easyconfig does not specify an EasyBuild-version (key 'easybuildVersion')! Assuming the latest version") else: @@ -385,31 +308,6 @@ def process_ebfile(self, fn): elif LooseVersion(easybuildVersion) > easybuild.VERSION: self.log.error("EasyBuild-version %s is newer than the currently running one. Aborting!" % easybuildVersion) - ## check for typos in eb file - for variable in locs.keys(): - guess = get_close_matches(variable, self.cfg.keys(), 1, 0.85) - if len(guess) == 1 and variable not in self.cfg.keys(): - # We might have a typo here - self.log.error("Don't you mean '%s' instead of '%s' as eb file variable." % (guess[0], variable)) - - for k in self.cfg.keys(): - if k in locs: - self.setcfg(k, locs[k]) - self.log.info("Using cfg option %s: value %s" % (k, self.getcfg(k))) - - for k in self.mandatory: - if not k in locs: - self.log.error("No cfg option %s provided" % k) - - if self.getcfg('stop') and not (self.getcfg('stop') in self.validstops): - self.log.error("Stop provided %s is not valid: %s" % (self.cfg['stop'], self.validstops)) - - if not (self.getcfg('moduleclass') in self.validmoduleclasses): - self.log.error("Moduleclass provided %s is not valid: %s" % (self.cfg['moduleclass'], self.validmoduleclasses)) - - if self.getcfg('stop') == 'cfg': - self.log.info("Stopping in parsing cfg") - return if self.getcfg('osdependencies'): self.check_osdeps(self.getcfg('osdependencies')) @@ -452,13 +350,13 @@ def getcfg(self, key): """ Get a configuration item. """ - return self.cfg[key][0] + return self.easyblock[key] def setcfg(self, key, value): """ Set configuration key to value. """ - self.cfg[key][0] = value + self.easyblock[key] = value def updatecfg(self, key, value): """ @@ -499,7 +397,7 @@ def check_osdeps(self, osdeps): else: self.log.error("One or more OS dependencies were not found: %s" % not_found) - ## BUILD + ## BUILD def ready2build(self): """ @@ -668,7 +566,7 @@ def download(filename, url, path): if foundfile: return foundfile else: - # try and download source files from specified source URLs + # try and download source files from specified source URLs sourceURLs = self.getcfg('sourceURLs') targetdir = candidate_filepaths[0] if not os.path.isdir(targetdir): @@ -871,8 +769,8 @@ def postproc(self): def cleanup(self): """ Cleanup leftover mess: remove/clean build directory - - except when we're building in the installation directory, + + except when we're building in the installation directory, otherwise we remove the installation """ if not self.build_in_installdir: @@ -885,7 +783,7 @@ def cleanup(self): def sanitycheck(self): """ Do a sanity check on the installation - - if *any* of the files/subdirectories in the installation directory listed + - if *any* of the files/subdirectories in the installation directory listed in sanityCheckPaths are non-existent (or empty), the sanity check fails """ # prepare sanity check paths @@ -918,7 +816,7 @@ def sanitycheck(self): self.log.debug("Sanity check: found file %s in %s" % (f, self.installdir)) if self.sanityCheckOK: - # check if directories exist, and whether they are non-empty + # check if directories exist, and whether they are non-empty for d in self.sanityCheckPaths['dirs']: p = os.path.join(self.installdir, d) if not os.path.isdir(p) or not os.listdir(p): @@ -1004,7 +902,7 @@ def make_builddir(self): """ if not self.build_in_installdir: # make a unique build dir - ## if a tookitversion starts with a -, remove the - so prevent a -- in the path name + ## if a tookitversion starts with a -, remove the - so prevent a -- in the path name tkversion = self.tk.version if tkversion.startswith('-'): tkversion = tkversion[1:] @@ -1222,7 +1120,7 @@ def make_module_extra_packages(self): def packages(self): """ After make install, run this. - - only if variable len(pkglist) > 0 + - only if variable len(pkglist) > 0 - optionally: load module that was just created using temp module file - find source for packages, in pkgs - run extraPackages @@ -1275,7 +1173,7 @@ def find_package_patches(self, pkgName): def find_package_sources(self): """ - Find source file for packages. + Find source file for packages. """ pkgSources = [] for pkg in self.getcfg('pkglist'): @@ -1378,7 +1276,7 @@ def filter_packages(self): """ Called when self.skip is True - use this to detect existing packages and to remove them from self.pkgs - - based on initial R version + - based on initial R version """ cmdtmpl = self.getcfg('pkgfilter')[0] cmdinputtmpl = self.getcfg('pkgfilter')[1] @@ -1442,7 +1340,7 @@ def dump_cfg_options(self): """ Print a list of available configuration options. """ - for key in sorted(self.cfg): + for key in sorted(self.easyblock): tabs = "\t" * (3 - (len(key) + 1) / 8) print "%s:%s%s" % (key, tabs, self.cfg[key][1]) @@ -1509,7 +1407,7 @@ def get_instance(easyblock, log, name=None): """ Get instance for a particular application class (or Application) """ - #TODO: create proper factory for this, as explained here + #TODO: create proper factory for this, as explained here #http://stackoverflow.com/questions/456672/class-factory-in-python try: if not easyblock: diff --git a/easybuild/framework/easy_block.py b/easybuild/framework/easy_block.py new file mode 100644 index 0000000000..18fab563de --- /dev/null +++ b/easybuild/framework/easy_block.py @@ -0,0 +1,152 @@ +## +# Copyright 2009-2012 Stijn Deweirdt, Dries Verdegem, Kenneth Hoste, Pieter De Baets, Jens Timmerman, Toon Willems +# +# This file is part of EasyBuild, +# originally created by the HPC team of the University of Ghent (http://ugent.be/hpc). +# +# http://github.com/hpcugent/easybuild +# +# EasyBuild is free software: you can redistribute it and/or modify +# it under the terms of the GNU General Public License as published by +# the Free Software Foundation v2. +# +# EasyBuild is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with EasyBuild. If not, see . +## + +import copy +import difflib +import os + +from easybuild.tools.build_log import getLog, EasyBuildError + +class EasyBlock: + """ + Class which handles loading, reading, validation of easyblocks + """ + # mandatory entries + mandatory = ['name', 'version', 'homepage', 'description', 'toolkit'] + validmoduleclasses = ['base', 'compiler', 'lib'] + validstops = ['cfg', 'source', 'patch', 'configure', 'make', 'install', 'test', 'postproc', 'cleanup', 'packages'] + + default_config = { + 'name':[None, "Name of software"], + 'version':[None, "Version of software"], + 'easybuildVersion': [None, "EasyBuild-version this spec-file was written for"], + 'group':[None, "Name of the user group for which the software should be available"], + 'versionsuffix':['', 'Additional suffix for software version (placed after toolkit name)'], + 'versionprefix':['', 'Additional prefix for software version (placed before version and toolkit name)'], + 'runtest':[None, 'Indicates if a test should be run after make; should specify argument after make (for e.g., "test" for make test) (Default: None)'], + 'preconfigopts':['', 'Extra options pre-passed to configure.'], + 'configopts':['', 'Extra options passed to configure (Default already has --prefix)'], + 'premakeopts':['', 'Extra options pre-passed to make.'], + 'makeopts':['', 'Extra options passed to make (Default already has -j X)'], + 'installopts':['', 'Extra options for installation (Default: nothing)'], + 'moduleclass':['base', 'Module class to be used for this software (Default: base) (Valid: %s)' % validmoduleclasses], + 'moduleforceunload':[False, 'Force unload of all modules when loading the package (Default: False)'], + 'moduleloadnoconflict':[False, "Don't check for conflicts, unload other versions instead (Default: False)"], + 'startfrom':[None, 'Path to start the make in. If the path is absolute, use that path. If not, this is added to the guessed path.'], + 'onlytkmod':[False, 'Boolean/string to indicate if the toolkit should only load the enviornment with module (True) or also set all other variables (False) like compiler CC etc (If string: comma separated list of variables that will be ignored). (Default: False)'], + 'stop':[None, 'Keyword to halt the buildprocess at certain points. Valid are %s' % validstops], + 'homepage':[None, 'The homepage of the software'], + 'description':[None, 'A short description of the software'], + 'parallel':[None, 'Degree of parallelism for e.g. make (default: based on the number of cores and restrictions in ulimit)'], + 'maxparallel':[None, 'Max degree of parallelism (default: None)'], + 'keeppreviousinstall':[False, 'Boolean to keep the previous installation with identical name. Default False, expert s only!'], + 'cleanupoldbuild':[True, 'Boolean to remove (True) or backup (False) the previous build directory with identical name or not. Default True'], + 'cleanupoldinstall':[True, 'Boolean to remove (True) or backup (False) the previous install directory with identical name or not. Default True'], + 'dontcreateinstalldir':[False, 'Boolean to create (False) or not create (True) the install directory (Default False)'], + 'toolkit':[None, 'Name and version of toolkit'], + 'toolkitopts':['', 'Extra options for compilers'], + 'keepsymlinks':[False, 'Boolean to determine whether symlinks are to be kept during copying or if the content of the files pointed to should be copied'], + 'licenseServer':[None, 'License server for software'], + 'licenseServerPort':[None, 'Port for license server'], + 'key':[None, 'Key for installing software'], + 'pkglist':[[], 'List with packages added to the baseinstallation (Default: [])'], + 'pkgmodulenames':[{}, 'Dictionary with real modules names for packages, if they are different from the package name (Default: {})'], + 'pkgloadmodule':[True, 'Load the to-be installed software using temporary module (Default: True)'], + 'pkgtemplate':["%s-%s.tar.gz", "Template for package source file names (Default: %s-%s.tar.gz)"], + 'pkgfindsource':[True, "Find sources for packages (Default: True)"], + 'pkginstalldeps':[True, "Install dependencies for specified packages if necessary (Default: True)"], + 'pkgdefaultclass':[None, "List of module for and name of the default package class (Default: None)"], + 'skip':[False, "Skip existing software (Default: False)"], + 'pkgfilter':[None, "Package filter details. List with template for cmd and input to cmd (templates for name, version and src). (Default: None)"], + 'pkgpatches':[[], 'List with patches for packages (default: [])'], + 'pkgcfgs':[{}, 'Dictionary with config parameters for packages (default: {})'], + 'dependencies':[[], "List of dependencies (default: [])"], + 'builddependencies':[[], "List of build dependencies (default: [])"], + 'unpackOptions':[None, "Extra options for unpacking source (default: None)"], + 'modextravars':[{}, "Extra environment variables to be added to module file (default: {})"], + 'osdependencies':[[], "Packages that should be present on the system"], + 'sources': [[], "List of source files"], + 'sourceURLs' : [[], "List of URLs for source files"], + 'patches': [[], "List of patches to apply"], + 'tests': [[], "List of test-scripts to run after install. A test script should return a non-zero exit status to fail"], + 'sanityCheckPaths': [{}, "List of files and directories to check (format: {'files':, 'dirs':}, default: {})"], + 'buildstats' : [None, "A list of dicts with buildstats: build_time, platform, core_count, cpu_model, install_size, timestamp"], + } + + + def __init__(self, path, validate=True): + # perform a deepcopy of the default_config found in the easybuild.tools.easy_block module + self.config = copy.deepcopy(self.default_config) + self.log = getLog("EasyBlock") + + if not os.path.isfile(path): + log.error("EasyBlock __init__ expected a valid path") + + self.validations = {'moduleclass': self.validmoduleclasses, 'stop': self.validstops } + + self.parse(path) + + # perform validations + if validate: + self.validate() + + def parse(self, path): + local_vars = {} + try: + execfile(path, {}, local_vars) + except IOError, err: + log.exception("Unexpected IOError during execfile()") + except SyntaxError, err: + log.exception("SyntaxError in easyblock %s" % path) + + # validate mandatory keys + for key in self.mandatory: + if key not in local_vars: + self.log.error("mandatory variable %s not provided" % key) + + # provide suggestions for typos + for key in local_vars: + if key not in self.config: + guesses = difflib.get_close_matches(key, self.config.keys(), 1, 0.85) + self.log.error("You set invalid variable %s, possible suggestions: %s" % (key, guesses[0:2])) + + for key in local_vars: + self[key] = local_vars[key] + self.log.info("setting config option %s: value %s" % (key, self[key])) + + def validate(self): + self.log.info("Validating easy block") + for attr in self.validations: + self._validate(attr, self.validations[attr]) + + return True + + def _validate(self, attr, values): + if self[attr] and self[attr] not in values: + self.log.error("%s provided %s is not valid: %s" % (attr, self[attr], values)) + + def __getitem__(self, key): + return self.config[key][0] + + + def __setitem__(self, key, value): + self.config[key][0] = value + From 190f6d03e3766b593fa61f13858712185fb664b9 Mon Sep 17 00:00:00 2001 From: Toon Willems Date: Thu, 5 Jul 2012 09:51:16 +0200 Subject: [PATCH 011/798] move processing out of find method --- easybuild/build.py | 17 ++++++++--------- 1 file changed, 8 insertions(+), 9 deletions(-) diff --git a/easybuild/build.py b/easybuild/build.py index 26723ef8d4..a0ca9d6f6f 100644 --- a/easybuild/build.py +++ b/easybuild/build.py @@ -182,7 +182,9 @@ def main(): error("Can't find path %s" % path) try: - packages.extend(findEasyconfigs(path, log, blocks)) + files = findEasyconfigs(path, log) + for eb_file in files: + packages.extend(processEasyconfig(eb_file, log, blocks)) except IOError, err: log.error("Processing easyconfigs in path %s failed: %s" % (path, err)) @@ -247,12 +249,12 @@ def error(message, exitCode=1, optparser=None): optparser.print_help() sys.exit(exitCode) -def findEasyconfigs(path, log, onlyBlocks=None): +def findEasyconfigs(path, log): """ - Find .eb easyconfig files in path and process them + Find .eb easyconfig files in path """ if os.path.isfile(path): - return processEasyconfig(path, log, onlyBlocks) + return [path] ## Walk through the start directory, retain all files that end in .eb files = [] @@ -266,10 +268,7 @@ def findEasyconfigs(path, log, onlyBlocks=None): log.debug("Found easyconfig %s" % spec) files.append(spec) - packages = [] - for filename in files: - packages.extend(processEasyconfig(filename, log, onlyBlocks)) - return packages + return files def processEasyconfig(path, log, onlyBlocks=None): """ @@ -671,7 +670,7 @@ def build(module, options, log, origEnviron, exitOnFailure=True): ## Check for errors if exitCode > 0 or filetools.errorsFoundInLog > 0: print_msg("\nWARNING: Build exited with exit code %d. %d possible error(s) were detected in the " \ - "build logs, please verify the build.\n" % (exitCode, filetools.errorsFoundInLog), + "build logs, please verify the build.\n" % (exitCode, filetools.errorsFoundInLog), log) if app.postmsg: From d0ed264717ea30b3006bf677884bd01968b2178a Mon Sep 17 00:00:00 2001 From: Toon Willems Date: Thu, 5 Jul 2012 12:23:32 +0200 Subject: [PATCH 012/798] extend easyblock class with extra functionality --- easybuild/framework/easy_block.py | 83 +++++++++++++++++++++++++++++-- 1 file changed, 79 insertions(+), 4 deletions(-) diff --git a/easybuild/framework/easy_block.py b/easybuild/framework/easy_block.py index 18fab563de..2375e324a4 100644 --- a/easybuild/framework/easy_block.py +++ b/easybuild/framework/easy_block.py @@ -24,6 +24,7 @@ import os from easybuild.tools.build_log import getLog, EasyBuildError +from easybuild.tools.toolkit import Toolkit class EasyBlock: """ @@ -34,6 +35,7 @@ class EasyBlock: validmoduleclasses = ['base', 'compiler', 'lib'] validstops = ['cfg', 'source', 'patch', 'configure', 'make', 'install', 'test', 'postproc', 'cleanup', 'packages'] + # TODO: move this somewhere default_config = { 'name':[None, "Name of software"], 'version':[None, "Version of software"], @@ -92,9 +94,10 @@ class EasyBlock: } - def __init__(self, path, validate=True): + def __init__(self, path, extra_options={}, validate=True): # perform a deepcopy of the default_config found in the easybuild.tools.easy_block module self.config = copy.deepcopy(self.default_config) + self.config.update(extra_options) self.log = getLog("EasyBlock") if not os.path.isfile(path): @@ -102,6 +105,10 @@ def __init__(self, path, validate=True): self.validations = {'moduleclass': self.validmoduleclasses, 'stop': self.validstops } + # store dependencies in private field (avoid nameclash with function) + self._dependencies = None + self._toolkit = None + self.parse(path) # perform validations @@ -109,6 +116,10 @@ def __init__(self, path, validate=True): self.validate() def parse(self, path): + """ + Parse the file and set options + mandatory requirements are checked here + """ local_vars = {} try: execfile(path, {}, local_vars) @@ -126,19 +137,83 @@ def parse(self, path): for key in local_vars: if key not in self.config: guesses = difflib.get_close_matches(key, self.config.keys(), 1, 0.85) - self.log.error("You set invalid variable %s, possible suggestions: %s" % (key, guesses[0:2])) + if len(guesses) == 1: + self.log.error("You set invalid variable %s, possible suggestions: %s" % (key, guesses[0])) for key in local_vars: - self[key] = local_vars[key] - self.log.info("setting config option %s: value %s" % (key, self[key])) + # do not store variables we don't need + if key in self.config: + self[key] = local_vars[key] + self.log.info("setting config option %s: value %s" % (key, self[key])) def validate(self): + """ + Validate this EasyBlock + - check certain variables + TODO: move more into here + """ self.log.info("Validating easy block") for attr in self.validations: self._validate(attr, self.validations[attr]) return True + def dependencies(self): + """ + returns an array of parsed dependencies + dependency = {'name': '', 'version': '', 'prefix': '', 'suffix': ''} + """ + # memoize dependencies + if self._dependencies: + return self._dependencies + + deps = [] + attr = ['name', 'version', 'suffix', 'dummy'] + + for dep in self['dependencies']: + dependency = {'name': '', 'version': '', 'suffix': '', 'dummy': False} + if isinstance(dep, dict): + dependency.update(dep) + # Try and convert to list + else: + try: + dep = list(dep) + dependency.update(dict(zip(attr, dep))) + except TypeError: + self.log.error('Dependency %s from unsupported type: %s.' % (dep, type(dep))) + + # Validations + if not dependency['name']: + self.log.error("Dependency without name given") + + if not dependency['version']: + self.log.error('Dependency without version.') + + if not 'tk' in dependency: + dependency['tk'] = self.toolkit().getDependencyVersion(dependency) + + deps.append(dependency) + self._dependencies = deps + return self._dependencies + + def toolkit(self): + """ + returns the Toolkit used + """ + if self._toolkit: + return self._toolkit + + tk = self['toolkit'] + self._toolkit = Toolkit(tk['name'], tk['version']) + return self._toolkit + + def update(self, dict): + """ + Custom instances might want to update the underlying hash + """ + self.config.update(dict) + + def _validate(self, attr, values): if self[attr] and self[attr] not in values: self.log.error("%s provided %s is not valid: %s" % (attr, self[attr], values)) From c37a7c2f26a2869387cb61f5de48f269810ec799 Mon Sep 17 00:00:00 2001 From: Toon Willems Date: Thu, 5 Jul 2012 16:01:05 +0200 Subject: [PATCH 013/798] Moving lots of things around, very experimental now --- easybuild/build.py | 36 ++++---- easybuild/framework/application.py | 143 +++++++---------------------- easybuild/framework/easy_block.py | 81 ++++++++++------ 3 files changed, 106 insertions(+), 154 deletions(-) diff --git a/easybuild/build.py b/easybuild/build.py index a0ca9d6f6f..822eff2fa6 100644 --- a/easybuild/build.py +++ b/easybuild/build.py @@ -27,7 +27,8 @@ import time import copy import platform -from easybuild.framework.application import Application, get_instance +from easybuild.framework.application import Application, get_class +from easybuild.framework.easy_block import EasyBlock from easybuild.tools.build_log import EasyBuildError, initLogger, \ removeLogHandler, print_msg from easybuild.tools.class_dumper import dumpClasses @@ -153,7 +154,9 @@ def main(): ## Dump possible options if options.avail_easyconfig_params: - app = get_instance(options.easyblock, log) + # TODO: fix this with new easyblock class + app = get_class(options.easyblock, log) + app = app() app.dump_cfg_options() ## Dump available classes @@ -283,40 +286,34 @@ def processEasyconfig(path, log, onlyBlocks=None): log.debug("Processing easyconfig %s" % spec) try: - app = Application(debug=LOGDEBUG) - app.process_ebfile(spec) + eb = EasyBlock(spec) except EasyBuildError, err: msg = "Failed to process easyconfig %s:\n%s" % (spec, err.msg) log.exception(msg) raise EasyBuildError(msg) + name = eb['name'] + ## this app will appear as following module in the list package = { 'spec': spec, - 'module': (app.name(), app.installversion), + 'module': (eb['name'], eb['version']), 'dependencies': [] } if len(blocks) > 1: package['originalSpec'] = path - for d in app.dep: + for d in eb.dependencies(): dep = (d['name'], d['tk']) - log.debug("Adding dependency %s for app %s." % (dep, app.name())) + log.debug("Adding dependency %s for app %s." % (dep, name)) package['dependencies'].append(dep) - if app.tk.name != 'dummy': - dep = (app.tk.name, app.tk.version) - log.debug("Adding toolkit %s as dependency for app %s." % (dep, app.name())) + if eb.toolkit().name != 'dummy': + dep = (eb.toolkit().name, eb.toolkit().version) + log.debug("Adding toolkit %s as dependency for app %s." % (dep, name)) package['dependencies'].append(dep) - try: - app.closelog() - os.remove(app.logfile) - except: - msg = "Failed to remove log file %s" % app.logfile - log.exception(msg) - raise EasyBuildError(msg) - del app + del eb packages.append(package) @@ -554,7 +551,8 @@ def build(module, options, log, origEnviron, exitOnFailure=True): name = module['module'][0] try: - app = get_instance(easyblock, log, name=name) + app_cls = get_class(easyblock, log, name=name) + app = app_cls(spec) log.info("Obtained application instance of for %s (easyblock: %s)" % (name, easyblock)) except EasyBuildError, err: error("Failed to get application instance for %s (easyblock: %s): %s" % (name, easyblock, err.msg)) diff --git a/easybuild/framework/application.py b/easybuild/framework/application.py index 3ea824d4f1..210c257f55 100644 --- a/easybuild/framework/application.py +++ b/easybuild/framework/application.py @@ -44,7 +44,8 @@ class Application: """ ## INIT - def __init__(self, name=None, version=None, newBuild=True, debug=False): + # TODO: never initializd with other parameters, remove them + def __init__(self, path, extra_options={}, name=None, version=None, newBuild=True, debug=False): """ Initialize the Application instance. """ @@ -55,8 +56,6 @@ def __init__(self, name=None, version=None, newBuild=True, debug=False): self.patches = [] self.src = [] - self.dep = [] - self.tk = None self.builddir = None self.installdir = None @@ -68,7 +67,7 @@ def __init__(self, name=None, version=None, newBuild=True, debug=False): self.installversion = 'NOT_VALID' # Easyblock for this Application - self.easyblock = None + self.cfg = EasyBlock(path, extra_options) # module generator self.moduleGenerator = None @@ -87,18 +86,19 @@ def __init__(self, name=None, version=None, newBuild=True, debug=False): # allow a post message to be set, which can be shown as last output self.postmsg = '' - + self.setlogger() def autobuild(self, ebfile, runTests): """ Build the software package described by cfg. """ - self.process_ebfile(ebfile) if self.getcfg('stop') and self.getcfg('stop') == 'cfg': return True self.log.info('Read easyconfig %s' % ebfile) + self.prepare_build() + self.ready2build() self.build() @@ -236,67 +236,11 @@ def addsource(self, listOfSources=None): self.log.info("Added sources: %s" % self.src) - def settoolkit(self, name, version): - """ - Add the build toolkit to be used. - """ - self.tk = Toolkit(name, version) - self.log.info("Added toolkit: name %s version %s" % (self.tk.name, self.tk.version)) - - def add_dependency(self, dependencies=None): + def prepare_build(self): """ - Add application dependencies. A dependency should be specified as a dictionary - or as a list of the following form: (name, version, suffix, dummy_boolean) - (suffix and dummy_boolean are optional) - """ - if dependencies and len(dependencies) > 0: - self.log.info("Adding dependencies: %s" % dependencies) - self.dep.extend([self.parse_dependency(d) for d in dependencies]) - - def parse_dependency(self, dep): + prepare for building + TODO: this should be consolidated with ready2build """ - Read a dependency declaration and transform it to a common format. - """ - result = {'name': '', 'version': '', 'prefix': '', 'suffix': ''} - - if type(dep) == dict: - ## check for name and version key - if not 'name' in dep: - self.log.error('Dependency without name.') - return - result.update(dep) - elif type(dep) in [list, tuple]: - result['name'] = dep[0] - if len(dep) >= 2: - result['version'] = dep[1] - if len(dep) >= 3: - result['suffix'] = dep[2] - if len(dep) >= 4: - result['dummy'] = dep[3] - else: - self.log.error('Dependency %s from unsupported type: %s.' % (dep, type(dep))) - return - - if not 'version' in result: - self.log.warning('Dependency without version.') - - if not 'tk' in result: - result['tk'] = self.tk.getDependencyVersion(result) - - return result - - ## process EasyBuild spec file - - def process_ebfile(self, fn): - """ - Read file fn, eval and add info - - assume certain predefined variable names - """ - - self.easyblock = EasyBlock(fn) - - # initialize logger - self.setlogger() ## check EasyBuild version easybuildVersion = self.getcfg('easybuildVersion') @@ -322,26 +266,6 @@ def process_ebfile(self, fn): else: self.log.info('no patches provided') - if self.getcfg('toolkit'): - self.log.debug("toolkit: %s" % self.getcfg('toolkit')) - tk = self.getcfg('toolkit') - self.settoolkit(tk['name'], tk['version']) - else: - self.log.error('no toolkit defined') - - if self.getcfg('toolkitopts'): - self.tk.setOptions(self.getcfg('toolkitopts')) - - if self.getcfg('dependencies'): - self.add_dependency(self.getcfg('dependencies')) - else: - self.log.info('no dependencies provided') - - # Build dependencies - builddeps = [self.parse_dependency(d) for d in self.getcfg('builddependencies')] - self.add_dependency(builddeps) - self.setcfg('builddependencies', builddeps) - self.setparallelism() self.make_installversion() @@ -350,13 +274,13 @@ def getcfg(self, key): """ Get a configuration item. """ - return self.easyblock[key] + return self.cfg[key] def setcfg(self, key, value): """ Set configuration key to value. """ - self.easyblock[key] = value + self.cfg[key] = value def updatecfg(self, key, value): """ @@ -409,9 +333,10 @@ def ready2build(self): self.log.warning("Loaded modules detected: %s" % loadedmods) # Do all dependencies have a toolkit version - self.tk.addDependencies(self.dep) - if not len(self.dep) == len(self.tk.dependencies): - self.log.debug("dep %s (%s)\ntk.dep %s (%s)" % (len(self.dep), self.dep, len(self.tk.dependencies), self.tk.dependencies)) + self.cfg.toolkit().addDependencies(self.cfg.dependencies()) + if not len(self.cfg.dependencies()) == len(self.cfg.toolkit().dependencies): + self.log.debug("dep %s (%s)\ntk.dep %s (%s)" % (len(self.cfg.dependencies()), self.cfg.dependencies(), + len(self.cfg.toolkit().dependencies), self.cfg.toolkit().dependencies)) self.log.error('Not all dependencies have a matching toolkit version') # Check if the application is not loaded at the moment @@ -683,7 +608,7 @@ def build(self): ## PATCH self.runstep('patch', [self.apply_patch], skippable=True) - self.tk.prepare(self.getcfg('onlytkmod')) + self.cfg.toolkit().prepare(self.getcfg('onlytkmod')) self.startfrom() ## CONFIGURE @@ -903,13 +828,13 @@ def make_builddir(self): if not self.build_in_installdir: # make a unique build dir ## if a tookitversion starts with a -, remove the - so prevent a -- in the path name - tkversion = self.tk.version + tkversion = self.cfg.toolkit().version if tkversion.startswith('-'): tkversion = tkversion[1:] - extra = "%s%s-%s%s" % (self.getcfg('versionprefix'), self.tk.name, tkversion, self.getcfg('versionsuffix')) + extra = "%s%s-%s%s" % (self.getcfg('versionprefix'), self.cfg.toolkit().name, tkversion, self.getcfg('versionsuffix')) localdir = os.path.join(buildPath(), self.name(), self.version(), extra) - if not self.tk.name == 'dummy': + if not self.cfg.toolkit().name == 'dummy': localdir = os.path.join(localdir, extra) ald = os.path.abspath(localdir) @@ -956,10 +881,10 @@ def make_installversion(self): """ vpf, vsf = self.getcfg('versionprefix'), self.getcfg('versionsuffix') - if self.tk.name == 'dummy': + if self.cfg.toolkit().name == 'dummy': name = "%s%s%s" % (vpf, self.version(), vsf) else: - extra = "%s-%s" % (self.tk.name, self.tk.version) + extra = "%s-%s" % (self.cfg.toolkit().name, self.cfg.toolkit().version) name = "%s%s-%s%s" % (vpf, self.version(), extra, vsf) self.installversion = name @@ -1048,13 +973,13 @@ def make_module_dep(self): load = unload = '' # Load toolkit - if self.tk.name != 'dummy': - load += self.moduleGenerator.loadModule(self.tk.name, self.tk.version) - unload += self.moduleGenerator.unloadModule(self.tk.name, self.tk.version) + if self.cfg.toolkit().name != 'dummy': + load += self.moduleGenerator.loadModule(self.cfg.toolkit().name, self.cfg.toolkit().version) + unload += self.moduleGenerator.unloadModule(self.cfg.toolkit().name, self.cfg.toolkit().version) # Load dependencies - builddeps = self.getcfg('builddependencies') - for dep in self.tk.dependencies: + builddeps = self.cfg.builddependencies() + for dep in self.cfg.toolkit().dependencies: if not dep in builddeps: self.log.debug("Adding %s/%s as a module dependency" % (dep['name'], dep['tk'])) load += self.moduleGenerator.loadModule(dep['name'], dep['tk']) @@ -1340,7 +1265,7 @@ def dump_cfg_options(self): """ Print a list of available configuration options. """ - for key in sorted(self.easyblock): + for key in sorted(self.cfg): tabs = "\t" * (3 - (len(key) + 1) / 8) print "%s:%s%s" % (key, tabs, self.cfg[key][1]) @@ -1352,7 +1277,7 @@ class StopException(Exception): """ pass -def get_instance_for(modulepath, class_name): +def get_class_for(modulepath, class_name): """ Get instance for a given class and easyblock module path. """ @@ -1363,7 +1288,7 @@ def get_instance_for(modulepath, class_name): # >>> c() m = __import__(modulepath, globals(), locals(), ['']) c = getattr(m, class_name) - return c() + return c def module_path_for_easyblock(easyblock): """ @@ -1403,7 +1328,7 @@ def get_paths_for(log, subdir="easyblocks"): return paths -def get_instance(easyblock, log, name=None): +def get_class(easyblock, log, name=None): """ Get instance for a particular application class (or Application) """ @@ -1439,11 +1364,11 @@ def get_instance(easyblock, log, name=None): try: - inst = get_instance_for(modulepath, class_name) + cls = get_class_for(modulepath, class_name) log.info("Successfully obtained %s class instance from %s" % (class_name, modulepath)) - return inst + return cls except Exception, err: log.error("Failed to use easyblock at %s for class %s: %s" % (modulepath, class_name, err)) @@ -1464,9 +1389,9 @@ def get_instance(easyblock, log, name=None): modulepath = module_path_for_easyblock(easyblock).lower() log.info("Derived full easyblock module path for %s: %s" % (class_name, modulepath)) - inst = get_instance_for(modulepath, class_name) + cls = get_class_for(modulepath, class_name) log.info("Successfully obtained %s class instance from %s" % (class_name, modulepath)) - return inst + return cls except Exception, err: log.error("Can't process provided module and class pair %s: %s" % (easyblock, err)) diff --git a/easybuild/framework/easy_block.py b/easybuild/framework/easy_block.py index 2375e324a4..a30a4c9b9f 100644 --- a/easybuild/framework/easy_block.py +++ b/easybuild/framework/easy_block.py @@ -107,8 +107,11 @@ def __init__(self, path, extra_options={}, validate=True): # store dependencies in private field (avoid nameclash with function) self._dependencies = None + self._build_dependencies = None self._toolkit = None + self._update(extra_options) + self.parse(path) # perform validations @@ -168,33 +171,29 @@ def dependencies(self): return self._dependencies deps = [] - attr = ['name', 'version', 'suffix', 'dummy'] for dep in self['dependencies']: - dependency = {'name': '', 'version': '', 'suffix': '', 'dummy': False} - if isinstance(dep, dict): - dependency.update(dep) - # Try and convert to list - else: - try: - dep = list(dep) - dependency.update(dict(zip(attr, dep))) - except TypeError: - self.log.error('Dependency %s from unsupported type: %s.' % (dep, type(dep))) - - # Validations - if not dependency['name']: - self.log.error("Dependency without name given") - - if not dependency['version']: - self.log.error('Dependency without version.') - - if not 'tk' in dependency: - dependency['tk'] = self.toolkit().getDependencyVersion(dependency) - - deps.append(dependency) + deps.append(self._parse_dependency(dep)) + + self._dependencies = deps - return self._dependencies + # dependencies include builddependencies as well + return self._dependencies + self.builddependencies() + + def builddependencies(self): + """ + return the parsed build dependencies + """ + if self._build_dependencies: + return self._build_dependencies + + deps = [] + + for dep in self['builddependencies']: + deps.append(self._parse_dependency(dep)) + + self._build_dependencies = deps + return self._build_dependencies def toolkit(self): """ @@ -205,11 +204,14 @@ def toolkit(self): tk = self['toolkit'] self._toolkit = Toolkit(tk['name'], tk['version']) + if self['toolkitopts']: + self._toolkit.setOptions(self['toolkitopts']) + return self._toolkit - def update(self, dict): + def _update(self, dict): """ - Custom instances might want to update the underlying hash + Add extra variables to the underlying dict """ self.config.update(dict) @@ -218,6 +220,33 @@ def _validate(self, attr, values): if self[attr] and self[attr] not in values: self.log.error("%s provided %s is not valid: %s" % (attr, self[attr], values)) + + def _parse_dependency(self, dep): + attr = ['name', 'version', 'suffix', 'dummy'] + dependency = {'name': '', 'version': '', 'suffix': '', 'dummy': False} + if isinstance(dep, dict): + dependency.update(dep) + # Try and convert to list + else: + try: + dep = list(dep) + dependency.update(dict(zip(attr, dep))) + except TypeError: + self.log.error('Dependency %s from unsupported type: %s.' % (dep, type(dep))) + + # Validations + if not dependency['name']: + self.log.error("Dependency without name given") + + if not dependency['version']: + self.log.error('Dependency without version.') + + if not 'tk' in dependency: + dependency['tk'] = self.toolkit().getDependencyVersion(dependency) + + return dependency + + def __getitem__(self, key): return self.config[key][0] From edfb7a81d895ac4668fe823d3fb55645a7dc803c Mon Sep 17 00:00:00 2001 From: Toon Willems Date: Thu, 5 Jul 2012 16:01:56 +0200 Subject: [PATCH 014/798] allow gcc to use additional vars --- easybuild/easyblocks/g/gcc.py | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/easybuild/easyblocks/g/gcc.py b/easybuild/easyblocks/g/gcc.py index d2432f96e1..70d0c18282 100644 --- a/easybuild/easyblocks/g/gcc.py +++ b/easybuild/easyblocks/g/gcc.py @@ -34,17 +34,17 @@ class GCC(Application): Uses system compiler for initial build, then bootstraps. """ - def __init__(self, *args, **kwargs): - Application.__init__(self, *args, **kwargs) + def __init__(self, *args): - self.cfg.update({'languages':[[], "List of languages to build GCC for (--enable-languages) (default: [])"], + extra_vars = {'languages':[[], "List of languages to build GCC for (--enable-languages) (default: [])"], 'withlto':[True, "Enable LTO support (default: True)"], 'withcloog':[False, "Build GCC with CLooG support (default: False)."], 'withppl':[False, "Build GCC with PPL support (default: False)."], 'pplwatchdog':[False, "Enable PPL watchdog (default: False)"], 'clooguseisl':[False, "Use ISL with CLooG or not (use PPL otherwise) (default: False)"] - } - ) + } + + Application.__init__(self, *args, extra_options=extra_vars) self.stagedbuild = False @@ -63,7 +63,7 @@ def create_dir(self, dirname): def prep_extra_src_dirs(self, stage, target_prefix=None): """ - Prepare extra (optional) source directories, so GCC will build these as well. + Prepare extra (optional) source directories, so GCC will build these as well. """ known_stages = ["stage1", "stage2", "stage3"] From 47aa7b3f9c21a88cfe1d52f3462edb32543be029 Mon Sep 17 00:00:00 2001 From: Toon Willems Date: Thu, 5 Jul 2012 17:10:19 +0200 Subject: [PATCH 015/798] log -> self.log --- easybuild/framework/easy_block.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/easybuild/framework/easy_block.py b/easybuild/framework/easy_block.py index a30a4c9b9f..39ad0cf15c 100644 --- a/easybuild/framework/easy_block.py +++ b/easybuild/framework/easy_block.py @@ -127,9 +127,9 @@ def parse(self, path): try: execfile(path, {}, local_vars) except IOError, err: - log.exception("Unexpected IOError during execfile()") + self.log.exception("Unexpected IOError during execfile()") except SyntaxError, err: - log.exception("SyntaxError in easyblock %s" % path) + self.log.exception("SyntaxError in easyblock %s" % path) # validate mandatory keys for key in self.mandatory: From cfa68695e36da15a3a0efc2d68d678ee1ce37b72 Mon Sep 17 00:00:00 2001 From: Toon Willems Date: Thu, 5 Jul 2012 17:17:16 +0200 Subject: [PATCH 016/798] Some very small testcases --- easybuild/test/__init__.py | 0 easybuild/test/easy_block.py | 45 ++++++++++++++++++++++++++++++++++++ 2 files changed, 45 insertions(+) create mode 100644 easybuild/test/__init__.py create mode 100644 easybuild/test/easy_block.py diff --git a/easybuild/test/__init__.py b/easybuild/test/__init__.py new file mode 100644 index 0000000000..e69de29bb2 diff --git a/easybuild/test/easy_block.py b/easybuild/test/easy_block.py new file mode 100644 index 0000000000..459c3e4275 --- /dev/null +++ b/easybuild/test/easy_block.py @@ -0,0 +1,45 @@ +import os +from unittest import TestCase +from easybuild.framework.easy_block import EasyBlock +from easybuild.tools.build_log import EasyBuildError + +class EasyBlockTest(TestCase): + + def setUp(self): + self.eb_file = "tmp-test-file" + f = open(self.eb_file, "w") + f.write(self.contents) + f.close() + + def tearDown(self): + os.remove(self.eb_file) + +class TestEmpty(EasyBlockTest): + + contents = "# empty string" + + def runTest(self): + self.assertRaises(EasyBuildError, EasyBlock, self.eb_file) + + +class TestMandatory(EasyBlockTest): + + contents = """ +name = "pi" +version = "3.14" +""" + + def runTest(self): + self.assertRaises(EasyBuildError, EasyBlock, self.eb_file) + self.contents += "\n".join(['homepage = "http://google.com"', 'description = "test easyblock"', + 'toolkit = {"name": "dummy", "version": "dummy"}']) + self.setUp() + + eb = EasyBlock(self.eb_file) + + self.assertEqual(eb['name'], "pi") + self.assertEqual(eb['version'], "3.14") + self.assertEqual(eb['homepage'], "http://google.com") + self.assertEqual(eb['toolkit'], {"name":"dummy", "version": "dummy"}) + self.assertEqual(eb['description'], "test easyblock") + From 781cfd3c2203f9a64c15630dfd15caf7490faa65 Mon Sep 17 00:00:00 2001 From: Toon Willems Date: Fri, 6 Jul 2012 10:18:42 +0200 Subject: [PATCH 017/798] Move installversion() to EasyBlock also, call installversion() instead of just version in processEasyConfig --- easybuild/build.py | 2 +- easybuild/framework/application.py | 35 ++++++++---------------------- easybuild/framework/easy_block.py | 20 +++++++++++++++++ 3 files changed, 30 insertions(+), 27 deletions(-) diff --git a/easybuild/build.py b/easybuild/build.py index da20d3509a..a567da47d0 100644 --- a/easybuild/build.py +++ b/easybuild/build.py @@ -297,7 +297,7 @@ def processEasyconfig(path, log, onlyBlocks=None): ## this app will appear as following module in the list package = { 'spec': spec, - 'module': (eb['name'], eb['version']), + 'module': (eb['name'], eb.installversion()), 'dependencies': [] } if len(blocks) > 1: diff --git a/easybuild/framework/application.py b/easybuild/framework/application.py index a6339b7215..37f7efbb35 100644 --- a/easybuild/framework/application.py +++ b/easybuild/framework/application.py @@ -63,9 +63,6 @@ def __init__(self, path, extra_options={}, name=None, version=None, newBuild=Tru self.pkgs = None self.skip = None - ## final version - self.installversion = 'NOT_VALID' - # Easyblock for this Application self.cfg = EasyBlock(path, extra_options) @@ -268,8 +265,6 @@ def prepare_build(self): self.setparallelism() - self.make_installversion() - def getcfg(self, key): """ Get a configuration item. @@ -348,11 +343,13 @@ def ready2build(self): # - if a current module can be found, skip is ok # -- this is potentially very dangerous if self.getcfg('skip'): - if Modules().exists(self.name(), self.installversion): + if Modules().exists(self.name(), self.cfg.installversion()): self.skip = True - self.log.info("Current version (name: %s, version: %s) found. Going to skip actually main build and potential exitsing packages. Expert only." % (self.name(), self.installversion)) + self.log.info("Current version (name: %s, version: %s) found. Going to skip actually main build and\ + potential exitsing packages. Expert only." % (self.name(), self.cfg.installversion())) else: - self.log.info("No current version (name: %s, version: %s) found. Not skipping anything." % (self.name(), self.installversion)) + self.log.info("No current version (name: %s, version: %s) found. Not skipping anything." % (self.name(), + self.cfg.installversion())) def file_locate(self, filename, pkg=False): @@ -876,25 +873,11 @@ def gen_installdir(self): basepath = installPath() if basepath: - installdir = os.path.join(basepath, self.name(), self.installversion) + installdir = os.path.join(basepath, self.name(), self.cfg.installversion()) self.installdir = os.path.abspath(installdir) else: self.log.error("Can't set installation directory") - def make_installversion(self): - """ - Generate the installation version name. - """ - vpf, vsf = self.getcfg('versionprefix'), self.getcfg('versionsuffix') - - if self.cfg.toolkit().name == 'dummy': - name = "%s%s%s" % (vpf, self.version(), vsf) - else: - extra = "%s-%s" % (self.cfg.toolkit().name, self.cfg.toolkit().version) - name = "%s%s-%s%s" % (vpf, self.version(), extra, vsf) - - self.installversion = name - def make_installdir(self): """ Create the installation directory. @@ -1071,11 +1054,11 @@ def packages(self): else: m = Modules([os.path.join(self.builddir, 'all')] + os.environ['MODULEPATH'].split(':')) - if m.exists(self.name(), self.installversion): - m.addModule([[self.name(), self.installversion]]) + if m.exists(self.name(), self.cfg.installversion()): + m.addModule([[self.name(), self.cfg.installversion()]]) m.load() else: - self.log.error("module %s version %s doesn't exist" % (self.name(), self.installversion)) + self.log.error("module %s version %s doesn't exist" % (self.name(), self.cfg.installversion())) self.extra_packages_pre() diff --git a/easybuild/framework/easy_block.py b/easybuild/framework/easy_block.py index 39ad0cf15c..2dda091a93 100644 --- a/easybuild/framework/easy_block.py +++ b/easybuild/framework/easy_block.py @@ -109,6 +109,7 @@ def __init__(self, path, extra_options={}, validate=True): self._dependencies = None self._build_dependencies = None self._toolkit = None + self._installversion = None self._update(extra_options) @@ -209,6 +210,25 @@ def toolkit(self): return self._toolkit + def installversion(self): + """ + return the installation version name + """ + if self._installversion: + return self._installversion + + prefix, suffix = self['versionprefix'], self['versionsuffix'] + + if self.toolkit().name == 'dummy': + name = "%s%s%s" % (prefix, self['version'], suffix) + else: + extra = "%s-%s" % (self.toolkit().name, self.toolkit().version) + name = "%s%s-%s%s" % (prefix, self.version(), extra, suffix) + + self._installversion = name + return self._installversion + + def _update(self, dict): """ Add extra variables to the underlying dict From 97a51dc10bf6607e766e992d971bcfcef2c05aa2 Mon Sep 17 00:00:00 2001 From: Toon Willems Date: Fri, 6 Jul 2012 10:25:29 +0200 Subject: [PATCH 018/798] installversion -> installversion() --- easybuild/build.py | 8 ++++---- easybuild/framework/application.py | 17 ++++++++++------- easybuild/tools/module_generator.py | 4 ++-- 3 files changed, 16 insertions(+), 13 deletions(-) diff --git a/easybuild/build.py b/easybuild/build.py index a567da47d0..09b8000acb 100644 --- a/easybuild/build.py +++ b/easybuild/build.py @@ -623,9 +623,9 @@ def build(module, options, log, origEnviron, exitOnFailure=True): ## Upload spec to central repository repo = getRepository() if 'originalSpec' in module: - repo.addEasyconfig(module['originalSpec'], app.name(), app.installversion + ".block", buildstats, currentbuildstats) - repo.addEasyconfig(spec, app.name(), app.installversion, buildstats, currentbuildstats) - repo.commit("Built %s/%s" % (app.name(), app.installversion)) + repo.addEasyconfig(module['originalSpec'], app.name(), app.installversion() + ".block", buildstats, currentbuildstats) + repo.addEasyconfig(spec, app.name(), app.installversion(), buildstats, currentbuildstats) + repo.commit("Built %s/%s" % (app.name(), app.installversion())) del repo except EasyBuildError, err: log.warn("Unable to commit easyconfig to repository (%s)", err) @@ -645,7 +645,7 @@ def build(module, options, log, origEnviron, exitOnFailure=True): error("Failed to move log file %s to new log file %s: %s" % (app.logfile, applicationLog, err)) try: - shutil.copy(spec, os.path.join(newLogDir, "%s-%s.eb" % (app.name(), app.installversion))) + shutil.copy(spec, os.path.join(newLogDir, "%s-%s.eb" % (app.name(), app.installversion()))) except IOError, err: error("Failed to move easyconfig %s to log dir %s: %s" % (spec, newLogDir, err)) diff --git a/easybuild/framework/application.py b/easybuild/framework/application.py index 37f7efbb35..7d9febfe47 100644 --- a/easybuild/framework/application.py +++ b/easybuild/framework/application.py @@ -343,13 +343,13 @@ def ready2build(self): # - if a current module can be found, skip is ok # -- this is potentially very dangerous if self.getcfg('skip'): - if Modules().exists(self.name(), self.cfg.installversion()): + if Modules().exists(self.name(), self.installversion()): self.skip = True self.log.info("Current version (name: %s, version: %s) found. Going to skip actually main build and\ - potential exitsing packages. Expert only." % (self.name(), self.cfg.installversion())) + potential exitsing packages. Expert only." % (self.name(), self.installversion())) else: self.log.info("No current version (name: %s, version: %s) found. Not skipping anything." % (self.name(), - self.cfg.installversion())) + self.installversion())) def file_locate(self, filename, pkg=False): @@ -873,7 +873,7 @@ def gen_installdir(self): basepath = installPath() if basepath: - installdir = os.path.join(basepath, self.name(), self.cfg.installversion()) + installdir = os.path.join(basepath, self.name(), self.installversion()) self.installdir = os.path.abspath(installdir) else: self.log.error("Can't set installation directory") @@ -1031,6 +1031,9 @@ def make_module_extra_packages(self): """ return self.moduleExtraPackages + def installversion(self): + return self.cfg.installversion() + def packages(self): """ After make install, run this. @@ -1054,11 +1057,11 @@ def packages(self): else: m = Modules([os.path.join(self.builddir, 'all')] + os.environ['MODULEPATH'].split(':')) - if m.exists(self.name(), self.cfg.installversion()): - m.addModule([[self.name(), self.cfg.installversion()]]) + if m.exists(self.name(), self.installversion()): + m.addModule([[self.name(), self.installversion()]]) m.load() else: - self.log.error("module %s version %s doesn't exist" % (self.name(), self.cfg.installversion())) + self.log.error("module %s version %s doesn't exist" % (self.name(), self.installversion())) self.extra_packages_pre() diff --git a/easybuild/tools/module_generator.py b/easybuild/tools/module_generator.py index 45c1f2683f..c8ffd29b7f 100644 --- a/easybuild/tools/module_generator.py +++ b/easybuild/tools/module_generator.py @@ -50,11 +50,11 @@ def createFiles(self): # Real file goes in 'all' category allPath = os.path.join(base, 'all', self.app.name()) - self.filename = os.path.join(allPath, self.app.installversion) + self.filename = os.path.join(allPath, self.app.installversion()) # Make symlink in moduleclass category classPath = os.path.join(base, self.app.getcfg('moduleclass'), self.app.name()) - classPathFile = os.path.join(classPath, self.app.installversion) + classPathFile = os.path.join(classPath, self.app.installversion()) # Create directories and links for directory in [allPath, classPath]: From 8a8ba058a71a8e6e9b5dfe294039d7c340bf642d Mon Sep 17 00:00:00 2001 From: Toon Willems Date: Fri, 6 Jul 2012 10:29:04 +0200 Subject: [PATCH 019/798] Copy paste coming back to haunt me --- easybuild/framework/easy_block.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/easybuild/framework/easy_block.py b/easybuild/framework/easy_block.py index 2dda091a93..edc2b6f354 100644 --- a/easybuild/framework/easy_block.py +++ b/easybuild/framework/easy_block.py @@ -223,7 +223,7 @@ def installversion(self): name = "%s%s%s" % (prefix, self['version'], suffix) else: extra = "%s-%s" % (self.toolkit().name, self.toolkit().version) - name = "%s%s-%s%s" % (prefix, self.version(), extra, suffix) + name = "%s%s-%s%s" % (prefix, self['version'], extra, suffix) self._installversion = name return self._installversion From 0128ed06917aea3af8c67ab1bf7ea94921f4182e Mon Sep 17 00:00:00 2001 From: Toon Willems Date: Fri, 6 Jul 2012 11:08:18 +0200 Subject: [PATCH 020/798] log -> self.log --- easybuild/framework/easy_block.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/easybuild/framework/easy_block.py b/easybuild/framework/easy_block.py index edc2b6f354..49af98353e 100644 --- a/easybuild/framework/easy_block.py +++ b/easybuild/framework/easy_block.py @@ -101,7 +101,7 @@ def __init__(self, path, extra_options={}, validate=True): self.log = getLog("EasyBlock") if not os.path.isfile(path): - log.error("EasyBlock __init__ expected a valid path") + self.log.error("EasyBlock __init__ expected a valid path") self.validations = {'moduleclass': self.validmoduleclasses, 'stop': self.validstops } From 3427e9b83c8e924a3655fed0a349f1675b0b6bb2 Mon Sep 17 00:00:00 2001 From: Toon Willems Date: Fri, 6 Jul 2012 11:31:52 +0200 Subject: [PATCH 021/798] Change all easyblocks to use new constructor style --- easybuild/easyblocks/a/atlas.py | 15 +++++---- easybuild/easyblocks/c/cp2k.py | 49 +++++++++++++++-------------- easybuild/easyblocks/g/gcc.py | 12 +++---- easybuild/easyblocks/i/imkl.py | 4 +-- easybuild/easyblocks/i/intelbase.py | 27 ++++++++-------- easybuild/easyblocks/i/itac.py | 8 ++--- easybuild/easyblocks/l/lapack.py | 12 +++---- easybuild/easyblocks/l/libsmm.py | 22 ++++++------- easybuild/easyblocks/m/mvapich2.py | 22 ++++++------- easybuild/easyblocks/p/python.py | 6 ++-- easybuild/easyblocks/s/scalapack.py | 4 +-- easybuild/easyblocks/w/wps.py | 27 ++++++++-------- easybuild/easyblocks/w/wrf.py | 21 +++++-------- 13 files changed, 110 insertions(+), 119 deletions(-) diff --git a/easybuild/easyblocks/a/atlas.py b/easybuild/easyblocks/a/atlas.py index 8dbb06fcec..bf6b960a65 100644 --- a/easybuild/easyblocks/a/atlas.py +++ b/easybuild/easyblocks/a/atlas.py @@ -32,13 +32,12 @@ class ATLAS(Application): """ def __init__(self, *args, **kwargs): - Application.__init__(self, *args, **kwargs) - self.cfg.update({ - 'ignorethrottling':[False, "Ignore check done by ATLAS for CPU throttling (not recommended) (default: False)"], - 'full_lapack': [False, "Build a full LAPACK library (requires netlib's LAPACK) (default: False)"], - 'sharedlibs':[False, "Enable building of shared libs as well (default: False)"] - }) + extra_vars = { 'ignorethrottling':[False, "Ignore check done by ATLAS for CPU throttling (not recommended) (default: False)"], + 'full_lapack': [False, "Build a full LAPACK library (requires netlib's LAPACK) (default: False)"], + 'sharedlibs':[False, "Enable building of shared libs as well (default: False)"] + } + Application.__init__(self, *args, extra_options=extra_vars) def configure(self): @@ -132,9 +131,9 @@ def make(self, verbose=False): def make_install(self): """Install step - + Default make install and optionally remove incomplete lapack libs. - If the full_lapack option was set to false we don't + If the full_lapack option was set to false we don't """ Application.make_install(self) if not self.getcfg('full_lapack'): diff --git a/easybuild/easyblocks/c/cp2k.py b/easybuild/easyblocks/c/cp2k.py index f346f9ddbc..ab50ea9d3d 100644 --- a/easybuild/easyblocks/c/cp2k.py +++ b/easybuild/easyblocks/c/cp2k.py @@ -39,19 +39,20 @@ class CP2K(Application): """ def __init__(self, *args, **kwargs): - Application.__init__(self, *args, **kwargs) - - self.cfg.update({'type':['popt',"Type of build ('popt' or 'psmp') (default: 'popt)"], - 'typeopt':[True,"Enable optimization (default: True)"], - 'libint':[True,"Use LibInt (default: True)"], - 'modincprefix':['',"IMKL prefix for modinc include dir (default: '')"], - 'modinc':[[],"List of modinc's to use (*.f90), or 'True' to use all found at given prefix (default: [])"], - 'extracflags':['',"Extra CFLAGS to be added (default: '')"], - 'extradflags':['',"Extra DFLAGS to be added (default: '')"], - 'runtest':[True, 'Indicates if a regression test should be run after make (default: True)'], - 'ignore_regtest_fails':[False, "Ignore failures in regression test (should be used with care) (default: False)."], - 'maxtasks':[3, "Maximum number of CP2K instances run at the same time during testing (default: 3)"] - }) + + extra_vars = {'type':['popt',"Type of build ('popt' or 'psmp') (default: 'popt)"], + 'typeopt':[True,"Enable optimization (default: True)"], + 'libint':[True,"Use LibInt (default: True)"], + 'modincprefix':['',"IMKL prefix for modinc include dir (default: '')"], + 'modinc':[[],"List of modinc's to use (*.f90), or 'True' to use all found at given prefix (default: [])"], + 'extracflags':['',"Extra CFLAGS to be added (default: '')"], + 'extradflags':['',"Extra DFLAGS to be added (default: '')"], + 'runtest':[True, 'Indicates if a regression test should be run after make (default: True)'], + 'ignore_regtest_fails':[False, "Ignore failures in regression test (should be used with care) (default: False)."], + 'maxtasks':[3, "Maximum number of CP2K instances run at the same time during testing (default: 3)"] + } + + Application.__init__(self, *args, extra_options=extra_vars) self.typearch = None @@ -128,9 +129,9 @@ def configure(self): if os.getenv('SOFTROOTIMKL'): options = self.configureMKL(options) elif os.getenv('SOFTROOTACML'): - options = self.configureACML(options) + options = self.configureACML(options) elif os.getenv('SOFTROOTATLAS'): - options = self.configureATLAS(options) + options = self.configureATLAS(options) if os.getenv('SOFTROOTFFTW'): options = self.configureFFTW(options) @@ -147,7 +148,7 @@ def configure(self): options['LIBS'] = "-Wl,--start-group %s -Wl,--end-group" % options['LIBS'] # create arch file using options set - archfile = os.path.join(self.getcfg('startfrom'), 'arch', + archfile = os.path.join(self.getcfg('startfrom'), 'arch', '%s.%s' % (self.typearch, self.getcfg('type'))) try: txt = self._generateMakefile(options) @@ -187,7 +188,7 @@ def prepmodinc(self): else: self.log.error("prepmodinc: Please specify either a boolean value " \ - "or a list of files in modinc (found: %s)." % + "or a list of files in modinc (found: %s)." % self.getcfg("modinc")) f77 = os.getenv('F77') @@ -234,7 +235,7 @@ def configureCommon(self): mpi2 = True else: self.log.debug("MPI-2 supporting MPI library %s not loaded.") - + if not mpi2: self.log.error("CP2K needs MPI-2, no known MPI-2 supporting library loaded?") @@ -247,7 +248,7 @@ def configureCommon(self): 'AR': 'ar -r', 'CPPFLAGS': '', - + 'FPIC': self.fpic, 'DEBUG': self.debug, @@ -408,14 +409,14 @@ def configureMKL(self, options): 'INTEL_INC': '$(MKLROOT)/include', 'INTEL_INCF': '$(INTEL_INC)/fftw', }) - + options['DFLAGS'] += ' -D__FFTW3 -D__FFTMKL' extra = '' if self.modincpath: extra = '-I%s' % self.modincpath options['CFLAGS'] += ' -I$(INTEL_INC) -I$(INTEL_INCF) %s $(FPIC) $(DEBUG)' % extra - + options['LIBS'] += ' %s %s' % (self.libsmm, os.getenv('LIBSCALAPACK')) return options @@ -631,8 +632,8 @@ def make_install(self): if os.path.isfile(exefile): shutil.copy2(exefile, targetdir) except OSError, err: - self.log.error("Copying executables from %s to bin dir %s failed: %s" % (exedir, - targetdir, + self.log.error("Copying executables from %s to bin dir %s failed: %s" % (exedir, + targetdir, err) ) # copy tests @@ -672,4 +673,4 @@ def sanitycheck(self): self.log.info("Customized sanity check paths: %s" % self.getcfg('sanityCheckPaths')) - Application.sanitycheck(self) \ No newline at end of file + Application.sanitycheck(self) diff --git a/easybuild/easyblocks/g/gcc.py b/easybuild/easyblocks/g/gcc.py index f29fe7d03e..f829a7d099 100644 --- a/easybuild/easyblocks/g/gcc.py +++ b/easybuild/easyblocks/g/gcc.py @@ -37,12 +37,12 @@ class GCC(Application): def __init__(self, *args): extra_vars = {'languages':[[], "List of languages to build GCC for (--enable-languages) (default: [])"], - 'withlto':[True, "Enable LTO support (default: True)"], - 'withcloog':[False, "Build GCC with CLooG support (default: False)."], - 'withppl':[False, "Build GCC with PPL support (default: False)."], - 'pplwatchdog':[False, "Enable PPL watchdog (default: False)"], - 'clooguseisl':[False, "Use ISL with CLooG or not (use PPL otherwise) (default: False)"] - } + 'withlto':[True, "Enable LTO support (default: True)"], + 'withcloog':[False, "Build GCC with CLooG support (default: False)."], + 'withppl':[False, "Build GCC with PPL support (default: False)."], + 'pplwatchdog':[False, "Enable PPL watchdog (default: False)"], + 'clooguseisl':[False, "Use ISL with CLooG or not (use PPL otherwise) (default: False)"] + } Application.__init__(self, *args, extra_options=extra_vars) diff --git a/easybuild/easyblocks/i/imkl.py b/easybuild/easyblocks/i/imkl.py index 5db2579667..f3407ee67c 100644 --- a/easybuild/easyblocks/i/imkl.py +++ b/easybuild/easyblocks/i/imkl.py @@ -38,9 +38,9 @@ class Imkl(IntelBase): def __init__(self, *args, **kwargs): """Constructor, adds extra config options""" - IntelBase.__init__(self, args, kwargs) + extra_vars = {'interfaces':[True, "Indicates whether interfaces should be built (default: True)"]} - self.cfg.update({'interfaces':[True, "Indicates whether interfaces should be built (default: True)"]}) + IntelBase.__init__(self, args, extra_options=extra_vars) def configure(self): IntelBase.configure(self) diff --git a/easybuild/easyblocks/i/intelbase.py b/easybuild/easyblocks/i/intelbase.py index 43d54f816b..38e0442908 100644 --- a/easybuild/easyblocks/i/intelbase.py +++ b/easybuild/easyblocks/i/intelbase.py @@ -30,21 +30,22 @@ class IntelBase(Application): - add license variable """ - def __init__(self, *args, **kwargs): + def __init__(self, *args, extra_options={}): """Constructor, adds extra config options""" - Application.__init__(self, args, kwargs) self.license = None - self.cfg.update({ - 'license':[None,"License file path (default: None)"], - 'license_activation':['license_server', "Indicates license activation type (default: 'license_server')"], - # 'usetmppath': - # workaround for older SL5 version (5.5 and earlier) - # used to be True, but False since SL5.6/SL6 - # disables TMP_PATH env and command line option - 'usetmppath':[False, "Use temporary path for installation (default: False)"], - 'm32':[False, "Enable 32-bit toolkit (default: False)"], - }) + extra_vars = {'license':[None,"License file path (default: None)"], + 'license_activation':['license_server', "Indicates license activation type (default: 'license_server')"], + # 'usetmppath': + # workaround for older SL5 version (5.5 and earlier) + # used to be True, but False since SL5.6/SL6 + # disables TMP_PATH env and command line option + 'usetmppath':[False, "Use temporary path for installation (default: False)"], + 'm32':[False, "Enable 32-bit toolkit (default: False)"], + } + extra_vars.update(extra_options) + + Application.__init__(self, args, extra_options=extra_vars) def clean_homedir(self): """Remove 'intel' directory from home directory, where stuff is cached.""" @@ -136,4 +137,4 @@ def cleanup(self): Application.cleanup(self) - # no default sanity check, needs to be implemented by derived class \ No newline at end of file + # no default sanity check, needs to be implemented by derived class diff --git a/easybuild/easyblocks/i/itac.py b/easybuild/easyblocks/i/itac.py index 5ff79eb461..8e342fdfc7 100644 --- a/easybuild/easyblocks/i/itac.py +++ b/easybuild/easyblocks/i/itac.py @@ -32,9 +32,9 @@ class Itac(IntelBase): def __init__(self, *args, **kwargs): """Constructor, adds extra config options""" - IntelBase.__init__(self, args, kwargs) + extra_vars = {'preferredmpi':['impi3', "Preferred MPI type (default: 'impi3')"]} + IntelBase.__init__(self, args, extra_options=extra_vars) - self.cfg.update({'preferredmpi':['impi3', "Preferred MPI type (default: 'impi3')"]}) def make_install(self): """ @@ -82,7 +82,7 @@ def make_module_req_guess(self): 'VT_LIB_DIR':['itac/lib_%s' % self.getcfg('preferredmpi')], 'VT_SLIB_DIR':['itac/lib_s%s' % self.getcfg('preferredmpi')] } - + if self.getcfg('m32'): guesses.update({ 'PATH':['bin', 'bin/ia32', 'ia32/bin'], @@ -103,4 +103,4 @@ def make_module_extra(self): txt += "setenv\t%s\t\t%s\n" % ('VT_MPI', self.getcfg('preferredmpi')) txt += "setenv\t%s\t\t%s\n" % ('VT_ADD_LIBS', '"-ldwarf -lelf -lvtunwind -lnsl -lm -ldl -lpthread"') - return txt \ No newline at end of file + return txt diff --git a/easybuild/easyblocks/l/lapack.py b/easybuild/easyblocks/l/lapack.py index aa243ae20a..45cc6b2a82 100644 --- a/easybuild/easyblocks/l/lapack.py +++ b/easybuild/easyblocks/l/lapack.py @@ -56,12 +56,10 @@ class LAPACK(Application): """ def __init__(self, *args, **kwargs): - Application.__init__(self, *args, **kwargs) - - self.cfg.update({ - 'supply_blas':[False, "Supply BLAS lib to LAPACK for building (default: False)"], - 'test_only':[False, "Only make tests, don't try and build LAPACK lib."] - }) + extra_vars = {'supply_blas':[False, "Supply BLAS lib to LAPACK for building (default: False)"], + 'test_only':[False, "Only make tests, don't try and build LAPACK lib."] + } + Application.__init__(self, *args, extra_options=extra_vars) def configure(self): """ @@ -208,4 +206,4 @@ def sanitycheck(self): self.log.info("Customized sanity check paths: %s"%self.getcfg('sanityCheckPaths')) - Application.sanitycheck(self) \ No newline at end of file + Application.sanitycheck(self) diff --git a/easybuild/easyblocks/l/libsmm.py b/easybuild/easyblocks/l/libsmm.py index c63d361a9a..9368f479b3 100644 --- a/easybuild/easyblocks/l/libsmm.py +++ b/easybuild/easyblocks/l/libsmm.py @@ -34,15 +34,15 @@ class Libsmm(Application): """ def __init__(self, *args, **kwargs): - Application.__init__(self, *args, **kwargs) - # default dimensions dd = [1,4,5,6,9,13,16,17,22] - self.cfg.update({'transpose_flavour':[1, "Transpose flavour of routines (default: 1)"], - 'max_tiny_dim':[12, "Maximum tiny dimension (default: 12)"], - 'dims':[dd, "Generate routines for these matrix dims (default: %s)" % dd] - }) + extra_vars = {'transpose_flavour':[1, "Transpose flavour of routines (default: 1)"], + 'max_tiny_dim':[12, "Maximum tiny dimension (default: 12)"], + 'dims':[dd, "Generate routines for these matrix dims (default: %s)" % dd] + } + + Application.__init__(self, *args, extra_options=extra_vars) def configure(self): """Configure build: change to tools/build_libsmm dir""" @@ -106,7 +106,7 @@ def make(self): # tiny dimensions are used as primitves and generated in an 'exhaustive' search. # They should be a sequence from 1 to N, -# where N is a number that is large enough to have good in cache performance +# where N is a number that is large enough to have good in cache performance # (e.g. for modern SSE cpus 8 to 12) # Too large (>12?) is not beneficial, but increases the time needed to build the library # Too small (<8) will lead to a slow library, but the build might proceed quickly @@ -114,7 +114,7 @@ def make(self): # dims_tiny="%(tiny_dims)s" -# host compiler... this is used only to compile a few tools needed to build the library. +# host compiler... this is used only to compile a few tools needed to build the library. # The library itself is not compiled this way. # This compiler needs to be able to deal with some Fortran2003 constructs. # @@ -152,7 +152,7 @@ def make(self): blas_found = True else: self.log.info("BLAS library %s not found" % blas_lib) - + if not blas_found: self.log.error('No known BLAS library found!') @@ -169,7 +169,7 @@ def make(self): } # configure for various iterations - datatypes = [(1, 'double precision real'), + datatypes = [(1, 'double precision real'), (3, 'double precision complex') ] for (dt, descr) in datatypes: @@ -206,4 +206,4 @@ def sanitycheck(self): self.log.info("Customized sanity check paths: %s" % self.getcfg('sanityCheckPaths')) - Application.sanitycheck(self) \ No newline at end of file + Application.sanitycheck(self) diff --git a/easybuild/easyblocks/m/mvapich2.py b/easybuild/easyblocks/m/mvapich2.py index a3b3c22996..e5ac115e72 100644 --- a/easybuild/easyblocks/m/mvapich2.py +++ b/easybuild/easyblocks/m/mvapich2.py @@ -28,15 +28,13 @@ class MVAPICH2(Application): """ def __init__(self, *args, **kwargs): - Application.__init__(self, *args, **kwargs) - - self.cfg.update({ - 'withchkpt':[False, "Enable checkpointing support (required BLCR) (default: False)"], - 'withlimic2':[False, "Enable LiMIC2 support for intra-node communication (default: False)"], - 'withmpe':[False, "Build MPE routines (default: False)"], - 'debug':[False, "Enable debug build (which is slower) (default: False)"], - 'rdma_type':["gen2", "Specify the RDMA type (gen2/udapl) (default: gen2)"] - }) + extra_vars = {'withchkpt':[False, "Enable checkpointing support (required BLCR) (default: False)"], + 'withlimic2':[False, "Enable LiMIC2 support for intra-node communication (default: False)"], + 'withmpe':[False, "Build MPE routines (default: False)"], + 'debug':[False, "Enable debug build (which is slower) (default: False)"], + 'rdma_type':["gen2", "Specify the RDMA type (gen2/udapl) (default: gen2)"] + } + Application.__init__(self, *args, extra_options=extra_vars) def configure(self): @@ -65,7 +63,7 @@ def configure(self): # enable Fortran 77/90 and C++ bindings add_configopts += '--enable-f77 --enable-fc --enable-cxx ' - # MVAPICH configure script complains when F90 or F90FLAGS are set, + # MVAPICH configure script complains when F90 or F90FLAGS are set, # they should be replaced with FC/FCFLAGS instead for (envvar, new_envvar) in [("F90", "FC"), ("F90FLAGS", "FCFLAGS")]: envvar_val = os.getenv(envvar) @@ -100,7 +98,7 @@ def sanitycheck(self): """ if not self.getcfg('sanityCheckPaths'): - self.setcfg('sanityCheckPaths',{'files':["bin/%s" % x for x in ["mpicc", "mpicxx", "mpif77", + self.setcfg('sanityCheckPaths',{'files':["bin/%s" % x for x in ["mpicc", "mpicxx", "mpif77", "mpif90", "mpiexec.hydra"]] + ["lib/lib%s" % y for x in ["fmpich", "mpichcxx", "mpichf90", "mpich", "mpl", "opa"] @@ -110,4 +108,4 @@ def sanitycheck(self): self.log.info("Customized sanity check paths: %s"%self.getcfg('sanityCheckPaths')) - Application.sanitycheck(self) \ No newline at end of file + Application.sanitycheck(self) diff --git a/easybuild/easyblocks/p/python.py b/easybuild/easyblocks/p/python.py index 6d1e25f775..814038691a 100644 --- a/easybuild/easyblocks/p/python.py +++ b/easybuild/easyblocks/p/python.py @@ -31,7 +31,7 @@ class Python(Application): To extend Python by adding extra packages there are two ways: - list the packages in the pkglist, this will include the packages in this Python easyblock - create a seperate easyblock, so the packages can be loaded with module load - + e.g., you can include numpy and scipy in a default Python installation but also provide newer updated numpy and scipy versions by creating a PythonPackageModule for it. """ @@ -219,7 +219,7 @@ class Numpy(FortranPythonPackage): def __init__(self, mself, pkg, pkginstalldeps): FortranPythonPackage.__init__(self, mself, pkg, pkginstalldeps) - self.pkgcfgs = self.cfg['pkgcfgs'][0] + self.pkgcfgs = self.getcfg('pkgcfgs') if self.pkgcfgs.has_key('numpysitecfglibsubdirs'): self.numpysitecfglibsubdirs = self.pkgcfgs['numpysitecfglibsubdirs'] else: @@ -253,7 +253,7 @@ def __init__(self, mself, pkg, pkginstalldeps): self.log.error("Could not detect math kernel (mkl, atlas)") if "SOFTROOTIMKL" in os.environ or "SOFTROOTFFTW" in os.environ: - extrasiteconfig += """ + extrasiteconfig += """ [fftw] libraries = %s """ % os.getenv("LIBFFT") diff --git a/easybuild/easyblocks/s/scalapack.py b/easybuild/easyblocks/s/scalapack.py index 248db50eba..9b2afec6af 100644 --- a/easybuild/easyblocks/s/scalapack.py +++ b/easybuild/easyblocks/s/scalapack.py @@ -88,8 +88,8 @@ def make(self): extra_makeopts += 'home=%s BLACSdir=%s ' % (self.getcfg('startfrom'), blacsroot) # set BLACS libs correctly - for (var, lib) in [('BLACSFINIT', "F77init"), - ('BLACSCINIT', "Cinit"), + for (var, lib) in [('BLACSFINIT', "F77init"), + ('BLACSCINIT', "Cinit"), ('BLACSLIB', "")]: extra_makeopts += '%s=%s/lib/libblacs%s.a ' % (var, blacsroot, lib) diff --git a/easybuild/easyblocks/w/wps.py b/easybuild/easyblocks/w/wps.py index f8a2e23990..579c890020 100644 --- a/easybuild/easyblocks/w/wps.py +++ b/easybuild/easyblocks/w/wps.py @@ -32,28 +32,27 @@ class WPS(Application): """Support for building/installing WPS.""" - def __init__(self): + def __init__(self, *args): """Add extra config options specific to WPS.""" - Application.__init__(self) - - self.build_in_installdir = True - self.comp_fam = None - self.wrfdir = None - self.compile_script = None - testdata_urls = [ "http://www.mmm.ucar.edu/wrf/src/data/avn_data.tar.gz", "http://www.mmm.ucar.edu/wrf/src/wps_files/geog.tar.gz" # 697MB download, 16GB unpacked! ] - self.cfg.update({'buildtype':[None, "Specify the type of build (smpar: OpenMP, dmpar: MPI)."], - 'runtest':[True, "Build and run WPS tests (default: True)."], - 'testdata':[testdata_urls, "URL to test data required to run WPS test (default: %s)." % testdata_urls] - }) + extra_vars = {'buildtype':[None, "Specify the type of build (smpar: OpenMP, dmpar: MPI)."], + 'runtest':[True, "Build and run WPS tests (default: True)."], + 'testdata':[testdata_urls, "URL to test data required to run WPS test (default: %s)." % testdata_urls] + } + Application.__init__(self, *args, extra_options=extra_vars) + + self.build_in_installdir = True + self.comp_fam = None + self.wrfdir = None + self.compile_script = None def configure(self): - """Configure build: + """Configure build: - set required environment variables (for netCDF, JasPer) - patch compile script and ungrib Makefile for non-default install paths of WRF and JasPer - run configure script and figure how to select desired build option @@ -337,4 +336,4 @@ def make_module_extra(self): txt += get_netcdf_module_set_cmds(self.log) - return txt \ No newline at end of file + return txt diff --git a/easybuild/easyblocks/w/wrf.py b/easybuild/easyblocks/w/wrf.py index a1a6eee516..13fef3451c 100644 --- a/easybuild/easyblocks/w/wrf.py +++ b/easybuild/easyblocks/w/wrf.py @@ -31,24 +31,19 @@ class WRF(Application): def __init__(self,*args,**kwargs): """Add extra config options specific to WRF.""" + extra_vars = {'buildtype':[None, "Specify the type of build (serial, smpar (OpenMP), " \ + "dmpar (MPI), dm+sm (hybrid OpenMP/MPI))."], + 'rewriteopts':[True, "Replace -O3 with CFLAGS/FFLAGS (default: True)."], + 'runtest':[True, "Build and run WRF tests (default: True)."] + } + Application.__init__(self, *args, extra_options=extra_vars) - Application.__init__(self, args,kwargs) - self.build_in_installdir = True - self.wrfsubdir = None - self.comp_fam = None - self.cfg.update({ - 'buildtype':[None, "Specify the type of build (serial, smpar (OpenMP), " \ - "dmpar (MPI), dm+sm (hybrid OpenMP/MPI))."], - 'rewriteopts':[True, "Replace -O3 with CFLAGS/FFLAGS (default: True)."], - 'runtest':[True, "Build and run WRF tests (default: True)."] - }) - - def configure(self): - """Configure build: + def configure(self): + """Configure build: - set some magic environment variables - run configure script - adjust configure.wrf file if needed From 211616544ef95afc2b5733cf043cc5d5d41eef68 Mon Sep 17 00:00:00 2001 From: Toon Willems Date: Fri, 6 Jul 2012 12:06:42 +0200 Subject: [PATCH 022/798] extend testing with some error regex matching --- easybuild/test/easy_block.py | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) diff --git a/easybuild/test/easy_block.py b/easybuild/test/easy_block.py index 459c3e4275..a9a63bd056 100644 --- a/easybuild/test/easy_block.py +++ b/easybuild/test/easy_block.py @@ -1,4 +1,6 @@ import os +import re + from unittest import TestCase from easybuild.framework.easy_block import EasyBlock from easybuild.tools.build_log import EasyBuildError @@ -14,12 +16,19 @@ def setUp(self): def tearDown(self): os.remove(self.eb_file) + def assertErrorRegex(self, error, regex, call, *args): + try: + call(*args) + except error, err: + self.assertTrue(re.search(regex, err.msg)) + class TestEmpty(EasyBlockTest): contents = "# empty string" def runTest(self): self.assertRaises(EasyBuildError, EasyBlock, self.eb_file) + self.assertErrorRegex(EasyBuildError, "expected a valid path", EasyBlock, "") class TestMandatory(EasyBlockTest): @@ -30,7 +39,8 @@ class TestMandatory(EasyBlockTest): """ def runTest(self): - self.assertRaises(EasyBuildError, EasyBlock, self.eb_file) + self.assertErrorRegex(EasyBuildError, "mandatory variable \w* not provided", EasyBlock, self.eb_file) + self.contents += "\n".join(['homepage = "http://google.com"', 'description = "test easyblock"', 'toolkit = {"name": "dummy", "version": "dummy"}']) self.setUp() From 7877066abcfd7cd78f739b49285a5f2282690506 Mon Sep 17 00:00:00 2001 From: Toon Willems Date: Fri, 6 Jul 2012 12:18:45 +0200 Subject: [PATCH 023/798] Validation testing --- easybuild/test/easy_block.py | 19 +++++++++++++++++++ 1 file changed, 19 insertions(+) diff --git a/easybuild/test/easy_block.py b/easybuild/test/easy_block.py index a9a63bd056..535829ef3f 100644 --- a/easybuild/test/easy_block.py +++ b/easybuild/test/easy_block.py @@ -53,3 +53,22 @@ def runTest(self): self.assertEqual(eb['toolkit'], {"name":"dummy", "version": "dummy"}) self.assertEqual(eb['description'], "test easyblock") +class TestValidation(EasyBlockTest): + + contents = """ +name = "pi" +version = "3.14" +homepage = "http://google.com" +description = "test easyblock" +toolkit = {"name":"dummy", "version": "dummy"} +stop = 'not-valid' +""" + + def runTest(self): + eb = EasyBlock(self.eb_file, validate=False) + self.assertErrorRegex(EasyBuildError, "\w* provided \S* is not valid", eb.validate) + + eb['stop'] = 'patch' + # this should now not crash + eb.validate() + From 4197b528fa033f4e7ba5949058f568af277e9491 Mon Sep 17 00:00:00 2001 From: Toon Willems Date: Fri, 6 Jul 2012 15:16:33 +0200 Subject: [PATCH 024/798] forgot to add to array --- easybuild/framework/easy_block.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/easybuild/framework/easy_block.py b/easybuild/framework/easy_block.py index 49af98353e..f9fd9a1342 100644 --- a/easybuild/framework/easy_block.py +++ b/easybuild/framework/easy_block.py @@ -177,9 +177,9 @@ def dependencies(self): deps.append(self._parse_dependency(dep)) - self._dependencies = deps + self._dependencies = deps + self.builddependencies() # dependencies include builddependencies as well - return self._dependencies + self.builddependencies() + return self._dependencies def builddependencies(self): """ From 2ec68b766fea2b3ffad68ccee466a19677782d48 Mon Sep 17 00:00:00 2001 From: Toon Willems Date: Fri, 6 Jul 2012 15:32:01 +0200 Subject: [PATCH 025/798] Make shared_lib_ext available as a variable This is to aid mac os x support (see #16) --- easybuild/framework/easy_block.py | 5 ++++- easybuild/test/easy_block.py | 17 +++++++++++++++++ easybuild/tools/systemtools.py | 4 +--- 3 files changed, 22 insertions(+), 4 deletions(-) diff --git a/easybuild/framework/easy_block.py b/easybuild/framework/easy_block.py index f9fd9a1342..2a4e071c63 100644 --- a/easybuild/framework/easy_block.py +++ b/easybuild/framework/easy_block.py @@ -25,6 +25,7 @@ from easybuild.tools.build_log import getLog, EasyBuildError from easybuild.tools.toolkit import Toolkit +from easybuild.tools.systemtools import get_shared_lib_ext class EasyBlock: """ @@ -124,9 +125,11 @@ def parse(self, path): Parse the file and set options mandatory requirements are checked here """ + global_vars = {"shared_lib_ext": get_shared_lib_ext()} local_vars = {} + try: - execfile(path, {}, local_vars) + execfile(path, global_vars, local_vars) except IOError, err: self.log.exception("Unexpected IOError during execfile()") except SyntaxError, err: diff --git a/easybuild/test/easy_block.py b/easybuild/test/easy_block.py index 535829ef3f..7bf5625132 100644 --- a/easybuild/test/easy_block.py +++ b/easybuild/test/easy_block.py @@ -4,6 +4,7 @@ from unittest import TestCase from easybuild.framework.easy_block import EasyBlock from easybuild.tools.build_log import EasyBuildError +from easybuild.tools.systemtools import get_shared_lib_ext class EasyBlockTest(TestCase): @@ -72,3 +73,19 @@ def runTest(self): # this should now not crash eb.validate() +class TestSharedLibExt(EasyBlockTest): + + contents = """ +name = "pi" +version = "3.14" +homepage = "http://google.com" +description = "test easyblock" +toolkit = {"name":"dummy", "version": "dummy"} +sanityCheckPaths = { 'files': ["lib/lib.%s" % shared_lib_ext] } +""" + + def runTest(self): + eb = EasyBlock(self.eb_file) + self.assertEqual(eb['sanityCheckPaths']['files'][0], "lib/lib.%s" % get_shared_lib_ext()) + + diff --git a/easybuild/tools/systemtools.py b/easybuild/tools/systemtools.py index b20f669e0b..a3f5e7f9b5 100644 --- a/easybuild/tools/systemtools.py +++ b/easybuild/tools/systemtools.py @@ -136,7 +136,7 @@ def get_kernel_name(): def get_shared_lib_ext(): """Determine extention for shared libraries - Linux: 'so', Darwin: 'dylib' + Linux: 'so', Darwin: 'dylib' """ shared_lib_exts = { 'Linux':'so', @@ -171,5 +171,3 @@ def get_platform_name(withversion=False): platform_name = '%s-%s-%s' % (machine, vendor, kernel_name.lower()) return platform_name - - From 387e97051703032957755795fbe68f68221ddc30 Mon Sep 17 00:00:00 2001 From: Toon Willems Date: Fri, 6 Jul 2012 15:40:23 +0200 Subject: [PATCH 026/798] Mac support for OpenMPI --- .../o/OpenMPI/OpenMPI-1.4.5-GCC-4.6.3-no-OFED.eb | 6 ++++-- easybuild/easyconfigs/o/OpenMPI/OpenMPI-1.4.5-GCC-4.6.3.eb | 6 ++++-- 2 files changed, 8 insertions(+), 4 deletions(-) diff --git a/easybuild/easyconfigs/o/OpenMPI/OpenMPI-1.4.5-GCC-4.6.3-no-OFED.eb b/easybuild/easyconfigs/o/OpenMPI/OpenMPI-1.4.5-GCC-4.6.3-no-OFED.eb index 16a56707f9..e30f3724f8 100644 --- a/easybuild/easyconfigs/o/OpenMPI/OpenMPI-1.4.5-GCC-4.6.3-no-OFED.eb +++ b/easybuild/easyconfigs/o/OpenMPI/OpenMPI-1.4.5-GCC-4.6.3-no-OFED.eb @@ -16,7 +16,9 @@ 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"]], + ["lib/lib%s.%s" % (libfile, shared_lib_ext) 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"] } diff --git a/easybuild/easyconfigs/o/OpenMPI/OpenMPI-1.4.5-GCC-4.6.3.eb b/easybuild/easyconfigs/o/OpenMPI/OpenMPI-1.4.5-GCC-4.6.3.eb index eaba6718bb..8db7f77d35 100644 --- a/easybuild/easyconfigs/o/OpenMPI/OpenMPI-1.4.5-GCC-4.6.3.eb +++ b/easybuild/easyconfigs/o/OpenMPI/OpenMPI-1.4.5-GCC-4.6.3.eb @@ -21,7 +21,9 @@ 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"]], + ["lib/lib%s.%s" % (libfile, shared_lib_ext) 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"] } From 784651917880fe130d02952c8950944496a1a292 Mon Sep 17 00:00:00 2001 From: Toon Willems Date: Fri, 6 Jul 2012 19:23:45 +0200 Subject: [PATCH 027/798] no _ in module names --- easybuild/build.py | 2 +- easybuild/framework/application.py | 2 +- easybuild/framework/{easy_block.py => easyblock.py} | 2 +- easybuild/test/{easy_block.py => easyblock.py} | 2 +- 4 files changed, 4 insertions(+), 4 deletions(-) rename easybuild/framework/{easy_block.py => easyblock.py} (99%) rename easybuild/test/{easy_block.py => easyblock.py} (97%) diff --git a/easybuild/build.py b/easybuild/build.py index 09b8000acb..c060a78902 100644 --- a/easybuild/build.py +++ b/easybuild/build.py @@ -28,7 +28,7 @@ import copy import platform from easybuild.framework.application import Application, get_class -from easybuild.framework.easy_block import EasyBlock +from easybuild.framework.easyblock import EasyBlock from easybuild.tools.build_log import EasyBuildError, initLogger, \ removeLogHandler, print_msg from easybuild.tools.class_dumper import dumpClasses diff --git a/easybuild/framework/application.py b/easybuild/framework/application.py index 7d9febfe47..ce812d74b2 100644 --- a/easybuild/framework/application.py +++ b/easybuild/framework/application.py @@ -28,7 +28,7 @@ import urllib import easybuild -from easybuild.framework.easy_block import EasyBlock +from easybuild.framework.easyblock import EasyBlock from easybuild.tools.build_log import EasyBuildError, initLogger, removeLogHandler,print_msg from easybuild.tools.config import source_path, buildPath, installPath from easybuild.tools.filetools import unpack, patch, run_cmd, convertName diff --git a/easybuild/framework/easy_block.py b/easybuild/framework/easyblock.py similarity index 99% rename from easybuild/framework/easy_block.py rename to easybuild/framework/easyblock.py index 2a4e071c63..6f6816c630 100644 --- a/easybuild/framework/easy_block.py +++ b/easybuild/framework/easyblock.py @@ -96,7 +96,7 @@ class EasyBlock: def __init__(self, path, extra_options={}, validate=True): - # perform a deepcopy of the default_config found in the easybuild.tools.easy_block module + # perform a deepcopy of the default_config found in the easybuild.tools.easyblock module self.config = copy.deepcopy(self.default_config) self.config.update(extra_options) self.log = getLog("EasyBlock") diff --git a/easybuild/test/easy_block.py b/easybuild/test/easyblock.py similarity index 97% rename from easybuild/test/easy_block.py rename to easybuild/test/easyblock.py index 7bf5625132..dfd09ef764 100644 --- a/easybuild/test/easy_block.py +++ b/easybuild/test/easyblock.py @@ -2,7 +2,7 @@ import re from unittest import TestCase -from easybuild.framework.easy_block import EasyBlock +from easybuild.framework.easyblock import EasyBlock from easybuild.tools.build_log import EasyBuildError from easybuild.tools.systemtools import get_shared_lib_ext From 4db9031ab9068bc30fe9aefa85f9031ed2cef303 Mon Sep 17 00:00:00 2001 From: Toon Willems Date: Fri, 6 Jul 2012 19:38:29 +0200 Subject: [PATCH 028/798] remove memoization and add more tests --- easybuild/framework/easyblock.py | 34 ++++++-------------------------- easybuild/test/easyblock.py | 30 ++++++++++++++++++++++++++-- 2 files changed, 34 insertions(+), 30 deletions(-) diff --git a/easybuild/framework/easyblock.py b/easybuild/framework/easyblock.py index 6f6816c630..7147df71f9 100644 --- a/easybuild/framework/easyblock.py +++ b/easybuild/framework/easyblock.py @@ -106,12 +106,6 @@ def __init__(self, path, extra_options={}, validate=True): self.validations = {'moduleclass': self.validmoduleclasses, 'stop': self.validstops } - # store dependencies in private field (avoid nameclash with function) - self._dependencies = None - self._build_dependencies = None - self._toolkit = None - self._installversion = None - self._update(extra_options) self.parse(path) @@ -170,9 +164,6 @@ def dependencies(self): returns an array of parsed dependencies dependency = {'name': '', 'version': '', 'prefix': '', 'suffix': ''} """ - # memoize dependencies - if self._dependencies: - return self._dependencies deps = [] @@ -180,46 +171,34 @@ def dependencies(self): deps.append(self._parse_dependency(dep)) - self._dependencies = deps + self.builddependencies() - # dependencies include builddependencies as well - return self._dependencies + return deps + self.builddependencies() def builddependencies(self): """ return the parsed build dependencies """ - if self._build_dependencies: - return self._build_dependencies - deps = [] for dep in self['builddependencies']: deps.append(self._parse_dependency(dep)) - self._build_dependencies = deps - return self._build_dependencies + return deps def toolkit(self): """ returns the Toolkit used """ - if self._toolkit: - return self._toolkit - tk = self['toolkit'] - self._toolkit = Toolkit(tk['name'], tk['version']) + tk = Toolkit(tk['name'], tk['version']) if self['toolkitopts']: - self._toolkit.setOptions(self['toolkitopts']) + tk.setOptions(self['toolkitopts']) - return self._toolkit + return tk def installversion(self): """ return the installation version name """ - if self._installversion: - return self._installversion - prefix, suffix = self['versionprefix'], self['versionsuffix'] if self.toolkit().name == 'dummy': @@ -228,8 +207,7 @@ def installversion(self): extra = "%s-%s" % (self.toolkit().name, self.toolkit().version) name = "%s%s-%s%s" % (prefix, self['version'], extra, suffix) - self._installversion = name - return self._installversion + return name def _update(self, dict): diff --git a/easybuild/test/easyblock.py b/easybuild/test/easyblock.py index dfd09ef764..78de9b412b 100644 --- a/easybuild/test/easyblock.py +++ b/easybuild/test/easyblock.py @@ -62,12 +62,12 @@ class TestValidation(EasyBlockTest): homepage = "http://google.com" description = "test easyblock" toolkit = {"name":"dummy", "version": "dummy"} -stop = 'not-valid' +stop = 'notvalid' """ def runTest(self): eb = EasyBlock(self.eb_file, validate=False) - self.assertErrorRegex(EasyBuildError, "\w* provided \S* is not valid", eb.validate) + self.assertErrorRegex(EasyBuildError, "\w* provided \w* is not valid", eb.validate) eb['stop'] = 'patch' # this should now not crash @@ -88,4 +88,30 @@ def runTest(self): eb = EasyBlock(self.eb_file) self.assertEqual(eb['sanityCheckPaths']['files'][0], "lib/lib.%s" % get_shared_lib_ext()) +class TestDependency(EasyBlockTest): + + contents = """ +name = "pi" +version = "3.14" +homepage = "http://google.com" +description = "test easyblock" +toolkit = {"name":"GCC", "version": "4.6.3"} +dependencies = [('first', '1.1'), {'name': 'second', 'version': '2.2'}] +""" + + def runTest(self): + eb = EasyBlock(self.eb_file) + self.assertEqual(len(eb.dependencies()), 2) + + first = eb.dependencies()[0] + second = eb.dependencies()[1] + + self.assertEqual(first['name'], "first") + self.assertEqual(second['name'], "second") + + self.assertEqual(first['version'], "1.1") + self.assertEqual(second['version'], "2.2") + + self.assertEqual(first['tk'], '1.1-GCC-4.6.3') + self.assertEqual(second['tk'], '2.2-GCC-4.6.3') From a79bcdd3d473314ff088fbce0a8fda34308757b3 Mon Sep 17 00:00:00 2001 From: Toon Willems Date: Fri, 6 Jul 2012 19:41:54 +0200 Subject: [PATCH 029/798] remove _update method before it can be abused --- easybuild/framework/easyblock.py | 10 ---------- 1 file changed, 10 deletions(-) diff --git a/easybuild/framework/easyblock.py b/easybuild/framework/easyblock.py index 7147df71f9..a0127d728f 100644 --- a/easybuild/framework/easyblock.py +++ b/easybuild/framework/easyblock.py @@ -106,8 +106,6 @@ def __init__(self, path, extra_options={}, validate=True): self.validations = {'moduleclass': self.validmoduleclasses, 'stop': self.validstops } - self._update(extra_options) - self.parse(path) # perform validations @@ -209,14 +207,6 @@ def installversion(self): return name - - def _update(self, dict): - """ - Add extra variables to the underlying dict - """ - self.config.update(dict) - - def _validate(self, attr, values): if self[attr] and self[attr] not in values: self.log.error("%s provided %s is not valid: %s" % (attr, self[attr], values)) From 1da7b1f342d8bdd2b1d81f25b2e85e9246428783 Mon Sep 17 00:00:00 2001 From: Toon Willems Date: Mon, 9 Jul 2012 08:47:44 +0200 Subject: [PATCH 030/798] __init__ call python 2.4 compatible --- easybuild/easyblocks/a/atlas.py | 2 +- easybuild/easyblocks/c/cp2k.py | 2 +- easybuild/easyblocks/g/gcc.py | 2 +- easybuild/easyblocks/i/intelbase.py | 2 +- easybuild/easyblocks/l/lapack.py | 2 +- easybuild/easyblocks/l/libsmm.py | 2 +- easybuild/easyblocks/m/mvapich2.py | 2 +- easybuild/easyblocks/w/wps.py | 2 +- easybuild/easyblocks/w/wrf.py | 2 +- 9 files changed, 9 insertions(+), 9 deletions(-) diff --git a/easybuild/easyblocks/a/atlas.py b/easybuild/easyblocks/a/atlas.py index bf6b960a65..f3834888f8 100644 --- a/easybuild/easyblocks/a/atlas.py +++ b/easybuild/easyblocks/a/atlas.py @@ -37,7 +37,7 @@ def __init__(self, *args, **kwargs): 'full_lapack': [False, "Build a full LAPACK library (requires netlib's LAPACK) (default: False)"], 'sharedlibs':[False, "Enable building of shared libs as well (default: False)"] } - Application.__init__(self, *args, extra_options=extra_vars) + Application.__init__(self, extra_options=extra_vars, *args) def configure(self): diff --git a/easybuild/easyblocks/c/cp2k.py b/easybuild/easyblocks/c/cp2k.py index ab50ea9d3d..f6bbcb91d9 100644 --- a/easybuild/easyblocks/c/cp2k.py +++ b/easybuild/easyblocks/c/cp2k.py @@ -52,7 +52,7 @@ def __init__(self, *args, **kwargs): 'maxtasks':[3, "Maximum number of CP2K instances run at the same time during testing (default: 3)"] } - Application.__init__(self, *args, extra_options=extra_vars) + Application.__init__(self, extra_options=extra_vars, *args) self.typearch = None diff --git a/easybuild/easyblocks/g/gcc.py b/easybuild/easyblocks/g/gcc.py index 224f261ade..187ea3213f 100644 --- a/easybuild/easyblocks/g/gcc.py +++ b/easybuild/easyblocks/g/gcc.py @@ -44,7 +44,7 @@ def __init__(self, *args): 'clooguseisl':[False, "Use ISL with CLooG or not (use PPL otherwise) (default: False)"] } - Application.__init__(self, *args, extra_options=extra_vars) + Application.__init__(self, extra_options=extra_vars, *args) self.stagedbuild = False diff --git a/easybuild/easyblocks/i/intelbase.py b/easybuild/easyblocks/i/intelbase.py index 38e0442908..e5fbfb842f 100644 --- a/easybuild/easyblocks/i/intelbase.py +++ b/easybuild/easyblocks/i/intelbase.py @@ -45,7 +45,7 @@ def __init__(self, *args, extra_options={}): } extra_vars.update(extra_options) - Application.__init__(self, args, extra_options=extra_vars) + Application.__init__(self, extra_options=extra_vars, *args) def clean_homedir(self): """Remove 'intel' directory from home directory, where stuff is cached.""" diff --git a/easybuild/easyblocks/l/lapack.py b/easybuild/easyblocks/l/lapack.py index 45cc6b2a82..9e7e45969f 100644 --- a/easybuild/easyblocks/l/lapack.py +++ b/easybuild/easyblocks/l/lapack.py @@ -59,7 +59,7 @@ def __init__(self, *args, **kwargs): extra_vars = {'supply_blas':[False, "Supply BLAS lib to LAPACK for building (default: False)"], 'test_only':[False, "Only make tests, don't try and build LAPACK lib."] } - Application.__init__(self, *args, extra_options=extra_vars) + Application.__init__(self, extra_options=extra_vars, *args) def configure(self): """ diff --git a/easybuild/easyblocks/l/libsmm.py b/easybuild/easyblocks/l/libsmm.py index 9368f479b3..465190cfd1 100644 --- a/easybuild/easyblocks/l/libsmm.py +++ b/easybuild/easyblocks/l/libsmm.py @@ -42,7 +42,7 @@ def __init__(self, *args, **kwargs): 'dims':[dd, "Generate routines for these matrix dims (default: %s)" % dd] } - Application.__init__(self, *args, extra_options=extra_vars) + Application.__init__(self, extra_options=extra_vars, *args) def configure(self): """Configure build: change to tools/build_libsmm dir""" diff --git a/easybuild/easyblocks/m/mvapich2.py b/easybuild/easyblocks/m/mvapich2.py index e5ac115e72..b901bb671d 100644 --- a/easybuild/easyblocks/m/mvapich2.py +++ b/easybuild/easyblocks/m/mvapich2.py @@ -34,7 +34,7 @@ def __init__(self, *args, **kwargs): 'debug':[False, "Enable debug build (which is slower) (default: False)"], 'rdma_type':["gen2", "Specify the RDMA type (gen2/udapl) (default: gen2)"] } - Application.__init__(self, *args, extra_options=extra_vars) + Application.__init__(self, extra_options=extra_vars, *args) def configure(self): diff --git a/easybuild/easyblocks/w/wps.py b/easybuild/easyblocks/w/wps.py index 579c890020..f30309b4e3 100644 --- a/easybuild/easyblocks/w/wps.py +++ b/easybuild/easyblocks/w/wps.py @@ -44,7 +44,7 @@ def __init__(self, *args): 'runtest':[True, "Build and run WPS tests (default: True)."], 'testdata':[testdata_urls, "URL to test data required to run WPS test (default: %s)." % testdata_urls] } - Application.__init__(self, *args, extra_options=extra_vars) + Application.__init__(self, extra_options=extra_vars, *args) self.build_in_installdir = True self.comp_fam = None diff --git a/easybuild/easyblocks/w/wrf.py b/easybuild/easyblocks/w/wrf.py index 13fef3451c..920f8b7aa8 100644 --- a/easybuild/easyblocks/w/wrf.py +++ b/easybuild/easyblocks/w/wrf.py @@ -36,7 +36,7 @@ def __init__(self,*args,**kwargs): 'rewriteopts':[True, "Replace -O3 with CFLAGS/FFLAGS (default: True)."], 'runtest':[True, "Build and run WRF tests (default: True)."] } - Application.__init__(self, *args, extra_options=extra_vars) + Application.__init__(self, extra_options=extra_vars, *args) self.build_in_installdir = True self.wrfsubdir = None From 8ccdd672a90a0a03e542ea5dff023e21b2623434 Mon Sep 17 00:00:00 2001 From: Toon Willems Date: Mon, 9 Jul 2012 09:15:22 +0200 Subject: [PATCH 031/798] some more python 2.4 compatibility --- easybuild/easyblocks/i/intelbase.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/easybuild/easyblocks/i/intelbase.py b/easybuild/easyblocks/i/intelbase.py index e5fbfb842f..d815ec1fcd 100644 --- a/easybuild/easyblocks/i/intelbase.py +++ b/easybuild/easyblocks/i/intelbase.py @@ -30,7 +30,7 @@ class IntelBase(Application): - add license variable """ - def __init__(self, *args, extra_options={}): + def __init__(self, extra_options={}, *args): """Constructor, adds extra config options""" self.license = None From fcccc0ed2e883f4cfef43992a4a58ddaf7838e39 Mon Sep 17 00:00:00 2001 From: Toon Willems Date: Mon, 9 Jul 2012 09:50:29 +0200 Subject: [PATCH 032/798] Add extra_options() method This method can be extended in subclasses, this way they can pass extra options to the EasyBlock constructor. This was previously passed in via the constructor, but this was very annoying for custom subclasses of Application --- easybuild/easyblocks/a/atlas.py | 5 ++++- easybuild/easyblocks/c/cp2k.py | 30 +++++++++++++++-------------- easybuild/easyblocks/g/gcc.py | 10 ++++++---- easybuild/easyblocks/i/imkl.py | 5 ++++- easybuild/easyblocks/i/intelbase.py | 8 +++++--- easybuild/easyblocks/i/itac.py | 8 +++++++- easybuild/easyblocks/l/lapack.py | 6 +++++- easybuild/easyblocks/l/libsmm.py | 7 ++++++- easybuild/easyblocks/m/mvapich2.py | 6 +++++- easybuild/easyblocks/w/wps.py | 16 +++++++++------ easybuild/easyblocks/w/wrf.py | 13 ++++++++----- easybuild/framework/application.py | 12 ++++++++++-- 12 files changed, 86 insertions(+), 40 deletions(-) diff --git a/easybuild/easyblocks/a/atlas.py b/easybuild/easyblocks/a/atlas.py index f3834888f8..626c396c2c 100644 --- a/easybuild/easyblocks/a/atlas.py +++ b/easybuild/easyblocks/a/atlas.py @@ -33,11 +33,14 @@ class ATLAS(Application): def __init__(self, *args, **kwargs): + Application.__init__(self, *args, **kwargs) + + def extra_options(self): extra_vars = { 'ignorethrottling':[False, "Ignore check done by ATLAS for CPU throttling (not recommended) (default: False)"], 'full_lapack': [False, "Build a full LAPACK library (requires netlib's LAPACK) (default: False)"], 'sharedlibs':[False, "Enable building of shared libs as well (default: False)"] } - Application.__init__(self, extra_options=extra_vars, *args) + return Application.extra_options(self).update(extra_vars) def configure(self): diff --git a/easybuild/easyblocks/c/cp2k.py b/easybuild/easyblocks/c/cp2k.py index f6bbcb91d9..de9a4a551f 100644 --- a/easybuild/easyblocks/c/cp2k.py +++ b/easybuild/easyblocks/c/cp2k.py @@ -39,20 +39,7 @@ class CP2K(Application): """ def __init__(self, *args, **kwargs): - - extra_vars = {'type':['popt',"Type of build ('popt' or 'psmp') (default: 'popt)"], - 'typeopt':[True,"Enable optimization (default: True)"], - 'libint':[True,"Use LibInt (default: True)"], - 'modincprefix':['',"IMKL prefix for modinc include dir (default: '')"], - 'modinc':[[],"List of modinc's to use (*.f90), or 'True' to use all found at given prefix (default: [])"], - 'extracflags':['',"Extra CFLAGS to be added (default: '')"], - 'extradflags':['',"Extra DFLAGS to be added (default: '')"], - 'runtest':[True, 'Indicates if a regression test should be run after make (default: True)'], - 'ignore_regtest_fails':[False, "Ignore failures in regression test (should be used with care) (default: False)."], - 'maxtasks':[3, "Maximum number of CP2K instances run at the same time during testing (default: 3)"] - } - - Application.__init__(self, extra_options=extra_vars, *args) + Application.__init__(self, *args, **kwargs) self.typearch = None @@ -69,6 +56,21 @@ def __init__(self, *args, **kwargs): self.make_instructions = '' + def extra_options(self): + extra_vars = {'type':['popt',"Type of build ('popt' or 'psmp') (default: 'popt)"], + 'typeopt':[True,"Enable optimization (default: True)"], + 'libint':[True,"Use LibInt (default: True)"], + 'modincprefix':['',"IMKL prefix for modinc include dir (default: '')"], + 'modinc':[[],"List of modinc's to use (*.f90), or 'True' to use all found at given prefix (default: [])"], + 'extracflags':['',"Extra CFLAGS to be added (default: '')"], + 'extradflags':['',"Extra DFLAGS to be added (default: '')"], + 'runtest':[True, 'Indicates if a regression test should be run after make (default: True)'], + 'ignore_regtest_fails':[False, "Ignore failures in regression test (should be used with care) (default: False)."], + 'maxtasks':[3, "Maximum number of CP2K instances run at the same time during testing (default: 3)"] + } + return Application.extra_options(self).update(extra_vars) + + def _generateMakefile(self, options): """Generate Makefile based on options dictionary and optional make instructions""" diff --git a/easybuild/easyblocks/g/gcc.py b/easybuild/easyblocks/g/gcc.py index 187ea3213f..8707b09e99 100644 --- a/easybuild/easyblocks/g/gcc.py +++ b/easybuild/easyblocks/g/gcc.py @@ -34,8 +34,12 @@ class GCC(Application): Uses system compiler for initial build, then bootstraps. """ - def __init__(self, *args): + def __init__(self, *args, **kwargs): + Application.__init__(self, *args, **kwargs) + self.stagedbuild = False + + def extra_options(self): extra_vars = {'languages':[[], "List of languages to build GCC for (--enable-languages) (default: [])"], 'withlto':[True, "Enable LTO support (default: True)"], 'withcloog':[False, "Build GCC with CLooG support (default: False)."], @@ -43,10 +47,8 @@ def __init__(self, *args): 'pplwatchdog':[False, "Enable PPL watchdog (default: False)"], 'clooguseisl':[False, "Use ISL with CLooG or not (use PPL otherwise) (default: False)"] } + return Application.extra_options(self).update(extra_vars) - Application.__init__(self, extra_options=extra_vars, *args) - - self.stagedbuild = False def create_dir(self, dirname): """ diff --git a/easybuild/easyblocks/i/imkl.py b/easybuild/easyblocks/i/imkl.py index f3407ee67c..3f7a66b001 100644 --- a/easybuild/easyblocks/i/imkl.py +++ b/easybuild/easyblocks/i/imkl.py @@ -38,9 +38,12 @@ class Imkl(IntelBase): def __init__(self, *args, **kwargs): """Constructor, adds extra config options""" + IntelBase.__init__(self, *args, **kwargs) + + def extra_options(self): extra_vars = {'interfaces':[True, "Indicates whether interfaces should be built (default: True)"]} + return IntelBase.extra_options(self).update(extra_vars) - IntelBase.__init__(self, args, extra_options=extra_vars) def configure(self): IntelBase.configure(self) diff --git a/easybuild/easyblocks/i/intelbase.py b/easybuild/easyblocks/i/intelbase.py index d815ec1fcd..a5acc1817d 100644 --- a/easybuild/easyblocks/i/intelbase.py +++ b/easybuild/easyblocks/i/intelbase.py @@ -30,10 +30,13 @@ class IntelBase(Application): - add license variable """ - def __init__(self, extra_options={}, *args): + def __init__(self, *args, **kwargs): """Constructor, adds extra config options""" self.license = None + Application.__init__(self, *args, **kwargs) + + def extra_options(self): extra_vars = {'license':[None,"License file path (default: None)"], 'license_activation':['license_server', "Indicates license activation type (default: 'license_server')"], # 'usetmppath': @@ -43,9 +46,8 @@ def __init__(self, extra_options={}, *args): 'usetmppath':[False, "Use temporary path for installation (default: False)"], 'm32':[False, "Enable 32-bit toolkit (default: False)"], } - extra_vars.update(extra_options) + return Application.extra_options(self).update(extra_vars) - Application.__init__(self, extra_options=extra_vars, *args) def clean_homedir(self): """Remove 'intel' directory from home directory, where stuff is cached.""" diff --git a/easybuild/easyblocks/i/itac.py b/easybuild/easyblocks/i/itac.py index 8e342fdfc7..8295bce336 100644 --- a/easybuild/easyblocks/i/itac.py +++ b/easybuild/easyblocks/i/itac.py @@ -33,7 +33,13 @@ class Itac(IntelBase): def __init__(self, *args, **kwargs): """Constructor, adds extra config options""" extra_vars = {'preferredmpi':['impi3', "Preferred MPI type (default: 'impi3')"]} - IntelBase.__init__(self, args, extra_options=extra_vars) + IntelBase.__init__(self, *args, **kwargs) + + def extra_options(self): + extra_vars = {'preferredmpi':['impi3', "Preferred MPI type (default: 'impi3')"]} + return IntelBase.extra_options(self).update(extra_vars) + + def make_install(self): diff --git a/easybuild/easyblocks/l/lapack.py b/easybuild/easyblocks/l/lapack.py index 9e7e45969f..f6c5150338 100644 --- a/easybuild/easyblocks/l/lapack.py +++ b/easybuild/easyblocks/l/lapack.py @@ -56,10 +56,14 @@ class LAPACK(Application): """ def __init__(self, *args, **kwargs): + Application.__init__(self, *args, **kwargs) + + def extra_options(self): extra_vars = {'supply_blas':[False, "Supply BLAS lib to LAPACK for building (default: False)"], 'test_only':[False, "Only make tests, don't try and build LAPACK lib."] } - Application.__init__(self, extra_options=extra_vars, *args) + return Application.extra_options(self).update(extra_vars) + def configure(self): """ diff --git a/easybuild/easyblocks/l/libsmm.py b/easybuild/easyblocks/l/libsmm.py index 465190cfd1..7dd0a6a6d6 100644 --- a/easybuild/easyblocks/l/libsmm.py +++ b/easybuild/easyblocks/l/libsmm.py @@ -34,6 +34,9 @@ class Libsmm(Application): """ def __init__(self, *args, **kwargs): + Application.__init__(self, *args, **kwargs) + + def extra_options(self): # default dimensions dd = [1,4,5,6,9,13,16,17,22] @@ -41,8 +44,10 @@ def __init__(self, *args, **kwargs): 'max_tiny_dim':[12, "Maximum tiny dimension (default: 12)"], 'dims':[dd, "Generate routines for these matrix dims (default: %s)" % dd] } + return Application.extra_options(self).update(extra_vars) + + - Application.__init__(self, extra_options=extra_vars, *args) def configure(self): """Configure build: change to tools/build_libsmm dir""" diff --git a/easybuild/easyblocks/m/mvapich2.py b/easybuild/easyblocks/m/mvapich2.py index b901bb671d..5941953831 100644 --- a/easybuild/easyblocks/m/mvapich2.py +++ b/easybuild/easyblocks/m/mvapich2.py @@ -28,13 +28,17 @@ class MVAPICH2(Application): """ def __init__(self, *args, **kwargs): + Application.__init__(self, *args, **kwargs) + + def extra_options(self): extra_vars = {'withchkpt':[False, "Enable checkpointing support (required BLCR) (default: False)"], 'withlimic2':[False, "Enable LiMIC2 support for intra-node communication (default: False)"], 'withmpe':[False, "Build MPE routines (default: False)"], 'debug':[False, "Enable debug build (which is slower) (default: False)"], 'rdma_type':["gen2", "Specify the RDMA type (gen2/udapl) (default: gen2)"] } - Application.__init__(self, extra_options=extra_vars, *args) + return Application.extra_options(self).update(extra_vars) + def configure(self): diff --git a/easybuild/easyblocks/w/wps.py b/easybuild/easyblocks/w/wps.py index f30309b4e3..5f68fdef3e 100644 --- a/easybuild/easyblocks/w/wps.py +++ b/easybuild/easyblocks/w/wps.py @@ -32,9 +32,17 @@ class WPS(Application): """Support for building/installing WPS.""" - def __init__(self, *args): + def __init__(self, *args, **kwargs): """Add extra config options specific to WPS.""" + Application.__init__(self, *args, **kwargs) + + self.build_in_installdir = True + self.comp_fam = None + self.wrfdir = None + self.compile_script = None + + def extra_options(self): testdata_urls = [ "http://www.mmm.ucar.edu/wrf/src/data/avn_data.tar.gz", "http://www.mmm.ucar.edu/wrf/src/wps_files/geog.tar.gz" # 697MB download, 16GB unpacked! @@ -44,12 +52,8 @@ def __init__(self, *args): 'runtest':[True, "Build and run WPS tests (default: True)."], 'testdata':[testdata_urls, "URL to test data required to run WPS test (default: %s)." % testdata_urls] } - Application.__init__(self, extra_options=extra_vars, *args) - self.build_in_installdir = True - self.comp_fam = None - self.wrfdir = None - self.compile_script = None + return Application.extra_options(self).update(extra_vars) def configure(self): """Configure build: diff --git a/easybuild/easyblocks/w/wrf.py b/easybuild/easyblocks/w/wrf.py index 920f8b7aa8..8bc4cd7553 100644 --- a/easybuild/easyblocks/w/wrf.py +++ b/easybuild/easyblocks/w/wrf.py @@ -31,16 +31,19 @@ class WRF(Application): def __init__(self,*args,**kwargs): """Add extra config options specific to WRF.""" + Application.__init__(self, *args, **kwargs) + + self.build_in_installdir = True + self.wrfsubdir = None + self.comp_fam = None + + def extra_options(self): extra_vars = {'buildtype':[None, "Specify the type of build (serial, smpar (OpenMP), " \ "dmpar (MPI), dm+sm (hybrid OpenMP/MPI))."], 'rewriteopts':[True, "Replace -O3 with CFLAGS/FFLAGS (default: True)."], 'runtest':[True, "Build and run WRF tests (default: True)."] } - Application.__init__(self, extra_options=extra_vars, *args) - - self.build_in_installdir = True - self.wrfsubdir = None - self.comp_fam = None + return Application.extra_options(self).update(extra_vars) def configure(self): """Configure build: diff --git a/easybuild/framework/application.py b/easybuild/framework/application.py index ce812d74b2..2a4f10e8d8 100644 --- a/easybuild/framework/application.py +++ b/easybuild/framework/application.py @@ -45,7 +45,7 @@ class Application: ## INIT # TODO: never initializd with other parameters, remove them - def __init__(self, path, extra_options={}, name=None, version=None, newBuild=True, debug=False): + def __init__(self, path, name=None, version=None, newBuild=True, debug=False): """ Initialize the Application instance. """ @@ -64,7 +64,7 @@ def __init__(self, path, extra_options={}, name=None, version=None, newBuild=Tru self.skip = None # Easyblock for this Application - self.cfg = EasyBlock(path, extra_options) + self.cfg = EasyBlock(path, self.extra_options()) # module generator self.moduleGenerator = None @@ -233,6 +233,14 @@ def addsource(self, listOfSources=None): self.log.info("Added sources: %s" % self.src) + def extra_options(self): + """ + Extra options method which will be passed to the EasyBlock constructor. + Subclasses should overwrite this method (but not forget to call super, + unless they plan on disregarding parent options) + """ + return {} + def prepare_build(self): """ prepare for building From a500f27940bbe74d64fb799f60369e2543ff2c81 Mon Sep 17 00:00:00 2001 From: Toon Willems Date: Mon, 9 Jul 2012 10:17:24 +0200 Subject: [PATCH 033/798] update method on dict returns None --- easybuild/easyblocks/a/atlas.py | 4 +++- easybuild/easyblocks/c/cp2k.py | 4 +++- easybuild/easyblocks/g/gcc.py | 4 +++- easybuild/easyblocks/i/imkl.py | 4 +++- easybuild/easyblocks/i/intelbase.py | 4 +++- easybuild/easyblocks/i/itac.py | 8 +++----- easybuild/easyblocks/l/lapack.py | 4 +++- easybuild/easyblocks/l/libsmm.py | 5 +++-- easybuild/easyblocks/m/mvapich2.py | 4 +++- easybuild/easyblocks/w/wps.py | 4 +++- easybuild/easyblocks/w/wrf.py | 4 +++- 11 files changed, 33 insertions(+), 16 deletions(-) diff --git a/easybuild/easyblocks/a/atlas.py b/easybuild/easyblocks/a/atlas.py index 626c396c2c..3cb5104c9b 100644 --- a/easybuild/easyblocks/a/atlas.py +++ b/easybuild/easyblocks/a/atlas.py @@ -36,11 +36,13 @@ def __init__(self, *args, **kwargs): Application.__init__(self, *args, **kwargs) def extra_options(self): + vars = Application.extra_options(self) extra_vars = { 'ignorethrottling':[False, "Ignore check done by ATLAS for CPU throttling (not recommended) (default: False)"], 'full_lapack': [False, "Build a full LAPACK library (requires netlib's LAPACK) (default: False)"], 'sharedlibs':[False, "Enable building of shared libs as well (default: False)"] } - return Application.extra_options(self).update(extra_vars) + vars.update(extra_vars) + return vars def configure(self): diff --git a/easybuild/easyblocks/c/cp2k.py b/easybuild/easyblocks/c/cp2k.py index de9a4a551f..a4b254cb68 100644 --- a/easybuild/easyblocks/c/cp2k.py +++ b/easybuild/easyblocks/c/cp2k.py @@ -57,6 +57,7 @@ def __init__(self, *args, **kwargs): self.make_instructions = '' def extra_options(self): + vars = Application.extra_options(self) extra_vars = {'type':['popt',"Type of build ('popt' or 'psmp') (default: 'popt)"], 'typeopt':[True,"Enable optimization (default: True)"], 'libint':[True,"Use LibInt (default: True)"], @@ -68,7 +69,8 @@ def extra_options(self): 'ignore_regtest_fails':[False, "Ignore failures in regression test (should be used with care) (default: False)."], 'maxtasks':[3, "Maximum number of CP2K instances run at the same time during testing (default: 3)"] } - return Application.extra_options(self).update(extra_vars) + vars.update(extra_vars) + return vars def _generateMakefile(self, options): diff --git a/easybuild/easyblocks/g/gcc.py b/easybuild/easyblocks/g/gcc.py index 8707b09e99..336e84b511 100644 --- a/easybuild/easyblocks/g/gcc.py +++ b/easybuild/easyblocks/g/gcc.py @@ -40,6 +40,7 @@ def __init__(self, *args, **kwargs): self.stagedbuild = False def extra_options(self): + vars = Application.extra_options(self) extra_vars = {'languages':[[], "List of languages to build GCC for (--enable-languages) (default: [])"], 'withlto':[True, "Enable LTO support (default: True)"], 'withcloog':[False, "Build GCC with CLooG support (default: False)."], @@ -47,7 +48,8 @@ def extra_options(self): 'pplwatchdog':[False, "Enable PPL watchdog (default: False)"], 'clooguseisl':[False, "Use ISL with CLooG or not (use PPL otherwise) (default: False)"] } - return Application.extra_options(self).update(extra_vars) + vars.update(extra_vars) + return vars def create_dir(self, dirname): diff --git a/easybuild/easyblocks/i/imkl.py b/easybuild/easyblocks/i/imkl.py index 3f7a66b001..2c888b6f02 100644 --- a/easybuild/easyblocks/i/imkl.py +++ b/easybuild/easyblocks/i/imkl.py @@ -41,8 +41,10 @@ def __init__(self, *args, **kwargs): IntelBase.__init__(self, *args, **kwargs) def extra_options(self): + vars = IntelBase.extra_options(self) extra_vars = {'interfaces':[True, "Indicates whether interfaces should be built (default: True)"]} - return IntelBase.extra_options(self).update(extra_vars) + vars.update(extra_vars) + return vars def configure(self): diff --git a/easybuild/easyblocks/i/intelbase.py b/easybuild/easyblocks/i/intelbase.py index a5acc1817d..349db0c224 100644 --- a/easybuild/easyblocks/i/intelbase.py +++ b/easybuild/easyblocks/i/intelbase.py @@ -37,6 +37,7 @@ def __init__(self, *args, **kwargs): Application.__init__(self, *args, **kwargs) def extra_options(self): + vars = Application.extra_options(self) extra_vars = {'license':[None,"License file path (default: None)"], 'license_activation':['license_server', "Indicates license activation type (default: 'license_server')"], # 'usetmppath': @@ -46,7 +47,8 @@ def extra_options(self): 'usetmppath':[False, "Use temporary path for installation (default: False)"], 'm32':[False, "Enable 32-bit toolkit (default: False)"], } - return Application.extra_options(self).update(extra_vars) + vars.update(extra_vars) + return vars def clean_homedir(self): diff --git a/easybuild/easyblocks/i/itac.py b/easybuild/easyblocks/i/itac.py index 8295bce336..6b088fb704 100644 --- a/easybuild/easyblocks/i/itac.py +++ b/easybuild/easyblocks/i/itac.py @@ -32,15 +32,13 @@ class Itac(IntelBase): def __init__(self, *args, **kwargs): """Constructor, adds extra config options""" - extra_vars = {'preferredmpi':['impi3', "Preferred MPI type (default: 'impi3')"]} IntelBase.__init__(self, *args, **kwargs) def extra_options(self): + vars = IntelBase.extra_options(self) extra_vars = {'preferredmpi':['impi3', "Preferred MPI type (default: 'impi3')"]} - return IntelBase.extra_options(self).update(extra_vars) - - - + vars.update(extra_vars) + return vars def make_install(self): """ diff --git a/easybuild/easyblocks/l/lapack.py b/easybuild/easyblocks/l/lapack.py index f6c5150338..68351de04d 100644 --- a/easybuild/easyblocks/l/lapack.py +++ b/easybuild/easyblocks/l/lapack.py @@ -59,10 +59,12 @@ def __init__(self, *args, **kwargs): Application.__init__(self, *args, **kwargs) def extra_options(self): + vars = Application.extra_options(self) extra_vars = {'supply_blas':[False, "Supply BLAS lib to LAPACK for building (default: False)"], 'test_only':[False, "Only make tests, don't try and build LAPACK lib."] } - return Application.extra_options(self).update(extra_vars) + vars.update(extra_vars) + return vars def configure(self): diff --git a/easybuild/easyblocks/l/libsmm.py b/easybuild/easyblocks/l/libsmm.py index 7dd0a6a6d6..0ed9ddb146 100644 --- a/easybuild/easyblocks/l/libsmm.py +++ b/easybuild/easyblocks/l/libsmm.py @@ -39,12 +39,13 @@ def __init__(self, *args, **kwargs): def extra_options(self): # default dimensions dd = [1,4,5,6,9,13,16,17,22] - + vars = Application.extra_options(self) extra_vars = {'transpose_flavour':[1, "Transpose flavour of routines (default: 1)"], 'max_tiny_dim':[12, "Maximum tiny dimension (default: 12)"], 'dims':[dd, "Generate routines for these matrix dims (default: %s)" % dd] } - return Application.extra_options(self).update(extra_vars) + vars.update(extra_vars) + return vars diff --git a/easybuild/easyblocks/m/mvapich2.py b/easybuild/easyblocks/m/mvapich2.py index 5941953831..c8c2eb932e 100644 --- a/easybuild/easyblocks/m/mvapich2.py +++ b/easybuild/easyblocks/m/mvapich2.py @@ -31,13 +31,15 @@ def __init__(self, *args, **kwargs): Application.__init__(self, *args, **kwargs) def extra_options(self): + vars = Application.extra_options(self) extra_vars = {'withchkpt':[False, "Enable checkpointing support (required BLCR) (default: False)"], 'withlimic2':[False, "Enable LiMIC2 support for intra-node communication (default: False)"], 'withmpe':[False, "Build MPE routines (default: False)"], 'debug':[False, "Enable debug build (which is slower) (default: False)"], 'rdma_type':["gen2", "Specify the RDMA type (gen2/udapl) (default: gen2)"] } - return Application.extra_options(self).update(extra_vars) + vars.update(extra_vars) + return vars def configure(self): diff --git a/easybuild/easyblocks/w/wps.py b/easybuild/easyblocks/w/wps.py index 5f68fdef3e..6ce7432eb4 100644 --- a/easybuild/easyblocks/w/wps.py +++ b/easybuild/easyblocks/w/wps.py @@ -48,12 +48,14 @@ def extra_options(self): "http://www.mmm.ucar.edu/wrf/src/wps_files/geog.tar.gz" # 697MB download, 16GB unpacked! ] + vars = Application.extra_options(self) extra_vars = {'buildtype':[None, "Specify the type of build (smpar: OpenMP, dmpar: MPI)."], 'runtest':[True, "Build and run WPS tests (default: True)."], 'testdata':[testdata_urls, "URL to test data required to run WPS test (default: %s)." % testdata_urls] } + vars.update(extra_vars) - return Application.extra_options(self).update(extra_vars) + return vars def configure(self): """Configure build: diff --git a/easybuild/easyblocks/w/wrf.py b/easybuild/easyblocks/w/wrf.py index 8bc4cd7553..b964ee9c36 100644 --- a/easybuild/easyblocks/w/wrf.py +++ b/easybuild/easyblocks/w/wrf.py @@ -38,12 +38,14 @@ def __init__(self,*args,**kwargs): self.comp_fam = None def extra_options(self): + vars = Application.extra_options(self) extra_vars = {'buildtype':[None, "Specify the type of build (serial, smpar (OpenMP), " \ "dmpar (MPI), dm+sm (hybrid OpenMP/MPI))."], 'rewriteopts':[True, "Replace -O3 with CFLAGS/FFLAGS (default: True)."], 'runtest':[True, "Build and run WRF tests (default: True)."] } - return Application.extra_options(self).update(extra_vars) + vars.update(extra_vars) + return vars def configure(self): """Configure build: From dbefcde07fb9bc1d13c79ed2f86ba6162fc3b0f2 Mon Sep 17 00:00:00 2001 From: Toon Willems Date: Mon, 9 Jul 2012 11:40:57 +0200 Subject: [PATCH 034/798] test extra options --- easybuild/test/easyblock.py | 38 +++++++++++++++++++++++++++++++++++++ 1 file changed, 38 insertions(+) diff --git a/easybuild/test/easyblock.py b/easybuild/test/easyblock.py index 78de9b412b..6aafb9d827 100644 --- a/easybuild/test/easyblock.py +++ b/easybuild/test/easyblock.py @@ -115,3 +115,41 @@ def runTest(self): self.assertEqual(first['tk'], '1.1-GCC-4.6.3') self.assertEqual(second['tk'], '2.2-GCC-4.6.3') +class TestExtraOptions(EasyBlockTest): + + contents = """ +name = "pi" +version = "3.14" +homepage = "http://google.com" +description = "test easyblock" +toolkit = {"name":"GCC", "version": "4.6.3"} +dependencies = [('first', '1.1'), {'name': 'second', 'version': '2.2'}] +""" + + def runTest(self): + eb = EasyBlock(self.eb_file) + self.assertRaises(KeyError, lambda: eb['custom_key']) + + extra_vars = { 'custom_key': ['default', "This is a default key"]} + + eb = EasyBlock(self.eb_file, extra_vars) + self.assertEqual(eb['custom_key'], 'default') + + eb['custom_key'] = "not so default" + self.assertEqual(eb['custom_key'], 'not so default') + + self.contents += "\ncustom_key = 'test'" + + self.setUp() + + eb = EasyBlock(self.eb_file, extra_vars) + self.assertEqual(eb['custom_key'], 'test') + + eb['custom_key'] = "not so default" + self.assertEqual(eb['custom_key'], 'not so default') + + + + + + From e87f6eef3e1f5a3509114728f4cf01498c6c9962 Mon Sep 17 00:00:00 2001 From: Toon Willems Date: Mon, 9 Jul 2012 14:05:15 +0200 Subject: [PATCH 035/798] full test coverage of easyblock class --- easybuild/framework/easyblock.py | 9 +++--- easybuild/test/easyblock.py | 55 +++++++++++++++++++++++++++++++- 2 files changed, 58 insertions(+), 6 deletions(-) diff --git a/easybuild/framework/easyblock.py b/easybuild/framework/easyblock.py index a0127d728f..e567207839 100644 --- a/easybuild/framework/easyblock.py +++ b/easybuild/framework/easyblock.py @@ -218,12 +218,11 @@ def _parse_dependency(self, dep): if isinstance(dep, dict): dependency.update(dep) # Try and convert to list + elif isinstance(dep, list) or isinstance(dep, tuple): + dep = list(dep) + dependency.update(dict(zip(attr, dep))) else: - try: - dep = list(dep) - dependency.update(dict(zip(attr, dep))) - except TypeError: - self.log.error('Dependency %s from unsupported type: %s.' % (dep, type(dep))) + self.log.error('Dependency %s from unsupported type: %s.' % (dep, type(dep))) # Validations if not dependency['name']: diff --git a/easybuild/test/easyblock.py b/easybuild/test/easyblock.py index 6aafb9d827..ae7d5c781d 100644 --- a/easybuild/test/easyblock.py +++ b/easybuild/test/easyblock.py @@ -73,6 +73,19 @@ def runTest(self): # this should now not crash eb.validate() + # dummy toolkit, installversion == version + self.assertEqual(eb.installversion(), "3.14") + eb['toolkit'] = {"name": "GCC", "version": "4.6.3"} + self.assertEqual(eb.installversion(), "3.14-GCC-4.6.3") + + os.chmod(self.eb_file, 0000) + self.assertErrorRegex(EasyBuildError, "Unexpected IOError", EasyBlock, self.eb_file) + os.chmod(self.eb_file, 0755) + + self.contents += "\nsyntax_error'" + self.setUp() + self.assertErrorRegex(EasyBuildError, "SyntaxError", EasyBlock, self.eb_file) + class TestSharedLibExt(EasyBlockTest): contents = """ @@ -97,11 +110,14 @@ class TestDependency(EasyBlockTest): description = "test easyblock" toolkit = {"name":"GCC", "version": "4.6.3"} dependencies = [('first', '1.1'), {'name': 'second', 'version': '2.2'}] +builddependencies = [('first', '1.1'), {'name': 'second', 'version': '2.2'}] """ def runTest(self): eb = EasyBlock(self.eb_file) - self.assertEqual(len(eb.dependencies()), 2) + # should include builddependencies + self.assertEqual(len(eb.dependencies()), 4) + self.assertEqual(len(eb.builddependencies()), 2) first = eb.dependencies()[0] second = eb.dependencies()[1] @@ -115,6 +131,27 @@ def runTest(self): self.assertEqual(first['tk'], '1.1-GCC-4.6.3') self.assertEqual(second['tk'], '2.2-GCC-4.6.3') + # same tests for builddependencies + first = eb.builddependencies()[0] + second = eb.builddependencies()[1] + + self.assertEqual(first['name'], "first") + self.assertEqual(second['name'], "second") + + self.assertEqual(first['version'], "1.1") + self.assertEqual(second['version'], "2.2") + + self.assertEqual(first['tk'], '1.1-GCC-4.6.3') + self.assertEqual(second['tk'], '2.2-GCC-4.6.3') + + eb['dependencies'] = ["wrong type"] + self.assertErrorRegex(EasyBuildError, "wrong type from unsupported type", eb.dependencies) + + eb['dependencies'] = [()] + self.assertErrorRegex(EasyBuildError, "without name", eb.dependencies) + eb['dependencies'] = [{'name': "test"}] + self.assertErrorRegex(EasyBuildError, "without version", eb.dependencies) + class TestExtraOptions(EasyBlockTest): contents = """ @@ -123,6 +160,7 @@ class TestExtraOptions(EasyBlockTest): homepage = "http://google.com" description = "test easyblock" toolkit = {"name":"GCC", "version": "4.6.3"} +toolkitopts = { "static": True} dependencies = [('first', '1.1'), {'name': 'second', 'version': '2.2'}] """ @@ -148,8 +186,23 @@ def runTest(self): eb['custom_key'] = "not so default" self.assertEqual(eb['custom_key'], 'not so default') + # test if extra toolkit options are being passed + self.assertEqual(eb.toolkit().opts['static'], True) +class TestSuggestions(EasyBlockTest): + + contents = """ +name = "pi" +version = "3.14" +homepage = "http://google.com" +description = "test easyblock" +toolkit = {"name":"GCC", "version": "4.6.3"} +dependencis = [('first', '1.1'), {'name': 'second', 'version': '2.2'}] +""" + def runTest(self): + self.assertErrorRegex(EasyBuildError, "invalid variable dependencis", EasyBlock, self.eb_file) + self.assertErrorRegex(EasyBuildError, "suggestions: dependencies", EasyBlock, self.eb_file) From 23484d1ef7cb7fda7bac33ddab15898e5521c255 Mon Sep 17 00:00:00 2001 From: Toon Willems Date: Mon, 9 Jul 2012 16:37:56 +0200 Subject: [PATCH 036/798] move validation of osdeps to easyblock.py --- easybuild/framework/application.py | 32 +---------------------------- easybuild/framework/easyblock.py | 33 +++++++++++++++++++++++++++++- 2 files changed, 33 insertions(+), 32 deletions(-) diff --git a/easybuild/framework/application.py b/easybuild/framework/application.py index 2a4f10e8d8..9e708327ec 100644 --- a/easybuild/framework/application.py +++ b/easybuild/framework/application.py @@ -238,6 +238,7 @@ def extra_options(self): Extra options method which will be passed to the EasyBlock constructor. Subclasses should overwrite this method (but not forget to call super, unless they plan on disregarding parent options) + NOTE: update on dictionary returns None, so fancy one-liners will NOT work """ return {} @@ -257,10 +258,6 @@ def prepare_build(self): elif LooseVersion(easybuildVersion) > easybuild.VERSION: self.log.error("EasyBuild-version %s is newer than the currently running one. Aborting!" % easybuildVersion) - - if self.getcfg('osdependencies'): - self.check_osdeps(self.getcfg('osdependencies')) - if self.getcfg('sources'): self.addsource(self.getcfg('sources')) else: @@ -297,33 +294,6 @@ def updatecfg(self, key, value): self.setcfg(key, new_value) - def check_osdeps(self, osdeps): - """ - Check if packages are available from OS. osdeps should be a list of dependencies. - If an element of osdeps is a list, checks will pass if one of the elements of the list is found - """ - not_found = [] - for check in osdeps: - if type(check) != list: - check = [check] - - # find at least one element of check - # - using rpm -q for now --> can be run as non-root!! - # - should be extended to files later? - for d in check: - cmd = "rpm -q %s" % d - (rpmout, ec) = run_cmd(cmd, simple=False, log_all=False, log_ok=False) - if ec == 0: - self.log.debug("Found osdep %s" % d) - else: - not_found.append(d) - self.log.info("Couldn't find OS dependency check %s: %s" % (check, rpmout)) - - if not not_found: - self.log.info("OS dependencies ok: %s" % osdeps) - else: - self.log.error("One or more OS dependencies were not found: %s" % not_found) - ## BUILD def ready2build(self): diff --git a/easybuild/framework/easyblock.py b/easybuild/framework/easyblock.py index e567207839..da31d5c897 100644 --- a/easybuild/framework/easyblock.py +++ b/easybuild/framework/easyblock.py @@ -26,6 +26,7 @@ from easybuild.tools.build_log import getLog, EasyBuildError from easybuild.tools.toolkit import Toolkit from easybuild.tools.systemtools import get_shared_lib_ext +from easybuild.tools.filetools import run_cmd class EasyBlock: """ @@ -155,12 +156,33 @@ def validate(self): for attr in self.validations: self._validate(attr, self.validations[attr]) + self.log.info("Checking OS dependencies") + self.validate_os_deps() + + return True + + def validate_os_deps(self): + """ + validate presence of OS dependencies + osdependencies should be a single list (do not rely on documentation found in application.py! + """ + not_found = [] + for dep in self['osdependencies']: + # TODO: make _os_dependency_check work all platforms + if not self._os_dependency_check(d): + not_found.append(dep) + + if not_found: + self.log.error("One or more OS dependencies were not found: %s" % not_found) + else: + self.log.info("OS dependencies ok: %s" % self['osdependencies']) + return True def dependencies(self): """ returns an array of parsed dependencies - dependency = {'name': '', 'version': '', 'prefix': '', 'suffix': ''} + dependency = {'name': '', 'version': '', 'dummy': (False|True), 'suffix': ''} """ deps = [] @@ -212,6 +234,15 @@ def _validate(self, attr, values): self.log.error("%s provided %s is not valid: %s" % (attr, self[attr], values)) + def _os_dependency_check(self, dep): + """ + will run rpm -q $dep, to see if dependency is available + """ + # TODO: extend this with more cross platform functionality + cmd = "rpm -q %s" % dep + return run_cmd(cmd, simple=True) + + def _parse_dependency(self, dep): attr = ['name', 'version', 'suffix', 'dummy'] dependency = {'name': '', 'version': '', 'suffix': '', 'dummy': False} From 97a83373360768af2cc4e2ba3256dc3f06be2fdc Mon Sep 17 00:00:00 2001 From: Toon Willems Date: Mon, 9 Jul 2012 16:53:15 +0200 Subject: [PATCH 037/798] rename d -> dep --- easybuild/framework/easyblock.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/easybuild/framework/easyblock.py b/easybuild/framework/easyblock.py index da31d5c897..94b4abe543 100644 --- a/easybuild/framework/easyblock.py +++ b/easybuild/framework/easyblock.py @@ -169,7 +169,7 @@ def validate_os_deps(self): not_found = [] for dep in self['osdependencies']: # TODO: make _os_dependency_check work all platforms - if not self._os_dependency_check(d): + if not self._os_dependency_check(dep): not_found.append(dep) if not_found: From 01ee2885ac4ca16e196610b2134988044a72dbe3 Mon Sep 17 00:00:00 2001 From: Toon Willems Date: Mon, 9 Jul 2012 17:20:31 +0200 Subject: [PATCH 038/798] pass debug option to application instance --- easybuild/build.py | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/easybuild/build.py b/easybuild/build.py index c060a78902..ff58831c6b 100644 --- a/easybuild/build.py +++ b/easybuild/build.py @@ -552,7 +552,7 @@ def build(module, options, log, origEnviron, exitOnFailure=True): name = module['module'][0] try: app_cls = get_class(easyblock, log, name=name) - app = app_cls(spec) + app = app_cls(spec, debug=options.debug) log.info("Obtained application instance of for %s (easyblock: %s)" % (name, easyblock)) except EasyBuildError, err: error("Failed to get application instance for %s (easyblock: %s): %s" % (name, easyblock, err.msg)) @@ -566,8 +566,6 @@ def build(module, options, log, origEnviron, exitOnFailure=True): log.debug("Skip set to %s" % options.skip) app.setcfg('skip', options.skip) - app.logdebug = options.debug - ## Build easyconfig errormsg = '(no error)' # timing info From 337f49e093224b35001873122e526c5f11a6563a Mon Sep 17 00:00:00 2001 From: Toon Willems Date: Tue, 10 Jul 2012 08:45:16 +0200 Subject: [PATCH 039/798] i forgot to update self.tk -> self.toolkit() --- easybuild/easyblocks/a/atlas.py | 2 +- easybuild/easyblocks/c/cp2k.py | 10 +++++----- easybuild/easyblocks/h/hdf5.py | 6 +++--- easybuild/easyblocks/l/lapack.py | 2 +- easybuild/easyblocks/m/mrbayes.py | 2 +- easybuild/easyblocks/n/netcdf.py | 6 +++--- easybuild/easyblocks/n/netcdf_fortran.py | 6 +++--- easybuild/easyblocks/p/python.py | 2 +- easybuild/easyblocks/s/scalapack.py | 4 ++-- easybuild/easyblocks/w/wps.py | 2 +- easybuild/easyblocks/w/wrf.py | 6 +++--- easybuild/framework/application.py | 12 +++++++++++- easybuild/framework/easyblock.py | 9 ++++++++- easybuild/test/easyblock.py | 2 -- 14 files changed, 43 insertions(+), 28 deletions(-) diff --git a/easybuild/easyblocks/a/atlas.py b/easybuild/easyblocks/a/atlas.py index 3cb5104c9b..78275398b0 100644 --- a/easybuild/easyblocks/a/atlas.py +++ b/easybuild/easyblocks/a/atlas.py @@ -65,7 +65,7 @@ def configure(self): " required to build ATLAS with a full LAPACK library.") # enable building of shared libraries (requires -fPIC) - if self.getcfg('sharedlibs') or self.tk.opts['pic']: + if self.getcfg('sharedlibs') or self.toolkit().opts['pic']: self.log.debug("Enabling -fPIC because we're building shared ATLAS libs, or just because.") self.updatecfg('configopts', '-Fa alg -fPIC') diff --git a/easybuild/easyblocks/c/cp2k.py b/easybuild/easyblocks/c/cp2k.py index a4b254cb68..bdc3b39791 100644 --- a/easybuild/easyblocks/c/cp2k.py +++ b/easybuild/easyblocks/c/cp2k.py @@ -90,10 +90,10 @@ def configure(self): # set compilers options according to toolkit config ## full debug: -g -traceback -check all -fp-stack-check ## -g links to mpi debug libs - if self.tk.opts['debug']: + if self.toolkit().opts['debug']: self.debug = '-g' self.log.info("Debug build") - if self.tk.opts['pic']: + if self.toolkit().opts['pic']: self.fpic = "-fPIC" self.log.info("Using fPIC") @@ -116,13 +116,13 @@ def configure(self): self.modincpath = self.prepmodinc() # set typearch - self.typearch = "Linux-x86-64-%s" % self.tk.name + self.typearch = "Linux-x86-64-%s" % self.toolkit().name # extra make instructions self.make_instructions = "graphcon.o: graphcon.F\n\t$(FC) -c $(FCFLAGS2) $<\n" # compiler toolkit specific configuration - comp_fam = self.tk.toolkit_comp_family() + comp_fam = self.toolkit().toolkit_comp_family() if comp_fam == "Intel": options = self.configureIntelBased() elif comp_fam == "GCC": @@ -221,7 +221,7 @@ def configureCommon(self): ## -automatic is default: -noautomatic -auto-scalar ## some mem-bandwidth optimisation if self.getcfg('type') == 'psmp': - self.openmp = self.tk.get_openmp_flag() + self.openmp = self.toolkit().get_openmp_flag() # determine which opt flags to use if self.getcfg('typeopt'): diff --git a/easybuild/easyblocks/h/hdf5.py b/easybuild/easyblocks/h/hdf5.py index 61aaebba79..b033e733d9 100644 --- a/easybuild/easyblocks/h/hdf5.py +++ b/easybuild/easyblocks/h/hdf5.py @@ -41,7 +41,7 @@ def configure(self): self.updatecfg('configopts', "--enable-cxx --enable-fortran %s" % fcomp) # MPI and C++ support enabled requires --enable-unsupported, because this is untested by HDF5 - if self.tk.opts['usempi']: + if self.toolkit().opts['usempi']: self.updatecfg('configopts', "--enable-unsupported") # make options @@ -58,7 +58,7 @@ def sanitycheck(self): """ if not self.getcfg('sanityCheckPaths'): - if self.tk.opts['usempi']: + if self.toolkit().opts['usempi']: extra_binaries = ["bin/%s" % x for x in ["h5perf", "h5pcc", "h5pfc", "ph5diff"]] else: extra_binaries = ["bin/%s" % x for x in ["h5cc", "h5fc"]] @@ -78,4 +78,4 @@ def sanitycheck(self): self.log.info("Customized sanity check paths: %s"%self.getcfg('sanityCheckPaths')) - Application.sanitycheck(self) \ No newline at end of file + Application.sanitycheck(self) diff --git a/easybuild/easyblocks/l/lapack.py b/easybuild/easyblocks/l/lapack.py index 68351de04d..1cbad27358 100644 --- a/easybuild/easyblocks/l/lapack.py +++ b/easybuild/easyblocks/l/lapack.py @@ -96,7 +96,7 @@ def configure(self): # set optimization flags fpic = '' - if self.tk.opts['pic']: + if self.toolkit().opts['pic']: fpic = '-fPIC' self.updatecfg('makeopts', 'OPTS="$FFLAGS -m64" NOOPT="%s -m64 -O0"' % fpic) diff --git a/easybuild/easyblocks/m/mrbayes.py b/easybuild/easyblocks/m/mrbayes.py index 8181ad8dd9..934a07d0da 100644 --- a/easybuild/easyblocks/m/mrbayes.py +++ b/easybuild/easyblocks/m/mrbayes.py @@ -53,7 +53,7 @@ def configure(self): else: self.log.error("BEAGLE module not loaded?") - if self.tk.opts['usempi']: + if self.toolkit().opts['usempi']: self.updatecfg('configopts', '--enable-mpi') # configure diff --git a/easybuild/easyblocks/n/netcdf.py b/easybuild/easyblocks/n/netcdf.py index 47f74cce35..82178d016f 100644 --- a/easybuild/easyblocks/n/netcdf.py +++ b/easybuild/easyblocks/n/netcdf.py @@ -30,7 +30,7 @@ def configure(self): self.updatecfg('configopts', "--enable-shared") - if self.tk.opts['pic']: + if self.toolkit().opts['pic']: self.updatecfg('configopts', '--with-pic') self.updatecfg('configopts', 'FCFLAGS="%s" CC="%s" FC="%s"' % (os.getenv('FFLAGS'), @@ -39,7 +39,7 @@ def configure(self): )) # add -DgFortran to CPPFLAGS when building with GCC - if self.tk.toolkit_comp_family() == "GCC": + if self.toolkit().toolkit_comp_family() == "GCC": os.environ['CPPFLAGS'] = "%s -DgFortran" % os.getenv('CPPFLAGS') Application.configure(self) @@ -101,4 +101,4 @@ def get_netcdf_module_set_cmds(log): txt += "setenv NETCDFF %s\n" % netcdff return txt else: - log.error("NETCDF environment variable not set?") \ No newline at end of file + log.error("NETCDF environment variable not set?") diff --git a/easybuild/easyblocks/n/netcdf_fortran.py b/easybuild/easyblocks/n/netcdf_fortran.py index dd50ec9bbd..4cc92f5ca3 100644 --- a/easybuild/easyblocks/n/netcdf_fortran.py +++ b/easybuild/easyblocks/n/netcdf_fortran.py @@ -27,13 +27,13 @@ class NetCDF_Fortran(Application): def configure(self): """Configure build: set config options and configure""" - if self.tk.opts['pic']: + if self.toolkit().opts['pic']: self.updatecfg('configopts', "--with-pic") self.updatecfg('configopts', 'FCFLAGS="%s" FC="%s"' % (os.getenv('FFLAGS'), os.getenv('F90'))) # add -DgFortran to CPPFLAGS when building with GCC - if self.tk.toolkit_comp_family() == "GCC": + if self.toolkit().toolkit_comp_family() == "GCC": os.environ['CPPFLAGS'] = "%s -DgFortran" % os.getenv('CPPFLAGS') Application.configure(self) @@ -55,4 +55,4 @@ def sanitycheck(self): self.log.info("Customized sanity check paths: %s"%self.getcfg('sanityCheckPaths')) - Application.sanitycheck(self) \ No newline at end of file + Application.sanitycheck(self) diff --git a/easybuild/easyblocks/p/python.py b/easybuild/easyblocks/p/python.py index 814038691a..2a93e10651 100644 --- a/easybuild/easyblocks/p/python.py +++ b/easybuild/easyblocks/p/python.py @@ -190,7 +190,7 @@ class FortranPythonPackage(DefaultPythonPackage): """Extends DefaultPythonPackage to add a Fortran compiler to the make call""" def make(self): - comp_fam = self.tk.toolkit_comp_family() + comp_fam = self.toolkit().toolkit_comp_family() if comp_fam == "Intel": cmd = "python setup.py build --compiler=intel --fcompiler=intelem" diff --git a/easybuild/easyblocks/s/scalapack.py b/easybuild/easyblocks/s/scalapack.py index 9b2afec6af..a70eab5cc1 100644 --- a/easybuild/easyblocks/s/scalapack.py +++ b/easybuild/easyblocks/s/scalapack.py @@ -95,9 +95,9 @@ def make(self): # set compilers and options noopt = '' - if self.tk.opts['noopt']: + if self.toolkit().opts['noopt']: noopt += " -O0" - if self.tk.opts['pic']: + if self.toolkit().opts['pic']: noopt += " -fPIC" extra_makeopts += 'F77="%(f77)s" CC="%(cc)s" NOOPT="%(noopt)s" CCFLAGS="-O3" ' % { 'f77':mpif77, diff --git a/easybuild/easyblocks/w/wps.py b/easybuild/easyblocks/w/wps.py index 6ce7432eb4..ca388927f0 100644 --- a/easybuild/easyblocks/w/wps.py +++ b/easybuild/easyblocks/w/wps.py @@ -118,7 +118,7 @@ def configure(self): # configure # determine build type option to look for - self.comp_fam = self.tk.toolkit_comp_family() + self.comp_fam = self.toolkit().toolkit_comp_family() build_type_option = None if LooseVersion(self.version()) >= LooseVersion("3.4"): diff --git a/easybuild/easyblocks/w/wrf.py b/easybuild/easyblocks/w/wrf.py index b964ee9c36..b477a4f30b 100644 --- a/easybuild/easyblocks/w/wrf.py +++ b/easybuild/easyblocks/w/wrf.py @@ -95,7 +95,7 @@ def configure(self): # determine build type option to look for build_type_option = None - self.comp_fam = self.tk.toolkit_comp_family() + self.comp_fam = self.toolkit().toolkit_comp_family() if self.comp_fam == "Intel": build_type_option = "Linux x86_64 i486 i586 i686, ifort compiler with icc" @@ -227,8 +227,8 @@ def test(self): ## stack limit needs to be set to unlimited for WRF to work well if self.getcfg('buildtype') in self.parallel_build_types: - test_cmd = "ulimit -s unlimited && %s && %s" % (self.tk.mpi_cmd_for("./ideal.exe", 1), - self.tk.mpi_cmd_for("./wrf.exe", n)) + test_cmd = "ulimit -s unlimited && %s && %s" % (self.toolkit().mpi_cmd_for("./ideal.exe", 1), + self.toolkit().mpi_cmd_for("./wrf.exe", n)) else: test_cmd = "ulimit -s unlimited && ./ideal.exe && ./wrf.exe" % n diff --git a/easybuild/framework/application.py b/easybuild/framework/application.py index 9e708327ec..f05715b929 100644 --- a/easybuild/framework/application.py +++ b/easybuild/framework/application.py @@ -793,6 +793,11 @@ def test(self): if self.getcfg('runtest'): cmd = "make %s" % (self.getcfg('runtest')) run_cmd(cmd, log_all=True, simple=True) + def toolkit(self): + """ + The toolkit used to build this Application + """ + return self.cfg.toolkit() def make_install(self): """ @@ -1380,7 +1385,6 @@ def __init__(self, mself, pkg, pkginstalldeps): self.master = mself self.log = self.master.log self.cfg = self.master.cfg - self.tk = self.master.tk self.pkg = pkg self.pkginstalldeps = pkginstalldeps @@ -1409,3 +1413,9 @@ def postrun(self): Stuff to do after installing a package. """ pass + + def toolkit(self): + """ + Toolkit used to build this package + """ + return self.master.toolkit() diff --git a/easybuild/framework/easyblock.py b/easybuild/framework/easyblock.py index 94b4abe543..112107fe48 100644 --- a/easybuild/framework/easyblock.py +++ b/easybuild/framework/easyblock.py @@ -102,6 +102,9 @@ def __init__(self, path, extra_options={}, validate=True): self.config.update(extra_options) self.log = getLog("EasyBlock") + # store toolkit + self._tk = None + if not os.path.isfile(path): self.log.error("EasyBlock __init__ expected a valid path") @@ -208,12 +211,16 @@ def toolkit(self): """ returns the Toolkit used """ + if self._tk: + return self._tk + tk = self['toolkit'] tk = Toolkit(tk['name'], tk['version']) if self['toolkitopts']: tk.setOptions(self['toolkitopts']) - return tk + self._tk = tk + return self._tk def installversion(self): """ diff --git a/easybuild/test/easyblock.py b/easybuild/test/easyblock.py index ae7d5c781d..38c33fb320 100644 --- a/easybuild/test/easyblock.py +++ b/easybuild/test/easyblock.py @@ -75,8 +75,6 @@ def runTest(self): # dummy toolkit, installversion == version self.assertEqual(eb.installversion(), "3.14") - eb['toolkit'] = {"name": "GCC", "version": "4.6.3"} - self.assertEqual(eb.installversion(), "3.14-GCC-4.6.3") os.chmod(self.eb_file, 0000) self.assertErrorRegex(EasyBuildError, "Unexpected IOError", EasyBlock, self.eb_file) From 215042c252a0f456af66e1f67a08598dd7246a2b Mon Sep 17 00:00:00 2001 From: Toon Willems Date: Tue, 10 Jul 2012 10:25:28 +0200 Subject: [PATCH 040/798] basic foundation for build test --- easybuild/test/build.py | 74 +++++++++++++++++++++++++++++++++++++++++ 1 file changed, 74 insertions(+) create mode 100644 easybuild/test/build.py diff --git a/easybuild/test/build.py b/easybuild/test/build.py new file mode 100644 index 0000000000..a70175e834 --- /dev/null +++ b/easybuild/test/build.py @@ -0,0 +1,74 @@ +import os +import re +import sys + +from unittest import TestCase +from easybuild.tools.build_log import getLog, EasyBuildError +from easybuild.framework.application import get_class, Application +from easybuild.build import findEasyconfigs, processEasyconfig, resolveDependencies + +import easybuild.tools.config as config + +class BuildTest(TestCase): + """ + This class will build everything in the path given to it. + There are several possibilities why some applications fail to build, + this test will try to distinguish between: 'eb-file error', 'preparation error', 'configure', + 'make', 'make install', 'sanitycheck', 'test' + """ + + def setUp(self): + """ fetch application instances, report eb-file errors """ + config.init('easybuild/easybuild_config.py') + self.errors = [] + + log = getLog("BuildTest") + path = "easybuild/easyconfigs/" + packages = [] + files = findEasyconfigs(path, log) + for file in files: + try: + packages.extend(processEasyconfig(file, log, None)) + except EasyBuildError, err: + self.errors.append([file, err, 'eb-file error']) + + # TODO: confirm that build-order doesn't matter + self.apps = [] + for pkg in packages: + spec = pkg['spec'] + name = pkg['module'][0] + try: + # pass None so get_class will infer it + app_class = get_class(None, log, name=name) + self.apps.append(app_class(spec, debug=True)) + except EasyBuildError, err: + self.errors.append([spec, err, 'Initialization error']) + + def performStep(self, fase, arr, method): + errors = 0 + for obj in arr: + try: + method(obj) + except EasyBuildError, err: + errors += 1 + # Remove this object from the array + # we cannot continue building it + arr.remove(obj) + print "Encountered error: %s (ErrorClass: %s)" % (err, fase) + + print "%s errors during %s" % (errors, fase) + + + def runTest(self): + + print "%s errors encountered before we can begin building" % len(self.errors) + for (obj, err, name) in self.errors: + print "%s encountered error: %s (ErrorClass: %s)" % (obj, err, name) + + self.errors = [] + + print "Continuing building other packages" + # take manual control over the building + self.performStep("preparation", self.apps, Application.prepare_build) + self.performStep("pre-build verification", self.apps, Application.ready2build) + From 219f41e7ebaf1bde98ea091fa08af3326b7a10cf Mon Sep 17 00:00:00 2001 From: Toon Willems Date: Tue, 10 Jul 2012 10:35:43 +0200 Subject: [PATCH 041/798] add build step to test --- easybuild/test/build.py | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/easybuild/test/build.py b/easybuild/test/build.py index a70175e834..2b9e78b33f 100644 --- a/easybuild/test/build.py +++ b/easybuild/test/build.py @@ -69,6 +69,8 @@ def runTest(self): print "Continuing building other packages" # take manual control over the building - self.performStep("preparation", self.apps, Application.prepare_build) - self.performStep("pre-build verification", self.apps, Application.ready2build) + self.performStep("preparation", self.apps, lambda x: x.prepare_build()) + self.performStep("pre-build verification", self.apps, lambda x: x.ready2build()) + # TODO: might want to have more control here (so we can get better error messages + self.performStep("build", self.apps, lambda x: x.build()) From 2c0f37df117e71551f4396e54d2172519df01c7d Mon Sep 17 00:00:00 2001 From: Toon Willems Date: Tue, 10 Jul 2012 10:41:48 +0200 Subject: [PATCH 042/798] some minor things so it can run easily on python 2.4 --- easybuild/test/build.py | 3 +++ 1 file changed, 3 insertions(+) diff --git a/easybuild/test/build.py b/easybuild/test/build.py index 2b9e78b33f..ceb7c8587e 100644 --- a/easybuild/test/build.py +++ b/easybuild/test/build.py @@ -1,6 +1,7 @@ import os import re import sys +import unittest from unittest import TestCase from easybuild.tools.build_log import getLog, EasyBuildError @@ -74,3 +75,5 @@ def runTest(self): # TODO: might want to have more control here (so we can get better error messages self.performStep("build", self.apps, lambda x: x.build()) +if __name__ == '__main__': + unittest.main() From 551407358b7f3f136c8ee6278f924567728461c0 Mon Sep 17 00:00:00 2001 From: Toon Willems Date: Tue, 10 Jul 2012 11:06:48 +0200 Subject: [PATCH 043/798] better error handling for os dep check --- easybuild/framework/easyblock.py | 7 +++++-- easybuild/test/easyblock.py | 3 +++ 2 files changed, 8 insertions(+), 2 deletions(-) diff --git a/easybuild/framework/easyblock.py b/easybuild/framework/easyblock.py index 112107fe48..795e1a0b53 100644 --- a/easybuild/framework/easyblock.py +++ b/easybuild/framework/easyblock.py @@ -246,8 +246,11 @@ def _os_dependency_check(self, dep): will run rpm -q $dep, to see if dependency is available """ # TODO: extend this with more cross platform functionality - cmd = "rpm -q %s" % dep - return run_cmd(cmd, simple=True) + try: + cmd = "rpm -q %s" % dep + return run_cmd(cmd, simple=True) + except: + return False def _parse_dependency(self, dep): diff --git a/easybuild/test/easyblock.py b/easybuild/test/easyblock.py index 38c33fb320..a938e8b769 100644 --- a/easybuild/test/easyblock.py +++ b/easybuild/test/easyblock.py @@ -73,6 +73,9 @@ def runTest(self): # this should now not crash eb.validate() + eb['osdependencies'] = ['tcsh'] + self.assertErrorRegex(EasyBuildError, "OS dependencies were not found", eb.validate) + # dummy toolkit, installversion == version self.assertEqual(eb.installversion(), "3.14") From acbaa5d84d7dee5a45e9fd1484ce536b3ab6bda0 Mon Sep 17 00:00:00 2001 From: Toon Willems Date: Tue, 10 Jul 2012 11:11:59 +0200 Subject: [PATCH 044/798] print object that failed --- easybuild/test/build.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/easybuild/test/build.py b/easybuild/test/build.py index ceb7c8587e..e6630fec5f 100644 --- a/easybuild/test/build.py +++ b/easybuild/test/build.py @@ -55,7 +55,7 @@ def performStep(self, fase, arr, method): # Remove this object from the array # we cannot continue building it arr.remove(obj) - print "Encountered error: %s (ErrorClass: %s)" % (err, fase) + print "%s encountered error: %s (ErrorClass: %s)" % (obj, err, fase) print "%s errors during %s" % (errors, fase) From d1631b12714a8512474e8fa0eb3c9e97f065dfdd Mon Sep 17 00:00:00 2001 From: Toon Willems Date: Tue, 10 Jul 2012 12:51:05 +0200 Subject: [PATCH 045/798] add toolkit tests, even fix a small bug found by it --- easybuild/test/toolkit.py | 90 ++++++++++++++++++++++++++++++++++++++ easybuild/tools/modules.py | 2 +- easybuild/tools/toolkit.py | 6 +-- 3 files changed, 94 insertions(+), 4 deletions(-) create mode 100644 easybuild/test/toolkit.py diff --git a/easybuild/test/toolkit.py b/easybuild/test/toolkit.py new file mode 100644 index 0000000000..7e5edfca72 --- /dev/null +++ b/easybuild/test/toolkit.py @@ -0,0 +1,90 @@ +import os + +from unittest import TestCase +from easybuild.tools.build_log import EasyBuildError +import easybuild.tools.modules as modules + + + +# Change the Modules class so i have complete control over its behaviour +OrigModules = modules.Modules + +class MockModule(modules.Modules): + modules = [] + def available(self, name, *args): + if name == 'gzip': + return [('gzip', '1.4')] + elif name == 'icc': + return [('icc', '4.0.3-32bit')] + else: + return [] + + def addModule(self, *args): + MockModule.modules.extend(*args) + + def load(*args): + pass + + def dependencies_for(*args): + return [] + + + +modules.Modules = MockModule + +from easybuild.tools.toolkit import Toolkit + +class ToolkitTest(TestCase): + + def setUp(self): + self.tk_32bit = Toolkit("icc", "4.0.3-32bit") + self.tk_64bit = Toolkit("GCC", "4.6.3") + self.dummy_tk = Toolkit("dummy", "1.0") + + def runTest(self): + self.assertEqual(self.tk_32bit.name, 'icc') + # assert m32flag has been set + self.assertEqual(self.tk_32bit.m32flag, ' -m32') + # dummy toolkit always exists + self.assertEqual(self.dummy_tk._toolkitExists(), True) + self.assertEqual(self.tk_32bit._toolkitExists(), True) + self.assertEqual(self.tk_64bit._toolkitExists(), False) + + + # Test getDependencyVersion + dep = {"name": "depname", "version":"1.0"} + dep2 = {"name": "gzip", "dummy":"dummy"} + + self.assertEqual("1.0-icc-4.0.3-32bit", self.tk_32bit.getDependencyVersion(dep)) + self.assertEqual('1.4', self.dummy_tk.getDependencyVersion(dep2)) + + + # test setOptions + self.dummy_tk.setOptions({'static':True, 'non-existing':False}) + self.assertEqual(self.dummy_tk.opts['static'], True) + self.assertRaises(KeyError, lambda: self.dummy_tk.opts['non-existing']) + + + # test addDependencies + dep = {"name": 'gzip'} + self.tk_32bit.addDependencies([dep]) + self.assertEqual(len(self.tk_32bit.dependencies), 1) + + self.assertRaises(EasyBuildError, self.tk_32bit.addDependencies, [{"name":"bzip"}]) + + # Test prepare + self.assertRaises(EasyBuildError, self.tk_64bit.prepare) + + # no dependencies should be added + self.dummy_tk.prepare() + self.assertEqual(MockModule.modules, []) + + os.environ["SOFTVERSIONICC"] = "2011" + os.environ["SOFTROOTICC"] = "/tmp" + + self.tk_32bit.prepare(onlymod=True) + + self.assertEqual(MockModule.modules, [(self.tk_32bit.name, self.tk_32bit.version), dep]) + MockModule.modules = [] + + diff --git a/easybuild/tools/modules.py b/easybuild/tools/modules.py index a80f635b3b..52be1eee24 100644 --- a/easybuild/tools/modules.py +++ b/easybuild/tools/modules.py @@ -252,7 +252,7 @@ def dependencies_for(self, name, version): deps = [{'name':modname, 'version':modversion} for (modname, modversion) in mods] - # add dependencies of dependency modules only if they're not there yet + # add dependencies of dependency modules only if they're not there yet for moddepdeps in moddeps: for dep in moddepdeps: if not dep in deps: diff --git a/easybuild/tools/toolkit.py b/easybuild/tools/toolkit.py index e132dac1d4..440bec00dd 100644 --- a/easybuild/tools/toolkit.py +++ b/easybuild/tools/toolkit.py @@ -103,7 +103,7 @@ def getDependencyVersion(self, dependency): matches = Modules().available(dependency['name'], "%s%s" % (toolkit, suffix)) # Find the most recent (or default) one if len(matches) > 0: - return matches[-1] + return matches[-1][-1] else: log.error('No toolkit version for dependency name %s (suffix %s) found' % (dependency['name'], "%s%s" % (toolkit, suffix))) @@ -310,7 +310,7 @@ def prepareACML(self): if os.getenv('SOFTROOTGCC'): compiler = 'gfortran' elif os.getenv('SOFTROOTIFORT'): - compiler = 'ifort' + compiler = 'ifort' else: log.error("Don't know which compiler-specific subdir for ACML to use.") self.vars['LDFLAGS'] += " -L%(acml)s/%(comp)s64/lib/ " % { @@ -318,7 +318,7 @@ def prepareACML(self): 'comp':compiler, 'acml':os.environ['SOFTROOTACML'] } - self.vars['LIBBLAS'] = " -lacml_mv -lacml " #-lpthread" + self.vars['LIBBLAS'] = " -lacml_mv -lacml " #-lpthread" self.vars['LIBBLAS_MT'] = self.vars['LIBBLAS'] From 914957bafe62a87e9998c933f32ede90587e15b1 Mon Sep 17 00:00:00 2001 From: Toon Willems Date: Tue, 10 Jul 2012 14:21:34 +0200 Subject: [PATCH 046/798] extend testing --- easybuild/test/gzip.eb | 17 +++++++++ easybuild/test/modulegenerator.py | 60 +++++++++++++++++++++++++++++++ easybuild/test/toolkit.py | 6 +++- 3 files changed, 82 insertions(+), 1 deletion(-) create mode 100644 easybuild/test/gzip.eb create mode 100644 easybuild/test/modulegenerator.py diff --git a/easybuild/test/gzip.eb b/easybuild/test/gzip.eb new file mode 100644 index 0000000000..a21798a258 --- /dev/null +++ b/easybuild/test/gzip.eb @@ -0,0 +1,17 @@ +name = 'gzip' +version = '1.4' + +homepage = "http://www.gzip.org/" +description = "gzip (GNU zip) is a popular data compression program as a replacement for compress" + +# test toolkit specification +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': []} diff --git a/easybuild/test/modulegenerator.py b/easybuild/test/modulegenerator.py new file mode 100644 index 0000000000..b601a76ace --- /dev/null +++ b/easybuild/test/modulegenerator.py @@ -0,0 +1,60 @@ +import os +import re + +from unittest import TestCase +from easybuild.tools.build_log import EasyBuildError +from easybuild.tools.module_generator import ModuleGenerator +from easybuild.framework.application import Application + +class ModuleGeneratorTest(TestCase): + + def setUp(self): + # TODO: include gzip.eb as test file + self.modgen = ModuleGenerator(Application('easybuild/test/gzip.eb')) + self.modgen.app.installdir = "/tmp" + + def runTest(self): + expected = """#%Module + +proc ModulesHelp { } { + puts stderr { gzip (GNU zip) is a popular data compression program as a replacement for compress - Homepage: http://www.gzip.org/ +} +} + +module-whatis {gzip (GNU zip) is a popular data compression program as a replacement for compress - Homepage: http://www.gzip.org/} + +set root /tmp + +conflict gzip +""" + + desc = self.modgen.getDescription() + self.assertEqual(desc, expected) + + # test loadModule + expected = """ +if { ![is-loaded name/version] } { + module load name/version +} +""" + self.assertEqual(expected, self.modgen.loadModule("name", "version")) + + # test unloadModule + expected = """ +if { ![is-loaded name/version] } { + if { [is-loaded name] } { + module unload name + } +} +""" + self.assertEqual(expected, self.modgen.unloadModule("name", "version")) + + # test prependPaths + expected = """prepend-path key $root/path1 +prepend-path key $root/path2 +""" + self.assertEqual(expected, self.modgen.prependPaths("key", ["path1", "path2"])) + + # test setEnvironment + self.assertEqual("setenv\tkey\t\tvalue\n", self.modgen.setEnvironment("key", "value")) + diff --git a/easybuild/test/toolkit.py b/easybuild/test/toolkit.py index 7e5edfca72..1239b88b12 100644 --- a/easybuild/test/toolkit.py +++ b/easybuild/test/toolkit.py @@ -28,9 +28,13 @@ def load(*args): def dependencies_for(*args): return [] + def get_software_root(*args): + return "tmp" + modules.Modules = MockModule +modules.get_software_root = MockModule().get_software_root from easybuild.tools.toolkit import Toolkit @@ -82,7 +86,7 @@ def runTest(self): os.environ["SOFTVERSIONICC"] = "2011" os.environ["SOFTROOTICC"] = "/tmp" - self.tk_32bit.prepare(onlymod=True) + self.tk_32bit.prepare() self.assertEqual(MockModule.modules, [(self.tk_32bit.name, self.tk_32bit.version), dep]) MockModule.modules = [] From 92df4d40598e3519768d0c9b5a9e43e6f11eae05 Mon Sep 17 00:00:00 2001 From: Toon Willems Date: Tue, 10 Jul 2012 14:34:23 +0200 Subject: [PATCH 047/798] add tests for asyncprocess (unix only) --- easybuild/test/asyncprocess.py | 22 ++++++++++++++++++++++ easybuild/tools/asyncprocess.py | 12 ++++++------ 2 files changed, 28 insertions(+), 6 deletions(-) create mode 100644 easybuild/test/asyncprocess.py diff --git a/easybuild/test/asyncprocess.py b/easybuild/test/asyncprocess.py new file mode 100644 index 0000000000..2288723bc0 --- /dev/null +++ b/easybuild/test/asyncprocess.py @@ -0,0 +1,22 @@ +import os +import re + +from unittest import TestCase +from easybuild.tools.asyncprocess import Popen +import easybuild.tools.asyncprocess as p + +class AsyncProcessTest(TestCase): + + def setUp(self): + self.shell = Popen('sh', stdin=p.PIPE, stdout=p.PIPE, shell=True, executable='/bin/bash') + + def runTest(self): + p.send_all(self.shell, "echo hello\n") + self.assertEqual(p.recv_some(self.shell), "hello\n") + + p.send_all(self.shell, "echo hello world\n") + self.assertEqual(p.recv_some(self.shell), "hello world\n") + + p.send_all(self.shell, "exit\n") + self.assertEqual("", p.recv_some(self.shell, e=0)) + self.assertRaises(Exception, p.recv_some, self.shell) diff --git a/easybuild/tools/asyncprocess.py b/easybuild/tools/asyncprocess.py index 7ca77d0b93..5c94919a3d 100644 --- a/easybuild/tools/asyncprocess.py +++ b/easybuild/tools/asyncprocess.py @@ -1,9 +1,9 @@ ## -# Copyright 2005 Josiah Carlson +# Copyright 2005 Josiah Carlson # The Asynchronous Python Subprocess recipe was originally created by Josiah Carlson. # and released under the GPL v2 on March 14, 2012 # -# http://code.activestate.com/recipes/440554/ +# http://code.activestate.com/recipes/440554/ # # Copyright 2009-2012 Stijn De Weirdt, Dries Verdegem, Kenneth Hoste, Pieter De Baets, Jens Timmerman # @@ -25,12 +25,12 @@ # along with EasyBuild. If not, see . ## -"""Module to allow Asynchronous subprocess use on Windows and Posix platforms +"""Module to allow Asynchronous subprocess use on Windows and Posix platforms The 'subprocess' module in Python 2.4 has made creating and accessing subprocess streams in Python relatively convenient for all supported platforms, -but what if you want to interact with the started subprocess? -That is, what if you want to send a command, read the response, +but what if you want to interact with the started subprocess? +That is, what if you want to send a command, read the response, and send a new command based on that response? Now there is a solution. @@ -38,7 +38,7 @@ recv(maxsize=None) recv_err(maxsize=None) and send(input) - + along with a utility method: send_recv(input='', maxsize=None). From 298e697427cefde1523c7254f73eaaf0b24a8490 Mon Sep 17 00:00:00 2001 From: Toon Willems Date: Tue, 10 Jul 2012 14:38:09 +0200 Subject: [PATCH 048/798] remove windows specific code from asyncprocess This improves test coverage + this code was never going to be used anyway --- easybuild/tools/asyncprocess.py | 125 +++++++++----------------------- 1 file changed, 33 insertions(+), 92 deletions(-) diff --git a/easybuild/tools/asyncprocess.py b/easybuild/tools/asyncprocess.py index 5c94919a3d..6b602cdbd8 100644 --- a/easybuild/tools/asyncprocess.py +++ b/easybuild/tools/asyncprocess.py @@ -63,13 +63,8 @@ PIPE = subprocess.PIPE STDOUT = subprocess.STDOUT -if subprocess.mswindows: - from win32file import ReadFile, WriteFile #IGNORE:F0401 #@UnresolvedImport - from win32pipe import PeekNamedPipe #IGNORE:F0401 #@UnresolvedImport - import msvcrt #IGNORE:F0401 -else: - import select - import fcntl +import select +import fcntl class Popen(subprocess.Popen): @@ -93,86 +88,45 @@ def _close(self, which): getattr(self, which).close() setattr(self, which, None) - if subprocess.mswindows: - def send(self, inp): - if not self.stdin: - return None + def send(self, inp): + if not self.stdin: + return None - try: - x = msvcrt.get_osfhandle(self.stdin.fileno()) #@UndefinedVariable - (_, written) = WriteFile(x, inp) - except ValueError: - return self._close('stdin') - except (subprocess.pywintypes.error, Exception), why: - if why[0] in (109, errno.ESHUTDOWN): - return self._close('stdin') - raise - - return written - - def _recv(self, which, maxsize): - conn, maxsize = self.get_conn_maxsize(which, maxsize) - if conn is None: - return None - - try: - x = msvcrt.get_osfhandle(conn.fileno()) #@UndefinedVariable - (read, nAvail, _) = PeekNamedPipe(x, 0) - if maxsize < nAvail: - nAvail = maxsize - if nAvail > 0: - (_, read) = ReadFile(x, nAvail, None) - except ValueError: - return self._close(which) - except (subprocess.pywintypes.error, Exception), why: - if why[0] in (109, errno.ESHUTDOWN): - return self._close(which) - raise + if not select.select([], [self.stdin], [], 0)[1]: + return 0 - if self.universal_newlines: - read = self._translate_newlines(read) - return read + try: + written = os.write(self.stdin.fileno(), inp) + except OSError, why: + if why[0] == errno.EPIPE: #broken pipe + return self._close('stdin') + raise - else: - def send(self, inp): - if not self.stdin: - return None + return written - if not select.select([], [self.stdin], [], 0)[1]: - return 0 + def _recv(self, which, maxsize): + conn, maxsize = self.get_conn_maxsize(which, maxsize) + if conn is None: + return None - try: - written = os.write(self.stdin.fileno(), inp) - except OSError, why: - if why[0] == errno.EPIPE: #broken pipe - return self._close('stdin') - raise + flags = fcntl.fcntl(conn, fcntl.F_GETFL) + if not conn.closed: + fcntl.fcntl(conn, fcntl.F_SETFL, flags | os.O_NONBLOCK) - return written + try: + if not select.select([conn], [], [], 0)[0]: + return '' - def _recv(self, which, maxsize): - conn, maxsize = self.get_conn_maxsize(which, maxsize) - if conn is None: - return None + r = conn.read(maxsize) + if not r: + return self._close(which) - flags = fcntl.fcntl(conn, fcntl.F_GETFL) + if self.universal_newlines: + r = self._translate_newlines(r) + return r + finally: if not conn.closed: - fcntl.fcntl(conn, fcntl.F_SETFL, flags | os.O_NONBLOCK) - - try: - if not select.select([conn], [], [], 0)[0]: - return '' - - r = conn.read(maxsize) - if not r: - return self._close(which) - - if self.universal_newlines: - r = self._translate_newlines(r) - return r - finally: - if not conn.closed: - fcntl.fcntl(conn, fcntl.F_SETFL, flags) + fcntl.fcntl(conn, fcntl.F_SETFL, flags) message = "Other end disconnected!" @@ -205,17 +159,4 @@ def send_all(p, data): raise Exception(message) data = buffer(data, sent) -if __name__ == '__main__': - if sys.platform == 'win32': - shell, commands, tail = ('cmd', ('dir /w', 'echo HELLO WORLD'), '\r\n') - else: - shell, commands, tail = ('sh', ('ls', 'echo HELLO WORLD'), '\n') - - a = Popen(shell, stdin=PIPE, stdout=PIPE, shell=True, executable="/bin/bash") - print recv_some(a), - for cmd in commands: - send_all(a, cmd + tail) - print recv_some(a), - send_all(a, 'exit' + tail) - print recv_some(a, e=0) - a.wait() + From 06319008447ed2b1eed942008b835e39e6300ce9 Mon Sep 17 00:00:00 2001 From: Toon Willems Date: Tue, 10 Jul 2012 14:55:57 +0200 Subject: [PATCH 049/798] add note about order of running jobs --- easybuild/test/toolkit.py | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/easybuild/test/toolkit.py b/easybuild/test/toolkit.py index 1239b88b12..4bcbe7b8e5 100644 --- a/easybuild/test/toolkit.py +++ b/easybuild/test/toolkit.py @@ -4,9 +4,9 @@ from easybuild.tools.build_log import EasyBuildError import easybuild.tools.modules as modules - - # Change the Modules class so i have complete control over its behaviour +# NOTE: this heavily relies on the correct order of running tests +# This one should be run first OrigModules = modules.Modules class MockModule(modules.Modules): @@ -91,4 +91,6 @@ def runTest(self): self.assertEqual(MockModule.modules, [(self.tk_32bit.name, self.tk_32bit.version), dep]) MockModule.modules = [] + def tearDown(self): + modules.Modules = OrigModules From 4ced5c79823b5ea7ba67514d87630b0e3296443d Mon Sep 17 00:00:00 2001 From: Toon Willems Date: Tue, 10 Jul 2012 15:19:50 +0200 Subject: [PATCH 050/798] add tests for Modules --- easybuild/test/modules.py | 20 ++++++++++++++++++++ easybuild/tools/modules.py | 16 ---------------- 2 files changed, 20 insertions(+), 16 deletions(-) create mode 100644 easybuild/test/modules.py diff --git a/easybuild/test/modules.py b/easybuild/test/modules.py new file mode 100644 index 0000000000..9551914921 --- /dev/null +++ b/easybuild/test/modules.py @@ -0,0 +1,20 @@ +import os + +from unittest import TestCase +from easybuild.tools.build_log import EasyBuildError, initLogger +import easybuild.tools.modules as modules + +class ModulesTest(TestCase): + + def runTest(self): + testmods = modules.Modules() + ms = testmods.available('', None) + if len(ms) != 0: + import random + m = random.choice(ms) + testmods.addModule([m]) + testmods.load() + + tmp = {"name": m[0], "version": m[1]} + assert(tmp in testmods.loaded_modules()) + diff --git a/easybuild/tools/modules.py b/easybuild/tools/modules.py index 52be1eee24..b3564b0624 100644 --- a/easybuild/tools/modules.py +++ b/easybuild/tools/modules.py @@ -294,19 +294,3 @@ def get_software_root(name): environmentKey = "SOFTROOT%s" % convertName(name, upper=True) return os.getenv(environmentKey) -if __name__ == '__main__': - # Run some tests, run as python -m easybuild.tools.modules - initLogger(debug=True, typ=None) - - testmods = Modules() - ms = testmods.available('', None) - ## pick one - if len(ms) == 0: - print "No modules found" - else: - import random - m = random.choice(ms) - print "selected module %s" % m - testmods.addModule([m]) - testmods.load() - From ec20e7588a67083c58f4d00b869e2bf459e77784 Mon Sep 17 00:00:00 2001 From: Toon Willems Date: Tue, 10 Jul 2012 15:49:06 +0200 Subject: [PATCH 051/798] Consolidate all tests into testsuite to run this, simply do python -m easybuild.test.suite running on a lower python version you might need to set $PYTHONPATH --- easybuild/test/asyncprocess.py | 6 +++++- easybuild/test/easyblock.py | 5 ++++- easybuild/test/modulegenerator.py | 4 +++- easybuild/test/modules.py | 6 +++++- easybuild/test/suite.py | 11 +++++++++++ easybuild/test/toolkit.py | 4 +++- 6 files changed, 31 insertions(+), 5 deletions(-) create mode 100644 easybuild/test/suite.py diff --git a/easybuild/test/asyncprocess.py b/easybuild/test/asyncprocess.py index 2288723bc0..ad4470f68c 100644 --- a/easybuild/test/asyncprocess.py +++ b/easybuild/test/asyncprocess.py @@ -1,7 +1,7 @@ import os import re -from unittest import TestCase +from unittest import TestCase, TestSuite from easybuild.tools.asyncprocess import Popen import easybuild.tools.asyncprocess as p @@ -20,3 +20,7 @@ def runTest(self): p.send_all(self.shell, "exit\n") self.assertEqual("", p.recv_some(self.shell, e=0)) self.assertRaises(Exception, p.recv_some, self.shell) + +def suite(): + return TestSuite([AsyncProcessTest()]) + diff --git a/easybuild/test/easyblock.py b/easybuild/test/easyblock.py index a938e8b769..ba5b1ea28a 100644 --- a/easybuild/test/easyblock.py +++ b/easybuild/test/easyblock.py @@ -1,7 +1,7 @@ import os import re -from unittest import TestCase +from unittest import TestCase, TestSuite from easybuild.framework.easyblock import EasyBlock from easybuild.tools.build_log import EasyBuildError from easybuild.tools.systemtools import get_shared_lib_ext @@ -207,3 +207,6 @@ def runTest(self): +def suite(): + return TestSuite([TestDependency(), TestEmpty(), TestExtraOptions(), TestMandatory(), TestSharedLibExt(), + TestSuggestions(), TestValidation()]) diff --git a/easybuild/test/modulegenerator.py b/easybuild/test/modulegenerator.py index b601a76ace..74efb5f723 100644 --- a/easybuild/test/modulegenerator.py +++ b/easybuild/test/modulegenerator.py @@ -1,7 +1,7 @@ import os import re -from unittest import TestCase +from unittest import TestCase, TestSuite from easybuild.tools.build_log import EasyBuildError from easybuild.tools.module_generator import ModuleGenerator from easybuild.framework.application import Application @@ -58,3 +58,5 @@ def runTest(self): # test setEnvironment self.assertEqual("setenv\tkey\t\tvalue\n", self.modgen.setEnvironment("key", "value")) +def suite(): + return TestSuite([ModuleGeneratorTest()]) diff --git a/easybuild/test/modules.py b/easybuild/test/modules.py index 9551914921..b5e7a9f52c 100644 --- a/easybuild/test/modules.py +++ b/easybuild/test/modules.py @@ -1,6 +1,6 @@ import os -from unittest import TestCase +from unittest import TestCase, TestSuite from easybuild.tools.build_log import EasyBuildError, initLogger import easybuild.tools.modules as modules @@ -18,3 +18,7 @@ def runTest(self): tmp = {"name": m[0], "version": m[1]} assert(tmp in testmods.loaded_modules()) +def suite(): + return TestSuite([ModulesTest()]) + + diff --git a/easybuild/test/suite.py b/easybuild/test/suite.py new file mode 100644 index 0000000000..f8abc859f9 --- /dev/null +++ b/easybuild/test/suite.py @@ -0,0 +1,11 @@ +# toolkit should be first to allow hacks to work +import easybuild.test.toolkit as t +import easybuild.test.asyncprocess as a +import easybuild.test.easyblock as e +import easybuild.test.modulegenerator as mg +import easybuild.test.modules as m + +import unittest + +suite = unittest.TestSuite(map(lambda x: x.suite(), [t,e,mg,m,a])) +unittest.TextTestRunner().run(suite) diff --git a/easybuild/test/toolkit.py b/easybuild/test/toolkit.py index 4bcbe7b8e5..0e3692311f 100644 --- a/easybuild/test/toolkit.py +++ b/easybuild/test/toolkit.py @@ -1,6 +1,6 @@ import os -from unittest import TestCase +from unittest import TestCase, TestSuite from easybuild.tools.build_log import EasyBuildError import easybuild.tools.modules as modules @@ -94,3 +94,5 @@ def runTest(self): def tearDown(self): modules.Modules = OrigModules +def suite(): + return TestSuite([ToolkitTest()]) From 65730d99680ab982d8b3b3c2ae57012bb5f932b1 Mon Sep 17 00:00:00 2001 From: Toon Willems Date: Tue, 10 Jul 2012 16:07:08 +0200 Subject: [PATCH 052/798] some small filetools tests --- easybuild/test/filetools.py | 32 ++++++++++++++++++++++++++++++++ easybuild/test/suite.py | 3 ++- easybuild/tools/filetools.py | 16 ++++++++-------- 3 files changed, 42 insertions(+), 9 deletions(-) create mode 100644 easybuild/test/filetools.py diff --git a/easybuild/test/filetools.py b/easybuild/test/filetools.py new file mode 100644 index 0000000000..945aa871dd --- /dev/null +++ b/easybuild/test/filetools.py @@ -0,0 +1,32 @@ +import os +import re + +from unittest import TestCase, TestSuite + +import easybuild.tools.filetools as ft + +class FileToolsTest(TestCase): + + def runTest(self): + cmd = ft.extractCmd("test.zip") + self.assertEqual("unzip -qq test.zip", cmd) + + cmd = ft.extractCmd("/tmp/test.tar") + self.assertEqual("tar xf /tmp/test.tar", cmd) + + cmd = ft.extractCmd("/tmp/test.tar.gz") + self.assertEqual("tar xzf /tmp/test.tar.gz", cmd) + + cmd = ft.extractCmd("/tmp/test.tgz") + self.assertEqual("tar xzf /tmp/test.tgz", cmd) + + cmd = ft.extractCmd("/tmp/test.bz2") + self.assertEqual("bunzip2 /tmp/test.bz2", cmd) + + cmd = ft.extractCmd("/tmp/test.tbz") + self.assertEqual("tar xfj /tmp/test.tbz", cmd) + cmd = ft.extractCmd("/tmp/test.tar.bz2") + self.assertEqual("tar xfj /tmp/test.tar.bz2", cmd) + +def suite(): + return TestSuite([FileToolsTest()]) diff --git a/easybuild/test/suite.py b/easybuild/test/suite.py index f8abc859f9..59469ffbf1 100644 --- a/easybuild/test/suite.py +++ b/easybuild/test/suite.py @@ -4,8 +4,9 @@ import easybuild.test.easyblock as e import easybuild.test.modulegenerator as mg import easybuild.test.modules as m +import easybuild.test.filetools as f import unittest -suite = unittest.TestSuite(map(lambda x: x.suite(), [t,e,mg,m,a])) +suite = unittest.TestSuite(map(lambda x: x.suite(), [t,e,mg,m,f,a])) unittest.TextTestRunner().run(suite) diff --git a/easybuild/tools/filetools.py b/easybuild/tools/filetools.py index 8be1baa71c..b8f2b3a698 100644 --- a/easybuild/tools/filetools.py +++ b/easybuild/tools/filetools.py @@ -76,7 +76,7 @@ def findBaseDir(): """ Try to locate a possible new base directory - this is typically a single subdir, e.g. from untarring a tarball - - when unpacking multiple tarballs in the same directory, + - when unpacking multiple tarballs in the same directory, expect only the first one to give the correct path """ def getLocalDirsPurged(): @@ -108,7 +108,7 @@ def getLocalDirsPurged(): def extractCmd(fn, overwrite=False): """ - Determines the file type of file fn, returns extract cmd + Determines the file type of file fn, returns extract cmd - based on file suffix - better to use Python magic? """ @@ -127,7 +127,7 @@ def extractCmd(fn, overwrite=False): if ff[-1] == 'bz2': ftype = 'bunzip2 %s' if ff[-2] == 'tar': - ftype = 'tar xjf %s' + ftype = 'tar xfj %s' if ff[-1] == 'tbz': ftype = 'tar xfj %s' @@ -290,7 +290,7 @@ def run_cmd(cmd, log_ok=True, log_all=False, simple=False, inp=None, regexp=True ec = p.poll() stdouterr = '' while ec < 0: - # need to read from time to time. + # need to read from time to time. # - otherwise the stdout/stderr buffer gets filled and it all stops working output = p.stdout.read(readSize) if runLog: @@ -333,7 +333,7 @@ def run_cmd(cmd, log_ok=True, log_all=False, simple=False, inp=None, regexp=True def run_cmd_qa(cmd, qa, no_qa=None, log_ok=True, log_all=False, simple=False, regexp=True, std_qa=None): """ Executes a command cmd - - looks for questions and tries to answer + - looks for questions and tries to answer - returns exitcode and stdout+stderr (mixed) - no input though stdin """ @@ -354,7 +354,7 @@ def run_cmd_qa(cmd, qa, no_qa=None, log_ok=True, log_all=False, simple=False, re # Part 1: process the QandA dictionary # given initial set of Q and A (in dict), return dict of reg. exp. and A # - # make regular expression that matches the string with + # make regular expression that matches the string with # - replace whitespace # - replace newline @@ -428,7 +428,7 @@ def processQA(q, a): hitCount = 0 while ec < 0: - # need to read from time to time. + # need to read from time to time. # - otherwise the stdout/stderr buffer gets filled and it all stops working try: tmpOut = recv_some(p) @@ -574,7 +574,7 @@ def parselogForError(txt, regExp=None, stdout=True, msg=None): txt is multiline string. - in memory regExp is a one-line regular expression - - default + - default """ global errorsFoundInLog From 4f15d239b0c7072e4f7b3a3958bb6df0c7ee1b95 Mon Sep 17 00:00:00 2001 From: Toon Willems Date: Tue, 10 Jul 2012 16:30:22 +0200 Subject: [PATCH 053/798] more filetools tests --- easybuild/test/filetools.py | 26 ++++++++++++++++++++++++++ 1 file changed, 26 insertions(+) diff --git a/easybuild/test/filetools.py b/easybuild/test/filetools.py index 945aa871dd..915000344c 100644 --- a/easybuild/test/filetools.py +++ b/easybuild/test/filetools.py @@ -28,5 +28,31 @@ def runTest(self): cmd = ft.extractCmd("/tmp/test.tar.bz2") self.assertEqual("tar xfj /tmp/test.tar.bz2", cmd) + + (out, ec) = ft.run_cmd("echo hello") + self.assertEqual(out, "hello\n") + # no reason echo hello could fail + self.assertEqual(ec, 0) + + (out, ec) = ft.run_cmd_qa("echo question", {"question":"answer"}) + self.assertEqual(out, "question\n") + # no reason echo hello could fail + self.assertEqual(ec, 0) + + self.assertEqual(True, ft.run_cmd("echo hello", simple=True)) + self.assertEqual(False, ft.run_cmd("exit 1", simple=True, log_all=False,log_ok=False)) + + name = ft.convertName("test+test-test") + self.assertEqual(name, "testplustestmintest") + name = ft.convertName("test+test-test", True) + self.assertEqual(name, "TESTPLUSTESTMINTEST") + + + errors = ft.parselogForError("error failed", True) + self.assertEqual(len(errors), 1) + + # I expect tests to be run from the base easybuild directory + self.assertEqual(os.getcwd(), ft.findBaseDir()) + def suite(): return TestSuite([FileToolsTest()]) From 4572f11ba7ec3879c716b733909e9098aa5a818d Mon Sep 17 00:00:00 2001 From: Jens Timmerman Date: Tue, 10 Jul 2012 16:38:35 +0200 Subject: [PATCH 054/798] processed remarks --- easybuild/easyconfigs/e/ECore/ecore-1.5.2.eb | 7 +++++-- easybuild/easyconfigs/e/ECore/ecore-license-var.patch | 2 +- 2 files changed, 6 insertions(+), 3 deletions(-) diff --git a/easybuild/easyconfigs/e/ECore/ecore-1.5.2.eb b/easybuild/easyconfigs/e/ECore/ecore-1.5.2.eb index 552daaf3d5..c1273e1246 100644 --- a/easybuild/easyconfigs/e/ECore/ecore-1.5.2.eb +++ b/easybuild/easyconfigs/e/ECore/ecore-1.5.2.eb @@ -1,6 +1,7 @@ +easyblock='Binary' + name='ECore' version='1.5.2' -easyblock='Binary' homepage='http://www.numericalrocks.com/index.php?option=com_content&task=blogcategory&id=25&Itemid=25' description="""The e-Core technology simulates the natural processes of sedimentary rock formation; i.e. sedimentation, compaction and diagenesis.""" @@ -10,7 +11,9 @@ toolkit={'name':'dummy','version':'dummy'} sources=['%s-%s.tgz'%(name.lower(),version)] patches=['ecore-license-var.patch'] + sanityCheckPaths = { - 'files':["ecore.sh"], + 'files':["ecore.sh",'noarch/launch.sh'] + ['arch/linux-rh5-x86_64/bin/%s' % name for name in ['ismodeller', 'ecore', 'packer', 'PorenetworkExtraction', 'Poresim', 'unpacker' ]], 'dirs':['arch', 'noarch'] } + diff --git a/easybuild/easyconfigs/e/ECore/ecore-license-var.patch b/easybuild/easyconfigs/e/ECore/ecore-license-var.patch index a0fbd8fe1a..4809811a1e 100644 --- a/easybuild/easyconfigs/e/ECore/ecore-license-var.patch +++ b/easybuild/easyconfigs/e/ECore/ecore-license-var.patch @@ -6,7 +6,7 @@ ## Edit next line if you need to move the license file -LM_LICENSE_FILE="${dirname}/license/ecore_floating.lic" +LM_LICENSE_FILE2="${dirname}/license/ecore_floating.lic" -+LM_LICENSE_FILE=${LM_LICENSE_FILE-$LM_LICENSE_FILE2} ++LM_LICENSE_FILE=${LM_LICENSE_FILE-$LM_LICENSE_FILE2} #allow users to overwrite license file path by setting LM_LICENSE_FILE export LM_LICENSE_FILE exec "${dirname}/${archstr}/bin/${exename}" "$@" From 1cd17afd6730dcb98d341fca7def864ce74cc79b Mon Sep 17 00:00:00 2001 From: Toon Willems Date: Tue, 10 Jul 2012 17:13:43 +0200 Subject: [PATCH 055/798] add repository tests --- easybuild/test/repository.py | 28 ++++++++++++++++++++++++++++ easybuild/test/suite.py | 3 ++- 2 files changed, 30 insertions(+), 1 deletion(-) create mode 100644 easybuild/test/repository.py diff --git a/easybuild/test/repository.py b/easybuild/test/repository.py new file mode 100644 index 0000000000..ddb8953d72 --- /dev/null +++ b/easybuild/test/repository.py @@ -0,0 +1,28 @@ +import os +import re +import shutil + +from unittest import TestCase, TestSuite +import easybuild.tools.config as config + +from easybuild.tools.repository import Repository + +class RepositoryTest(TestCase): + + def setUp(self): + self.path = '/tmp/tmp-easybuild-repo' + shutil.rmtree(self.path, True) + os.mkdir(self.path) + config.variables['repositoryPath'] = self.path + self.cwd = os.getcwd() + + def runTest(self): + repo = Repository() + self.assertEqual(os.path.realpath(self.path), os.getcwd()) + + def tearDown(self): + del config.variables['repositoryPath'] + os.chdir(self.cwd) + +def suite(): + return TestSuite([RepositoryTest()]) diff --git a/easybuild/test/suite.py b/easybuild/test/suite.py index 59469ffbf1..0bc3c0c5ab 100644 --- a/easybuild/test/suite.py +++ b/easybuild/test/suite.py @@ -5,8 +5,9 @@ import easybuild.test.modulegenerator as mg import easybuild.test.modules as m import easybuild.test.filetools as f +import easybuild.test.repository as r import unittest -suite = unittest.TestSuite(map(lambda x: x.suite(), [t,e,mg,m,f,a])) +suite = unittest.TestSuite(map(lambda x: x.suite(), [t,r,e,mg,m,f,a])) unittest.TextTestRunner().run(suite) From ef6b0e31a4e912afd42cd3f0d18be364bb8bd7d6 Mon Sep 17 00:00:00 2001 From: Toon Willems Date: Tue, 10 Jul 2012 17:14:52 +0200 Subject: [PATCH 056/798] cleanup repo dir --- easybuild/test/repository.py | 1 + 1 file changed, 1 insertion(+) diff --git a/easybuild/test/repository.py b/easybuild/test/repository.py index ddb8953d72..040da692e3 100644 --- a/easybuild/test/repository.py +++ b/easybuild/test/repository.py @@ -22,6 +22,7 @@ def runTest(self): def tearDown(self): del config.variables['repositoryPath'] + shutil.rmtree(self.path, True) os.chdir(self.cwd) def suite(): From 58b3686ebd7fb67b8a717d93129f90481d296eb7 Mon Sep 17 00:00:00 2001 From: Toon Willems Date: Thu, 12 Jul 2012 09:31:36 +0200 Subject: [PATCH 057/798] fix python easyblock --- easybuild/easyblocks/p/python.py | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/easybuild/easyblocks/p/python.py b/easybuild/easyblocks/p/python.py index 2a93e10651..f3105b4efc 100644 --- a/easybuild/easyblocks/p/python.py +++ b/easybuild/easyblocks/p/python.py @@ -73,7 +73,7 @@ def __init__(self, mself, pkg, pkginstalldeps): self.sitecfgincdir = None self.testinstall = False self.builddir = mself.builddir - self.cfg = mself.cfg + self.mself = mself self.installopts = '' self.runtest = None self.pkgdir = "%s/%s" % (self.builddir, self.name) @@ -176,6 +176,9 @@ def run(self): self.test() self.make_install() + def getcfg(self, *args): + return self.mself.getcfg(*args) + class Nose(DefaultPythonPackage): """nose package""" def __init__(self, mself, pkg, pkginstalldeps): @@ -219,7 +222,7 @@ class Numpy(FortranPythonPackage): def __init__(self, mself, pkg, pkginstalldeps): FortranPythonPackage.__init__(self, mself, pkg, pkginstalldeps) - self.pkgcfgs = self.getcfg('pkgcfgs') + self.pkgcfgs = mself.getcfg('pkgcfgs') if self.pkgcfgs.has_key('numpysitecfglibsubdirs'): self.numpysitecfglibsubdirs = self.pkgcfgs['numpysitecfglibsubdirs'] else: From e4938e42e7fb5a06d520d366e288c32e5af10a4f Mon Sep 17 00:00:00 2001 From: Toon Willems Date: Thu, 12 Jul 2012 10:07:01 +0200 Subject: [PATCH 058/798] installDir default changed to empty --- easybuild/easybuild_config.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/easybuild/easybuild_config.py b/easybuild/easybuild_config.py index a5dd69bfa7..134c9fcb33 100644 --- a/easybuild/easybuild_config.py +++ b/easybuild/easybuild_config.py @@ -31,7 +31,7 @@ # this should result in a MODULEPATH=($HOME/.local/easybuild|$EASYBUILDPREFIX)/install/modules/all buildDir = 'build' -installDir = 'install' +installDir = '' sourceDir = 'sources' if os.getenv('EASYBUILDPREFIX'): From c960a28e9bead14a7760455c7bdd2137a47c98f1 Mon Sep 17 00:00:00 2001 From: Jens Timmerman Date: Thu, 12 Jul 2012 14:50:31 +0200 Subject: [PATCH 059/798] added orca.eb file --- easybuild/easyconfigs/o/ORCA/ORCA.eb | 12 ++++++++++++ 1 file changed, 12 insertions(+) create mode 100644 easybuild/easyconfigs/o/ORCA/ORCA.eb diff --git a/easybuild/easyconfigs/o/ORCA/ORCA.eb b/easybuild/easyconfigs/o/ORCA/ORCA.eb new file mode 100644 index 0000000000..c426c2604b --- /dev/null +++ b/easybuild/easyconfigs/o/ORCA/ORCA.eb @@ -0,0 +1,12 @@ +easyblock="Binary" + +name="ORCA" +version='2_9_1-linux_x86-64' +#group="gcmm" + +homepage='http://www.thch.uni-bonn.de/tc/orca/' +description="ORCA is a flexible, efficient and easy-to-use general purpose tool for quantum chemistry with specific emphasis on spectroscopic properties of open-shell molecules. It features a wide variety of standard quantum chemical methods ranging from semiempirical methods to DFT to single- and multireference correlated ab initio methods. It can also treat environmental and relativistic effects." + +toolkit={'name':'goalf','version':'1.1.0'} + +sources=['%s_%s_%s.tbz' % (name.lower(), version.split('-')[0], "-".join(version.split('-')[1:]))] \ No newline at end of file From 48bde54009d92e0585d337c18649306cdcb967b7 Mon Sep 17 00:00:00 2001 From: Jens Timmerman Date: Thu, 12 Jul 2012 16:18:46 +0200 Subject: [PATCH 060/798] added initial support for ORCA + patch for pax breaking openmpi sometimes --- easybuild/easyconfigs/o/ORCA/ORCA.eb | 11 +++++++++-- .../o/OpenMPI/OpenMPI-1.4.5-GCC-4.6.3-no-OFED.eb | 4 ++++ .../easyconfigs/o/OpenMPI/OpenMPI-1.4.5-GCC-4.6.3.eb | 3 +++ easybuild/easyconfigs/o/OpenMPI/pax_disable.patch | 12 ++++++++++++ 4 files changed, 28 insertions(+), 2 deletions(-) create mode 100644 easybuild/easyconfigs/o/OpenMPI/pax_disable.patch diff --git a/easybuild/easyconfigs/o/ORCA/ORCA.eb b/easybuild/easyconfigs/o/ORCA/ORCA.eb index c426c2604b..4332c9a4df 100644 --- a/easybuild/easyconfigs/o/ORCA/ORCA.eb +++ b/easybuild/easyconfigs/o/ORCA/ORCA.eb @@ -5,8 +5,15 @@ version='2_9_1-linux_x86-64' #group="gcmm" homepage='http://www.thch.uni-bonn.de/tc/orca/' -description="ORCA is a flexible, efficient and easy-to-use general purpose tool for quantum chemistry with specific emphasis on spectroscopic properties of open-shell molecules. It features a wide variety of standard quantum chemical methods ranging from semiempirical methods to DFT to single- and multireference correlated ab initio methods. It can also treat environmental and relativistic effects." +description="""ORCA is a flexible, efficient and easy-to-use general purpose tool for quantum chemistry +with specific emphasis on spectroscopic properties of open-shell molecules. +It features a wide variety of standard quantum chemical methods ranging from semiempirical methods to DFT to single- +and multireference correlated ab initio methods. +It can also treat environmental and relativistic effects.""" -toolkit={'name':'goalf','version':'1.1.0'} +toolkit={'name':'dummy','version':'dummy'} +dependencies=[ + 'OpenMPI','1.4.5', + ] sources=['%s_%s_%s.tbz' % (name.lower(), version.split('-')[0], "-".join(version.split('-')[1:]))] \ No newline at end of file diff --git a/easybuild/easyconfigs/o/OpenMPI/OpenMPI-1.4.5-GCC-4.6.3-no-OFED.eb b/easybuild/easyconfigs/o/OpenMPI/OpenMPI-1.4.5-GCC-4.6.3-no-OFED.eb index 16a56707f9..bcb0a8c7a6 100644 --- a/easybuild/easyconfigs/o/OpenMPI/OpenMPI-1.4.5-GCC-4.6.3-no-OFED.eb +++ b/easybuild/easyconfigs/o/OpenMPI/OpenMPI-1.4.5-GCC-4.6.3-no-OFED.eb @@ -12,6 +12,10 @@ sourceURLs=['http://www.open-mpi.org/software/ompi/v%s/downloads' % '.'.join(ver configopts='--with-threads=posix --enable-shared --enable-mpi-threads' +patches=[ + 'pax_disable.patch', + ] + moduleclass='lib' sanityCheckPaths = { diff --git a/easybuild/easyconfigs/o/OpenMPI/OpenMPI-1.4.5-GCC-4.6.3.eb b/easybuild/easyconfigs/o/OpenMPI/OpenMPI-1.4.5-GCC-4.6.3.eb index eaba6718bb..c6ad2ffb56 100644 --- a/easybuild/easyconfigs/o/OpenMPI/OpenMPI-1.4.5-GCC-4.6.3.eb +++ b/easybuild/easyconfigs/o/OpenMPI/OpenMPI-1.4.5-GCC-4.6.3.eb @@ -16,6 +16,9 @@ osdependencies=[ 'dapl-devel', # required for uDAPL support 'libibumad-devel' # required for OFED support ] +patches=[ + 'pax_disable.patch', + ] moduleclass='lib' diff --git a/easybuild/easyconfigs/o/OpenMPI/pax_disable.patch b/easybuild/easyconfigs/o/OpenMPI/pax_disable.patch new file mode 100644 index 0000000000..84b473647d --- /dev/null +++ b/easybuild/easyconfigs/o/OpenMPI/pax_disable.patch @@ -0,0 +1,12 @@ +--- configure.orig 2012-07-12 15:51:28.524529044 +0200 ++++ configure 2012-07-12 15:52:12.344532593 +0200 +@@ -3879,7 +3879,7 @@ + pax) + am__tar='pax -L -x ustar -w "$$tardir"' + am__tar_='pax -L -x ustar -w "$tardir"' +- am__untar='pax -r' ++ am__untar='pax -r -O' + ;; + cpio) + am__tar='find "$$tardir" -print | cpio -o -H ustar -L' + From 9aae29946c8c7c3f07e7a0f901a9b357f8c66e82 Mon Sep 17 00:00:00 2001 From: Jens Timmerman Date: Thu, 12 Jul 2012 16:59:47 +0200 Subject: [PATCH 061/798] fixed up orca.eb file --- .../easyconfigs/o/ORCA/{ORCA.eb => ORCA-2_9_1-linux_x86-64.eb} | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) rename easybuild/easyconfigs/o/ORCA/{ORCA.eb => ORCA-2_9_1-linux_x86-64.eb} (96%) diff --git a/easybuild/easyconfigs/o/ORCA/ORCA.eb b/easybuild/easyconfigs/o/ORCA/ORCA-2_9_1-linux_x86-64.eb similarity index 96% rename from easybuild/easyconfigs/o/ORCA/ORCA.eb rename to easybuild/easyconfigs/o/ORCA/ORCA-2_9_1-linux_x86-64.eb index 4332c9a4df..734f057ebc 100644 --- a/easybuild/easyconfigs/o/ORCA/ORCA.eb +++ b/easybuild/easyconfigs/o/ORCA/ORCA-2_9_1-linux_x86-64.eb @@ -13,7 +13,7 @@ It can also treat environmental and relativistic effects.""" toolkit={'name':'dummy','version':'dummy'} dependencies=[ - 'OpenMPI','1.4.5', + ('OpenMPI','1.4.5'), ] sources=['%s_%s_%s.tbz' % (name.lower(), version.split('-')[0], "-".join(version.split('-')[1:]))] \ No newline at end of file From 78f8c9e2054496dbe84c40039f3b37446fe22d37 Mon Sep 17 00:00:00 2001 From: Jens Timmerman Date: Thu, 12 Jul 2012 17:02:37 +0200 Subject: [PATCH 062/798] add toolkit suffix to OpenMPI dependency --- easybuild/easyconfigs/o/ORCA/ORCA-2_9_1-linux_x86-64.eb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/easybuild/easyconfigs/o/ORCA/ORCA-2_9_1-linux_x86-64.eb b/easybuild/easyconfigs/o/ORCA/ORCA-2_9_1-linux_x86-64.eb index 734f057ebc..0197788ba7 100644 --- a/easybuild/easyconfigs/o/ORCA/ORCA-2_9_1-linux_x86-64.eb +++ b/easybuild/easyconfigs/o/ORCA/ORCA-2_9_1-linux_x86-64.eb @@ -13,7 +13,7 @@ It can also treat environmental and relativistic effects.""" toolkit={'name':'dummy','version':'dummy'} dependencies=[ - ('OpenMPI','1.4.5'), + ('OpenMPI','1.4.5','-GCC-4.6.3-no-OFED'), ] sources=['%s_%s_%s.tbz' % (name.lower(), version.split('-')[0], "-".join(version.split('-')[1:]))] \ No newline at end of file From 370da67abd5fc309870bfdd5d380b7e79360c2a3 Mon Sep 17 00:00:00 2001 From: Toon Willems Date: Thu, 12 Jul 2012 17:03:38 +0200 Subject: [PATCH 063/798] Some changes to tools/repository --- easybuild/build.py | 4 +- easybuild/easybuild_config.py | 3 +- easybuild/tools/config.py | 13 +- easybuild/tools/repository.py | 243 +++++++++++++--------------------- 4 files changed, 97 insertions(+), 166 deletions(-) diff --git a/easybuild/build.py b/easybuild/build.py index 726a0a1d55..73c5407c76 100644 --- a/easybuild/build.py +++ b/easybuild/build.py @@ -32,7 +32,7 @@ removeLogHandler, print_msg from easybuild.tools.class_dumper import dumpClasses from easybuild.tools.modules import Modules, searchModule -from easybuild.tools.repository import getRepository +from easybuild.tools.config import getRepository from optparse import OptionParser import easybuild.tools.config as config import easybuild.tools.filetools as filetools @@ -605,7 +605,7 @@ def build(module, options, log, origEnviron, exitOnFailure=True): except OSError, err: log.error("Failed to determine install size: %s" % err) - currentbuildstats = bool(app.getcfg('buildstats')) + currentbuildstats = app.getcfg('buildstats') buildstats = {'build_time' : buildtime, 'platform' : platform.platform(), 'core_count' : systemtools.get_core_count(), diff --git a/easybuild/easybuild_config.py b/easybuild/easybuild_config.py index b2f584987a..bd0a62f7ed 100644 --- a/easybuild/easybuild_config.py +++ b/easybuild/easybuild_config.py @@ -22,6 +22,7 @@ from easybuild.tools.build_log import getLog import easybuild.tools.config as config +from easybuild.tools.repository import GitRepository log = getLog('easybuild_config') @@ -55,8 +56,8 @@ ## 'svn' " svn repository ## repositoryPath = ("svn+ssh://user@server/path/to/repo/path/inside/repo") ## this requires pysvn -repositoryType = 'fs' repositoryPath = (os.path.join(prefix, 'easybuild_ebfiles_repo')) +repository = GitRepository("/Users/nudded/test/") # log format: (dir, filename template) # supported in template: name, version, data, time diff --git a/easybuild/tools/config.py b/easybuild/tools/config.py index ba49588d21..6207116c3b 100644 --- a/easybuild/tools/config.py +++ b/easybuild/tools/config.py @@ -28,7 +28,7 @@ log = getLog('config') variables = {} -requiredVariables = ['buildPath', 'installPath', 'sourcePath', 'logFormat', 'repositoryType', 'repositoryPath'] +requiredVariables = ['buildPath', 'installPath', 'sourcePath', 'logFormat', 'repository', 'repositoryPath'] environmentVariables = { 'buildPath': 'EASYBUILDBUILDPATH', 'installPath': 'EASYBUILDINSTALLPATH' @@ -72,11 +72,6 @@ def create_dir(dirtype, dirname): create_dir(key, d) continue - if variables['repositoryType'] == 'fs' and not os.path.isdir(variables['repositoryPath']): - strs = ('repositoryPath', variables['repositoryPath']) - log.warn('The %s directory %s does not exist or does not have proper permissions' % strs) - create_dir('repositoryPath', variables['repositoryPath']) - # update MODULEPATH if required ebmodpath = os.path.join(installPath(typ='mod'), 'all') modulepath = os.getenv('MODULEPATH') @@ -102,7 +97,7 @@ def readConfiguration(filename): def readEnvironment(envVars, strict=False): """ Read variables from the environment - - strict=True enforces that all possible environment variables are found + - strict=True enforces that all possible environment variables are found """ result = {} for key in envVars.keys(): @@ -139,11 +134,11 @@ def installPath(typ=None): return os.path.join(variables['installPath'], suffix) -def repositoryType(): +def getRepository(): """ Return the repository type (e.g. fs, git, svn) """ - return variables['repositoryType'] + return variables['repository'] def repositoryPath(): """ diff --git a/easybuild/tools/repository.py b/easybuild/tools/repository.py index 51bf4187e2..b4e08c6863 100644 --- a/easybuild/tools/repository.py +++ b/easybuild/tools/repository.py @@ -33,34 +33,27 @@ import easybuild from easybuild.tools.build_log import getLog, EasyBuildError -from easybuild.tools.config import repositoryPath, repositoryType -# try and load git (GitPython), OK if it fails if we don't use it + +log = getLog('repo') try: import git from git import GitCommandError except ImportError: pass -# try and load pysvn, OK if it fails if we don't use it -try: - import pysvn - from pysvn import ClientError #IGNORE:E0611 pysvn fails to recognize ClientError is available -except ImportError: - pass - - -log = getLog('repo') class Repository: """ - Class representing an file system repository. + Interface for repositories """ - def __init__(self): - log.debug("creating repository") - self.repo = None - self.wc = "" - - self.client = None - + def __init__(self, repo_path, subdir=''): + """ + Initialize a repository. self.repo and self.subdir will be set. + self.wc will be set to None. + Then, setupRepo and createWorkingCopy will be called (in that order) + """ + self.subdir = subdir + self.repo = repo_path + self.wc = None self.setupRepo() self.createWorkingCopy() @@ -69,56 +62,24 @@ def __del__(self): def setupRepo(self): """ - Set up file system repository. + Set up repository. """ - log.debug("setting up repository") - self.repo = self.wc = repositoryPath() + pass def createWorkingCopy(self): """ Create working copy. """ - os.chdir(self.repo) + pass - def addEasyconfig(self, cfg, name, version, stats, appendstats): + def addEasyconfig(self, cfg, name, version, stats, previous): """ Add easyconfig to repository. + cfg is the filename of the eb file Stats contains some build stats, this should be a list of dictionaries. - appendstats is a boolean indicating if we should append to existing stats or not. + previous is the list of previous buildstats """ - if not name.startswith(self.wc): - name = os.path.join(self.wc, name) - if not os.path.isdir(name): - os.makedirs(name) - - ## destination - dest = os.path.join(self.wc, name, "%s.eb" % (version)) - - ## check if it's new/different from what's in svn - #nope, always commit - #if os.path.exists(dest) and self.checkIdent(cfg, dest): - # log.info("Dest file %s already exist but is identical to what is in the repository." % dest) - # return None - - try: - ## copy file - oldf = open(cfg) - oldcontent = oldf.read() - oldf.close() - dest_file = open(dest, 'w') - dest_file.write("# Built with %s on %s\n" % (easybuild.VERBOSE_VERSION, time.strftime("%Y-%m-%d_%H-%M-%S"))) - dest_file.write(oldcontent) - if appendstats: - statstemplate = "buildstats.append(%s)\n" - else: - statstemplate = "\n#Build statistics\nbuildstats=[%s]\n" - - dest_file.write(statstemplate % stats) - dest_file.close() - - except IOError, err: - log.exception("Copying file %s to %s (wc: %s) failed (%s)" % (cfg, dest, self.wc, err)) - return dest + pass def commit(self, msg=None): """ @@ -129,89 +90,91 @@ def commit(self, msg=None): # does nothing by default pass - def removeStartingComments(self, text): + def cleanup(self): """ - removes the first lines from a given text, - if the line starts with a '#' + Clean up working copy. """ - lines = text.splitlines(True) - i = 0 - for line in lines: - if not line.startswith('#'): - break - else: - i = i + 1 - return "\n".join(lines[i:]) + pass + +class FileRepository(Repository): - def checkIdent(self, src, dest): + def setupRepo(self): """ - Compare the content of 2 files. - - return True is they are identical - - assume wc is up-to-date (local == remote) + for file based repos this will create the repo directory + if it doesn't exist. + + if a subdir is specified also create the subdir """ - srctxt = file(src).read() - local = file(dest).read() + if not os.path.isdir(self.repo): + os.makedirs(self.repo) - srctxt = self.removeStartingComments(srctxt) - local = self.removeStartingComments(local) + full_path = os.path.join(self.repo, self.subdir) + if not os.path.isdir(full_path): + os.makedirs(full_path) - if local == srctxt: - log.debug("Identical content found for %s (%s) and %s (%s)" % (src, srctxt, dest, local)) - return True - else: - log.debug("Different content found for %s (%s) and %s (%s)" % (src, srctxt, dest, local)) - return False + def createWorkingCopy(self): + # for sake of convenience + self.wc = self.repo - def cleanup(self): - """ - Clean up working copy. - """ - return + def addEasyconfig(self, cfg, name, version, stats, previous): + # create directory for eb file + full_path = os.path.join(self.wc, self.subdir, name) + if not os.path.isdir(full_path): + os.makedirs(full_path) + # create array for previous if they are not given + if not previous: + previous = [] -class GitRepository(Repository): + ## destination + dest = os.path.join(full_path, "%s.eb" % (version)) + + try: + dest_file = open(dest, 'w') + dest_file.write("# Built with %s on %s\n" % (easybuild.VERBOSE_VERSION, time.strftime("%Y-%m-%d_%H-%M-%S"))) + + # copy file + for line in open(cfg): + dest_file.write(line) + + statstemplate = "\n#Build statistics\nbuildstats=%s\n" + previous.append(stats) + dest_file.write(statstemplate % previous) + + dest_file.close() + + except IOError, err: + log.exception("Copying file %s to %s (wc: %s) failed (%s)" % (cfg, dest, self.wc, err)) + + return dest + + +class GitRepository(FileRepository): """ Class representing a git repository. """ - - def __init__(self): - self.path = None - Repository.__init__(self) - - try: - import git - except ImportError: - log.exception("Failed to load GitPython. Make sure it is installed " - "properly. Run 'python -c \"import git\"' to test.") + def __init__(self, *args): + self.client = None + FileRepository.__init__(self, *args) def setupRepo(self): """ Set up git repository. """ - Repository.setupRepo(self) - log.debug("setting up git repository") - self.repo = self.wc[0] - self.path = self.wc[1] - self.wc = self.repo - log.debug("repository %s configured with path %s" % (self.repo, self.path)) + self.wc = tempfile.mkdtemp(prefix='git-wc-') def createWorkingCopy(self): """ Create git working copy. """ - # GitPython version 0.1.x (identified as 'git') has no init method, but uses create instead - # TODO make a config option to add a directory to a local wc somewhere, so we don't need to - # create a local wc every time. - self.wc = tempfile.mkdtemp(prefix='git-wc-') - ## try to get a copy of try: client = git.Git(self.wc) out = client.clone(self.repo) # out = 'Cloning into easybuild...' - reponame = out.split()[-1].strip(".").strip("'") + reponame = out.split("\n")[0].split()[-1].strip(".").strip("'") log.debug("rep name is %s" % reponame) - except GitCommandError, err: + except git.GitCommandError, err: # it might already have existed log.warning("Git local repo initialization failed, it might already exist: %s" % err) @@ -220,30 +183,23 @@ def createWorkingCopy(self): self.wc = os.path.join(self.wc, reponame) log.debug("connectiong to git repo in %s" % self.wc) self.client = git.Git(self.wc) - except GitCommandError, err: + except git.GitCommandError, err: log.error("Could not create a local git repo in wc %s: %s" % (self.wc, err)) - # try to get the remote data in the local repo try: res = self.client.pull() log.debug("pulled succesfully to %s in %s" % (res, self.wc)) - except GitCommandError, err: + except git.GitCommandError, err: log.exception("pull in working copy %s went wrong: %s" % (self.wc, err)) def addEasyconfig(self, cfg, name, version, stats, append): """ Add easyconfig to git repository. """ - log.debug("Adding cfg: %s with name %s" % (cfg, name)) - log.debug("Adding cfg: in %s on path %s" % (self.wc, self.path)) - if name.startswith(self.wc): - name = name.replace(self.wc, "", 1) #remove self.wc again - name = os.path.join(self.wc, self.path, name) #create proper name, with path inside repo in it - dest = Repository.addEasyconfig(self, cfg, name, version, stats, append) + dest = FileRepository.addEasyconfig(self, cfg, name, version, stats, append) ## add it to version control if dest: try: - #log.debug("Going to add %s (wc: %s, cwd %s)"%(dest, self.wc, os.getcwd())) self.client.add(dest) except GitCommandError, err: log.warning("adding %s to git failed: %s" % (dest, err)) @@ -276,22 +232,25 @@ def cleanup(self): log.exception("Can't remove working copy %s: %s" % (self.wc, err)) -class SvnRepository(Repository): +class SvnRepository(FileRepository): """ class representing an svn repository """ - def __init__(self): - Repository.__init__(self) - - if not 'pysvn' in sys.modules or not locals()['pysvn'] == sys.modules['pysvn']: - log.exception("Failed to load pysvn. Make sure it is installed " - "properly. Run 'python -c \"import pysvn\"' to test.") + def __init__(self, *args): + self.client = None + FileRepository.__init__(self, *args) def setupRepo(self): """ Set up SVN repository. """ - Repository.setupRepo(self) + self.repo = os.path.join(self.repo, self.subdir) + try: + import pysvn + from pysvn import ClientError #IGNORE:E0611 pysvn fails to recognize ClientError is available + except ImportError: + log.exception("Failed to load pysvn. Make sure it is installed " + "properly. Run 'python -c \"import pysvn\"' to test.") ## try to connect to the repository log.debug("Try to connect to repository %s" % self.repo) @@ -348,8 +307,6 @@ def addEasyconfig(self, cfg, name, version, stats, append): """ Add easyconfig to SVN repository. """ - if not os.path.isdir(name): - self.client.mkdir(name, "Creating path %s" % name) dest = Repository.addEasyconfig(self, cfg, name, version, stats, append) log.debug("destination = %s" % dest) if dest: @@ -379,25 +336,3 @@ def cleanup(self): except OSError, err: log.exception("Can't remove working copy %s: %s" % (self.wc, err)) - -def getRepository(): - """ - Factory method, returning a repository depending on the configuration file - """ - typ = repositoryType() - if typ == 'fs': - return Repository() - elif typ == 'git': - return GitRepository() - elif typ == 'svn': - return SvnRepository() - else: - log.error("invalid repositoryType detected, check config file") - return None - - -if __name__ == "__main__": - try: - s = getRepository() - except EasyBuildError, e: - print "Initialization failed: %s" % e From 85579a3da865cb750f64cc0f29c3ccc63d8534e7 Mon Sep 17 00:00:00 2001 From: Jens Timmerman Date: Thu, 12 Jul 2012 17:44:30 +0200 Subject: [PATCH 064/798] fixed sanity check for orca --- easybuild/easyblocks/b/binary.py | 2 +- .../o/ORCA/ORCA-2_9_1-linux_x86-64.eb | 20 ++++++++++++++++++- 2 files changed, 20 insertions(+), 2 deletions(-) diff --git a/easybuild/easyblocks/b/binary.py b/easybuild/easyblocks/b/binary.py index b117e752d1..392dcd215f 100644 --- a/easybuild/easyblocks/b/binary.py +++ b/easybuild/easyblocks/b/binary.py @@ -40,7 +40,7 @@ def make_installdir(self): def make_install(self): """Copy the unpacked source to the install directory""" - shutil.copytree(os.path.join(self.builddir, '%s-%s' % (self.name().lower(), self.version())), self.installdir, symlinks=True) + shutil.copytree(self.getcfg('startfrom'), self.installdir, symlinks=True) def make_module_extra(self): """ diff --git a/easybuild/easyconfigs/o/ORCA/ORCA-2_9_1-linux_x86-64.eb b/easybuild/easyconfigs/o/ORCA/ORCA-2_9_1-linux_x86-64.eb index 0197788ba7..f7cf8a5bf8 100644 --- a/easybuild/easyconfigs/o/ORCA/ORCA-2_9_1-linux_x86-64.eb +++ b/easybuild/easyconfigs/o/ORCA/ORCA-2_9_1-linux_x86-64.eb @@ -16,4 +16,22 @@ dependencies=[ ('OpenMPI','1.4.5','-GCC-4.6.3-no-OFED'), ] -sources=['%s_%s_%s.tbz' % (name.lower(), version.split('-')[0], "-".join(version.split('-')[1:]))] \ No newline at end of file +sources=['%s_%s_%s.tbz' % (name.lower(), version.split('-')[0], "-".join(version.split('-')[1:]))] + +sanityCheckPaths = { + 'files':['orca', 'orca_2mkl', 'orca_anoint', + 'orca_anoint_mpi', 'orca_asa', 'orca_casscf', + 'orca_casscf_mpi', 'orca_chelpg', 'orca_ciprep', + 'orca_cis', 'orca_cis_mpi', 'orca_cleanup', 'orca_cleanup_mpi', + 'orca_cpscf', 'orca_cpscf_mpi', 'orca_eca', 'orca_ecplib', + 'orca_eprnmr', 'orca_eprnmr_mpi', 'orca_euler', 'orca_fci', + 'orca_fitpes', 'orca_gstep', 'orca_gtoint', 'orca_gtoint_mpi', + 'orca_loc', 'orca_mapspc', 'orca_md', 'orca_mdci', 'orca_mdci_mpi', + 'orca_mergefrag', 'orca_mp2', 'orca_mp2_mpi', 'orca_mrci', + 'orca_mrci_mpi', 'orca_ndoint', 'orca_numfreq', 'orca_pc', + 'orca_pc_mpi', 'orca_plot', 'orca_pltvib', 'orca_pop', + 'orca_rel', 'orca_rocis', 'orca_rocis_mpi', 'orca_scf', + 'orca_scfgrad', 'orca_scfgrad_mpi', 'orca_scf_mpi', 'orca_soc', + 'orca_soc_mpi', 'orca_vib', 'orca_vpot', 'otool_cosmo'], + 'dirs':[""] + } \ No newline at end of file From 0d5a09612869d4c134f162d640c9c2d82ffb5169 Mon Sep 17 00:00:00 2001 From: Toon Willems Date: Fri, 13 Jul 2012 10:09:14 +0200 Subject: [PATCH 065/798] debug statements --- easybuild/easybuild_config.py | 6 +++--- easybuild/tools/repository.py | 24 +++++++++++++++++++----- 2 files changed, 22 insertions(+), 8 deletions(-) diff --git a/easybuild/easybuild_config.py b/easybuild/easybuild_config.py index bd0a62f7ed..abcd59ee33 100644 --- a/easybuild/easybuild_config.py +++ b/easybuild/easybuild_config.py @@ -22,7 +22,7 @@ from easybuild.tools.build_log import getLog import easybuild.tools.config as config -from easybuild.tools.repository import GitRepository +from easybuild.tools.repository import FileRepository log = getLog('easybuild_config') @@ -57,11 +57,11 @@ ## repositoryPath = ("svn+ssh://user@server/path/to/repo/path/inside/repo") ## this requires pysvn repositoryPath = (os.path.join(prefix, 'easybuild_ebfiles_repo')) -repository = GitRepository("/Users/nudded/test/") +repository = FileRepository("/Users/nudded/repo/") # log format: (dir, filename template) # supported in template: name, version, data, time logFormat = ("easybuildlog", "easybuild-%(name)s-%(version)s-%(date)s.%(time)s.log") # general cleanliness -del os, getLog, config, log, prefix, buildDir, installDir, sourceDir +# del os, getLog, config, log, prefix, buildDir, installDir, sourceDir diff --git a/easybuild/tools/repository.py b/easybuild/tools/repository.py index b4e08c6863..572e2a40ac 100644 --- a/easybuild/tools/repository.py +++ b/easybuild/tools/repository.py @@ -41,6 +41,12 @@ except ImportError: pass +try: + import pysvn + from pysvn import ClientError #IGNORE:E0611 pysvn fails to recognize ClientError is available +except ImportError: + pass + class Repository: """ Interface for repositories @@ -57,9 +63,6 @@ def __init__(self, repo_path, subdir=''): self.setupRepo() self.createWorkingCopy() - def __del__(self): - self.cleanup() - def setupRepo(self): """ Set up repository. @@ -94,7 +97,7 @@ def cleanup(self): """ Clean up working copy. """ - pass + return class FileRepository(Repository): @@ -148,6 +151,9 @@ def addEasyconfig(self, cfg, name, version, stats, previous): return dest + def __del__(self): + print os.path.islink + class GitRepository(FileRepository): """ @@ -161,6 +167,11 @@ def setupRepo(self): """ Set up git repository. """ + try: + import git + from git import GitCommandError + except ImportError: + log.exception("GitPython failed to load") self.wc = tempfile.mkdtemp(prefix='git-wc-') def createWorkingCopy(self): @@ -222,11 +233,14 @@ def commit(self, msg=None): except GitCommandError, err: log.warning("Push from working copy %s to remote %s (msg: %s) failed: %s" % (self.wc, self.repo, msg, err)) - def cleanup(self): + def __del__(self): """ Clean up git working copy. """ try: + print sys.path + print os.path + print os.path.islink shutil.rmtree(self.wc) except IOError, err: log.exception("Can't remove working copy %s: %s" % (self.wc, err)) From 95667ae95c06b3f65286701631c87eba9f3dbc94 Mon Sep 17 00:00:00 2001 From: Toon Willems Date: Fri, 13 Jul 2012 10:35:34 +0200 Subject: [PATCH 066/798] explicit cleanup, remove debugging --- easybuild/build.py | 1 + easybuild/easybuild_config.py | 2 +- easybuild/tools/repository.py | 8 +------- 3 files changed, 3 insertions(+), 8 deletions(-) diff --git a/easybuild/build.py b/easybuild/build.py index 73c5407c76..e6c6aacf38 100644 --- a/easybuild/build.py +++ b/easybuild/build.py @@ -224,6 +224,7 @@ def main(): print_msg("Build succeeded for %s out of %s" % (correct_built_cnt, all_built_cnt), log) + getRepository().cleanup() ## Cleanup tmp log file (all is well, all modules have their own log file) try: removeLogHandler(hn) diff --git a/easybuild/easybuild_config.py b/easybuild/easybuild_config.py index abcd59ee33..07fd92ae4a 100644 --- a/easybuild/easybuild_config.py +++ b/easybuild/easybuild_config.py @@ -57,7 +57,7 @@ ## repositoryPath = ("svn+ssh://user@server/path/to/repo/path/inside/repo") ## this requires pysvn repositoryPath = (os.path.join(prefix, 'easybuild_ebfiles_repo')) -repository = FileRepository("/Users/nudded/repo/") +repository = FileRepository(repositoryPath) # log format: (dir, filename template) # supported in template: name, version, data, time diff --git a/easybuild/tools/repository.py b/easybuild/tools/repository.py index 572e2a40ac..bc5f1faf79 100644 --- a/easybuild/tools/repository.py +++ b/easybuild/tools/repository.py @@ -151,9 +151,6 @@ def addEasyconfig(self, cfg, name, version, stats, previous): return dest - def __del__(self): - print os.path.islink - class GitRepository(FileRepository): """ @@ -233,14 +230,11 @@ def commit(self, msg=None): except GitCommandError, err: log.warning("Push from working copy %s to remote %s (msg: %s) failed: %s" % (self.wc, self.repo, msg, err)) - def __del__(self): + def cleanup(self): """ Clean up git working copy. """ try: - print sys.path - print os.path - print os.path.islink shutil.rmtree(self.wc) except IOError, err: log.exception("Can't remove working copy %s: %s" % (self.wc, err)) From 40204f8188efd2960661035c61bcfa5c0a8f5ec0 Mon Sep 17 00:00:00 2001 From: Toon Willems Date: Fri, 13 Jul 2012 12:23:53 +0200 Subject: [PATCH 067/798] update documentation in config --- easybuild/easybuild_config.py | 14 +++++++++----- 1 file changed, 9 insertions(+), 5 deletions(-) diff --git a/easybuild/easybuild_config.py b/easybuild/easybuild_config.py index 07fd92ae4a..1a1e4b46d5 100644 --- a/easybuild/easybuild_config.py +++ b/easybuild/easybuild_config.py @@ -22,7 +22,7 @@ from easybuild.tools.build_log import getLog import easybuild.tools.config as config -from easybuild.tools.repository import FileRepository +from easybuild.tools.repository import SvnRepository, GitRepository, FileRepository log = getLog('easybuild_config') @@ -48,15 +48,19 @@ # repository for eb files ## possible repository types are: ## 'fs' : plain filesystem -## repositoryPath = ("path/to/directory") +## repositoryPath = "path/to/directory" +## repository = FileRepository(repositoryPath) ## 'git' : bare git repository (created git clone --bare or git init --bare (but make sure to have at least ## one push to it once, we can't handle empty git repos) -## repositoryPath = ("ssh://user@server/path/to/repo.git","path/inside/repo") #not starting with '/' ! +## repositoryPath = "ssh://user@server/path/to/repo.git" #not starting with '/' ! +## repository = GitRepository(repositoryPath, subdir='path/in/repo' ) ## this requires GitPython ## 'svn' " svn repository -## repositoryPath = ("svn+ssh://user@server/path/to/repo/path/inside/repo") +## repositoryPath = "svn+ssh://user@server/path/to/repo" +## subdir = "/path/inside/repo" +## repository = SvnRepository(repositoryPath) ## this requires pysvn -repositoryPath = (os.path.join(prefix, 'easybuild_ebfiles_repo')) +repositoryPath = os.path.join(prefix, 'easybuild_ebfiles_repo') repository = FileRepository(repositoryPath) # log format: (dir, filename template) From 8436d279aea57afb2ce7244376d4abc4b6b24241 Mon Sep 17 00:00:00 2001 From: Toon Willems Date: Fri, 13 Jul 2012 12:24:08 +0200 Subject: [PATCH 068/798] call FileRepository instead of Repository --- easybuild/tools/repository.py | 9 ++------- 1 file changed, 2 insertions(+), 7 deletions(-) diff --git a/easybuild/tools/repository.py b/easybuild/tools/repository.py index bc5f1faf79..32b2b20c0d 100644 --- a/easybuild/tools/repository.py +++ b/easybuild/tools/repository.py @@ -280,12 +280,6 @@ def createWorkingCopy(self): """ self.wc = tempfile.mkdtemp(prefix='svn-wc-') - # Update wc (or part of it) - try: - os.chdir(self.wc) - except OSError, err: - log.exception("Couldn't chdir to wc %s: %s" % (self.wc, err)) - ## check if tmppath exists ## this will trigger an error if it does not exist try: @@ -315,7 +309,7 @@ def addEasyconfig(self, cfg, name, version, stats, append): """ Add easyconfig to SVN repository. """ - dest = Repository.addEasyconfig(self, cfg, name, version, stats, append) + dest = FileRepository.addEasyconfig(self, cfg, name, version, stats, append) log.debug("destination = %s" % dest) if dest: log.debug("destination status: %s" % self.client.status(dest)) @@ -325,6 +319,7 @@ def addEasyconfig(self, cfg, name, version, stats, append): log.debug("Going to add %s (working copy: %s, cwd %s)" % (dest, self.wc, os.getcwd())) self.client.add(dest) + def commit(self, msg=None): """ Commit working copy to SVN repository From df6863f19a164699c1629674f4e17ef2bc3f03b6 Mon Sep 17 00:00:00 2001 From: Toon Willems Date: Fri, 13 Jul 2012 12:26:20 +0200 Subject: [PATCH 069/798] keep del line --- easybuild/easybuild_config.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/easybuild/easybuild_config.py b/easybuild/easybuild_config.py index 1a1e4b46d5..b41a8f975e 100644 --- a/easybuild/easybuild_config.py +++ b/easybuild/easybuild_config.py @@ -68,4 +68,4 @@ logFormat = ("easybuildlog", "easybuild-%(name)s-%(version)s-%(date)s.%(time)s.log") # general cleanliness -# del os, getLog, config, log, prefix, buildDir, installDir, sourceDir +del os, getLog, config, log, prefix, buildDir, installDir, sourceDir From af1960c226e76e6b8858eaa938530efbb37ca268 Mon Sep 17 00:00:00 2001 From: Toon Willems Date: Fri, 13 Jul 2012 13:52:11 +0200 Subject: [PATCH 070/798] append instead of rewrite --- easybuild/tools/repository.py | 13 ++++++------- 1 file changed, 6 insertions(+), 7 deletions(-) diff --git a/easybuild/tools/repository.py b/easybuild/tools/repository.py index 32b2b20c0d..c4872dfa52 100644 --- a/easybuild/tools/repository.py +++ b/easybuild/tools/repository.py @@ -125,10 +125,6 @@ def addEasyconfig(self, cfg, name, version, stats, previous): if not os.path.isdir(full_path): os.makedirs(full_path) - # create array for previous if they are not given - if not previous: - previous = [] - ## destination dest = os.path.join(full_path, "%s.eb" % (version)) @@ -140,10 +136,13 @@ def addEasyconfig(self, cfg, name, version, stats, previous): for line in open(cfg): dest_file.write(line) - statstemplate = "\n#Build statistics\nbuildstats=%s\n" - previous.append(stats) - dest_file.write(statstemplate % previous) + # append a line to the eb file so we don't have git merge conflicts + if not previous: + statstemplate = "\n#Build statistics\nbuildstats=[%s]t\n" + else: + statstemplate = "\nbuildstats.append(%s)\n" + dest_file.write(statstemplate % stats) dest_file.close() except IOError, err: From e0be0c917c39530de7e8928e35bfb620c7ecdf4c Mon Sep 17 00:00:00 2001 From: Toon Willems Date: Fri, 13 Jul 2012 13:53:00 +0200 Subject: [PATCH 071/798] update config documentation --- easybuild/tools/config.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/easybuild/tools/config.py b/easybuild/tools/config.py index 6207116c3b..f1c2049de1 100644 --- a/easybuild/tools/config.py +++ b/easybuild/tools/config.py @@ -136,7 +136,7 @@ def installPath(typ=None): def getRepository(): """ - Return the repository type (e.g. fs, git, svn) + Return the repository (git, svn or file) """ return variables['repository'] From bb6159c4c12f7a7bc4f1fb31549cbbf7a5c3f6ab Mon Sep 17 00:00:00 2001 From: Toon Willems Date: Fri, 13 Jul 2012 14:03:07 +0200 Subject: [PATCH 072/798] silly me, forgetting docstrings --- easybuild/tools/repository.py | 14 ++++++++++++++ 1 file changed, 14 insertions(+) diff --git a/easybuild/tools/repository.py b/easybuild/tools/repository.py index c4872dfa52..9a557a0185 100644 --- a/easybuild/tools/repository.py +++ b/easybuild/tools/repository.py @@ -116,10 +116,17 @@ def setupRepo(self): os.makedirs(full_path) def createWorkingCopy(self): + """ set the working directory to the repo directory """ # for sake of convenience self.wc = self.repo def addEasyconfig(self, cfg, name, version, stats, previous): + """ + Add the eb-file for for package name and version to the repository. + stats should be a dict containing stats. + if previous is true -> append the stats to the file + This will return the path to the created file (for use in subclasses) + """ # create directory for eb file full_path = os.path.join(self.wc, self.subdir, name) if not os.path.isdir(full_path): @@ -156,6 +163,10 @@ class GitRepository(FileRepository): Class representing a git repository. """ def __init__(self, *args): + """ + Initialize git client to None (will be set later) + All the real logic is in the setupRepo and createWorkingCopy methods + """ self.client = None FileRepository.__init__(self, *args) @@ -244,6 +255,9 @@ class SvnRepository(FileRepository): class representing an svn repository """ def __init__(self, *args): + """ + Set self.client to None. Real logic is in setupRepo and createWorkingCopy + """ self.client = None FileRepository.__init__(self, *args) From 53a5215288d9c7ffbd4d1e7e2482c70695de67c9 Mon Sep 17 00:00:00 2001 From: Toon Willems Date: Fri, 13 Jul 2012 14:52:12 +0200 Subject: [PATCH 073/798] Add os deps check for dpkg systems --- easybuild/framework/application.py | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/easybuild/framework/application.py b/easybuild/framework/application.py index f0d4e316c4..a36ecd01e8 100644 --- a/easybuild/framework/application.py +++ b/easybuild/framework/application.py @@ -499,7 +499,14 @@ def check_osdeps(self, osdeps): # - using rpm -q for now --> can be run as non-root!! # - should be extended to files later? for d in check: - cmd = "rpm -q %s" % d + if run_cmd('which rpm', simple=True): + cmd = "rpm -q %s" % d + elif run_cmd('which dpkg', simple=True): + cmd = "dpkg -s %s" % d + else: + # fallback for when os-Dependency is a binary + cmd = "which %s" % d + (rpmout, ec) = run_cmd(cmd, simple=False, log_all=False, log_ok=False) if ec == 0: self.log.debug("Found osdep %s" % d) From 9a90f373803c15c5226c4af2f9d9574d2f46bc1e Mon Sep 17 00:00:00 2001 From: Toon Willems Date: Fri, 13 Jul 2012 14:58:37 +0200 Subject: [PATCH 074/798] update comments --- easybuild/framework/application.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/easybuild/framework/application.py b/easybuild/framework/application.py index a36ecd01e8..e1031cb8b2 100644 --- a/easybuild/framework/application.py +++ b/easybuild/framework/application.py @@ -496,7 +496,8 @@ def check_osdeps(self, osdeps): check = [check] # find at least one element of check - # - using rpm -q for now --> can be run as non-root!! + # - using rpm -q and dpkg -s --> can be run as non-root!! + # - fallback on which # - should be extended to files later? for d in check: if run_cmd('which rpm', simple=True): From 29e98db1668942ae5cf33b74519db0fcf76355fe Mon Sep 17 00:00:00 2001 From: Toon Willems Date: Tue, 24 Jul 2012 08:58:46 +0200 Subject: [PATCH 075/798] load module before running sanitycheck command --- easybuild/framework/application.py | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/easybuild/framework/application.py b/easybuild/framework/application.py index 9eaee82ca9..a6937b38e0 100644 --- a/easybuild/framework/application.py +++ b/easybuild/framework/application.py @@ -998,9 +998,10 @@ def sanitycheck(self): # run sanity check command command = self.getcfg('sanityCheckCommand') if command: - # TODO: when issue 312 gets resolved and merged, place check in verify_config so that - # the sanityCheckCommand is not an absolute path - command = os.path.join(self.installdir, command) + # load the module before running the command + m = Modules() + m.addModule([[self.name(), self.installversion]]) + m.load() # chdir to installdir otherwise os.getcwd() will fail os.chdir(self.installdir) out, ec = run_cmd(command, simple=False) From 0cee8cb5b23a5aa2def44d709daeb67a554d3f1c Mon Sep 17 00:00:00 2001 From: Toon Willems Date: Tue, 24 Jul 2012 09:21:15 +0200 Subject: [PATCH 076/798] use tuple for specifying command --- easybuild/framework/application.py | 18 +++++++++++++++--- 1 file changed, 15 insertions(+), 3 deletions(-) diff --git a/easybuild/framework/application.py b/easybuild/framework/application.py index a6937b38e0..79c7b181f2 100644 --- a/easybuild/framework/application.py +++ b/easybuild/framework/application.py @@ -148,7 +148,7 @@ def __init__(self, name=None, version=None, newBuild=True, debug=False): 'patches': [[], "List of patches to apply"], 'tests': [[], "List of test-scripts to run after install. A test script should return a non-zero exit status to fail"], 'sanityCheckPaths': [{}, "List of files and directories to check (format: {'files':, 'dirs':}, default: {})"], - 'sanityCheckCommand': ['', "Single command that will be run after install (e.g. -h)"], + 'sanityCheckCommand': [None, "Single command that will be run after install (e.g. -h)"], 'buildstats' : [None, "A list of dicts with buildstats: build_time, platform, core_count, cpu_model, install_size, timestamp"], } @@ -1002,9 +1002,21 @@ def sanitycheck(self): m = Modules() m.addModule([[self.name(), self.installversion]]) m.load() - # chdir to installdir otherwise os.getcwd() will fail + + # Build substition dictionary + check_cmd = { 'name': self.name(), 'options': '-h' } + + if command[0] != None: + check_cmd['name'] = command[0] + + if command[1] != None: + check_cmd['options'] = command[1] + + cmd = "%(name)s %(options)s" % check_cmd + + # chdir to installdir otherwise os.getcwd() in run_cmd will fail os.chdir(self.installdir) - out, ec = run_cmd(command, simple=False) + out, ec = run_cmd(cmd, simple=False) if ec != 0: self.sanityCheckOK = False self.log.debug("sanityCheckCommand exited with code %s (output: %s)" % (ec, out)) From bb9064f85fe23c11cafdab169df67fdd8008fd54 Mon Sep 17 00:00:00 2001 From: Toon Willems Date: Tue, 24 Jul 2012 09:23:59 +0200 Subject: [PATCH 077/798] use lowercase command name --- easybuild/framework/application.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/easybuild/framework/application.py b/easybuild/framework/application.py index 79c7b181f2..14bda9e89f 100644 --- a/easybuild/framework/application.py +++ b/easybuild/framework/application.py @@ -1004,7 +1004,7 @@ def sanitycheck(self): m.load() # Build substition dictionary - check_cmd = { 'name': self.name(), 'options': '-h' } + check_cmd = { 'name': self.name().lower(), 'options': '-h' } if command[0] != None: check_cmd['name'] = command[0] From 482200e21189c464d39c8b0e58b121fa8876fb04 Mon Sep 17 00:00:00 2001 From: Toon Willems Date: Tue, 24 Jul 2012 09:49:37 +0200 Subject: [PATCH 078/798] make using sanityCheckCommand convenient use True instead of (None,None) --- easybuild/framework/application.py | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/easybuild/framework/application.py b/easybuild/framework/application.py index 14bda9e89f..944c42ab22 100644 --- a/easybuild/framework/application.py +++ b/easybuild/framework/application.py @@ -1003,6 +1003,13 @@ def sanitycheck(self): m.addModule([[self.name(), self.installversion]]) m.load() + # set command to default. This allows for config files with + # sanityCheckCommand = True + if not isinstance(command, tuple): + self.log.debug("Setting sanity check command to default") + command = (None, None) + + # Build substition dictionary check_cmd = { 'name': self.name().lower(), 'options': '-h' } From 077c79991715ad30b47b7aa2fee8d078a2c40fc7 Mon Sep 17 00:00:00 2001 From: Toon Willems Date: Tue, 24 Jul 2012 09:53:05 +0200 Subject: [PATCH 079/798] update documentation for sanityCheckCommand option --- easybuild/framework/application.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/easybuild/framework/application.py b/easybuild/framework/application.py index 944c42ab22..e53f2d37c2 100644 --- a/easybuild/framework/application.py +++ b/easybuild/framework/application.py @@ -148,7 +148,7 @@ def __init__(self, name=None, version=None, newBuild=True, debug=False): 'patches': [[], "List of patches to apply"], 'tests': [[], "List of test-scripts to run after install. A test script should return a non-zero exit status to fail"], 'sanityCheckPaths': [{}, "List of files and directories to check (format: {'files':, 'dirs':}, default: {})"], - 'sanityCheckCommand': [None, "Single command that will be run after install (e.g. -h)"], + 'sanityCheckCommand': [None, "format: (name, options) e.g. ('gzip','-h') . If set to True it will use (name, '-h')"], 'buildstats' : [None, "A list of dicts with buildstats: build_time, platform, core_count, cpu_model, install_size, timestamp"], } From 633e7273053c0ed03a45ceb0815a47775f103c0c Mon Sep 17 00:00:00 2001 From: Toon Willems Date: Tue, 24 Jul 2012 10:41:12 +0200 Subject: [PATCH 080/798] make repo classes available inside config file without explicit import --- easybuild/easybuild_config.py | 2 -- easybuild/tools/config.py | 6 +++++- 2 files changed, 5 insertions(+), 3 deletions(-) diff --git a/easybuild/easybuild_config.py b/easybuild/easybuild_config.py index 2550ff3721..885c7108d3 100644 --- a/easybuild/easybuild_config.py +++ b/easybuild/easybuild_config.py @@ -22,8 +22,6 @@ from easybuild.tools.build_log import getLog import easybuild.tools.config as config -from easybuild.tools.repository import SvnRepository, GitRepository, FileRepository - log = getLog('easybuild_config') diff --git a/easybuild/tools/config.py b/easybuild/tools/config.py index f1c2049de1..326bdb8fdb 100644 --- a/easybuild/tools/config.py +++ b/easybuild/tools/config.py @@ -24,6 +24,7 @@ import os from easybuild.tools.build_log import getLog +import easybuild.tools.repository as repo log = getLog('config') @@ -86,7 +87,10 @@ def readConfiguration(filename): """ Read variables from the config file """ - fileVariables = {} + fileVariables = {'FileRepository': repo.FileRepository, + 'GitRepository': repo.GitRepository, + 'SvnRepository': repo.SvnRepository + } try: execfile(filename, {}, fileVariables) except (IOError, SyntaxError), err: From 1415e4d5a4485b0388f707a37e871a6bbbf6a7fd Mon Sep 17 00:00:00 2001 From: Toon Willems Date: Tue, 24 Jul 2012 11:33:09 +0200 Subject: [PATCH 081/798] update readme to reflect changes already made in develop branch --- README.md | 22 +++++++++++----------- 1 file changed, 11 insertions(+), 11 deletions(-) diff --git a/README.md b/README.md index c7d84702f9..a03deb10a4 100644 --- a/README.md +++ b/README.md @@ -7,7 +7,7 @@ that allows you to install software in a structured, repeatable and robust way. It is motivated by the need for a tool that allows to: * independently install multiple versions of a software package side-by-side - * support multiple compilers and libraries for building a software package + * support multiple compilers and libraries for building a software package and its dependencies * keep the package configuration simple * divert from the standard configure / make / make install with custom @@ -25,7 +25,7 @@ Some key properties of EasyBuild: * the generation of the module files to easily make the software available to users * the dependencies for installation are resolved using environment modules and can be automatically installed using the robot feature - * after the installation, the specification files can be sent to a repository for + * after the installation, the specification files can be sent to a repository for archiving For more information on EasyBuild, see the documentation wiki on github [3]. @@ -35,7 +35,7 @@ REQUIREMENTS ------------- EasyBuild requires Python 2.4 (or a more recent 2.x version) to be available, -as well as the environment-modules software package [4]. +as well as the environment-modules software package [4]. The GitPython Python module [5] is recommended, especially when EasyBuild is being used from a git repository. @@ -51,16 +51,16 @@ running the following (bash/sh syntax): export EBHOME="" export CFGS="$EBHOME/easybuild/easyconfigs" - ${EBHOME}/easybuild.sh --robot ${CFGS} ${CFGS}/h/HPL/HPL-2.0-goalf-1.1.0.eb + ${EBHOME}/eb --robot ${CFGS} ${CFGS}/h/HPL/HPL-2.0-goalf-1.1.0.eb This will build and install HPL, after building and installing a GCC-based compiler toolkit and all of its dependencies using the default EasyBuild -configuration, which will install to $HOME/easybuild/software. +configuration, which will install to $HOME/.local/easybuild/software. The entire process should take about an hour on a recent system. -Module files will be provided in $HOME/easybuild/modules/all, so to load the -provided modules, update your MODULEPATH environment variable. +Module files will be provided in $HOME/.local/easybuild/modules/all, so to load +the provided modules, update your MODULEPATH environment variable. Note: this demo requires a C and C++ compiler to be available on your system, e.g., gcc and g++. @@ -74,11 +74,11 @@ To get started, you first need to configure EasyBuild for use [7]. Once this is done, using EasyBuild is as simple as creating a .eb specification file, and providing it to the framework: - easybuild/easybuild.sh example.eb + easybuild/eb example.eb -For command line options, see +For command line options, see - easybuild/easybuild.sh -h (or --help) + easybuild/eb -h (or --help) Documentation on writing your own .eb specification files is available on the EasyBuild github wiki [8]. @@ -87,7 +87,7 @@ To add support for a particular software package that requires a custom installation procedure, you will need to implement an easyblock that can be plugged into the EasyBuild framework [9]. -A step-by-step guide to getting started with EasyBuild is provided on +A step-by-step guide to getting started with EasyBuild is provided on the github wiki [10]. From 45746b1bbc37637eb4a0d720161b6425bca2b900 Mon Sep 17 00:00:00 2001 From: Toon Willems Date: Tue, 24 Jul 2012 11:49:06 +0200 Subject: [PATCH 082/798] update documentation --- easybuild/easybuild_config.py | 26 ++++++++++++-------------- 1 file changed, 12 insertions(+), 14 deletions(-) diff --git a/easybuild/easybuild_config.py b/easybuild/easybuild_config.py index 885c7108d3..53c56eabcd 100644 --- a/easybuild/easybuild_config.py +++ b/easybuild/easybuild_config.py @@ -46,20 +46,18 @@ sourcePath = os.path.join(prefix, sourceDir) # repository for eb files -## possible repository types are: -## 'fs' : plain filesystem -## repositoryPath = "path/to/directory" -## repository = FileRepository(repositoryPath) -## 'git' : bare git repository (created git clone --bare or git init --bare (but make sure to have at least -## one push to it once, we can't handle empty git repos) -## repositoryPath = "ssh://user@server/path/to/repo.git" #not starting with '/' ! -## repository = GitRepository(repositoryPath, subdir='path/in/repo' ) -## this requires GitPython -## 'svn' " svn repository -## repositoryPath = "svn+ssh://user@server/path/to/repo" -## subdir = "/path/inside/repo" -## repository = SvnRepository(repositoryPath) -## this requires pysvn +## Currently, EasyBuild supports the following repository types: + +## * `FileRepository`: a plain flat file repository. In this case, the `repositoryPath` contains the directory where the files are stored, +## * `GitRepository`: a _non-empty_ **bare** git repository (created with `git init --bare` or `git clone --bare`). +## Here, the `repositoryPath` contains the git repository location, which can be a directory or an URL. +## * `SvnRepository`: an SVN repository. In this case, the `repositoryPath` contains the subversion repository location, again, this can be a directory or an URL. + +## you have to set the `repository` variable inside the config like so: +## `repository = FileRepository(repositoryPath)` + +## optionally a subdir argument can be specified: +## `repository = FileRepository(repositoryPath, subdir)` repositoryPath = os.path.join(prefix, 'ebfiles_repo') repository = FileRepository(repositoryPath) From bd070a6c229794d439cd25310427f1230feb5622 Mon Sep 17 00:00:00 2001 From: Toon Willems Date: Tue, 24 Jul 2012 15:26:45 +0200 Subject: [PATCH 083/798] better default + allow setting of strictness via cli --- easybuild/build.py | 8 +++++++ easybuild/tools/filetools.py | 43 ++++++++++++++++++------------------ 2 files changed, 30 insertions(+), 21 deletions(-) diff --git a/easybuild/build.py b/easybuild/build.py index e6c6aacf38..7a8b65b513 100644 --- a/easybuild/build.py +++ b/easybuild/build.py @@ -85,6 +85,9 @@ def add_build_options(parser): parser.add_option("-v", "--version", action="store_true", help="show version") parser.add_option("--regtest", action="store_true", help="enable regression test mode") parser.add_option("--regtest-online", action="store_true", help="enable online regression test mode") + strictness_options = ['ignore', 'warn', 'error'] + parser.add_option("--strict", type="choice", choices=strictness_options, help="set strictness \ + level (possible levels: %s" % ', '.join(strictness_options)) def main(): """ @@ -171,6 +174,11 @@ def main(): os.remove(logFile) sys.exit(0) + # set strictness of filetools module + if options.strict: + filetools.strictness = options.strict + + ## Read easyconfig files packages = [] if len(paths) == 0: diff --git a/easybuild/tools/filetools.py b/easybuild/tools/filetools.py index e57a34f6fa..282d52e00f 100644 --- a/easybuild/tools/filetools.py +++ b/easybuild/tools/filetools.py @@ -36,7 +36,7 @@ log = getLog('fileTools') errorsFoundInLog = 0 -strictness = None +strictness = 'warn' def unpack(fn, dest, extra_options=None, overwrite=False): """ @@ -493,21 +493,18 @@ def parse_cmd_output(cmd, stdouterr, ec, simple, log_all, log_ok): """ will parse and perform error checks based on strictness setting """ - # Strict defaults - check_ec = True - regexp = True - - if strictness != None: - log.debug("strictness option has been set (%s), using that" % strictness) - if strictness == 0: - check_ec = False - regexp = False - elif strictness == 5: - check_ec = True - regexp = False - else: - check_ec = True - regexp = True + + if strictness == 'ignore': + check_ec = False + regexp = False + elif strictness == 'warn': + check_ec = True + regexp = False + elif strictness == 'error': + check_ec = True + regexp = True + else: + log.error("invalid strictness setting: %s" % strictness) if ec and (log_all or log_ok): # We don't want to error if the user doesn't care @@ -522,10 +519,14 @@ def parse_cmd_output(cmd, stdouterr, ec, simple, log_all, log_ok): else: log.debug('cmd "%s" exited with exitcode %s and output:\n%s' % (cmd, ec, stdouterr)) - - ## parse the stdout/stderr for errors? - if regexp: - parselogForError(stdouterr, regexp, msg="Command used: %s" % cmd) + ## parse the stdout/stderr for errors when not run in ignore mode + if regexp or check_ec: + res = parselogForError(stdouterr, True, msg="Command used: %s" % cmd) + if errorsFoundInLog > 0: + if regexp: + log.error("Found %s errors in command output (output: %s)" % (errorsFoundInLog, res)) + else: + log.warn("Found %s errors in command output (output: %s)" % (errorsFoundInLog, res)) if simple: if ec: @@ -534,7 +535,7 @@ def parse_cmd_output(cmd, stdouterr, ec, simple, log_all, log_ok): else: return True else: - # eventhough strictness could be set, you still want to know the exit code here + # Because we are not running in simple mode, we return the output and ec to the user return (stdouterr, ec) def modifyEnv(old, new): From a69d364b4b371005fdf81e0048c7dd87822752e3 Mon Sep 17 00:00:00 2001 From: Toon Willems Date: Tue, 24 Jul 2012 15:43:49 +0200 Subject: [PATCH 084/798] sometimes run_cmd can be called with regexp=False --- easybuild/tools/filetools.py | 23 +++++++++++++---------- 1 file changed, 13 insertions(+), 10 deletions(-) diff --git a/easybuild/tools/filetools.py b/easybuild/tools/filetools.py index 282d52e00f..23fbcaf569 100644 --- a/easybuild/tools/filetools.py +++ b/easybuild/tools/filetools.py @@ -312,7 +312,7 @@ def run_cmd(cmd, log_ok=True, log_all=False, simple=False, inp=None, regexp=True if log_output: runLog.close() - return parse_cmd_output(cmd, stdouterr, ec, simple, log_all, log_ok) + return parse_cmd_output(cmd, stdouterr, ec, simple, log_all, log_ok, regexp) def run_cmd_qa(cmd, qa, no_qa=None, log_ok=True, log_all=False, simple=False, regexp=True, std_qa=None): """ @@ -487,25 +487,28 @@ def processQA(q, a): # Not needed anymore. Subprocess does this correct? # ec=os.WEXITSTATUS(ec) - return parse_cmd_output(cmd, stdoutErr, ec, simple, log_all, log_ok) + return parse_cmd_output(cmd, stdoutErr, ec, simple, log_all, log_ok, regexp) -def parse_cmd_output(cmd, stdouterr, ec, simple, log_all, log_ok): +def parse_cmd_output(cmd, stdouterr, ec, simple, log_all, log_ok, regexp): """ will parse and perform error checks based on strictness setting """ - if strictness == 'ignore': check_ec = False - regexp = False + use_regexp = False elif strictness == 'warn': check_ec = True - regexp = False + use_regexp = False elif strictness == 'error': check_ec = True - regexp = True + use_regexp = True else: log.error("invalid strictness setting: %s" % strictness) + # allow for overriding the regexp setting + if not regexp: + use_regexp = False + if ec and (log_all or log_ok): # We don't want to error if the user doesn't care if check_ec: @@ -520,10 +523,10 @@ def parse_cmd_output(cmd, stdouterr, ec, simple, log_all, log_ok): log.debug('cmd "%s" exited with exitcode %s and output:\n%s' % (cmd, ec, stdouterr)) ## parse the stdout/stderr for errors when not run in ignore mode - if regexp or check_ec: - res = parselogForError(stdouterr, True, msg="Command used: %s" % cmd) + if use_regexp or regexp: + res = parselogForError(stdouterr, regexp, msg="Command used: %s" % cmd) if errorsFoundInLog > 0: - if regexp: + if use_regexp: log.error("Found %s errors in command output (output: %s)" % (errorsFoundInLog, res)) else: log.warn("Found %s errors in command output (output: %s)" % (errorsFoundInLog, res)) From f54347940104d676ebd1a46e194716f885d07c77 Mon Sep 17 00:00:00 2001 From: Toon Willems Date: Tue, 24 Jul 2012 15:56:59 +0200 Subject: [PATCH 085/798] better output --- easybuild/tools/filetools.py | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/easybuild/tools/filetools.py b/easybuild/tools/filetools.py index 23fbcaf569..5568d6ea05 100644 --- a/easybuild/tools/filetools.py +++ b/easybuild/tools/filetools.py @@ -522,14 +522,15 @@ def parse_cmd_output(cmd, stdouterr, ec, simple, log_all, log_ok, regexp): else: log.debug('cmd "%s" exited with exitcode %s and output:\n%s' % (cmd, ec, stdouterr)) - ## parse the stdout/stderr for errors when not run in ignore mode + # parse the stdout/stderr for errors when strictness dictates this or when regexp is passed in if use_regexp or regexp: res = parselogForError(stdouterr, regexp, msg="Command used: %s" % cmd) - if errorsFoundInLog > 0: + if len(res) > 0: + message = "Found %s errors in command output (output: %s)" % (len(res), ", ".join([r[0] for r in res])) if use_regexp: - log.error("Found %s errors in command output (output: %s)" % (errorsFoundInLog, res)) + log.error(message) else: - log.warn("Found %s errors in command output (output: %s)" % (errorsFoundInLog, res)) + log.warn(message) if simple: if ec: From b4fdaa33bdac44944f99df33500b5839adee1e16 Mon Sep 17 00:00:00 2001 From: Jens Timmerman Date: Tue, 24 Jul 2012 16:12:15 +0200 Subject: [PATCH 086/798] added initial pasha support (for intel, with intel tbb) --- easybuild/easyblocks/p/pasha.py | 39 +++++++++++++++++++ .../PASHA/Pasha-1.0.3-goalf-1.1.0-no-OFED.eb | 18 +++++++++ .../p/PASHA/Pasha-1.0.3-ictce-4.0.6.eb | 17 ++++++++ 3 files changed, 74 insertions(+) create mode 100644 easybuild/easyblocks/p/pasha.py create mode 100644 easybuild/easyconfigs/p/PASHA/Pasha-1.0.3-goalf-1.1.0-no-OFED.eb create mode 100644 easybuild/easyconfigs/p/PASHA/Pasha-1.0.3-ictce-4.0.6.eb diff --git a/easybuild/easyblocks/p/pasha.py b/easybuild/easyblocks/p/pasha.py new file mode 100644 index 0000000000..9c6eb72068 --- /dev/null +++ b/easybuild/easyblocks/p/pasha.py @@ -0,0 +1,39 @@ +## +# Copyright 2012 Jens Timmerman +# +# This file is part of EasyBuild, +# originally created by the HPC team of the University of Ghent (http://ugent.be/hpc). +# +# http://github.com/hpcugent/easybuild +# +# EasyBuild is free software: you can redistribute it and/or modify +# it under the terms of the GNU General Public License as published by +# the Free Software Foundation v2. +# +# EasyBuild is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with EasyBuild. If not, see . +## +""" +pasha easyblock +""" +from easybuild.framework.application import Application + +class Pasha(Application): + """ + Extend Application to add extra configuration (overwrite variables in makefile) + """ + + def configure(self): + """overwriting configure from Application + Set some extra makeopts + """ + makeopts = self.getcfg('makeopts') + makeopts = "%s TBB_DIR=$SOFTROOTTBB/tbb MPI_CXX=$MPICXX OPM_FLAG=%s "\ + "MPI_DIR='' MPI_INC='' MPI_LIB='' MY_CXX=$CXX " % (makeopts, self.tk.get_openmp_flag()) + + self.setcfg('makeopts', makeopts) diff --git a/easybuild/easyconfigs/p/PASHA/Pasha-1.0.3-goalf-1.1.0-no-OFED.eb b/easybuild/easyconfigs/p/PASHA/Pasha-1.0.3-goalf-1.1.0-no-OFED.eb new file mode 100644 index 0000000000..d400f697e1 --- /dev/null +++ b/easybuild/easyconfigs/p/PASHA/Pasha-1.0.3-goalf-1.1.0-no-OFED.eb @@ -0,0 +1,18 @@ +name='Pasha' +version='1.0.3' + +homepage='http://pasha.sourceforge.net/' +description="PASHA is a parallel short read assembler for large genomes using de Bruijn graphs." + +toolkit={'name':'goalf','version':'1.1.0-no-OFED'} +toolkitopts={'pic':True,'opt':True,'optarch':True} + +dependencies=[ + ('tbb','- + +sources=['%s-%s.tar.gz' % (name, version)] +sourceURLs=[ + 'http://downloads.sourceforge.net/pasha', +] + +parallel=1 diff --git a/easybuild/easyconfigs/p/PASHA/Pasha-1.0.3-ictce-4.0.6.eb b/easybuild/easyconfigs/p/PASHA/Pasha-1.0.3-ictce-4.0.6.eb new file mode 100644 index 0000000000..2d48bc3db1 --- /dev/null +++ b/easybuild/easyconfigs/p/PASHA/Pasha-1.0.3-ictce-4.0.6.eb @@ -0,0 +1,17 @@ +name='Pasha' +version='1.0.3' + +homepage='http://pasha.sourceforge.net/' +description="PASHA is a parallel short read assembler for large genomes using de Bruijn graphs." + +toolkit={'name':'ictce','version':'4.0.6'} +toolkitopts={'pic':True,'opt':True,'optarch':True} + +dependencies=[ + ('tbb','4.0.0.233'), + ] + +sources=['%s-%s.tar.gz' % (name, version)] +sourceURLs=[ + 'http://downloads.sourceforge.net/pasha', +] From 72b695afdb8f09f859a3455522ad3bca6858e30b Mon Sep 17 00:00:00 2001 From: Toon Willems Date: Tue, 24 Jul 2012 17:07:49 +0200 Subject: [PATCH 087/798] remove useless extra append --- easybuild/framework/application.py | 2 -- 1 file changed, 2 deletions(-) diff --git a/easybuild/framework/application.py b/easybuild/framework/application.py index e53f2d37c2..d58529d135 100644 --- a/easybuild/framework/application.py +++ b/easybuild/framework/application.py @@ -1111,8 +1111,6 @@ def make_builddir(self): extra = "%s%s-%s%s" % (self.getcfg('versionprefix'), self.tk.name, tkversion, self.getcfg('versionsuffix')) localdir = os.path.join(buildPath(), self.name(), self.version(), extra) - if not self.tk.name == 'dummy': - localdir = os.path.join(localdir, extra) ald = os.path.abspath(localdir) tmpald = ald From f9e48cad956909c80a4661414217d5f83066e4d1 Mon Sep 17 00:00:00 2001 From: Jens Timmerman Date: Wed, 25 Jul 2012 11:33:50 +0200 Subject: [PATCH 088/798] added extra path to tbb module file --- easybuild/easyblocks/t/tbb.py | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/easybuild/easyblocks/t/tbb.py b/easybuild/easyblocks/t/tbb.py index 8458d3fdb9..ce0d63cf41 100644 --- a/easybuild/easyblocks/t/tbb.py +++ b/easybuild/easyblocks/t/tbb.py @@ -22,6 +22,9 @@ from easybuild.easyblocks.i.intelbase import IntelBase class Tbb(IntelBase): + """ + EasyBlock for tbb, threading building blocks + """ def sanitycheck(self): @@ -33,3 +36,12 @@ def sanitycheck(self): self.log.info("Customized sanity check paths: %s" % self.getcfg('sanityCheckPaths')) IntelBase.sanitycheck(self) + + def make_module_extra(self): + """Add correct path to lib to LD_LIBRARY_PATH. and intel license file""" + + txt = IntelBase.make_module_extra(self) + txt += "prepend-path\t%s\t\t$root/%s/%s/lib\n" % + ('LD_LIBRARY_PATH', os.environ['ARCHITECTURE'], os.environ['TBB_COMPILER']) + + return txt From c6c001dc681f061c640cce4e0258ddaf426eeb64 Mon Sep 17 00:00:00 2001 From: Jens Timmerman Date: Wed, 25 Jul 2012 11:37:44 +0200 Subject: [PATCH 089/798] import os --- easybuild/easyblocks/t/tbb.py | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/easybuild/easyblocks/t/tbb.py b/easybuild/easyblocks/t/tbb.py index ce0d63cf41..6096be33bf 100644 --- a/easybuild/easyblocks/t/tbb.py +++ b/easybuild/easyblocks/t/tbb.py @@ -19,6 +19,7 @@ # along with EasyBuild. If not, see . ## +import os from easybuild.easyblocks.i.intelbase import IntelBase class Tbb(IntelBase): @@ -41,7 +42,7 @@ def make_module_extra(self): """Add correct path to lib to LD_LIBRARY_PATH. and intel license file""" txt = IntelBase.make_module_extra(self) - txt += "prepend-path\t%s\t\t$root/%s/%s/lib\n" % - ('LD_LIBRARY_PATH', os.environ['ARCHITECTURE'], os.environ['TBB_COMPILER']) + txt += "prepend-path\t%s\t\t$root/%s/%s/lib\n" % \ + ('LD_LIBRARY_PATH', os.environ['ARCHITECTURE'], os.environ['TBB_COMPILER']) return txt From 522710960d1161e73daace1259fece6dc2ba7c8a Mon Sep 17 00:00:00 2001 From: Toon Willems Date: Wed, 25 Jul 2012 14:35:08 +0200 Subject: [PATCH 090/798] create fake module for test-loading --- easybuild/framework/application.py | 17 ++++++++++++----- easybuild/tools/module_generator.py | 7 ++++--- 2 files changed, 16 insertions(+), 8 deletions(-) diff --git a/easybuild/framework/application.py b/easybuild/framework/application.py index d58529d135..6e3ac5c09c 100644 --- a/easybuild/framework/application.py +++ b/easybuild/framework/application.py @@ -870,11 +870,14 @@ def build(self): ## POSTPROC self.runstep('postproc', [self.postproc], skippable=True) - ## CLEANUP - self.runstep('cleanup', [self.cleanup]) - ## SANITY CHECK - self.runstep('sanity check', [self.sanitycheck], skippable=False) + try: + self.runstep('sanity check', [self.sanitycheck], skippable=False) + except: + ## CLEANUP + self.runstep('cleanup', [self.cleanup]) + raise + except StopException: pass @@ -994,12 +997,16 @@ def sanitycheck(self): else: self.log.debug("Sanity check: found non-empty directory %s in %s" % (d, self.installdir)) + # make fake module + self.make_module(True) # run sanity check command command = self.getcfg('sanityCheckCommand') if command: # load the module before running the command - m = Modules() + mod_path = [self.moduleGenerator.module_path] + m = Modules(mod_path) + self.log.debug("created module instance") m.addModule([[self.name(), self.installversion]]) m.load() diff --git a/easybuild/tools/module_generator.py b/easybuild/tools/module_generator.py index 45c1f2683f..6871d92e30 100644 --- a/easybuild/tools/module_generator.py +++ b/easybuild/tools/module_generator.py @@ -36,6 +36,7 @@ def __init__(self, application, fake=False): self.app = application self.fake = fake self.filename = None + self.module_path = None def createFiles(self): """ @@ -49,15 +50,15 @@ def createFiles(self): base = self.app.builddir # Real file goes in 'all' category - allPath = os.path.join(base, 'all', self.app.name()) - self.filename = os.path.join(allPath, self.app.installversion) + self.module_path = os.path.join(base, 'all') + self.filename = os.path.join(self.module_path, self.app.name(), self.app.installversion) # Make symlink in moduleclass category classPath = os.path.join(base, self.app.getcfg('moduleclass'), self.app.name()) classPathFile = os.path.join(classPath, self.app.installversion) # Create directories and links - for directory in [allPath, classPath]: + for directory in [os.path.dirname(x) for x in [self.filename, classPathFile]]: if not os.path.isdir(directory): try: os.makedirs(directory) From 13d9296d33283f6a0a2fab466cca769ca97ad109 Mon Sep 17 00:00:00 2001 From: Toon Willems Date: Wed, 25 Jul 2012 14:40:52 +0200 Subject: [PATCH 091/798] add this key to easyblock.py --- easybuild/framework/easyblock.py | 1 + 1 file changed, 1 insertion(+) diff --git a/easybuild/framework/easyblock.py b/easybuild/framework/easyblock.py index 795e1a0b53..f8b1443aeb 100644 --- a/easybuild/framework/easyblock.py +++ b/easybuild/framework/easyblock.py @@ -92,6 +92,7 @@ class EasyBlock: 'patches': [[], "List of patches to apply"], 'tests': [[], "List of test-scripts to run after install. A test script should return a non-zero exit status to fail"], 'sanityCheckPaths': [{}, "List of files and directories to check (format: {'files':, 'dirs':}, default: {})"], + 'sanityCheckCommand': [None, "format: (name, options) e.g. ('gzip','-h') . If set to True it will use (name, '-h')"], 'buildstats' : [None, "A list of dicts with buildstats: build_time, platform, core_count, cpu_model, install_size, timestamp"], } From c6822cef35d940754e15e0f191a3d87909ea876d Mon Sep 17 00:00:00 2001 From: Toon Willems Date: Wed, 25 Jul 2012 14:42:24 +0200 Subject: [PATCH 092/798] Cleanup in case of succes would be nice --- easybuild/framework/application.py | 3 +++ 1 file changed, 3 insertions(+) diff --git a/easybuild/framework/application.py b/easybuild/framework/application.py index 6e3ac5c09c..d54a41dcce 100644 --- a/easybuild/framework/application.py +++ b/easybuild/framework/application.py @@ -877,6 +877,9 @@ def build(self): ## CLEANUP self.runstep('cleanup', [self.cleanup]) raise + else: + self.runstep('cleanup', [self.cleanup]) + except StopException: From 471e87a3b57582b170271fe3211ab50dd4987694 Mon Sep 17 00:00:00 2001 From: Toon Willems Date: Wed, 25 Jul 2012 14:49:22 +0200 Subject: [PATCH 093/798] use try finally --- easybuild/framework/application.py | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) diff --git a/easybuild/framework/application.py b/easybuild/framework/application.py index e3a315e881..beeaac9447 100644 --- a/easybuild/framework/application.py +++ b/easybuild/framework/application.py @@ -649,11 +649,7 @@ def build(self): ## SANITY CHECK try: self.runstep('sanity check', [self.sanitycheck], skippable=False) - except: - ## CLEANUP - self.runstep('cleanup', [self.cleanup]) - raise - else: + finally: self.runstep('cleanup', [self.cleanup]) From d0ed28faa7edec8fdcbadc5ce235b5725942c402 Mon Sep 17 00:00:00 2001 From: Toon Willems Date: Wed, 25 Jul 2012 14:50:50 +0200 Subject: [PATCH 094/798] use try finally --- easybuild/framework/application.py | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) diff --git a/easybuild/framework/application.py b/easybuild/framework/application.py index d54a41dcce..c64644294c 100644 --- a/easybuild/framework/application.py +++ b/easybuild/framework/application.py @@ -873,11 +873,7 @@ def build(self): ## SANITY CHECK try: self.runstep('sanity check', [self.sanitycheck], skippable=False) - except: - ## CLEANUP - self.runstep('cleanup', [self.cleanup]) - raise - else: + finally: self.runstep('cleanup', [self.cleanup]) From cc2f0203c3b0ee0ee9f30b5b2867afcf675124d3 Mon Sep 17 00:00:00 2001 From: Toon Willems Date: Wed, 25 Jul 2012 15:09:58 +0200 Subject: [PATCH 095/798] some minor fixes --- easybuild/framework/application.py | 2 +- easybuild/test/repository.py | 11 +++-------- easybuild/tools/module_generator.py | 2 +- 3 files changed, 5 insertions(+), 10 deletions(-) diff --git a/easybuild/framework/application.py b/easybuild/framework/application.py index beeaac9447..8b4681b243 100644 --- a/easybuild/framework/application.py +++ b/easybuild/framework/application.py @@ -782,7 +782,7 @@ def sanitycheck(self): mod_path = [self.moduleGenerator.module_path] m = Modules(mod_path) self.log.debug("created module instance") - m.addModule([[self.name(), self.installversion]]) + m.addModule([[self.name(), self.installversion()]]) m.load() # set command to default. This allows for config files with diff --git a/easybuild/test/repository.py b/easybuild/test/repository.py index 040da692e3..81b28007c8 100644 --- a/easybuild/test/repository.py +++ b/easybuild/test/repository.py @@ -5,25 +5,20 @@ from unittest import TestCase, TestSuite import easybuild.tools.config as config -from easybuild.tools.repository import Repository +from easybuild.tools.repository import FileRepository class RepositoryTest(TestCase): def setUp(self): self.path = '/tmp/tmp-easybuild-repo' shutil.rmtree(self.path, True) - os.mkdir(self.path) - config.variables['repositoryPath'] = self.path - self.cwd = os.getcwd() def runTest(self): - repo = Repository() - self.assertEqual(os.path.realpath(self.path), os.getcwd()) + repo = FileRepository(self.path) + self.assertEqual(repo.wc, self.path) def tearDown(self): - del config.variables['repositoryPath'] shutil.rmtree(self.path, True) - os.chdir(self.cwd) def suite(): return TestSuite([RepositoryTest()]) diff --git a/easybuild/tools/module_generator.py b/easybuild/tools/module_generator.py index e7f94d2698..d977758d12 100644 --- a/easybuild/tools/module_generator.py +++ b/easybuild/tools/module_generator.py @@ -51,7 +51,7 @@ def createFiles(self): # Real file goes in 'all' category self.module_path = os.path.join(base, 'all') - self.filename = os.path.join(self.module_path, self.app.name(), self.app.installversion) + self.filename = os.path.join(self.module_path, self.app.name(), self.app.installversion()) # Make symlink in moduleclass category classPath = os.path.join(base, self.app.getcfg('moduleclass'), self.app.name()) From f84914de89db210587f1cbfdb6b99e8c9cc261f4 Mon Sep 17 00:00:00 2001 From: Jens Timmerman Date: Wed, 25 Jul 2012 16:34:04 +0200 Subject: [PATCH 096/798] fixed installation of tbb and added full pasha support --- easybuild/easyblocks/p/pasha.py | 17 ++++++++++++++++- easybuild/easyblocks/t/tbb.py | 15 ++++++++++++--- .../p/PASHA/Pasha-1.0.3-ictce-4.0.6.eb | 7 ++++++- easybuild/easyconfigs/t/tbb/tbb-4.0.5.339.eb | 19 +++++++++++++++++++ 4 files changed, 53 insertions(+), 5 deletions(-) create mode 100644 easybuild/easyconfigs/t/tbb/tbb-4.0.5.339.eb diff --git a/easybuild/easyblocks/p/pasha.py b/easybuild/easyblocks/p/pasha.py index 9c6eb72068..2111d938df 100644 --- a/easybuild/easyblocks/p/pasha.py +++ b/easybuild/easyblocks/p/pasha.py @@ -21,6 +21,8 @@ """ pasha easyblock """ +import shutil +import os from easybuild.framework.application import Application class Pasha(Application): @@ -34,6 +36,19 @@ def configure(self): """ makeopts = self.getcfg('makeopts') makeopts = "%s TBB_DIR=$SOFTROOTTBB/tbb MPI_CXX=$MPICXX OPM_FLAG=%s "\ - "MPI_DIR='' MPI_INC='' MPI_LIB='' MY_CXX=$CXX " % (makeopts, self.tk.get_openmp_flag()) + "MPI_DIR='' MPI_INC='' MPI_LIB='' MY_CXX=$CXX MPICH_IGNORE_CXX_SEEK=1" % (makeopts, self.tk.get_openmp_flag()) self.setcfg('makeopts', makeopts) + + def make_install(self): + """Overwriting make_install, since there is no install defined in the makefile""" + shutil.copytree(os.path.join(self.builddir, "%s-%s" % (self.name(), self.version()), 'bin'), os.path.join(self.installdir, 'bin')) + + def sanitycheck(self): + """Custom sanity check""" + self.setcfg('sanityCheckPaths', { + 'files':["bin/pasha-%s" % x for x in ["kmergen", "pregraph", "graph"]], + 'dirs':[""], + }) + + diff --git a/easybuild/easyblocks/t/tbb.py b/easybuild/easyblocks/t/tbb.py index 6096be33bf..4581e92dd1 100644 --- a/easybuild/easyblocks/t/tbb.py +++ b/easybuild/easyblocks/t/tbb.py @@ -20,6 +20,7 @@ ## import os +import shutil from easybuild.easyblocks.i.intelbase import IntelBase class Tbb(IntelBase): @@ -27,11 +28,20 @@ class Tbb(IntelBase): EasyBlock for tbb, threading building blocks """ + def make_install(self): + """overwrite make_install to add extra symlinks""" + IntelBase.make_install(self) + self.libpath = "%s/tbb/libs/intel64/%s/" % (self.installdir, "cc4.1.0_libc2.4_kernel2.6.16.21") + installibpath = os.path.join(self.installdir, 'tbb', 'lib') + shutil.move(installibpath, os.path.join(self.installdir, 'tbb', 'libs')) + os.symlink(self.libpath, installibpath) + + def sanitycheck(self): if not self.getcfg('sanityCheckPaths'): self.setcfg('sanityCheckPaths', {'files':[], - 'dirs':["tbb/bin", "tbb/lib/intel64"] + 'dirs':["tbb/bin", "tbb/lib/"] }) self.log.info("Customized sanity check paths: %s" % self.getcfg('sanityCheckPaths')) @@ -42,7 +52,6 @@ def make_module_extra(self): """Add correct path to lib to LD_LIBRARY_PATH. and intel license file""" txt = IntelBase.make_module_extra(self) - txt += "prepend-path\t%s\t\t$root/%s/%s/lib\n" % \ - ('LD_LIBRARY_PATH', os.environ['ARCHITECTURE'], os.environ['TBB_COMPILER']) + txt += "prepend-path\t%s\t\t%s\n" % ('LD_LIBRARY_PATH', self.libpath) return txt diff --git a/easybuild/easyconfigs/p/PASHA/Pasha-1.0.3-ictce-4.0.6.eb b/easybuild/easyconfigs/p/PASHA/Pasha-1.0.3-ictce-4.0.6.eb index 2d48bc3db1..4148d89f07 100644 --- a/easybuild/easyconfigs/p/PASHA/Pasha-1.0.3-ictce-4.0.6.eb +++ b/easybuild/easyconfigs/p/PASHA/Pasha-1.0.3-ictce-4.0.6.eb @@ -8,10 +8,15 @@ toolkit={'name':'ictce','version':'4.0.6'} toolkitopts={'pic':True,'opt':True,'optarch':True} dependencies=[ - ('tbb','4.0.0.233'), + ('tbb','4.0.5.339','',True), ] sources=['%s-%s.tar.gz' % (name, version)] sourceURLs=[ 'http://downloads.sourceforge.net/pasha', ] + +patches=[ + 'intelmpi.patch', + ] +parallel=1 diff --git a/easybuild/easyconfigs/t/tbb/tbb-4.0.5.339.eb b/easybuild/easyconfigs/t/tbb/tbb-4.0.5.339.eb new file mode 100644 index 0000000000..d7322f218e --- /dev/null +++ b/easybuild/easyconfigs/t/tbb/tbb-4.0.5.339.eb @@ -0,0 +1,19 @@ +name='tbb' +version='4.0.5.339' + +homepage='http://software.intel.com/en-us/articles/intel-tbb/' +description="""Intel Threading Building Blocks 4.0 (Intel TBB) is a widely used, award-winning C++ template library for creating reliable, portable, and scalable parallel applications. Use Intel TBB for a simple and rapid way of developing robust task-based parallel applications that scale to available processor cores, are compatible with multiple environments, and are easier to maintain. Intel TBB is the most proficient way to implement future-proof parallel applications that tap into the power and performance of multicore and manycore hardware platforms.""" + +toolkit={'name':'dummy','version':'dummy'} + +sources=['l_%s_%s.tgz' % (name,version)] + +patches=['tbb_productsdb.patch'] + +## compiler class +moduleclass='lib' + +dontcreateinstalldir='True' + +## licensepath +license="/apps/gent/licenses/intel" From b437d1a6eae55e3cfcc80e3079bb7575b624fbfb Mon Sep 17 00:00:00 2001 From: Toon Willems Date: Thu, 26 Jul 2012 08:54:45 +0200 Subject: [PATCH 097/798] initialize logger for useful output --- easybuild/test/build.py | 20 +++++++++++--------- 1 file changed, 11 insertions(+), 9 deletions(-) diff --git a/easybuild/test/build.py b/easybuild/test/build.py index e6630fec5f..21b52f42ee 100644 --- a/easybuild/test/build.py +++ b/easybuild/test/build.py @@ -4,7 +4,7 @@ import unittest from unittest import TestCase -from easybuild.tools.build_log import getLog, EasyBuildError +from easybuild.tools.build_log import getLog, EasyBuildError, initLogger from easybuild.framework.application import get_class, Application from easybuild.build import findEasyconfigs, processEasyconfig, resolveDependencies @@ -20,16 +20,18 @@ class BuildTest(TestCase): def setUp(self): """ fetch application instances, report eb-file errors """ + logFile, log, hn = initLogger(filename=None, debug=True, typ=None) + config.init('easybuild/easybuild_config.py') self.errors = [] - log = getLog("BuildTest") + self.log = getLog("BuildTest") path = "easybuild/easyconfigs/" packages = [] files = findEasyconfigs(path, log) for file in files: try: - packages.extend(processEasyconfig(file, log, None)) + packages.extend(processEasyconfig(file, self.log, None)) except EasyBuildError, err: self.errors.append([file, err, 'eb-file error']) @@ -40,7 +42,7 @@ def setUp(self): name = pkg['module'][0] try: # pass None so get_class will infer it - app_class = get_class(None, log, name=name) + app_class = get_class(None, self.log, name=name) self.apps.append(app_class(spec, debug=True)) except EasyBuildError, err: self.errors.append([spec, err, 'Initialization error']) @@ -55,20 +57,20 @@ def performStep(self, fase, arr, method): # Remove this object from the array # we cannot continue building it arr.remove(obj) - print "%s encountered error: %s (ErrorClass: %s)" % (obj, err, fase) + self.log.info("%s encountered error: %s (ErrorClass: %s)" % (obj, err, fase)) - print "%s errors during %s" % (errors, fase) + self.log.info("%s errors during %s" % (errors, fase)) def runTest(self): - print "%s errors encountered before we can begin building" % len(self.errors) + self.log.info("%s errors encountered before we can begin building" % len(self.errors)) for (obj, err, name) in self.errors: - print "%s encountered error: %s (ErrorClass: %s)" % (obj, err, name) + self.log.info("%s encountered error: %s (ErrorClass: %s)" % (obj, err, name)) self.errors = [] - print "Continuing building other packages" + self.log.info("Continuing building other packages") # take manual control over the building self.performStep("preparation", self.apps, lambda x: x.prepare_build()) self.performStep("pre-build verification", self.apps, lambda x: x.ready2build()) From aa89ca1aa52ff120da1b12c213e79ac5f7f1eed4 Mon Sep 17 00:00:00 2001 From: Toon Willems Date: Thu, 26 Jul 2012 10:04:20 +0200 Subject: [PATCH 098/798] print loaded modules and environment to debug log --- easybuild/framework/application.py | 26 ++++++++++++++++++++++++-- 1 file changed, 24 insertions(+), 2 deletions(-) diff --git a/easybuild/framework/application.py b/easybuild/framework/application.py index c64644294c..9e109bc89c 100644 --- a/easybuild/framework/application.py +++ b/easybuild/framework/application.py @@ -20,6 +20,7 @@ ## from difflib import get_close_matches from distutils.version import LooseVersion +import copy import glob import grp #@UnresolvedImport import os @@ -155,6 +156,9 @@ def __init__(self, name=None, version=None, newBuild=True, debug=False): # mandatory config entries self.mandatory = ['name', 'version', 'homepage', 'description', 'toolkit'] + # copy of the original environ + self.orig_environ = copy.deepcopy(os.environ) + def autobuild(self, ebfile, runTests, regtest_online): """ Build the software package described by cfg. @@ -836,6 +840,9 @@ def build(self): self.gen_installdir() self.make_builddir() + self.log.debug("starting environment: %s" % self.orig_environ) + self.log.debug("loaded modules: %s" % Modules().loaded_modules()) + ## SOURCE print_msg("unpacking...", self.log) self.runstep('source', [self.unpack_src], skippable=True) @@ -876,8 +883,6 @@ def build(self): finally: self.runstep('cleanup', [self.cleanup]) - - except StopException: pass @@ -889,12 +894,29 @@ def runstep(self, step, methods, skippable=False): self.log.info("Skipping %s" % step) else: for m in methods: + self.print_environ() m() if self.getcfg('stop') == step: self.log.info("Stopping after %s step." % step) raise StopException(step) + def print_environ(self): + """ + Prints the environment changes and loaded modules to the debug log + - pretty prints the environment for easy copy-pasting + """ + mods = Modules().loaded_modules() + env = os.environ + text = "" + for key in env: + if key not in self.orig_environ: + text += 'export %s="%s"\n' % (key, env[key]) + + self.log.debug("Loaded modules: %s" % mods) + self.log.debug("Changes to environment:\n%s" % text) + + def postproc(self): """ Do some postprocessing From 07c762bfd9a323720d79e979fabe618cb48a92c5 Mon Sep 17 00:00:00 2001 From: Toon Willems Date: Thu, 26 Jul 2012 10:43:57 +0200 Subject: [PATCH 099/798] add default check to ApplicationPackage --- easybuild/framework/application.py | 23 ++++++++++++++++++++++- 1 file changed, 22 insertions(+), 1 deletion(-) diff --git a/easybuild/framework/application.py b/easybuild/framework/application.py index c64644294c..94740fc880 100644 --- a/easybuild/framework/application.py +++ b/easybuild/framework/application.py @@ -1719,4 +1719,25 @@ def postrun(self): """ Stuff to do after installing a package. """ - pass + try: + cmd, inp = self.getcfg('pkgfilter') + except: + return + + if self.name in self.getcfg('pkgmodulenames'): + modname = self.getcfg('pkgmodulenames')[self.name] + else: + modname = self.name + template = {'name': modname, + 'version': self.version, + 'src': self.src + } + cmd = cmd % template + if inp: + stdin = inp % template + (output, ec) = run_cmd(cmd, log_all=False, log_ok=False, simple=False, inp=stdin, regexp=False) + else: + (output, ec) = run_cmd(cmd, log_all=False, log_ok=False, simple=False, regexp=False) + if ec: + self.log.warn("package: %s failed to install!" % name) + self.log.error("check: %s failed with %s" % (cmd, output)) From 37e214ffb768b267b9e43757334b43e8919f3e01 Mon Sep 17 00:00:00 2001 From: Toon Willems Date: Thu, 26 Jul 2012 10:45:34 +0200 Subject: [PATCH 100/798] lizkov anyone? --- easybuild/easyblocks/l/lapack.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/easybuild/easyblocks/l/lapack.py b/easybuild/easyblocks/l/lapack.py index aa243ae20a..b45829b92a 100644 --- a/easybuild/easyblocks/l/lapack.py +++ b/easybuild/easyblocks/l/lapack.py @@ -187,7 +187,7 @@ def test(self): Application.test(self) # don't create a module if we're only testing - def make_module(self): + def make_module(self, fake=False): """ Only make LAPACK module when we're not testing. """ @@ -195,7 +195,7 @@ def make_module(self): pass else: - Application.make_module(self) + Application.make_module(self, fake) def sanitycheck(self): """ @@ -208,4 +208,4 @@ def sanitycheck(self): self.log.info("Customized sanity check paths: %s"%self.getcfg('sanityCheckPaths')) - Application.sanitycheck(self) \ No newline at end of file + Application.sanitycheck(self) From d536baee07c392ddc229b19edf01cf260a2b89c0 Mon Sep 17 00:00:00 2001 From: Toon Willems Date: Thu, 26 Jul 2012 12:00:48 +0200 Subject: [PATCH 101/798] more pythonian implementation --- easybuild/framework/application.py | 13 ++++++------- 1 file changed, 6 insertions(+), 7 deletions(-) diff --git a/easybuild/framework/application.py b/easybuild/framework/application.py index 9e109bc89c..a8c890a260 100644 --- a/easybuild/framework/application.py +++ b/easybuild/framework/application.py @@ -906,15 +906,14 @@ def print_environ(self): Prints the environment changes and loaded modules to the debug log - pretty prints the environment for easy copy-pasting """ - mods = Modules().loaded_modules() + mods = "\n".join(["module load %s/%s" % (m['name'], m['version']) for m in Modules().loaded_modules()]) + env = os.environ - text = "" - for key in env: - if key not in self.orig_environ: - text += 'export %s="%s"\n' % (key, env[key]) + changed = [(k,env[k]) for k in env if k not in self.orig_environ] + text = "\n".join(['export %s="%s"' % change for change in changed]) - self.log.debug("Loaded modules: %s" % mods) - self.log.debug("Changes to environment:\n%s" % text) + self.log.debug("Load modules:\n%s" % mods) + self.log.debug("Change environment:\n%s" % text) def postproc(self): From 06110ba08029e2614ace301e37a4fd3bc121d958 Mon Sep 17 00:00:00 2001 From: Toon Willems Date: Thu, 26 Jul 2012 15:36:29 +0200 Subject: [PATCH 102/798] also add changed values --- easybuild/framework/application.py | 14 ++++++++++---- 1 file changed, 10 insertions(+), 4 deletions(-) diff --git a/easybuild/framework/application.py b/easybuild/framework/application.py index a8c890a260..19d044a382 100644 --- a/easybuild/framework/application.py +++ b/easybuild/framework/application.py @@ -156,8 +156,8 @@ def __init__(self, name=None, version=None, newBuild=True, debug=False): # mandatory config entries self.mandatory = ['name', 'version', 'homepage', 'description', 'toolkit'] - # copy of the original environ - self.orig_environ = copy.deepcopy(os.environ) + # original environ will be set later + self.orig_environ = {} def autobuild(self, ebfile, runTests, regtest_online): """ @@ -840,8 +840,7 @@ def build(self): self.gen_installdir() self.make_builddir() - self.log.debug("starting environment: %s" % self.orig_environ) - self.log.debug("loaded modules: %s" % Modules().loaded_modules()) + self.print_environ() ## SOURCE print_msg("unpacking...", self.log) @@ -909,12 +908,19 @@ def print_environ(self): mods = "\n".join(["module load %s/%s" % (m['name'], m['version']) for m in Modules().loaded_modules()]) env = os.environ + changed = [(k,env[k]) for k in env if k not in self.orig_environ] + for k in env: + if k in self.orig_environ and env[k] != self.orig_environ[k]: + changed.append((k, env[k])) + text = "\n".join(['export %s="%s"' % change for change in changed]) self.log.debug("Load modules:\n%s" % mods) self.log.debug("Change environment:\n%s" % text) + self.orig_environ = copy.deepcopy(os.environ) + def postproc(self): """ From 7e570cd656272c2f39e0110b82d8aa2ca3625020 Mon Sep 17 00:00:00 2001 From: Toon Willems Date: Thu, 26 Jul 2012 15:55:27 +0200 Subject: [PATCH 103/798] Also add removed variables --- easybuild/framework/application.py | 2 ++ 1 file changed, 2 insertions(+) diff --git a/easybuild/framework/application.py b/easybuild/framework/application.py index 19d044a382..b1a784b828 100644 --- a/easybuild/framework/application.py +++ b/easybuild/framework/application.py @@ -915,6 +915,8 @@ def print_environ(self): changed.append((k, env[k])) text = "\n".join(['export %s="%s"' % change for change in changed]) + text += "\n" + text += "\n".join(['unset %s' % key for key in self.orig_environ if key not in env]) self.log.debug("Load modules:\n%s" % mods) self.log.debug("Change environment:\n%s" % text) From 97ae2e9d12c4db367632318d11caadc0bcd9d012 Mon Sep 17 00:00:00 2001 From: Jens Timmerman Date: Thu, 26 Jul 2012 17:23:54 +0300 Subject: [PATCH 104/798] Processed remarks for pasha.py --- easybuild/easyblocks/p/pasha.py | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/easybuild/easyblocks/p/pasha.py b/easybuild/easyblocks/p/pasha.py index 2111d938df..c71befabe6 100644 --- a/easybuild/easyblocks/p/pasha.py +++ b/easybuild/easyblocks/p/pasha.py @@ -31,21 +31,21 @@ class Pasha(Application): """ def configure(self): - """overwriting configure from Application - Set some extra makeopts - """ + """Configure Pasha by setting make options.""" makeopts = self.getcfg('makeopts') makeopts = "%s TBB_DIR=$SOFTROOTTBB/tbb MPI_CXX=$MPICXX OPM_FLAG=%s "\ - "MPI_DIR='' MPI_INC='' MPI_LIB='' MY_CXX=$CXX MPICH_IGNORE_CXX_SEEK=1" % (makeopts, self.tk.get_openmp_flag()) + "MPI_DIR='' MPI_INC='' MPI_LIB='' MY_CXX=$CXX MPICH_IGNORE_CXX_SEEK=1" % \ + (makeopts, self.tk.get_openmp_flag()) self.setcfg('makeopts', makeopts) def make_install(self): - """Overwriting make_install, since there is no install defined in the makefile""" - shutil.copytree(os.path.join(self.builddir, "%s-%s" % (self.name(), self.version()), 'bin'), os.path.join(self.installdir, 'bin')) + """install by copying everything from 'bin' subdir in build dir to install dir""" + srcdir = os.path.join(self.builddir, "%s-%s" % (self.name(), self.version()), 'bin') + shutil.copytree(srcdir, os.path.join(self.installdir, 'bin')) def sanitycheck(self): - """Custom sanity check""" + """Custom sanity check for Pasha""" self.setcfg('sanityCheckPaths', { 'files':["bin/pasha-%s" % x for x in ["kmergen", "pregraph", "graph"]], 'dirs':[""], From 2a7bca924a3495f1b3474bcb29317cc68ac211e2 Mon Sep 17 00:00:00 2001 From: Toon Willems Date: Thu, 26 Jul 2012 16:45:43 +0200 Subject: [PATCH 105/798] add debug output when postrun skips --- easybuild/framework/application.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/easybuild/framework/application.py b/easybuild/framework/application.py index 94740fc880..de31a5dc10 100644 --- a/easybuild/framework/application.py +++ b/easybuild/framework/application.py @@ -1720,8 +1720,9 @@ def postrun(self): Stuff to do after installing a package. """ try: - cmd, inp = self.getcfg('pkgfilter') + cmd, inp = self.master.getcfg('pkgfilter') except: + self.log.debug("no pkgfilter setting found, skipping postrun") return if self.name in self.getcfg('pkgmodulenames'): From f95ccac8cac1d345eb7875812edfc172b74c5c08 Mon Sep 17 00:00:00 2001 From: Toon Willems Date: Thu, 26 Jul 2012 16:51:02 +0200 Subject: [PATCH 106/798] should have paid more attention to that --- easybuild/framework/application.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/easybuild/framework/application.py b/easybuild/framework/application.py index de31a5dc10..dcf4ffb518 100644 --- a/easybuild/framework/application.py +++ b/easybuild/framework/application.py @@ -1725,8 +1725,8 @@ def postrun(self): self.log.debug("no pkgfilter setting found, skipping postrun") return - if self.name in self.getcfg('pkgmodulenames'): - modname = self.getcfg('pkgmodulenames')[self.name] + if self.name in self.master.getcfg('pkgmodulenames'): + modname = self.master.getcfg('pkgmodulenames')[self.name] else: modname = self.name template = {'name': modname, From 3f2e1a822fa5f2c6f0914cf4329c2d0eb522ee26 Mon Sep 17 00:00:00 2001 From: Toon Willems Date: Thu, 26 Jul 2012 16:57:38 +0200 Subject: [PATCH 107/798] conditional printing --- easybuild/framework/application.py | 14 ++++++++++---- 1 file changed, 10 insertions(+), 4 deletions(-) diff --git a/easybuild/framework/application.py b/easybuild/framework/application.py index b1a784b828..0126ce3ce2 100644 --- a/easybuild/framework/application.py +++ b/easybuild/framework/application.py @@ -914,12 +914,18 @@ def print_environ(self): if k in self.orig_environ and env[k] != self.orig_environ[k]: changed.append((k, env[k])) + unset = [key for key in self.orig_environ if key not in env] + text = "\n".join(['export %s="%s"' % change for change in changed]) - text += "\n" - text += "\n".join(['unset %s' % key for key in self.orig_environ if key not in env]) + unset_text = "\n".join(['unset %s' % key for key in unset]) + - self.log.debug("Load modules:\n%s" % mods) - self.log.debug("Change environment:\n%s" % text) + if mods: + self.log.debug("Loaded modules:\n%s" % mods) + if changed: + self.log.debug("Added to environment:\n%s" % text) + if unset: + self.log.debug("Removed from environment:\n%s" % unset_text) self.orig_environ = copy.deepcopy(os.environ) From 461547f87de8a804becea9f1fbf5233f4edcf27c Mon Sep 17 00:00:00 2001 From: Toon Willems Date: Thu, 26 Jul 2012 17:05:30 +0200 Subject: [PATCH 108/798] chdir to master installdir, prevents error in run_cmd --- easybuild/framework/application.py | 2 ++ 1 file changed, 2 insertions(+) diff --git a/easybuild/framework/application.py b/easybuild/framework/application.py index dcf4ffb518..534d58c51a 100644 --- a/easybuild/framework/application.py +++ b/easybuild/framework/application.py @@ -1734,6 +1734,8 @@ def postrun(self): 'src': self.src } cmd = cmd % template + # TODO: come up with a better way to deal with these run_cmd errors + os.chdir(self.master.installdir) if inp: stdin = inp % template (output, ec) = run_cmd(cmd, log_all=False, log_ok=False, simple=False, inp=stdin, regexp=False) From 094e53bc8475fc5027edf44c934bbd4e861b9338 Mon Sep 17 00:00:00 2001 From: Jens Timmerman Date: Fri, 27 Jul 2012 10:03:24 +0200 Subject: [PATCH 109/798] Processed pull request remarks --- easybuild/easyblocks/b/binary.py | 13 +++++++++---- easybuild/easyconfigs/e/ECore/ecore-1.5.2.eb | 2 +- .../easyconfigs/o/ORCA/ORCA-2_9_1-linux_x86-64.eb | 3 +-- easybuild/easyconfigs/o/OpenMPI/pax_disable.patch | 2 +- 4 files changed, 12 insertions(+), 8 deletions(-) diff --git a/easybuild/easyblocks/b/binary.py b/easybuild/easyblocks/b/binary.py index 392dcd215f..e4e83ccd51 100644 --- a/easybuild/easyblocks/b/binary.py +++ b/easybuild/easyblocks/b/binary.py @@ -18,12 +18,16 @@ # You should have received a copy of the GNU General Public License # along with EasyBuild. If not, see . ## +""" +EasyBlock for binary applications +""" import shutil import os from easybuild.framework.application import Application class Binary(Application): - """Support for installing a binary package.""" + """Support for installing a binary package. + Just unpack it and copy it to the installdir""" def configure(self): """No configuration, this is a binary package""" @@ -34,8 +38,9 @@ def make(self): pass def make_installdir(self): - """Do not actually create installdir, copytree in make_install doesn't like it's destination directory to already exist - But before python 2.5 the actuall path has to exist.""" + """Do not actually create installdir, copytree in make_install doesn't + want the destination directory already exist + But in python < 2.5 the actual path leading up to the directory has to exist.""" self.make_dir(self.installdir, clean=True, dontcreateinstalldir=True) def make_install(self): @@ -44,7 +49,7 @@ def make_install(self): def make_module_extra(self): """ - Sets optional variables (SOFTROOT, MPI tuning variables). + Add the install directory to the PATH. """ txt = Application.make_module_extra(self) txt += self.moduleGenerator.prependPaths("PATH", [""]) diff --git a/easybuild/easyconfigs/e/ECore/ecore-1.5.2.eb b/easybuild/easyconfigs/e/ECore/ecore-1.5.2.eb index c1273e1246..14ffde3b21 100644 --- a/easybuild/easyconfigs/e/ECore/ecore-1.5.2.eb +++ b/easybuild/easyconfigs/e/ECore/ecore-1.5.2.eb @@ -14,6 +14,6 @@ patches=['ecore-license-var.patch'] sanityCheckPaths = { 'files':["ecore.sh",'noarch/launch.sh'] + ['arch/linux-rh5-x86_64/bin/%s' % name for name in ['ismodeller', 'ecore', 'packer', 'PorenetworkExtraction', 'Poresim', 'unpacker' ]], - 'dirs':['arch', 'noarch'] + 'dirs':[] } diff --git a/easybuild/easyconfigs/o/ORCA/ORCA-2_9_1-linux_x86-64.eb b/easybuild/easyconfigs/o/ORCA/ORCA-2_9_1-linux_x86-64.eb index f7cf8a5bf8..74166c69ee 100644 --- a/easybuild/easyconfigs/o/ORCA/ORCA-2_9_1-linux_x86-64.eb +++ b/easybuild/easyconfigs/o/ORCA/ORCA-2_9_1-linux_x86-64.eb @@ -2,7 +2,6 @@ easyblock="Binary" name="ORCA" version='2_9_1-linux_x86-64' -#group="gcmm" homepage='http://www.thch.uni-bonn.de/tc/orca/' description="""ORCA is a flexible, efficient and easy-to-use general purpose tool for quantum chemistry @@ -33,5 +32,5 @@ sanityCheckPaths = { 'orca_rel', 'orca_rocis', 'orca_rocis_mpi', 'orca_scf', 'orca_scfgrad', 'orca_scfgrad_mpi', 'orca_scf_mpi', 'orca_soc', 'orca_soc_mpi', 'orca_vib', 'orca_vpot', 'otool_cosmo'], - 'dirs':[""] + 'dirs':[] } \ No newline at end of file diff --git a/easybuild/easyconfigs/o/OpenMPI/pax_disable.patch b/easybuild/easyconfigs/o/OpenMPI/pax_disable.patch index 84b473647d..8c868a2696 100644 --- a/easybuild/easyconfigs/o/OpenMPI/pax_disable.patch +++ b/easybuild/easyconfigs/o/OpenMPI/pax_disable.patch @@ -5,7 +5,7 @@ am__tar='pax -L -x ustar -w "$$tardir"' am__tar_='pax -L -x ustar -w "$tardir"' - am__untar='pax -r' -+ am__untar='pax -r -O' ++ am__untar='pax -r -O' #tell pax to not prompt for a new volume. (prompting is bad in automated tasks) ;; cpio) am__tar='find "$$tardir" -print | cpio -o -H ustar -L' From 3eb4ac73797175087c706e4155f46f25ae58064f Mon Sep 17 00:00:00 2001 From: Toon Willems Date: Fri, 27 Jul 2012 10:28:28 +0200 Subject: [PATCH 110/798] use run_cmd defaults --- easybuild/framework/application.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/easybuild/framework/application.py b/easybuild/framework/application.py index 534d58c51a..d81a1f1094 100644 --- a/easybuild/framework/application.py +++ b/easybuild/framework/application.py @@ -1738,9 +1738,9 @@ def postrun(self): os.chdir(self.master.installdir) if inp: stdin = inp % template - (output, ec) = run_cmd(cmd, log_all=False, log_ok=False, simple=False, inp=stdin, regexp=False) + (output, ec) = run_cmd(cmd, simple=False, inp=stdin, regexp=False) else: - (output, ec) = run_cmd(cmd, log_all=False, log_ok=False, simple=False, regexp=False) + (output, ec) = run_cmd(cmd, simple=False, regexp=False) if ec: self.log.warn("package: %s failed to install!" % name) self.log.error("check: %s failed with %s" % (cmd, output)) From fc045a88ef1a60423da62a5955aa28445df96a70 Mon Sep 17 00:00:00 2001 From: Toon Willems Date: Fri, 27 Jul 2012 11:49:29 +0200 Subject: [PATCH 111/798] run package sanitycheck inside master sanitycheck --- easybuild/framework/application.py | 26 ++++++++++++++++++++++---- 1 file changed, 22 insertions(+), 4 deletions(-) diff --git a/easybuild/framework/application.py b/easybuild/framework/application.py index d81a1f1094..c3b868e950 100644 --- a/easybuild/framework/application.py +++ b/easybuild/framework/application.py @@ -62,6 +62,8 @@ def __init__(self, name=None, version=None, newBuild=True, debug=False): self.installdir = None self.pkgs = None + # keep the objects inside an array as well + self.instance_pkgs = [] self.skip = None ## final version @@ -1034,6 +1036,12 @@ def sanitycheck(self): self.sanityCheckOK = False self.log.debug("sanityCheckCommand exited with code %s (output: %s)" % (ec, out)) + failed_pgks = [pkg.name for pkg in self.instance_pkgs if not pkg.sanitycheck()] + + if failed_pgks: + self.log.info("Sanity check for packages %s failed!" % failed_pgks) + self.sanityCheckOK = False + # pass or fail if not self.sanityCheckOK: self.log.error("Sanity check failed!") @@ -1477,6 +1485,8 @@ def extra_packages(self): if txt: self.moduleExtraPackages += txt p.postrun() + # Append so we can make us of it later (in sanity_check) + self.instance_pkgs.append(p) def filter_packages(self): """ @@ -1719,6 +1729,12 @@ def postrun(self): """ Stuff to do after installing a package. """ + pass + + def sanitycheck(self): + """ + sanity check to run after installing + """ try: cmd, inp = self.master.getcfg('pkgfilter') except: @@ -1734,13 +1750,15 @@ def postrun(self): 'src': self.src } cmd = cmd % template - # TODO: come up with a better way to deal with these run_cmd errors - os.chdir(self.master.installdir) + if inp: stdin = inp % template (output, ec) = run_cmd(cmd, simple=False, inp=stdin, regexp=False) else: (output, ec) = run_cmd(cmd, simple=False, regexp=False) if ec: - self.log.warn("package: %s failed to install!" % name) - self.log.error("check: %s failed with %s" % (cmd, output)) + self.log.warn("package: %s failed to install! (output: %s)" % (self.name, output)) + return False + else: + return True + From e187ef302414862ef7eed257ded791384181a2b5 Mon Sep 17 00:00:00 2001 From: Toon Willems Date: Fri, 27 Jul 2012 12:50:58 +0200 Subject: [PATCH 112/798] make run_cmd not crash --- easybuild/framework/application.py | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/easybuild/framework/application.py b/easybuild/framework/application.py index c3b868e950..b0dca51aa7 100644 --- a/easybuild/framework/application.py +++ b/easybuild/framework/application.py @@ -1753,9 +1753,10 @@ def sanitycheck(self): if inp: stdin = inp % template - (output, ec) = run_cmd(cmd, simple=False, inp=stdin, regexp=False) + # set log_ok to False so we can catch the error instead of run_cmd + (output, ec) = run_cmd(cmd, log_ok=False, simple=False, inp=stdin, regexp=False) else: - (output, ec) = run_cmd(cmd, simple=False, regexp=False) + (output, ec) = run_cmd(cmd, log_ok=False, simple=False, regexp=False) if ec: self.log.warn("package: %s failed to install! (output: %s)" % (self.name, output)) return False From 75be53da02d0e9e991d2c1781c3b07e8d03a7ff6 Mon Sep 17 00:00:00 2001 From: Toon Willems Date: Fri, 27 Jul 2012 13:03:14 +0200 Subject: [PATCH 113/798] add warning about running commands when os.getcwd() is non-existent --- easybuild/tools/filetools.py | 20 ++++++++++++++++++-- 1 file changed, 18 insertions(+), 2 deletions(-) diff --git a/easybuild/tools/filetools.py b/easybuild/tools/filetools.py index 5568d6ea05..a879d37891 100644 --- a/easybuild/tools/filetools.py +++ b/easybuild/tools/filetools.py @@ -248,12 +248,20 @@ def patch(patchFile, dest, fn=None, copy=False, level=None): return result -def run_cmd(cmd, log_ok=True, log_all=False, simple=False, inp=None, regexp=True, log_output=False): +def run_cmd(cmd, log_ok=True, log_all=False, simple=False, inp=None, regexp=True, log_output=False, path=None): """ Executes a command cmd - returns exitcode and stdout+stderr (mixed) - no input though stdin """ + try: + cwd = os.getcwd() + except: + if path: + os.chdir(path) + else: + log.info("running cmd %s in non-existing directory, might fail!" % cmd) + log.debug("run_cmd: running cmd %s (in %s)" % (cmd, os.getcwd())) @@ -314,13 +322,21 @@ def run_cmd(cmd, log_ok=True, log_all=False, simple=False, inp=None, regexp=True return parse_cmd_output(cmd, stdouterr, ec, simple, log_all, log_ok, regexp) -def run_cmd_qa(cmd, qa, no_qa=None, log_ok=True, log_all=False, simple=False, regexp=True, std_qa=None): +def run_cmd_qa(cmd, qa, no_qa=None, log_ok=True, log_all=False, simple=False, regexp=True, std_qa=None, path=None): """ Executes a command cmd - looks for questions and tries to answer - returns exitcode and stdout+stderr (mixed) - no input though stdin """ + try: + cwd = os.getcwd() + except: + if path: + os.chdir(path) + else: + log.info("running cmd %s in non-existing directory, might fail!" % cmd) + log.debug("runQandA: running cmd %s (in %s)" % (cmd, os.getcwd())) # SuSE hack From 80285fe0c92773813508b1d3a9306de83ed4cb3d Mon Sep 17 00:00:00 2001 From: Toon Willems Date: Fri, 27 Jul 2012 13:05:13 +0200 Subject: [PATCH 114/798] load fake module, even when no sanityCheckCommand is given --- easybuild/framework/application.py | 13 +++++++------ 1 file changed, 7 insertions(+), 6 deletions(-) diff --git a/easybuild/framework/application.py b/easybuild/framework/application.py index b0dca51aa7..f516668094 100644 --- a/easybuild/framework/application.py +++ b/easybuild/framework/application.py @@ -1001,15 +1001,16 @@ def sanitycheck(self): # make fake module self.make_module(True) + # load the module + mod_path = [self.moduleGenerator.module_path] + m = Modules(mod_path) + self.log.debug("created module instance") + m.addModule([[self.name(), self.installversion]]) + m.load() + # run sanity check command command = self.getcfg('sanityCheckCommand') if command: - # load the module before running the command - mod_path = [self.moduleGenerator.module_path] - m = Modules(mod_path) - self.log.debug("created module instance") - m.addModule([[self.name(), self.installversion]]) - m.load() # set command to default. This allows for config files with # sanityCheckCommand = True From d2888cb57f48c393a808910eef9289fa2aeaedbb Mon Sep 17 00:00:00 2001 From: Toon Willems Date: Fri, 27 Jul 2012 13:06:47 +0200 Subject: [PATCH 115/798] Typos, Typos everywhere --- easybuild/framework/application.py | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/easybuild/framework/application.py b/easybuild/framework/application.py index f516668094..59eb7495b8 100644 --- a/easybuild/framework/application.py +++ b/easybuild/framework/application.py @@ -1037,10 +1037,10 @@ def sanitycheck(self): self.sanityCheckOK = False self.log.debug("sanityCheckCommand exited with code %s (output: %s)" % (ec, out)) - failed_pgks = [pkg.name for pkg in self.instance_pkgs if not pkg.sanitycheck()] + failed_pkgs = [pkg.name for pkg in self.instance_pkgs if not pkg.sanitycheck()] - if failed_pgks: - self.log.info("Sanity check for packages %s failed!" % failed_pgks) + if failed_pkgs: + self.log.info("Sanity check for packages %s failed!" % failed_pkgs) self.sanityCheckOK = False # pass or fail @@ -1739,7 +1739,7 @@ def sanitycheck(self): try: cmd, inp = self.master.getcfg('pkgfilter') except: - self.log.debug("no pkgfilter setting found, skipping postrun") + self.log.debug("no pkgfilter setting found, skipping sanitycheck") return if self.name in self.master.getcfg('pkgmodulenames'): From 0eb89a708046f3ee474a580518139bbec91ae171 Mon Sep 17 00:00:00 2001 From: Toon Willems Date: Fri, 27 Jul 2012 13:09:19 +0200 Subject: [PATCH 116/798] chdir to installdir when running sanitychecks --- easybuild/framework/application.py | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/easybuild/framework/application.py b/easybuild/framework/application.py index 59eb7495b8..d9c7fbc350 100644 --- a/easybuild/framework/application.py +++ b/easybuild/framework/application.py @@ -1008,6 +1008,9 @@ def sanitycheck(self): m.addModule([[self.name(), self.installversion]]) m.load() + # chdir to installdir (beter environment for running tests) + os.chdir(self.installdir) + # run sanity check command command = self.getcfg('sanityCheckCommand') if command: @@ -1030,8 +1033,6 @@ def sanitycheck(self): cmd = "%(name)s %(options)s" % check_cmd - # chdir to installdir otherwise os.getcwd() in run_cmd will fail - os.chdir(self.installdir) out, ec = run_cmd(cmd, simple=False) if ec != 0: self.sanityCheckOK = False From 0c1490b4e7e21e6644f6a7ec32794ac8f37a6957 Mon Sep 17 00:00:00 2001 From: Toon Willems Date: Fri, 27 Jul 2012 13:18:04 +0200 Subject: [PATCH 117/798] improve logging --- easybuild/tools/filetools.py | 10 ++++------ 1 file changed, 4 insertions(+), 6 deletions(-) diff --git a/easybuild/tools/filetools.py b/easybuild/tools/filetools.py index a879d37891..c57f21b814 100644 --- a/easybuild/tools/filetools.py +++ b/easybuild/tools/filetools.py @@ -255,16 +255,14 @@ def run_cmd(cmd, log_ok=True, log_all=False, simple=False, inp=None, regexp=True - no input though stdin """ try: - cwd = os.getcwd() + log.debug("run_cmd: running cmd %s (in %s)" % (cmd, os.getcwd())) except: if path: os.chdir(path) + log.debug("run_cmd: running cmd %s (in %s)" % (cmd, os.getcwd())) else: log.info("running cmd %s in non-existing directory, might fail!" % cmd) - log.debug("run_cmd: running cmd %s (in %s)" % (cmd, os.getcwd())) - - ## Log command output if log_output: runLog = tempfile.NamedTemporaryFile(suffix='.log', prefix='easybuild-run_cmd-') @@ -330,14 +328,14 @@ def run_cmd_qa(cmd, qa, no_qa=None, log_ok=True, log_all=False, simple=False, re - no input though stdin """ try: - cwd = os.getcwd() + log.debug("runQandA: running cmd %s (in %s)" % (cmd, os.getcwd())) except: if path: os.chdir(path) + log.debug("runQandA: running cmd %s (in %s)" % (cmd, os.getcwd())) else: log.info("running cmd %s in non-existing directory, might fail!" % cmd) - log.debug("runQandA: running cmd %s (in %s)" % (cmd, os.getcwd())) # SuSE hack # - profile is not resourced, and functions (e.g. module) is not inherited From 24014e53802a4cd261b575e75e9ff6415d9df705 Mon Sep 17 00:00:00 2001 From: Toon Willems Date: Fri, 27 Jul 2012 13:31:05 +0200 Subject: [PATCH 118/798] prepend temp modulepath instead of replacing --- easybuild/framework/application.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/easybuild/framework/application.py b/easybuild/framework/application.py index d9c7fbc350..58aba6784f 100644 --- a/easybuild/framework/application.py +++ b/easybuild/framework/application.py @@ -1002,7 +1002,7 @@ def sanitycheck(self): self.make_module(True) # load the module - mod_path = [self.moduleGenerator.module_path] + mod_path = [self.moduleGenerator.module_path, Modules().module_path] m = Modules(mod_path) self.log.debug("created module instance") m.addModule([[self.name(), self.installversion]]) From 717ae2c541072d3f0ca53bce24a31121c3ef7d89 Mon Sep 17 00:00:00 2001 From: Toon Willems Date: Fri, 27 Jul 2012 13:47:32 +0200 Subject: [PATCH 119/798] correct instance variable name --- easybuild/framework/application.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/easybuild/framework/application.py b/easybuild/framework/application.py index 58aba6784f..ea625e34a9 100644 --- a/easybuild/framework/application.py +++ b/easybuild/framework/application.py @@ -1002,7 +1002,7 @@ def sanitycheck(self): self.make_module(True) # load the module - mod_path = [self.moduleGenerator.module_path, Modules().module_path] + mod_path = [self.moduleGenerator.module_path, Modules().modulePath] m = Modules(mod_path) self.log.debug("created module instance") m.addModule([[self.name(), self.installversion]]) From 576371d0424a5ff993ed7824dc845d2638ff98d4 Mon Sep 17 00:00:00 2001 From: Toon Willems Date: Fri, 27 Jul 2012 14:14:28 +0200 Subject: [PATCH 120/798] change to path even when no os.getcwd exists --- easybuild/tools/filetools.py | 31 ++++++++++++++++++++----------- 1 file changed, 20 insertions(+), 11 deletions(-) diff --git a/easybuild/tools/filetools.py b/easybuild/tools/filetools.py index c57f21b814..ad8351d155 100644 --- a/easybuild/tools/filetools.py +++ b/easybuild/tools/filetools.py @@ -253,15 +253,20 @@ def run_cmd(cmd, log_ok=True, log_all=False, simple=False, inp=None, regexp=True Executes a command cmd - returns exitcode and stdout+stderr (mixed) - no input though stdin + - if log_ok or log_all are set -> will log.error if non-zero exit-code + - if simple is True -> instead of returning a tuple (output, ec) it will just return True or False signifying succes + - inp is the input given to the command + - regexp -> Regex used to check the output for errors. If True will use default (see parselogForError) + - if log_output is True -> all output of command will be logged to a tempfile + - path is the path run_cmd should chdir to before doing anything """ try: - log.debug("run_cmd: running cmd %s (in %s)" % (cmd, os.getcwd())) - except: if path: os.chdir(path) - log.debug("run_cmd: running cmd %s (in %s)" % (cmd, os.getcwd())) - else: - log.info("running cmd %s in non-existing directory, might fail!" % cmd) + + log.debug("run_cmd: running cmd %s (in %s)" % (cmd, os.getcwd())) + except: + log.info("running cmd %s in non-existing directory, might fail!" % cmd) ## Log command output if log_output: @@ -323,18 +328,22 @@ def run_cmd(cmd, log_ok=True, log_all=False, simple=False, inp=None, regexp=True def run_cmd_qa(cmd, qa, no_qa=None, log_ok=True, log_all=False, simple=False, regexp=True, std_qa=None, path=None): """ Executes a command cmd - - looks for questions and tries to answer + - looks for questions and tries to answer based on qa dictionary - returns exitcode and stdout+stderr (mixed) - no input though stdin + - if log_ok or log_all are set -> will log.error if non-zero exit-code + - if simple is True -> instead of returning a tuple (output, ec) it will just return True or False signifying succes + - regexp -> Regex used to check the output for errors. If True will use default (see parselogForError) + - if log_output is True -> all output of command will be logged to a tempfile + - path is the path run_cmd should chdir to before doing anything """ try: - log.debug("runQandA: running cmd %s (in %s)" % (cmd, os.getcwd())) - except: if path: os.chdir(path) - log.debug("runQandA: running cmd %s (in %s)" % (cmd, os.getcwd())) - else: - log.info("running cmd %s in non-existing directory, might fail!" % cmd) + + log.debug("runQandA: running cmd %s (in %s)" % (cmd, os.getcwd())) + except: + log.info("running cmd %s in non-existing directory, might fail!" % cmd) # SuSE hack From 1e764fbfee93a189a7866ab37a5d532fbb6285f1 Mon Sep 17 00:00:00 2001 From: Toon Willems Date: Fri, 27 Jul 2012 14:22:36 +0200 Subject: [PATCH 121/798] another bug found --- easybuild/framework/application.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/easybuild/framework/application.py b/easybuild/framework/application.py index ea625e34a9..11a9e47a9d 100644 --- a/easybuild/framework/application.py +++ b/easybuild/framework/application.py @@ -1002,7 +1002,7 @@ def sanitycheck(self): self.make_module(True) # load the module - mod_path = [self.moduleGenerator.module_path, Modules().modulePath] + mod_path = [self.moduleGenerator.module_path].extend(Modules().modulePath) m = Modules(mod_path) self.log.debug("created module instance") m.addModule([[self.name(), self.installversion]]) From 0317af7b2333057c84b0f738451171f7cacea1bb Mon Sep 17 00:00:00 2001 From: Jens Timmerman Date: Fri, 27 Jul 2012 15:45:30 +0200 Subject: [PATCH 122/798] fixed docstrings in pasha.py --- easybuild/easyblocks/p/pasha.py | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/easybuild/easyblocks/p/pasha.py b/easybuild/easyblocks/p/pasha.py index c71befabe6..6ce8a3bd9d 100644 --- a/easybuild/easyblocks/p/pasha.py +++ b/easybuild/easyblocks/p/pasha.py @@ -19,15 +19,16 @@ # along with EasyBuild. If not, see . ## """ -pasha easyblock +EasyBuild support for Pasha, implemented as an easyblock """ + import shutil import os from easybuild.framework.application import Application class Pasha(Application): """ - Extend Application to add extra configuration (overwrite variables in makefile) + Support for building and installing Pasha" """ def configure(self): From ff0fe30bd1592c17248c36b4f10399f63de22193 Mon Sep 17 00:00:00 2001 From: Toon Willems Date: Fri, 27 Jul 2012 16:55:06 +0200 Subject: [PATCH 123/798] damn you python for returning None --- easybuild/framework/application.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/easybuild/framework/application.py b/easybuild/framework/application.py index 1087457ec3..86a92c6136 100644 --- a/easybuild/framework/application.py +++ b/easybuild/framework/application.py @@ -1037,7 +1037,8 @@ def sanitycheck(self): self.make_module(True) # load the module - mod_path = [self.moduleGenerator.module_path].extend(Modules().modulePath) + mod_path = [self.moduleGenerator.module_path] + mod_path.extend(Modules().modulePath) m = Modules(mod_path) self.log.debug("created module instance") m.addModule([[self.name(), self.installversion]]) From e34c3d4692dd1af4c266248a37ce7a288ffbd19d Mon Sep 17 00:00:00 2001 From: Toon Willems Date: Mon, 30 Jul 2012 09:57:12 +0200 Subject: [PATCH 124/798] Allow a partial test to be run --- easybuild/test/build.py | 19 ++++++++++++++++--- 1 file changed, 16 insertions(+), 3 deletions(-) diff --git a/easybuild/test/build.py b/easybuild/test/build.py index 21b52f42ee..6c2e2c7a87 100644 --- a/easybuild/test/build.py +++ b/easybuild/test/build.py @@ -26,9 +26,20 @@ def setUp(self): self.errors = [] self.log = getLog("BuildTest") - path = "easybuild/easyconfigs/" + + print sys.argv[1:] + sys.exit() + + files = [] + if len(sys.argv) > 1: + for path in sys.argv[1:]: + files += findEasyconfigs(path, log) + else: + # Default path + path = "easybuild/easyconfigs/" + files = findEasyconfigs(path, log) + packages = [] - files = findEasyconfigs(path, log) for file in files: try: packages.extend(processEasyconfig(file, self.log, None)) @@ -78,4 +89,6 @@ def runTest(self): self.performStep("build", self.apps, lambda x: x.build()) if __name__ == '__main__': - unittest.main() + # do not use unittest.main() as it will annoyingly parse command line arguments + suite = unittest.TestLoader().loadTestsFromTestCase(BuildTest) + unittest.TextTestRunner(verbosity=2).run(suite) From 6285aeab0923860049ffee6aff8a1889955a46e1 Mon Sep 17 00:00:00 2001 From: Toon Willems Date: Mon, 30 Jul 2012 09:59:01 +0200 Subject: [PATCH 125/798] remove debug statements --- easybuild/test/build.py | 3 --- 1 file changed, 3 deletions(-) diff --git a/easybuild/test/build.py b/easybuild/test/build.py index 6c2e2c7a87..e72107a353 100644 --- a/easybuild/test/build.py +++ b/easybuild/test/build.py @@ -27,9 +27,6 @@ def setUp(self): self.log = getLog("BuildTest") - print sys.argv[1:] - sys.exit() - files = [] if len(sys.argv) > 1: for path in sys.argv[1:]: From a087798351fc082447731559c932de4e0ac31632 Mon Sep 17 00:00:00 2001 From: Toon Willems Date: Mon, 30 Jul 2012 10:11:14 +0200 Subject: [PATCH 126/798] exit non-zero exitcode when build is not ok --- easybuild/test/build.py | 26 +++++++++++++++++--------- 1 file changed, 17 insertions(+), 9 deletions(-) diff --git a/easybuild/test/build.py b/easybuild/test/build.py index e72107a353..b7e419858e 100644 --- a/easybuild/test/build.py +++ b/easybuild/test/build.py @@ -26,6 +26,7 @@ def setUp(self): self.errors = [] self.log = getLog("BuildTest") + self.build_ok = True files = [] if len(sys.argv) > 1: @@ -41,6 +42,7 @@ def setUp(self): try: packages.extend(processEasyconfig(file, self.log, None)) except EasyBuildError, err: + self.build_ok = False self.errors.append([file, err, 'eb-file error']) # TODO: confirm that build-order doesn't matter @@ -53,20 +55,24 @@ def setUp(self): app_class = get_class(None, self.log, name=name) self.apps.append(app_class(spec, debug=True)) except EasyBuildError, err: + self.build_ok = False self.errors.append([spec, err, 'Initialization error']) - def performStep(self, fase, arr, method): + def performStep(self, fase, method): errors = 0 - for obj in arr: + new_apps = [] + for obj in self.apps: try: method(obj) + new_apps.append(obj) except EasyBuildError, err: errors += 1 - # Remove this object from the array # we cannot continue building it - arr.remove(obj) + self.build_ok = False self.log.info("%s encountered error: %s (ErrorClass: %s)" % (obj, err, fase)) + self.apps = new_apps + self.log.info("%s errors during %s" % (errors, fase)) @@ -76,14 +82,16 @@ def runTest(self): for (obj, err, name) in self.errors: self.log.info("%s encountered error: %s (ErrorClass: %s)" % (obj, err, name)) - self.errors = [] - self.log.info("Continuing building other packages") # take manual control over the building - self.performStep("preparation", self.apps, lambda x: x.prepare_build()) - self.performStep("pre-build verification", self.apps, lambda x: x.ready2build()) + self.performStep("preparation", lambda x: x.prepare_build()) + self.performStep("pre-build verification", lambda x: x.ready2build()) # TODO: might want to have more control here (so we can get better error messages - self.performStep("build", self.apps, lambda x: x.build()) + self.performStep("build", lambda x: x.build()) + + # exit with non-zero exit-code when not build_ok + if not self.build_ok: + sys.exit(1) if __name__ == '__main__': # do not use unittest.main() as it will annoyingly parse command line arguments From a37c9546523d8e70a6025cd310ca5f84f3009bd6 Mon Sep 17 00:00:00 2001 From: Toon Willems Date: Mon, 30 Jul 2012 10:26:06 +0200 Subject: [PATCH 127/798] use method call instead of attribute --- easybuild/framework/application.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/easybuild/framework/application.py b/easybuild/framework/application.py index 996c93d455..0210d1c0a6 100644 --- a/easybuild/framework/application.py +++ b/easybuild/framework/application.py @@ -817,7 +817,7 @@ def sanitycheck(self): mod_path.extend(Modules().modulePath) m = Modules(mod_path) self.log.debug("created module instance") - m.addModule([[self.name(), self.installversion]]) + m.addModule([[self.name(), self.installversion()]]) m.load() # chdir to installdir (beter environment for running tests) From 7ec825433a4c17ce2139004f4318c8aa4cd8809d Mon Sep 17 00:00:00 2001 From: Toon Willems Date: Mon, 30 Jul 2012 14:04:50 +0200 Subject: [PATCH 128/798] produce some useful output --- easybuild/test/build.py | 23 ++++++++++++++--------- 1 file changed, 14 insertions(+), 9 deletions(-) diff --git a/easybuild/test/build.py b/easybuild/test/build.py index b7e419858e..e58c05cd81 100644 --- a/easybuild/test/build.py +++ b/easybuild/test/build.py @@ -23,7 +23,7 @@ def setUp(self): logFile, log, hn = initLogger(filename=None, debug=True, typ=None) config.init('easybuild/easybuild_config.py') - self.errors = [] + self.test_results = [] self.log = getLog("BuildTest") self.build_ok = True @@ -43,7 +43,7 @@ def setUp(self): packages.extend(processEasyconfig(file, self.log, None)) except EasyBuildError, err: self.build_ok = False - self.errors.append([file, err, 'eb-file error']) + self.test_results.append((file, 'eb-file error', err)) # TODO: confirm that build-order doesn't matter self.apps = [] @@ -56,7 +56,7 @@ def setUp(self): self.apps.append(app_class(spec, debug=True)) except EasyBuildError, err: self.build_ok = False - self.errors.append([spec, err, 'Initialization error']) + self.test_results.append((spec, 'Initialization error', err)) def performStep(self, fase, method): errors = 0 @@ -69,7 +69,7 @@ def performStep(self, fase, method): errors += 1 # we cannot continue building it self.build_ok = False - self.log.info("%s encountered error: %s (ErrorClass: %s)" % (obj, err, fase)) + self.test_results.append((obj, fase, err)) self.apps = new_apps @@ -78,17 +78,22 @@ def performStep(self, fase, method): def runTest(self): - self.log.info("%s errors encountered before we can begin building" % len(self.errors)) - for (obj, err, name) in self.errors: - self.log.info("%s encountered error: %s (ErrorClass: %s)" % (obj, err, name)) - self.log.info("Continuing building other packages") # take manual control over the building self.performStep("preparation", lambda x: x.prepare_build()) self.performStep("pre-build verification", lambda x: x.ready2build()) - # TODO: might want to have more control here (so we can get better error messages self.performStep("build", lambda x: x.build()) + # At this stage, self.apps contains the succesfully build packages + + for result in self.test_results: + self.log.info("%s crashed with an error during fase: %s, error: %s" % result) + + failed = len(self.test_results) + total = failed + len(self.apps) + + self.log.info("%s from %s packages failed to build!" % (failed, total)) + # exit with non-zero exit-code when not build_ok if not self.build_ok: sys.exit(1) From 0a4538a6d7e37986109743dac65242c27b8d05a9 Mon Sep 17 00:00:00 2001 From: Toon Willems Date: Mon, 30 Jul 2012 14:15:06 +0200 Subject: [PATCH 129/798] handle easyblock= in eb files --- easybuild/test/build.py | 12 ++++++++++-- 1 file changed, 10 insertions(+), 2 deletions(-) diff --git a/easybuild/test/build.py b/easybuild/test/build.py index e58c05cd81..e8ec9217be 100644 --- a/easybuild/test/build.py +++ b/easybuild/test/build.py @@ -51,8 +51,16 @@ def setUp(self): spec = pkg['spec'] name = pkg['module'][0] try: - # pass None so get_class will infer it - app_class = get_class(None, self.log, name=name) + # handle easyconfigs with custom easyblocks + easyblock = None + reg = re.compile(r"^\s*easyblock\s*=(.*)$") + for line in open(spec).readlines(): + match = reg.search(line) + if match: + easyblock = eval(match.group(1)) + break + + app_class = get_class(easyblock, self.log, name=name) self.apps.append(app_class(spec, debug=True)) except EasyBuildError, err: self.build_ok = False From 40240aae3ce6e808517fec3a0305b4947c8cc0b4 Mon Sep 17 00:00:00 2001 From: Toon Willems Date: Mon, 30 Jul 2012 15:32:59 +0200 Subject: [PATCH 130/798] move gzip.eb into dedicated test easyconfig directory --- easybuild/test/{gzip.eb => easyconfigs/gzip-1.4.eb} | 0 easybuild/test/modulegenerator.py | 3 +-- 2 files changed, 1 insertion(+), 2 deletions(-) rename easybuild/test/{gzip.eb => easyconfigs/gzip-1.4.eb} (100%) diff --git a/easybuild/test/gzip.eb b/easybuild/test/easyconfigs/gzip-1.4.eb similarity index 100% rename from easybuild/test/gzip.eb rename to easybuild/test/easyconfigs/gzip-1.4.eb diff --git a/easybuild/test/modulegenerator.py b/easybuild/test/modulegenerator.py index 74efb5f723..2fb605b059 100644 --- a/easybuild/test/modulegenerator.py +++ b/easybuild/test/modulegenerator.py @@ -9,8 +9,7 @@ class ModuleGeneratorTest(TestCase): def setUp(self): - # TODO: include gzip.eb as test file - self.modgen = ModuleGenerator(Application('easybuild/test/gzip.eb')) + self.modgen = ModuleGenerator(Application('easybuild/test/easyconfigs/gzip-1.4.eb')) self.modgen.app.installdir = "/tmp" def runTest(self): From 0fab4dde3508515bdb0fdf7277077d6bcbf7ab3d Mon Sep 17 00:00:00 2001 From: Toon Willems Date: Mon, 30 Jul 2012 15:33:38 +0200 Subject: [PATCH 131/798] slightly better way to update modules with MockModule --- easybuild/test/toolkit.py | 16 +++++++++------- 1 file changed, 9 insertions(+), 7 deletions(-) diff --git a/easybuild/test/toolkit.py b/easybuild/test/toolkit.py index 0e3692311f..9fa4c11c07 100644 --- a/easybuild/test/toolkit.py +++ b/easybuild/test/toolkit.py @@ -3,6 +3,8 @@ from unittest import TestCase, TestSuite from easybuild.tools.build_log import EasyBuildError import easybuild.tools.modules as modules +from easybuild.tools.toolkit import Toolkit +import easybuild.tools.toolkit as toolkit # Change the Modules class so i have complete control over its behaviour # NOTE: this heavily relies on the correct order of running tests @@ -11,7 +13,7 @@ class MockModule(modules.Modules): modules = [] - def available(self, name, *args): + def available(self, name=None, *args): if name == 'gzip': return [('gzip', '1.4')] elif name == 'icc': @@ -32,15 +34,15 @@ def get_software_root(*args): return "tmp" - -modules.Modules = MockModule -modules.get_software_root = MockModule().get_software_root - -from easybuild.tools.toolkit import Toolkit - class ToolkitTest(TestCase): def setUp(self): + # dynamically replace Modules class + toolkit.Modules = MockModule + modules.Modules = MockModule + modules.get_software_root = MockModule().get_software_root + toolkit.get_software_root = MockModule().get_software_root + self.tk_32bit = Toolkit("icc", "4.0.3-32bit") self.tk_64bit = Toolkit("GCC", "4.6.3") self.dummy_tk = Toolkit("dummy", "1.0") From 011890c2dc9212505e227dbe3b3bf249ed40aec8 Mon Sep 17 00:00:00 2001 From: Toon Willems Date: Mon, 30 Jul 2012 15:34:00 +0200 Subject: [PATCH 132/798] add tests for robot feature --- easybuild/test/robot.py | 61 +++++++++++++++++++++++++++++++++++++++++ easybuild/test/suite.py | 3 +- 2 files changed, 63 insertions(+), 1 deletion(-) create mode 100644 easybuild/test/robot.py diff --git a/easybuild/test/robot.py b/easybuild/test/robot.py new file mode 100644 index 0000000000..80561c1dd4 --- /dev/null +++ b/easybuild/test/robot.py @@ -0,0 +1,61 @@ +import os +from copy import deepcopy + +from unittest import TestCase, TestSuite +from easybuild.tools.build_log import EasyBuildError, getLog +import easybuild.build as build +import easybuild.tools.modules as modules +from easybuild.tools.modules import Modules + +orig_modules = modules.Modules +class MockModule(modules.Modules): + + def available(self, *args): + return [] + +base_easyconfig_dir = "easybuild/test/easyconfigs/" + +class RobotTest(TestCase): + + def setUp(self): + # replace Modules class with something we have control over + modules.Modules = MockModule + build.Modules = MockModule + + self.log = getLog("RobotTest") + + def runTest(self): + package = { + 'spec': '_', + 'module': ("name", "version"), + 'dependencies': [] + } + res = build.resolveDependencies([deepcopy(package)], None, self.log) + self.assertEqual([package], res) + + package_dep = { + 'spec': '_', + 'module': ("name", "version"), + 'dependencies': [('gzip', '1.4')] + } + res = build.resolveDependencies([deepcopy(package_dep)], base_easyconfig_dir, self.log) + # Dependency should be found + self.assertEqual(len(res), 2) + + # here we have include a Dependency in the package list + package['module'] = ("gzip", "1.4") + + res = build.resolveDependencies([deepcopy(package_dep), deepcopy(package)], None, self.log) + # all dependencies should be resolved + self.assertEqual(0, sum(len(pkg['dependencies']) for pkg in res)) + + # this should not resolve (cannot find gzip-1.4.eb) + self.assertRaises(EasyBuildError, build.resolveDependencies, [deepcopy(package_dep)], None, self.log) + + + def tearDown(self): + modules.Modules = orig_modules + + +def suite(): + return TestSuite([RobotTest()]) diff --git a/easybuild/test/suite.py b/easybuild/test/suite.py index 0bc3c0c5ab..df5e287aee 100644 --- a/easybuild/test/suite.py +++ b/easybuild/test/suite.py @@ -6,8 +6,9 @@ import easybuild.test.modules as m import easybuild.test.filetools as f import easybuild.test.repository as r +import easybuild.test.robot as robot import unittest -suite = unittest.TestSuite(map(lambda x: x.suite(), [t,r,e,mg,m,f,a])) +suite = unittest.TestSuite(map(lambda x: x.suite(), [t, r, e, mg, m, f, a, robot])) unittest.TextTestRunner().run(suite) From b76f74dc35075bc8e38c697621efd5b3096180b2 Mon Sep 17 00:00:00 2001 From: Kenneth Hoste Date: Mon, 30 Jul 2012 15:38:58 +0200 Subject: [PATCH 133/798] port support for building/installing OpenFOAM --- easybuild/easyblocks/o/openfoam.py | 133 +++++++++++++++++++++++++++++ easybuild/tools/toolkit.py | 3 +- 2 files changed, 135 insertions(+), 1 deletion(-) create mode 100644 easybuild/easyblocks/o/openfoam.py diff --git a/easybuild/easyblocks/o/openfoam.py b/easybuild/easyblocks/o/openfoam.py new file mode 100644 index 0000000000..221673a86a --- /dev/null +++ b/easybuild/easyblocks/o/openfoam.py @@ -0,0 +1,133 @@ +## +# Copyright 2009-2012 Stijn De Weirdt, Dries Verdegem, Kenneth Hoste, Pieter De Baets, Jens Timmerman +# +# This file is part of EasyBuild, +# originally created by the HPC team of the University of Ghent (http://ugent.be/hpc). +# +# http://github.com/hpcugent/easybuild +# +# EasyBuild is free software: you can redistribute it and/or modify +# it under the terms of the GNU General Public License as published by +# the Free Software Foundation v2. +# +# EasyBuild is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with EasyBuild. If not, see . +## +from distutils.version import LooseVersion +import os +import stat +from easybuild.framework.application import Application +from easybuild.tools.filetools import run_cmd, recursiveChmod + +class OpenFOAM(Application): + """Support for building and installing OpenFOAM.""" + + def __init__(self,*args,**kwargs): + """Specify that OpenFOAM should be built in install dir.""" + + Application.__init__(self, args,kwargs) + + self.build_in_installdir = True + + self.wm_compiler= None + self.wm_mplib = None + self.mpipath = None + + def configure(self): + """Configure OpenFOAM build by setting appropriate environment variables.""" + + # installation directory + os.putenv("FOAM_INST_DIR", self.installdir) + + # third party directory + thrdpartydir = "ThirdParty-%s" % self.version() + os.symlink(os.path.join("..", thrdpartydir), thrdpartydir) + os.putenv("WM_THIRD_PARTY_DIR", os.path.join(self.installdir, thrdpartydir)) + + # compiler + comp_fam = self.tk.toolkit_comp_family() + + if comp_fam == "GCC": + self.wm_compiler="Gcc" + + elif comp_fam == "Intel": + self.wm_compiler="Icc" + + else: + self.log.error("Unknown compiler family, don't know how to set WM_COMPILER") + + os.putenv("WM_COMPILER",self.wm_compiler) + + # type of MPI + mpi_type = self.tk.toolkit_mpi_type() + + if mpi_type == "Intel": + self.mpipath = os.path.join(os.environ['SOFTROOTIMPI'],'intel64') + self.wm_mplib = "IMPI" + + elif mpi_type == "QLogic": + self.mpipath = os.environ['SOFTROOTQLOGICMPI'] + self.wm_mplib = "MPICH" + + else: + self.log.error("Unknown MPI, don't know how to set MPI_ARCH_PATH, WM_MPLIB or FOAM_MPI_LIBBIN") + + os.putenv("WM_MPLIB", self.wm_mplib) + os.putenv("MPI_ARCH_PATH", self.mpipath) + os.putenv("FOAM_MPI_LIBBIN", self.mpipath) + + # parallel build spec + os.putenv("WM_NCOMPPROCS", str(self.getcfg('parallel'))) + + def make(self): + """Building is done in make_install.""" + pass + + def make_install(self): + """Build and install OpenFOAM.""" + + nameversion = "%s-%s"%(self.name(), self.version()) + + precmd = "source %s" % os.path.join(self.builddir, nameversion, "etc", "bashrc") + + # make directly in install directory + cmd="%(precmd)s && %(premakeopts)s %(makecmd)s"%{'precmd':precmd, + 'premakeopts':self.getcfg('premakeopts'), + 'makecmd':os.path.join(self.builddir, nameversion, "Allwmake")} + run_cmd(cmd,log_all=True,simple=True,logOutput=True) + + # fix file permissions of various files (only known to be required for v1.x) + if LooseVersion(self.version()) <= LooseVersion('2'): + installPath = "%s/%s-%s"%(self.installdir, self.name(), self.version()) + + for path in ["applications", "bin", "doc", "etc", "lib", "src", "tutorials"]: + # Make directories readable for others + recursiveChmod(os.path.join(installPath, path), stat.S_IROTH, add=True) + + for path in ["applications", "bin", "lib"]: + # Make directories executable for others + recursiveChmod(os.path.join(installPath, path), stat.S_IXOTH, add=True) + + def make_module_extra(self): + """Define extra environment variables required by OpenFOAM""" + + txt = Application.make_module_extra(self) + + env_vars = [("WM_PROJECT_VERSION", self.version()), + ("FOAM_INST_DIR", "$root"), + ("WM_COMPILER", self.wm_compiler), + ("WM_MPLIB", self.wm_mplib), + ("MPI_ARCH_PATH", self.mpipath), + ("FOAM_BASH", "$root/%s-%s/etc/bashrc" % (self.name(), self.version())), + ("FOAM_CSH", "$root/%s-%s/etc/cshrc" % (self.name(), self.version())), + ] + + for env_var in env_vars: + txt += "setenv\t%s\t%s" % env_var + + return txt diff --git a/easybuild/tools/toolkit.py b/easybuild/tools/toolkit.py index e132dac1d4..b43a4ce149 100644 --- a/easybuild/tools/toolkit.py +++ b/easybuild/tools/toolkit.py @@ -782,7 +782,8 @@ def toolkit_mpi_type(self): mpi_types = { # always use tuples as keys! ('impi', ):'Intel', # Intel MPI - ('OpenMPI', ):'OpenMPI' # OpenMPI + ('OpenMPI', ):'OpenMPI', # OpenMPI + ('QLogicMPI', ):'QLogic' # QLogic MPI } return self.det_toolkit_type("type of mpi library", mpi_types) From 531681b26d6097433e29411960f53d4433fe3fd4 Mon Sep 17 00:00:00 2001 From: Toon Willems Date: Mon, 30 Jul 2012 15:43:58 +0200 Subject: [PATCH 134/798] test recursive dependency resolution --- easybuild/test/easyconfigs/GCC-4.6.3.eb | 26 +++++++++++++++++++ .../test/easyconfigs/gzip-1.4-GCC-4.6.3.eb | 17 ++++++++++++ easybuild/test/robot.py | 8 ++++++ 3 files changed, 51 insertions(+) create mode 100644 easybuild/test/easyconfigs/GCC-4.6.3.eb create mode 100644 easybuild/test/easyconfigs/gzip-1.4-GCC-4.6.3.eb diff --git a/easybuild/test/easyconfigs/GCC-4.6.3.eb b/easybuild/test/easyconfigs/GCC-4.6.3.eb new file mode 100644 index 0000000000..9f6d17718c --- /dev/null +++ b/easybuild/test/easyconfigs/GCC-4.6.3.eb @@ -0,0 +1,26 @@ +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'] + +## compiler class +moduleclass='compiler' + +# building GCC sometimes fails if make parallelism is too high, so let's limit it +maxparallel=4 diff --git a/easybuild/test/easyconfigs/gzip-1.4-GCC-4.6.3.eb b/easybuild/test/easyconfigs/gzip-1.4-GCC-4.6.3.eb new file mode 100644 index 0000000000..6f8a868d57 --- /dev/null +++ b/easybuild/test/easyconfigs/gzip-1.4-GCC-4.6.3.eb @@ -0,0 +1,17 @@ +name = 'gzip' +version = '1.4' + +homepage = "http://www.gzip.org/" +description = "gzip (GNU zip) is a popular data compression program as a replacement for compress" + +# test toolkit specification +toolkit = {'name':'GCC','version':'4.6.3'} + +# 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': []} diff --git a/easybuild/test/robot.py b/easybuild/test/robot.py index 80561c1dd4..283b229f6f 100644 --- a/easybuild/test/robot.py +++ b/easybuild/test/robot.py @@ -52,6 +52,14 @@ def runTest(self): # this should not resolve (cannot find gzip-1.4.eb) self.assertRaises(EasyBuildError, build.resolveDependencies, [deepcopy(package_dep)], None, self.log) + # test if dependencies of an automatically found file are also loaded + package_dep['dependencies'] = [('gzip', "1.4-GCC-4.6.3")] + res = build.resolveDependencies([deepcopy(package_dep)], base_easyconfig_dir, self.log) + + # GCC should be first (required by gzip dependency) + self.assertEqual(('GCC', '4.6.3'), res[0]['module']) + self.assertEqual(('name', 'version'), res[-1]['module']) + def tearDown(self): modules.Modules = orig_modules From cebdd96f9158c8c120ad1db3f8a3ea5274280dfe Mon Sep 17 00:00:00 2001 From: Toon Willems Date: Mon, 30 Jul 2012 16:30:03 +0200 Subject: [PATCH 135/798] make extra options easier to define --- easybuild/easyblocks/a/atlas.py | 5 +---- easybuild/easyblocks/c/cp2k.py | 4 +--- easybuild/easyblocks/g/gcc.py | 4 +--- easybuild/easyblocks/i/imkl.py | 4 +--- easybuild/easyblocks/i/intelbase.py | 10 +++++----- easybuild/easyblocks/i/itac.py | 4 +--- easybuild/easyblocks/l/lapack.py | 4 +--- easybuild/easyblocks/l/libsmm.py | 7 +------ easybuild/easyblocks/m/mvapich2.py | 5 +---- easybuild/easyblocks/w/wps.py | 5 +---- easybuild/easyblocks/w/wrf.py | 4 +--- easybuild/framework/application.py | 11 ++++++----- 12 files changed, 21 insertions(+), 46 deletions(-) diff --git a/easybuild/easyblocks/a/atlas.py b/easybuild/easyblocks/a/atlas.py index 78275398b0..559d29e7cd 100644 --- a/easybuild/easyblocks/a/atlas.py +++ b/easybuild/easyblocks/a/atlas.py @@ -32,17 +32,14 @@ class ATLAS(Application): """ def __init__(self, *args, **kwargs): - Application.__init__(self, *args, **kwargs) def extra_options(self): - vars = Application.extra_options(self) extra_vars = { 'ignorethrottling':[False, "Ignore check done by ATLAS for CPU throttling (not recommended) (default: False)"], 'full_lapack': [False, "Build a full LAPACK library (requires netlib's LAPACK) (default: False)"], 'sharedlibs':[False, "Enable building of shared libs as well (default: False)"] } - vars.update(extra_vars) - return vars + return Application.extra_options(self, extra_vars) def configure(self): diff --git a/easybuild/easyblocks/c/cp2k.py b/easybuild/easyblocks/c/cp2k.py index bdc3b39791..70dfb9ec96 100644 --- a/easybuild/easyblocks/c/cp2k.py +++ b/easybuild/easyblocks/c/cp2k.py @@ -57,7 +57,6 @@ def __init__(self, *args, **kwargs): self.make_instructions = '' def extra_options(self): - vars = Application.extra_options(self) extra_vars = {'type':['popt',"Type of build ('popt' or 'psmp') (default: 'popt)"], 'typeopt':[True,"Enable optimization (default: True)"], 'libint':[True,"Use LibInt (default: True)"], @@ -69,8 +68,7 @@ def extra_options(self): 'ignore_regtest_fails':[False, "Ignore failures in regression test (should be used with care) (default: False)."], 'maxtasks':[3, "Maximum number of CP2K instances run at the same time during testing (default: 3)"] } - vars.update(extra_vars) - return vars + return Application.extra_options(self, extra_vars) def _generateMakefile(self, options): diff --git a/easybuild/easyblocks/g/gcc.py b/easybuild/easyblocks/g/gcc.py index 336e84b511..f4ce4248c2 100644 --- a/easybuild/easyblocks/g/gcc.py +++ b/easybuild/easyblocks/g/gcc.py @@ -40,7 +40,6 @@ def __init__(self, *args, **kwargs): self.stagedbuild = False def extra_options(self): - vars = Application.extra_options(self) extra_vars = {'languages':[[], "List of languages to build GCC for (--enable-languages) (default: [])"], 'withlto':[True, "Enable LTO support (default: True)"], 'withcloog':[False, "Build GCC with CLooG support (default: False)."], @@ -48,8 +47,7 @@ def extra_options(self): 'pplwatchdog':[False, "Enable PPL watchdog (default: False)"], 'clooguseisl':[False, "Use ISL with CLooG or not (use PPL otherwise) (default: False)"] } - vars.update(extra_vars) - return vars + return Application.extra_options(self, extra_vars) def create_dir(self, dirname): diff --git a/easybuild/easyblocks/i/imkl.py b/easybuild/easyblocks/i/imkl.py index 2c888b6f02..2497e8a706 100644 --- a/easybuild/easyblocks/i/imkl.py +++ b/easybuild/easyblocks/i/imkl.py @@ -41,10 +41,8 @@ def __init__(self, *args, **kwargs): IntelBase.__init__(self, *args, **kwargs) def extra_options(self): - vars = IntelBase.extra_options(self) extra_vars = {'interfaces':[True, "Indicates whether interfaces should be built (default: True)"]} - vars.update(extra_vars) - return vars + return IntelBase.extra_options(self, extra_vars) def configure(self): diff --git a/easybuild/easyblocks/i/intelbase.py b/easybuild/easyblocks/i/intelbase.py index 349db0c224..cadb172b19 100644 --- a/easybuild/easyblocks/i/intelbase.py +++ b/easybuild/easyblocks/i/intelbase.py @@ -36,9 +36,9 @@ def __init__(self, *args, **kwargs): Application.__init__(self, *args, **kwargs) - def extra_options(self): - vars = Application.extra_options(self) - extra_vars = {'license':[None,"License file path (default: None)"], + def extra_options(self, extra_vars=None): + vars = Application.extra_options(self, extra_vars) + intel_vars = {'license':[None,"License file path (default: None)"], 'license_activation':['license_server', "Indicates license activation type (default: 'license_server')"], # 'usetmppath': # workaround for older SL5 version (5.5 and earlier) @@ -47,8 +47,8 @@ def extra_options(self): 'usetmppath':[False, "Use temporary path for installation (default: False)"], 'm32':[False, "Enable 32-bit toolkit (default: False)"], } - vars.update(extra_vars) - return vars + intel_vars.update(vars) + return intel_vars def clean_homedir(self): diff --git a/easybuild/easyblocks/i/itac.py b/easybuild/easyblocks/i/itac.py index 6b088fb704..16b89b7c00 100644 --- a/easybuild/easyblocks/i/itac.py +++ b/easybuild/easyblocks/i/itac.py @@ -35,10 +35,8 @@ def __init__(self, *args, **kwargs): IntelBase.__init__(self, *args, **kwargs) def extra_options(self): - vars = IntelBase.extra_options(self) extra_vars = {'preferredmpi':['impi3', "Preferred MPI type (default: 'impi3')"]} - vars.update(extra_vars) - return vars + return IntelBase.extra_options(self, extra_vars) def make_install(self): """ diff --git a/easybuild/easyblocks/l/lapack.py b/easybuild/easyblocks/l/lapack.py index dc2dce01a8..89b2ab7b9e 100644 --- a/easybuild/easyblocks/l/lapack.py +++ b/easybuild/easyblocks/l/lapack.py @@ -59,12 +59,10 @@ def __init__(self, *args, **kwargs): Application.__init__(self, *args, **kwargs) def extra_options(self): - vars = Application.extra_options(self) extra_vars = {'supply_blas':[False, "Supply BLAS lib to LAPACK for building (default: False)"], 'test_only':[False, "Only make tests, don't try and build LAPACK lib."] } - vars.update(extra_vars) - return vars + return Application.extra_options(self, extra_vars) def configure(self): diff --git a/easybuild/easyblocks/l/libsmm.py b/easybuild/easyblocks/l/libsmm.py index 0ed9ddb146..4f4c6f3507 100644 --- a/easybuild/easyblocks/l/libsmm.py +++ b/easybuild/easyblocks/l/libsmm.py @@ -39,16 +39,11 @@ def __init__(self, *args, **kwargs): def extra_options(self): # default dimensions dd = [1,4,5,6,9,13,16,17,22] - vars = Application.extra_options(self) extra_vars = {'transpose_flavour':[1, "Transpose flavour of routines (default: 1)"], 'max_tiny_dim':[12, "Maximum tiny dimension (default: 12)"], 'dims':[dd, "Generate routines for these matrix dims (default: %s)" % dd] } - vars.update(extra_vars) - return vars - - - + return Application.extra_options(self, extra_vars) def configure(self): """Configure build: change to tools/build_libsmm dir""" diff --git a/easybuild/easyblocks/m/mvapich2.py b/easybuild/easyblocks/m/mvapich2.py index c8c2eb932e..cee00d6f36 100644 --- a/easybuild/easyblocks/m/mvapich2.py +++ b/easybuild/easyblocks/m/mvapich2.py @@ -31,16 +31,13 @@ def __init__(self, *args, **kwargs): Application.__init__(self, *args, **kwargs) def extra_options(self): - vars = Application.extra_options(self) extra_vars = {'withchkpt':[False, "Enable checkpointing support (required BLCR) (default: False)"], 'withlimic2':[False, "Enable LiMIC2 support for intra-node communication (default: False)"], 'withmpe':[False, "Build MPE routines (default: False)"], 'debug':[False, "Enable debug build (which is slower) (default: False)"], 'rdma_type':["gen2", "Specify the RDMA type (gen2/udapl) (default: gen2)"] } - vars.update(extra_vars) - return vars - + return Application.extra_options(self, extra_vars) def configure(self): diff --git a/easybuild/easyblocks/w/wps.py b/easybuild/easyblocks/w/wps.py index ca388927f0..d2f348faaf 100644 --- a/easybuild/easyblocks/w/wps.py +++ b/easybuild/easyblocks/w/wps.py @@ -48,14 +48,11 @@ def extra_options(self): "http://www.mmm.ucar.edu/wrf/src/wps_files/geog.tar.gz" # 697MB download, 16GB unpacked! ] - vars = Application.extra_options(self) extra_vars = {'buildtype':[None, "Specify the type of build (smpar: OpenMP, dmpar: MPI)."], 'runtest':[True, "Build and run WPS tests (default: True)."], 'testdata':[testdata_urls, "URL to test data required to run WPS test (default: %s)." % testdata_urls] } - vars.update(extra_vars) - - return vars + return Application.extra_options(self, extra_vars) def configure(self): """Configure build: diff --git a/easybuild/easyblocks/w/wrf.py b/easybuild/easyblocks/w/wrf.py index b477a4f30b..9c41b603c0 100644 --- a/easybuild/easyblocks/w/wrf.py +++ b/easybuild/easyblocks/w/wrf.py @@ -38,14 +38,12 @@ def __init__(self,*args,**kwargs): self.comp_fam = None def extra_options(self): - vars = Application.extra_options(self) extra_vars = {'buildtype':[None, "Specify the type of build (serial, smpar (OpenMP), " \ "dmpar (MPI), dm+sm (hybrid OpenMP/MPI))."], 'rewriteopts':[True, "Replace -O3 with CFLAGS/FFLAGS (default: True)."], 'runtest':[True, "Build and run WRF tests (default: True)."] } - vars.update(extra_vars) - return vars + return Application.extra_options(self, extra_vars) def configure(self): """Configure build: diff --git a/easybuild/framework/application.py b/easybuild/framework/application.py index 0210d1c0a6..21121e80c0 100644 --- a/easybuild/framework/application.py +++ b/easybuild/framework/application.py @@ -239,14 +239,15 @@ def addsource(self, listOfSources=None): self.log.info("Added sources: %s" % self.src) - def extra_options(self): + def extra_options(self, extra=None): """ Extra options method which will be passed to the EasyBlock constructor. - Subclasses should overwrite this method (but not forget to call super, - unless they plan on disregarding parent options) - NOTE: update on dictionary returns None, so fancy one-liners will NOT work + Subclasses should call this method with a dict """ - return {} + if extra == None: + return {} + else + return extra def prepare_build(self): """ From f392bd9c851b565a6a3d66540d777feeaf8e82c4 Mon Sep 17 00:00:00 2001 From: Toon Willems Date: Mon, 30 Jul 2012 16:42:24 +0200 Subject: [PATCH 136/798] use new osdep check --- easybuild/framework/easyblock.py | 17 +++++++++++++---- 1 file changed, 13 insertions(+), 4 deletions(-) diff --git a/easybuild/framework/easyblock.py b/easybuild/framework/easyblock.py index f8b1443aeb..424af7f9d0 100644 --- a/easybuild/framework/easyblock.py +++ b/easybuild/framework/easyblock.py @@ -244,12 +244,21 @@ def _validate(self, attr, values): def _os_dependency_check(self, dep): """ - will run rpm -q $dep, to see if dependency is available + Check if package is available from OS. """ - # TODO: extend this with more cross platform functionality + # - uses rpm -q and dpkg -s --> can be run as non-root!! + # - fallback on which + # - should be extended to files later? + if run_cmd('which rpm', simple=True): + cmd = "rpm -q %s" % d + elif run_cmd('which dpkg', simple=True): + cmd = "dpkg -s %s" % d + else: + # fallback for when os-Dependency is a binary + cmd = "which %s" % d + try: - cmd = "rpm -q %s" % dep - return run_cmd(cmd, simple=True) + return run_cmd(cmd, simple=True, log_all=False, log_ok=False) except: return False From ae3536b2d18c8ab7969a95624cd3251befdc2a1d Mon Sep 17 00:00:00 2001 From: Toon Willems Date: Mon, 30 Jul 2012 16:42:54 +0200 Subject: [PATCH 137/798] d -> dep --- easybuild/framework/easyblock.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/easybuild/framework/easyblock.py b/easybuild/framework/easyblock.py index 424af7f9d0..23ca452a5d 100644 --- a/easybuild/framework/easyblock.py +++ b/easybuild/framework/easyblock.py @@ -250,12 +250,12 @@ def _os_dependency_check(self, dep): # - fallback on which # - should be extended to files later? if run_cmd('which rpm', simple=True): - cmd = "rpm -q %s" % d + cmd = "rpm -q %s" % dep elif run_cmd('which dpkg', simple=True): - cmd = "dpkg -s %s" % d + cmd = "dpkg -s %s" % dep else: # fallback for when os-Dependency is a binary - cmd = "which %s" % d + cmd = "which %s" % dep try: return run_cmd(cmd, simple=True, log_all=False, log_ok=False) From 4730c533434fef158315e4369cc722bea4ed5e89 Mon Sep 17 00:00:00 2001 From: Toon Willems Date: Mon, 30 Jul 2012 16:54:46 +0200 Subject: [PATCH 138/798] remove dirty comment --- easybuild/tools/toolkit.py | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/easybuild/tools/toolkit.py b/easybuild/tools/toolkit.py index 440bec00dd..80c6fd5995 100644 --- a/easybuild/tools/toolkit.py +++ b/easybuild/tools/toolkit.py @@ -314,11 +314,10 @@ def prepareACML(self): else: log.error("Don't know which compiler-specific subdir for ACML to use.") self.vars['LDFLAGS'] += " -L%(acml)s/%(comp)s64/lib/ " % { - # "%(acml)s/%(comp)s64/lib/libacml.a -lpthread" % { 'comp':compiler, 'acml':os.environ['SOFTROOTACML'] } - self.vars['LIBBLAS'] = " -lacml_mv -lacml " #-lpthread" + self.vars['LIBBLAS'] = " -lacml_mv -lacml " self.vars['LIBBLAS_MT'] = self.vars['LIBBLAS'] From 8783848032ac68a7ae3a0e743548eeccafe32543 Mon Sep 17 00:00:00 2001 From: Toon Willems Date: Mon, 30 Jul 2012 16:55:00 +0200 Subject: [PATCH 139/798] remove useless arguments --- easybuild/framework/application.py | 9 ++------- 1 file changed, 2 insertions(+), 7 deletions(-) diff --git a/easybuild/framework/application.py b/easybuild/framework/application.py index 21121e80c0..614649ecef 100644 --- a/easybuild/framework/application.py +++ b/easybuild/framework/application.py @@ -47,14 +47,14 @@ class Application: ## INIT # TODO: never initializd with other parameters, remove them - def __init__(self, path, name=None, version=None, newBuild=True, debug=False): + def __init__(self, path): """ Initialize the Application instance. """ self.log = None self.logfile = None self.loghandler = None - self.logdebug = debug + self.logdebug = False self.patches = [] self.src = [] @@ -81,10 +81,6 @@ def __init__(self, path, name=None, version=None, newBuild=True, debug=False): # indicates whether build should be performed in installation dir self.build_in_installdir = False - # set name and version if they're provided - if name and version: - self.set_name_version(name, version, newBuild) - # allow a post message to be set, which can be shown as last output self.postmsg = '' self.setlogger() @@ -252,7 +248,6 @@ def extra_options(self, extra=None): def prepare_build(self): """ prepare for building - TODO: this should be consolidated with ready2build """ ## check EasyBuild version From 28b0f01d8cfa7e94bbda20697483aa928e51bdda Mon Sep 17 00:00:00 2001 From: Toon Willems Date: Mon, 30 Jul 2012 16:59:30 +0200 Subject: [PATCH 140/798] xfj -> xjf in tar command --- easybuild/tools/filetools.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/easybuild/tools/filetools.py b/easybuild/tools/filetools.py index ade104989f..db5f3ef91c 100644 --- a/easybuild/tools/filetools.py +++ b/easybuild/tools/filetools.py @@ -129,9 +129,9 @@ def extractCmd(fn, overwrite=False): if ff[-1] == 'bz2': ftype = 'bunzip2 %s' if ff[-2] == 'tar': - ftype = 'tar xfj %s' + ftype = 'tar xjf %s' if ff[-1] == 'tbz': - ftype = 'tar xfj %s' + ftype = 'tar xjf %s' # tarball if ff[-1] == 'tar': From 084d46003095cf7601ad9c7ee7471b12d72f7d23 Mon Sep 17 00:00:00 2001 From: Kenneth Hoste Date: Mon, 30 Jul 2012 17:22:42 +0200 Subject: [PATCH 141/798] fix log_output argument of run_cmd, make sure -no-prec-div is used when building with Intel compilers --- easybuild/easyblocks/o/openfoam.py | 5 ++++- easybuild/scripts/port_easyblock.py | 1 + 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/easybuild/easyblocks/o/openfoam.py b/easybuild/easyblocks/o/openfoam.py index 221673a86a..775dcb96f8 100644 --- a/easybuild/easyblocks/o/openfoam.py +++ b/easybuild/easyblocks/o/openfoam.py @@ -58,6 +58,9 @@ def configure(self): elif comp_fam == "Intel": self.wm_compiler="Icc" + # make sure -no-prec-div is used with Intel compilers + self.updatecfg('premakeopts', 'CFLAGS="$CFLAGS -no-prec-div" CXXFLAGS="$CXXFLAGS -no-prec-div"') + else: self.log.error("Unknown compiler family, don't know how to set WM_COMPILER") @@ -99,7 +102,7 @@ def make_install(self): cmd="%(precmd)s && %(premakeopts)s %(makecmd)s"%{'precmd':precmd, 'premakeopts':self.getcfg('premakeopts'), 'makecmd':os.path.join(self.builddir, nameversion, "Allwmake")} - run_cmd(cmd,log_all=True,simple=True,logOutput=True) + run_cmd(cmd,log_all=True,simple=True,log_output=True) # fix file permissions of various files (only known to be required for v1.x) if LooseVersion(self.version()) <= LooseVersion('2'): diff --git a/easybuild/scripts/port_easyblock.py b/easybuild/scripts/port_easyblock.py index b84af99138..64957d0684 100755 --- a/easybuild/scripts/port_easyblock.py +++ b/easybuild/scripts/port_easyblock.py @@ -105,6 +105,7 @@ def refactor(txt): 'importCfg':'process_ebfile', 'logall':'log_all', 'logok':'log_ok', + 'logOutput':'log_output', 'makeBuildDir':'make_builddir', 'makeDir':'make_dir', 'makeInstall':'make_install', From 38ad1e77ebb0b570cd05ec4a3054062e364c8d74 Mon Sep 17 00:00:00 2001 From: Toon Willems Date: Mon, 30 Jul 2012 17:54:12 +0200 Subject: [PATCH 142/798] create tempfile for script --- easybuild/framework/application.py | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/easybuild/framework/application.py b/easybuild/framework/application.py index 86a92c6136..707979acc2 100644 --- a/easybuild/framework/application.py +++ b/easybuild/framework/application.py @@ -26,6 +26,7 @@ import os import re import shutil +import tempfile import time import urllib @@ -96,6 +97,9 @@ def __init__(self, name=None, version=None, newBuild=True, debug=False): # allow a post message to be set, which can be shown as last output self.postmsg = '' + # tempfile for the script which can be sourced + self.script_file = tempfile.NamedTemporaryFile(dir='/tmp') + # generic configuration parameters self.cfg = { 'name':[None, "Name of software"], @@ -926,8 +930,10 @@ def print_environ(self): self.log.debug("Loaded modules:\n%s" % mods) if changed: self.log.debug("Added to environment:\n%s" % text) + self.script_file.write(text) if unset: self.log.debug("Removed from environment:\n%s" % unset_text) + self.script_file.write(unset_text) self.orig_environ = copy.deepcopy(os.environ) From 66584f22482434d33d407c089790e54b9bbd9cac Mon Sep 17 00:00:00 2001 From: Kenneth Hoste Date: Mon, 30 Jul 2012 18:08:44 +0200 Subject: [PATCH 143/798] add newlines in module file --- easybuild/easyblocks/o/openfoam.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/easybuild/easyblocks/o/openfoam.py b/easybuild/easyblocks/o/openfoam.py index 775dcb96f8..248cd8ee29 100644 --- a/easybuild/easyblocks/o/openfoam.py +++ b/easybuild/easyblocks/o/openfoam.py @@ -131,6 +131,6 @@ def make_module_extra(self): ] for env_var in env_vars: - txt += "setenv\t%s\t%s" % env_var + txt += "setenv\t%s\t%s\n" % env_var return txt From 2974deff296a597f134eed147e3a1ff02c08e038 Mon Sep 17 00:00:00 2001 From: Toon Willems Date: Tue, 31 Jul 2012 09:15:42 +0200 Subject: [PATCH 144/798] log env vars to script --- easybuild/framework/application.py | 17 ++++++++++++++++- 1 file changed, 16 insertions(+), 1 deletion(-) diff --git a/easybuild/framework/application.py b/easybuild/framework/application.py index 707979acc2..833ac24379 100644 --- a/easybuild/framework/application.py +++ b/easybuild/framework/application.py @@ -31,6 +31,7 @@ import urllib import easybuild +import easybuild.tools.config as config from easybuild.tools.build_log import EasyBuildError, initLogger, removeLogHandler,print_msg from easybuild.tools.config import source_path, buildPath, installPath from easybuild.tools.filetools import unpack, patch, run_cmd, convertName @@ -98,7 +99,7 @@ def __init__(self, name=None, version=None, newBuild=True, debug=False): self.postmsg = '' # tempfile for the script which can be sourced - self.script_file = tempfile.NamedTemporaryFile(dir='/tmp') + self.script_file = tempfile.NamedTemporaryFile() # generic configuration parameters self.cfg = { @@ -974,6 +975,7 @@ def postproc(self): def cleanup(self): """ Cleanup leftover mess: remove/clean build directory + Move temporary files into log directory except when we're building in the installation directory, otherwise we remove the installation @@ -993,6 +995,19 @@ def cleanup(self): except OSError, err: self.log.exception("Cleaning up builddir %s failed: %s" % (self.builddir, err)) + logdir = os.path.join(self.installdir, config.logPath()) + actual_script_path = os.path.join(logdir, "env-vars.sh") + + if not os.path.isdir(logdir): + os.makedirs(logdir) + + # move the temporary file to the actual destination + self.script_file.seek(0) + dest = open(actual_script_path, "w") + shutil.copyfileobj(self.script_file, dest) + dest.close() + self.script_file.close() + def sanitycheck(self): """ Do a sanity check on the installation From 389c8eea418f0a82ea1268fdd770e048b9ff021f Mon Sep 17 00:00:00 2001 From: Toon Willems Date: Tue, 31 Jul 2012 09:16:43 +0200 Subject: [PATCH 145/798] fix syntax error --- easybuild/framework/application.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/easybuild/framework/application.py b/easybuild/framework/application.py index 614649ecef..bf5c9ddfe9 100644 --- a/easybuild/framework/application.py +++ b/easybuild/framework/application.py @@ -242,7 +242,7 @@ def extra_options(self, extra=None): """ if extra == None: return {} - else + else: return extra def prepare_build(self): From ff58e83bebdf192422c00b7ed5fffacdb2f00bb2 Mon Sep 17 00:00:00 2001 From: Toon Willems Date: Tue, 31 Jul 2012 09:21:16 +0200 Subject: [PATCH 146/798] regtest uses debug argument --- easybuild/framework/application.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/easybuild/framework/application.py b/easybuild/framework/application.py index bf5c9ddfe9..089b840b9b 100644 --- a/easybuild/framework/application.py +++ b/easybuild/framework/application.py @@ -47,14 +47,14 @@ class Application: ## INIT # TODO: never initializd with other parameters, remove them - def __init__(self, path): + def __init__(self, path, debug=False): """ Initialize the Application instance. """ self.log = None self.logfile = None self.loghandler = None - self.logdebug = False + self.logdebug = debug self.patches = [] self.src = [] From 7b550ec273446805807d8b230ae59a1a92dabbb9 Mon Sep 17 00:00:00 2001 From: Toon Willems Date: Tue, 31 Jul 2012 09:35:13 +0200 Subject: [PATCH 147/798] better output to script file --- easybuild/framework/application.py | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/easybuild/framework/application.py b/easybuild/framework/application.py index 833ac24379..fa1552cd7e 100644 --- a/easybuild/framework/application.py +++ b/easybuild/framework/application.py @@ -931,10 +931,11 @@ def print_environ(self): self.log.debug("Loaded modules:\n%s" % mods) if changed: self.log.debug("Added to environment:\n%s" % text) - self.script_file.write(text) if unset: self.log.debug("Removed from environment:\n%s" % unset_text) - self.script_file.write(unset_text) + + if text or unset_text: + self.script_file.write("\n".join([text, unset_text])) self.orig_environ = copy.deepcopy(os.environ) From 7fdaaef611c69e44361cf55864a43fb886e9ce7c Mon Sep 17 00:00:00 2001 From: Toon Willems Date: Tue, 31 Jul 2012 09:45:21 +0200 Subject: [PATCH 148/798] add filter for specific keys --- easybuild/framework/application.py | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/easybuild/framework/application.py b/easybuild/framework/application.py index fa1552cd7e..7886a24ea7 100644 --- a/easybuild/framework/application.py +++ b/easybuild/framework/application.py @@ -914,7 +914,12 @@ def print_environ(self): """ mods = "\n".join(["module load %s/%s" % (m['name'], m['version']) for m in Modules().loaded_modules()]) - env = os.environ + filter = ["_LMFILES_","LOADEDMODULES"] + + env = copy.deepcopy(os.environ) + + for key in filter: + env.pop(key, '') changed = [(k,env[k]) for k in env if k not in self.orig_environ] for k in env: @@ -937,7 +942,7 @@ def print_environ(self): if text or unset_text: self.script_file.write("\n".join([text, unset_text])) - self.orig_environ = copy.deepcopy(os.environ) + self.orig_environ = env def postproc(self): From 68ef1703006273b7b88727753e66324ecb5d594c Mon Sep 17 00:00:00 2001 From: Toon Willems Date: Tue, 31 Jul 2012 09:50:34 +0200 Subject: [PATCH 149/798] because make_module doesn't work if test_only we cannot run the sanitycheck --- easybuild/easyblocks/l/lapack.py | 15 ++++++++------- 1 file changed, 8 insertions(+), 7 deletions(-) diff --git a/easybuild/easyblocks/l/lapack.py b/easybuild/easyblocks/l/lapack.py index 89b2ab7b9e..302b6a00ee 100644 --- a/easybuild/easyblocks/l/lapack.py +++ b/easybuild/easyblocks/l/lapack.py @@ -201,13 +201,14 @@ def make_module(self, fake=False): def sanitycheck(self): """ - Custom sanity check for LAPACK. + Custom sanity check for LAPACK. only run when not testing """ - if not self.getcfg('sanityCheckPaths'): - self.setcfg('sanityCheckPaths',{'files':["lib/%s"%x for x in ["liblapack.a","libtmglib.a"]], - 'dirs':[] - }) + if not self.getcfg('test_only'): + if not self.getcfg('sanityCheckPaths'): + self.setcfg('sanityCheckPaths',{'files':["lib/%s"%x for x in ["liblapack.a","libtmglib.a"]], + 'dirs':[] + }) - self.log.info("Customized sanity check paths: %s"%self.getcfg('sanityCheckPaths')) + self.log.info("Customized sanity check paths: %s"%self.getcfg('sanityCheckPaths')) - Application.sanitycheck(self) + Application.sanitycheck(self) From 5b94dff7cd64db9064bffa14bc24d200b38d1bd2 Mon Sep 17 00:00:00 2001 From: Kenneth Hoste Date: Tue, 31 Jul 2012 09:50:40 +0200 Subject: [PATCH 150/798] fix sanity check for OpenFOAM --- easybuild/easyblocks/o/openfoam.py | 20 ++++++++++++++++++++ 1 file changed, 20 insertions(+) diff --git a/easybuild/easyblocks/o/openfoam.py b/easybuild/easyblocks/o/openfoam.py index 248cd8ee29..9fffe99716 100644 --- a/easybuild/easyblocks/o/openfoam.py +++ b/easybuild/easyblocks/o/openfoam.py @@ -116,6 +116,26 @@ def make_install(self): # Make directories executable for others recursiveChmod(os.path.join(installPath, path), stat.S_IXOTH, add=True) + def sanitycheck(self): + """Custom sanity check for OpenFOAM""" + + if not self.getcfg('sanityCheckPaths'): + + odir = "%s-%s" % (self.name(), self.version()) + tdir = "ThirdParty-%s" % self.version() + + pdiro = "linux64%sDPOpt" % self.wm_compiler + pdir = "linux64%s" % self.wm_compiler + + self.setcfg('sanityCheckPaths',{'files':["%s/etc/%s" % (odir, x) for x in ["bashrc", "cshrc"]], + 'dirs':["%s/platforms/%s/%s" % (odir, pdir, x) for x in ["bin", "lib"]] + + ["%s/platforms/%s/bin" % (tdir, pdiro), "%s/platforms/%s/lib" % (tdir, pdir)] + }) + + self.log.info("Customized sanity check paths: %s" % self.getcfg('sanityCheckPaths')) + + Application.sanitycheck(self) + def make_module_extra(self): """Define extra environment variables required by OpenFOAM""" From c1ce7bc187ddca7ca181f12f6630a4112b6cc876 Mon Sep 17 00:00:00 2001 From: Kenneth Hoste Date: Tue, 31 Jul 2012 09:50:59 +0200 Subject: [PATCH 151/798] check loading of module for errors --- easybuild/framework/application.py | 13 +++++++++---- easybuild/tools/modules.py | 5 ++++- 2 files changed, 13 insertions(+), 5 deletions(-) diff --git a/easybuild/framework/application.py b/easybuild/framework/application.py index 86a92c6136..ac59570699 100644 --- a/easybuild/framework/application.py +++ b/easybuild/framework/application.py @@ -1041,8 +1041,12 @@ def sanitycheck(self): mod_path.extend(Modules().modulePath) m = Modules(mod_path) self.log.debug("created module instance") - m.addModule([[self.name(), self.installversion]]) - m.load() + m.addModule([(self.name(), self.installversion)]) + try: + m.load() + except EasyBuildError, err: + self.log.debug("Loading module failed: %s" % err) + self.sanityCheckOK = False # chdir to installdir (beter environment for running tests) os.chdir(self.installdir) @@ -1057,7 +1061,6 @@ def sanitycheck(self): self.log.debug("Setting sanity check command to default") command = (None, None) - # Build substition dictionary check_cmd = { 'name': self.name().lower(), 'options': '-h' } @@ -1072,7 +1075,9 @@ def sanitycheck(self): out, ec = run_cmd(cmd, simple=False) if ec != 0: self.sanityCheckOK = False - self.log.debug("sanityCheckCommand exited with code %s (output: %s)" % (ec, out)) + self.log.debug("sanityCheckCommand %s exited with code %s (output: %s)" % (cmd, ec, out)) + else: + self.log.debug("sanityCheckCommand %s ran successfully! (output: %s)" % (cmd, out)) failed_pkgs = [pkg.name for pkg in self.instance_pkgs if not pkg.sanitycheck()] diff --git a/easybuild/tools/modules.py b/easybuild/tools/modules.py index a80f635b3b..6659e85457 100644 --- a/easybuild/tools/modules.py +++ b/easybuild/tools/modules.py @@ -189,7 +189,10 @@ def runModule(self, *args, **kwargs): else: # Change the environment - exec stdout + try: + exec stdout + except Exception, err: + raise EasyBuildError("Changing environment as dictated by module failed: %s" % err) # Process stderr result = [] From 288c1bc07520797a2c125140851e7434e8fb3155 Mon Sep 17 00:00:00 2001 From: Toon Willems Date: Tue, 31 Jul 2012 10:07:23 +0200 Subject: [PATCH 152/798] add header to script_file --- easybuild/framework/application.py | 3 +++ 1 file changed, 3 insertions(+) diff --git a/easybuild/framework/application.py b/easybuild/framework/application.py index 7886a24ea7..24eec47b40 100644 --- a/easybuild/framework/application.py +++ b/easybuild/framework/application.py @@ -847,6 +847,9 @@ def build(self): self.gen_installdir() self.make_builddir() + self.script_file.write("# EasyBuild version: %s for module %s/%s\n" % (easybuild.VERBOSE_VERSION, + self.name(), self.installversion)) + self.print_environ() ## SOURCE From 632debae280760077202385edfa4ebf5573652c0 Mon Sep 17 00:00:00 2001 From: Toon Willems Date: Tue, 31 Jul 2012 10:09:49 +0200 Subject: [PATCH 153/798] rename env-vars.sh -> easybuild-env-vars.sh --- easybuild/framework/application.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/easybuild/framework/application.py b/easybuild/framework/application.py index 24eec47b40..a2d07ab368 100644 --- a/easybuild/framework/application.py +++ b/easybuild/framework/application.py @@ -1005,7 +1005,7 @@ def cleanup(self): self.log.exception("Cleaning up builddir %s failed: %s" % (self.builddir, err)) logdir = os.path.join(self.installdir, config.logPath()) - actual_script_path = os.path.join(logdir, "env-vars.sh") + actual_script_path = os.path.join(logdir, "easybuild-env-vars.sh") if not os.path.isdir(logdir): os.makedirs(logdir) From 6adc3fd25d388b11067c1d5c746b9b3ac54c94ff Mon Sep 17 00:00:00 2001 From: Toon Willems Date: Tue, 31 Jul 2012 10:13:57 +0200 Subject: [PATCH 154/798] in cache -> cache --- easybuild/easyblocks/l/libsmm.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/easybuild/easyblocks/l/libsmm.py b/easybuild/easyblocks/l/libsmm.py index 4f4c6f3507..bc02e3b347 100644 --- a/easybuild/easyblocks/l/libsmm.py +++ b/easybuild/easyblocks/l/libsmm.py @@ -107,7 +107,7 @@ def make(self): # tiny dimensions are used as primitves and generated in an 'exhaustive' search. # They should be a sequence from 1 to N, -# where N is a number that is large enough to have good in cache performance +# where N is a number that is large enough to have good cache performance # (e.g. for modern SSE cpus 8 to 12) # Too large (>12?) is not beneficial, but increases the time needed to build the library # Too small (<8) will lead to a slow library, but the build might proceed quickly From 5556b5705c7eafc0274d5e7be836a807aa50b71d Mon Sep 17 00:00:00 2001 From: Toon Willems Date: Tue, 31 Jul 2012 10:16:50 +0200 Subject: [PATCH 155/798] self.cfg.toolkit() -> self.toolkit() --- easybuild/framework/application.py | 20 ++++++++++---------- 1 file changed, 10 insertions(+), 10 deletions(-) diff --git a/easybuild/framework/application.py b/easybuild/framework/application.py index 089b840b9b..d50f030ca2 100644 --- a/easybuild/framework/application.py +++ b/easybuild/framework/application.py @@ -308,10 +308,10 @@ def ready2build(self): self.log.warning("Loaded modules detected: %s" % loadedmods) # Do all dependencies have a toolkit version - self.cfg.toolkit().addDependencies(self.cfg.dependencies()) - if not len(self.cfg.dependencies()) == len(self.cfg.toolkit().dependencies): + self.toolkit().addDependencies(self.cfg.dependencies()) + if not len(self.cfg.dependencies()) == len(self.toolkit().dependencies): self.log.debug("dep %s (%s)\ntk.dep %s (%s)" % (len(self.cfg.dependencies()), self.cfg.dependencies(), - len(self.cfg.toolkit().dependencies), self.cfg.toolkit().dependencies)) + len(self.toolkit().dependencies), self.toolkit().dependencies)) self.log.error('Not all dependencies have a matching toolkit version') # Check if the application is not loaded at the moment @@ -623,7 +623,7 @@ def build(self): ## PATCH self.runstep('patch', [self.apply_patch], skippable=True) - self.cfg.toolkit().prepare(self.getcfg('onlytkmod')) + self.toolkit().prepare(self.getcfg('onlytkmod')) self.startfrom() ## CONFIGURE @@ -933,11 +933,11 @@ def make_builddir(self): if not self.build_in_installdir: # make a unique build dir ## if a tookitversion starts with a -, remove the - so prevent a -- in the path name - tkversion = self.cfg.toolkit().version + tkversion = self.toolkit().version if tkversion.startswith('-'): tkversion = tkversion[1:] - extra = "%s%s-%s%s" % (self.getcfg('versionprefix'), self.cfg.toolkit().name, tkversion, self.getcfg('versionsuffix')) + extra = "%s%s-%s%s" % (self.getcfg('versionprefix'), self.toolkit().name, tkversion, self.getcfg('versionsuffix')) localdir = os.path.join(buildPath(), self.name(), self.version(), extra) ald = os.path.abspath(localdir) @@ -1062,13 +1062,13 @@ def make_module_dep(self): load = unload = '' # Load toolkit - if self.cfg.toolkit().name != 'dummy': - load += self.moduleGenerator.loadModule(self.cfg.toolkit().name, self.cfg.toolkit().version) - unload += self.moduleGenerator.unloadModule(self.cfg.toolkit().name, self.cfg.toolkit().version) + if self.toolkit().name != 'dummy': + load += self.moduleGenerator.loadModule(self.toolkit().name, self.toolkit().version) + unload += self.moduleGenerator.unloadModule(self.toolkit().name, self.toolkit().version) # Load dependencies builddeps = self.cfg.builddependencies() - for dep in self.cfg.toolkit().dependencies: + for dep in self.toolkit().dependencies: if not dep in builddeps: self.log.debug("Adding %s/%s as a module dependency" % (dep['name'], dep['tk'])) load += self.moduleGenerator.loadModule(dep['name'], dep['tk']) From 74b868d1a18aadda23726bdc0215c5685c006b26 Mon Sep 17 00:00:00 2001 From: Toon Willems Date: Tue, 31 Jul 2012 10:18:59 +0200 Subject: [PATCH 156/798] small comment change --- easybuild/framework/easyblock.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/easybuild/framework/easyblock.py b/easybuild/framework/easyblock.py index 23ca452a5d..dae21bee0e 100644 --- a/easybuild/framework/easyblock.py +++ b/easybuild/framework/easyblock.py @@ -30,7 +30,7 @@ class EasyBlock: """ - Class which handles loading, reading, validation of easyblocks + Class which handles loading, reading, validation of easyconfigs """ # mandatory entries mandatory = ['name', 'version', 'homepage', 'description', 'toolkit'] From 762c25f90261e681c752c881a9c99268b943aec8 Mon Sep 17 00:00:00 2001 From: Jens Timmerman Date: Tue, 31 Jul 2012 10:27:34 +0200 Subject: [PATCH 157/798] Processed comments on pull request #24 --- easybuild/easyblocks/t/tbb.py | 20 +++++++++++++++++-- .../PASHA/Pasha-1.0.3-goalf-1.1.0-no-OFED.eb | 18 ----------------- .../p/PASHA/Pasha-1.0.3-ictce-4.0.6.eb | 2 ++ easybuild/easyconfigs/t/tbb/tbb-4.0.0.233.eb | 12 +++++++++-- easybuild/easyconfigs/t/tbb/tbb-4.0.5.339.eb | 14 ++++++++++--- 5 files changed, 41 insertions(+), 25 deletions(-) delete mode 100644 easybuild/easyconfigs/p/PASHA/Pasha-1.0.3-goalf-1.1.0-no-OFED.eb diff --git a/easybuild/easyblocks/t/tbb.py b/easybuild/easyblocks/t/tbb.py index 4581e92dd1..891f1f1002 100644 --- a/easybuild/easyblocks/t/tbb.py +++ b/easybuild/easyblocks/t/tbb.py @@ -21,6 +21,7 @@ import os import shutil +import glob from easybuild.easyblocks.i.intelbase import IntelBase class Tbb(IntelBase): @@ -31,7 +32,21 @@ class Tbb(IntelBase): def make_install(self): """overwrite make_install to add extra symlinks""" IntelBase.make_install(self) - self.libpath = "%s/tbb/libs/intel64/%s/" % (self.installdir, "cc4.1.0_libc2.4_kernel2.6.16.21") + + # save libdir + os.chdir(self.installdir) + libglob = 'tbb/libs/intel64/cc*libc*_kernel*' + libs = glob.glob(libglob) + if len(libs): + libdir = libs[-1] # take the last one, should be ordered by cc version. + else: + self.log.error("No libs found using %s in %s" % (libglob, self.installdir)) + self.libdir = libdir + + + self.libpath = "%s/tbb/libs/intel64/%s/" % (self.installdir, libdir) + # applications go looking into tbb/lib so we move what's in there to libs + # and symlink the right lib from /tbb/libs/intel64/... to lib installibpath = os.path.join(self.installdir, 'tbb', 'lib') shutil.move(installibpath, os.path.join(self.installdir, 'tbb', 'libs')) os.symlink(self.libpath, installibpath) @@ -41,7 +56,7 @@ def sanitycheck(self): if not self.getcfg('sanityCheckPaths'): self.setcfg('sanityCheckPaths', {'files':[], - 'dirs':["tbb/bin", "tbb/lib/"] + 'dirs':["tbb/bin", "tbb/lib/", "tbb/libs/"] }) self.log.info("Customized sanity check paths: %s" % self.getcfg('sanityCheckPaths')) @@ -52,6 +67,7 @@ def make_module_extra(self): """Add correct path to lib to LD_LIBRARY_PATH. and intel license file""" txt = IntelBase.make_module_extra(self) + # since we have symlinked it we could also use $SOFTROOTTBB/tbb/lib here txt += "prepend-path\t%s\t\t%s\n" % ('LD_LIBRARY_PATH', self.libpath) return txt diff --git a/easybuild/easyconfigs/p/PASHA/Pasha-1.0.3-goalf-1.1.0-no-OFED.eb b/easybuild/easyconfigs/p/PASHA/Pasha-1.0.3-goalf-1.1.0-no-OFED.eb deleted file mode 100644 index d400f697e1..0000000000 --- a/easybuild/easyconfigs/p/PASHA/Pasha-1.0.3-goalf-1.1.0-no-OFED.eb +++ /dev/null @@ -1,18 +0,0 @@ -name='Pasha' -version='1.0.3' - -homepage='http://pasha.sourceforge.net/' -description="PASHA is a parallel short read assembler for large genomes using de Bruijn graphs." - -toolkit={'name':'goalf','version':'1.1.0-no-OFED'} -toolkitopts={'pic':True,'opt':True,'optarch':True} - -dependencies=[ - ('tbb','- - -sources=['%s-%s.tar.gz' % (name, version)] -sourceURLs=[ - 'http://downloads.sourceforge.net/pasha', -] - -parallel=1 diff --git a/easybuild/easyconfigs/p/PASHA/Pasha-1.0.3-ictce-4.0.6.eb b/easybuild/easyconfigs/p/PASHA/Pasha-1.0.3-ictce-4.0.6.eb index 4148d89f07..1b01d1ce2b 100644 --- a/easybuild/easyconfigs/p/PASHA/Pasha-1.0.3-ictce-4.0.6.eb +++ b/easybuild/easyconfigs/p/PASHA/Pasha-1.0.3-ictce-4.0.6.eb @@ -19,4 +19,6 @@ sourceURLs=[ patches=[ 'intelmpi.patch', ] + +# Pasha's makefile is not suited for parallel execution. parallel=1 diff --git a/easybuild/easyconfigs/t/tbb/tbb-4.0.0.233.eb b/easybuild/easyconfigs/t/tbb/tbb-4.0.0.233.eb index 080795776c..8a73e0e9fb 100644 --- a/easybuild/easyconfigs/t/tbb/tbb-4.0.0.233.eb +++ b/easybuild/easyconfigs/t/tbb/tbb-4.0.0.233.eb @@ -2,7 +2,14 @@ name='tbb' version='4.0.0.233' homepage='http://software.intel.com/en-us/articles/intel-tbb/' -description="""Intel Threading Building Blocks 4.0 (Intel TBB) is a widely used, award-winning C++ template library for creating reliable, portable, and scalable parallel applications. Use Intel TBB for a simple and rapid way of developing robust task-based parallel applications that scale to available processor cores, are compatible with multiple environments, and are easier to maintain. Intel TBB is the most proficient way to implement future-proof parallel applications that tap into the power and performance of multicore and manycore hardware platforms.""" +description="""Intel Threading Building Blocks 4.0 (Intel TBB) + is a widely used, award-winning C++ template library for creating reliable, + portable, and scalable parallel applications. + Use Intel TBB for a simple and rapid way of developing robust task-based + parallel applications that scale to available processor cores, are compatible + with multiple environments, and are easier to maintain. + Intel TBB is the most proficient way to implement future-proof parallel applications + that tap into the power and performance of multicore and manycore hardware platforms.""" toolkit={'name':'dummy','version':'dummy'} @@ -16,4 +23,5 @@ moduleclass='lib' dontcreateinstalldir='True' ## licensepath -license="/apps/gent/licenses/intel" +import os +license=os.path.join(os.getenv('HOME'),"licenses","intel","license.lic") diff --git a/easybuild/easyconfigs/t/tbb/tbb-4.0.5.339.eb b/easybuild/easyconfigs/t/tbb/tbb-4.0.5.339.eb index d7322f218e..597a88a488 100644 --- a/easybuild/easyconfigs/t/tbb/tbb-4.0.5.339.eb +++ b/easybuild/easyconfigs/t/tbb/tbb-4.0.5.339.eb @@ -2,8 +2,15 @@ name='tbb' version='4.0.5.339' homepage='http://software.intel.com/en-us/articles/intel-tbb/' -description="""Intel Threading Building Blocks 4.0 (Intel TBB) is a widely used, award-winning C++ template library for creating reliable, portable, and scalable parallel applications. Use Intel TBB for a simple and rapid way of developing robust task-based parallel applications that scale to available processor cores, are compatible with multiple environments, and are easier to maintain. Intel TBB is the most proficient way to implement future-proof parallel applications that tap into the power and performance of multicore and manycore hardware platforms.""" - +description="""Intel Threading Building Blocks 4.0 (Intel TBB) + is a widely used, award-winning C++ template library for creating reliable, + portable, and scalable parallel applications. + Use Intel TBB for a simple and rapid way of developing robust task-based + parallel applications that scale to available processor cores, are compatible + with multiple environments, and are easier to maintain. + Intel TBB is the most proficient way to implement future-proof parallel applications + that tap into the power and performance of multicore and manycore hardware platforms.""" + toolkit={'name':'dummy','version':'dummy'} sources=['l_%s_%s.tgz' % (name,version)] @@ -16,4 +23,5 @@ moduleclass='lib' dontcreateinstalldir='True' ## licensepath -license="/apps/gent/licenses/intel" +import os +license=os.path.join(os.getenv('HOME'),"licenses","intel","license.lic") From ce533fc364371e9282983d3a538902645663ce88 Mon Sep 17 00:00:00 2001 From: Toon Willems Date: Tue, 31 Jul 2012 10:44:40 +0200 Subject: [PATCH 158/798] manual build in build test --- easybuild/test/build.py | 20 +++++++++++++++++++- 1 file changed, 19 insertions(+), 1 deletion(-) diff --git a/easybuild/test/build.py b/easybuild/test/build.py index e8ec9217be..a85a250ed3 100644 --- a/easybuild/test/build.py +++ b/easybuild/test/build.py @@ -90,7 +90,25 @@ def runTest(self): # take manual control over the building self.performStep("preparation", lambda x: x.prepare_build()) self.performStep("pre-build verification", lambda x: x.ready2build()) - self.performStep("build", lambda x: x.build()) + + self.performStep("generate installdir name", lambda x: x.gen_installdir()) + self.performStep("make builddir", lambda x: x.make_builddir()) + + self.performStep("unpacking", lambda x: x.unpack_src()) + self.performStep("patching", lambda x: x.apply_patch()) + + + self.performStep("prepare toolkit", lambda x: x.toolkit().prepare(x.getcfg('onlytkmod'))) + self.performStep("setup startfrom", lambda x: x.startfrom()) + self.performStep('configure', lambda x: x.configure()) + self.performStep('make', lambda x: x.make()) + self.performStep('test', lambda x: x.test()) + self.performStep('create installdir', lambda x: x.make_installdir()) + self.performStep('make install', lambda x: x.make_install()) + self.performStep('packages', lambda x: x.packages()) + self.performStep('postproc', lambda x: x.postproc()) + self.performStep('sanity check', lambda x: x.sanitycheck()) + self.performStep('cleanup', lambda x: x.cleanup()) # At this stage, self.apps contains the succesfully build packages From 2720f3d43a7dbb261ef6bf63cf30dbf69f75151f Mon Sep 17 00:00:00 2001 From: Toon Willems Date: Tue, 31 Jul 2012 11:01:02 +0200 Subject: [PATCH 159/798] keep track of loaded modules --- easybuild/framework/application.py | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/easybuild/framework/application.py b/easybuild/framework/application.py index a2d07ab368..f2dfbc71cf 100644 --- a/easybuild/framework/application.py +++ b/easybuild/framework/application.py @@ -165,6 +165,7 @@ def __init__(self, name=None, version=None, newBuild=True, debug=False): # original environ will be set later self.orig_environ = {} + self.loaded_modules = [] def autobuild(self, ebfile, runTests, regtest_online): """ @@ -915,7 +916,9 @@ def print_environ(self): Prints the environment changes and loaded modules to the debug log - pretty prints the environment for easy copy-pasting """ - mods = "\n".join(["module load %s/%s" % (m['name'], m['version']) for m in Modules().loaded_modules()]) + mods = [(mod['name'], mod['version']) for mod in Modules().loaded_modules()] + mods_text = "\n".join(["module load %s/%s" % m for m in mods if m not in self.loaded_modules]) + self.loaded_modules = mods filter = ["_LMFILES_","LOADEDMODULES"] @@ -936,7 +939,7 @@ def print_environ(self): if mods: - self.log.debug("Loaded modules:\n%s" % mods) + self.log.debug("Loaded modules:\n%s" % mods_text) if changed: self.log.debug("Added to environment:\n%s" % text) if unset: From 100df183865d05b4d4183a9a9c58fec114bbcbfb Mon Sep 17 00:00:00 2001 From: Kenneth Hoste Date: Tue, 31 Jul 2012 11:53:48 +0200 Subject: [PATCH 160/798] fix typo in sanity check for OpenFOAM --- easybuild/easyblocks/o/openfoam.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/easybuild/easyblocks/o/openfoam.py b/easybuild/easyblocks/o/openfoam.py index 9fffe99716..077024909c 100644 --- a/easybuild/easyblocks/o/openfoam.py +++ b/easybuild/easyblocks/o/openfoam.py @@ -128,7 +128,7 @@ def sanitycheck(self): pdir = "linux64%s" % self.wm_compiler self.setcfg('sanityCheckPaths',{'files':["%s/etc/%s" % (odir, x) for x in ["bashrc", "cshrc"]], - 'dirs':["%s/platforms/%s/%s" % (odir, pdir, x) for x in ["bin", "lib"]] + + 'dirs':["%s/platforms/%s/%s" % (odir, pdiro, x) for x in ["bin", "lib"]] + ["%s/platforms/%s/bin" % (tdir, pdiro), "%s/platforms/%s/lib" % (tdir, pdir)] }) From b1cd1a7e1d75adc4bed701625bcf6071e3ccd9e8 Mon Sep 17 00:00:00 2001 From: Toon Willems Date: Tue, 31 Jul 2012 12:10:17 +0200 Subject: [PATCH 161/798] remove filter, don't write to script --- easybuild/framework/application.py | 10 ---------- 1 file changed, 10 deletions(-) diff --git a/easybuild/framework/application.py b/easybuild/framework/application.py index f2dfbc71cf..207cbd517d 100644 --- a/easybuild/framework/application.py +++ b/easybuild/framework/application.py @@ -920,13 +920,8 @@ def print_environ(self): mods_text = "\n".join(["module load %s/%s" % m for m in mods if m not in self.loaded_modules]) self.loaded_modules = mods - filter = ["_LMFILES_","LOADEDMODULES"] - env = copy.deepcopy(os.environ) - for key in filter: - env.pop(key, '') - changed = [(k,env[k]) for k in env if k not in self.orig_environ] for k in env: if k in self.orig_environ and env[k] != self.orig_environ[k]: @@ -937,7 +932,6 @@ def print_environ(self): text = "\n".join(['export %s="%s"' % change for change in changed]) unset_text = "\n".join(['unset %s' % key for key in unset]) - if mods: self.log.debug("Loaded modules:\n%s" % mods_text) if changed: @@ -945,12 +939,8 @@ def print_environ(self): if unset: self.log.debug("Removed from environment:\n%s" % unset_text) - if text or unset_text: - self.script_file.write("\n".join([text, unset_text])) - self.orig_environ = env - def postproc(self): """ Do some postprocessing From 4ffd06e5f5efb9ef08db81d7671c589a6578ac32 Mon Sep 17 00:00:00 2001 From: Toon Willems Date: Tue, 31 Jul 2012 12:11:59 +0200 Subject: [PATCH 162/798] remove script_file from application --- easybuild/framework/application.py | 19 ------------------- 1 file changed, 19 deletions(-) diff --git a/easybuild/framework/application.py b/easybuild/framework/application.py index 207cbd517d..64fd9ef554 100644 --- a/easybuild/framework/application.py +++ b/easybuild/framework/application.py @@ -98,9 +98,6 @@ def __init__(self, name=None, version=None, newBuild=True, debug=False): # allow a post message to be set, which can be shown as last output self.postmsg = '' - # tempfile for the script which can be sourced - self.script_file = tempfile.NamedTemporaryFile() - # generic configuration parameters self.cfg = { 'name':[None, "Name of software"], @@ -848,9 +845,6 @@ def build(self): self.gen_installdir() self.make_builddir() - self.script_file.write("# EasyBuild version: %s for module %s/%s\n" % (easybuild.VERBOSE_VERSION, - self.name(), self.installversion)) - self.print_environ() ## SOURCE @@ -997,19 +991,6 @@ def cleanup(self): except OSError, err: self.log.exception("Cleaning up builddir %s failed: %s" % (self.builddir, err)) - logdir = os.path.join(self.installdir, config.logPath()) - actual_script_path = os.path.join(logdir, "easybuild-env-vars.sh") - - if not os.path.isdir(logdir): - os.makedirs(logdir) - - # move the temporary file to the actual destination - self.script_file.seek(0) - dest = open(actual_script_path, "w") - shutil.copyfileobj(self.script_file, dest) - dest.close() - self.script_file.close() - def sanitycheck(self): """ Do a sanity check on the installation From 13831f1d457a06b53fe918cb5110a084dd5fbf58 Mon Sep 17 00:00:00 2001 From: Toon Willems Date: Tue, 31 Jul 2012 13:33:25 +0200 Subject: [PATCH 163/798] add environment module for tracking changes --- easybuild/tools/environment.py | 28 ++++++++++++++++++++++++++++ 1 file changed, 28 insertions(+) create mode 100644 easybuild/tools/environment.py diff --git a/easybuild/tools/environment.py b/easybuild/tools/environment.py new file mode 100644 index 0000000000..839ea82d59 --- /dev/null +++ b/easybuild/tools/environment.py @@ -0,0 +1,28 @@ +import os + +changes = {} + +def write_changes(filename): + script = open(filename,'w') + + for key in changes: + script.write('export %s="%s"\n' % (key, changes[key])) + + script.close() + reset_changes() + +def reset_changes(): + """ + Reset the changes tracked by this module + """ + global changes + changes = {} + +def putenv(key, value): + """ + put key in the environment with value + tracks added keys until write_changes has been called + """ + # os.putenv() is not necessary. os.environ will call this. + os.environ[key] = value + changes[key] = value From e208133132d0df1168423708140664de89ccd7c9 Mon Sep 17 00:00:00 2001 From: Kenneth Hoste Date: Tue, 31 Jul 2012 13:58:48 +0200 Subject: [PATCH 164/798] fix sanity check for OpenFOAM --- easybuild/easyblocks/o/openfoam.py | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/easybuild/easyblocks/o/openfoam.py b/easybuild/easyblocks/o/openfoam.py index 077024909c..190eb555ec 100644 --- a/easybuild/easyblocks/o/openfoam.py +++ b/easybuild/easyblocks/o/openfoam.py @@ -127,9 +127,17 @@ def sanitycheck(self): pdiro = "linux64%sDPOpt" % self.wm_compiler pdir = "linux64%s" % self.wm_compiler + scotchdir = "scotch_???" + d = os.path.join(tdir, "platforms", pdir) + if not os.path.exists(d): + for x in os.listdir(d): + if x.startswith("scotch_"): + scotchdir = x + self.setcfg('sanityCheckPaths',{'files':["%s/etc/%s" % (odir, x) for x in ["bashrc", "cshrc"]], 'dirs':["%s/platforms/%s/%s" % (odir, pdiro, x) for x in ["bin", "lib"]] + - ["%s/platforms/%s/bin" % (tdir, pdiro), "%s/platforms/%s/lib" % (tdir, pdir)] + ["%s/platforms/%s/%s/bin" % (tdir, pdir, scotchdir), + "%s/platforms/%s/lib" % (tdir, pdiro)] }) self.log.info("Customized sanity check paths: %s" % self.getcfg('sanityCheckPaths')) From fd8af2f03e81d3a68a5d9b4745e8067e620335d6 Mon Sep 17 00:00:00 2001 From: Toon Willems Date: Tue, 31 Jul 2012 14:09:06 +0200 Subject: [PATCH 165/798] use env.putenv everywhere to track changes --- easybuild/easyblocks/g/gcc.py | 8 +++++--- easybuild/easyblocks/i/imkl.py | 16 +++++++++------- easybuild/easyblocks/i/intelbase.py | 17 +++++++++-------- easybuild/easyblocks/m/mvapich2.py | 11 ++++++----- easybuild/easyblocks/n/netcdf.py | 9 +++++---- easybuild/easyblocks/n/netcdf_fortran.py | 5 +++-- easybuild/easyblocks/w/wps.py | 10 ++++++---- easybuild/easyblocks/w/wrf.py | 18 ++++++++++-------- easybuild/framework/application.py | 14 +++++++++++++- easybuild/tools/filetools.py | 9 ++++----- easybuild/tools/modules.py | 2 +- easybuild/tools/toolkit.py | 14 ++++++++------ 12 files changed, 79 insertions(+), 54 deletions(-) diff --git a/easybuild/easyblocks/g/gcc.py b/easybuild/easyblocks/g/gcc.py index eb08576bb5..977bc148b7 100644 --- a/easybuild/easyblocks/g/gcc.py +++ b/easybuild/easyblocks/g/gcc.py @@ -28,6 +28,8 @@ from easybuild.tools.filetools import run_cmd from easybuild.tools.systemtools import get_kernel_name, get_shared_lib_ext, get_platform_name +import easybuild.tools.environment as env + class GCC(Application): """ Self-contained build of GCC. @@ -265,13 +267,13 @@ def make(self): # register built GCC as compiler to use for stage 2/3 path = "%s/bin:%s" % (self.stage1installdir, os.getenv('PATH')) - os.putenv('PATH', path) + env.putenv('PATH', path) ld_lib_path = "%(dir)s/lib64:%(dir)s/lib:%(val)s" % { 'dir':self.stage1installdir, 'val':os.getenv('LD_LIBRARY_PATH') } - os.putenv('LD_LIBRARY_PATH', ld_lib_path) + env.putenv('LD_LIBRARY_PATH', ld_lib_path) # # STAGE 2: build GMP/PPL/CLooG for stage 3 @@ -371,7 +373,7 @@ def make(self): incpath = os.path.join(stage2prefix, 'include') cppflags = os.getenv('CPPFLAGS', '') - os.putenv('CPPFLAGS', "%s -L%s -I%s " % (cppflags, libpath, incpath)) + env.putenv('CPPFLAGS', "%s -L%s -I%s " % (cppflags, libpath, incpath)) # # STAGE 3: bootstrap build of final GCC (with PPL/CLooG support) diff --git a/easybuild/easyblocks/i/imkl.py b/easybuild/easyblocks/i/imkl.py index 5db2579667..ee4955a646 100644 --- a/easybuild/easyblocks/i/imkl.py +++ b/easybuild/easyblocks/i/imkl.py @@ -29,6 +29,8 @@ from easybuild.tools.filetools import run_cmd from easybuild.tools.modules import Modules +import easybuild.tools.environment as env + class Imkl(IntelBase): """ Class that can be used to install mkl @@ -174,10 +176,10 @@ def postproc(self): self.log.exception("Creating temporary directory failed") ## always set INSTALL_DIR, SPEC_OPT, COPTS and CFLAGS - os.putenv('INSTALL_DIR', tmpbuild) - os.putenv('SPEC_OPT', opt) - os.putenv('COPTS', opt) - os.putenv('CFLAGS', opt) + env.putenv('INSTALL_DIR', tmpbuild) + env.putenv('SPEC_OPT', opt) + env.putenv('COPTS', opt) + env.putenv('CFLAGS', opt) try: intdir = os.path.join(interfacedir, i) @@ -293,9 +295,9 @@ def postproc(self): self.log.exception("Creating temporary directory failed") ## always set INSTALL_DIR, SPEC_OPT and CFLAGS - os.putenv('INSTALL_DIR', tmpbuild) - os.putenv('SPEC_OPT', opt) - os.putenv('CFLAGS', opt) + env.putenv('INSTALL_DIR', tmpbuild) + env.putenv('SPEC_OPT', opt) + env.putenv('CFLAGS', opt) try: intdir = os.path.join(interfacedir, i) diff --git a/easybuild/easyblocks/i/intelbase.py b/easybuild/easyblocks/i/intelbase.py index 43d54f816b..097f1f4ff3 100644 --- a/easybuild/easyblocks/i/intelbase.py +++ b/easybuild/easyblocks/i/intelbase.py @@ -22,6 +22,7 @@ import shutil from easybuild.framework.application import Application from easybuild.tools.filetools import run_cmd +import easybuild.tools.environment as env class IntelBase(Application): """ @@ -38,10 +39,10 @@ def __init__(self, *args, **kwargs): self.cfg.update({ 'license':[None,"License file path (default: None)"], 'license_activation':['license_server', "Indicates license activation type (default: 'license_server')"], - # 'usetmppath': + # 'usetmppath': # workaround for older SL5 version (5.5 and earlier) # used to be True, but False since SL5.6/SL6 - # disables TMP_PATH env and command line option + # disables TMP_PATH env and command line option 'usetmppath':[False, "Use temporary path for installation (default: False)"], 'm32':[False, "Enable 32-bit toolkit (default: False)"], }) @@ -71,7 +72,7 @@ def configure(self): self.log.error("Can't find license at %s" % self.license) ## set INTEL_LICENSE_FILE - os.environ["INTEL_LICENSE_FILE"] = self.license + env.putenv("INTEL_LICENSE_FILE", self.license) # clean home directory self.clean_homedir() @@ -113,14 +114,14 @@ def make_install(self): self.log.exception("Directory %s can't be created" % (tmpdir)) tmppathopt = '' if self.getcfg('usetmppath'): - os.putenv('TMP_PATH', tmpdir) + env.putenv('TMP_PATH', tmpdir) tmppathopt = "-t %s" % tmpdir ## set some extra env variables - os.environ['LOCAL_INSTALL_VERBOSE'] = '1' - os.environ['VERBOSE_MODE'] = '1' + env.putenv('LOCAL_INSTALL_VERBOSE','1') + env.putenv['VERBOSE_MODE', '1') - os.environ['INSTALL_PATH'] = self.installdir + env.putenv('INSTALL_PATH', self.installdir) ## perform installation cmd = "./install.sh %s -s %s" % (tmppathopt, silentcfg) @@ -136,4 +137,4 @@ def cleanup(self): Application.cleanup(self) - # no default sanity check, needs to be implemented by derived class \ No newline at end of file + # no default sanity check, needs to be implemented by derived class diff --git a/easybuild/easyblocks/m/mvapich2.py b/easybuild/easyblocks/m/mvapich2.py index a3b3c22996..9b5bc8f62e 100644 --- a/easybuild/easyblocks/m/mvapich2.py +++ b/easybuild/easyblocks/m/mvapich2.py @@ -20,6 +20,7 @@ ## import os from easybuild.framework.application import Application +import easybuild.tools.environment as env class MVAPICH2(Application): """ @@ -65,14 +66,14 @@ def configure(self): # enable Fortran 77/90 and C++ bindings add_configopts += '--enable-f77 --enable-fc --enable-cxx ' - # MVAPICH configure script complains when F90 or F90FLAGS are set, + # MVAPICH configure script complains when F90 or F90FLAGS are set, # they should be replaced with FC/FCFLAGS instead for (envvar, new_envvar) in [("F90", "FC"), ("F90FLAGS", "FCFLAGS")]: envvar_val = os.getenv(envvar) if envvar_val: if not os.getenv(new_envvar): - os.putenv(new_envvar, envvar_val) - os.putenv(envvar, '') + env.putenv(new_envvar, envvar_val) + env.putenv(envvar, '') else: self.log.error("Both %(ev)s and %(nev)s set, can I overwrite %(nev)s with %(ev)s (%(evv)s) ?" % { 'ev':envvar, @@ -100,7 +101,7 @@ def sanitycheck(self): """ if not self.getcfg('sanityCheckPaths'): - self.setcfg('sanityCheckPaths',{'files':["bin/%s" % x for x in ["mpicc", "mpicxx", "mpif77", + self.setcfg('sanityCheckPaths',{'files':["bin/%s" % x for x in ["mpicc", "mpicxx", "mpif77", "mpif90", "mpiexec.hydra"]] + ["lib/lib%s" % y for x in ["fmpich", "mpichcxx", "mpichf90", "mpich", "mpl", "opa"] @@ -110,4 +111,4 @@ def sanitycheck(self): self.log.info("Customized sanity check paths: %s"%self.getcfg('sanityCheckPaths')) - Application.sanitycheck(self) \ No newline at end of file + Application.sanitycheck(self) diff --git a/easybuild/easyblocks/n/netcdf.py b/easybuild/easyblocks/n/netcdf.py index 47f74cce35..9856221081 100644 --- a/easybuild/easyblocks/n/netcdf.py +++ b/easybuild/easyblocks/n/netcdf.py @@ -21,6 +21,7 @@ import os from distutils.version import LooseVersion from easybuild.framework.application import Application +import easybuild.tools.environment as env class NetCDF(Application): """Support for building/installing netCDF""" @@ -40,7 +41,7 @@ def configure(self): # add -DgFortran to CPPFLAGS when building with GCC if self.tk.toolkit_comp_family() == "GCC": - os.environ['CPPFLAGS'] = "%s -DgFortran" % os.getenv('CPPFLAGS') + env.putenv('CPPFLAGS', "%s -DgFortran" % os.getenv('CPPFLAGS')) Application.configure(self) @@ -78,7 +79,7 @@ def set_netcdf_env_vars(log): if not netcdf: log.error("netCDF module not loaded?") else: - os.environ['NETCDF'] = netcdf + env.putenv('NETCDF', netcdf) log.debug("Set NETCDF to %s" % netcdf) netcdff = os.getenv('SOFTROOTNETCDFMINFORTRAN') netcdf_ver = os.getenv('SOFTVERSIONNETCDF') @@ -86,7 +87,7 @@ def set_netcdf_env_vars(log): if LooseVersion(netcdf_ver) >= LooseVersion("4.2"): log.error("netCDF v4.2 no longer supplies Fortran library, also need netCDF-Fortran") else: - os.environ['NETCDFF'] = netcdff + env.putenv('NETCDFF', netcdff) log.debug("Set NETCDFF to %s" % netcdff) def get_netcdf_module_set_cmds(log): @@ -101,4 +102,4 @@ def get_netcdf_module_set_cmds(log): txt += "setenv NETCDFF %s\n" % netcdff return txt else: - log.error("NETCDF environment variable not set?") \ No newline at end of file + log.error("NETCDF environment variable not set?") diff --git a/easybuild/easyblocks/n/netcdf_fortran.py b/easybuild/easyblocks/n/netcdf_fortran.py index dd50ec9bbd..d8b735e986 100644 --- a/easybuild/easyblocks/n/netcdf_fortran.py +++ b/easybuild/easyblocks/n/netcdf_fortran.py @@ -20,6 +20,7 @@ ## import os from easybuild.framework.application import Application +import easybuild.tools.environment as env class NetCDF_Fortran(Application): """Support for building/installing the netCDF-Fortran library""" @@ -34,7 +35,7 @@ def configure(self): # add -DgFortran to CPPFLAGS when building with GCC if self.tk.toolkit_comp_family() == "GCC": - os.environ['CPPFLAGS'] = "%s -DgFortran" % os.getenv('CPPFLAGS') + env.putenv('CPPFLAGS', "%s -DgFortran" % os.getenv('CPPFLAGS')) Application.configure(self) @@ -55,4 +56,4 @@ def sanitycheck(self): self.log.info("Customized sanity check paths: %s"%self.getcfg('sanityCheckPaths')) - Application.sanitycheck(self) \ No newline at end of file + Application.sanitycheck(self) diff --git a/easybuild/easyblocks/w/wps.py b/easybuild/easyblocks/w/wps.py index f8a2e23990..6dc216a9c6 100644 --- a/easybuild/easyblocks/w/wps.py +++ b/easybuild/easyblocks/w/wps.py @@ -29,6 +29,8 @@ from easybuild.tools.filetools import patch_perl_script_autoflush, run_cmd, run_cmd_qa, unpack from easybuild.easyblocks.n.netcdf import set_netcdf_env_vars, get_netcdf_module_set_cmds +import easybuild.tools.environment as env + class WPS(Application): """Support for building/installing WPS.""" @@ -53,7 +55,7 @@ def __init__(self): }) def configure(self): - """Configure build: + """Configure build: - set required environment variables (for netCDF, JasPer) - patch compile script and ungrib Makefile for non-default install paths of WRF and JasPer - run configure script and figure how to select desired build option @@ -91,8 +93,8 @@ def configure(self): jasper = os.getenv('SOFTROOTJASPER') jasperlibdir = os.path.join(jasper, "lib") if jasper: - os.environ['JASPERINC'] = os.path.join(jasper, "include") - os.environ['JASPERLIB'] = jasperlibdir + env.putenv('JASPERINC', os.path.join(jasper, "include")) + env.putenv('JASPERLIB', jasperlibdir) else: self.log.error("JasPer module not loaded?") @@ -337,4 +339,4 @@ def make_module_extra(self): txt += get_netcdf_module_set_cmds(self.log) - return txt \ No newline at end of file + return txt diff --git a/easybuild/easyblocks/w/wrf.py b/easybuild/easyblocks/w/wrf.py index a1a6eee516..2d9b323cba 100644 --- a/easybuild/easyblocks/w/wrf.py +++ b/easybuild/easyblocks/w/wrf.py @@ -26,6 +26,8 @@ from easybuild.tools.filetools import patch_perl_script_autoflush, run_cmd, run_cmd_qa from easybuild.easyblocks.n.netcdf import set_netcdf_env_vars, get_netcdf_module_set_cmds +import easybuild.tools.environment as env + class WRF(Application): """Support for building/installing WRF.""" @@ -33,7 +35,7 @@ def __init__(self,*args,**kwargs): """Add extra config options specific to WRF.""" Application.__init__(self, args,kwargs) - + self.build_in_installdir = True self.wrfsubdir = None @@ -47,8 +49,8 @@ def __init__(self,*args,**kwargs): 'runtest':[True, "Build and run WRF tests (default: True)."] }) - def configure(self): - """Configure build: + def configure(self): + """Configure build: - set some magic environment variables - run configure script - adjust configure.wrf file if needed @@ -70,7 +72,7 @@ def configure(self): if not (hdf5 or parallel_hdf5): self.log.error("Parallel HDF5 module not loaded?") else: - os.putenv('PHDF5', hdf5) + env.putenv('PHDF5', hdf5) else: self.log.info("HDF5 module not loaded, assuming that's OK...") @@ -78,8 +80,8 @@ def configure(self): jasper = os.getenv('SOFTROOTJASPER') jasperlibdir = os.path.join(jasper, "lib") if jasper: - os.environ['JASPERINC'] = os.path.join(jasper, "include") - os.environ['JASPERLIB'] = jasperlibdir + env.putenv('JASPERINC', os.path.join(jasper, "include")) + env.putenv('JASPERLIB', jasperlibdir) else: if os.getenv('JASPERINC') or os.getenv('JASPERLIB'): @@ -88,7 +90,7 @@ def configure(self): self.log.info("JasPer module not loaded, assuming that's OK...") # enable support for large file support in netCDF - os.putenv('WRFIO_NCD_LARGE_FILE_SUPPORT', '1') + env.putenv('WRFIO_NCD_LARGE_FILE_SUPPORT', '1') # patch arch/Config_new.pl script, so that run_cmd_qa receives all output to answer questions patch_perl_script_autoflush(os.path.join("arch", "Config_new.pl")) @@ -161,7 +163,7 @@ def configure(self): for envvar in ['CFLAGS', 'FFLAGS']: val = os.getenv(envvar) if '-O3' in val: - os.environ[envvar] = '%s -heap-arrays' % val + env.putenv(envvar, '%s -heap-arrays' % val) self.log.info("Updated %s to '%s'" % (envvar, os.getenv(envvar))) # replace -O3 with desired optimization options diff --git a/easybuild/framework/application.py b/easybuild/framework/application.py index 64fd9ef554..bdf58d1ca6 100644 --- a/easybuild/framework/application.py +++ b/easybuild/framework/application.py @@ -32,6 +32,7 @@ import easybuild import easybuild.tools.config as config +import easybuild.tools.environment as env from easybuild.tools.build_log import EasyBuildError, initLogger, removeLogHandler,print_msg from easybuild.tools.config import source_path, buildPath, installPath from easybuild.tools.filetools import unpack, patch, run_cmd, convertName @@ -847,6 +848,9 @@ def build(self): self.print_environ() + # reset tracked changes + env.reset_changes() + ## SOURCE print_msg("unpacking...", self.log) self.runstep('source', [self.unpack_src], skippable=True) @@ -887,6 +891,15 @@ def build(self): finally: self.runstep('cleanup', [self.cleanup]) + # write changes to the environment to logdir + logdir = os.path.join(self.installdir, config.logPath()) + if not os.path.isdir(logdir): + os.makedirs(logdir) + + env.write_changes(os.path.join(logdir, "easybuild-env-vars.sh")) + + + except StopException: pass @@ -971,7 +984,6 @@ def postproc(self): def cleanup(self): """ Cleanup leftover mess: remove/clean build directory - Move temporary files into log directory except when we're building in the installation directory, otherwise we remove the installation diff --git a/easybuild/tools/filetools.py b/easybuild/tools/filetools.py index ad8351d155..8677e11c84 100644 --- a/easybuild/tools/filetools.py +++ b/easybuild/tools/filetools.py @@ -33,6 +33,8 @@ from easybuild.tools.asyncprocess import Popen, PIPE, STDOUT, send_all, recv_some from easybuild.tools.build_log import getLog +import easybuild.tools.environment as env + log = getLog('fileTools') errorsFoundInLog = 0 @@ -568,7 +570,6 @@ def parse_cmd_output(cmd, stdouterr, ec, simple, log_all, log_ok, regexp): def modifyEnv(old, new): """ Compares 2 os.environ dumps. Adapts final environment. - - Assinging to os.environ doesn't seem to work, need to use os.putenv """ oldKeys = old.keys() newKeys = new.keys() @@ -578,12 +579,10 @@ def modifyEnv(old, new): ## hmm, smart checking with debug logging if not new[key] == old[key]: log.debug("Key in new environment found that is different from old one: %s (%s)" % (key, new[key])) - os.putenv(key, new[key]) - os.environ[key] = new[key] + env.putenv(key, new[key]) else: log.debug("Key in new environment found that is not in old one: %s (%s)" % (key, new[key])) - os.putenv(key, new[key]) - os.environ[key] = new[key] + env.putenv(key, new[key]) for key in oldKeys: if not key in newKeys: diff --git a/easybuild/tools/modules.py b/easybuild/tools/modules.py index a80f635b3b..52be1eee24 100644 --- a/easybuild/tools/modules.py +++ b/easybuild/tools/modules.py @@ -252,7 +252,7 @@ def dependencies_for(self, name, version): deps = [{'name':modname, 'version':modversion} for (modname, modversion) in mods] - # add dependencies of dependency modules only if they're not there yet + # add dependencies of dependency modules only if they're not there yet for moddepdeps in moddeps: for dep in moddepdeps: if not dep in deps: diff --git a/easybuild/tools/toolkit.py b/easybuild/tools/toolkit.py index e132dac1d4..190b140345 100644 --- a/easybuild/tools/toolkit.py +++ b/easybuild/tools/toolkit.py @@ -26,6 +26,8 @@ from easybuild.tools.modules import Modules, get_software_root from easybuild.tools import systemtools +import easybuild.tools.environment as env + log = getLog('Toolkit') class Toolkit: @@ -203,13 +205,13 @@ def _setVariables(self, dontset=None): continue log.debug("Setting environment variable %s to %s" % (key, val)) - os.environ[key] = val + env.putenv(key, val) # also set unique named variables that can be used in Makefiles # - so you can have 'CFLAGS = $(SOFTVARCFLAGS)' # -- 'CLFLAGS = $(CFLAGS)' gives '*** Recursive variable `CFLAGS' # references itself (eventually). Stop' error - os.environ["SOFTVAR%s" % key] = val + env.putenv("SOFTVAR%s" % key, val) def _getOptimalArchitecture(self): @@ -310,7 +312,7 @@ def prepareACML(self): if os.getenv('SOFTROOTGCC'): compiler = 'gfortran' elif os.getenv('SOFTROOTIFORT'): - compiler = 'ifort' + compiler = 'ifort' else: log.error("Don't know which compiler-specific subdir for ACML to use.") self.vars['LDFLAGS'] += " -L%(acml)s/%(comp)s64/lib/ " % { @@ -318,7 +320,7 @@ def prepareACML(self): 'comp':compiler, 'acml':os.environ['SOFTROOTACML'] } - self.vars['LIBBLAS'] = " -lacml_mv -lacml " #-lpthread" + self.vars['LIBBLAS'] = " -lacml_mv -lacml " #-lpthread" self.vars['LIBBLAS_MT'] = self.vars['LIBBLAS'] @@ -805,10 +807,10 @@ def mpi_cmd_for(self, cmd, nr_ranks): if mpi_type == "Intel": # set temporary dir for mdp - os.environ['I_MPI_MPD_TMPDIR'] = "/tmp" + env.putenv('I_MPI_MPD_TMPDIR', "/tmp") # set PBS_ENVIRONMENT, so that --file option for mpdboot isn't stripped away - os.environ['PBS_ENVIRONMENT'] = "PBS_BATCH_MPI" + env.putenv('PBS_ENVIRONMENT', "PBS_BATCH_MPI") # create mpdboot file fn = "/tmp/mpdboot" From 1f3f5256ff8b40990a4c5cc5f7924cc20cf56e9a Mon Sep 17 00:00:00 2001 From: Toon Willems Date: Tue, 31 Jul 2012 14:44:20 +0200 Subject: [PATCH 166/798] env.putenv -> env.set --- easybuild/easyblocks/g/gcc.py | 6 +++--- easybuild/easyblocks/i/imkl.py | 14 +++++++------- easybuild/easyblocks/i/intelbase.py | 10 +++++----- easybuild/easyblocks/m/mvapich2.py | 4 ++-- easybuild/easyblocks/n/netcdf.py | 6 +++--- easybuild/easyblocks/n/netcdf_fortran.py | 2 +- easybuild/easyblocks/w/wps.py | 4 ++-- easybuild/easyblocks/w/wrf.py | 10 +++++----- easybuild/tools/environment.py | 2 +- easybuild/tools/filetools.py | 4 ++-- easybuild/tools/toolkit.py | 8 ++++---- 11 files changed, 35 insertions(+), 35 deletions(-) diff --git a/easybuild/easyblocks/g/gcc.py b/easybuild/easyblocks/g/gcc.py index 977bc148b7..fb73bc6c7f 100644 --- a/easybuild/easyblocks/g/gcc.py +++ b/easybuild/easyblocks/g/gcc.py @@ -267,13 +267,13 @@ def make(self): # register built GCC as compiler to use for stage 2/3 path = "%s/bin:%s" % (self.stage1installdir, os.getenv('PATH')) - env.putenv('PATH', path) + env.set('PATH', path) ld_lib_path = "%(dir)s/lib64:%(dir)s/lib:%(val)s" % { 'dir':self.stage1installdir, 'val':os.getenv('LD_LIBRARY_PATH') } - env.putenv('LD_LIBRARY_PATH', ld_lib_path) + env.set('LD_LIBRARY_PATH', ld_lib_path) # # STAGE 2: build GMP/PPL/CLooG for stage 3 @@ -373,7 +373,7 @@ def make(self): incpath = os.path.join(stage2prefix, 'include') cppflags = os.getenv('CPPFLAGS', '') - env.putenv('CPPFLAGS', "%s -L%s -I%s " % (cppflags, libpath, incpath)) + env.set('CPPFLAGS', "%s -L%s -I%s " % (cppflags, libpath, incpath)) # # STAGE 3: bootstrap build of final GCC (with PPL/CLooG support) diff --git a/easybuild/easyblocks/i/imkl.py b/easybuild/easyblocks/i/imkl.py index ee4955a646..825881f75f 100644 --- a/easybuild/easyblocks/i/imkl.py +++ b/easybuild/easyblocks/i/imkl.py @@ -176,10 +176,10 @@ def postproc(self): self.log.exception("Creating temporary directory failed") ## always set INSTALL_DIR, SPEC_OPT, COPTS and CFLAGS - env.putenv('INSTALL_DIR', tmpbuild) - env.putenv('SPEC_OPT', opt) - env.putenv('COPTS', opt) - env.putenv('CFLAGS', opt) + env.set('INSTALL_DIR', tmpbuild) + env.set('SPEC_OPT', opt) + env.set('COPTS', opt) + env.set('CFLAGS', opt) try: intdir = os.path.join(interfacedir, i) @@ -295,9 +295,9 @@ def postproc(self): self.log.exception("Creating temporary directory failed") ## always set INSTALL_DIR, SPEC_OPT and CFLAGS - env.putenv('INSTALL_DIR', tmpbuild) - env.putenv('SPEC_OPT', opt) - env.putenv('CFLAGS', opt) + env.set('INSTALL_DIR', tmpbuild) + env.set('SPEC_OPT', opt) + env.set('CFLAGS', opt) try: intdir = os.path.join(interfacedir, i) diff --git a/easybuild/easyblocks/i/intelbase.py b/easybuild/easyblocks/i/intelbase.py index 097f1f4ff3..70c03ce5ef 100644 --- a/easybuild/easyblocks/i/intelbase.py +++ b/easybuild/easyblocks/i/intelbase.py @@ -72,7 +72,7 @@ def configure(self): self.log.error("Can't find license at %s" % self.license) ## set INTEL_LICENSE_FILE - env.putenv("INTEL_LICENSE_FILE", self.license) + env.set("INTEL_LICENSE_FILE", self.license) # clean home directory self.clean_homedir() @@ -114,14 +114,14 @@ def make_install(self): self.log.exception("Directory %s can't be created" % (tmpdir)) tmppathopt = '' if self.getcfg('usetmppath'): - env.putenv('TMP_PATH', tmpdir) + env.set('TMP_PATH', tmpdir) tmppathopt = "-t %s" % tmpdir ## set some extra env variables - env.putenv('LOCAL_INSTALL_VERBOSE','1') - env.putenv['VERBOSE_MODE', '1') + env.set('LOCAL_INSTALL_VERBOSE','1') + env.set('VERBOSE_MODE', '1') - env.putenv('INSTALL_PATH', self.installdir) + env.set('INSTALL_PATH', self.installdir) ## perform installation cmd = "./install.sh %s -s %s" % (tmppathopt, silentcfg) diff --git a/easybuild/easyblocks/m/mvapich2.py b/easybuild/easyblocks/m/mvapich2.py index 9b5bc8f62e..6d08799024 100644 --- a/easybuild/easyblocks/m/mvapich2.py +++ b/easybuild/easyblocks/m/mvapich2.py @@ -72,8 +72,8 @@ def configure(self): envvar_val = os.getenv(envvar) if envvar_val: if not os.getenv(new_envvar): - env.putenv(new_envvar, envvar_val) - env.putenv(envvar, '') + env.set(new_envvar, envvar_val) + env.set(envvar, '') else: self.log.error("Both %(ev)s and %(nev)s set, can I overwrite %(nev)s with %(ev)s (%(evv)s) ?" % { 'ev':envvar, diff --git a/easybuild/easyblocks/n/netcdf.py b/easybuild/easyblocks/n/netcdf.py index 9856221081..eea55414f7 100644 --- a/easybuild/easyblocks/n/netcdf.py +++ b/easybuild/easyblocks/n/netcdf.py @@ -41,7 +41,7 @@ def configure(self): # add -DgFortran to CPPFLAGS when building with GCC if self.tk.toolkit_comp_family() == "GCC": - env.putenv('CPPFLAGS', "%s -DgFortran" % os.getenv('CPPFLAGS')) + env.set('CPPFLAGS', "%s -DgFortran" % os.getenv('CPPFLAGS')) Application.configure(self) @@ -79,7 +79,7 @@ def set_netcdf_env_vars(log): if not netcdf: log.error("netCDF module not loaded?") else: - env.putenv('NETCDF', netcdf) + env.set('NETCDF', netcdf) log.debug("Set NETCDF to %s" % netcdf) netcdff = os.getenv('SOFTROOTNETCDFMINFORTRAN') netcdf_ver = os.getenv('SOFTVERSIONNETCDF') @@ -87,7 +87,7 @@ def set_netcdf_env_vars(log): if LooseVersion(netcdf_ver) >= LooseVersion("4.2"): log.error("netCDF v4.2 no longer supplies Fortran library, also need netCDF-Fortran") else: - env.putenv('NETCDFF', netcdff) + env.set('NETCDFF', netcdff) log.debug("Set NETCDFF to %s" % netcdff) def get_netcdf_module_set_cmds(log): diff --git a/easybuild/easyblocks/n/netcdf_fortran.py b/easybuild/easyblocks/n/netcdf_fortran.py index d8b735e986..d2303fe27d 100644 --- a/easybuild/easyblocks/n/netcdf_fortran.py +++ b/easybuild/easyblocks/n/netcdf_fortran.py @@ -35,7 +35,7 @@ def configure(self): # add -DgFortran to CPPFLAGS when building with GCC if self.tk.toolkit_comp_family() == "GCC": - env.putenv('CPPFLAGS', "%s -DgFortran" % os.getenv('CPPFLAGS')) + env.set('CPPFLAGS', "%s -DgFortran" % os.getenv('CPPFLAGS')) Application.configure(self) diff --git a/easybuild/easyblocks/w/wps.py b/easybuild/easyblocks/w/wps.py index 6dc216a9c6..90efd21291 100644 --- a/easybuild/easyblocks/w/wps.py +++ b/easybuild/easyblocks/w/wps.py @@ -93,8 +93,8 @@ def configure(self): jasper = os.getenv('SOFTROOTJASPER') jasperlibdir = os.path.join(jasper, "lib") if jasper: - env.putenv('JASPERINC', os.path.join(jasper, "include")) - env.putenv('JASPERLIB', jasperlibdir) + env.set('JASPERINC', os.path.join(jasper, "include")) + env.set('JASPERLIB', jasperlibdir) else: self.log.error("JasPer module not loaded?") diff --git a/easybuild/easyblocks/w/wrf.py b/easybuild/easyblocks/w/wrf.py index 2d9b323cba..665b1b8e65 100644 --- a/easybuild/easyblocks/w/wrf.py +++ b/easybuild/easyblocks/w/wrf.py @@ -72,7 +72,7 @@ def configure(self): if not (hdf5 or parallel_hdf5): self.log.error("Parallel HDF5 module not loaded?") else: - env.putenv('PHDF5', hdf5) + env.set('PHDF5', hdf5) else: self.log.info("HDF5 module not loaded, assuming that's OK...") @@ -80,8 +80,8 @@ def configure(self): jasper = os.getenv('SOFTROOTJASPER') jasperlibdir = os.path.join(jasper, "lib") if jasper: - env.putenv('JASPERINC', os.path.join(jasper, "include")) - env.putenv('JASPERLIB', jasperlibdir) + env.set('JASPERINC', os.path.join(jasper, "include")) + env.set('JASPERLIB', jasperlibdir) else: if os.getenv('JASPERINC') or os.getenv('JASPERLIB'): @@ -90,7 +90,7 @@ def configure(self): self.log.info("JasPer module not loaded, assuming that's OK...") # enable support for large file support in netCDF - env.putenv('WRFIO_NCD_LARGE_FILE_SUPPORT', '1') + env.set('WRFIO_NCD_LARGE_FILE_SUPPORT', '1') # patch arch/Config_new.pl script, so that run_cmd_qa receives all output to answer questions patch_perl_script_autoflush(os.path.join("arch", "Config_new.pl")) @@ -163,7 +163,7 @@ def configure(self): for envvar in ['CFLAGS', 'FFLAGS']: val = os.getenv(envvar) if '-O3' in val: - env.putenv(envvar, '%s -heap-arrays' % val) + env.set(envvar, '%s -heap-arrays' % val) self.log.info("Updated %s to '%s'" % (envvar, os.getenv(envvar))) # replace -O3 with desired optimization options diff --git a/easybuild/tools/environment.py b/easybuild/tools/environment.py index 839ea82d59..2271da1dcf 100644 --- a/easybuild/tools/environment.py +++ b/easybuild/tools/environment.py @@ -18,7 +18,7 @@ def reset_changes(): global changes changes = {} -def putenv(key, value): +def set(key, value): """ put key in the environment with value tracks added keys until write_changes has been called diff --git a/easybuild/tools/filetools.py b/easybuild/tools/filetools.py index 8677e11c84..c28adf8532 100644 --- a/easybuild/tools/filetools.py +++ b/easybuild/tools/filetools.py @@ -579,10 +579,10 @@ def modifyEnv(old, new): ## hmm, smart checking with debug logging if not new[key] == old[key]: log.debug("Key in new environment found that is different from old one: %s (%s)" % (key, new[key])) - env.putenv(key, new[key]) + env.set(key, new[key]) else: log.debug("Key in new environment found that is not in old one: %s (%s)" % (key, new[key])) - env.putenv(key, new[key]) + env.set(key, new[key]) for key in oldKeys: if not key in newKeys: diff --git a/easybuild/tools/toolkit.py b/easybuild/tools/toolkit.py index 190b140345..89e4bdbaae 100644 --- a/easybuild/tools/toolkit.py +++ b/easybuild/tools/toolkit.py @@ -205,13 +205,13 @@ def _setVariables(self, dontset=None): continue log.debug("Setting environment variable %s to %s" % (key, val)) - env.putenv(key, val) + env.set(key, val) # also set unique named variables that can be used in Makefiles # - so you can have 'CFLAGS = $(SOFTVARCFLAGS)' # -- 'CLFLAGS = $(CFLAGS)' gives '*** Recursive variable `CFLAGS' # references itself (eventually). Stop' error - env.putenv("SOFTVAR%s" % key, val) + env.set("SOFTVAR%s" % key, val) def _getOptimalArchitecture(self): @@ -807,10 +807,10 @@ def mpi_cmd_for(self, cmd, nr_ranks): if mpi_type == "Intel": # set temporary dir for mdp - env.putenv('I_MPI_MPD_TMPDIR', "/tmp") + env.set('I_MPI_MPD_TMPDIR', "/tmp") # set PBS_ENVIRONMENT, so that --file option for mpdboot isn't stripped away - env.putenv('PBS_ENVIRONMENT', "PBS_BATCH_MPI") + env.set('PBS_ENVIRONMENT', "PBS_BATCH_MPI") # create mpdboot file fn = "/tmp/mpdboot" From 2668146c03dba162a3fc7899c758336cc6e52c1d Mon Sep 17 00:00:00 2001 From: Toon Willems Date: Tue, 31 Jul 2012 14:46:29 +0200 Subject: [PATCH 167/798] remove whitespace add doc string --- easybuild/framework/application.py | 2 -- easybuild/tools/environment.py | 3 +++ 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/easybuild/framework/application.py b/easybuild/framework/application.py index bdf58d1ca6..2adb9d749e 100644 --- a/easybuild/framework/application.py +++ b/easybuild/framework/application.py @@ -898,8 +898,6 @@ def build(self): env.write_changes(os.path.join(logdir, "easybuild-env-vars.sh")) - - except StopException: pass diff --git a/easybuild/tools/environment.py b/easybuild/tools/environment.py index 2271da1dcf..44d07c84c8 100644 --- a/easybuild/tools/environment.py +++ b/easybuild/tools/environment.py @@ -3,6 +3,9 @@ changes = {} def write_changes(filename): + """ + Write current changes to filename and reset environment afterwards + """ script = open(filename,'w') for key in changes: From 257fcfe644b3fba035ae2fa007701c9f9962b043 Mon Sep 17 00:00:00 2001 From: Kenneth Hoste Date: Tue, 31 Jul 2012 14:49:05 +0200 Subject: [PATCH 168/798] fix finding scotch subdir in sanity check --- easybuild/easyblocks/o/openfoam.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/easybuild/easyblocks/o/openfoam.py b/easybuild/easyblocks/o/openfoam.py index 190eb555ec..54778b96d7 100644 --- a/easybuild/easyblocks/o/openfoam.py +++ b/easybuild/easyblocks/o/openfoam.py @@ -128,7 +128,7 @@ def sanitycheck(self): pdir = "linux64%s" % self.wm_compiler scotchdir = "scotch_???" - d = os.path.join(tdir, "platforms", pdir) + d = os.path.join(self.installdir, tdir, "platforms", pdir) if not os.path.exists(d): for x in os.listdir(d): if x.startswith("scotch_"): From a5fca2647ad6dda861b085c230b7d5c5dfdab29d Mon Sep 17 00:00:00 2001 From: Toon Willems Date: Tue, 31 Jul 2012 15:21:31 +0200 Subject: [PATCH 169/798] fix code and unittests --- easybuild/framework/easyblock.py | 5 ++--- easybuild/test/easyblock.py | 2 +- easybuild/test/filetools.py | 4 ++-- 3 files changed, 5 insertions(+), 6 deletions(-) diff --git a/easybuild/framework/easyblock.py b/easybuild/framework/easyblock.py index dae21bee0e..8b0df94a7b 100644 --- a/easybuild/framework/easyblock.py +++ b/easybuild/framework/easyblock.py @@ -172,7 +172,6 @@ def validate_os_deps(self): """ not_found = [] for dep in self['osdependencies']: - # TODO: make _os_dependency_check work all platforms if not self._os_dependency_check(dep): not_found.append(dep) @@ -249,9 +248,9 @@ def _os_dependency_check(self, dep): # - uses rpm -q and dpkg -s --> can be run as non-root!! # - fallback on which # - should be extended to files later? - if run_cmd('which rpm', simple=True): + if run_cmd('which rpm', simple=True, log_ok=False): cmd = "rpm -q %s" % dep - elif run_cmd('which dpkg', simple=True): + elif run_cmd('which dpkg', simple=True, log_ok=False): cmd = "dpkg -s %s" % dep else: # fallback for when os-Dependency is a binary diff --git a/easybuild/test/easyblock.py b/easybuild/test/easyblock.py index ba5b1ea28a..860941d75f 100644 --- a/easybuild/test/easyblock.py +++ b/easybuild/test/easyblock.py @@ -73,7 +73,7 @@ def runTest(self): # this should now not crash eb.validate() - eb['osdependencies'] = ['tcsh'] + eb['osdependencies'] = ['non-existent-dep'] self.assertErrorRegex(EasyBuildError, "OS dependencies were not found", eb.validate) # dummy toolkit, installversion == version diff --git a/easybuild/test/filetools.py b/easybuild/test/filetools.py index 915000344c..761d2eeb1a 100644 --- a/easybuild/test/filetools.py +++ b/easybuild/test/filetools.py @@ -24,9 +24,9 @@ def runTest(self): self.assertEqual("bunzip2 /tmp/test.bz2", cmd) cmd = ft.extractCmd("/tmp/test.tbz") - self.assertEqual("tar xfj /tmp/test.tbz", cmd) + self.assertEqual("tar xjf /tmp/test.tbz", cmd) cmd = ft.extractCmd("/tmp/test.tar.bz2") - self.assertEqual("tar xfj /tmp/test.tar.bz2", cmd) + self.assertEqual("tar xjf /tmp/test.tar.bz2", cmd) (out, ec) = ft.run_cmd("echo hello") From dac61b59c80b86fc0dcb418c4867c512263e80e1 Mon Sep 17 00:00:00 2001 From: Toon Willems Date: Tue, 31 Jul 2012 15:24:20 +0200 Subject: [PATCH 170/798] update comment --- easybuild/test/build.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/easybuild/test/build.py b/easybuild/test/build.py index a85a250ed3..e827bef5f1 100644 --- a/easybuild/test/build.py +++ b/easybuild/test/build.py @@ -45,7 +45,7 @@ def setUp(self): self.build_ok = False self.test_results.append((file, 'eb-file error', err)) - # TODO: confirm that build-order doesn't matter + # Since build-order doesn't matter we don't have to use the resolveDependencies method self.apps = [] for pkg in packages: spec = pkg['spec'] From 885842c3d9cc98798f1c4d3b8a2bd1a530bd8806 Mon Sep 17 00:00:00 2001 From: Kenneth Hoste Date: Tue, 31 Jul 2012 15:34:15 +0200 Subject: [PATCH 171/798] fix OpenFOAM sanity check, for real --- easybuild/easyblocks/o/openfoam.py | 17 ++++------------- 1 file changed, 4 insertions(+), 13 deletions(-) diff --git a/easybuild/easyblocks/o/openfoam.py b/easybuild/easyblocks/o/openfoam.py index 54778b96d7..69636a135b 100644 --- a/easybuild/easyblocks/o/openfoam.py +++ b/easybuild/easyblocks/o/openfoam.py @@ -122,22 +122,13 @@ def sanitycheck(self): if not self.getcfg('sanityCheckPaths'): odir = "%s-%s" % (self.name(), self.version()) - tdir = "ThirdParty-%s" % self.version() - pdiro = "linux64%sDPOpt" % self.wm_compiler - pdir = "linux64%s" % self.wm_compiler - - scotchdir = "scotch_???" - d = os.path.join(self.installdir, tdir, "platforms", pdir) - if not os.path.exists(d): - for x in os.listdir(d): - if x.startswith("scotch_"): - scotchdir = x + pdirs = [] + if LooseVersion(self.version()) >= LooseVersion("2"): + pdirs = ["%s/platforms/linux64%sDPOpt/%s" % (odir, self.wm_compiler, x) for x in ["bin", "lib"]] self.setcfg('sanityCheckPaths',{'files':["%s/etc/%s" % (odir, x) for x in ["bashrc", "cshrc"]], - 'dirs':["%s/platforms/%s/%s" % (odir, pdiro, x) for x in ["bin", "lib"]] + - ["%s/platforms/%s/%s/bin" % (tdir, pdir, scotchdir), - "%s/platforms/%s/lib" % (tdir, pdiro)] + 'dirs':["bin"] + pdirs }) self.log.info("Customized sanity check paths: %s" % self.getcfg('sanityCheckPaths')) From 7604bf8d149e9f591e75014d9cf3c86e12c39fd1 Mon Sep 17 00:00:00 2001 From: Toon Willems Date: Tue, 31 Jul 2012 15:44:06 +0200 Subject: [PATCH 172/798] update documentation --- easybuild/test/build.py | 33 +++++++++++++++++++++++++-------- 1 file changed, 25 insertions(+), 8 deletions(-) diff --git a/easybuild/test/build.py b/easybuild/test/build.py index e827bef5f1..3ccfd26ed5 100644 --- a/easybuild/test/build.py +++ b/easybuild/test/build.py @@ -14,8 +14,29 @@ class BuildTest(TestCase): """ This class will build everything in the path given to it. There are several possibilities why some applications fail to build, - this test will try to distinguish between: 'eb-file error', 'preparation error', 'configure', - 'make', 'make install', 'sanitycheck', 'test' + this test will distinguish between the different phases in the build: + * eb-file parsing + * initialization + * preparation + * pre-build verification + * generate installdir name + * make builddir + * unpacking + * patching + * prepare toolkit + * setup startfrom + * configure + * make + * test + * create installdir + * make install + * packages + * postproc + * sanity check + * cleanup + + At the end of its run, this test will report which easyblocks failed (the fase and the error are included) + via the log to stdout """ def setUp(self): @@ -64,7 +85,7 @@ def setUp(self): self.apps.append(app_class(spec, debug=True)) except EasyBuildError, err: self.build_ok = False - self.test_results.append((spec, 'Initialization error', err)) + self.test_results.append((spec, 'initialization', err)) def performStep(self, fase, method): errors = 0 @@ -85,19 +106,15 @@ def performStep(self, fase, method): def runTest(self): - self.log.info("Continuing building other packages") + # take manual control over the building self.performStep("preparation", lambda x: x.prepare_build()) self.performStep("pre-build verification", lambda x: x.ready2build()) - self.performStep("generate installdir name", lambda x: x.gen_installdir()) self.performStep("make builddir", lambda x: x.make_builddir()) - self.performStep("unpacking", lambda x: x.unpack_src()) self.performStep("patching", lambda x: x.apply_patch()) - - self.performStep("prepare toolkit", lambda x: x.toolkit().prepare(x.getcfg('onlytkmod'))) self.performStep("setup startfrom", lambda x: x.startfrom()) self.performStep('configure', lambda x: x.configure()) From 99bd92632fbca8dfb3ee78bf1c0e554aa90e9cea Mon Sep 17 00:00:00 2001 From: Toon Willems Date: Tue, 31 Jul 2012 15:47:35 +0200 Subject: [PATCH 173/798] forgot docstrings --- easybuild/test/build.py | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/easybuild/test/build.py b/easybuild/test/build.py index 3ccfd26ed5..8bb259f14e 100644 --- a/easybuild/test/build.py +++ b/easybuild/test/build.py @@ -88,6 +88,9 @@ def setUp(self): self.test_results.append((spec, 'initialization', err)) def performStep(self, fase, method): + """ + Perform method for all easyblocks which can still be build + """ errors = 0 new_apps = [] for obj in self.apps: @@ -106,6 +109,9 @@ def performStep(self, fase, method): def runTest(self): + """ + Actual test, loop over all the different steps in a build + """ self.log.info("Continuing building other packages") # take manual control over the building From 9f457a5c1247c9cc4ef09d484281233c0be479fd Mon Sep 17 00:00:00 2001 From: Kenneth Hoste Date: Tue, 31 Jul 2012 16:07:28 +0200 Subject: [PATCH 174/798] fix typo in OpenFOAM sanity check --- easybuild/easyblocks/o/openfoam.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/easybuild/easyblocks/o/openfoam.py b/easybuild/easyblocks/o/openfoam.py index 69636a135b..4eef21f935 100644 --- a/easybuild/easyblocks/o/openfoam.py +++ b/easybuild/easyblocks/o/openfoam.py @@ -128,7 +128,7 @@ def sanitycheck(self): pdirs = ["%s/platforms/linux64%sDPOpt/%s" % (odir, self.wm_compiler, x) for x in ["bin", "lib"]] self.setcfg('sanityCheckPaths',{'files':["%s/etc/%s" % (odir, x) for x in ["bashrc", "cshrc"]], - 'dirs':["bin"] + pdirs + 'dirs':["%s/bin" % odir] + pdirs }) self.log.info("Customized sanity check paths: %s" % self.getcfg('sanityCheckPaths')) From 673306d5c4e0e1c647a225043155dc0ed90d0e7b Mon Sep 17 00:00:00 2001 From: Kenneth Hoste Date: Tue, 31 Jul 2012 17:52:07 +0200 Subject: [PATCH 175/798] introduce constant in toolkit.py for compiler families and MPI libraries --- easybuild/easyblocks/c/cp2k.py | 5 +++-- easybuild/easyblocks/n/netcdf.py | 3 ++- easybuild/easyblocks/n/netcdf_fortran.py | 3 ++- easybuild/easyblocks/o/openfoam.py | 11 +++++----- easybuild/easyblocks/p/python.py | 10 ++++----- easybuild/easyblocks/w/wps.py | 10 ++++----- easybuild/easyblocks/w/wrf.py | 10 ++++----- easybuild/tools/toolkit.py | 26 +++++++++++++++--------- 8 files changed, 44 insertions(+), 34 deletions(-) diff --git a/easybuild/easyblocks/c/cp2k.py b/easybuild/easyblocks/c/cp2k.py index f346f9ddbc..c22932ca22 100644 --- a/easybuild/easyblocks/c/cp2k.py +++ b/easybuild/easyblocks/c/cp2k.py @@ -27,6 +27,7 @@ import sys from easybuild.framework.application import Application from easybuild.tools.filetools import run_cmd +import easybuild.tools.toolkit as toolkit class CP2K(Application): """ @@ -118,9 +119,9 @@ def configure(self): # compiler toolkit specific configuration comp_fam = self.tk.toolkit_comp_family() - if comp_fam == "Intel": + if comp_fam == toolkit.INTEL: options = self.configureIntelBased() - elif comp_fam == "GCC": + elif comp_fam == toolkit.GCC: options = self.configureGCCBased() else: self.log.error("Don't know how to tweak configuration for compiler used.") diff --git a/easybuild/easyblocks/n/netcdf.py b/easybuild/easyblocks/n/netcdf.py index eea55414f7..63b30cfede 100644 --- a/easybuild/easyblocks/n/netcdf.py +++ b/easybuild/easyblocks/n/netcdf.py @@ -22,6 +22,7 @@ from distutils.version import LooseVersion from easybuild.framework.application import Application import easybuild.tools.environment as env +import easybuild.tools.toolkit as toolkit class NetCDF(Application): """Support for building/installing netCDF""" @@ -40,7 +41,7 @@ def configure(self): )) # add -DgFortran to CPPFLAGS when building with GCC - if self.tk.toolkit_comp_family() == "GCC": + if self.tk.toolkit_comp_family() == toolkit.GCC: env.set('CPPFLAGS', "%s -DgFortran" % os.getenv('CPPFLAGS')) Application.configure(self) diff --git a/easybuild/easyblocks/n/netcdf_fortran.py b/easybuild/easyblocks/n/netcdf_fortran.py index d2303fe27d..a1e9c8a4f3 100644 --- a/easybuild/easyblocks/n/netcdf_fortran.py +++ b/easybuild/easyblocks/n/netcdf_fortran.py @@ -21,6 +21,7 @@ import os from easybuild.framework.application import Application import easybuild.tools.environment as env +import easybuild.tools.toolkit as toolkit class NetCDF_Fortran(Application): """Support for building/installing the netCDF-Fortran library""" @@ -34,7 +35,7 @@ def configure(self): self.updatecfg('configopts', 'FCFLAGS="%s" FC="%s"' % (os.getenv('FFLAGS'), os.getenv('F90'))) # add -DgFortran to CPPFLAGS when building with GCC - if self.tk.toolkit_comp_family() == "GCC": + if self.tk.toolkit_comp_family() == toolkit.GCC: env.set('CPPFLAGS', "%s -DgFortran" % os.getenv('CPPFLAGS')) Application.configure(self) diff --git a/easybuild/easyblocks/o/openfoam.py b/easybuild/easyblocks/o/openfoam.py index 4eef21f935..2bf7e2fa62 100644 --- a/easybuild/easyblocks/o/openfoam.py +++ b/easybuild/easyblocks/o/openfoam.py @@ -23,6 +23,7 @@ import stat from easybuild.framework.application import Application from easybuild.tools.filetools import run_cmd, recursiveChmod +import easybuild.tools.toolkit as toolkit class OpenFOAM(Application): """Support for building and installing OpenFOAM.""" @@ -30,7 +31,7 @@ class OpenFOAM(Application): def __init__(self,*args,**kwargs): """Specify that OpenFOAM should be built in install dir.""" - Application.__init__(self, args,kwargs) + Application.__init__(self, *args, **kwargs) self.build_in_installdir = True @@ -52,10 +53,10 @@ def configure(self): # compiler comp_fam = self.tk.toolkit_comp_family() - if comp_fam == "GCC": + if comp_fam == toolkit.GCC: self.wm_compiler="Gcc" - elif comp_fam == "Intel": + elif comp_fam == toolkit.INTEL: self.wm_compiler="Icc" # make sure -no-prec-div is used with Intel compilers @@ -69,11 +70,11 @@ def configure(self): # type of MPI mpi_type = self.tk.toolkit_mpi_type() - if mpi_type == "Intel": + if mpi_type == toolkit.INTEL: self.mpipath = os.path.join(os.environ['SOFTROOTIMPI'],'intel64') self.wm_mplib = "IMPI" - elif mpi_type == "QLogic": + elif mpi_type == toolkit.QLOGIC: self.mpipath = os.environ['SOFTROOTQLOGICMPI'] self.wm_mplib = "MPICH" diff --git a/easybuild/easyblocks/p/python.py b/easybuild/easyblocks/p/python.py index 6d1e25f775..9eda703000 100644 --- a/easybuild/easyblocks/p/python.py +++ b/easybuild/easyblocks/p/python.py @@ -18,11 +18,11 @@ # You should have received a copy of the GNU General Public License # along with EasyBuild. If not, see . ## - -from easybuild.framework.application import ApplicationPackage, Application -from easybuild.tools.filetools import unpack, patch, run_cmd import os import shutil +from easybuild.framework.application import ApplicationPackage, Application +from easybuild.tools.filetools import unpack, patch, run_cmd +import easybuild.tools.toolkit as toolkit class Python(Application): """Support for building/installing Python @@ -192,10 +192,10 @@ class FortranPythonPackage(DefaultPythonPackage): def make(self): comp_fam = self.tk.toolkit_comp_family() - if comp_fam == "Intel": + if comp_fam == toolkit.INTEL: cmd = "python setup.py build --compiler=intel --fcompiler=intelem" - elif comp_fam == "GCC": + elif comp_fam == toolkit.GCC: cmdprefix = "" ldflags = os.getenv('LDFLAGS') if ldflags: diff --git a/easybuild/easyblocks/w/wps.py b/easybuild/easyblocks/w/wps.py index 90efd21291..8eba699d34 100644 --- a/easybuild/easyblocks/w/wps.py +++ b/easybuild/easyblocks/w/wps.py @@ -28,8 +28,8 @@ from easybuild.framework.application import Application from easybuild.tools.filetools import patch_perl_script_autoflush, run_cmd, run_cmd_qa, unpack from easybuild.easyblocks.n.netcdf import set_netcdf_env_vars, get_netcdf_module_set_cmds - import easybuild.tools.environment as env +import easybuild.tools.toolkit as toolkit class WPS(Application): """Support for building/installing WPS.""" @@ -125,10 +125,10 @@ def configure(self): 'dmpar':'dmpar' } - if self.comp_fam == "Intel": + if self.comp_fam == toolkit.INTEL: build_type_option = " Linux x86_64, Intel compiler" - elif self.comp_fam == "GCC": + elif self.comp_fam == toolkit.GCC: build_type_option = "Linux x86_64 g95 compiler" else: @@ -141,10 +141,10 @@ def configure(self): 'dmpar':'DM parallel' } - if self.comp_fam == "Intel": + if self.comp_fam == toolkit.INTEL: build_type_option = "PC Linux x86_64, Intel compiler" - elif self.comp_fam == "GCC": + elif self.comp_fam == toolkit.GCC: build_type_option = "PC Linux x86_64, gfortran compiler," knownbuildtypes['dmpar'] = knownbuildtypes['dmpar'].upper() diff --git a/easybuild/easyblocks/w/wrf.py b/easybuild/easyblocks/w/wrf.py index 665b1b8e65..6eaa5f6da3 100644 --- a/easybuild/easyblocks/w/wrf.py +++ b/easybuild/easyblocks/w/wrf.py @@ -25,8 +25,8 @@ from easybuild.framework.application import Application from easybuild.tools.filetools import patch_perl_script_autoflush, run_cmd, run_cmd_qa from easybuild.easyblocks.n.netcdf import set_netcdf_env_vars, get_netcdf_module_set_cmds - import easybuild.tools.environment as env +import easybuild.tools.toolkit as toolkit class WRF(Application): """Support for building/installing WRF.""" @@ -98,10 +98,10 @@ def configure(self): # determine build type option to look for build_type_option = None self.comp_fam = self.tk.toolkit_comp_family() - if self.comp_fam == "Intel": + if self.comp_fam == toolkit.INTEL: build_type_option = "Linux x86_64 i486 i586 i686, ifort compiler with icc" - elif self.comp_fam == "GCC": + elif self.comp_fam == toolkit.GCC: build_type_option = "x86_64 Linux, gfortran compiler with gcc" else: @@ -157,7 +157,7 @@ def configure(self): # set extra flags for Intel compilers # see http://software.intel.com/en-us/forums/showthread.php?t=72109&p=1#146748 - if self.comp_fam == "Intel": + if self.comp_fam == toolkit.INTEL: # -O3 -heap-arrays is required to resolve compilation error for envvar in ['CFLAGS', 'FFLAGS']: @@ -217,7 +217,7 @@ def test(self): self.testcases.remove(test) # some tests hang when WRF is built with Intel compilers - if self.comp_fam == "Intel": + if self.comp_fam == toolkit.INTEL: for test in ["em_heldsuarez"]: if test in self.testcases: self.testcases.remove(test) diff --git a/easybuild/tools/toolkit.py b/easybuild/tools/toolkit.py index 46307fc650..afff955b9f 100644 --- a/easybuild/tools/toolkit.py +++ b/easybuild/tools/toolkit.py @@ -30,6 +30,12 @@ log = getLog('Toolkit') +# constant used for recognizing compilers, MPI libraries, ... +GCC = "GCC" +INTEL = "Intel" +OPENMPI = "OpenMPI" +QLOGIC = "QLogic" + class Toolkit: """ Class for compiler toolkits, consisting out of a compiler and dependencies (libraries). @@ -763,8 +769,8 @@ def toolkit_comp_family(self): """Determine compiler family based on toolkit dependencies.""" comp_families = { # always use tuples as keys! - ('icc', 'ifort'):'Intel', # Intel toolkit has both icc and ifort - ('GCC', ):'GCC' # GCC toolkit uses GCC as compiler suite + ('icc', 'ifort'):INTEL, # Intel toolkit has both icc and ifort + ('GCC', ):GCC # GCC toolkit uses GCC as compiler suite } return self.det_toolkit_type("compiler family", comp_families) @@ -772,9 +778,9 @@ def toolkit_comp_family(self): def get_openmp_flag(self): """Determine compiler flag for OpenMP""" - if self.toolkit_comp_family() == "Intel": + if self.toolkit_comp_family() == INTEL: return "-openmp" - elif self.toolkit_comp_family() == "GCC": + elif self.toolkit_comp_family() == GCC: return "-fopenmp" else: log.error("Can't determine compiler flag for OpenMP.") @@ -783,9 +789,9 @@ def toolkit_mpi_type(self): """Determine type of MPI library based on toolkit dependencies.""" mpi_types = { # always use tuples as keys! - ('impi', ):'Intel', # Intel MPI - ('OpenMPI', ):'OpenMPI', # OpenMPI - ('QLogicMPI', ):'QLogic' # QLogic MPI + ('impi', ):INTEL, # Intel MPI + ('OpenMPI', ):OPENMPI, # OpenMPI + ('QLogicMPI', ):QLOGIC # QLogic MPI } return self.det_toolkit_type("type of mpi library", mpi_types) @@ -798,14 +804,14 @@ def mpi_cmd_for(self, cmd, nr_ranks): # different known mpirun commands mpi_cmds = { - "OpenMPI":"mpirun -n %(nr_ranks)d %(cmd)s", - "Intel":"mpirun %(mpdbootfile)s %(nodesfile)s -np %(nr_ranks)d %(cmd)s", + OPENMPI:"mpirun -n %(nr_ranks)d %(cmd)s", + INTEL:"mpirun %(mpdbootfile)s %(nodesfile)s -np %(nr_ranks)d %(cmd)s", } mpi_type = self.toolkit_mpi_type() # Intel MPI mpirun needs more work - if mpi_type == "Intel": + if mpi_type == INTEL: # set temporary dir for mdp env.set('I_MPI_MPD_TMPDIR', "/tmp") From f130d364873a495d976919efad9f31411c941df1 Mon Sep 17 00:00:00 2001 From: Kenneth Hoste Date: Tue, 31 Jul 2012 17:23:02 +0200 Subject: [PATCH 176/798] create fake modules in a temporary directory, and clean it up afterwards --- easybuild/framework/application.py | 4 +++- easybuild/tools/module_generator.py | 21 ++++++++++++++++++--- 2 files changed, 21 insertions(+), 4 deletions(-) diff --git a/easybuild/framework/application.py b/easybuild/framework/application.py index 38702e44e8..a5d233b66f 100644 --- a/easybuild/framework/application.py +++ b/easybuild/framework/application.py @@ -26,7 +26,6 @@ import os import re import shutil -import tempfile import time import urllib @@ -1062,6 +1061,9 @@ def sanitycheck(self): self.log.debug("Loading module failed: %s" % err) self.sanityCheckOK = False + # clean up path for fake module + self.moduleGenerator.cleanup() + # chdir to installdir (beter environment for running tests) os.chdir(self.installdir) diff --git a/easybuild/tools/module_generator.py b/easybuild/tools/module_generator.py index 6871d92e30..dcfb5e4ad3 100644 --- a/easybuild/tools/module_generator.py +++ b/easybuild/tools/module_generator.py @@ -22,6 +22,8 @@ Generating module files. """ import os +import shutil +import tempfile from easybuild.tools.build_log import getLog from easybuild.tools.config import installPath @@ -37,6 +39,7 @@ def __init__(self, application, fake=False): self.fake = fake self.filename = None self.module_path = None + self.tmpdir = None def createFiles(self): """ @@ -44,10 +47,11 @@ def createFiles(self): """ base = installPath('mod') - # Fake mode: set installpath to builddir + # Fake mode: set installpath to temporary dir if self.fake: - log.debug("Fake mode: using %s (instead of %s)" % (self.app.builddir, base)) - base = self.app.builddir + self.tmpdir = tempfile.mkdtemp() + log.debug("Fake mode: using %s (instead of %s)" % (self.tmpdir, base)) + base = self.tmpdir # Real file goes in 'all' category self.module_path = os.path.join(base, 'all') @@ -148,3 +152,14 @@ def setEnvironment(self, key, value): Generate setenv statement for the given key/value pair. """ return "setenv\t%s\t\t%s\n" % (key, value) + + def cleanup(self): + """ + Clean up temporary directory used for fake modules, if any. + """ + if self.fake: + self.log.info("Cleaning up fake modules dir %s" % self.tmpdir) + try: + shutil.rmtree(self.tmpdir) + except OSError, err: + self.log.exception("Cleaning up fake module dir failed: %s" % err) From d9d5d54f895d618b4690fcc948bba06fee55ae61 Mon Sep 17 00:00:00 2001 From: Toon Willems Date: Wed, 1 Aug 2012 09:13:27 +0200 Subject: [PATCH 177/798] change to a more managable for loop --- easybuild/test/build.py | 59 +++++++++++++++++++---------------------- 1 file changed, 27 insertions(+), 32 deletions(-) diff --git a/easybuild/test/build.py b/easybuild/test/build.py index 8bb259f14e..956d866ef7 100644 --- a/easybuild/test/build.py +++ b/easybuild/test/build.py @@ -45,10 +45,12 @@ def setUp(self): config.init('easybuild/easybuild_config.py') self.test_results = [] + self.build_status = {} self.log = getLog("BuildTest") self.build_ok = True + files = [] if len(sys.argv) > 1: for path in sys.argv[1:]: @@ -87,26 +89,19 @@ def setUp(self): self.build_ok = False self.test_results.append((spec, 'initialization', err)) - def performStep(self, fase, method): + def performStep(self, fase, obj, method): """ - Perform method for all easyblocks which can still be build + Perform method on object if it can be build """ - errors = 0 - new_apps = [] - for obj in self.apps: + if obj not in self.build_status: try: method(obj) - new_apps.append(obj) except EasyBuildError, err: - errors += 1 # we cannot continue building it self.build_ok = False self.test_results.append((obj, fase, err)) - - self.apps = new_apps - - self.log.info("%s errors during %s" % (errors, fase)) - + # keep a dict of so we can check in O(1) if objects can still be build + self.build_status[obj] = fase def runTest(self): """ @@ -114,26 +109,26 @@ def runTest(self): """ self.log.info("Continuing building other packages") - # take manual control over the building - self.performStep("preparation", lambda x: x.prepare_build()) - self.performStep("pre-build verification", lambda x: x.ready2build()) - self.performStep("generate installdir name", lambda x: x.gen_installdir()) - self.performStep("make builddir", lambda x: x.make_builddir()) - self.performStep("unpacking", lambda x: x.unpack_src()) - self.performStep("patching", lambda x: x.apply_patch()) - self.performStep("prepare toolkit", lambda x: x.toolkit().prepare(x.getcfg('onlytkmod'))) - self.performStep("setup startfrom", lambda x: x.startfrom()) - self.performStep('configure', lambda x: x.configure()) - self.performStep('make', lambda x: x.make()) - self.performStep('test', lambda x: x.test()) - self.performStep('create installdir', lambda x: x.make_installdir()) - self.performStep('make install', lambda x: x.make_install()) - self.performStep('packages', lambda x: x.packages()) - self.performStep('postproc', lambda x: x.postproc()) - self.performStep('sanity check', lambda x: x.sanitycheck()) - self.performStep('cleanup', lambda x: x.cleanup()) - - # At this stage, self.apps contains the succesfully build packages + + for app in self.apps: + # take manual control over the building + self.performStep("preparation", app, lambda x: x.prepare_build()) + self.performStep("pre-build verification", app, lambda x: x.ready2build()) + self.performStep("generate installdir name", app, lambda x: x.gen_installdir()) + self.performStep("make builddir", app, lambda x: x.make_builddir()) + self.performStep("unpacking", app, lambda x: x.unpack_src()) + self.performStep("patching", app, lambda x: x.apply_patch()) + self.performStep("prepare toolkit", app, lambda x: x.toolkit().prepare(x.getcfg('onlytkmod'))) + self.performStep("setup startfrom", app, lambda x: x.startfrom()) + self.performStep('configure', app, lambda x: x.configure()) + self.performStep('make', app, lambda x: x.make()) + self.performStep('test', app, lambda x: x.test()) + self.performStep('create installdir', app, lambda x: x.make_installdir()) + self.performStep('make install', app, lambda x: x.make_install()) + self.performStep('packages', app, lambda x: x.packages()) + self.performStep('postproc', app, lambda x: x.postproc()) + self.performStep('sanity check', app, lambda x: x.sanitycheck()) + self.performStep('cleanup', app, lambda x: x.cleanup()) for result in self.test_results: self.log.info("%s crashed with an error during fase: %s, error: %s" % result) From 92abfa4214eccc85627554c11a6df06ad309a5d2 Mon Sep 17 00:00:00 2001 From: Toon Willems Date: Wed, 1 Aug 2012 09:29:31 +0200 Subject: [PATCH 178/798] chdir to a basedir before running --- easybuild/test/build.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/easybuild/test/build.py b/easybuild/test/build.py index 956d866ef7..a3c00e309d 100644 --- a/easybuild/test/build.py +++ b/easybuild/test/build.py @@ -108,9 +108,10 @@ def runTest(self): Actual test, loop over all the different steps in a build """ self.log.info("Continuing building other packages") - + base_dir = os.getcwd() for app in self.apps: + os.chdir(base_dir) # take manual control over the building self.performStep("preparation", app, lambda x: x.prepare_build()) self.performStep("pre-build verification", app, lambda x: x.ready2build()) From d6b4856ea3a534a2e00d2cb9f70175d2b105f2b4 Mon Sep 17 00:00:00 2001 From: Toon Willems Date: Wed, 1 Aug 2012 09:54:44 +0200 Subject: [PATCH 179/798] reset environment before each build --- easybuild/test/build.py | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 deletions(-) diff --git a/easybuild/test/build.py b/easybuild/test/build.py index a3c00e309d..5c4787cbf1 100644 --- a/easybuild/test/build.py +++ b/easybuild/test/build.py @@ -1,3 +1,4 @@ +import copy import os import re import sys @@ -7,6 +8,7 @@ from easybuild.tools.build_log import getLog, EasyBuildError, initLogger from easybuild.framework.application import get_class, Application from easybuild.build import findEasyconfigs, processEasyconfig, resolveDependencies +from easybuild.tools.filetools import modifyEnv import easybuild.tools.config as config @@ -50,7 +52,6 @@ def setUp(self): self.log = getLog("BuildTest") self.build_ok = True - files = [] if len(sys.argv) > 1: for path in sys.argv[1:]: @@ -109,9 +110,13 @@ def runTest(self): """ self.log.info("Continuing building other packages") base_dir = os.getcwd() + base_env = copy.deepcopy(os.environ) for app in self.apps: + # start with a clean slate os.chdir(base_dir) + modifyEnv(os.environ, base_env) + # take manual control over the building self.performStep("preparation", app, lambda x: x.prepare_build()) self.performStep("pre-build verification", app, lambda x: x.ready2build()) @@ -134,8 +139,8 @@ def runTest(self): for result in self.test_results: self.log.info("%s crashed with an error during fase: %s, error: %s" % result) - failed = len(self.test_results) - total = failed + len(self.apps) + failed = len(self.build_status) + total = len(self.apps) self.log.info("%s from %s packages failed to build!" % (failed, total)) From c127510920a648f9368f8d2fb36e6f958bcbe35c Mon Sep 17 00:00:00 2001 From: Kenneth Hoste Date: Wed, 1 Aug 2012 10:18:17 +0200 Subject: [PATCH 180/798] fix logging in cleanup of module_generator --- easybuild/tools/module_generator.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/easybuild/tools/module_generator.py b/easybuild/tools/module_generator.py index dcfb5e4ad3..8c6ccfa343 100644 --- a/easybuild/tools/module_generator.py +++ b/easybuild/tools/module_generator.py @@ -158,8 +158,8 @@ def cleanup(self): Clean up temporary directory used for fake modules, if any. """ if self.fake: - self.log.info("Cleaning up fake modules dir %s" % self.tmpdir) + log.info("Cleaning up fake modules dir %s" % self.tmpdir) try: shutil.rmtree(self.tmpdir) except OSError, err: - self.log.exception("Cleaning up fake module dir failed: %s" % err) + log.exception("Cleaning up fake module dir failed: %s" % err) From cbd986121ebd188c1c04dd87853c145c4b470ad1 Mon Sep 17 00:00:00 2001 From: Toon Willems Date: Wed, 1 Aug 2012 10:50:42 +0200 Subject: [PATCH 181/798] remove raise calls, log.error and log.exception do this --- easybuild/build.py | 7 ------- 1 file changed, 7 deletions(-) diff --git a/easybuild/build.py b/easybuild/build.py index ebf998ee1d..1602efebba 100644 --- a/easybuild/build.py +++ b/easybuild/build.py @@ -299,7 +299,6 @@ def processEasyconfig(path, log, onlyBlocks=None, regtest_online=False): except EasyBuildError, err: msg = "Failed to process easyconfig %s:\n%s" % (spec, err.msg) log.exception(msg) - raise EasyBuildError(msg) name = eb['name'] @@ -357,7 +356,6 @@ def resolveDependencies(unprocessed, robot, log): if loopcnt > maxloopcnt: msg = "Maximum loop cnt %s reached, so quitting." % maxloopcnt log.error(msg) - raise EasyBuildError(msg) ## First try resolving dependencies without using external dependencies lastProcessedCount = -1 @@ -391,7 +389,6 @@ def resolveDependencies(unprocessed, robot, log): msg = "Expected easyconfig %s to resolve dependency for %s, but it does not" % (path, candidates[0]) msg += " (list of obtained modules after processing easyconfig: %s)" % mods log.error(msg) - raise EasyBuildError(msg) unprocessed.extend(processedSpecs) robotAddedDependency = True @@ -407,7 +404,6 @@ def resolveDependencies(unprocessed, robot, log): msg = "Dependencies not met. Cannot resolve %s" % missingDependencies.keys() log.error(msg) - raise EasyBuildError(msg) log.info("Dependency resolution complete, building as follows:\n%s" % orderedSpecs) return orderedSpecs @@ -473,7 +469,6 @@ def retrieveBlocksInSpec(spec, log, onlyBlocks): if blockName in [b['name'] for b in blocks]: msg = "Found block %s twice in %s." % (blockName, spec) log.error(msg) - raise EasyBuildError(msg) block = {'name': blockName, 'contents': blockContents} @@ -508,7 +503,6 @@ def retrieveBlocksInSpec(spec, log, onlyBlocks): if not dep in [b['name'] for b in blocks]: msg = "Block %s depends on %s, but block was not found." % (name, dep) log.error(msg) - raise EasyBuildError(msg) dep = [b for b in blocks if b['name'] == dep][0] f.write("\n## Dependency block %s" % (dep['name'])) @@ -521,7 +515,6 @@ def retrieveBlocksInSpec(spec, log, onlyBlocks): except Exception: msg = "Failed to write block %s to easyconfig %s" % (name, spec) log.exception(msg) - raise EasyBuildError(msg) specs.append(blockPath) From dc4461ac02135cca5e78c86484437fd24f508320 Mon Sep 17 00:00:00 2001 From: Toon Willems Date: Wed, 1 Aug 2012 10:54:37 +0200 Subject: [PATCH 182/798] re-use some existing code from Stijn --- easybuild/tools/pbs_job.py | 186 +++++++++++++++++++++++++++++++++++++ 1 file changed, 186 insertions(+) create mode 100644 easybuild/tools/pbs_job.py diff --git a/easybuild/tools/pbs_job.py b/easybuild/tools/pbs_job.py new file mode 100644 index 0000000000..08c273995d --- /dev/null +++ b/easybuild/tools/pbs_job.py @@ -0,0 +1,186 @@ + +# Copyright 2012 Stijn De Weirdt +# +# This file is part of HanythingOnDemand, +# originally created by the HPC team of the University of Ghent (http://ugent.be/hpc). +# + + +import os, sys, re + +from easybuild.tools.build_log import getLog + +class PbsJob: + """Interaction with torque""" + + def __init__(self, script, name): + """ + create a new Job to be submitted to PBS + """ + self.log = getLog("PBS") + self.script = script + self.name = name + + global pbs + global PBSQuery + try: + from PBSQuery import PBSQuery + import pbs + except ImportError: + self.log.error("Cannot import PBSQuery or pbs. Please make sure pbs_python is installed and usable.") + + self.pbs_server = pbs.pbs_default() + self.pbsconn = pbs.pbs_connect (self.pbs_server) + + self.jobid = None + + def submit(self) : + """Submit the jobscript txt, set self.jobid""" + txt = self.script + self.log.debug("Going to submit script %s" % txt) + + resources = {"walltime": "72:00:00", "nodes": "1:ppn=%s" % self.get_ppn() } + + attropl = pbs.new_attropl(2) ## jobparams + attropl[0].name = 'Job_Name' + attropl[0].value = self.name + attropl[1].name = 'Rerunable' + attropl[1].value = 'y' + + tmpattropl = pbs.new_attropl(len(resources)) ## jobparams + idx = 0 + for k, v in resources.items(): + tmpattropl[idx].name = 'Resource_List' ## resources + tmpattropl[idx].resource = k + tmpattropl[idx].value = v + idx += 1 + attropl.extend(tmpattropl) + + ## add a bunch of variables (added by qsub) + ## also set PBS_O_WORKDIR to os.getcwd() + os.environ.setdefault('WORKDIR', os.getcwd()) + + defvars = ['MAIL', 'HOME', 'PATH', 'SHELL', 'WORKDIR'] + + tmpattropl = pbs.new_attropl(1) + tmpattropl[0].name = 'Variable_List' + tmpattropl[0].value = ",".join([ "PBS_O_%s=%s" % (x, os.environ.get(x, 'NOTFOUND_%s' % x)) for x in defvars ]) + attropl.extend(tmpattropl) + + import tempfile + fh, scriptfn = tempfile.mkstemp() + f = os.fdopen(fh, 'w') + self.log.debug("Writing temp jobscript to %s" % scriptfn) + f.write(txt) + f.close() + + queue='long' + self.log.debug("Going to submit to queue %s" % queue) + + extend = 'NULL' ## always + jobid = pbs.pbs_submit(self.pbsconn, attropl, scriptfn, queue, extend) + + is_error, errormsg = pbs.error() + if is_error: + self.log.error("Failed to submit job script %s: error %s" % (scriptfn, errormsg)) + else: + self.log.debug("Succesful jobsubmission returned jobid %s" % jobid) + self.jobid = jobid + os.remove(scriptfn) + + def state(self): + """ + Return the state of the job + """ + + state = self.info(types=['job_state', 'exec_host']) + + jid = [x['id'] for x in state] + + jstate = [ x.get('job_state', None) for x in state] + + def get_uniq_hosts(txt, num= -1): + """txt host1/cpuid+host2/cpuid + - num: number of nodes to return + """ + res = [] + for h_c in txt.split('+'): + h = h_c.split('/')[0] + if h in res: continue + res.append(h) + return res[:num] + ehosts = [ get_uniq_hosts(x.get('exec_host', '')) for x in state] + + self.log.debug("Jobid %s jid %s state %s ehosts %s (%s)" % (self.jobid, jid, jstate, ehosts, state)) + + joined = zip(jid, jstate, [''.join(x[:1]) for x in ehosts]) ## only use first node (don't use [0], job in Q have empty list; use ''.join to make string) + temp = "Id %s State %s Node %s" + if len(joined) == 0: + msg = "No jobs found." + elif len(joined) == 1: + msg = "Found 1 job %s" % (temp % tuple(joined[0])) + else: + msg = "Found %s jobs\n" % len(joined) + for j in joined: + msg += " %s\n" % (temp % tuple(j)) + self.log.debug("msg %s" % msg) + + return msg + + def info(self, types=None): + """Return jobinfo""" + ## TODO restrict to current user jobs + if type(types) is str: + types = [types] + self.log.debug("Return info types %s" % types) + + if types is None: + jobattr = 'NULL' + else: + jobattr = pbs.new_attrl(len(types)) + for idx in range(len(types)): + jobattr[idx].name = types[idx] + + jobs = pbs.pbs_statjob(self.pbsconn, self.jobid, jobattr, 'NULL') + if len(jobs) == 0: + res = [] ## return nothing + self.log.debug("No job found. Wrong id %s or job finished? Returning %s" % (self.jobid, res)) + return res + elif len(jobs) == 1: + self.log.debug("Request for jobid %s returned one result %s" % (self.jobid, jobs)) + else: + self.log.error("Request for jobid %s returned more then one result %s" % (self.jobid, jobs)) + + ## more then one, return value + res = [] + for j in jobs: + job_details = dict([ (attrib.name, attrib.value) for attrib in j.attribs ]) + job_details['id'] = j.name ## add id + res.append(job_details) + self.log.debug("Found jobinfo %s" % res) + return res + + def remove(self): + """Remove the job with id jobid""" + result = pbs.pbs_deljob(self.pbsconn, self.jobid, '') ## use empty string, not NULL + if result: + self.log.error("Failed to delete job %s: error %s" % (self.jobid, result)) + else: + self.log.debug("Succesfully deleted job %s" % self.jobid) + + def get_ppn(self): + """Guess the ppn for full node""" + pq = PBSQuery() + node_vals = pq.getnodes().values() ## only the values, not the names + interesni_nodes = ('free', 'job-exclusive',) + res = {} + for np in [int(x['np'][0]) for x in node_vals if x['state'][0] in interesni_nodes]: + res.setdefault(np, 0) + res[np] += 1 + + ## return most frequent + freq_count, freq_np = max([(j, i) for i, j in res.items()]) + self.log.debug("Found most frequent np %s (%s times) in interesni nodes %s" % (freq_np, freq_count, interesni_nodes)) + + return freq_np + From e3a67379b837679b3e2ea4590fb1446447d72a2c Mon Sep 17 00:00:00 2001 From: Toon Willems Date: Wed, 1 Aug 2012 11:11:49 +0200 Subject: [PATCH 183/798] add documentation to _parse_dependency --- easybuild/framework/easyblock.py | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/easybuild/framework/easyblock.py b/easybuild/framework/easyblock.py index 8b0df94a7b..74776ed4ad 100644 --- a/easybuild/framework/easyblock.py +++ b/easybuild/framework/easyblock.py @@ -263,6 +263,17 @@ def _os_dependency_check(self, dep): def _parse_dependency(self, dep): + """ + parses the dependency into a usable dict with a common format + dep can be a dict a tuple or a list. + if it is a tuple or a list the attributes are expected to be in the following order: + ['name', 'version', 'suffix', 'dummy'] + + output dict contains these attributes: + ['name', 'version', 'suffix', 'dummy', 'tk'] + + """ + attr = ['name', 'version', 'suffix', 'dummy'] dependency = {'name': '', 'version': '', 'suffix': '', 'dummy': False} if isinstance(dep, dict): From 352680a5cc8c478bae57b49e7fe9c3825a94c63f Mon Sep 17 00:00:00 2001 From: Toon Willems Date: Wed, 1 Aug 2012 11:33:21 +0200 Subject: [PATCH 184/798] add basic cli interface for submitting jobs --- easybuild/build.py | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) diff --git a/easybuild/build.py b/easybuild/build.py index 7a8b65b513..e6d19d2a15 100644 --- a/easybuild/build.py +++ b/easybuild/build.py @@ -88,6 +88,9 @@ def add_build_options(parser): strictness_options = ['ignore', 'warn', 'error'] parser.add_option("--strict", type="choice", choices=strictness_options, help="set strictness \ level (possible levels: %s" % ', '.join(strictness_options)) + # only allow --job so we can filter it afterwards + parser.add_option("--job" , action="store_true", help="will submit the build as a job") + def main(): """ @@ -178,6 +181,10 @@ def main(): if options.strict: filetools.strictness = options.strict + if options.job: + submit_build_job(log) + log.info("submitted job, exiting now") + sys.exit(0) ## Read easyconfig files packages = [] @@ -700,6 +707,16 @@ def build(module, options, log, origEnviron, exitOnFailure=True): else: return (True, applicationLog) +def submit_build_job(log): + command = " ".join([arg for arg in sys.argv if arg != '--job']) + + # import here so it only loads when needed + from easybuild.tools.pbs_job import PbsJob + job = PbsJob(command, "easybuild-build-job") + job.submit() + log.info("job submitted. info: %s", job.info()) + + if __name__ == "__main__": try: main() From 99a4262c9a4cf0e0b50fbac37983dc21a799739d Mon Sep 17 00:00:00 2001 From: Toon Willems Date: Wed, 1 Aug 2012 11:44:23 +0200 Subject: [PATCH 185/798] added docstrings --- easybuild/framework/easyblock.py | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/easybuild/framework/easyblock.py b/easybuild/framework/easyblock.py index 74776ed4ad..d239f42cd3 100644 --- a/easybuild/framework/easyblock.py +++ b/easybuild/framework/easyblock.py @@ -237,6 +237,10 @@ def installversion(self): return name def _validate(self, attr, values): + """ + validation helper method. attr is the attribute it will check, values are the possible values. + if the value of the attribute is not in the is array, it will report an error + """ if self[attr] and self[attr] not in values: self.log.error("%s provided %s is not valid: %s" % (attr, self[attr], values)) @@ -299,9 +303,16 @@ def _parse_dependency(self, dep): def __getitem__(self, key): + """ + will return the value without the help text + """ return self.config[key][0] def __setitem__(self, key, value): + """ + sets the value of key in config. + help text is untouched + """ self.config[key][0] = value From 3b9f21b9294a4ed962e9bd5a23f947a0b76dc23b Mon Sep 17 00:00:00 2001 From: Toon Willems Date: Wed, 1 Aug 2012 12:05:07 +0200 Subject: [PATCH 186/798] GPL headers --- easybuild/framework/easyblock.py | 3 ++- easybuild/test/__init__.py | 20 ++++++++++++++++++++ easybuild/test/asyncprocess.py | 20 ++++++++++++++++++++ easybuild/test/build.py | 20 ++++++++++++++++++++ easybuild/test/easyblock.py | 20 ++++++++++++++++++++ easybuild/test/filetools.py | 20 ++++++++++++++++++++ easybuild/test/modulegenerator.py | 20 ++++++++++++++++++++ easybuild/test/modules.py | 20 ++++++++++++++++++++ easybuild/test/repository.py | 20 ++++++++++++++++++++ easybuild/test/robot.py | 20 ++++++++++++++++++++ easybuild/test/suite.py | 20 ++++++++++++++++++++ easybuild/test/toolkit.py | 20 ++++++++++++++++++++ 12 files changed, 222 insertions(+), 1 deletion(-) diff --git a/easybuild/framework/easyblock.py b/easybuild/framework/easyblock.py index d239f42cd3..5f19128bb7 100644 --- a/easybuild/framework/easyblock.py +++ b/easybuild/framework/easyblock.py @@ -1,5 +1,6 @@ ## -# Copyright 2009-2012 Stijn Deweirdt, Dries Verdegem, Kenneth Hoste, Pieter De Baets, Jens Timmerman, Toon Willems +# Copyright 2009-2012 Stijn De Weirdt, Dries Verdegem, Kenneth Hoste, Pieter De Baets, Jens Timmerman +# Copyright 2012 Toon Willems # # This file is part of EasyBuild, # originally created by the HPC team of the University of Ghent (http://ugent.be/hpc). diff --git a/easybuild/test/__init__.py b/easybuild/test/__init__.py index e69de29bb2..350d488c38 100644 --- a/easybuild/test/__init__.py +++ b/easybuild/test/__init__.py @@ -0,0 +1,20 @@ +## +# Copyright 2012 Toon Willems +# +# This file is part of EasyBuild, +# originally created by the HPC team of the University of Ghent (http://ugent.be/hpc). +# +# http://github.com/hpcugent/easybuild +# +# EasyBuild is free software: you can redistribute it and/or modify +# it under the terms of the GNU General Public License as published by +# the Free Software Foundation v2. +# +# EasyBuild is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with EasyBuild. If not, see . +## diff --git a/easybuild/test/asyncprocess.py b/easybuild/test/asyncprocess.py index ad4470f68c..ca84d230cc 100644 --- a/easybuild/test/asyncprocess.py +++ b/easybuild/test/asyncprocess.py @@ -1,3 +1,23 @@ +## +# Copyright 2012 Toon Willems +# +# This file is part of EasyBuild, +# originally created by the HPC team of the University of Ghent (http://ugent.be/hpc). +# +# http://github.com/hpcugent/easybuild +# +# EasyBuild is free software: you can redistribute it and/or modify +# it under the terms of the GNU General Public License as published by +# the Free Software Foundation v2. +# +# EasyBuild is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with EasyBuild. If not, see . +## import os import re diff --git a/easybuild/test/build.py b/easybuild/test/build.py index 5c4787cbf1..db0594e712 100644 --- a/easybuild/test/build.py +++ b/easybuild/test/build.py @@ -1,3 +1,23 @@ +## +# Copyright 2012 Toon Willems +# +# This file is part of EasyBuild, +# originally created by the HPC team of the University of Ghent (http://ugent.be/hpc). +# +# http://github.com/hpcugent/easybuild +# +# EasyBuild is free software: you can redistribute it and/or modify +# it under the terms of the GNU General Public License as published by +# the Free Software Foundation v2. +# +# EasyBuild is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with EasyBuild. If not, see . +## import copy import os import re diff --git a/easybuild/test/easyblock.py b/easybuild/test/easyblock.py index 860941d75f..91690e94d2 100644 --- a/easybuild/test/easyblock.py +++ b/easybuild/test/easyblock.py @@ -1,3 +1,23 @@ +## +# Copyright 2012 Toon Willems +# +# This file is part of EasyBuild, +# originally created by the HPC team of the University of Ghent (http://ugent.be/hpc). +# +# http://github.com/hpcugent/easybuild +# +# EasyBuild is free software: you can redistribute it and/or modify +# it under the terms of the GNU General Public License as published by +# the Free Software Foundation v2. +# +# EasyBuild is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with EasyBuild. If not, see . +## import os import re diff --git a/easybuild/test/filetools.py b/easybuild/test/filetools.py index 761d2eeb1a..ad3d9abd82 100644 --- a/easybuild/test/filetools.py +++ b/easybuild/test/filetools.py @@ -1,3 +1,23 @@ +## +# Copyright 2012 Toon Willems +# +# This file is part of EasyBuild, +# originally created by the HPC team of the University of Ghent (http://ugent.be/hpc). +# +# http://github.com/hpcugent/easybuild +# +# EasyBuild is free software: you can redistribute it and/or modify +# it under the terms of the GNU General Public License as published by +# the Free Software Foundation v2. +# +# EasyBuild is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with EasyBuild. If not, see . +## import os import re diff --git a/easybuild/test/modulegenerator.py b/easybuild/test/modulegenerator.py index 2fb605b059..dbf466a8fc 100644 --- a/easybuild/test/modulegenerator.py +++ b/easybuild/test/modulegenerator.py @@ -1,3 +1,23 @@ +## +# Copyright 2012 Toon Willems +# +# This file is part of EasyBuild, +# originally created by the HPC team of the University of Ghent (http://ugent.be/hpc). +# +# http://github.com/hpcugent/easybuild +# +# EasyBuild is free software: you can redistribute it and/or modify +# it under the terms of the GNU General Public License as published by +# the Free Software Foundation v2. +# +# EasyBuild is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with EasyBuild. If not, see . +## import os import re diff --git a/easybuild/test/modules.py b/easybuild/test/modules.py index b5e7a9f52c..541d14d618 100644 --- a/easybuild/test/modules.py +++ b/easybuild/test/modules.py @@ -1,3 +1,23 @@ +## +# Copyright 2012 Toon Willems +# +# This file is part of EasyBuild, +# originally created by the HPC team of the University of Ghent (http://ugent.be/hpc). +# +# http://github.com/hpcugent/easybuild +# +# EasyBuild is free software: you can redistribute it and/or modify +# it under the terms of the GNU General Public License as published by +# the Free Software Foundation v2. +# +# EasyBuild is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with EasyBuild. If not, see . +## import os from unittest import TestCase, TestSuite diff --git a/easybuild/test/repository.py b/easybuild/test/repository.py index 81b28007c8..c8779e289e 100644 --- a/easybuild/test/repository.py +++ b/easybuild/test/repository.py @@ -1,3 +1,23 @@ +## +# Copyright 2012 Toon Willems +# +# This file is part of EasyBuild, +# originally created by the HPC team of the University of Ghent (http://ugent.be/hpc). +# +# http://github.com/hpcugent/easybuild +# +# EasyBuild is free software: you can redistribute it and/or modify +# it under the terms of the GNU General Public License as published by +# the Free Software Foundation v2. +# +# EasyBuild is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with EasyBuild. If not, see . +## import os import re import shutil diff --git a/easybuild/test/robot.py b/easybuild/test/robot.py index 283b229f6f..a34d6d7fdc 100644 --- a/easybuild/test/robot.py +++ b/easybuild/test/robot.py @@ -1,3 +1,23 @@ +## +# Copyright 2012 Toon Willems +# +# This file is part of EasyBuild, +# originally created by the HPC team of the University of Ghent (http://ugent.be/hpc). +# +# http://github.com/hpcugent/easybuild +# +# EasyBuild is free software: you can redistribute it and/or modify +# it under the terms of the GNU General Public License as published by +# the Free Software Foundation v2. +# +# EasyBuild is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with EasyBuild. If not, see . +## import os from copy import deepcopy diff --git a/easybuild/test/suite.py b/easybuild/test/suite.py index df5e287aee..e979dc0a92 100644 --- a/easybuild/test/suite.py +++ b/easybuild/test/suite.py @@ -1,3 +1,23 @@ +## +# Copyright 2012 Toon Willems +# +# This file is part of EasyBuild, +# originally created by the HPC team of the University of Ghent (http://ugent.be/hpc). +# +# http://github.com/hpcugent/easybuild +# +# EasyBuild is free software: you can redistribute it and/or modify +# it under the terms of the GNU General Public License as published by +# the Free Software Foundation v2. +# +# EasyBuild is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with EasyBuild. If not, see . +## # toolkit should be first to allow hacks to work import easybuild.test.toolkit as t import easybuild.test.asyncprocess as a diff --git a/easybuild/test/toolkit.py b/easybuild/test/toolkit.py index 9fa4c11c07..4b4b10717e 100644 --- a/easybuild/test/toolkit.py +++ b/easybuild/test/toolkit.py @@ -1,3 +1,23 @@ +## +# Copyright 2012 Toon Willems +# +# This file is part of EasyBuild, +# originally created by the HPC team of the University of Ghent (http://ugent.be/hpc). +# +# http://github.com/hpcugent/easybuild +# +# EasyBuild is free software: you can redistribute it and/or modify +# it under the terms of the GNU General Public License as published by +# the Free Software Foundation v2. +# +# EasyBuild is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with EasyBuild. If not, see . +## import os from unittest import TestCase, TestSuite From e270c4f1318708b2dfd2ff3d831c9c7ddad60200 Mon Sep 17 00:00:00 2001 From: Kenneth Hoste Date: Wed, 1 Aug 2012 10:35:19 +0200 Subject: [PATCH 187/798] add support for building and installing FSL, add example easyconfig + patch --- easybuild/easyblocks/f/fsl.py | 100 ++++++++++++++++++ .../f/FSL/FSL-4.1.9-goalf-1.1.0-no-OFED.eb | 15 +++ .../f/FSL/FSL_melodic_makefile.patch | 11 ++ 3 files changed, 126 insertions(+) create mode 100644 easybuild/easyblocks/f/fsl.py create mode 100644 easybuild/easyconfigs/f/FSL/FSL-4.1.9-goalf-1.1.0-no-OFED.eb create mode 100644 easybuild/easyconfigs/f/FSL/FSL_melodic_makefile.patch diff --git a/easybuild/easyblocks/f/fsl.py b/easybuild/easyblocks/f/fsl.py new file mode 100644 index 0000000000..3b75c3d86a --- /dev/null +++ b/easybuild/easyblocks/f/fsl.py @@ -0,0 +1,100 @@ +## +# Copyright 2009-2012 Kenneth Hoste +# +# This file is part of EasyBuild, +# originally created by the HPC team of the University of Ghent (http://ugent.be/hpc). +# +# http://github.com/hpcugent/easybuild +# +# EasyBuild is free software: you can redistribute it and/or modify +# it under the terms of the GNU General Public License as published by +# the Free Software Foundation v2. +# +# EasyBuild is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with EasyBuild. If not, see . +## +import difflib +from distutils.version import LooseVersion +import os +import shutil +import easybuild.tools.environment as env +from easybuild.framework.application import Application +from easybuild.tools.filetools import run_cmd + +class FSL(Application): + """Support for building and installing FSL.""" + + def __init__(self,*args,**kwargs): + Application.__init__(self, args,kwargs) + + self.build_in_installdir = True + + self.fsldir = None + + def configure(self): + """Configure FSL build: set FSLDIR env var.""" + + self.fsldir = self.getcfg('startfrom') + env.set('FSLDIR', self.fsldir) + + # determine FSL machine type + cmd = ". %s/etc/fslconf/fsl.sh && echo $FSLMACHTYPE" % self.fsldir + (out, _) = run_cmd(cmd, log_all=True, simple=False) + fslmachtype = out.strip() + self.log.debug("FSL machine type: %s" % fslmachtype) + + # prepare config + ## either using matching config, or copy closest match + cfgdir = os.path.join(self.fsldir, "config") + try: + cfgs = os.listdir(cfgdir) + best_cfg = difflib.get_close_matches(fslmachtype, cfgs)[0] + + self.log.debug("Best matching config dir for %s is %s" % (fslmachtype, best_cfg)) + + if fslmachtype != best_cfg: + srcdir = os.path.join(cfgdir, best_cfg) + tgtdir = os.path.join(cfgdir, fslmachtype) + shutil.copytree(srcdir, tgtdir) + self.log.debug("Copied %s to %s" % (srcdir, tgtdir)) + except OSError, err: + self.log.error("Failed to copy closest matching config dir: %s" % err) + + def make(self): + """Building is performed in make_install.""" + pass + + def make_install(self): + """Build FSL using supplied script.""" + + cmd = ". %s/etc/fslconf/fsl.sh && ./build" % self.fsldir + run_cmd(cmd, log_all=True, simple=True) + + def make_module_req_guess(self): + + guesses = Application.make_module_req_guess(self) + + guesses.update({ + 'PATH': ["fsl/bin"], + 'LD_LIBRARY_PATH': ["fsl/lib"], + }) + + return guesses + + def sanitycheck(self): + """Custom sanity check for FSL""" + + if not self.getcfg('sanityCheckPaths'): + + self.setcfg('sanityCheckPaths',{'files':[], + 'dirs':["fsl/%s" % x for x in ["bin", "data", "etc", "extras", "include", "lib"]] + }) + + self.log.info("Customized sanity check paths: %s" % self.getcfg('sanityCheckPaths')) + + Application.sanitycheck(self) diff --git a/easybuild/easyconfigs/f/FSL/FSL-4.1.9-goalf-1.1.0-no-OFED.eb b/easybuild/easyconfigs/f/FSL/FSL-4.1.9-goalf-1.1.0-no-OFED.eb new file mode 100644 index 0000000000..0308c62580 --- /dev/null +++ b/easybuild/easyconfigs/f/FSL/FSL-4.1.9-goalf-1.1.0-no-OFED.eb @@ -0,0 +1,15 @@ +name='FSL' +version='4.1.9' + +homepage='http://www.fmrib.ox.ac.uk/fsl/' +description="""FSL is a comprehensive library of analysis tools for FMRI, MRI and DTI brain imaging data.""" + +toolkit={'name':'goalf','version':'1.1.0-no-OFED'} + +sourceURLs=["http://www.fmrib.ox.ac.uk/fsldownloads/"] +sources=['%s-%s-sources.tar.gz' % (name.lower(), version)] + +patches=['FSL_melodic_makefile.patch'] + +# libX11-devel is required for X11/Xlib.h, required by tk build +osdependencies=['libX11-devel'] diff --git a/easybuild/easyconfigs/f/FSL/FSL_melodic_makefile.patch b/easybuild/easyconfigs/f/FSL/FSL_melodic_makefile.patch new file mode 100644 index 0000000000..cdbe9bb801 --- /dev/null +++ b/easybuild/easyconfigs/f/FSL/FSL_melodic_makefile.patch @@ -0,0 +1,11 @@ +--- fsl.orig/src/melodic/Makefile 2012-07-31 15:45:06.997491869 +0200 ++++ fsl/src/melodic/Makefile 2012-07-31 15:58:39.172984156 +0200 +@@ -3,7 +3,7 @@ + include ${FSLCONFDIR}/default.mk + + OPTFLAGS = -O3 -Wno-deprecated +-OPTFLAGS_alphaev6-dec-osf 5.0-gcc2.95.2 = -O3 -mieee -mfp-trap-mode=sui ++#OPTFLAGS_alphaev6-dec-osf 5.0-gcc2.95.2 = -O3 -mieee -mfp-trap-mode=sui + + PROJNAME = melodic + \ No newline at end of file From c4a79b21beb2d2ba178d3d54c4ce786ad4d40c0c Mon Sep 17 00:00:00 2001 From: Kenneth Hoste Date: Wed, 1 Aug 2012 10:36:10 +0200 Subject: [PATCH 188/798] re-add import required for VERBOSE_VERSION, ignore PyDev warning on use of FileRepository in EasyBuild config (config is exec'ed, so it works) --- easybuild/build.py | 1 + easybuild/easybuild_config.py | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/easybuild/build.py b/easybuild/build.py index 7a8b65b513..2816fe9f84 100644 --- a/easybuild/build.py +++ b/easybuild/build.py @@ -27,6 +27,7 @@ import time import copy import platform +import easybuild # required for VERBOSE_VERSION from easybuild.framework.application import Application, get_instance from easybuild.tools.build_log import EasyBuildError, initLogger, \ removeLogHandler, print_msg diff --git a/easybuild/easybuild_config.py b/easybuild/easybuild_config.py index 53c56eabcd..6c279394f5 100644 --- a/easybuild/easybuild_config.py +++ b/easybuild/easybuild_config.py @@ -59,7 +59,7 @@ ## optionally a subdir argument can be specified: ## `repository = FileRepository(repositoryPath, subdir)` repositoryPath = os.path.join(prefix, 'ebfiles_repo') -repository = FileRepository(repositoryPath) +repository = FileRepository(repositoryPath) #@UndefinedVariable # log format: (dir, filename template) # supported in template: name, version, data, time From 7687823129ad6939858193855baba9db1305d9d7 Mon Sep 17 00:00:00 2001 From: Kenneth Hoste Date: Wed, 1 Aug 2012 11:55:30 +0200 Subject: [PATCH 189/798] remove unneccesary import --- easybuild/easyblocks/f/fsl.py | 1 - 1 file changed, 1 deletion(-) diff --git a/easybuild/easyblocks/f/fsl.py b/easybuild/easyblocks/f/fsl.py index 3b75c3d86a..061da85eb3 100644 --- a/easybuild/easyblocks/f/fsl.py +++ b/easybuild/easyblocks/f/fsl.py @@ -19,7 +19,6 @@ # along with EasyBuild. If not, see . ## import difflib -from distutils.version import LooseVersion import os import shutil import easybuild.tools.environment as env From d2227d224d51067b93bca83e2c29ab773c6e1416 Mon Sep 17 00:00:00 2001 From: Kenneth Hoste Date: Wed, 1 Aug 2012 12:13:39 +0200 Subject: [PATCH 190/798] use toolkit_comp_family + constants in toolkit itself as well (eat your own dog food!) --- easybuild/tools/toolkit.py | 13 ++++++------- 1 file changed, 6 insertions(+), 7 deletions(-) diff --git a/easybuild/tools/toolkit.py b/easybuild/tools/toolkit.py index afff955b9f..582d714caf 100644 --- a/easybuild/tools/toolkit.py +++ b/easybuild/tools/toolkit.py @@ -315,9 +315,9 @@ def prepareACML(self): self._addDependencyVariables(['ACML']) - if os.getenv('SOFTROOTGCC'): + if self.toolkit_comp_family() == GCC: compiler = 'gfortran' - elif os.getenv('SOFTROOTIFORT'): + elif self.toolkit_comp_family() == INTEL: compiler = 'ifort' else: log.error("Don't know which compiler-specific subdir for ACML to use.") @@ -578,10 +578,9 @@ def prepareIMKL(self): self._flagsForSubdirs(mklRoot, mklld, flag="-L%s", varskey="LDFLAGS") self._flagsForSubdirs(mklRoot, mklcpp, flag="-I%s", varskey="CPPFLAGS") - if os.getenv('SOFTROOTGCC'): - if not (os.getenv('SOFTROOTICC') or os.getenv('SOFTROOTIFORT')): - for var in ['LIBLAPACK', 'LIBLAPACK_MT', 'LIBSCALAPACK', 'LIBSCALAPACK_MT']: - self.vars[var] = self.vars[var].replace('mkl_intel_lp64', 'mkl_gf_lp64') + if self.toolkit_comp_family() == GCC: + for var in ['LIBLAPACK', 'LIBLAPACK_MT', 'LIBSCALAPACK', 'LIBSCALAPACK_MT']: + self.vars[var] = self.vars[var].replace('mkl_intel_lp64', 'mkl_gf_lp64') else: log.error("Toolkit preparation with both GCC and Intel compilers loaded is not supported.") @@ -590,7 +589,7 @@ def prepareIMPI(self): Prepare for Intel MPI library """ - if os.getenv('SOFTROOTICC') and os.getenv('SOFTROOTIFORT') and not os.getenv('SOFTROOTGCC'): + if self.toolkit_comp_family() == INTEL: # Intel-based toolkit self.vars['MPICC'] = 'mpiicc %s' % self.m32flag From 9cba7b0bf6e2b3b142a8ee7a7a6b9c46442a30b3 Mon Sep 17 00:00:00 2001 From: Toon Willems Date: Wed, 1 Aug 2012 13:59:59 +0200 Subject: [PATCH 191/798] build test should not be imported. only run directly --- easybuild/test/build.py | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/easybuild/test/build.py b/easybuild/test/build.py index db0594e712..fb2f707a8c 100644 --- a/easybuild/test/build.py +++ b/easybuild/test/build.py @@ -168,7 +168,6 @@ def runTest(self): if not self.build_ok: sys.exit(1) -if __name__ == '__main__': - # do not use unittest.main() as it will annoyingly parse command line arguments - suite = unittest.TestLoader().loadTestsFromTestCase(BuildTest) - unittest.TextTestRunner(verbosity=2).run(suite) +# do not use unittest.main() as it will annoyingly parse command line arguments +suite = unittest.TestLoader().loadTestsFromTestCase(BuildTest) +unittest.TextTestRunner(verbosity=2).run(suite) From 29dfb95cd1252c94ed5d4361b0f03fba73eec5d3 Mon Sep 17 00:00:00 2001 From: Jens Timmerman Date: Wed, 1 Aug 2012 15:15:30 +0300 Subject: [PATCH 192/798] Use updatecfg instead of getcfg, update, setcfg --- easybuild/easyblocks/p/pasha.py | 9 +++------ 1 file changed, 3 insertions(+), 6 deletions(-) diff --git a/easybuild/easyblocks/p/pasha.py b/easybuild/easyblocks/p/pasha.py index 6ce8a3bd9d..fb8f311a51 100644 --- a/easybuild/easyblocks/p/pasha.py +++ b/easybuild/easyblocks/p/pasha.py @@ -33,12 +33,9 @@ class Pasha(Application): def configure(self): """Configure Pasha by setting make options.""" - makeopts = self.getcfg('makeopts') - makeopts = "%s TBB_DIR=$SOFTROOTTBB/tbb MPI_CXX=$MPICXX OPM_FLAG=%s "\ - "MPI_DIR='' MPI_INC='' MPI_LIB='' MY_CXX=$CXX MPICH_IGNORE_CXX_SEEK=1" % \ - (makeopts, self.tk.get_openmp_flag()) - - self.setcfg('makeopts', makeopts) + self.updatecfg('makeopts', "TBB_DIR=$SOFTROOTTBB/tbb MPI_CXX=$MPICXX OPM_FLAG=%s" % self.tk.get_openmp_flag()) + self.updatecfg('makeopts', "MPI_DIR='' MPI_INC='' MPI_LIB='' MY_CXX=$CXX MPICH_IGNORE_CXX_SEEK=1") + def make_install(self): """install by copying everything from 'bin' subdir in build dir to install dir""" From e6a364a428af01cabb44fdd07b5ed949698e1ca1 Mon Sep 17 00:00:00 2001 From: Kenneth Hoste Date: Wed, 1 Aug 2012 14:28:24 +0200 Subject: [PATCH 193/798] fix refactoring error --- easybuild/tools/toolkit.py | 2 -- 1 file changed, 2 deletions(-) diff --git a/easybuild/tools/toolkit.py b/easybuild/tools/toolkit.py index 582d714caf..f0e4d37e76 100644 --- a/easybuild/tools/toolkit.py +++ b/easybuild/tools/toolkit.py @@ -581,8 +581,6 @@ def prepareIMKL(self): if self.toolkit_comp_family() == GCC: for var in ['LIBLAPACK', 'LIBLAPACK_MT', 'LIBSCALAPACK', 'LIBSCALAPACK_MT']: self.vars[var] = self.vars[var].replace('mkl_intel_lp64', 'mkl_gf_lp64') - else: - log.error("Toolkit preparation with both GCC and Intel compilers loaded is not supported.") def prepareIMPI(self): """ From 59265541762a94ca28c17994f2cbec6950c043c3 Mon Sep 17 00:00:00 2001 From: Kenneth Hoste Date: Wed, 1 Aug 2012 14:39:57 +0200 Subject: [PATCH 194/798] rename Pasha easyconfig dir, added patch file required for ictce, add easyconfig for goalf (refs #1127) --- .../p/Pasha/Pasha-1.0.3-goalf-1.1.0.eb | 16 ++++ .../Pasha-1.0.3-ictce-4.0.6.eb | 12 +-- easybuild/easyconfigs/p/Pasha/intelmpi.patch | 90 +++++++++++++++++++ 3 files changed, 109 insertions(+), 9 deletions(-) create mode 100644 easybuild/easyconfigs/p/Pasha/Pasha-1.0.3-goalf-1.1.0.eb rename easybuild/easyconfigs/p/{PASHA => Pasha}/Pasha-1.0.3-ictce-4.0.6.eb (71%) create mode 100644 easybuild/easyconfigs/p/Pasha/intelmpi.patch diff --git a/easybuild/easyconfigs/p/Pasha/Pasha-1.0.3-goalf-1.1.0.eb b/easybuild/easyconfigs/p/Pasha/Pasha-1.0.3-goalf-1.1.0.eb new file mode 100644 index 0000000000..fc7b9fa662 --- /dev/null +++ b/easybuild/easyconfigs/p/Pasha/Pasha-1.0.3-goalf-1.1.0.eb @@ -0,0 +1,16 @@ +name='Pasha' +version='1.0.3' + +homepage='http://pasha.sourceforge.net/' +description="PASHA is a parallel short read assembler for large genomes using de Bruijn graphs." + +toolkit={'name':'goalf','version':'1.1.0'} +toolkitopts={'pic':True,'opt':True,'optarch':True} + +dependencies=[('tbb','4.0.5.339','',True)] + +sourceURLs=['http://downloads.sourceforge.net/pasha'] +sources=['%s-%s.tar.gz' % (name, version)] + +# Pasha's makefile is not suited for parallel execution. +parallel=1 diff --git a/easybuild/easyconfigs/p/PASHA/Pasha-1.0.3-ictce-4.0.6.eb b/easybuild/easyconfigs/p/Pasha/Pasha-1.0.3-ictce-4.0.6.eb similarity index 71% rename from easybuild/easyconfigs/p/PASHA/Pasha-1.0.3-ictce-4.0.6.eb rename to easybuild/easyconfigs/p/Pasha/Pasha-1.0.3-ictce-4.0.6.eb index 1b01d1ce2b..07fb4c27e9 100644 --- a/easybuild/easyconfigs/p/PASHA/Pasha-1.0.3-ictce-4.0.6.eb +++ b/easybuild/easyconfigs/p/Pasha/Pasha-1.0.3-ictce-4.0.6.eb @@ -7,18 +7,12 @@ description="PASHA is a parallel short read assembler for large genomes using de toolkit={'name':'ictce','version':'4.0.6'} toolkitopts={'pic':True,'opt':True,'optarch':True} -dependencies=[ - ('tbb','4.0.5.339','',True), - ] +dependencies=[('tbb','4.0.5.339','',True)] +sourceURLs=['http://downloads.sourceforge.net/pasha'] sources=['%s-%s.tar.gz' % (name, version)] -sourceURLs=[ - 'http://downloads.sourceforge.net/pasha', -] -patches=[ - 'intelmpi.patch', - ] +patches=['intelmpi.patch'] # Pasha's makefile is not suited for parallel execution. parallel=1 diff --git a/easybuild/easyconfigs/p/Pasha/intelmpi.patch b/easybuild/easyconfigs/p/Pasha/intelmpi.patch new file mode 100644 index 0000000000..16075e78be --- /dev/null +++ b/easybuild/easyconfigs/p/Pasha/intelmpi.patch @@ -0,0 +1,90 @@ +--- Common/AlshaTypes.h.orig 2010-12-27 12:12:32.000000000 +0100 ++++ Common/AlshaTypes.h 2012-07-24 17:26:16.571882868 +0200 +@@ -10,6 +10,10 @@ + #ifndef ALAHSTYPES_H_ + #define ALAHSTYPES_H_ + ++#ifdef ALSHA_MPI ++#include ++#endif ++ + #include + #include + #include +@@ -27,9 +31,7 @@ + #include + #include + +-#ifdef ALSHA_MPI +-#include +-#endif ++ + + using namespace std; + using namespace __gnu_cxx; +--- Common/AlshaUtils.cpp.orig 2012-07-24 17:31:17.000000000 +0200 ++++ Common/AlshaUtils.cpp 2012-07-24 17:31:41.294903288 +0200 +@@ -7,12 +7,14 @@ + * Emails: liuy0039@ntu.edu.sg; nkcslyc@hotmail.com + */ + ++ ++#include "AlshaTypes.h" ++#include "AlshaUtils.h" ++ + #include + #include + #include + +-#include "AlshaTypes.h" +-#include "AlshaUtils.h" + + void* AlshaUtils::memAlloc(NumType size) + { +--- Common/AlshaFileParser.h.orig 2012-07-24 17:37:26.000000000 +0200 ++++ Common/AlshaFileParser.h 2012-07-24 17:37:54.934926782 +0200 +@@ -10,8 +10,8 @@ + #ifndef ALSHAFILEPARSER_H_ + #define ALSHAFILEPARSER_H_ + +-#include "../zlib/zlib.h" + #include "AlshaTypes.h" ++#include "../zlib/zlib.h" + #include "AlshaUtils.h" + #include + #include +--- PreGraph/AlshaMessage.cpp.orig 2012-07-24 18:07:42.123039163 +0200 ++++ PreGraph/AlshaMessage.cpp 2012-07-24 18:06:33.783034865 +0200 +@@ -7,6 +7,9 @@ + * Emails: liuy0039@ntu.edu.sg; nkcslyc@hotmail.com + */ + ++#define MPICH_IGNORE_CXX_SEEK ++#define MPICH_SKIP_MPICXX ++ + #include "AlshaMessage.h" + #include "AlshaComms.h" + #include "AlshaParams.h" +--- PreGraph/AlshaComms.cpp.orig 2010-08-18 14:53:36.000000000 +0200 ++++ PreGraph/AlshaComms.cpp 2012-07-24 18:09:14.332044961 +0200 +@@ -1,6 +1,6 @@ ++#include + #include "AlshaComms.h" + #include "AlshaParams.h" +-#include + + MPI_Request AlshaComms::msgRequest = MPI_REQUEST_NULL; + uint8_t* AlshaComms::RX_BUFFER = NULL; +--- PreGraph/AlshaThread.cpp.orig 2012-07-24 18:12:46.000000000 +0200 ++++ PreGraph/AlshaThread.cpp 2012-07-24 18:13:18.485060314 +0200 +@@ -7,6 +7,9 @@ + * Emails: liuy0039@ntu.edu.sg; nkcslyc@hotmail.com + */ + ++#define MPICH_IGNORE_CXX_SEEK ++#define MPICH_SKIP_MPICXX ++ + #include "AlshaThread.h" + #include "Alsha.h" + + From 243f0c64a040279ddc80625b44d5be2ffed812d2 Mon Sep 17 00:00:00 2001 From: Kenneth Hoste Date: Wed, 1 Aug 2012 14:44:47 +0200 Subject: [PATCH 195/798] check for TBB dependency --- easybuild/easyblocks/p/pasha.py | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-) diff --git a/easybuild/easyblocks/p/pasha.py b/easybuild/easyblocks/p/pasha.py index fb8f311a51..875109e5b4 100644 --- a/easybuild/easyblocks/p/pasha.py +++ b/easybuild/easyblocks/p/pasha.py @@ -33,12 +33,17 @@ class Pasha(Application): def configure(self): """Configure Pasha by setting make options.""" - self.updatecfg('makeopts', "TBB_DIR=$SOFTROOTTBB/tbb MPI_CXX=$MPICXX OPM_FLAG=%s" % self.tk.get_openmp_flag()) + + tbb = os.getenv('SOFTROOTTBB') + if not tbb: + self.log.error("TBB module not loaded.") + + self.updatecfg('makeopts', "TBB_DIR=%s/tbb MPI_CXX=$MPICXX OPM_FLAG=%s" % (tbb, self.tk.get_openmp_flag())) self.updatecfg('makeopts', "MPI_DIR='' MPI_INC='' MPI_LIB='' MY_CXX=$CXX MPICH_IGNORE_CXX_SEEK=1") - def make_install(self): - """install by copying everything from 'bin' subdir in build dir to install dir""" + """Install by copying everything from 'bin' subdir in build dir to install dir""" + srcdir = os.path.join(self.builddir, "%s-%s" % (self.name(), self.version()), 'bin') shutil.copytree(srcdir, os.path.join(self.installdir, 'bin')) @@ -49,4 +54,3 @@ def sanitycheck(self): 'dirs':[""], }) - From 8e309850181259edf8b50062dbba3eed14fbca7d Mon Sep 17 00:00:00 2001 From: Toon Willems Date: Wed, 1 Aug 2012 15:16:24 +0200 Subject: [PATCH 196/798] write test-results to xml file in side test directory --- easybuild/test/build.py | 47 +++++++++++++++++++++++++++++++++++++++++ 1 file changed, 47 insertions(+) diff --git a/easybuild/test/build.py b/easybuild/test/build.py index fb2f707a8c..479c899ee4 100644 --- a/easybuild/test/build.py +++ b/easybuild/test/build.py @@ -23,6 +23,7 @@ import re import sys import unittest +import xml.dom.minidom as xml from unittest import TestCase from easybuild.tools.build_log import getLog, EasyBuildError, initLogger @@ -32,6 +33,7 @@ import easybuild.tools.config as config + class BuildTest(TestCase): """ This class will build everything in the path given to it. @@ -162,12 +164,57 @@ def runTest(self): failed = len(self.build_status) total = len(self.apps) + succes = [app for app in self.apps if app not in self.build_status] + self.log.info("%s from %s packages failed to build!" % (failed, total)) + filename = "easybuild-test-output.xml" + test_path = os.path.dirname(__file__) + filename = os.path.join(test_path, filename) + self.log.debug("writing xml output to %s" % filename) + write_to_xml(succes, self.test_results, filename) + # exit with non-zero exit-code when not build_ok if not self.build_ok: sys.exit(1) +def write_to_xml(succes, failed, filename): + """ + Create xml output, using minimal output required according to + http://stackoverflow.com/questions/4922867/junit-xml-format-specification-that-hudson-supports + """ + dom = xml.getDOMImplementation() + root = dom.createDocument(None, "testsuite", None) + + def create_testcase(name): + el = root.createElement("testcase") + el.setAttribute("name", name) + return el + + def create_failure(name, error_type, error): + el = create_testcase(name) + + # encapsulate in CDATA section + error_text = root.createCDATASection("\n%s\n" % error) + failure_el = root.createElement("failure") + failure_el.setAttribute("type", error_type) + el.appendChild(failure_el) + el.lastChild.appendChild(error_text) + return el + + for (obj, fase, error) in failed: + el = create_failure("%s/%s" % (obj.name(), obj.installversion()), fase, error) + root.firstChild.appendChild(el) + + for obj in succes: + el = create_testcase("%s/%s" % (obj.name(), obj.installversion())) + root.firstChild.appendChild(el) + + output_file = open(filename, "w") + root.writexml(output_file, addindent="\t", newl="\n") + output_file.close() + + # do not use unittest.main() as it will annoyingly parse command line arguments suite = unittest.TestLoader().loadTestsFromTestCase(BuildTest) unittest.TextTestRunner(verbosity=2).run(suite) From cc8b1a72487c2d8711d49ad739e00d9f1abceb2f Mon Sep 17 00:00:00 2001 From: Toon Willems Date: Wed, 1 Aug 2012 15:24:28 +0200 Subject: [PATCH 197/798] remove TODO. debug was kept as it is used inside BuildTest --- easybuild/framework/application.py | 1 - 1 file changed, 1 deletion(-) diff --git a/easybuild/framework/application.py b/easybuild/framework/application.py index f059341a81..96ad6bd594 100644 --- a/easybuild/framework/application.py +++ b/easybuild/framework/application.py @@ -48,7 +48,6 @@ class Application: """ ## INIT - # TODO: never initializd with other parameters, remove them def __init__(self, path, debug=False): """ Initialize the Application instance. From 69874ec8fa33790ee0c0d6e503badb8ca9795df0 Mon Sep 17 00:00:00 2001 From: Toon Willems Date: Wed, 1 Aug 2012 15:30:31 +0200 Subject: [PATCH 198/798] add note about mandatory attributes in docstring --- easybuild/framework/easyblock.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/easybuild/framework/easyblock.py b/easybuild/framework/easyblock.py index 5f19128bb7..fdb55daabe 100644 --- a/easybuild/framework/easyblock.py +++ b/easybuild/framework/easyblock.py @@ -38,7 +38,6 @@ class EasyBlock: validmoduleclasses = ['base', 'compiler', 'lib'] validstops = ['cfg', 'source', 'patch', 'configure', 'make', 'install', 'test', 'postproc', 'cleanup', 'packages'] - # TODO: move this somewhere default_config = { 'name':[None, "Name of software"], 'version':[None, "Version of software"], @@ -273,6 +272,7 @@ def _parse_dependency(self, dep): dep can be a dict a tuple or a list. if it is a tuple or a list the attributes are expected to be in the following order: ['name', 'version', 'suffix', 'dummy'] + of these attributes, 'name' and 'version' are mandatory output dict contains these attributes: ['name', 'version', 'suffix', 'dummy', 'tk'] From 3c1ccc46fa8b343713b87e881f43a3a391f9fa51 Mon Sep 17 00:00:00 2001 From: Toon Willems Date: Wed, 1 Aug 2012 15:47:37 +0200 Subject: [PATCH 199/798] docstring --- easybuild/build.py | 3 +++ 1 file changed, 3 insertions(+) diff --git a/easybuild/build.py b/easybuild/build.py index e6d19d2a15..26935fba4f 100644 --- a/easybuild/build.py +++ b/easybuild/build.py @@ -708,6 +708,9 @@ def build(module, options, log, origEnviron, exitOnFailure=True): return (True, applicationLog) def submit_build_job(log): + """ + will submit the current command (sys.argv) without the --job paramater as a job + """ command = " ".join([arg for arg in sys.argv if arg != '--job']) # import here so it only loads when needed From 71dc8f4bb30d8fc986a6415ef864e8081fea8b3f Mon Sep 17 00:00:00 2001 From: Kenneth Hoste Date: Wed, 1 Aug 2012 15:46:32 +0200 Subject: [PATCH 200/798] only prepare for direct member module of a toolkit , not for implicit dependencies (like icc/ifort for imkl); add BLACS as explicit dependency for goalf toolkit in example easyconfig --- .../easyconfigs/g/goalf/goalf-1.1.0-no-OFED.eb | 5 ++++- easybuild/tools/modules.py | 15 +++++++++++---- easybuild/tools/toolkit.py | 6 +++--- 3 files changed, 18 insertions(+), 8 deletions(-) diff --git a/easybuild/easyconfigs/g/goalf/goalf-1.1.0-no-OFED.eb b/easybuild/easyconfigs/g/goalf/goalf-1.1.0-no-OFED.eb index af2332af87..1414524f2e 100644 --- a/easybuild/easyconfigs/g/goalf/goalf-1.1.0-no-OFED.eb +++ b/easybuild/easyconfigs/g/goalf/goalf-1.1.0-no-OFED.eb @@ -26,13 +26,16 @@ lapacklib='LAPACK' lapackver='3.4.0' lapack='%s-%s'%(lapacklib, lapackver) +blacsver='1.1' + ## compiler toolkit depencies dependencies=[(compname, compver), (mpilib, mpiver, '-%s%s'%(comp,mpisuff)), (blaslib, blasver, '-%s-%s'%(comp,lapack)), (lapacklib, lapackver, '-%s'%comp), ('FFTW', '3.3.1', '-%s-%s'%(comp,mpi)), - ('ScaLAPACK','1.8.0', '-%s-%s-%s-%s-BLACS-1.1'%(comp,mpi,blas,lapack)) + ('BLACS', blacsver, '-%s'%mpi), + ('ScaLAPACK','1.8.0', '-%s-%s-%s-%s-BLACS-%s'%(comp,mpi,blas,lapack,blacsver)) ] moduleclass='compiler' diff --git a/easybuild/tools/modules.py b/easybuild/tools/modules.py index 0eea9acd5f..091594c399 100644 --- a/easybuild/tools/modules.py +++ b/easybuild/tools/modules.py @@ -233,9 +233,9 @@ def loaded_modules(self): return loaded_modules - def dependencies_for(self, name, version): + def dependencies_for(self, name, version, depth=-1): """ - Obtain a list of dependencies for the given module (recursively) + Obtain a list of dependencies for the given module, determined recursively, up to a specified depth (optionally) """ modfilepath = self.modulefile_path(name, version) log.debug("modulefile path %s/%s: %s" % (name, version, modfilepath)) @@ -250,8 +250,15 @@ def dependencies_for(self, name, version): loadregex = re.compile("^\s+module load\s+(.*)$", re.M) mods = [mod.split('/') for mod in loadregex.findall(modtxt)] - # recursively determine dependencies for dependency modules - moddeps = [self.dependencies_for(modname, modversion) for (modname, modversion) in mods] + if depth > 0: + # recursively determine dependencies for these dependency modules + moddeps = [self.dependencies_for(modname, modversion, depth=depth-1) for (modname, modversion) in mods] + elif depth==0: + # stop recursion + moddeps = [] + else: + # recursively determine dependencies for dependency modules until all dependencies are resolved (no or negative depth given) + moddeps = [self.dependencies_for(modname, modversion) for (modname, modversion) in mods] deps = [{'name':modname, 'version':modversion} for (modname, modversion) in mods] diff --git a/easybuild/tools/toolkit.py b/easybuild/tools/toolkit.py index f0e4d37e76..5bfa19370a 100644 --- a/easybuild/tools/toolkit.py +++ b/easybuild/tools/toolkit.py @@ -159,9 +159,9 @@ def prepare(self, onlymod=None): modules.addModule(self.dependencies) modules.load() - ## Determine toolkit dependencies, so we can prepare for them - self.toolkit_deps = modules.dependencies_for(self.name, self.version) - log.debug('List of toolkit dependencies: %s' % self.toolkit_deps) + ## Determine direct toolkit dependencies, so we can prepare for them + self.toolkit_deps = modules.dependencies_for(self.name, self.version, depth=1) + log.debug('List of direct toolkit dependencies: %s' % self.toolkit_deps) ## Generate the variables to be set self._generate_variables() From dd463ec9914c23c1b742292bba039e37df3e0932 Mon Sep 17 00:00:00 2001 From: Toon Willems Date: Wed, 1 Aug 2012 16:22:47 +0200 Subject: [PATCH 201/798] capture environment vars and pass them to pbs --- easybuild/build.py | 8 +++++++- easybuild/tools/pbs_job.py | 14 +++++++------- 2 files changed, 14 insertions(+), 8 deletions(-) diff --git a/easybuild/build.py b/easybuild/build.py index 26935fba4f..6804e5b2a6 100644 --- a/easybuild/build.py +++ b/easybuild/build.py @@ -710,12 +710,18 @@ def build(module, options, log, origEnviron, exitOnFailure=True): def submit_build_job(log): """ will submit the current command (sys.argv) without the --job paramater as a job + any environment variable that is been set that starts with EASYBUILD will be passed on the job """ command = " ".join([arg for arg in sys.argv if arg != '--job']) + easybuild_vars = {} + for key in os.environ: + if name.startswith("EASYBUILD"): + easybuild_vars[name] = os.environ[name] + # import here so it only loads when needed from easybuild.tools.pbs_job import PbsJob - job = PbsJob(command, "easybuild-build-job") + job = PbsJob(command, easybuild_vars, "easybuild-build-job") job.submit() log.info("job submitted. info: %s", job.info()) diff --git a/easybuild/tools/pbs_job.py b/easybuild/tools/pbs_job.py index 08c273995d..d9a22d7f4b 100644 --- a/easybuild/tools/pbs_job.py +++ b/easybuild/tools/pbs_job.py @@ -1,5 +1,5 @@ -# Copyright 2012 Stijn De Weirdt +# Copyright 2012 Stijn De Weirdt, Toon Willems # # This file is part of HanythingOnDemand, # originally created by the HPC team of the University of Ghent (http://ugent.be/hpc). @@ -13,12 +13,13 @@ class PbsJob: """Interaction with torque""" - def __init__(self, script, name): + def __init__(self, script, env_vars, name) """ create a new Job to be submitted to PBS """ self.log = getLog("PBS") self.script = script + self.env_vars = env_vars self.name = name global pbs @@ -41,11 +42,9 @@ def submit(self) : resources = {"walltime": "72:00:00", "nodes": "1:ppn=%s" % self.get_ppn() } - attropl = pbs.new_attropl(2) ## jobparams + attropl = pbs.new_attropl(1) ## jobparams attropl[0].name = 'Job_Name' attropl[0].value = self.name - attropl[1].name = 'Rerunable' - attropl[1].value = 'y' tmpattropl = pbs.new_attropl(len(resources)) ## jobparams idx = 0 @@ -61,10 +60,11 @@ def submit(self) : os.environ.setdefault('WORKDIR', os.getcwd()) defvars = ['MAIL', 'HOME', 'PATH', 'SHELL', 'WORKDIR'] - + vars = ["PBS_O_%s=%s" % (x, os.environ.get(x, 'NOTFOUND_%s' % x)) for x in defvars] + vars.extend(["%s=%s" %(name, value) for (name, value) inself.env_vars.items()]) tmpattropl = pbs.new_attropl(1) tmpattropl[0].name = 'Variable_List' - tmpattropl[0].value = ",".join([ "PBS_O_%s=%s" % (x, os.environ.get(x, 'NOTFOUND_%s' % x)) for x in defvars ]) + tmpattropl[0].value = ",".join(vars) attropl.extend(tmpattropl) import tempfile From f295b759f097c2284c221010002924ef70edc5b4 Mon Sep 17 00:00:00 2001 From: Kenneth Hoste Date: Wed, 1 Aug 2012 16:25:33 +0200 Subject: [PATCH 202/798] correct depth in recursively depency searching --- easybuild/tools/modules.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/easybuild/tools/modules.py b/easybuild/tools/modules.py index 091594c399..36747509d2 100644 --- a/easybuild/tools/modules.py +++ b/easybuild/tools/modules.py @@ -250,9 +250,10 @@ def dependencies_for(self, name, version, depth=-1): loadregex = re.compile("^\s+module load\s+(.*)$", re.M) mods = [mod.split('/') for mod in loadregex.findall(modtxt)] + depth = depth - 1 if depth > 0: # recursively determine dependencies for these dependency modules - moddeps = [self.dependencies_for(modname, modversion, depth=depth-1) for (modname, modversion) in mods] + moddeps = [self.dependencies_for(modname, modversion, depth=depth) for (modname, modversion) in mods] elif depth==0: # stop recursion moddeps = [] From 5e9bd3b96bb33fdb925bd7d0da5e7e295ec38d71 Mon Sep 17 00:00:00 2001 From: Kenneth Hoste Date: Wed, 1 Aug 2012 16:27:34 +0200 Subject: [PATCH 203/798] check for errors in FSL build (see build.log) --- easybuild/easyblocks/f/fsl.py | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/easybuild/easyblocks/f/fsl.py b/easybuild/easyblocks/f/fsl.py index 061da85eb3..8c10af8973 100644 --- a/easybuild/easyblocks/f/fsl.py +++ b/easybuild/easyblocks/f/fsl.py @@ -20,6 +20,7 @@ ## import difflib import os +import re import shutil import easybuild.tools.environment as env from easybuild.framework.application import Application @@ -74,6 +75,16 @@ def make_install(self): cmd = ". %s/etc/fslconf/fsl.sh && ./build" % self.fsldir run_cmd(cmd, log_all=True, simple=True) + # check build.log file for success + buildlog = os.path.join(self.installdir, "fsl", "build.log") + f = open(buildlog, "r") + txt = f.read() + f.close() + + error_regexp = re.compile("ERROR in BUILD") + if error_regexp.search(txt): + self.log.error("Error detected in build log %s." % buildlog) + def make_module_req_guess(self): guesses = Application.make_module_req_guess(self) From 5f31c5e38fd0434683d8d9ea79810a64baa24809 Mon Sep 17 00:00:00 2001 From: Toon Willems Date: Wed, 1 Aug 2012 16:29:15 +0200 Subject: [PATCH 204/798] key -> name --- easybuild/build.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/easybuild/build.py b/easybuild/build.py index 6804e5b2a6..582b1f53da 100644 --- a/easybuild/build.py +++ b/easybuild/build.py @@ -715,7 +715,7 @@ def submit_build_job(log): command = " ".join([arg for arg in sys.argv if arg != '--job']) easybuild_vars = {} - for key in os.environ: + for name in os.environ: if name.startswith("EASYBUILD"): easybuild_vars[name] = os.environ[name] From b204ac56e60f11e18570b47c262ce79b5bac4008 Mon Sep 17 00:00:00 2001 From: Toon Willems Date: Wed, 1 Aug 2012 16:30:11 +0200 Subject: [PATCH 205/798] forgot a semicolon --- easybuild/tools/pbs_job.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/easybuild/tools/pbs_job.py b/easybuild/tools/pbs_job.py index d9a22d7f4b..930c5ef28e 100644 --- a/easybuild/tools/pbs_job.py +++ b/easybuild/tools/pbs_job.py @@ -13,7 +13,7 @@ class PbsJob: """Interaction with torque""" - def __init__(self, script, env_vars, name) + def __init__(self, script, env_vars, name): """ create a new Job to be submitted to PBS """ @@ -35,7 +35,7 @@ def __init__(self, script, env_vars, name) self.jobid = None - def submit(self) : + def submit(self): """Submit the jobscript txt, set self.jobid""" txt = self.script self.log.debug("Going to submit script %s" % txt) From a9d1211e00b1d6c79f4c5d90f1f19cef42b1413a Mon Sep 17 00:00:00 2001 From: Kenneth Hoste Date: Wed, 1 Aug 2012 16:30:47 +0200 Subject: [PATCH 206/798] add no-OFED suffix to goalf toolkit for Pasha example easyconfig --- ...-1.0.3-goalf-1.1.0.eb => Pasha-1.0.3-goalf-1.1.0-no-OFED.eb} | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) rename easybuild/easyconfigs/p/Pasha/{Pasha-1.0.3-goalf-1.1.0.eb => Pasha-1.0.3-goalf-1.1.0-no-OFED.eb} (89%) diff --git a/easybuild/easyconfigs/p/Pasha/Pasha-1.0.3-goalf-1.1.0.eb b/easybuild/easyconfigs/p/Pasha/Pasha-1.0.3-goalf-1.1.0-no-OFED.eb similarity index 89% rename from easybuild/easyconfigs/p/Pasha/Pasha-1.0.3-goalf-1.1.0.eb rename to easybuild/easyconfigs/p/Pasha/Pasha-1.0.3-goalf-1.1.0-no-OFED.eb index fc7b9fa662..8c92d8a791 100644 --- a/easybuild/easyconfigs/p/Pasha/Pasha-1.0.3-goalf-1.1.0.eb +++ b/easybuild/easyconfigs/p/Pasha/Pasha-1.0.3-goalf-1.1.0-no-OFED.eb @@ -4,7 +4,7 @@ version='1.0.3' homepage='http://pasha.sourceforge.net/' description="PASHA is a parallel short read assembler for large genomes using de Bruijn graphs." -toolkit={'name':'goalf','version':'1.1.0'} +toolkit={'name':'goalf','version':'1.1.0-no-OFED'} toolkitopts={'pic':True,'opt':True,'optarch':True} dependencies=[('tbb','4.0.5.339','',True)] From a9c407551207951a09d187648bfc366c7012a900 Mon Sep 17 00:00:00 2001 From: Toon Willems Date: Wed, 1 Aug 2012 16:31:25 +0200 Subject: [PATCH 207/798] typos, typos everywhere --- easybuild/tools/pbs_job.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/easybuild/tools/pbs_job.py b/easybuild/tools/pbs_job.py index 930c5ef28e..d035b9c6c0 100644 --- a/easybuild/tools/pbs_job.py +++ b/easybuild/tools/pbs_job.py @@ -61,7 +61,7 @@ def submit(self): defvars = ['MAIL', 'HOME', 'PATH', 'SHELL', 'WORKDIR'] vars = ["PBS_O_%s=%s" % (x, os.environ.get(x, 'NOTFOUND_%s' % x)) for x in defvars] - vars.extend(["%s=%s" %(name, value) for (name, value) inself.env_vars.items()]) + vars.extend(["%s=%s" % (name, value) for (name, value) in self.env_vars.items()]) tmpattropl = pbs.new_attropl(1) tmpattropl[0].name = 'Variable_List' tmpattropl[0].value = ",".join(vars) From 37161cc1a1a06cbcd0d650b8cad8e404e5b92783 Mon Sep 17 00:00:00 2001 From: Toon Willems Date: Wed, 1 Aug 2012 16:43:24 +0200 Subject: [PATCH 208/798] update gpl header --- easybuild/tools/pbs_job.py | 20 +++++++++++++++----- 1 file changed, 15 insertions(+), 5 deletions(-) diff --git a/easybuild/tools/pbs_job.py b/easybuild/tools/pbs_job.py index d035b9c6c0..ae7e3e0bab 100644 --- a/easybuild/tools/pbs_job.py +++ b/easybuild/tools/pbs_job.py @@ -1,11 +1,22 @@ - # Copyright 2012 Stijn De Weirdt, Toon Willems # -# This file is part of HanythingOnDemand, +# This file is part of EasyBuild, # originally created by the HPC team of the University of Ghent (http://ugent.be/hpc). # - - +# http://github.com/hpcugent/easybuild +# +# EasyBuild is free software: you can redistribute it and/or modify +# it under the terms of the GNU General Public License as published by +# the Free Software Foundation v2. +# +# EasyBuild is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with EasyBuild. If not, see . +## import os, sys, re from easybuild.tools.build_log import getLog @@ -129,7 +140,6 @@ def get_uniq_hosts(txt, num= -1): def info(self, types=None): """Return jobinfo""" - ## TODO restrict to current user jobs if type(types) is str: types = [types] self.log.debug("Return info types %s" % types) From 923981758d2303db8d3765f89086cc0a467df9cc Mon Sep 17 00:00:00 2001 From: Toon Willems Date: Wed, 1 Aug 2012 16:57:41 +0200 Subject: [PATCH 209/798] fix issue with xml output --- easybuild/test/build.py | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/easybuild/test/build.py b/easybuild/test/build.py index 479c899ee4..edc44ef9cf 100644 --- a/easybuild/test/build.py +++ b/easybuild/test/build.py @@ -203,7 +203,12 @@ def create_failure(name, error_type, error): return el for (obj, fase, error) in failed: - el = create_failure("%s/%s" % (obj.name(), obj.installversion()), fase, error) + # try to pretty print + try: + el = create_failure("%s/%s" % (obj.name(), obj.installversion()), fase, error) + except: + el = create_failure(obj, fase, error) + root.firstChild.appendChild(el) for obj in succes: From 591618a1518f537bd6d52ff3b1acc2484aa62b9e Mon Sep 17 00:00:00 2001 From: Kenneth Hoste Date: Thu, 2 Aug 2012 08:35:37 +0200 Subject: [PATCH 210/798] fix BLACS version suffix in goalf example easyconfig (should include compiler as well) --- easybuild/easyconfigs/g/goalf/goalf-1.1.0-no-OFED.eb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/easybuild/easyconfigs/g/goalf/goalf-1.1.0-no-OFED.eb b/easybuild/easyconfigs/g/goalf/goalf-1.1.0-no-OFED.eb index 1414524f2e..e08a7f0c21 100644 --- a/easybuild/easyconfigs/g/goalf/goalf-1.1.0-no-OFED.eb +++ b/easybuild/easyconfigs/g/goalf/goalf-1.1.0-no-OFED.eb @@ -34,7 +34,7 @@ dependencies=[(compname, compver), (blaslib, blasver, '-%s-%s'%(comp,lapack)), (lapacklib, lapackver, '-%s'%comp), ('FFTW', '3.3.1', '-%s-%s'%(comp,mpi)), - ('BLACS', blacsver, '-%s'%mpi), + ('BLACS', blacsver, '-%s-%s'%(comp,mpi)), ('ScaLAPACK','1.8.0', '-%s-%s-%s-%s-BLACS-%s'%(comp,mpi,blas,lapack,blacsver)) ] From a29966d011f398cdb1aa32e846a7f514684fb332 Mon Sep 17 00:00:00 2001 From: Kenneth Hoste Date: Thu, 2 Aug 2012 08:44:21 +0200 Subject: [PATCH 211/798] make sure setting LIBSCALAPACK works, also when there's no BLACS --- easybuild/tools/toolkit.py | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/easybuild/tools/toolkit.py b/easybuild/tools/toolkit.py index 5bfa19370a..c5969a8ce9 100644 --- a/easybuild/tools/toolkit.py +++ b/easybuild/tools/toolkit.py @@ -694,8 +694,11 @@ def prepareScaLAPACK(self): """ Prepare for ScaLAPACK library """ - self.vars['LIBSCALAPACK'] += " -lscalapack" - self.vars['LIBSCALAPACK_MT'] += " %s -lpthread" % self.vars['LIBSCALAPACK'] + + # we need to be careful here, LIBSCALAPACK(_MT) may be set by prepareBLACS, or not + self.vars['LIBSCALAPACK'] = "%s -lscalapack" % self.vars.get('LIBSCALAPACK', '') + self.vars['LIBSCALAPACK_MT'] = "%s %s -lpthread" % (self.vars['LIBSCALAPACK'], + self.vars.get('LIBSCALAPACK_MT', '')) self._addDependencyVariables(['ScaLAPACK']) From cca7bc00c552cd4e8184082085b300db94d59ff8 Mon Sep 17 00:00:00 2001 From: Toon Willems Date: Thu, 2 Aug 2012 09:26:55 +0200 Subject: [PATCH 212/798] job must be rerunnable --- easybuild/tools/pbs_job.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/easybuild/tools/pbs_job.py b/easybuild/tools/pbs_job.py index ae7e3e0bab..238741d19f 100644 --- a/easybuild/tools/pbs_job.py +++ b/easybuild/tools/pbs_job.py @@ -53,9 +53,11 @@ def submit(self): resources = {"walltime": "72:00:00", "nodes": "1:ppn=%s" % self.get_ppn() } - attropl = pbs.new_attropl(1) ## jobparams + attropl = pbs.new_attropl(2) ## jobparams attropl[0].name = 'Job_Name' attropl[0].value = self.name + attropl[1].name = 'Rerunable' + attropl[1].value = 'y' tmpattropl = pbs.new_attropl(len(resources)) ## jobparams idx = 0 From c7fe6e01d2cabdd562bb84eaad79f07e33d0f36e Mon Sep 17 00:00:00 2001 From: Toon Willems Date: Thu, 2 Aug 2012 09:31:11 +0200 Subject: [PATCH 213/798] prevent info() to work when jobid is None --- easybuild/tools/pbs_job.py | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/easybuild/tools/pbs_job.py b/easybuild/tools/pbs_job.py index 238741d19f..f6aa2dd228 100644 --- a/easybuild/tools/pbs_job.py +++ b/easybuild/tools/pbs_job.py @@ -142,6 +142,10 @@ def get_uniq_hosts(txt, num= -1): def info(self, types=None): """Return jobinfo""" + if not self.jobid: + self.log.debug("no jobid, job is not yet submitted?") + return + if type(types) is str: types = [types] self.log.debug("Return info types %s" % types) From 2e31f8177ea14550f1cdf05cefcea95896e88c46 Mon Sep 17 00:00:00 2001 From: Toon Willems Date: Thu, 2 Aug 2012 09:43:46 +0200 Subject: [PATCH 214/798] submit job with timestamp in name --- easybuild/build.py | 4 +++- easybuild/tools/pbs_job.py | 8 ++++++-- 2 files changed, 9 insertions(+), 3 deletions(-) diff --git a/easybuild/build.py b/easybuild/build.py index 582b1f53da..1acdc57cc4 100644 --- a/easybuild/build.py +++ b/easybuild/build.py @@ -27,6 +27,7 @@ import time import copy import platform +from datetime import datetime from easybuild.framework.application import Application, get_instance from easybuild.tools.build_log import EasyBuildError, initLogger, \ removeLogHandler, print_msg @@ -721,7 +722,8 @@ def submit_build_job(log): # import here so it only loads when needed from easybuild.tools.pbs_job import PbsJob - job = PbsJob(command, easybuild_vars, "easybuild-build-job") + name = "easybuild-build-%s" % datetime.now().strftime("%m-%d-%Y-%H:%M:%S") + job = PbsJob(command, name, easybuild_vars ) job.submit() log.info("job submitted. info: %s", job.info()) diff --git a/easybuild/tools/pbs_job.py b/easybuild/tools/pbs_job.py index f6aa2dd228..ad4e1f128f 100644 --- a/easybuild/tools/pbs_job.py +++ b/easybuild/tools/pbs_job.py @@ -24,13 +24,16 @@ class PbsJob: """Interaction with torque""" - def __init__(self, script, env_vars, name): + def __init__(self, script, name, env_vars=None): """ create a new Job to be submitted to PBS """ self.log = getLog("PBS") self.script = script - self.env_vars = env_vars + if env_vars: + self.env_vars = env_vars + else: + self.env_vars = {} self.name = name global pbs @@ -142,6 +145,7 @@ def get_uniq_hosts(txt, num= -1): def info(self, types=None): """Return jobinfo""" + if not self.jobid: self.log.debug("no jobid, job is not yet submitted?") return From 25c26d4152142ae069342ce1b4fb6def0e3d140f Mon Sep 17 00:00:00 2001 From: Toon Willems Date: Thu, 2 Aug 2012 09:50:08 +0200 Subject: [PATCH 215/798] shorten name so it is clearly visible --- easybuild/build.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/easybuild/build.py b/easybuild/build.py index 1acdc57cc4..bb36ada3d1 100644 --- a/easybuild/build.py +++ b/easybuild/build.py @@ -722,7 +722,7 @@ def submit_build_job(log): # import here so it only loads when needed from easybuild.tools.pbs_job import PbsJob - name = "easybuild-build-%s" % datetime.now().strftime("%m-%d-%Y-%H:%M:%S") + name = "easybuild-%s" % datetime.now().strftime("%m-%d-%Y-%H:%M:%S") job = PbsJob(command, name, easybuild_vars ) job.submit() log.info("job submitted. info: %s", job.info()) From afa9dc7e3b13b25b7f2903c5ebb324dee9ff303a Mon Sep 17 00:00:00 2001 From: Toon Willems Date: Thu, 2 Aug 2012 10:08:15 +0200 Subject: [PATCH 216/798] rename build_status to build_stopped --- easybuild/test/build.py | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/easybuild/test/build.py b/easybuild/test/build.py index edc44ef9cf..a463585901 100644 --- a/easybuild/test/build.py +++ b/easybuild/test/build.py @@ -69,7 +69,7 @@ def setUp(self): config.init('easybuild/easybuild_config.py') self.test_results = [] - self.build_status = {} + self.build_stopped = {} self.log = getLog("BuildTest") self.build_ok = True @@ -116,7 +116,7 @@ def performStep(self, fase, obj, method): """ Perform method on object if it can be build """ - if obj not in self.build_status: + if obj not in self.build_stopped: try: method(obj) except EasyBuildError, err: @@ -124,7 +124,7 @@ def performStep(self, fase, obj, method): self.build_ok = False self.test_results.append((obj, fase, err)) # keep a dict of so we can check in O(1) if objects can still be build - self.build_status[obj] = fase + self.build_stopped[obj] = fase def runTest(self): """ @@ -161,10 +161,10 @@ def runTest(self): for result in self.test_results: self.log.info("%s crashed with an error during fase: %s, error: %s" % result) - failed = len(self.build_status) + failed = len(self.build_stopped) total = len(self.apps) - succes = [app for app in self.apps if app not in self.build_status] + succes = [app for app in self.apps if app not in self.build_stopped] self.log.info("%s from %s packages failed to build!" % (failed, total)) From 9976c1f809aaa5bea8b361568374cdbf7b8f234c Mon Sep 17 00:00:00 2001 From: Kenneth Hoste Date: Thu, 2 Aug 2012 10:17:37 +0200 Subject: [PATCH 217/798] add patch for building Pasha with recent GCC compiler --- .../Pasha/Pasha-1.0.3-goalf-1.1.0-no-OFED.eb | 2 + .../p/Pasha/gcc-hash_fun-map-set.patch | 61 +++++++++++++++++++ 2 files changed, 63 insertions(+) create mode 100644 easybuild/easyconfigs/p/Pasha/gcc-hash_fun-map-set.patch diff --git a/easybuild/easyconfigs/p/Pasha/Pasha-1.0.3-goalf-1.1.0-no-OFED.eb b/easybuild/easyconfigs/p/Pasha/Pasha-1.0.3-goalf-1.1.0-no-OFED.eb index 8c92d8a791..e54ae6a9d5 100644 --- a/easybuild/easyconfigs/p/Pasha/Pasha-1.0.3-goalf-1.1.0-no-OFED.eb +++ b/easybuild/easyconfigs/p/Pasha/Pasha-1.0.3-goalf-1.1.0-no-OFED.eb @@ -12,5 +12,7 @@ dependencies=[('tbb','4.0.5.339','',True)] sourceURLs=['http://downloads.sourceforge.net/pasha'] sources=['%s-%s.tar.gz' % (name, version)] +patches=['gcc-hash_fun-map-set.patch'] + # Pasha's makefile is not suited for parallel execution. parallel=1 diff --git a/easybuild/easyconfigs/p/Pasha/gcc-hash_fun-map-set.patch b/easybuild/easyconfigs/p/Pasha/gcc-hash_fun-map-set.patch new file mode 100644 index 0000000000..a8a9cab2a3 --- /dev/null +++ b/easybuild/easyconfigs/p/Pasha/gcc-hash_fun-map-set.patch @@ -0,0 +1,61 @@ +diff -ru Pasha-1.0.3.orig/google/dense_hash_map Pasha-1.0.3/google/dense_hash_map +--- Pasha-1.0.3.orig/google/dense_hash_map 2010-12-07 04:43:26.000000000 +0100 ++++ Pasha-1.0.3/google/dense_hash_map 2012-08-02 10:15:22.758689520 +0200 +@@ -103,7 +103,7 @@ + #include // for equal_to + #include // for alloc<> + #include // for pair<> +-#include HASH_FUN_H // defined in config.h ++#include HASH_MAP_H // defined in config.h + #include + #include + +diff -ru Pasha-1.0.3.orig/google/dense_hash_set Pasha-1.0.3/google/dense_hash_set +--- Pasha-1.0.3.orig/google/dense_hash_set 2010-12-07 04:43:26.000000000 +0100 ++++ Pasha-1.0.3/google/dense_hash_set 2012-08-02 10:15:12.680591773 +0200 +@@ -107,7 +107,7 @@ + #include // for equal_to + #include // for alloc<> + #include // for pair<> +-#include HASH_FUN_H // defined in config.h ++#include HASH_SET_H // defined in config.h + #include + #include + +diff -ru Pasha-1.0.3.orig/google/sparsehash/sparseconfig.h Pasha-1.0.3/google/sparsehash/sparseconfig.h +--- Pasha-1.0.3.orig/google/sparsehash/sparseconfig.h 2010-12-07 04:43:26.000000000 +0100 ++++ Pasha-1.0.3/google/sparsehash/sparseconfig.h 2012-08-02 10:15:34.118799712 +0200 +@@ -7,7 +7,8 @@ + #define GOOGLE_NAMESPACE ::google + + /* the location of the header defining hash functions */ +-#define HASH_FUN_H ++#define HASH_MAP_H ++#define HASH_SET_H + + /* the namespace of the hash<> function */ + #define HASH_NAMESPACE __gnu_cxx +diff -ru Pasha-1.0.3.orig/google/sparse_hash_map Pasha-1.0.3/google/sparse_hash_map +--- Pasha-1.0.3.orig/google/sparse_hash_map 2010-12-07 04:43:26.000000000 +0100 ++++ Pasha-1.0.3/google/sparse_hash_map 2012-08-02 10:15:26.615727009 +0200 +@@ -91,7 +91,7 @@ + #include // for equal_to + #include // for alloc<> + #include // for pair<> +-#include HASH_FUN_H // defined in config.h ++#include HASH_MAP_H // defined in config.h + #include + #include + +diff -ru Pasha-1.0.3.orig/google/sparse_hash_set Pasha-1.0.3/google/sparse_hash_set +--- Pasha-1.0.3.orig/google/sparse_hash_set 2010-12-07 04:43:26.000000000 +0100 ++++ Pasha-1.0.3/google/sparse_hash_set 2012-08-02 10:15:17.334636915 +0200 +@@ -95,7 +95,7 @@ + #include // for equal_to + #include // for alloc<> + #include // for pair<> +-#include HASH_FUN_H // defined in config.h ++#include HASH_SET_H // defined in config.h + #include + #include + From 5d98117401565578fe3b0e55c4ceb425a958197d Mon Sep 17 00:00:00 2001 From: Kenneth Hoste Date: Thu, 2 Aug 2012 11:22:59 +0200 Subject: [PATCH 218/798] complete patch with Makefile fixes; LD_LIBRARY_PATH shouldn't and doesn't need to be set --- .../f/FSL/FSL-4.1.9-goalf-1.1.0-no-OFED.eb | 2 +- ...lodic_makefile.patch => FSL_makefile_fixes.patch} | 12 +++++++++++- 2 files changed, 12 insertions(+), 2 deletions(-) rename easybuild/easyconfigs/f/FSL/{FSL_melodic_makefile.patch => FSL_makefile_fixes.patch} (50%) diff --git a/easybuild/easyconfigs/f/FSL/FSL-4.1.9-goalf-1.1.0-no-OFED.eb b/easybuild/easyconfigs/f/FSL/FSL-4.1.9-goalf-1.1.0-no-OFED.eb index 0308c62580..e989116d1b 100644 --- a/easybuild/easyconfigs/f/FSL/FSL-4.1.9-goalf-1.1.0-no-OFED.eb +++ b/easybuild/easyconfigs/f/FSL/FSL-4.1.9-goalf-1.1.0-no-OFED.eb @@ -9,7 +9,7 @@ toolkit={'name':'goalf','version':'1.1.0-no-OFED'} sourceURLs=["http://www.fmrib.ox.ac.uk/fsldownloads/"] sources=['%s-%s-sources.tar.gz' % (name.lower(), version)] -patches=['FSL_melodic_makefile.patch'] +patches=['FSL_makefile_fixes.patch'] # libX11-devel is required for X11/Xlib.h, required by tk build osdependencies=['libX11-devel'] diff --git a/easybuild/easyconfigs/f/FSL/FSL_melodic_makefile.patch b/easybuild/easyconfigs/f/FSL/FSL_makefile_fixes.patch similarity index 50% rename from easybuild/easyconfigs/f/FSL/FSL_melodic_makefile.patch rename to easybuild/easyconfigs/f/FSL/FSL_makefile_fixes.patch index cdbe9bb801..762967fa5a 100644 --- a/easybuild/easyconfigs/f/FSL/FSL_melodic_makefile.patch +++ b/easybuild/easyconfigs/f/FSL/FSL_makefile_fixes.patch @@ -8,4 +8,14 @@ +#OPTFLAGS_alphaev6-dec-osf 5.0-gcc2.95.2 = -O3 -mieee -mfp-trap-mode=sui PROJNAME = melodic - \ No newline at end of file + --- fsl.orig/src/libmeshutils/Makefile 2009-10-23 18:49:08.000000000 +0200 ++++ fsl/src/libmeshutils/Makefile 2012-08-02 11:20:48.707842124 +0200 +@@ -3,7 +3,7 @@ + + PROJNAME = meshUtils + +-LD_LIBRARY_PATH=${FSLDIR}/lib ++#LD_LIBRARY_PATH=${FSLDIR}/lib + + USRINCFLAGS = -I${INC_NEWMAT} -I${INC_ZLIB} -I${INC_PROB} -I${INC_BOOST} + USRLDFLAGS = -L${LIB_PROB} -L${LIB_NEWMAT} -L${LIB_ZLIB} From d290a50a404710e098a85b0d5d7cfa554f1de59f Mon Sep 17 00:00:00 2001 From: Toon Willems Date: Thu, 2 Aug 2012 11:34:52 +0200 Subject: [PATCH 219/798] first stab at a parallel build test --- easybuild/test/build.py | 83 ++++++++++++++++++++++++++++++++++++++++- 1 file changed, 82 insertions(+), 1 deletion(-) diff --git a/easybuild/test/build.py b/easybuild/test/build.py index a463585901..b9fc0e6feb 100644 --- a/easybuild/test/build.py +++ b/easybuild/test/build.py @@ -22,6 +22,7 @@ import os import re import sys +import time import unittest import xml.dom.minidom as xml @@ -30,6 +31,7 @@ from easybuild.framework.application import get_class, Application from easybuild.build import findEasyconfigs, processEasyconfig, resolveDependencies from easybuild.tools.filetools import modifyEnv +from easybuild.tools.pbs_job import PbsJob import easybuild.tools.config as config @@ -73,6 +75,17 @@ def setUp(self): self.log = getLog("BuildTest") self.build_ok = True + self.parallel = False + self.jobs = [] + + # rudimentary option parsing + try: + sys.argv.remove("--job") + self.log.debug("--job has been specified, parallel build test initiated!") + self.parallel = True + except ValueError: + # just continue as we were + pass files = [] if len(sys.argv) > 1: @@ -83,6 +96,12 @@ def setUp(self): path = "easybuild/easyconfigs/" files = findEasyconfigs(path, log) + # if we want to build with jobs, we should do it now, since we have very little time on the login node + if self.parallel: + # this method will submit the jobs, in runTest we will handle the aggregation of the results + self.submit_jobs(files) + return + packages = [] for file in files: try: @@ -91,6 +110,7 @@ def setUp(self): self.build_ok = False self.test_results.append((file, 'eb-file error', err)) + # Since build-order doesn't matter we don't have to use the resolveDependencies method self.apps = [] for pkg in packages: @@ -112,6 +132,33 @@ def setUp(self): self.build_ok = False self.test_results.append((spec, 'initialization', err)) + def submit_jobs(files): + """ + Build the given files in parallel using (for now) PBS + """ + # capture PYTHONPATH and all variables starting with EASYBUILD + easybuild_vars = {} + for name in os.environ: + if name.startswith("EASYBUILD"): + easybuild_vars[name] = os.environ[name] + + if "PYTHONPATH" in os.environ: + easybuild_vars["PYTHONPATH"] = os.environ["PYTHONPATH"] + + for easyconfig in files: + easybuild_vars['EASYBUILDTESTOUTPUT'] = "%s.xml" % easyconfig + command = "python %s %s" % (sys.argv[0], easyconfig) + self.log.debug("submitting: %s" % command) + self.log.debug("env vars set: %s" % easybuild_vars) + job = PbsJob(command, easybuild_vars, easyconfig) + try: + job.submit() + self.jobs.append((easyconfig, job)) + except EasyBuildError, err: + self.log.warn("Failed to submit job for easyconfig: %s, error: %s" % (easyconfig, err)) + + + def performStep(self, fase, obj, method): """ Perform method on object if it can be build @@ -130,6 +177,36 @@ def runTest(self): """ Actual test, loop over all the different steps in a build """ + # handle parallel build + if self.parallel: + # ugly while loop to check if some jobs are stilling running (minimizing job.info() calls) + done = False + while not done: + # we can afford to sleep 5 minutes since we don't expect fast completion + time.sleep(5 * 60) + done = True + for (_, job) in self.jobs: + if job.info(): + done = False + break + + # all build jobs have finished -> aggregate results + test_dir = os.path.dirname(__file__) + + dom = xml.getDOMImplementation() + root = dom.createDocument(None, "testsuite", None) + for (easyconfig_file, _) in self.jobs: + dom = xml.parse(test_dir, "%s.xml" % easybuild_config)) + children = dom.documentElement.getElementsByTagName("testcase") + for child in children: + root.firstChild.appendChild(child) + + output_file = open("parallel-test.xml", "w") + root.writexml(os.path.join(test_dir, output_file), addindent="\t", newl="\n") + output_file.close() + return + + self.log.info("Continuing building other packages") base_dir = os.getcwd() base_env = copy.deepcopy(os.environ) @@ -168,7 +245,11 @@ def runTest(self): self.log.info("%s from %s packages failed to build!" % (failed, total)) - filename = "easybuild-test-output.xml" + if "EASYBUILDTESTOUTPUT" in os.environ: + filename = os.environ["EASYBUILDTESTOUTPUT"] + else: + filename = "easybuild-test-output.xml" + test_path = os.path.dirname(__file__) filename = os.path.join(test_path, filename) self.log.debug("writing xml output to %s" % filename) From ed4e79ac4925c27c5fef7f967d214f8b86d203d6 Mon Sep 17 00:00:00 2001 From: Toon Willems Date: Thu, 2 Aug 2012 11:44:11 +0200 Subject: [PATCH 220/798] fix syntax errors --- easybuild/test/build.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/easybuild/test/build.py b/easybuild/test/build.py index b9fc0e6feb..9584423cfb 100644 --- a/easybuild/test/build.py +++ b/easybuild/test/build.py @@ -132,7 +132,7 @@ def setUp(self): self.build_ok = False self.test_results.append((spec, 'initialization', err)) - def submit_jobs(files): + def submit_jobs(self, files): """ Build the given files in parallel using (for now) PBS """ @@ -196,7 +196,7 @@ def runTest(self): dom = xml.getDOMImplementation() root = dom.createDocument(None, "testsuite", None) for (easyconfig_file, _) in self.jobs: - dom = xml.parse(test_dir, "%s.xml" % easybuild_config)) + dom = xml.parse(os.path.join(test_dir, "%s.xml" % easyconfig_file)) children = dom.documentElement.getElementsByTagName("testcase") for child in children: root.firstChild.appendChild(child) From 814044fcc73c6ef77892c5c2a582801b36f0da21 Mon Sep 17 00:00:00 2001 From: Toon Willems Date: Thu, 2 Aug 2012 11:58:06 +0200 Subject: [PATCH 221/798] fix aggregation --- easybuild/test/build.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/easybuild/test/build.py b/easybuild/test/build.py index 9584423cfb..dacc269af1 100644 --- a/easybuild/test/build.py +++ b/easybuild/test/build.py @@ -201,8 +201,8 @@ def runTest(self): for child in children: root.firstChild.appendChild(child) - output_file = open("parallel-test.xml", "w") - root.writexml(os.path.join(test_dir, output_file), addindent="\t", newl="\n") + output_file = open(os.path.join(test_dir, "parallel-test.xml"), "w") + root.writexml(output_file, addindent="\t", newl="\n") output_file.close() return From 0126e7efba1fc3a003e6a0245ab88523df872b70 Mon Sep 17 00:00:00 2001 From: Toon Willems Date: Thu, 2 Aug 2012 12:10:36 +0200 Subject: [PATCH 222/798] use env_vars set in job object --- easybuild/test/build.py | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/easybuild/test/build.py b/easybuild/test/build.py index dacc269af1..a60c4040d1 100644 --- a/easybuild/test/build.py +++ b/easybuild/test/build.py @@ -153,7 +153,7 @@ def submit_jobs(self, files): job = PbsJob(command, easybuild_vars, easyconfig) try: job.submit() - self.jobs.append((easyconfig, job)) + self.jobs.append(job) except EasyBuildError, err: self.log.warn("Failed to submit job for easyconfig: %s, error: %s" % (easyconfig, err)) @@ -185,7 +185,7 @@ def runTest(self): # we can afford to sleep 5 minutes since we don't expect fast completion time.sleep(5 * 60) done = True - for (_, job) in self.jobs: + for job in self.jobs: if job.info(): done = False break @@ -195,8 +195,10 @@ def runTest(self): dom = xml.getDOMImplementation() root = dom.createDocument(None, "testsuite", None) - for (easyconfig_file, _) in self.jobs: - dom = xml.parse(os.path.join(test_dir, "%s.xml" % easyconfig_file)) + for job in self.jobs: + # we set this earlier on (cannot be changed inside job) + xml_output = job.env_vars['EASYBUILDTESTOUTPUT'] + dom = xml.parse(xml_output) children = dom.documentElement.getElementsByTagName("testcase") for child in children: root.firstChild.appendChild(child) From 76677b56eca48161dbcec69a2e199d51748188df Mon Sep 17 00:00:00 2001 From: Kenneth Hoste Date: Thu, 2 Aug 2012 12:25:01 +0200 Subject: [PATCH 223/798] add setting of FSLDIR in module --- easybuild/easyblocks/f/fsl.py | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/easybuild/easyblocks/f/fsl.py b/easybuild/easyblocks/f/fsl.py index 8c10af8973..ab32c3cf97 100644 --- a/easybuild/easyblocks/f/fsl.py +++ b/easybuild/easyblocks/f/fsl.py @@ -86,6 +86,7 @@ def make_install(self): self.log.error("Error detected in build log %s." % buildlog) def make_module_req_guess(self): + """Set correct PATH and LD_LIBRARY_PATH variables.""" guesses = Application.make_module_req_guess(self) @@ -96,6 +97,15 @@ def make_module_req_guess(self): return guesses + def make_module_extra(self): + """Add setting of FSLDIR in module.""" + + txt = Application.make_module_extra(self) + + txt += self.moduleGenerator.setEnvironment("FSLDIR", "$root/fsl") + + return txt + def sanitycheck(self): """Custom sanity check for FSL""" From b51c99c82117b296784f67443d8be4d7167de76c Mon Sep 17 00:00:00 2001 From: Toon Willems Date: Thu, 2 Aug 2012 13:36:34 +0200 Subject: [PATCH 224/798] write to dir where test was started, add timestamp in name --- easybuild/test/build.py | 15 ++++++++------- 1 file changed, 8 insertions(+), 7 deletions(-) diff --git a/easybuild/test/build.py b/easybuild/test/build.py index a60c4040d1..20d0240f32 100644 --- a/easybuild/test/build.py +++ b/easybuild/test/build.py @@ -25,6 +25,7 @@ import time import unittest import xml.dom.minidom as xml +from datetime import datetime from unittest import TestCase from easybuild.tools.build_log import getLog, EasyBuildError, initLogger @@ -72,6 +73,7 @@ def setUp(self): config.init('easybuild/easybuild_config.py') self.test_results = [] self.build_stopped = {} + self.cur_dir = os.getcwd() self.log = getLog("BuildTest") self.build_ok = True @@ -136,6 +138,8 @@ def submit_jobs(self, files): """ Build the given files in parallel using (for now) PBS """ + # change to current + os.chdir(self.cur_dir) # capture PYTHONPATH and all variables starting with EASYBUILD easybuild_vars = {} for name in os.environ: @@ -147,7 +151,7 @@ def submit_jobs(self, files): for easyconfig in files: easybuild_vars['EASYBUILDTESTOUTPUT'] = "%s.xml" % easyconfig - command = "python %s %s" % (sys.argv[0], easyconfig) + command = "python build.py %s" % easyconfig self.log.debug("submitting: %s" % command) self.log.debug("env vars set: %s" % easybuild_vars) job = PbsJob(command, easybuild_vars, easyconfig) @@ -191,8 +195,6 @@ def runTest(self): break # all build jobs have finished -> aggregate results - test_dir = os.path.dirname(__file__) - dom = xml.getDOMImplementation() root = dom.createDocument(None, "testsuite", None) for job in self.jobs: @@ -203,7 +205,7 @@ def runTest(self): for child in children: root.firstChild.appendChild(child) - output_file = open(os.path.join(test_dir, "parallel-test.xml"), "w") + output_file = open(os.path.join(self.cur_dir, "parallel-test.xml"), "w") root.writexml(output_file, addindent="\t", newl="\n") output_file.close() return @@ -250,10 +252,9 @@ def runTest(self): if "EASYBUILDTESTOUTPUT" in os.environ: filename = os.environ["EASYBUILDTESTOUTPUT"] else: - filename = "easybuild-test-output.xml" + filename = "easybuild-test-%s.xml" % datetime.now().strftime("%d-%m-%Y-%H:%M:%S") - test_path = os.path.dirname(__file__) - filename = os.path.join(test_path, filename) + filename = os.path.join(self.cur_dir, filename) self.log.debug("writing xml output to %s" % filename) write_to_xml(succes, self.test_results, filename) From 0dcee7bb2596caba611a22d082d1a61b7757adfd Mon Sep 17 00:00:00 2001 From: Toon Willems Date: Thu, 2 Aug 2012 13:42:08 +0200 Subject: [PATCH 225/798] cd into correct directory --- easybuild/test/build.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/easybuild/test/build.py b/easybuild/test/build.py index 20d0240f32..0505402f7e 100644 --- a/easybuild/test/build.py +++ b/easybuild/test/build.py @@ -151,7 +151,7 @@ def submit_jobs(self, files): for easyconfig in files: easybuild_vars['EASYBUILDTESTOUTPUT'] = "%s.xml" % easyconfig - command = "python build.py %s" % easyconfig + command = "cd %s && python %s %s" % (self.cur_dir, sys.argv[0], easyconfig) self.log.debug("submitting: %s" % command) self.log.debug("env vars set: %s" % easybuild_vars) job = PbsJob(command, easybuild_vars, easyconfig) From a79d206a5d538ddd966edaa244f4d2a06c8986f2 Mon Sep 17 00:00:00 2001 From: Toon Willems Date: Thu, 2 Aug 2012 14:20:10 +0200 Subject: [PATCH 226/798] perform a bit of cleanup of pbs code --- easybuild/tools/pbs_job.py | 123 ++++++++++++++++++++----------------- 1 file changed, 67 insertions(+), 56 deletions(-) diff --git a/easybuild/tools/pbs_job.py b/easybuild/tools/pbs_job.py index ad4e1f128f..37b28375bb 100644 --- a/easybuild/tools/pbs_job.py +++ b/easybuild/tools/pbs_job.py @@ -44,8 +44,11 @@ def __init__(self, script, name, env_vars=None): except ImportError: self.log.error("Cannot import PBSQuery or pbs. Please make sure pbs_python is installed and usable.") - self.pbs_server = pbs.pbs_default() - self.pbsconn = pbs.pbs_connect (self.pbs_server) + try: + self.pbs_server = pbs.pbs_default() + self.pbsconn = pbs.pbs_connect(self.pbs_server) + except: + self.log.error("Could not connect to the default pbs server, is this correctly configured?") self.jobid = None @@ -56,20 +59,21 @@ def submit(self): resources = {"walltime": "72:00:00", "nodes": "1:ppn=%s" % self.get_ppn() } - attropl = pbs.new_attropl(2) ## jobparams - attropl[0].name = 'Job_Name' - attropl[0].value = self.name - attropl[1].name = 'Rerunable' - attropl[1].value = 'y' + # Build default pbs_attributes list + pbs_attributes = pbs.new_attropl(2) + pbs_attributes[0].name = 'Job_Name' + pbs_attributes[0].value = self.name + - tmpattropl = pbs.new_attropl(len(resources)) ## jobparams + # set resource requirements + resourse_attributes = pbs.new_attropl(len(resources)) idx = 0 for k, v in resources.items(): - tmpattropl[idx].name = 'Resource_List' ## resources - tmpattropl[idx].resource = k - tmpattropl[idx].value = v + resourse_attributes[idx].name = 'Resource_List' + resourse_attributes[idx].resource = k + resourse_attributes[idx].value = v idx += 1 - attropl.extend(tmpattropl) + pbs_attributes.extend(resourse_attributes) ## add a bunch of variables (added by qsub) ## also set PBS_O_WORKDIR to os.getcwd() @@ -77,24 +81,27 @@ def submit(self): defvars = ['MAIL', 'HOME', 'PATH', 'SHELL', 'WORKDIR'] vars = ["PBS_O_%s=%s" % (x, os.environ.get(x, 'NOTFOUND_%s' % x)) for x in defvars] + # extend PBS variables with specified variables vars.extend(["%s=%s" % (name, value) for (name, value) in self.env_vars.items()]) - tmpattropl = pbs.new_attropl(1) - tmpattropl[0].name = 'Variable_List' - tmpattropl[0].value = ",".join(vars) - attropl.extend(tmpattropl) + variable_attributes = pbs.new_attropl(1) + variable_attributes[0].name = 'Variable_List' + variable_attributes[0].value = ",".join(vars) + + pbs_attributes.extend(variable_attributes) import tempfile fh, scriptfn = tempfile.mkstemp() f = os.fdopen(fh, 'w') - self.log.debug("Writing temp jobscript to %s" % scriptfn) + self.log.debug("Writing temporary job script to %s" % scriptfn) f.write(txt) f.close() - queue='long' + queue = 'long' self.log.debug("Going to submit to queue %s" % queue) - extend = 'NULL' ## always - jobid = pbs.pbs_submit(self.pbsconn, attropl, scriptfn, queue, extend) + # extend paramater should be 'NULL' because this is required by the python api + extend = 'NULL' + jobid = pbs.pbs_submit(self.pbsconn, pbs_attributes, scriptfn, queue, extend) is_error, errormsg = pbs.error() if is_error: @@ -107,63 +114,67 @@ def submit(self): def state(self): """ Return the state of the job + State can be 'not submitted', 'running', 'queued' or 'finished', """ - state = self.info(types=['job_state', 'exec_host']) - jid = [x['id'] for x in state] + if state == None: + if self.jobid == None: + return 'not submitted' + else: + return 'finished' + + jid = state['id'] - jstate = [ x.get('job_state', None) for x in state] + jstate = state.get('job_state', None) - def get_uniq_hosts(txt, num= -1): - """txt host1/cpuid+host2/cpuid - - num: number of nodes to return + def get_uniq_hosts(txt, num=-1): + """ + - txt: format: host1/cpuid+host2/cpuid + - num: number of nodes to return (default: all) """ res = [] for h_c in txt.split('+'): h = h_c.split('/')[0] - if h in res: continue + if h in res: + continue res.append(h) return res[:num] - ehosts = [ get_uniq_hosts(x.get('exec_host', '')) for x in state] - self.log.debug("Jobid %s jid %s state %s ehosts %s (%s)" % (self.jobid, jid, jstate, ehosts, state)) + ehosts = get_uniq_hosts(state.get('exec_host', ''), 1) - joined = zip(jid, jstate, [''.join(x[:1]) for x in ehosts]) ## only use first node (don't use [0], job in Q have empty list; use ''.join to make string) - temp = "Id %s State %s Node %s" - if len(joined) == 0: - msg = "No jobs found." - elif len(joined) == 1: - msg = "Found 1 job %s" % (temp % tuple(joined[0])) + self.log.debug("Jobid %s jid %s state %s ehosts %s (%s)" % (self.jobid, jid, jstate, ehosts, state)) + if len(ehosts) > 0: + return 'running' else: - msg = "Found %s jobs\n" % len(joined) - for j in joined: - msg += " %s\n" % (temp % tuple(j)) - self.log.debug("msg %s" % msg) - - return msg + return 'queued' def info(self, types=None): - """Return jobinfo""" - + """ + Return jobinfo + """ if not self.jobid: - self.log.debug("no jobid, job is not yet submitted?") - return + self.log.debug("no jobid, job is not submitted yet?") + return None + # convert single type into list if type(types) is str: types = [types] + self.log.debug("Return info types %s" % types) + # create attribute list to query pbs with if types is None: jobattr = 'NULL' else: jobattr = pbs.new_attrl(len(types)) - for idx in range(len(types)): - jobattr[idx].name = types[idx] + for idx, attr in enumerate(types): + jobattr[idx].name = attr jobs = pbs.pbs_statjob(self.pbsconn, self.jobid, jobattr, 'NULL') if len(jobs) == 0: - res = [] ## return nothing + # no job found, return None info + res = None self.log.debug("No job found. Wrong id %s or job finished? Returning %s" % (self.jobid, res)) return res elif len(jobs) == 1: @@ -171,14 +182,14 @@ def info(self, types=None): else: self.log.error("Request for jobid %s returned more then one result %s" % (self.jobid, jobs)) - ## more then one, return value - res = [] - for j in jobs: - job_details = dict([ (attrib.name, attrib.value) for attrib in j.attribs ]) - job_details['id'] = j.name ## add id - res.append(job_details) - self.log.debug("Found jobinfo %s" % res) - return res + # only expect to have a list with one element + j = jobs[0] + # convert attribs into useable dict + job_details = dict([ (attrib.name, attrib.value) for attrib in j.attribs ]) + # manually set 'id' attribute + job_details['id'] = j.name + self.log.debug("Found jobinfo %s" % job_details) + return job_details def remove(self): """Remove the job with id jobid""" From aaa484de95403bdb62163bc6d9e221cea848cb07 Mon Sep 17 00:00:00 2001 From: Toon Willems Date: Thu, 2 Aug 2012 14:29:55 +0200 Subject: [PATCH 227/798] 2 -> 1 (removed rerunnable) --- easybuild/tools/pbs_job.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/easybuild/tools/pbs_job.py b/easybuild/tools/pbs_job.py index 37b28375bb..673268d125 100644 --- a/easybuild/tools/pbs_job.py +++ b/easybuild/tools/pbs_job.py @@ -60,7 +60,7 @@ def submit(self): resources = {"walltime": "72:00:00", "nodes": "1:ppn=%s" % self.get_ppn() } # Build default pbs_attributes list - pbs_attributes = pbs.new_attropl(2) + pbs_attributes = pbs.new_attropl(1) pbs_attributes[0].name = 'Job_Name' pbs_attributes[0].value = self.name From f923e8ef28610afe8b140607eec7914e2ce6bdca Mon Sep 17 00:00:00 2001 From: Toon Willems Date: Thu, 2 Aug 2012 14:32:18 +0200 Subject: [PATCH 228/798] use job_state found in info --- easybuild/tools/pbs_job.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/easybuild/tools/pbs_job.py b/easybuild/tools/pbs_job.py index 673268d125..5c749b6a9b 100644 --- a/easybuild/tools/pbs_job.py +++ b/easybuild/tools/pbs_job.py @@ -144,10 +144,10 @@ def get_uniq_hosts(txt, num=-1): ehosts = get_uniq_hosts(state.get('exec_host', ''), 1) self.log.debug("Jobid %s jid %s state %s ehosts %s (%s)" % (self.jobid, jid, jstate, ehosts, state)) - if len(ehosts) > 0: - return 'running' - else: + if jstate == 'Q': return 'queued' + else: + return 'running' def info(self, types=None): """ From 45dcf575561296f73d2f71f5694c0904273f9f92 Mon Sep 17 00:00:00 2001 From: Kenneth Hoste Date: Thu, 2 Aug 2012 14:48:45 +0200 Subject: [PATCH 229/798] extend patch file so other compilers can be used as well --- .../f/FSL/FSL_makefile_fixes.patch | 294 ++++++++++++++++++ 1 file changed, 294 insertions(+) diff --git a/easybuild/easyconfigs/f/FSL/FSL_makefile_fixes.patch b/easybuild/easyconfigs/f/FSL/FSL_makefile_fixes.patch index 762967fa5a..c78dd2e48a 100644 --- a/easybuild/easyconfigs/f/FSL/FSL_makefile_fixes.patch +++ b/easybuild/easyconfigs/f/FSL/FSL_makefile_fixes.patch @@ -19,3 +19,297 @@ USRINCFLAGS = -I${INC_NEWMAT} -I${INC_ZLIB} -I${INC_PROB} -I${INC_BOOST} USRLDFLAGS = -L${LIB_PROB} -L${LIB_NEWMAT} -L${LIB_ZLIB} +diff -ru fsl.orig/config/apple-darwin10-gcc4.2/systemvars.mk fsl/config/apple-darwin10-gcc4.2/systemvars.mk +--- fsl.orig/config/apple-darwin10-gcc4.2/systemvars.mk 2009-11-03 18:02:14.000000000 +0100 ++++ fsl/config/apple-darwin10-gcc4.2/systemvars.mk 2012-08-02 14:45:57.697749330 +0200 +@@ -3,8 +3,8 @@ + + # Compiler dependent variables + +-CC = cc +-CXX = c++ ++CC ?= cc ++CXX ?= c++ + CSTATICFLAGS = + CXXSTATICFLAGS = + +diff -ru fsl.orig/config/apple-darwin7-gcc3.1/systemvars.mk fsl/config/apple-darwin7-gcc3.1/systemvars.mk +--- fsl.orig/config/apple-darwin7-gcc3.1/systemvars.mk 2007-07-13 13:00:20.000000000 +0200 ++++ fsl/config/apple-darwin7-gcc3.1/systemvars.mk 2012-08-02 14:45:57.734749873 +0200 +@@ -7,8 +7,8 @@ + + # Compiler dependent variables + +-CC = cc +-CXX = c++ ++CC ?= cc ++CXX ?= c++ + CSTATICFLAGS = + CXXSTATICFLAGS = + +diff -ru fsl.orig/config/apple-darwin7-gcc3.3/systemvars.mk fsl/config/apple-darwin7-gcc3.3/systemvars.mk +--- fsl.orig/config/apple-darwin7-gcc3.3/systemvars.mk 2007-07-13 13:00:20.000000000 +0200 ++++ fsl/config/apple-darwin7-gcc3.3/systemvars.mk 2012-08-02 14:45:57.767750355 +0200 +@@ -7,8 +7,8 @@ + + # Compiler dependent variables + +-CC = cc +-CXX = c++ ++CC ?= cc ++CXX ?= c++ + CSTATICFLAGS = + CXXSTATICFLAGS = + +diff -ru fsl.orig/config/apple-darwin8-gcc4.0/systemvars.mk fsl/config/apple-darwin8-gcc4.0/systemvars.mk +--- fsl.orig/config/apple-darwin8-gcc4.0/systemvars.mk 2007-12-19 15:40:57.000000000 +0100 ++++ fsl/config/apple-darwin8-gcc4.0/systemvars.mk 2012-08-02 14:45:57.801750851 +0200 +@@ -3,8 +3,8 @@ + + # Compiler dependent variables + +-CC = cc +-CXX = c++ ++CC ?= cc ++CXX ?= c++ + CSTATICFLAGS = + CXXSTATICFLAGS = + +diff -ru fsl.orig/config/apple-darwin9-gcc4.0/systemvars.mk fsl/config/apple-darwin9-gcc4.0/systemvars.mk +--- fsl.orig/config/apple-darwin9-gcc4.0/systemvars.mk 2007-12-19 15:33:53.000000000 +0100 ++++ fsl/config/apple-darwin9-gcc4.0/systemvars.mk 2012-08-02 14:45:57.835751349 +0200 +@@ -3,8 +3,8 @@ + + # Compiler dependent variables + +-CC = cc +-CXX = c++ ++CC ?= cc ++CXX ?= c++ + CSTATICFLAGS = + CXXSTATICFLAGS = + +diff -ru fsl.orig/config/generic/systemvars.mk fsl/config/generic/systemvars.mk +--- fsl.orig/config/generic/systemvars.mk 2007-07-13 13:00:20.000000000 +0200 ++++ fsl/config/generic/systemvars.mk 2012-08-02 14:45:57.869751846 +0200 +@@ -16,8 +16,8 @@ + + # Compiler dependent variables + +-CC = gcc +-CXX = c++ ++CC ?= gcc ++CXX ?= c++ + CSTATICFLAGS = -static + CXXSTATICFLAGS = -static + +diff -ru fsl.orig/config/i686-pc-cygwin-gcc3.2/systemvars.mk fsl/config/i686-pc-cygwin-gcc3.2/systemvars.mk +--- fsl.orig/config/i686-pc-cygwin-gcc3.2/systemvars.mk 2007-07-13 13:00:20.000000000 +0200 ++++ fsl/config/i686-pc-cygwin-gcc3.2/systemvars.mk 2012-08-02 14:45:57.903752343 +0200 +@@ -18,8 +18,8 @@ + + # Compiler dependent variables + +-CC = gcc-2 +-CXX = c++-2 ++CC ?= gcc-2 ++CXX ?= c++-2 + CSTATICFLAGS = -static + CXXSTATICFLAGS = -static + +diff -ru fsl.orig/config/i686-pc-cygwin-gcc3.3/systemvars.mk fsl/config/i686-pc-cygwin-gcc3.3/systemvars.mk +--- fsl.orig/config/i686-pc-cygwin-gcc3.3/systemvars.mk 2007-07-13 13:00:20.000000000 +0200 ++++ fsl/config/i686-pc-cygwin-gcc3.3/systemvars.mk 2012-08-02 14:45:57.936752826 +0200 +@@ -18,8 +18,8 @@ + + # Compiler dependent variables + +-CC = gcc +-CXX = c++ ++CC ?= gcc ++CXX ?= c++ + CSTATICFLAGS = -static + CXXSTATICFLAGS = -static + +diff -ru fsl.orig/config/i686-pc-cygwin-gcc3.4/systemvars.mk fsl/config/i686-pc-cygwin-gcc3.4/systemvars.mk +--- fsl.orig/config/i686-pc-cygwin-gcc3.4/systemvars.mk 2007-07-13 13:00:20.000000000 +0200 ++++ fsl/config/i686-pc-cygwin-gcc3.4/systemvars.mk 2012-08-02 14:45:57.979753456 +0200 +@@ -18,8 +18,8 @@ + + # Compiler dependent variables + +-CC = gcc +-CXX = c++ ++CC ?= gcc ++CXX ?= c++ + CSTATICFLAGS = -static + CXXSTATICFLAGS = -static + +diff -ru fsl.orig/config/linux_32-gcc2.96/systemvars.mk fsl/config/linux_32-gcc2.96/systemvars.mk +--- fsl.orig/config/linux_32-gcc2.96/systemvars.mk 2007-07-25 17:21:07.000000000 +0200 ++++ fsl/config/linux_32-gcc2.96/systemvars.mk 2012-08-02 14:45:58.021754069 +0200 +@@ -18,8 +18,8 @@ + + # Compiler dependent variables + +-CC = gcc +-CXX = c++ ++CC ?= gcc ++CXX ?= c++ + CSTATICFLAGS = -static + CXXSTATICFLAGS = -static + +diff -ru fsl.orig/config/linux_32-gcc3.2/systemvars.mk fsl/config/linux_32-gcc3.2/systemvars.mk +--- fsl.orig/config/linux_32-gcc3.2/systemvars.mk 2007-07-25 17:21:08.000000000 +0200 ++++ fsl/config/linux_32-gcc3.2/systemvars.mk 2012-08-02 14:45:58.063754683 +0200 +@@ -18,8 +18,8 @@ + + # Compiler dependent variables + +-CC = gcc +-CXX = c++ ++CC ?= gcc ++CXX ?= c++ + CSTATICFLAGS = -static + CXXSTATICFLAGS = -static + +diff -ru fsl.orig/config/linux_32-gcc3.3/systemvars.mk fsl/config/linux_32-gcc3.3/systemvars.mk +--- fsl.orig/config/linux_32-gcc3.3/systemvars.mk 2007-07-25 17:21:09.000000000 +0200 ++++ fsl/config/linux_32-gcc3.3/systemvars.mk 2012-08-02 14:45:58.105755298 +0200 +@@ -18,8 +18,8 @@ + + # Compiler dependent variables + +-CC = gcc +-CXX = c++ ++CC ?= gcc ++CXX ?= c++ + CSTATICFLAGS = -static + CXXSTATICFLAGS = -static + +diff -ru fsl.orig/config/linux_32-gcc3.4/systemvars.mk fsl/config/linux_32-gcc3.4/systemvars.mk +--- fsl.orig/config/linux_32-gcc3.4/systemvars.mk 2007-07-25 17:21:10.000000000 +0200 ++++ fsl/config/linux_32-gcc3.4/systemvars.mk 2012-08-02 14:45:58.147755913 +0200 +@@ -18,8 +18,8 @@ + + # Compiler dependent variables + +-CC = gcc +-CXX = c++ ++CC ?= gcc ++CXX ?= c++ + CSTATICFLAGS = -static + CXXSTATICFLAGS = -static + +diff -ru fsl.orig/config/linux_32-gcc4.0/systemvars.mk fsl/config/linux_32-gcc4.0/systemvars.mk +--- fsl.orig/config/linux_32-gcc4.0/systemvars.mk 2007-07-25 17:21:11.000000000 +0200 ++++ fsl/config/linux_32-gcc4.0/systemvars.mk 2012-08-02 14:45:58.231757140 +0200 +@@ -18,8 +18,8 @@ + + # Compiler dependent variables + +-CC = gcc +-CXX = c++ ++CC ?= gcc ++CXX ?= c++ + CSTATICFLAGS = -static + CXXSTATICFLAGS = -static + +diff -ru fsl.orig/config/linux_32-gcc4.1/systemvars.mk fsl/config/linux_32-gcc4.1/systemvars.mk +--- fsl.orig/config/linux_32-gcc4.1/systemvars.mk 2007-07-13 13:00:21.000000000 +0200 ++++ fsl/config/linux_32-gcc4.1/systemvars.mk 2012-08-02 14:45:58.265757638 +0200 +@@ -18,8 +18,8 @@ + + # Compiler dependent variables + +-CC = gcc +-CXX = c++ ++CC ?= gcc ++CXX ?= c++ + CSTATICFLAGS = -static + CXXSTATICFLAGS = -static + +diff -ru fsl.orig/config/linux_64-gcc3.4/systemvars.mk fsl/config/linux_64-gcc3.4/systemvars.mk +--- fsl.orig/config/linux_64-gcc3.4/systemvars.mk 2007-07-25 17:21:12.000000000 +0200 ++++ fsl/config/linux_64-gcc3.4/systemvars.mk 2012-08-02 14:45:58.299758136 +0200 +@@ -18,8 +18,8 @@ + + # Compiler dependent variables + +-CC = gcc +-CXX = c++ ++CC ?= gcc ++CXX ?= c++ + CSTATICFLAGS = -static + CXXSTATICFLAGS = -static + +diff -ru fsl.orig/config/linux_64-gcc4.0/systemvars.mk fsl/config/linux_64-gcc4.0/systemvars.mk +--- fsl.orig/config/linux_64-gcc4.0/systemvars.mk 2007-07-25 17:21:13.000000000 +0200 ++++ fsl/config/linux_64-gcc4.0/systemvars.mk 2012-08-02 14:45:58.341758749 +0200 +@@ -18,8 +18,8 @@ + + # Compiler dependent variables + +-CC = gcc +-CXX = c++ ++CC ?= gcc ++CXX ?= c++ + CSTATICFLAGS = -static + CXXSTATICFLAGS = -static + +diff -ru fsl.orig/config/linux_64-gcc4.1/systemvars.mk fsl/config/linux_64-gcc4.1/systemvars.mk +--- fsl.orig/config/linux_64-gcc4.1/systemvars.mk 2007-07-25 11:19:45.000000000 +0200 ++++ fsl/config/linux_64-gcc4.1/systemvars.mk 2012-08-02 14:45:58.375759246 +0200 +@@ -18,8 +18,8 @@ + + # Compiler dependent variables + +-CC = gcc +-CXX = c++ ++CC ?= gcc ++CXX ?= c++ + CSTATICFLAGS = -static + CXXSTATICFLAGS = -static + +diff -ru fsl.orig/config/linux_64-gcc4.2/systemvars.mk fsl/config/linux_64-gcc4.2/systemvars.mk +--- fsl.orig/config/linux_64-gcc4.2/systemvars.mk 2008-06-26 15:25:42.000000000 +0200 ++++ fsl/config/linux_64-gcc4.2/systemvars.mk 2012-08-02 14:45:58.410759759 +0200 +@@ -18,8 +18,8 @@ + + # Compiler dependent variables + +-CC = gcc +-CXX = c++ ++CC ?= gcc ++CXX ?= c++ + CSTATICFLAGS = -static + CXXSTATICFLAGS = -static + +diff -ru fsl.orig/config/sparc-solaris2.8-gcc2.95/systemvars.mk fsl/config/sparc-solaris2.8-gcc2.95/systemvars.mk +--- fsl.orig/config/sparc-solaris2.8-gcc2.95/systemvars.mk 2007-07-13 13:00:21.000000000 +0200 ++++ fsl/config/sparc-solaris2.8-gcc2.95/systemvars.mk 2012-08-02 14:45:58.443760241 +0200 +@@ -5,8 +5,8 @@ + + # Compiler dependent variables + +-CC = gcc +-CXX = c++ ++CC ?= gcc ++CXX ?= c++ + + ARCHFLAGS = -mv8 -ffast-math -fomit-frame-pointer + +diff -ru fsl.orig/config/sparc-solaris2.9-gcc2.95/systemvars.mk fsl/config/sparc-solaris2.9-gcc2.95/systemvars.mk +--- fsl.orig/config/sparc-solaris2.9-gcc2.95/systemvars.mk 2007-07-13 13:00:21.000000000 +0200 ++++ fsl/config/sparc-solaris2.9-gcc2.95/systemvars.mk 2012-08-02 14:45:58.484760840 +0200 +@@ -5,8 +5,8 @@ + + # Compiler dependent variables + +-CC = gcc +-CXX = c++ ++CC ?= gcc ++CXX ?= c++ + + ARCHFLAGS = -mv8 -ffast-math -fomit-frame-pointer + ARCHLDFLAGS = -static From 00384c8965e6e19c9a6b91b726a161252daad377 Mon Sep 17 00:00:00 2001 From: Toon Willems Date: Thu, 2 Aug 2012 15:04:59 +0200 Subject: [PATCH 230/798] take shallow copy of dict --- easybuild/tools/pbs_job.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/easybuild/tools/pbs_job.py b/easybuild/tools/pbs_job.py index 5c749b6a9b..671ef0ffae 100644 --- a/easybuild/tools/pbs_job.py +++ b/easybuild/tools/pbs_job.py @@ -31,7 +31,7 @@ def __init__(self, script, name, env_vars=None): self.log = getLog("PBS") self.script = script if env_vars: - self.env_vars = env_vars + self.env_vars = env_vars.copy() else: self.env_vars = {} self.name = name From 46234ad864abe334c783a8de8252b2038b38557b Mon Sep 17 00:00:00 2001 From: Toon Willems Date: Thu, 2 Aug 2012 15:19:05 +0200 Subject: [PATCH 231/798] write properties into dedicated tag in xml --- easybuild/test/build.py | 13 +++++++++++++ 1 file changed, 13 insertions(+) diff --git a/easybuild/test/build.py b/easybuild/test/build.py index 0505402f7e..36b81cf86c 100644 --- a/easybuild/test/build.py +++ b/easybuild/test/build.py @@ -34,6 +34,7 @@ from easybuild.tools.filetools import modifyEnv from easybuild.tools.pbs_job import PbsJob +import easybuild import easybuild.tools.config as config @@ -285,6 +286,18 @@ def create_failure(name, error_type, error): el.appendChild(failure_el) el.lastChild.appendChild(error_text) return el + properties = root.createElement("properties") + version = root.createElement("property") + version.setAttribute("name", "easybuild-version") + version.setAttribute("value", str(easybuild.VERBOSE_VERSION)) + properties.appendChild(version) + + time = root.createElement("property") + time.setAttribute("name", "timestamp") + time.setAttribute("value", str(datetime.now())) + properties.appendChild(time) + + root.firstChild.appendChild(properties) for (obj, fase, error) in failed: # try to pretty print From 05b61b83ece164eae7f25de1f31915b635648330 Mon Sep 17 00:00:00 2001 From: Kenneth Hoste Date: Thu, 2 Aug 2012 15:20:34 +0200 Subject: [PATCH 232/798] add patch file for NaNs and Inf corrections required for building with Intel compilers --- .../f/FSL/FSL_icc_nan-inf_fix.patch | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) create mode 100644 easybuild/easyconfigs/f/FSL/FSL_icc_nan-inf_fix.patch diff --git a/easybuild/easyconfigs/f/FSL/FSL_icc_nan-inf_fix.patch b/easybuild/easyconfigs/f/FSL/FSL_icc_nan-inf_fix.patch new file mode 100644 index 0000000000..84fa1bbcfd --- /dev/null +++ b/easybuild/easyconfigs/f/FSL/FSL_icc_nan-inf_fix.patch @@ -0,0 +1,18 @@ +diff -ru fsl.orig/src/fslview/fsl/cprob/const.c fsl/src/fslview/fsl/cprob/const.c +--- fsl.orig/src/fslview/fsl/cprob/const.c 2006-08-21 18:47:10.000000000 +0200 ++++ fsl/src/fslview/fsl/cprob/const.c 2012-08-02 15:18:48.404398489 +0200 +@@ -89,12 +89,12 @@ + double THPIO4 = 2.35619449019234492885; /* 3*pi/4 */ + double TWOOPI = 6.36619772367581343075535E-1; /* 2/pi */ + #ifdef INFINITIES +-double INFINITY = 1.0/0.0; /* 99e999; */ ++double INFINITY = __builtin_inff(); + #else + double INFINITY = 1.79769313486231570815E308; /* 2**1024*(1-MACHEP) */ + #endif + #ifdef NANS +-double NAN = 1.0/0.0 - 1.0/0.0; ++double NAN = __builtin_nanf(""); + #else + double NAN = 0.0; + #endif From 1f90d547516a6f2f2ccac5465a87e8216578bd27 Mon Sep 17 00:00:00 2001 From: Toon Willems Date: Thu, 2 Aug 2012 15:31:20 +0200 Subject: [PATCH 233/798] remove space --- easybuild/build.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/easybuild/build.py b/easybuild/build.py index bb36ada3d1..879a54657e 100644 --- a/easybuild/build.py +++ b/easybuild/build.py @@ -723,7 +723,7 @@ def submit_build_job(log): # import here so it only loads when needed from easybuild.tools.pbs_job import PbsJob name = "easybuild-%s" % datetime.now().strftime("%m-%d-%Y-%H:%M:%S") - job = PbsJob(command, name, easybuild_vars ) + job = PbsJob(command, name, easybuild_vars) job.submit() log.info("job submitted. info: %s", job.info()) From 4c69094e3b51a0966c4844394f98991c9df2b049 Mon Sep 17 00:00:00 2001 From: Toon Willems Date: Thu, 2 Aug 2012 15:35:17 +0200 Subject: [PATCH 234/798] move import to top of file --- easybuild/build.py | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/easybuild/build.py b/easybuild/build.py index 879a54657e..7edb7b944a 100644 --- a/easybuild/build.py +++ b/easybuild/build.py @@ -38,6 +38,7 @@ import easybuild.tools.config as config import easybuild.tools.filetools as filetools from easybuild.tools import systemtools +from easybuild.tools.pbs_job import PbsJob """ Main entry point for EasyBuildBuild: build software from .eb input file @@ -720,8 +721,6 @@ def submit_build_job(log): if name.startswith("EASYBUILD"): easybuild_vars[name] = os.environ[name] - # import here so it only loads when needed - from easybuild.tools.pbs_job import PbsJob name = "easybuild-%s" % datetime.now().strftime("%m-%d-%Y-%H:%M:%S") job = PbsJob(command, name, easybuild_vars) job.submit() From d9e942560e9435d1d519cbf8b340358987273086 Mon Sep 17 00:00:00 2001 From: Kenneth Hoste Date: Thu, 2 Aug 2012 15:45:38 +0200 Subject: [PATCH 235/798] replace global log variable with self.log, which is consistent with e.g. Application (refs #7) --- easybuild/build.py | 3 +- easybuild/easyblocks/f/fsl.py | 5 ++- easybuild/tools/toolkit.py | 72 ++++++++++++++++++----------------- 3 files changed, 43 insertions(+), 37 deletions(-) diff --git a/easybuild/build.py b/easybuild/build.py index 2816fe9f84..d789c45af7 100644 --- a/easybuild/build.py +++ b/easybuild/build.py @@ -27,7 +27,8 @@ import time import copy import platform -import easybuild # required for VERBOSE_VERSION + +import easybuild # required for VERBOSE_VERSION from easybuild.framework.application import Application, get_instance from easybuild.tools.build_log import EasyBuildError, initLogger, \ removeLogHandler, print_msg diff --git a/easybuild/easyblocks/f/fsl.py b/easybuild/easyblocks/f/fsl.py index ab32c3cf97..a0edda78ab 100644 --- a/easybuild/easyblocks/f/fsl.py +++ b/easybuild/easyblocks/f/fsl.py @@ -22,6 +22,7 @@ import os import re import shutil + import easybuild.tools.environment as env from easybuild.framework.application import Application from easybuild.tools.filetools import run_cmd @@ -30,7 +31,9 @@ class FSL(Application): """Support for building and installing FSL.""" def __init__(self,*args,**kwargs): - Application.__init__(self, args,kwargs) + """Specify building in install dir, initialize custom variables.""" + + Application.__init__(self, *args, **kwargs) self.build_in_installdir = True diff --git a/easybuild/tools/toolkit.py b/easybuild/tools/toolkit.py index c5969a8ce9..1f6ee0b065 100644 --- a/easybuild/tools/toolkit.py +++ b/easybuild/tools/toolkit.py @@ -28,8 +28,6 @@ import easybuild.tools.environment as env -log = getLog('Toolkit') - # constant used for recognizing compilers, MPI libraries, ... GCC = "GCC" INTEL = "Intel" @@ -42,14 +40,18 @@ class Toolkit: """ def __init__(self, name, version): - """ Initialise toolkit name version """ + """ Initialise toolkit variables.""" + self.dependencies = [] self.vars = {} self.arch = None self.toolkit_deps = [] self.m32flag = '' - ## Option flags + # logger + self.log = getLog('Toolkit') + + # option flags self.opts = { 'usempi': False, 'cciscxx': False, 'pic': False, 'opt': False, 'noopt': False, 'lowopt': False, 'debug': False, 'optarch':True, @@ -88,7 +90,7 @@ def setOptions(self, options): if opt in self.opts: self.opts[opt] = options[opt] else: - log.warning("Undefined toolkit option %s specified." % opt) + self.log.warning("Undefined toolkit option %s specified." % opt) def getDependencyVersion(self, dependency): """ Generate a version string for a dependency on a module using this toolkit """ @@ -113,22 +115,22 @@ def getDependencyVersion(self, dependency): if len(matches) > 0: return matches[-1] else: - log.error('No toolkit version for dependency name %s (suffix %s) found' + self.log.error('No toolkit version for dependency name %s (suffix %s) found' % (dependency['name'], "%s%s" % (toolkit, suffix))) def addDependencies(self, dependencies): """ Verify if the given dependencies exist and add them """ mod = Modules() - log.debug("Adding toolkit dependencies") + self.log.debug("Adding toolkit dependencies") for dep in dependencies: if not 'tk' in dep: dep['tk'] = self.getDependencyVersion(dep) if not mod.exists(dep['name'], dep['tk']): - log.error('No module found for dependency %s/%s' % (dep['name'], dep['tk'])) + self.log.error('No module found for dependency %s/%s' % (dep['name'], dep['tk'])) else: self.dependencies.append(dep) - log.debug('Added toolkit dependency %s' % dep) + self.log.debug('Added toolkit dependency %s' % dep) def prepare(self, onlymod=None): """ @@ -141,13 +143,13 @@ def prepare(self, onlymod=None): (If string: comma separated list of variables that will be ignored). """ if not self._toolkitExists(): - log.error("No module found for toolkit name '%s' (%s)" % (self.name, self.version)) + self.log.error("No module found for toolkit name '%s' (%s)" % (self.name, self.version)) if self.name == 'dummy': if self.version == 'dummy': - log.info('Toolkit: dummy mode') + self.log.info('Toolkit: dummy mode') else: - log.info('Toolkit: dummy mode, but loading dependencies') + self.log.info('Toolkit: dummy mode, but loading dependencies') modules = Modules() modules.addModule(self.dependencies) modules.load() @@ -161,20 +163,20 @@ def prepare(self, onlymod=None): ## Determine direct toolkit dependencies, so we can prepare for them self.toolkit_deps = modules.dependencies_for(self.name, self.version, depth=1) - log.debug('List of direct toolkit dependencies: %s' % self.toolkit_deps) + self.log.debug('List of direct toolkit dependencies: %s' % self.toolkit_deps) ## Generate the variables to be set self._generate_variables() ## set the variables if not (onlymod == True): - log.debug("Variables being set: onlymod=%s" % onlymod) + self.log.debug("Variables being set: onlymod=%s" % onlymod) ## add LDFLAGS and CPPFLAGS from dependencies to self.vars self._addDependencyVariables() self._setVariables(onlymod) else: - log.debug("No variables set: onlymod=%s" % onlymod) + self.log.debug("No variables set: onlymod=%s" % onlymod) def _addDependencyVariables(self, names=None): """ Add LDFLAGS and CPPFLAGS to the self.vars based on the dependencies @@ -190,14 +192,14 @@ def _addDependencyVariables(self, names=None): for dep in deps: softwareRoot = get_software_root(dep['name']) if not softwareRoot: - log.error("%s was not found in environment (dep: %s)" % (dep['name'], dep)) + self.log.error("%s was not found in environment (dep: %s)" % (dep['name'], dep)) self._flagsForSubdirs(softwareRoot, cpp_paths, flag="-I%s", varskey="CPPFLAGS") self._flagsForSubdirs(softwareRoot, ld_paths, flag="-L%s", varskey="LDFLAGS") def _setVariables(self, dontset=None): """ Sets the environment variables """ - log.debug("Setting variables: dontset=%s" % dontset) + self.log.debug("Setting variables: dontset=%s" % dontset) dontsetlist = [] if type(dontset) == str: @@ -207,10 +209,10 @@ def _setVariables(self, dontset=None): for key, val in self.vars.items(): if key in dontsetlist: - log.debug("Not setting environment variable %s (value: %s)." % (key, val)) + self.log.debug("Not setting environment variable %s (value: %s)." % (key, val)) continue - log.debug("Setting environment variable %s to %s" % (key, val)) + self.log.debug("Setting environment variable %s to %s" % (key, val)) env.set(key, val) # also set unique named variables that can be used in Makefiles @@ -227,10 +229,10 @@ def _getOptimalArchitecture(self): self.arch = systemtools.get_cpu_vendor() if self.arch in optarchs: optarch = optarchs[self.arch] - log.info("Using %s as optarch for %s." % (optarch, self.arch)) + self.log.info("Using %s as optarch for %s." % (optarch, self.arch)) return optarch else: - log.error("Don't know how to set optarch for %s." % self.arch) + self.log.error("Don't know how to set optarch for %s." % self.arch) def _generate_variables(self): @@ -274,9 +276,9 @@ def _generate_variables(self): for meth_key in meth_keys: if meth_key.endswith("_%s" % self.name): depnames.append(self.name) - log.debug("Going to add preparation function for toolkit %s itself also" % self.name) + self.log.debug("Going to add preparation function for toolkit %s itself also" % self.name) break - log.debug("depnames: %s" % depnames) + self.log.debug("depnames: %s" % depnames) # figure out which preparation functions we need to run based on toolkit dependencies preparation_functions = {} @@ -293,9 +295,9 @@ def _generate_variables(self): for depname in copy.copy(depnames): if depname in found_meths: depnames.remove(depname) - log.error("Unable to find preparation functions for these toolkit dependencies: %s" % depnames) + self.log.error("Unable to find preparation functions for these toolkit dependencies: %s" % depnames) - log.debug("List of preparation functions: %s" % preparation_functions) + self.log.debug("List of preparation functions: %s" % preparation_functions) self.vars["LDFLAGS"] = '' self.vars["CPPFLAGS"] = '' @@ -311,7 +313,7 @@ def prepareACML(self): """ if self.opts['32bit']: - log.error("ERROR: 32-bit not supported (yet) for ACML.") + self.log.error("ERROR: 32-bit not supported (yet) for ACML.") self._addDependencyVariables(['ACML']) @@ -320,7 +322,7 @@ def prepareACML(self): elif self.toolkit_comp_family() == INTEL: compiler = 'ifort' else: - log.error("Don't know which compiler-specific subdir for ACML to use.") + self.log.error("Don't know which compiler-specific subdir for ACML to use.") self.vars['LDFLAGS'] += " -L%(acml)s/%(comp)s64/lib/ " % { # "%(acml)s/%(comp)s64/lib/libacml.a -lpthread" % { 'comp':compiler, @@ -383,7 +385,7 @@ def prepareGCC(self, withMPI=True): """ if self.opts['32bit']: - log.error("ERROR: 32-bit not supported yet for GCC based toolkits.") + self.log.error("ERROR: 32-bit not supported yet for GCC based toolkits.") # set basic GCC options self.vars['CC'] = 'gcc %s' % self.m32flag @@ -514,7 +516,7 @@ def prepareIMKL(self): mklRoot = os.getenv('MKLROOT') if not mklRoot: - log.error("MKLROOT not found in environment") + self.log.error("MKLROOT not found in environment") # For more inspiration: see http://software.intel.com/en-us/articles/intel-mkl-link-line-advisor/ @@ -569,7 +571,7 @@ def prepareIMKL(self): mklcpp = ['include', 'include/fftw'] else: if self.opts['32bit']: - log.error("32-bit libraries not supported yet for IMKL v%s (> v10.3)" % os.environ("SOFTROOTIMKL")) + self.log.error("32-bit libraries not supported yet for IMKL v%s (> v10.3)" % os.environ("SOFTROOTIMKL")) mklld = ['lib/intel64', 'mkl/lib/intel64'] mklcpp = ['mkl/include', 'mkl/include/fftw'] @@ -659,7 +661,7 @@ def prepareMPICH2(self): for i in ['CC', 'CXX', 'F77', 'F90']: self.vars[i] = self.vars["MPI%s" % i] else: - log.error("Don't know how to prepare for a non-ScaleMP MPICH2 library.") + self.log.error("Don't know how to prepare for a non-ScaleMP MPICH2 library.") def prepareSimpleMPI(self): """ @@ -744,7 +746,7 @@ def _flagsForSubdirs(self, base, subdirs, flag="-L%s", varskey=None): if os.path.isdir(directory): flags.append(flag % directory) else: - log.warning("Directory %s was not found" % directory) + self.log.warning("Directory %s was not found" % directory) if not varskey in self.vars: self.vars[varskey] = '' @@ -763,7 +765,7 @@ def det_toolkit_type(self, name, type_map): if match: return tk_type - log.error("Failed to determine %s based on toolkit dependencies." % name) + self.log.error("Failed to determine %s based on toolkit dependencies." % name) def toolkit_comp_family(self): """Determine compiler family based on toolkit dependencies.""" @@ -783,7 +785,7 @@ def get_openmp_flag(self): elif self.toolkit_comp_family() == GCC: return "-fopenmp" else: - log.error("Can't determine compiler flag for OpenMP.") + self.log.error("Can't determine compiler flag for OpenMP.") def toolkit_mpi_type(self): """Determine type of MPI library based on toolkit dependencies.""" @@ -848,4 +850,4 @@ def mpi_cmd_for(self, cmd, nr_ranks): if mpi_type in mpi_cmds.keys(): return mpi_cmds[mpi_type] % params else: - log.error("Don't know how to create an MPI command for MPI library of type '%s'." % mpi_type) + self.log.error("Don't know how to create an MPI command for MPI library of type '%s'." % mpi_type) From 1fffe44304da0cedf9e0b13d1eaba9e7c5de0450 Mon Sep 17 00:00:00 2001 From: Kenneth Hoste Date: Thu, 2 Aug 2012 15:47:00 +0200 Subject: [PATCH 236/798] processed AGs and TWs remarks in pull request --- .../f/FSL/FSL-4.1.9-goalf-1.1.0-no-OFED.eb | 16 ++--- .../g/goalf/goalf-1.1.0-no-OFED.eb | 63 ++++++++++--------- 2 files changed, 40 insertions(+), 39 deletions(-) diff --git a/easybuild/easyconfigs/f/FSL/FSL-4.1.9-goalf-1.1.0-no-OFED.eb b/easybuild/easyconfigs/f/FSL/FSL-4.1.9-goalf-1.1.0-no-OFED.eb index e989116d1b..65f7891e1f 100644 --- a/easybuild/easyconfigs/f/FSL/FSL-4.1.9-goalf-1.1.0-no-OFED.eb +++ b/easybuild/easyconfigs/f/FSL/FSL-4.1.9-goalf-1.1.0-no-OFED.eb @@ -1,15 +1,15 @@ -name='FSL' -version='4.1.9' +name = 'FSL' +version = '4.1.9' -homepage='http://www.fmrib.ox.ac.uk/fsl/' -description="""FSL is a comprehensive library of analysis tools for FMRI, MRI and DTI brain imaging data.""" +homepage = 'http://www.fmrib.ox.ac.uk/fsl/' +description = """FSL is a comprehensive library of analysis tools for FMRI, MRI and DTI brain imaging data.""" -toolkit={'name':'goalf','version':'1.1.0-no-OFED'} +toolkit = {'name':'goalf', 'version':'1.1.0-no-OFED'} -sourceURLs=["http://www.fmrib.ox.ac.uk/fsldownloads/"] -sources=['%s-%s-sources.tar.gz' % (name.lower(), version)] +sourceURLs = ["http://www.fmrib.ox.ac.uk/fsldownloads/"] +sources = ['%s-%s-sources.tar.gz' % (name.lower(), version)] -patches=['FSL_makefile_fixes.patch'] +patches = ['FSL_makefile_fixes.patch'] # libX11-devel is required for X11/Xlib.h, required by tk build osdependencies=['libX11-devel'] diff --git a/easybuild/easyconfigs/g/goalf/goalf-1.1.0-no-OFED.eb b/easybuild/easyconfigs/g/goalf/goalf-1.1.0-no-OFED.eb index e08a7f0c21..b67541e2ec 100644 --- a/easybuild/easyconfigs/g/goalf/goalf-1.1.0-no-OFED.eb +++ b/easybuild/easyconfigs/g/goalf/goalf-1.1.0-no-OFED.eb @@ -1,41 +1,42 @@ -easyblock="Toolkit" +easyblock = "Toolkit" -name='goalf' -version='1.1.0' -versionsuffix='-no-OFED' +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.""" +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'} +toolkit = {'name':'dummy', 'version':'dummy'} -compname='GCC' -compver='4.6.3' -comp='%s-%s' % (compname, compver) +compname = 'GCC' +compver = '4.6.3' +comp = '%s-%s' % (compname, compver) -mpilib='OpenMPI' -mpiver='1.4.5' -mpisuff='-no-OFED' -mpi='%s-%s%s' % (mpilib, mpiver, mpisuff) +mpilib = 'OpenMPI' +mpiver = '1.4.5' +mpisuff = '-no-OFED' +mpi = '%s-%s%s' % (mpilib, mpiver, mpisuff) -blaslib='ATLAS' -blasver='3.8.4' -blas='%s-%s'%(blaslib, blasver) +blaslib = 'ATLAS' +blasver = '3.8.4' +blas = '%s-%s'%(blaslib, blasver) -lapacklib='LAPACK' -lapackver='3.4.0' -lapack='%s-%s'%(lapacklib, lapackver) +lapacklib = 'LAPACK' +lapackver = '3.4.0' +lapack = '%s-%s' % (lapacklib, lapackver) -blacsver='1.1' +blacsver = '1.1' ## compiler toolkit depencies -dependencies=[(compname, compver), - (mpilib, mpiver, '-%s%s'%(comp,mpisuff)), - (blaslib, blasver, '-%s-%s'%(comp,lapack)), - (lapacklib, lapackver, '-%s'%comp), - ('FFTW', '3.3.1', '-%s-%s'%(comp,mpi)), - ('BLACS', blacsver, '-%s-%s'%(comp,mpi)), - ('ScaLAPACK','1.8.0', '-%s-%s-%s-%s-BLACS-%s'%(comp,mpi,blas,lapack,blacsver)) - ] - -moduleclass='compiler' +dependencies = [(compname, compver), + (mpilib, mpiver, '-%s%s' % (comp, mpisuff)), + (blaslib, blasver, '-%s-%s' % (comp, lapack)), + (lapacklib, lapackver, '-%s' % comp), + ('FFTW', '3.3.1', '-%s-%s' % (comp, mpi)), + ('BLACS', blacsver, '-%s-%s' % (comp, mpi)), + ('ScaLAPACK','1.8.0', '-%s-%s-%s-%s-BLACS-%s' % (comp, mpi, blas, lapack, blacsver)) + ] + +moduleclass = 'compiler' From 8677de063056458d7e179d03f3a691216bb4a1dc Mon Sep 17 00:00:00 2001 From: Kenneth Hoste Date: Thu, 2 Aug 2012 15:54:56 +0200 Subject: [PATCH 237/798] clean up recursively determining dependencies, fix bug when depth was set to 0 (which resulted in infinite recursion) --- easybuild/tools/modules.py | 16 +++++++--------- 1 file changed, 7 insertions(+), 9 deletions(-) diff --git a/easybuild/tools/modules.py b/easybuild/tools/modules.py index 36747509d2..eff185f3ac 100644 --- a/easybuild/tools/modules.py +++ b/easybuild/tools/modules.py @@ -24,6 +24,7 @@ import os import re import subprocess +import sys from easybuild.tools.build_log import getLog, initLogger, EasyBuildError from easybuild.tools.filetools import convertName, run_cmd @@ -233,7 +234,8 @@ def loaded_modules(self): return loaded_modules - def dependencies_for(self, name, version, depth=-1): + # depth=sys.maxint should be equivalent to infinite recursion depth + def dependencies_for(self, name, version, depth=sys.maxint): """ Obtain a list of dependencies for the given module, determined recursively, up to a specified depth (optionally) """ @@ -250,16 +252,12 @@ def dependencies_for(self, name, version, depth=-1): loadregex = re.compile("^\s+module load\s+(.*)$", re.M) mods = [mod.split('/') for mod in loadregex.findall(modtxt)] - depth = depth - 1 if depth > 0: - # recursively determine dependencies for these dependency modules - moddeps = [self.dependencies_for(modname, modversion, depth=depth) for (modname, modversion) in mods] - elif depth==0: - # stop recursion - moddeps = [] + # recursively determine dependencies for these dependency modules, until depth is non-positive + moddeps = [self.dependencies_for(modname, modversion, depth=depth-1) for (modname, modversion) in mods] else: - # recursively determine dependencies for dependency modules until all dependencies are resolved (no or negative depth given) - moddeps = [self.dependencies_for(modname, modversion) for (modname, modversion) in mods] + # ignore any deeper dependencies + moddeps = [] deps = [{'name':modname, 'version':modversion} for (modname, modversion) in mods] From 430ce29473c24494b7f5d270d3c243a2dda758da Mon Sep 17 00:00:00 2001 From: Kenneth Hoste Date: Thu, 2 Aug 2012 16:02:03 +0200 Subject: [PATCH 238/798] fix patch file for building FSL with icc --- .../f/FSL/FSL_icc_nan-inf_fix.patch | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) diff --git a/easybuild/easyconfigs/f/FSL/FSL_icc_nan-inf_fix.patch b/easybuild/easyconfigs/f/FSL/FSL_icc_nan-inf_fix.patch index 84fa1bbcfd..05dcb9ff27 100644 --- a/easybuild/easyconfigs/f/FSL/FSL_icc_nan-inf_fix.patch +++ b/easybuild/easyconfigs/f/FSL/FSL_icc_nan-inf_fix.patch @@ -1,3 +1,21 @@ +diff -ru fsl.orig/extras/src/cprob/const.c fsl/extras/src/cprob/const.c +--- fsl.orig/extras/src/cprob/const.c 2006-08-21 18:47:10.000000000 +0200 ++++ fsl/extras/src/cprob/const.c 2012-08-02 15:58:31.812167292 +0200 +@@ -89,12 +89,12 @@ + double THPIO4 = 2.35619449019234492885; /* 3*pi/4 */ + double TWOOPI = 6.36619772367581343075535E-1; /* 2/pi */ + #ifdef INFINITIES +-double INFINITY = 1.0/0.0; /* 99e999; */ ++double INFINITY = __builtin_inff(); + #else + double INFINITY = 1.79769313486231570815E308; /* 2**1024*(1-MACHEP) */ + #endif + #ifdef NANS +-double NAN = 1.0/0.0 - 1.0/0.0; ++double NAN = __builtin_nanf(""); + #else + double NAN = 0.0; + #endif diff -ru fsl.orig/src/fslview/fsl/cprob/const.c fsl/src/fslview/fsl/cprob/const.c --- fsl.orig/src/fslview/fsl/cprob/const.c 2006-08-21 18:47:10.000000000 +0200 +++ fsl/src/fslview/fsl/cprob/const.c 2012-08-02 15:18:48.404398489 +0200 From 1a780fcc292522a4c71ec632092b10c4f4da4816 Mon Sep 17 00:00:00 2001 From: Toon Willems Date: Thu, 2 Aug 2012 16:29:42 +0200 Subject: [PATCH 239/798] output build-stats on succes --- easybuild/framework/application.py | 19 ++++++++++++++++ easybuild/test/build.py | 35 ++++++++++++++++++++++++++---- 2 files changed, 50 insertions(+), 4 deletions(-) diff --git a/easybuild/framework/application.py b/easybuild/framework/application.py index 96ad6bd594..1a45599608 100644 --- a/easybuild/framework/application.py +++ b/easybuild/framework/application.py @@ -1154,6 +1154,25 @@ def make_module_extra_packages(self): def installversion(self): return self.cfg.installversion() + def installsize(self): + installsize = 0 + try: + # change to home dir, to avoid that cwd no longer exists + os.chdir(os.getenv('HOME')) + + # walk install dir to determine total size + for dirpath, _, filenames in os.walk(self.installdir): + for filename in filenames: + fullpath = os.path.join(dirpath, filename) + if os.path.exists(fullpath): + installsize += os.path.getsize(fullpath) + except OSError, err: + self.log.warn("could not determine installsize") + + return installsize + + + def packages(self): """ After make install, run this. diff --git a/easybuild/test/build.py b/easybuild/test/build.py index 36b81cf86c..d6c3c0c5d9 100644 --- a/easybuild/test/build.py +++ b/easybuild/test/build.py @@ -19,6 +19,7 @@ # along with EasyBuild. If not, see . ## import copy +import platform import os import re import sys @@ -36,6 +37,7 @@ import easybuild import easybuild.tools.config as config +import easybuild.tools.systemtools as systemtools class BuildTest(TestCase): @@ -74,6 +76,7 @@ def setUp(self): config.init('easybuild/easybuild_config.py') self.test_results = [] self.build_stopped = {} + self.succes = [] self.cur_dir = os.getcwd() self.log = getLog("BuildTest") @@ -217,6 +220,7 @@ def runTest(self): base_env = copy.deepcopy(os.environ) for app in self.apps: + start_time = time.time() # start with a clean slate os.chdir(base_dir) modifyEnv(os.environ, base_env) @@ -240,13 +244,26 @@ def runTest(self): self.performStep('sanity check', app, lambda x: x.sanitycheck()) self.performStep('cleanup', app, lambda x: x.cleanup()) + if app not in self.build_stopped: + # gather build stats + build_time = round(time.time() - start_time, 2) + + buildstats = {'build_time': build_time, + 'platform': platform.platform(), + 'core_count': systemtools.get_core_count(), + 'cpu_model': systemtools.get_cpu_model(), + 'install_size': app.installsize(), + 'timestamp': int(time.time()), + 'host': os.uname()[1], + } + self.succes.append((app, buildstats)) + for result in self.test_results: self.log.info("%s crashed with an error during fase: %s, error: %s" % result) failed = len(self.build_stopped) total = len(self.apps) - succes = [app for app in self.apps if app not in self.build_stopped] self.log.info("%s from %s packages failed to build!" % (failed, total)) @@ -257,7 +274,7 @@ def runTest(self): filename = os.path.join(self.cur_dir, filename) self.log.debug("writing xml output to %s" % filename) - write_to_xml(succes, self.test_results, filename) + write_to_xml(self.succes, self.test_results, filename) # exit with non-zero exit-code when not build_ok if not self.build_ok: @@ -286,6 +303,16 @@ def create_failure(name, error_type, error): el.appendChild(failure_el) el.lastChild.appendChild(error_text) return el + + def create_succes(name, stats): + el = create_testcase(name) + text = "\n".join(["%s=%s" % (key, value) for (key, value) in stats.items()]) + build_stats = root.createCDATASection("\n%s\n" % text) + system_out = root.createElement("system-out") + el.appendChild(system_out) + el.lastChild.appendChild(build_stats) + return el + properties = root.createElement("properties") version = root.createElement("property") version.setAttribute("name", "easybuild-version") @@ -308,8 +335,8 @@ def create_failure(name, error_type, error): root.firstChild.appendChild(el) - for obj in succes: - el = create_testcase("%s/%s" % (obj.name(), obj.installversion())) + for (obj, stats) in succes: + el = create_succes("%s/%s" % (obj.name(), obj.installversion()), stats) root.firstChild.appendChild(el) output_file = open(filename, "w") From 994639140badd5e19d7081ceb5112e59dd11743f Mon Sep 17 00:00:00 2001 From: Toon Willems Date: Thu, 2 Aug 2012 16:33:15 +0200 Subject: [PATCH 240/798] change constructor --- easybuild/test/build.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/easybuild/test/build.py b/easybuild/test/build.py index d6c3c0c5d9..f11bd93390 100644 --- a/easybuild/test/build.py +++ b/easybuild/test/build.py @@ -158,7 +158,7 @@ def submit_jobs(self, files): command = "cd %s && python %s %s" % (self.cur_dir, sys.argv[0], easyconfig) self.log.debug("submitting: %s" % command) self.log.debug("env vars set: %s" % easybuild_vars) - job = PbsJob(command, easybuild_vars, easyconfig) + job = PbsJob(command, easyconfig, easybuild_vars) try: job.submit() self.jobs.append(job) From 86997394320cd0fffafd2d49b9f26000ad68407f Mon Sep 17 00:00:00 2001 From: Kenneth Hoste Date: Fri, 3 Aug 2012 06:30:11 +0200 Subject: [PATCH 241/798] build in make, also when we're building in install dir --- easybuild/easyblocks/f/fsl.py | 8 ++++---- easybuild/easyblocks/w/wps.py | 1 + easybuild/easyblocks/w/wrf.py | 3 ++- 3 files changed, 7 insertions(+), 5 deletions(-) diff --git a/easybuild/easyblocks/f/fsl.py b/easybuild/easyblocks/f/fsl.py index a0edda78ab..e6e8efb07f 100644 --- a/easybuild/easyblocks/f/fsl.py +++ b/easybuild/easyblocks/f/fsl.py @@ -69,10 +69,6 @@ def configure(self): self.log.error("Failed to copy closest matching config dir: %s" % err) def make(self): - """Building is performed in make_install.""" - pass - - def make_install(self): """Build FSL using supplied script.""" cmd = ". %s/etc/fslconf/fsl.sh && ./build" % self.fsldir @@ -88,6 +84,10 @@ def make_install(self): if error_regexp.search(txt): self.log.error("Error detected in build log %s." % buildlog) + def make_install(self): + """Building was performed in install dir, no explicit install step required.""" + pass + def make_module_req_guess(self): """Set correct PATH and LD_LIBRARY_PATH variables.""" diff --git a/easybuild/easyblocks/w/wps.py b/easybuild/easyblocks/w/wps.py index 8eba699d34..33bea6d5c4 100644 --- a/easybuild/easyblocks/w/wps.py +++ b/easybuild/easyblocks/w/wps.py @@ -300,6 +300,7 @@ def run_wps_cmd(cmdname): # installing is done in make, so we can run tests def make_install(self): + """Building was done in install dir, so just do some cleanup here.""" # make sure JASPER environment variables are unset env_vars = ['JASPERINC', 'JASPERLIB'] diff --git a/easybuild/easyblocks/w/wrf.py b/easybuild/easyblocks/w/wrf.py index 6eaa5f6da3..1c9178aed6 100644 --- a/easybuild/easyblocks/w/wrf.py +++ b/easybuild/easyblocks/w/wrf.py @@ -309,8 +309,9 @@ def run_test(): except OSError, err: self.log.error("An error occured when running test %s: %s" % (test, err)) - # installing is done in make, so we can run tests + # building/installing is done in make, so we can run tests def make_install(self): + """Building was done in install dir, so nothing to do in make_install.""" pass def sanitycheck(self): From 342ddefd9c27d618d7773d02cae367b427e411a1 Mon Sep 17 00:00:00 2001 From: Kenneth Hoste Date: Fri, 3 Aug 2012 07:06:14 +0200 Subject: [PATCH 242/798] use empty line between Python and EasyBuild imports everywhere --- easybuild/easyblocks/a/atlas.py | 1 + easybuild/easyblocks/b/binary.py | 2 +- easybuild/easyblocks/b/blacs.py | 1 + easybuild/easyblocks/c/cp2k.py | 1 + easybuild/easyblocks/f/fsl.py | 1 + easybuild/easyblocks/g/g2clib.py | 1 + easybuild/easyblocks/g/g2lib.py | 1 + easybuild/easyblocks/h/hdf5.py | 1 + easybuild/easyblocks/h/hpl.py | 1 + easybuild/easyblocks/i/icc.py | 1 - easybuild/easyblocks/i/imkl.py | 2 -- easybuild/easyblocks/i/impi.py | 1 - easybuild/easyblocks/i/intelbase.py | 1 + easybuild/easyblocks/l/lapack.py | 1 + easybuild/easyblocks/l/libsmm.py | 3 ++- easybuild/easyblocks/m/maple.py | 1 + easybuild/easyblocks/m/mrbayes.py | 1 + easybuild/easyblocks/m/mvapich2.py | 1 + easybuild/easyblocks/n/ncl.py | 1 + easybuild/easyblocks/n/netcdf.py | 1 + easybuild/easyblocks/n/netcdf_fortran.py | 1 + easybuild/easyblocks/p/python.py | 1 + easybuild/easyblocks/s/scalapack.py | 1 + easybuild/easyblocks/t/tarball.py | 1 + easybuild/easyblocks/t/tbb.py | 4 ++-- easybuild/easyblocks/w/wps.py | 1 + easybuild/easyblocks/w/wrf.py | 1 + 27 files changed, 26 insertions(+), 8 deletions(-) diff --git a/easybuild/easyblocks/a/atlas.py b/easybuild/easyblocks/a/atlas.py index 8dbb06fcec..c2c8fa4046 100644 --- a/easybuild/easyblocks/a/atlas.py +++ b/easybuild/easyblocks/a/atlas.py @@ -20,6 +20,7 @@ ## import re import os + from easybuild.framework.application import Application from easybuild.tools.filetools import run_cmd diff --git a/easybuild/easyblocks/b/binary.py b/easybuild/easyblocks/b/binary.py index e4e83ccd51..85a5eea026 100644 --- a/easybuild/easyblocks/b/binary.py +++ b/easybuild/easyblocks/b/binary.py @@ -22,7 +22,7 @@ EasyBlock for binary applications """ import shutil -import os + from easybuild.framework.application import Application class Binary(Application): diff --git a/easybuild/easyblocks/b/blacs.py b/easybuild/easyblocks/b/blacs.py index 7a89dd8ed8..96b0cf2403 100644 --- a/easybuild/easyblocks/b/blacs.py +++ b/easybuild/easyblocks/b/blacs.py @@ -22,6 +22,7 @@ import re import os import shutil + from easybuild.framework.application import Application from easybuild.tools.filetools import run_cmd diff --git a/easybuild/easyblocks/c/cp2k.py b/easybuild/easyblocks/c/cp2k.py index c22932ca22..19f7605aba 100644 --- a/easybuild/easyblocks/c/cp2k.py +++ b/easybuild/easyblocks/c/cp2k.py @@ -25,6 +25,7 @@ import os import shutil import sys + from easybuild.framework.application import Application from easybuild.tools.filetools import run_cmd import easybuild.tools.toolkit as toolkit diff --git a/easybuild/easyblocks/f/fsl.py b/easybuild/easyblocks/f/fsl.py index 061da85eb3..1179f02cc5 100644 --- a/easybuild/easyblocks/f/fsl.py +++ b/easybuild/easyblocks/f/fsl.py @@ -21,6 +21,7 @@ import difflib import os import shutil + import easybuild.tools.environment as env from easybuild.framework.application import Application from easybuild.tools.filetools import run_cmd diff --git a/easybuild/easyblocks/g/g2clib.py b/easybuild/easyblocks/g/g2clib.py index beaebb2a24..597197b490 100644 --- a/easybuild/easyblocks/g/g2clib.py +++ b/easybuild/easyblocks/g/g2clib.py @@ -21,6 +21,7 @@ import glob import os import shutil + from easybuild.framework.application import Application class G2clib(Application): diff --git a/easybuild/easyblocks/g/g2lib.py b/easybuild/easyblocks/g/g2lib.py index 9cc357ba00..edf63dfc38 100644 --- a/easybuild/easyblocks/g/g2lib.py +++ b/easybuild/easyblocks/g/g2lib.py @@ -20,6 +20,7 @@ ## import os import shutil + from easybuild.framework.application import Application class G2lib(Application): diff --git a/easybuild/easyblocks/h/hdf5.py b/easybuild/easyblocks/h/hdf5.py index 61aaebba79..47754e67bb 100644 --- a/easybuild/easyblocks/h/hdf5.py +++ b/easybuild/easyblocks/h/hdf5.py @@ -19,6 +19,7 @@ # along with EasyBuild. If not, see . ## import os + from easybuild.framework.application import Application class HDF5(Application): diff --git a/easybuild/easyblocks/h/hpl.py b/easybuild/easyblocks/h/hpl.py index 8b09476cb1..0c65b88edb 100644 --- a/easybuild/easyblocks/h/hpl.py +++ b/easybuild/easyblocks/h/hpl.py @@ -20,6 +20,7 @@ ## import os import shutil + from easybuild.framework.application import Application from easybuild.tools.filetools import run_cmd diff --git a/easybuild/easyblocks/i/icc.py b/easybuild/easyblocks/i/icc.py index 937adad643..897ef37722 100644 --- a/easybuild/easyblocks/i/icc.py +++ b/easybuild/easyblocks/i/icc.py @@ -20,7 +20,6 @@ ## import os - from distutils.version import LooseVersion from easybuild.easyblocks.i.intelbase import IntelBase diff --git a/easybuild/easyblocks/i/imkl.py b/easybuild/easyblocks/i/imkl.py index 825881f75f..82ccd073a3 100644 --- a/easybuild/easyblocks/i/imkl.py +++ b/easybuild/easyblocks/i/imkl.py @@ -22,13 +22,11 @@ import os import shutil import tempfile - from distutils.version import LooseVersion from easybuild.easyblocks.i.intelbase import IntelBase from easybuild.tools.filetools import run_cmd from easybuild.tools.modules import Modules - import easybuild.tools.environment as env class Imkl(IntelBase): diff --git a/easybuild/easyblocks/i/impi.py b/easybuild/easyblocks/i/impi.py index 91c9d9e7f7..dce79f702c 100644 --- a/easybuild/easyblocks/i/impi.py +++ b/easybuild/easyblocks/i/impi.py @@ -20,7 +20,6 @@ ## import os - from distutils.version import LooseVersion from easybuild.easyblocks.i.intelbase import IntelBase diff --git a/easybuild/easyblocks/i/intelbase.py b/easybuild/easyblocks/i/intelbase.py index 70c03ce5ef..a3ac5816b3 100644 --- a/easybuild/easyblocks/i/intelbase.py +++ b/easybuild/easyblocks/i/intelbase.py @@ -20,6 +20,7 @@ ## import os import shutil + from easybuild.framework.application import Application from easybuild.tools.filetools import run_cmd import easybuild.tools.environment as env diff --git a/easybuild/easyblocks/l/lapack.py b/easybuild/easyblocks/l/lapack.py index b45829b92a..58438f9e30 100644 --- a/easybuild/easyblocks/l/lapack.py +++ b/easybuild/easyblocks/l/lapack.py @@ -21,6 +21,7 @@ import glob import os import shutil + from easybuild.framework.application import Application from easybuild.tools.filetools import run_cmd diff --git a/easybuild/easyblocks/l/libsmm.py b/easybuild/easyblocks/l/libsmm.py index c63d361a9a..a699610263 100644 --- a/easybuild/easyblocks/l/libsmm.py +++ b/easybuild/easyblocks/l/libsmm.py @@ -21,7 +21,8 @@ import os import shutil from distutils.version import LooseVersion -import easybuild + +import easybuild # required for VERBOSE_VERSION from easybuild.framework.application import Application from easybuild.tools.filetools import run_cmd from easybuild.tools.modules import get_software_root diff --git a/easybuild/easyblocks/m/maple.py b/easybuild/easyblocks/m/maple.py index 04ca5ef020..fdb586cae6 100644 --- a/easybuild/easyblocks/m/maple.py +++ b/easybuild/easyblocks/m/maple.py @@ -20,6 +20,7 @@ ## import os import shutil + from easybuild.framework.application import Application from easybuild.tools.filetools import run_cmd_qa diff --git a/easybuild/easyblocks/m/mrbayes.py b/easybuild/easyblocks/m/mrbayes.py index 8181ad8dd9..40f64ce821 100644 --- a/easybuild/easyblocks/m/mrbayes.py +++ b/easybuild/easyblocks/m/mrbayes.py @@ -22,6 +22,7 @@ import os import shutil from distutils.version import LooseVersion + from easybuild.framework.application import Application from easybuild.tools.filetools import run_cmd diff --git a/easybuild/easyblocks/m/mvapich2.py b/easybuild/easyblocks/m/mvapich2.py index 6d08799024..d2d976bc5c 100644 --- a/easybuild/easyblocks/m/mvapich2.py +++ b/easybuild/easyblocks/m/mvapich2.py @@ -19,6 +19,7 @@ # along with EasyBuild. If not, see . ## import os + from easybuild.framework.application import Application import easybuild.tools.environment as env diff --git a/easybuild/easyblocks/n/ncl.py b/easybuild/easyblocks/n/ncl.py index 153d418d58..c4030e960a 100644 --- a/easybuild/easyblocks/n/ncl.py +++ b/easybuild/easyblocks/n/ncl.py @@ -23,6 +23,7 @@ import os import re import sys + from easybuild.framework.application import Application from easybuild.tools.filetools import run_cmd from easybuild.tools.modules import get_software_root diff --git a/easybuild/easyblocks/n/netcdf.py b/easybuild/easyblocks/n/netcdf.py index 63b30cfede..f7b515e256 100644 --- a/easybuild/easyblocks/n/netcdf.py +++ b/easybuild/easyblocks/n/netcdf.py @@ -20,6 +20,7 @@ ## import os from distutils.version import LooseVersion + from easybuild.framework.application import Application import easybuild.tools.environment as env import easybuild.tools.toolkit as toolkit diff --git a/easybuild/easyblocks/n/netcdf_fortran.py b/easybuild/easyblocks/n/netcdf_fortran.py index a1e9c8a4f3..057ee3139d 100644 --- a/easybuild/easyblocks/n/netcdf_fortran.py +++ b/easybuild/easyblocks/n/netcdf_fortran.py @@ -19,6 +19,7 @@ # along with EasyBuild. If not, see . ## import os + from easybuild.framework.application import Application import easybuild.tools.environment as env import easybuild.tools.toolkit as toolkit diff --git a/easybuild/easyblocks/p/python.py b/easybuild/easyblocks/p/python.py index 9eda703000..3a8c78895a 100644 --- a/easybuild/easyblocks/p/python.py +++ b/easybuild/easyblocks/p/python.py @@ -20,6 +20,7 @@ ## import os import shutil + from easybuild.framework.application import ApplicationPackage, Application from easybuild.tools.filetools import unpack, patch, run_cmd import easybuild.tools.toolkit as toolkit diff --git a/easybuild/easyblocks/s/scalapack.py b/easybuild/easyblocks/s/scalapack.py index 248db50eba..c6267ac9ef 100644 --- a/easybuild/easyblocks/s/scalapack.py +++ b/easybuild/easyblocks/s/scalapack.py @@ -21,6 +21,7 @@ import os import shutil from distutils.version import LooseVersion + from easybuild.framework.application import Application from easybuild.easyblocks.b.blacs import det_interface from easybuild.easyblocks.l.lapack import get_blas_lib diff --git a/easybuild/easyblocks/t/tarball.py b/easybuild/easyblocks/t/tarball.py index 6388ab0011..7bf5a5cfbe 100644 --- a/easybuild/easyblocks/t/tarball.py +++ b/easybuild/easyblocks/t/tarball.py @@ -19,6 +19,7 @@ # along with EasyBuild. If not, see . ## import shutil + from easybuild.framework.application import Application class Tarball(Application): diff --git a/easybuild/easyblocks/t/tbb.py b/easybuild/easyblocks/t/tbb.py index 891f1f1002..48c0c92e87 100644 --- a/easybuild/easyblocks/t/tbb.py +++ b/easybuild/easyblocks/t/tbb.py @@ -22,6 +22,7 @@ import os import shutil import glob + from easybuild.easyblocks.i.intelbase import IntelBase class Tbb(IntelBase): @@ -38,7 +39,7 @@ def make_install(self): libglob = 'tbb/libs/intel64/cc*libc*_kernel*' libs = glob.glob(libglob) if len(libs): - libdir = libs[-1] # take the last one, should be ordered by cc version. + libdir = libs[-1] # take the last one, should be ordered by cc version. else: self.log.error("No libs found using %s in %s" % (libglob, self.installdir)) self.libdir = libdir @@ -67,7 +68,6 @@ def make_module_extra(self): """Add correct path to lib to LD_LIBRARY_PATH. and intel license file""" txt = IntelBase.make_module_extra(self) - # since we have symlinked it we could also use $SOFTROOTTBB/tbb/lib here txt += "prepend-path\t%s\t\t%s\n" % ('LD_LIBRARY_PATH', self.libpath) return txt diff --git a/easybuild/easyblocks/w/wps.py b/easybuild/easyblocks/w/wps.py index 8eba699d34..dbeb9e6a15 100644 --- a/easybuild/easyblocks/w/wps.py +++ b/easybuild/easyblocks/w/wps.py @@ -25,6 +25,7 @@ import shutil import sys import tempfile + from easybuild.framework.application import Application from easybuild.tools.filetools import patch_perl_script_autoflush, run_cmd, run_cmd_qa, unpack from easybuild.easyblocks.n.netcdf import set_netcdf_env_vars, get_netcdf_module_set_cmds diff --git a/easybuild/easyblocks/w/wrf.py b/easybuild/easyblocks/w/wrf.py index 6eaa5f6da3..4a4ac84e07 100644 --- a/easybuild/easyblocks/w/wrf.py +++ b/easybuild/easyblocks/w/wrf.py @@ -22,6 +22,7 @@ import os import re import sys + from easybuild.framework.application import Application from easybuild.tools.filetools import patch_perl_script_autoflush, run_cmd, run_cmd_qa from easybuild.easyblocks.n.netcdf import set_netcdf_env_vars, get_netcdf_module_set_cmds From 2ab154cbc5d4deb5fcfd669dfb0ac1e1aa60d494 Mon Sep 17 00:00:00 2001 From: Kenneth Hoste Date: Fri, 3 Aug 2012 07:09:55 +0200 Subject: [PATCH 243/798] process remarks made on pull request --- easybuild/easyblocks/p/pasha.py | 13 +++++----- easybuild/easyblocks/t/tbb.py | 6 ++--- .../Pasha/Pasha-1.0.3-goalf-1.1.0-no-OFED.eb | 24 ++++++++--------- .../p/Pasha/Pasha-1.0.3-ictce-4.0.6.eb | 26 +++++++++---------- 4 files changed, 35 insertions(+), 34 deletions(-) diff --git a/easybuild/easyblocks/p/pasha.py b/easybuild/easyblocks/p/pasha.py index 875109e5b4..2800f389ae 100644 --- a/easybuild/easyblocks/p/pasha.py +++ b/easybuild/easyblocks/p/pasha.py @@ -27,9 +27,7 @@ from easybuild.framework.application import Application class Pasha(Application): - """ - Support for building and installing Pasha" - """ + """Support for building and installing Pasha""" def configure(self): """Configure Pasha by setting make options.""" @@ -38,8 +36,9 @@ def configure(self): if not tbb: self.log.error("TBB module not loaded.") - self.updatecfg('makeopts', "TBB_DIR=%s/tbb MPI_CXX=$MPICXX OPM_FLAG=%s" % (tbb, self.tk.get_openmp_flag())) - self.updatecfg('makeopts', "MPI_DIR='' MPI_INC='' MPI_LIB='' MY_CXX=$CXX MPICH_IGNORE_CXX_SEEK=1") + self.updatecfg('makeopts', "TBB_DIR=%s/tbb MPI_DIR='' MPI_INC=''") + self.updatecfg('makeopts', "MPI_CXX=$MPICXX OPM_FLAG=%s" % (tbb, self.tk.get_openmp_flag())) + self.updatecfg('makeopts', "MPI_LIB='' MY_CXX=$CXX MPICH_IGNORE_CXX_SEEK=1") def make_install(self): """Install by copying everything from 'bin' subdir in build dir to install dir""" @@ -50,7 +49,9 @@ def make_install(self): def sanitycheck(self): """Custom sanity check for Pasha""" self.setcfg('sanityCheckPaths', { - 'files':["bin/pasha-%s" % x for x in ["kmergen", "pregraph", "graph"]], + 'files':["bin/pasha-%s" % x for x in ["kmergen", + "pregraph", + "graph"]], 'dirs':[""], }) diff --git a/easybuild/easyblocks/t/tbb.py b/easybuild/easyblocks/t/tbb.py index 48c0c92e87..28bdfa5f8f 100644 --- a/easybuild/easyblocks/t/tbb.py +++ b/easybuild/easyblocks/t/tbb.py @@ -48,9 +48,9 @@ def make_install(self): self.libpath = "%s/tbb/libs/intel64/%s/" % (self.installdir, libdir) # applications go looking into tbb/lib so we move what's in there to libs # and symlink the right lib from /tbb/libs/intel64/... to lib - installibpath = os.path.join(self.installdir, 'tbb', 'lib') - shutil.move(installibpath, os.path.join(self.installdir, 'tbb', 'libs')) - os.symlink(self.libpath, installibpath) + install_libpath = os.path.join(self.installdir, 'tbb', 'lib') + shutil.move(install_libpath, os.path.join(self.installdir, 'tbb', 'libs')) + os.symlink(self.libpath, install_libpath) def sanitycheck(self): diff --git a/easybuild/easyconfigs/p/Pasha/Pasha-1.0.3-goalf-1.1.0-no-OFED.eb b/easybuild/easyconfigs/p/Pasha/Pasha-1.0.3-goalf-1.1.0-no-OFED.eb index e54ae6a9d5..25f90bf065 100644 --- a/easybuild/easyconfigs/p/Pasha/Pasha-1.0.3-goalf-1.1.0-no-OFED.eb +++ b/easybuild/easyconfigs/p/Pasha/Pasha-1.0.3-goalf-1.1.0-no-OFED.eb @@ -1,18 +1,18 @@ -name='Pasha' -version='1.0.3' +name = 'Pasha' +version = '1.0.3' -homepage='http://pasha.sourceforge.net/' -description="PASHA is a parallel short read assembler for large genomes using de Bruijn graphs." +homepage = 'http://pasha.sourceforge.net/' +description = "PASHA is a parallel short read assembler for large genomes using de Bruijn graphs." -toolkit={'name':'goalf','version':'1.1.0-no-OFED'} -toolkitopts={'pic':True,'opt':True,'optarch':True} +toolkit = {'name':'goalf', 'version':'1.1.0-no-OFED'} +toolkitopts = {'pic':True, 'opt':True, 'optarch':True} -dependencies=[('tbb','4.0.5.339','',True)] +dependencies = [('tbb', '4.0.5.339', '', True)] -sourceURLs=['http://downloads.sourceforge.net/pasha'] -sources=['%s-%s.tar.gz' % (name, version)] +sourceURLs = ['http://downloads.sourceforge.net/pasha'] +sources = ['%s-%s.tar.gz' % (name, version)] -patches=['gcc-hash_fun-map-set.patch'] +patches = ['gcc-hash_fun-map-set.patch'] -# Pasha's makefile is not suited for parallel execution. -parallel=1 +# Pasha's makefile is not suited for parallel execution +parallel = 1 diff --git a/easybuild/easyconfigs/p/Pasha/Pasha-1.0.3-ictce-4.0.6.eb b/easybuild/easyconfigs/p/Pasha/Pasha-1.0.3-ictce-4.0.6.eb index 07fb4c27e9..d417442d44 100644 --- a/easybuild/easyconfigs/p/Pasha/Pasha-1.0.3-ictce-4.0.6.eb +++ b/easybuild/easyconfigs/p/Pasha/Pasha-1.0.3-ictce-4.0.6.eb @@ -1,18 +1,18 @@ -name='Pasha' -version='1.0.3' +name = 'Pasha' +version = '1.0.3' -homepage='http://pasha.sourceforge.net/' -description="PASHA is a parallel short read assembler for large genomes using de Bruijn graphs." +homepage = 'http://pasha.sourceforge.net/' +description = "PASHA is a parallel short read assembler for large genomes using de Bruijn graphs." -toolkit={'name':'ictce','version':'4.0.6'} -toolkitopts={'pic':True,'opt':True,'optarch':True} +toolkit = {'name':'ictce', 'version':'4.0.6'} +toolkitopts = {'pic':True, 'opt':True, 'optarch':True} -dependencies=[('tbb','4.0.5.339','',True)] +dependencies = [('tbb', '4.0.5.339', '', True)] -sourceURLs=['http://downloads.sourceforge.net/pasha'] -sources=['%s-%s.tar.gz' % (name, version)] +sourceURLs = ['http://downloads.sourceforge.net/pasha'] +sources = ['%s-%s.tar.gz' % (name, version)] -patches=['intelmpi.patch'] - -# Pasha's makefile is not suited for parallel execution. -parallel=1 +patches = ['intelmpi.patch'] + +# Pasha's makefile is not suited for parallel execution +parallel = 1 From 7a6071e80e4ca7f336e59715cd5cb1dbf6e397bb Mon Sep 17 00:00:00 2001 From: Kenneth Hoste Date: Fri, 3 Aug 2012 07:52:34 +0200 Subject: [PATCH 244/798] add example easyconfig for FSL with ictce toolkit (tested) --- .../easyconfigs/f/FSL/FSL-4.1.9-ictce-4.0.6.eb | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) create mode 100644 easybuild/easyconfigs/f/FSL/FSL-4.1.9-ictce-4.0.6.eb diff --git a/easybuild/easyconfigs/f/FSL/FSL-4.1.9-ictce-4.0.6.eb b/easybuild/easyconfigs/f/FSL/FSL-4.1.9-ictce-4.0.6.eb new file mode 100644 index 0000000000..fe37371797 --- /dev/null +++ b/easybuild/easyconfigs/f/FSL/FSL-4.1.9-ictce-4.0.6.eb @@ -0,0 +1,16 @@ +name='FSL' +version='4.1.9' + +homepage='http://www.fmrib.ox.ac.uk/fsl/' +description="""FSL is a comprehensive library of analysis tools for FMRI, MRI and DTI brain imaging data.""" + +toolkit={'name':'ictce','version':'4.0.6'} + +sourceURLs=["http://www.fmrib.ox.ac.uk/fsldownloads/"] +sources=['%s-%s-sources.tar.gz' % (name.lower(), version)] + +patches=['FSL_makefile_fixes.patch', + 'FSL_icc_nan-inf_fix.patch'] + +# libX11-devel is required for X11/Xlib.h, required by tk build +osdependencies=['libX11-devel'] From 40e64e16d5be3ee9abaed151bb1b625238ebfe7f Mon Sep 17 00:00:00 2001 From: Kenneth Hoste Date: Fri, 3 Aug 2012 08:56:35 +0200 Subject: [PATCH 245/798] fix module path adjustment for fake module (required for e.g. Python); add support for specifying directory to apply patch in (required for e.g. OpenFOAM) --- easybuild/framework/application.py | 31 +++++++++++++++++------------ easybuild/tools/module_generator.py | 21 ++++++++++--------- 2 files changed, 30 insertions(+), 22 deletions(-) diff --git a/easybuild/framework/application.py b/easybuild/framework/application.py index a5d233b66f..ed497e02d1 100644 --- a/easybuild/framework/application.py +++ b/easybuild/framework/application.py @@ -263,16 +263,20 @@ def addpatch(self, listOfPatches=None): for patchFile in listOfPatches: ## check if the patches can be located + copy = False suff = None level = None - if type(patchFile) == list: + if type(patchFile) in [list, tuple]: if not len(patchFile) == 2: - self.log.error("Unknown patch specification '%s', only two-element lists are supported!" % patchFile) + self.log.error("Unknown patch specification '%s', only two-element lists/tuples are supported!" % patchFile) pf = patchFile[0] if type(patchFile[1]) == int: level = patchFile[1] elif type(patchFile[1]) == str: + # non-patch files are assumed to be files to copy + if not patchFile[0].endswith('.patch'): + copy = True suff = patchFile[1] else: self.log.error("Wrong patch specification '%s', only int and string are supported as second element!" % patchFile) @@ -283,8 +287,10 @@ def addpatch(self, listOfPatches=None): if path: self.log.debug('File %s found for patch %s' % (path, patchFile)) tmppatch = {'name':pf, 'path':path} - if suff: + if suff and copy: tmppatch['copy'] = suff + elif suff: + tmppatch['sourcepath'] = suff if level: tmppatch['level'] = level self.patches.append(tmppatch) @@ -907,6 +913,7 @@ def runstep(self, step, methods, skippable=False): if skippable and self.skip: self.log.info("Skipping %s" % step) else: + self.log.info("Starting %s" % step) for m in methods: self.print_environ() m() @@ -1047,10 +1054,9 @@ def sanitycheck(self): self.log.debug("Sanity check: found non-empty directory %s in %s" % (d, self.installdir)) # make fake module - self.make_module(True) + mod_path = [self.make_module(True)] # load the module - mod_path = [self.moduleGenerator.module_path] mod_path.extend(Modules().modulePath) m = Modules(mod_path) self.log.debug("created module instance") @@ -1061,9 +1067,6 @@ def sanitycheck(self): self.log.debug("Loading module failed: %s" % err) self.sanityCheckOK = False - # clean up path for fake module - self.moduleGenerator.cleanup() - # chdir to installdir (beter environment for running tests) os.chdir(self.installdir) @@ -1288,7 +1291,7 @@ def make_module(self, fake=False): Generate a module file. """ self.moduleGenerator = ModuleGenerator(self, fake) - self.moduleGenerator.createFiles() + modpath = self.moduleGenerator.createFiles() txt = '' txt += self.make_module_description() @@ -1308,6 +1311,8 @@ def make_module(self, fake=False): self.log.info("Added modulefile: %s" % (self.moduleGenerator.filename)) + return modpath + def make_module_description(self): """ Create the module description. @@ -1404,14 +1409,14 @@ def packages(self): return if not self.skip: - self.make_module(fake=True) - # set MODULEPATH to self.builddir/all and load module + modpath = self.make_module(fake=True) + # adjust MODULEPATH tand load module if self.getcfg('pkgloadmodule'): - self.log.debug(' '.join(["self.builddir/all: ", os.path.join(self.builddir, 'all')])) + self.log.debug("Adding %s to MODULEPATH" % modpath) if self.skip: m = Modules() else: - m = Modules([os.path.join(self.builddir, 'all')] + os.environ['MODULEPATH'].split(':')) + m = Modules([modpath] + os.environ['MODULEPATH'].split(':')) if m.exists(self.name(), self.installversion): m.addModule([[self.name(), self.installversion]]) diff --git a/easybuild/tools/module_generator.py b/easybuild/tools/module_generator.py index 8c6ccfa343..f735474236 100644 --- a/easybuild/tools/module_generator.py +++ b/easybuild/tools/module_generator.py @@ -38,27 +38,28 @@ def __init__(self, application, fake=False): self.app = application self.fake = fake self.filename = None - self.module_path = None self.tmpdir = None def createFiles(self): """ Creates the absolute filename for the module. """ - base = installPath('mod') + module_path = installPath('mod') + + # general module class + general_class = 'all' # Fake mode: set installpath to temporary dir if self.fake: self.tmpdir = tempfile.mkdtemp() - log.debug("Fake mode: using %s (instead of %s)" % (self.tmpdir, base)) - base = self.tmpdir + log.debug("Fake mode: using %s (instead of %s)" % (self.tmpdir, module_path)) + module_path = self.tmpdir # Real file goes in 'all' category - self.module_path = os.path.join(base, 'all') - self.filename = os.path.join(self.module_path, self.app.name(), self.app.installversion) + self.filename = os.path.join(module_path, general_class, self.app.name(), self.app.installversion) # Make symlink in moduleclass category - classPath = os.path.join(base, self.app.getcfg('moduleclass'), self.app.name()) + classPath = os.path.join(module_path, self.app.getcfg('moduleclass'), self.app.name()) classPathFile = os.path.join(classPath, self.app.installversion) # Create directories and links @@ -81,6 +82,8 @@ def createFiles(self): except OSError, err: log.exception("Failed to create symlink from %s to %s: %s" % (classPathFile, self.filename, err)) + return os.path.join(module_path, general_class) + def getDescription(self, conflict=True): """ Generate a description. @@ -153,9 +156,9 @@ def setEnvironment(self, key, value): """ return "setenv\t%s\t\t%s\n" % (key, value) - def cleanup(self): + def __del__(self): """ - Clean up temporary directory used for fake modules, if any. + Desconstructor: clean up temporary directory used for fake modules, if any. """ if self.fake: log.info("Cleaning up fake modules dir %s" % self.tmpdir) From e8a2a5d95a33ad2681c0633aadc57f1951856ffa Mon Sep 17 00:00:00 2001 From: Kenneth Hoste Date: Fri, 3 Aug 2012 09:47:22 +0200 Subject: [PATCH 246/798] processed remarks w.r.t. import order and module docstrings --- easybuild/easyblocks/a/atlas.py | 4 ++++ easybuild/easyblocks/b/binary.py | 3 ++- easybuild/easyblocks/b/blacs.py | 4 ++++ easybuild/easyblocks/c/cp2k.py | 4 ++++ easybuild/easyblocks/d/doxygen.py | 4 ++++ easybuild/easyblocks/f/fsl.py | 4 ++++ easybuild/easyblocks/g/g2clib.py | 4 ++++ easybuild/easyblocks/g/g2lib.py | 4 ++++ easybuild/easyblocks/g/gcc.py | 4 ++++ easybuild/easyblocks/h/hdf5.py | 4 ++++ easybuild/easyblocks/h/hpl.py | 4 ++++ easybuild/easyblocks/i/icc.py | 3 +++ easybuild/easyblocks/i/ifort.py | 3 +++ easybuild/easyblocks/i/imkl.py | 6 +++++- easybuild/easyblocks/i/impi.py | 3 +++ easybuild/easyblocks/i/intelbase.py | 6 +++++- easybuild/easyblocks/i/ipp.py | 3 +++ easybuild/easyblocks/i/itac.py | 3 +++ easybuild/easyblocks/l/lapack.py | 4 ++++ easybuild/easyblocks/l/libsmm.py | 4 ++++ easybuild/easyblocks/m/maple.py | 4 ++++ easybuild/easyblocks/m/mrbayes.py | 4 ++++ easybuild/easyblocks/m/mvapich2.py | 6 +++++- easybuild/easyblocks/n/ncl.py | 4 ++++ easybuild/easyblocks/n/netcdf.py | 6 +++++- easybuild/easyblocks/n/netcdf_fortran.py | 6 +++++- easybuild/easyblocks/p/pasha.py | 2 +- easybuild/easyblocks/p/python.py | 4 ++++ easybuild/easyblocks/s/scalapack.py | 4 ++++ easybuild/easyblocks/t/tarball.py | 5 +++++ easybuild/easyblocks/t/tbb.py | 7 ++++--- easybuild/easyblocks/t/toolkit.py | 4 ++++ easybuild/easyblocks/w/wps.py | 10 +++++++--- easybuild/easyblocks/w/wrf.py | 8 ++++++-- 34 files changed, 137 insertions(+), 15 deletions(-) diff --git a/easybuild/easyblocks/a/atlas.py b/easybuild/easyblocks/a/atlas.py index c2c8fa4046..ffebc8705b 100644 --- a/easybuild/easyblocks/a/atlas.py +++ b/easybuild/easyblocks/a/atlas.py @@ -18,6 +18,10 @@ # You should have received a copy of the GNU General Public License # along with EasyBuild. If not, see . ## +""" +EasyBuild support for building and installing ATLAS, implemented as an easyblock +""" + import re import os diff --git a/easybuild/easyblocks/b/binary.py b/easybuild/easyblocks/b/binary.py index 85a5eea026..61bb0e9c2e 100644 --- a/easybuild/easyblocks/b/binary.py +++ b/easybuild/easyblocks/b/binary.py @@ -19,8 +19,9 @@ # along with EasyBuild. If not, see . ## """ -EasyBlock for binary applications +General EasyBuild support for software with a binary installer """ + import shutil from easybuild.framework.application import Application diff --git a/easybuild/easyblocks/b/blacs.py b/easybuild/easyblocks/b/blacs.py index 96b0cf2403..558951912d 100644 --- a/easybuild/easyblocks/b/blacs.py +++ b/easybuild/easyblocks/b/blacs.py @@ -18,6 +18,10 @@ # You should have received a copy of the GNU General Public License # along with EasyBuild. If not, see . ## +""" +EasyBuild support for building and installing BLACS, implemented as an easyblock +""" + import glob import re import os diff --git a/easybuild/easyblocks/c/cp2k.py b/easybuild/easyblocks/c/cp2k.py index 19f7605aba..f67f456e6d 100644 --- a/easybuild/easyblocks/c/cp2k.py +++ b/easybuild/easyblocks/c/cp2k.py @@ -18,6 +18,10 @@ # You should have received a copy of the GNU General Public License # along with EasyBuild. If not, see . ## +""" +EasyBuild support for building and installing CP2K, implemented as an easyblock +""" + from distutils.version import LooseVersion import fileinput import glob diff --git a/easybuild/easyblocks/d/doxygen.py b/easybuild/easyblocks/d/doxygen.py index f80d464a78..c2996e34f6 100644 --- a/easybuild/easyblocks/d/doxygen.py +++ b/easybuild/easyblocks/d/doxygen.py @@ -18,6 +18,10 @@ # You should have received a copy of the GNU General Public License # along with EasyBuild. If not, see . ## +""" +EasyBuild support for building and installing Doxygen, implemented as an easyblock +""" + from easybuild.framework.application import Application from easybuild.tools.filetools import run_cmd diff --git a/easybuild/easyblocks/f/fsl.py b/easybuild/easyblocks/f/fsl.py index 1179f02cc5..935a07e023 100644 --- a/easybuild/easyblocks/f/fsl.py +++ b/easybuild/easyblocks/f/fsl.py @@ -18,6 +18,10 @@ # You should have received a copy of the GNU General Public License # along with EasyBuild. If not, see . ## +""" +EasyBuild support for building and installing FSL, implemented as an easyblock +""" + import difflib import os import shutil diff --git a/easybuild/easyblocks/g/g2clib.py b/easybuild/easyblocks/g/g2clib.py index 597197b490..449d9ab98a 100644 --- a/easybuild/easyblocks/g/g2clib.py +++ b/easybuild/easyblocks/g/g2clib.py @@ -18,6 +18,10 @@ # You should have received a copy of the GNU General Public License # along with EasyBuild. If not, see . ## +""" +EasyBuild support for building and installing g2clib, implemented as an easyblock +""" + import glob import os import shutil diff --git a/easybuild/easyblocks/g/g2lib.py b/easybuild/easyblocks/g/g2lib.py index edf63dfc38..f3bf1affc8 100644 --- a/easybuild/easyblocks/g/g2lib.py +++ b/easybuild/easyblocks/g/g2lib.py @@ -18,6 +18,10 @@ # You should have received a copy of the GNU General Public License # along with EasyBuild. If not, see . ## +""" +EasyBuild support for building and installing g2lib, implemented as an easyblock +""" + import os import shutil diff --git a/easybuild/easyblocks/g/gcc.py b/easybuild/easyblocks/g/gcc.py index fb73bc6c7f..d42e4c7649 100644 --- a/easybuild/easyblocks/g/gcc.py +++ b/easybuild/easyblocks/g/gcc.py @@ -18,6 +18,10 @@ # You should have received a copy of the GNU General Public License # along with EasyBuild. If not, see . ## +""" +EasyBuild support for building and installing GCC, implemented as an easyblock +""" + import re import os import shutil diff --git a/easybuild/easyblocks/h/hdf5.py b/easybuild/easyblocks/h/hdf5.py index 47754e67bb..72e9097da2 100644 --- a/easybuild/easyblocks/h/hdf5.py +++ b/easybuild/easyblocks/h/hdf5.py @@ -18,6 +18,10 @@ # You should have received a copy of the GNU General Public License # along with EasyBuild. If not, see . ## +""" +EasyBuild support for building and installing HDF5, implemented as an easyblock +""" + import os from easybuild.framework.application import Application diff --git a/easybuild/easyblocks/h/hpl.py b/easybuild/easyblocks/h/hpl.py index 0c65b88edb..60833c0073 100644 --- a/easybuild/easyblocks/h/hpl.py +++ b/easybuild/easyblocks/h/hpl.py @@ -18,6 +18,10 @@ # You should have received a copy of the GNU General Public License # along with EasyBuild. If not, see . ## +""" +EasyBuild support for building and installing HPL, implemented as an easyblock +""" + import os import shutil diff --git a/easybuild/easyblocks/i/icc.py b/easybuild/easyblocks/i/icc.py index 897ef37722..1407357809 100644 --- a/easybuild/easyblocks/i/icc.py +++ b/easybuild/easyblocks/i/icc.py @@ -18,6 +18,9 @@ # You should have received a copy of the GNU General Public License # along with EasyBuild. If not, see . ## +""" +EasyBuild support for install the Intel C/C++ compiler suite, implemented as an easyblock +""" import os from distutils.version import LooseVersion diff --git a/easybuild/easyblocks/i/ifort.py b/easybuild/easyblocks/i/ifort.py index 084cc38808..d7d7ec0200 100644 --- a/easybuild/easyblocks/i/ifort.py +++ b/easybuild/easyblocks/i/ifort.py @@ -18,6 +18,9 @@ # You should have received a copy of the GNU General Public License # along with EasyBuild. If not, see . ## +""" +EasyBuild support for installing the Intel Fortran compiler suite, implemented as an easyblock +""" from distutils.version import LooseVersion diff --git a/easybuild/easyblocks/i/imkl.py b/easybuild/easyblocks/i/imkl.py index 82ccd073a3..3bc5f40c65 100644 --- a/easybuild/easyblocks/i/imkl.py +++ b/easybuild/easyblocks/i/imkl.py @@ -18,16 +18,20 @@ # You should have received a copy of the GNU General Public License # along with EasyBuild. If not, see . ## +""" +EasyBuild support for installing the Intel Math Kernel Library (MKL), implemented as an easyblock +""" import os import shutil import tempfile from distutils.version import LooseVersion +import easybuild.tools.environment as env from easybuild.easyblocks.i.intelbase import IntelBase from easybuild.tools.filetools import run_cmd from easybuild.tools.modules import Modules -import easybuild.tools.environment as env + class Imkl(IntelBase): """ diff --git a/easybuild/easyblocks/i/impi.py b/easybuild/easyblocks/i/impi.py index dce79f702c..c0bc02071f 100644 --- a/easybuild/easyblocks/i/impi.py +++ b/easybuild/easyblocks/i/impi.py @@ -18,6 +18,9 @@ # You should have received a copy of the GNU General Public License # along with EasyBuild. If not, see . ## +""" +EasyBuild support for installing the Intel MPI library, implemented as an easyblock +""" import os from distutils.version import LooseVersion diff --git a/easybuild/easyblocks/i/intelbase.py b/easybuild/easyblocks/i/intelbase.py index a3ac5816b3..175c73cae2 100644 --- a/easybuild/easyblocks/i/intelbase.py +++ b/easybuild/easyblocks/i/intelbase.py @@ -18,12 +18,16 @@ # You should have received a copy of the GNU General Public License # along with EasyBuild. If not, see . ## +""" +Generic EasyBuild support for installing Intel tools, implemented as an easyblock +""" + import os import shutil +import easybuild.tools.environment as env from easybuild.framework.application import Application from easybuild.tools.filetools import run_cmd -import easybuild.tools.environment as env class IntelBase(Application): """ diff --git a/easybuild/easyblocks/i/ipp.py b/easybuild/easyblocks/i/ipp.py index a03add7e35..d277c67b93 100644 --- a/easybuild/easyblocks/i/ipp.py +++ b/easybuild/easyblocks/i/ipp.py @@ -18,6 +18,9 @@ # You should have received a copy of the GNU General Public License # along with EasyBuild. If not, see . ## +""" +EasyBuild support for installing the Intel Performance Primitives (IPP) library, implemented as an easyblock +""" from easybuild.easyblocks.i.intelbase import IntelBase diff --git a/easybuild/easyblocks/i/itac.py b/easybuild/easyblocks/i/itac.py index 5ff79eb461..aa35f6fa57 100644 --- a/easybuild/easyblocks/i/itac.py +++ b/easybuild/easyblocks/i/itac.py @@ -18,6 +18,9 @@ # You should have received a copy of the GNU General Public License # along with EasyBuild. If not, see . ## +""" +EasyBuild support for installing the Intel Trace Analyzer and Collector (ITAC), implemented as an easyblock +""" import os diff --git a/easybuild/easyblocks/l/lapack.py b/easybuild/easyblocks/l/lapack.py index 58438f9e30..718f1703cb 100644 --- a/easybuild/easyblocks/l/lapack.py +++ b/easybuild/easyblocks/l/lapack.py @@ -18,6 +18,10 @@ # You should have received a copy of the GNU General Public License # along with EasyBuild. If not, see . ## +""" +EasyBuild support for building and installing LAPACK, implemented as an easyblock +""" + import glob import os import shutil diff --git a/easybuild/easyblocks/l/libsmm.py b/easybuild/easyblocks/l/libsmm.py index a699610263..aa5e1ab2ef 100644 --- a/easybuild/easyblocks/l/libsmm.py +++ b/easybuild/easyblocks/l/libsmm.py @@ -18,6 +18,10 @@ # You should have received a copy of the GNU General Public License # along with EasyBuild. If not, see . ## +""" +EasyBuild support for building and installing the libsmm library, implemented as an easyblock +""" + import os import shutil from distutils.version import LooseVersion diff --git a/easybuild/easyblocks/m/maple.py b/easybuild/easyblocks/m/maple.py index fdb586cae6..b60a43ae08 100644 --- a/easybuild/easyblocks/m/maple.py +++ b/easybuild/easyblocks/m/maple.py @@ -18,6 +18,10 @@ # You should have received a copy of the GNU General Public License # along with EasyBuild. If not, see . ## +""" +EasyBuild support for installing Maple, implemented as an easyblock +""" + import os import shutil diff --git a/easybuild/easyblocks/m/mrbayes.py b/easybuild/easyblocks/m/mrbayes.py index 40f64ce821..3fba903a9f 100644 --- a/easybuild/easyblocks/m/mrbayes.py +++ b/easybuild/easyblocks/m/mrbayes.py @@ -19,6 +19,10 @@ # You should have received a copy of the GNU General Public License # along with EasyBuild. If not, see . ## +""" +EasyBuild support for building and installing MrBayes, implemented as an easyblock +""" + import os import shutil from distutils.version import LooseVersion diff --git a/easybuild/easyblocks/m/mvapich2.py b/easybuild/easyblocks/m/mvapich2.py index d2d976bc5c..078276a176 100644 --- a/easybuild/easyblocks/m/mvapich2.py +++ b/easybuild/easyblocks/m/mvapich2.py @@ -18,10 +18,14 @@ # You should have received a copy of the GNU General Public License # along with EasyBuild. If not, see . ## +""" +EasyBuild support for building and installing the MVAPICH2 MPI library, implemented as an easyblock +""" + import os -from easybuild.framework.application import Application import easybuild.tools.environment as env +from easybuild.framework.application import Application class MVAPICH2(Application): """ diff --git a/easybuild/easyblocks/n/ncl.py b/easybuild/easyblocks/n/ncl.py index c4030e960a..b5e32ba73f 100644 --- a/easybuild/easyblocks/n/ncl.py +++ b/easybuild/easyblocks/n/ncl.py @@ -18,6 +18,10 @@ # You should have received a copy of the GNU General Public License # along with EasyBuild. If not, see . ## +""" +EasyBuild support for building and installing NCL, implemented as an easyblock +""" + from distutils.version import LooseVersion import fileinput import os diff --git a/easybuild/easyblocks/n/netcdf.py b/easybuild/easyblocks/n/netcdf.py index f7b515e256..16cdc07a50 100644 --- a/easybuild/easyblocks/n/netcdf.py +++ b/easybuild/easyblocks/n/netcdf.py @@ -18,12 +18,16 @@ # You should have received a copy of the GNU General Public License # along with EasyBuild. If not, see . ## +""" +EasyBuild support for building and installing netCDF, implemented as an easyblock +""" + import os from distutils.version import LooseVersion -from easybuild.framework.application import Application import easybuild.tools.environment as env import easybuild.tools.toolkit as toolkit +from easybuild.framework.application import Application class NetCDF(Application): """Support for building/installing netCDF""" diff --git a/easybuild/easyblocks/n/netcdf_fortran.py b/easybuild/easyblocks/n/netcdf_fortran.py index 057ee3139d..84a4cc9216 100644 --- a/easybuild/easyblocks/n/netcdf_fortran.py +++ b/easybuild/easyblocks/n/netcdf_fortran.py @@ -18,11 +18,15 @@ # You should have received a copy of the GNU General Public License # along with EasyBuild. If not, see . ## +""" +EasyBuild support for building and installing netCDF-Fortran, implemented as an easyblock +""" + import os -from easybuild.framework.application import Application import easybuild.tools.environment as env import easybuild.tools.toolkit as toolkit +from easybuild.framework.application import Application class NetCDF_Fortran(Application): """Support for building/installing the netCDF-Fortran library""" diff --git a/easybuild/easyblocks/p/pasha.py b/easybuild/easyblocks/p/pasha.py index 2800f389ae..50d231025f 100644 --- a/easybuild/easyblocks/p/pasha.py +++ b/easybuild/easyblocks/p/pasha.py @@ -19,7 +19,7 @@ # along with EasyBuild. If not, see . ## """ -EasyBuild support for Pasha, implemented as an easyblock +EasyBuild support for building and installing Pasha, implemented as an easyblock """ import shutil diff --git a/easybuild/easyblocks/p/python.py b/easybuild/easyblocks/p/python.py index 3a8c78895a..bfbae56c50 100644 --- a/easybuild/easyblocks/p/python.py +++ b/easybuild/easyblocks/p/python.py @@ -18,6 +18,10 @@ # You should have received a copy of the GNU General Public License # along with EasyBuild. If not, see . ## +""" +EasyBuild support for building and installing Python, implemented as an easyblock +""" + import os import shutil diff --git a/easybuild/easyblocks/s/scalapack.py b/easybuild/easyblocks/s/scalapack.py index c6267ac9ef..90917f348d 100644 --- a/easybuild/easyblocks/s/scalapack.py +++ b/easybuild/easyblocks/s/scalapack.py @@ -18,6 +18,10 @@ # You should have received a copy of the GNU General Public License # along with EasyBuild. If not, see . ## +""" +EasyBuild support for building and installing ScaLAPACK, implemented as an easyblock +""" + import os import shutil from distutils.version import LooseVersion diff --git a/easybuild/easyblocks/t/tarball.py b/easybuild/easyblocks/t/tarball.py index 7bf5a5cfbe..91c2e2a19a 100644 --- a/easybuild/easyblocks/t/tarball.py +++ b/easybuild/easyblocks/t/tarball.py @@ -18,6 +18,11 @@ # You should have received a copy of the GNU General Public License # along with EasyBuild. If not, see . ## +""" +EasyBuild support for installing (precompiled) software packages which are packaged as a tarball, +implemented as an easyblock +""" + import shutil from easybuild.framework.application import Application diff --git a/easybuild/easyblocks/t/tbb.py b/easybuild/easyblocks/t/tbb.py index 28bdfa5f8f..4bdfb24b5c 100644 --- a/easybuild/easyblocks/t/tbb.py +++ b/easybuild/easyblocks/t/tbb.py @@ -18,6 +18,9 @@ # You should have received a copy of the GNU General Public License # along with EasyBuild. If not, see . ## +""" +EasyBuild support for installing the Intel Threading Building Blocks (TBB) library, implemented as an easyblock +""" import os import shutil @@ -26,9 +29,7 @@ from easybuild.easyblocks.i.intelbase import IntelBase class Tbb(IntelBase): - """ - EasyBlock for tbb, threading building blocks - """ + """EasyBlock for tbb, threading building blocks""" def make_install(self): """overwrite make_install to add extra symlinks""" diff --git a/easybuild/easyblocks/t/toolkit.py b/easybuild/easyblocks/t/toolkit.py index da69f49aa8..d3671dfcc5 100644 --- a/easybuild/easyblocks/t/toolkit.py +++ b/easybuild/easyblocks/t/toolkit.py @@ -18,6 +18,10 @@ # You should have received a copy of the GNU General Public License # along with EasyBuild. If not, see . ## +""" +EasyBuild support for installing compiler toolkits, implemented as an easyblock +""" + from easybuild.framework.application import Application class Toolkit(Application): diff --git a/easybuild/easyblocks/w/wps.py b/easybuild/easyblocks/w/wps.py index dbeb9e6a15..c608a631d1 100644 --- a/easybuild/easyblocks/w/wps.py +++ b/easybuild/easyblocks/w/wps.py @@ -18,19 +18,23 @@ # You should have received a copy of the GNU General Public License # along with EasyBuild. If not, see . ## -from distutils.version import LooseVersion +""" +EasyBuild support for building and installing WPS, implemented as an easyblock +""" + import fileinput import os import re import shutil import sys import tempfile +from distutils.version import LooseVersion +import easybuild.tools.environment as env +import easybuild.tools.toolkit as toolkit from easybuild.framework.application import Application from easybuild.tools.filetools import patch_perl_script_autoflush, run_cmd, run_cmd_qa, unpack from easybuild.easyblocks.n.netcdf import set_netcdf_env_vars, get_netcdf_module_set_cmds -import easybuild.tools.environment as env -import easybuild.tools.toolkit as toolkit class WPS(Application): """Support for building/installing WPS.""" diff --git a/easybuild/easyblocks/w/wrf.py b/easybuild/easyblocks/w/wrf.py index 4a4ac84e07..6309446f55 100644 --- a/easybuild/easyblocks/w/wrf.py +++ b/easybuild/easyblocks/w/wrf.py @@ -18,16 +18,20 @@ # You should have received a copy of the GNU General Public License # along with EasyBuild. If not, see . ## +""" +EasyBuild support for building and installing WRF, implemented as an easyblock +""" + import fileinput import os import re import sys +import easybuild.tools.environment as env +import easybuild.tools.toolkit as toolkit from easybuild.framework.application import Application from easybuild.tools.filetools import patch_perl_script_autoflush, run_cmd, run_cmd_qa from easybuild.easyblocks.n.netcdf import set_netcdf_env_vars, get_netcdf_module_set_cmds -import easybuild.tools.environment as env -import easybuild.tools.toolkit as toolkit class WRF(Application): """Support for building/installing WRF.""" From 64bbfff7b73bde92ea492801786570890fb414f6 Mon Sep 17 00:00:00 2001 From: Kenneth Hoste Date: Fri, 3 Aug 2012 10:02:05 +0200 Subject: [PATCH 247/798] get rid of all commentary started with multiple hashes (#) --- easybuild/easyblocks/c/cp2k.py | 28 ++++++------ easybuild/easyblocks/f/fsl.py | 8 ++-- easybuild/easyblocks/g/gcc.py | 69 ++++++++++++++--------------- easybuild/easyblocks/h/hpl.py | 2 +- easybuild/easyblocks/i/imkl.py | 30 ++++++------- easybuild/easyblocks/i/impi.py | 4 +- easybuild/easyblocks/i/intelbase.py | 14 +++--- easybuild/easyblocks/i/itac.py | 4 +- easybuild/easyblocks/l/lapack.py | 4 +- easybuild/easyblocks/n/ncl.py | 2 +- easybuild/easyblocks/p/python.py | 2 +- easybuild/easyblocks/s/scalapack.py | 2 +- easybuild/easyblocks/w/wps.py | 2 +- easybuild/easyblocks/w/wrf.py | 4 +- 14 files changed, 87 insertions(+), 88 deletions(-) diff --git a/easybuild/easyblocks/c/cp2k.py b/easybuild/easyblocks/c/cp2k.py index c22932ca22..bf11aa33ac 100644 --- a/easybuild/easyblocks/c/cp2k.py +++ b/easybuild/easyblocks/c/cp2k.py @@ -84,8 +84,8 @@ def configure(self): """ # set compilers options according to toolkit config - ## full debug: -g -traceback -check all -fp-stack-check - ## -g links to mpi debug libs + # full debug: -g -traceback -check all -fp-stack-check + # -g links to mpi debug libs if self.tk.opts['debug']: self.debug = '-g' self.log.info("Debug build") @@ -168,7 +168,7 @@ def prepmodinc(self): if softrootimkl: - ## prepare modinc target path + # prepare modinc target path modincpath = os.path.join(self.builddir, 'modinc') self.log.debug("Preparing module files in %s" % modincpath) @@ -177,7 +177,7 @@ def prepmodinc(self): except OSError, err: self.log.error("Failed to create directory for module include files: %s" % err) - ## get list of modinc source files + # get list of modinc source files modincdir = os.path.join(softrootimkl, self.getcfg("modincprefix"), 'include') if type(self.getcfg("modinc")) == list: @@ -195,7 +195,7 @@ def prepmodinc(self): if not f77: self.log.error("F77 environment variable not set, can't continue.") - ## create modinc files + # create modinc files for f in modfiles: if f77.endswith('ifort') : cmd = "%s -module %s -c %s" % (f77, modincpath, f) @@ -214,8 +214,8 @@ def configureCommon(self): """Common configuration for all toolkits""" # openmp introduces 2 major differences - ## -automatic is default: -noautomatic -auto-scalar - ## some mem-bandwidth optimisation + # -automatic is default: -noautomatic -auto-scalar + # some mem-bandwidth optimisation if self.getcfg('type') == 'psmp': self.openmp = self.tk.get_openmp_flag() @@ -280,11 +280,11 @@ def configureCommon(self): # Build libint-wrapper, if required libint_wrapper = '' - ## required for old versions of GCC + # required for old versions of GCC if not self.compilerISO_C_BINDING: options['DFLAGS'] += ' -D__HAS_NO_ISO_C_BINDING' - ## determine path for libint_tools dir + # determine path for libint_tools dir libinttools_paths = ['libint_tools', 'tools/hfx_tools/libint_tools'] libinttools_path = None for path in libinttools_paths: @@ -295,7 +295,7 @@ def configureCommon(self): if not libinttools_path: self.log.error("No libinttools dir found") - ## build libint wrapper + # build libint wrapper cmd = "%s -c libint_cpp_wrapper.cpp -I%s/include" % (libintcompiler, softrootlibint) if not run_cmd(cmd, log_all=True, simple=True): self.log.error("Building the libint wrapper failed") @@ -327,7 +327,7 @@ def configureIntelBased(self): options.update({ - ## -Vaxlib : older options + # -Vaxlib : older options 'FREE': '-fpp -free', #SAFE = -assume protect_parens -fp-model precise -ftz # problems @@ -363,7 +363,7 @@ def configureGCCBased(self): options.update({ - ## need this to prevent "Unterminated character constant beginning" errors + # need this to prevent "Unterminated character constant beginning" errors 'FREE': '-ffree-form -ffree-line-length-none', 'LDFLAGS': '$(FCFLAGS)', @@ -502,7 +502,7 @@ def test(self): self.log.error("Failed to change to %s: %s" % self.builddir) # use regression test reference output if available - ## try and find an unpacked directory that starts with 'LAST-' + # try and find an unpacked directory that starts with 'LAST-' regtest_refdir = None for d in os.listdir(self.builddir): if d.startswith("LAST-"): @@ -609,7 +609,7 @@ def test_report(test_result): self.postmsg += test_report("WRONG") # number of new tests, will be high if a non-suitable regtest reference was used - ## will report error if count is positive (is that what we want?) + # will report error if count is positive (is that what we want?) self.postmsg += test_report("NEW") # number of correct tests: just report diff --git a/easybuild/easyblocks/f/fsl.py b/easybuild/easyblocks/f/fsl.py index e6e8efb07f..770e06b3a2 100644 --- a/easybuild/easyblocks/f/fsl.py +++ b/easybuild/easyblocks/f/fsl.py @@ -52,7 +52,7 @@ def configure(self): self.log.debug("FSL machine type: %s" % fslmachtype) # prepare config - ## either using matching config, or copy closest match + # either using matching config, or copy closest match cfgdir = os.path.join(self.fsldir, "config") try: cfgs = os.listdir(cfgdir) @@ -114,9 +114,9 @@ def sanitycheck(self): if not self.getcfg('sanityCheckPaths'): - self.setcfg('sanityCheckPaths',{'files':[], - 'dirs':["fsl/%s" % x for x in ["bin", "data", "etc", "extras", "include", "lib"]] - }) + self.setcfg('sanityCheckPaths', {'files':[], + 'dirs':["fsl/%s" % x for x in ["bin", "data", "etc", "extras", "include", "lib"]] + }) self.log.info("Customized sanity check paths: %s" % self.getcfg('sanityCheckPaths')) diff --git a/easybuild/easyblocks/g/gcc.py b/easybuild/easyblocks/g/gcc.py index fb73bc6c7f..23161d33e7 100644 --- a/easybuild/easyblocks/g/gcc.py +++ b/easybuild/easyblocks/g/gcc.py @@ -79,24 +79,24 @@ def prep_extra_src_dirs(self, stage, target_prefix=None): else: extra_src_dirs = ["gmp", "mpfr", "mpc"] - ## add optional ones that were selected (e.g. CLooG, PPL, ...) + # add optional ones that were selected (e.g. CLooG, PPL, ...) for x in ["cloog", "ppl"]: if self.getcfg('with%s' % x): extra_src_dirs.append(x) - ## see if modules are loaded - ## if module is available, just use the --with-X GCC configure option + # see if modules are loaded + # if module is available, just use the --with-X GCC configure option for extra in copy(extra_src_dirs): envvar = os.getenv('SOFTROOT%s' % extra.upper()) if envvar: configopts += " --with-%s=%s" % (extra, envvar) extra_src_dirs.remove(extra) elif extra in ["cloog", "ppl"] and stage in ["stage1", "stage3"]: - ## building CLooG or PPL requires a recent compiler - ## our best bet is to do a 3-staged build of GCC, and - ## build CLooG/PPL with the GCC we're building in stage 2 - ## then (bootstrap) build GCC in stage 3 - ## also, no need to stage cloog/ppl in stage3 (may even cause troubles) + # building CLooG or PPL requires a recent compiler + # our best bet is to do a 3-staged build of GCC, and + # build CLooG/PPL with the GCC we're building in stage 2 + # then (bootstrap) build GCC in stage 3 + # also, no need to stage cloog/ppl in stage3 (may even cause troubles) self.stagedbuild = True extra_src_dirs.remove(extra) @@ -185,28 +185,27 @@ def configure(self): # II) update config options - ## enable specified language support + # enable specified language support if self.getcfg('languages'): self.configopts += " --enable-languages=%s" % ','.join(self.getcfg('languages')) - ## enable link-time-optimization (LTO) support, if desired + # enable link-time-optimization (LTO) support, if desired if self.getcfg('withlto'): self.configopts += " --enable-lto" - ## configure for a release build + # configure for a release build self.configopts += " --enable-checking=release " - ## enable C++ support (required for GMP build), disable multilib (???) + # enable C++ support (required for GMP build), disable multilib (???) self.configopts += " --enable-cxx --disable-multilib" - ## build both static and dynamic libraries (???) + # build both static and dynamic libraries (???) self.configopts += " --enable-shared=yes --enable-static=yes " - ## use POSIX threads + # use POSIX threads self.configopts += " --enable-threads=posix " - ## use GOLD as default linker, enable plugin support + # use GOLD as default linker, enable plugin support self.configopts += " --enable-gold=default --enable-plugins " - ## self.configopts += " --enable-ld --with-plugin-ld=ld.gold" - ## enable bootstrap build for self-containment (unless for staged build) + # enable bootstrap build for self-containment (unless for staged build) if not self.stagedbuild: configopts += " --enable-bootstrap" else: @@ -222,7 +221,7 @@ def configure(self): else: # unstaged build, so just run standard configure/make/make install - ## set prefixes + # set prefixes self.log.info("Performing regular GCC build...") configopts += " --prefix=%(p)s --with-local-prefix=%(p)s" % {'p' : self.installdir } @@ -279,15 +278,15 @@ def make(self): # STAGE 2: build GMP/PPL/CLooG for stage 3 # - ## create dir to build GMP/PPL/CLooG in + # create dir to build GMP/PPL/CLooG in stage2dir = "stage2_stuff" stage2prefix = self.create_dir(stage2dir) - ## prepare directories to build GMP/PPL/CLooG + # prepare directories to build GMP/PPL/CLooG stage2_info = self.prep_extra_src_dirs("stage2", target_prefix=stage2prefix) configopts = stage2_info['configopts'] - ## build PPL and CLooG (GMP as dependency) + # build PPL and CLooG (GMP as dependency) for lib in ["gmp", "ppl", "cloog"]: @@ -312,10 +311,10 @@ def make(self): cmd = "./configure --prefix=%s --with-pic -disable-shared " % stage2prefix - ### only enable C/C++ interfaces (Java interface is sometimes troublesome) + # only enable C/C++ interfaces (Java interface is sometimes troublesome) cmd += "--enable-interfaces='c c++' " - ### enable watchdog (or not) + # enable watchdog (or not) if self.pplver <= LooseVersion("0.11"): if self.getcfg('pplwatchdog'): cmd += "--enable-watchdog " @@ -324,7 +323,7 @@ def make(self): elif self.getcfg('pplwatchdog'): self.log.error("Enabling PPL watchdog only supported in PPL <= v0.11 .") - ### make sure GMP we just built is found + # make sure GMP we just built is found cmd += "--with-gmp=%s " % stage2prefix elif lib == "cloog": @@ -335,7 +334,7 @@ def make(self): v0_16 = LooseVersion("0.16") cmd = "./configure --prefix=%s --with-pic --disable-shared " % stage2prefix - ### use isl or PPL + # use isl or PPL if self.getcfg('clooguseisl'): if self.cloogver >= v0_16: cmd += "--with-isl=bundled " @@ -349,7 +348,7 @@ def make(self): errormsg += "\nNeither using PPL or ISL-based ClooG, I'm out of options..." self.log.error(errormsg) - ### make sure GMP is found + # make sure GMP is found if self.cloogver >= v0_15 and self.cloogver < v0_16: cmd += "--with-gmp=%s " % stage2prefix elif self.cloogver >= v0_16: @@ -360,15 +359,15 @@ def make(self): else: self.log.error("Don't know how to configure for %s" % lib) - ### configure + # configure self.run_configure_cmd(cmd) - ### build and 'install' + # build and 'install' cmd = "make %s install" % paracmd run_cmd(cmd, log_all=True, simple=True) if lib == "gmp": - ### make sure correct GMP is found + # make sure correct GMP is found libpath = os.path.join(stage2prefix, 'lib') incpath = os.path.join(stage2prefix, 'include') @@ -379,22 +378,22 @@ def make(self): # STAGE 3: bootstrap build of final GCC (with PPL/CLooG support) # - ## create new obj dir and change into it + # create new obj dir and change into it self.create_dir("stage3_obj") - ## reconfigure for stage 3 build + # reconfigure for stage 3 build self.log.info("Stage 2 of 3-staged build completed, continuing with stage 2 (with CLooG and/or PPL support enabled)...") stage3_info = self.prep_extra_src_dirs("stage3") configopts = stage3_info['configopts'] configopts += " --prefix=%(p)s --with-local-prefix=%(p)s" % {'p' : self.installdir } - ## enable bootstrapping for self-containment + # enable bootstrapping for self-containment configopts += " --enable-bootstrap " - ## PPL config options + # PPL config options if self.getcfg('withppl'): - ### for PPL build and CLooG-PPL linking + # for PPL build and CLooG-PPL linking libstdcxxpath = "%s/lib64/libstdc++.a" % self.stage1installdir configopts += "--with-host-libstdcxx='-static-libgcc %s -lm' " % libstdcxxpath @@ -406,7 +405,7 @@ def make(self): else: configopts += "--disable-watchdog " - ## CLooG config options + # CLooG config options if self.getcfg('withcloog'): configopts += "--with-cloog=%s " % stage2prefix diff --git a/easybuild/easyblocks/h/hpl.py b/easybuild/easyblocks/h/hpl.py index 8b09476cb1..e27ea7060b 100644 --- a/easybuild/easyblocks/h/hpl.py +++ b/easybuild/easyblocks/h/hpl.py @@ -58,7 +58,7 @@ def configure(self, subdir=None): except OSError, err: self.log.exception("Failed to symlink Make.UNKNOWN from %s to %s: %s" % (setupdir, makeincfile, err)) - ## go back + # go back os.chdir(self.getcfg('startfrom')) def make(self): diff --git a/easybuild/easyblocks/i/imkl.py b/easybuild/easyblocks/i/imkl.py index 825881f75f..34e39aadb6 100644 --- a/easybuild/easyblocks/i/imkl.py +++ b/easybuild/easyblocks/i/imkl.py @@ -128,8 +128,8 @@ def postproc(self): except: self.log.exception("Can't write file %s" % (dest)) - #build the mkl interfaces (pic and no-pic) - ## load the dependencies + # build the mkl interfaces (pic and no-pic) + # load the dependencies m = Modules() m.addModule(self.dep) m.load() @@ -137,7 +137,7 @@ def postproc(self): if not self.getcfg('interfaces'): return - #Build the interfaces + # build the interfaces #- blas95 and lapack95 need more work, ignore for now #lis1=['blas95','fftw2xc','fftw2xf','lapack95'] @@ -155,13 +155,13 @@ def postproc(self): for i in lis1 + lis2 + lis3: if i in lis1: - ## Use INSTALL_DIR and CFLAGS and COPTS + # use INSTALL_DIR and CFLAGS and COPTS cmd = "make -f makefile libintel64" if i in lis2: - ## Use install_to and CFLAGS + # use install_to and CFLAGS cmd = "make -f makefile libintel64 install_to=$INSTALL_DIR" if i in lis3: - ## Use INSTALL_DIR and SPEC_OPT + # use INSTALL_DIR and SPEC_OPT extramakeopts = '' if os.getenv('SOFTROOTMPICH2'): extramakeopts = 'mpi=mpich2' @@ -175,7 +175,7 @@ def postproc(self): except: self.log.exception("Creating temporary directory failed") - ## always set INSTALL_DIR, SPEC_OPT, COPTS and CFLAGS + # always set INSTALL_DIR, SPEC_OPT, COPTS and CFLAGS env.set('INSTALL_DIR', tmpbuild) env.set('SPEC_OPT', opt) env.set('COPTS', opt) @@ -193,7 +193,7 @@ def postproc(self): for fil in os.listdir(tmpbuild): if opt == '-fPIC': - ## add _pic to filename + # add _pic to filename ff = fil.split('.') newfil = '.'.join(ff[:-1]) + '_pic.' + ff[-1] else: @@ -253,7 +253,7 @@ def postproc(self): except: self.log.exception("Can't write file %s" % (dest)) - ## load the dependencies + # load the dependencies m = Modules() m.addModule(self.dep) m.load() @@ -261,8 +261,8 @@ def postproc(self): if not self.getcfg('interfaces'): return - #Build the interfaces - #- blas95 and lapack95 need more work, ignore for now + # build the interfaces + # - blas95 and lapack95 need more work, ignore for now #lis1=['blas95','fftw2xc','fftw2x_cdft','fftw2xf','lapack95'] # blas95 and lapack also need include/.mod to be processed lis1 = ['fftw2xc', 'fftw2x_cdft', 'fftw2xf'] @@ -280,10 +280,10 @@ def postproc(self): for i in lis1 + lis2: if i in lis1: - ## Use INSTALL_DIR and SPEC_OPT + # use INSTALL_DIR and SPEC_OPT cmd = "make -f makefile %s" % interfacestarget if i in lis2: - ## Use install_to and CFLAGS + # use install_to and CFLAGS cmd = "make -f makefile %s install_to=$INSTALL_DIR" % interfacestarget @@ -294,7 +294,7 @@ def postproc(self): except: self.log.exception("Creating temporary directory failed") - ## always set INSTALL_DIR, SPEC_OPT and CFLAGS + # always set INSTALL_DIR, SPEC_OPT and CFLAGS env.set('INSTALL_DIR', tmpbuild) env.set('SPEC_OPT', opt) env.set('CFLAGS', opt) @@ -310,7 +310,7 @@ def postproc(self): for fil in os.listdir(tmpbuild): if opt == '-fPIC': - ## add _pic to filename + # add _pic to filename ff = fil.split('.') newfil = '.'.join(ff[:-1]) + '_pic.' + ff[-1] else: diff --git a/easybuild/easyblocks/i/impi.py b/easybuild/easyblocks/i/impi.py index 91c9d9e7f7..e943621f46 100644 --- a/easybuild/easyblocks/i/impi.py +++ b/easybuild/easyblocks/i/impi.py @@ -66,7 +66,7 @@ def make_install(self): """ % {'lic':self.license, 'ins':self.installdir} - ##already in correct directory + # already in correct directory silentcfg = os.path.join(os.getcwd(), "silent.cfg") try: f = open(silentcfg, 'w') @@ -74,7 +74,7 @@ def make_install(self): f.close() except: self.log.exception("Writing silent cfg file %s failed." % silent) - ## tmpdir + tmpdir = os.path.join(os.getcwd(), self.version(), 'mytmpdir') try: os.makedirs(tmpdir) diff --git a/easybuild/easyblocks/i/intelbase.py b/easybuild/easyblocks/i/intelbase.py index 70c03ce5ef..c65337c124 100644 --- a/easybuild/easyblocks/i/intelbase.py +++ b/easybuild/easyblocks/i/intelbase.py @@ -60,18 +60,18 @@ def clean_homedir(self): def configure(self): """Configure: handle license file and clean home dir.""" - ## obtain license path + # obtain license path self.license = self.getcfg('license') if self.license: self.log.info("Using license %s" % self.license) else: self.log.error("No license defined") - ## verify license path + # verify license path if not os.path.exists(self.license): self.log.error("Can't find license at %s" % self.license) - ## set INTEL_LICENSE_FILE + # set INTEL_LICENSE_FILE env.set("INTEL_LICENSE_FILE", self.license) # clean home directory @@ -97,7 +97,7 @@ def make_install(self): CONTINUE_WITH_OPTIONAL_ERROR=yes """ % (self.getcfg('license_activation'), self.license, self.installdir) - ## we should be already in the correct directory + # we should be already in the correct directory silentcfg = os.path.join(os.getcwd(), "silent.cfg") try: f = open(silentcfg, 'w') @@ -106,7 +106,7 @@ def make_install(self): except: self.log.exception("Writing silent cfg % failed" % silent) - ## workaround for mktmp: create tmp dir and use it + # workaround for mktmp: create tmp dir and use it tmpdir = os.path.join(self.getcfg('startfrom'), 'mytmpdir') try: os.makedirs(tmpdir) @@ -117,13 +117,13 @@ def make_install(self): env.set('TMP_PATH', tmpdir) tmppathopt = "-t %s" % tmpdir - ## set some extra env variables + # set some extra env variables env.set('LOCAL_INSTALL_VERBOSE','1') env.set('VERBOSE_MODE', '1') env.set('INSTALL_PATH', self.installdir) - ## perform installation + # perform installation cmd = "./install.sh %s -s %s" % (tmppathopt, silentcfg) return run_cmd(cmd, log_all=True, simple=True) diff --git a/easybuild/easyblocks/i/itac.py b/easybuild/easyblocks/i/itac.py index 5ff79eb461..f116397a33 100644 --- a/easybuild/easyblocks/i/itac.py +++ b/easybuild/easyblocks/i/itac.py @@ -56,12 +56,12 @@ def make_install(self): EULA=accept """ % {'lic':self.license, 'ins':self.installdir, 'mpi':self.getcfg('preferredmpi')} - ## already in correct directory + # already in correct directory silentcfg = os.path.join(os.getcwd(), "silent.cfg") f = open(silentcfg, 'w') f.write(silent) f.close() - ## tmpdir + tmpdir = os.path.join(os.getcwd(), self.version(), 'mytmpdir') try: os.makedirs(tmpdir) diff --git a/easybuild/easyblocks/l/lapack.py b/easybuild/easyblocks/l/lapack.py index b45829b92a..b21d1a88e8 100644 --- a/easybuild/easyblocks/l/lapack.py +++ b/easybuild/easyblocks/l/lapack.py @@ -146,14 +146,14 @@ def make_install(self): try: os.makedirs(destdir) - ## copy all .a files + # copy all .a files os.chdir(srcdir) for lib in glob.glob('*.a'): srcfile = os.path.join(srcdir, lib) self.log.debug("Copying file %s to dir %s" % (srcfile, destdir)) shutil.copy2(srcfile, destdir) - ## symlink libraries to sensible names, if they aren't renamed already + # symlink libraries to sensible names, if they aren't renamed already for (fromfile, tofile) in [('liblapack_LINUX.a', 'liblapack.a'), ('tmglib_LINUX.a', 'libtmglib.a')]: frompath = os.path.join(destdir, fromfile) diff --git a/easybuild/easyblocks/n/ncl.py b/easybuild/easyblocks/n/ncl.py index 153d418d58..5a16d9ff26 100644 --- a/easybuild/easyblocks/n/ncl.py +++ b/easybuild/easyblocks/n/ncl.py @@ -107,7 +107,7 @@ def configure(self): # let's just generate the config/Site.local file ourselves... # order of deps is important - ## HDF needs to go after netCDF, because both have a netcdf.h include file + # HDF needs to go after netCDF, because both have a netcdf.h include file deps = ["HDF5", "JasPer", "netCDF", "HDF", "g2lib", "g2clib", "Szip"] libs = '' diff --git a/easybuild/easyblocks/p/python.py b/easybuild/easyblocks/p/python.py index 9eda703000..2dd6eae2fe 100644 --- a/easybuild/easyblocks/p/python.py +++ b/easybuild/easyblocks/p/python.py @@ -201,7 +201,7 @@ def make(self): if ldflags: # LDFLAGS should not be set when building numpy/scipy, because it overwrites whatever numpy/scipy sets # see http://projects.scipy.org/numpy/ticket/182 - ## don't unset it with os.environ.pop('LDFLAGS'), doesn't work in Python 2.4 (see http://bugs.python.org/issue1287) + # don't unset it with os.environ.pop('LDFLAGS'), doesn't work in Python 2.4 (see http://bugs.python.org/issue1287) cmdprefix = "unset LDFLAGS && " self.log.debug("LDFLAGS was %s, will be cleared before numpy build with '%s'" % (ldflags, cmdprefix)) diff --git a/easybuild/easyblocks/s/scalapack.py b/easybuild/easyblocks/s/scalapack.py index 248db50eba..cc58d47b95 100644 --- a/easybuild/easyblocks/s/scalapack.py +++ b/easybuild/easyblocks/s/scalapack.py @@ -49,7 +49,7 @@ def configure(self): # make sure required dependencies are available deps = ["LAPACK"] - ## BLACS is only a dependency for ScaLAPACK versions prior to v2.0.0 + # BLACS is only a dependency for ScaLAPACK versions prior to v2.0.0 if self.loosever < LooseVersion("2.0.0"): deps.append("BLACS") for dep in deps: diff --git a/easybuild/easyblocks/w/wps.py b/easybuild/easyblocks/w/wps.py index 33bea6d5c4..2b95801209 100644 --- a/easybuild/easyblocks/w/wps.py +++ b/easybuild/easyblocks/w/wps.py @@ -245,7 +245,7 @@ def run_wps_cmd(cmdname): line = re.sub(r"^(\s*geog_data_path\s*=\s*).*$", r"\1 '%s'" % tmpdir, line) sys.stdout.write(line) - ## GEOGRID.TBL + # GEOGRID.TBL geogrid_dir = os.path.join(tmpdir, "geogrid") os.mkdir(geogrid_dir) os.symlink(os.path.join(wpsdir, "geogrid", "GEOGRID.TBL.ARW"), diff --git a/easybuild/easyblocks/w/wrf.py b/easybuild/easyblocks/w/wrf.py index 1c9178aed6..8a0380aa8d 100644 --- a/easybuild/easyblocks/w/wrf.py +++ b/easybuild/easyblocks/w/wrf.py @@ -151,7 +151,7 @@ def configure(self): # rewrite optimization options if desired if self.getcfg('rewriteopts'): - ## replace default -O3 option in configure.wrf with CFLAGS/FFLAGS from environment + # replace default -O3 option in configure.wrf with CFLAGS/FFLAGS from environment self.log.info("Rewriting optimization options in %s" % cfgfile) @@ -227,7 +227,7 @@ def test(self): # prepare run command - ## stack limit needs to be set to unlimited for WRF to work well + # stack limit needs to be set to unlimited for WRF to work well if self.getcfg('buildtype') in self.parallel_build_types: test_cmd = "ulimit -s unlimited && %s && %s" % (self.tk.mpi_cmd_for("./ideal.exe", 1), self.tk.mpi_cmd_for("./wrf.exe", n)) From 56b3b8829db2660b9a5dd95b02c2006d30e72443 Mon Sep 17 00:00:00 2001 From: Kenneth Hoste Date: Fri, 3 Aug 2012 10:02:35 +0200 Subject: [PATCH 248/798] processed code style remark --- easybuild/framework/application.py | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/easybuild/framework/application.py b/easybuild/framework/application.py index ed497e02d1..8c31a92a15 100644 --- a/easybuild/framework/application.py +++ b/easybuild/framework/application.py @@ -287,10 +287,11 @@ def addpatch(self, listOfPatches=None): if path: self.log.debug('File %s found for patch %s' % (path, patchFile)) tmppatch = {'name':pf, 'path':path} - if suff and copy: - tmppatch['copy'] = suff - elif suff: - tmppatch['sourcepath'] = suff + if suff: + if copy: + tmppatch['copy'] = suff + else: + tmppatch['sourcepath'] = suff if level: tmppatch['level'] = level self.patches.append(tmppatch) From a9440b6a3d9be9554950b1fe1a918eca1d5ed223 Mon Sep 17 00:00:00 2001 From: Toon Willems Date: Fri, 3 Aug 2012 10:36:58 +0200 Subject: [PATCH 249/798] clean up of all the easyblocks --- easybuild/build.py | 2 +- easybuild/easyblocks/a/atlas.py | 20 ++-- easybuild/easyblocks/b/binary.py | 4 +- easybuild/easyblocks/b/blacs.py | 62 ++++++----- easybuild/easyblocks/c/cp2k.py | 131 +++++++++++------------ easybuild/easyblocks/d/doxygen.py | 9 +- easybuild/easyblocks/g/g2clib.py | 6 +- easybuild/easyblocks/g/g2lib.py | 9 +- easybuild/easyblocks/g/gcc.py | 68 ++++++------ easybuild/easyblocks/h/hdf5.py | 27 ++--- easybuild/easyblocks/h/hpl.py | 17 +-- easybuild/easyblocks/i/icc.py | 30 +++--- easybuild/easyblocks/i/ifort.py | 11 +- easybuild/easyblocks/i/imkl.py | 102 +++++++++--------- easybuild/easyblocks/i/intelbase.py | 16 +-- easybuild/easyblocks/i/ipp.py | 14 +-- easybuild/easyblocks/i/itac.py | 28 ++--- easybuild/easyblocks/l/lapack.py | 22 ++-- easybuild/easyblocks/l/libsmm.py | 40 +++---- easybuild/easyblocks/m/maple.py | 34 +++--- easybuild/easyblocks/m/mrbayes.py | 9 +- easybuild/easyblocks/m/mvapich2.py | 34 +++--- easybuild/easyblocks/n/ncl.py | 42 ++++---- easybuild/easyblocks/n/netcdf.py | 16 +-- easybuild/easyblocks/n/netcdf_fortran.py | 18 ++-- easybuild/easyblocks/o/openfoam.py | 5 +- easybuild/easyblocks/p/python.py | 15 +-- easybuild/easyblocks/s/scalapack.py | 29 ++--- easybuild/easyblocks/t/tarball.py | 7 +- easybuild/easyblocks/t/toolkit.py | 2 +- easybuild/easyblocks/w/wps.py | 70 ++++++------ easybuild/easyblocks/w/wrf.py | 57 +++++----- 32 files changed, 495 insertions(+), 461 deletions(-) diff --git a/easybuild/build.py b/easybuild/build.py index d9101ea80d..337579a047 100644 --- a/easybuild/build.py +++ b/easybuild/build.py @@ -90,7 +90,7 @@ def add_build_options(parser): parser.add_option("--strict", type="choice", choices=strictness_options, help="set strictness \ level (possible levels: %s" % ', '.join(strictness_options)) # only allow --job so we can filter it afterwards - parser.add_option("--job" , action="store_true", help="will submit the build as a job") + parser.add_option("--job", action="store_true", help="will submit the build as a job") def main(): diff --git a/easybuild/easyblocks/a/atlas.py b/easybuild/easyblocks/a/atlas.py index 559d29e7cd..792a3f52d6 100644 --- a/easybuild/easyblocks/a/atlas.py +++ b/easybuild/easyblocks/a/atlas.py @@ -35,9 +35,10 @@ def __init__(self, *args, **kwargs): Application.__init__(self, *args, **kwargs) def extra_options(self): - extra_vars = { 'ignorethrottling':[False, "Ignore check done by ATLAS for CPU throttling (not recommended) (default: False)"], - 'full_lapack': [False, "Build a full LAPACK library (requires netlib's LAPACK) (default: False)"], - 'sharedlibs':[False, "Enable building of shared libs as well (default: False)"] + extra_vars = { + 'ignorethrottling': [False, "Ignore check done by ATLAS for CPU throttling (not recommended) (default: False)"], + 'full_lapack': [False, "Build a full LAPACK library (requires netlib's LAPACK) (default: False)"], + 'sharedlibs': [False, "Enable building of shared libs as well (default: False)"] } return Application.extra_options(self, extra_vars) @@ -76,9 +77,9 @@ def configure(self): # specify compilers self.updatecfg('configopts', '-C ic %(cc)s -C if %(f77)s' % { - 'cc':os.getenv('CC'), - 'f77':os.getenv('F77') - }) + 'cc':os.getenv('CC'), + 'f77':os.getenv('F77') + }) # call configure in parent dir cmd = "%s %s/configure --prefix=%s %s" % (self.getcfg('preconfigopts'), self.getcfg('startfrom'), @@ -184,10 +185,11 @@ def sanitycheck(self): else: shared_libs = [] - self.setcfg('sanityCheckPaths', {'files':["include/%s" % x for x in ["cblas.h", "clapack.h"]] + + self.setcfg('sanityCheckPaths', { + 'files': ["include/%s" % x for x in ["cblas.h", "clapack.h"]] + static_libs + shared_libs, - 'dirs':["include/atlas"] - }) + 'dirs': ["include/atlas"] + }) self.log.info("Customized sanity check paths: %s" % self.getcfg('sanityCheckPaths')) diff --git a/easybuild/easyblocks/b/binary.py b/easybuild/easyblocks/b/binary.py index e4e83ccd51..0c8cabe619 100644 --- a/easybuild/easyblocks/b/binary.py +++ b/easybuild/easyblocks/b/binary.py @@ -23,8 +23,10 @@ """ import shutil import os + from easybuild.framework.application import Application + class Binary(Application): """Support for installing a binary package. Just unpack it and copy it to the installdir""" @@ -38,7 +40,7 @@ def make(self): pass def make_installdir(self): - """Do not actually create installdir, copytree in make_install doesn't + """Do not actually create installdir, copytree in make_install doesn't want the destination directory already exist But in python < 2.5 the actual path leading up to the directory has to exist.""" self.make_dir(self.installdir, clean=True, dontcreateinstalldir=True) diff --git a/easybuild/easyblocks/b/blacs.py b/easybuild/easyblocks/b/blacs.py index 7a89dd8ed8..3dfa374f01 100644 --- a/easybuild/easyblocks/b/blacs.py +++ b/easybuild/easyblocks/b/blacs.py @@ -22,14 +22,16 @@ import re import os import shutil + from easybuild.framework.application import Application from easybuild.tools.filetools import run_cmd + def det_interface(log, path): """Determine interface through xintface""" - + (out, _) = run_cmd(os.path.join(path,"xintface"), log_all=True, simple=False) - + intregexp = re.compile(".*INTFACE\s*=\s*-D(\S+)\s*") res = intregexp.search(out) if res: @@ -77,14 +79,14 @@ def make(self): mpif77 = 'mpif77' opts = { - 'mpicc':mpicc, - 'mpif77':mpif77, - 'f77':os.getenv('F77'), - 'cc':os.getenv('CC'), - 'builddir':os.getcwd(), - 'base':base, - 'mpilib':mpilib - } + 'mpicc': mpicc, + 'mpif77': mpif77, + 'f77': os.getenv('F77'), + 'cc': os.getenv('CC'), + 'builddir': os.getcwd(), + 'base': base, + 'mpilib': mpilib + } # determine interface and transcomm settings comm = '' @@ -97,7 +99,7 @@ def make(self): cmd = "make" cmd += " CC='%(mpicc)s' F77='%(mpif77)s -I$(MPIINCdir)' MPIdir=%(base)s" \ " MPILIB='%(mpilib)s' BTOPdir=%(builddir)s INTERFACE=NONE" % opts - + # determine interface using xintface run_cmd("%s xintface" % cmd, log_all=True, simple=True) @@ -117,17 +119,17 @@ def make(self): if not notregexp.search(out): # if it doesn't say '_NOT_', set it comm = "TRANSCOMM='-DCSameF77'" - + else: (_, ec) = run_cmd("%s xtc_UseMpich" % cmd, log_all=False, log_ok=False, simple=False) if ec == 0: - + (out, _) = run_cmd("mpirun -np 2 ./EXE/xtc_UseMpich", log_all=True, simple=False) - + if not notregexp.search(out): - + commregexp = re.compile('Set TRANSCOMM\s*=\s*(.*)$') - + res = commregexp.search(out) if res: # found how to set TRANSCOMM, so set it @@ -143,10 +145,11 @@ def make(self): except OSError, err: self.log.error("Failed to determine interface and transcomm settings: %s" % err) - opts.update({'comm':comm, - 'int':interface, - 'base':base, - }) + opts.update({ + 'comm': comm, + 'int': interface, + 'base': base + }) add_makeopts = ' MPICC=%(mpicc)s MPIF77=%(mpif77)s %(comm)s ' % opts add_makeopts += ' INTERFACE=%(int)s MPIdir=%(base)s BTOPdir=%(builddir)s mpi ' % opts @@ -181,24 +184,25 @@ def make_install(self): try: os.makedirs(dest) - + shutil.copy2(src, dest) - + self.log.debug("Copied %s to %s" % (src, dest)) - + except OSError, err: self.log.error("Copying %s to installation dir %s failed: %s" % (src, dest, err)) def sanitycheck(self): if not self.getcfg('sanityCheckPaths'): - self.setcfg('sanityCheckPaths',{'files':[fil for filptrn in ["blacs", "blacsCinit", "blacsF77init"] - for fil in ["lib/lib%s.a"%filptrn, - "lib/%s_MPI-LINUX-0.a"%filptrn]] + - ["bin/xintface"], - 'dirs':[] + self.setcfg('sanityCheckPaths',{ + 'files': [fil for filptrn in ["blacs", "blacsCinit", "blacsF77init"] + for fil in ["lib/lib%s.a" % filptrn, + "lib/%s_MPI-LINUX-0.a" % filptrn]] + + ["bin/xintface"], + 'dirs': [] }) - self.log.info("Customized sanity check paths: %s"%self.getcfg('sanityCheckPaths')) + self.log.info("Customized sanity check paths: %s" % self.getcfg('sanityCheckPaths')) Application.sanitycheck(self) diff --git a/easybuild/easyblocks/c/cp2k.py b/easybuild/easyblocks/c/cp2k.py index dd9b635ff1..b9b04317c4 100644 --- a/easybuild/easyblocks/c/cp2k.py +++ b/easybuild/easyblocks/c/cp2k.py @@ -18,16 +18,17 @@ # You should have received a copy of the GNU General Public License # along with EasyBuild. If not, see . ## -from distutils.version import LooseVersion import fileinput import glob import re import os import shutil import sys +from distutils.version import LooseVersion + +import easybuild.tools.toolkit as toolkit from easybuild.framework.application import Application from easybuild.tools.filetools import run_cmd -import easybuild.tools.toolkit as toolkit class CP2K(Application): """ @@ -58,16 +59,17 @@ def __init__(self, *args, **kwargs): self.make_instructions = '' def extra_options(self): - extra_vars = {'type':['popt',"Type of build ('popt' or 'psmp') (default: 'popt)"], - 'typeopt':[True,"Enable optimization (default: True)"], - 'libint':[True,"Use LibInt (default: True)"], - 'modincprefix':['',"IMKL prefix for modinc include dir (default: '')"], - 'modinc':[[],"List of modinc's to use (*.f90), or 'True' to use all found at given prefix (default: [])"], - 'extracflags':['',"Extra CFLAGS to be added (default: '')"], - 'extradflags':['',"Extra DFLAGS to be added (default: '')"], - 'runtest':[True, 'Indicates if a regression test should be run after make (default: True)'], - 'ignore_regtest_fails':[False, "Ignore failures in regression test (should be used with care) (default: False)."], - 'maxtasks':[3, "Maximum number of CP2K instances run at the same time during testing (default: 3)"] + extra_vars = { + 'type': ['popt', "Type of build ('popt' or 'psmp') (default: 'popt)"], + 'typeopt': [True, "Enable optimization (default: True)"], + 'libint': [True, "Use LibInt (default: True)"], + 'modincprefix': ['', "IMKL prefix for modinc include dir (default: '')"], + 'modinc': [[], "List of modinc's to use (*.f90), or 'True' to use all found at given prefix (default: [])"], + 'extracflags': ['', "Extra CFLAGS to be added (default: '')"], + 'extradflags': ['', "Extra DFLAGS to be added (default: '')"], + 'runtest': [True, 'Indicates if a regression test should be run after make (default: True)'], + 'ignore_regtest_fails': [False, "Ignore failures in regression test (should be used with care) (default: False)."], + 'maxtasks': [3, "Maximum number of CP2K instances run at the same time during testing (default:3)"] } return Application.extra_options(self, extra_vars) @@ -200,9 +202,9 @@ def prepmodinc(self): ## create modinc files for f in modfiles: - if f77.endswith('ifort') : + if f77.endswith('ifort'): cmd = "%s -module %s -c %s" % (f77, modincpath, f) - elif f77 in ['gfortran', 'mpif77'] : + elif f77 in ['gfortran', 'mpif77']: cmd = "%s -J%s -c %s" % (f77, modincpath, f) else: self.log.error("prepmodinc: Unknown value specified for F77 (%s)" % f77) @@ -243,32 +245,30 @@ def configureCommon(self): self.log.error("CP2K needs MPI-2, no known MPI-2 supporting library loaded?") options = { - 'CC': os.getenv('MPICC'), - 'CPP': '', - - 'FC': '%s %s' % (os.getenv('MPIF77'), self.openmp), - 'LD': '%s %s' % (os.getenv('MPIF77'), self.openmp), - 'AR': 'ar -r', + 'CC': os.getenv('MPICC'), + 'CPP': '', + 'FC': '%s %s' % (os.getenv('MPIF77'), self.openmp), + 'LD': '%s %s' % (os.getenv('MPIF77'), self.openmp), + 'AR': 'ar -r', + 'CPPFLAGS': '', - 'CPPFLAGS': '', + 'FPIC': self.fpic, + 'DEBUG': self.debug, - 'FPIC': self.fpic, - 'DEBUG': self.debug, + 'FCFLAGS': '$(FCFLAGS%s)' % optflags, + 'FCFLAGS2': '$(FCFLAGS%s)' % regflags, - 'FCFLAGS': '$(FCFLAGS%s)' % optflags, - 'FCFLAGS2': '$(FCFLAGS%s)' % regflags, + 'CFLAGS': ' %s %s $(FPIC) $(DEBUG) %s ' % (os.getenv('SOFTVARCPPFLAGS'), + os.getenv('SOFTVARLDFLAGS'), + self.getcfg('extracflags')), + 'DFLAGS': ' -D__parallel -D__BLACS -D__SCALAPACK -D__FFTSG %s' % self.getcfg('extradflags'), - 'CFLAGS' : ' %s %s $(FPIC) $(DEBUG) %s ' % (os.getenv('SOFTVARCPPFLAGS'), - os.getenv('SOFTVARLDFLAGS'), - self.getcfg('extracflags')), - 'DFLAGS': ' -D__parallel -D__BLACS -D__SCALAPACK -D__FFTSG %s' % self.getcfg('extradflags'), + 'LIBS': os.getenv('LIBS'), - 'LIBS': os.getenv('LIBS'), - - 'FCFLAGSNOOPT': '$(DFLAGS) $(CFLAGS) -O0 $(FREE) $(FPIC) $(DEBUG)', - 'FCFLAGSOPT': '-O2 $(FREE) $(SAFE) $(FPIC) $(DEBUG)', - 'FCFLAGSOPT2': '-O1 $(FREE) $(SAFE) $(FPIC) $(DEBUG)', - } + 'FCFLAGSNOOPT': '$(DFLAGS) $(CFLAGS) -O0 $(FREE) $(FPIC) $(DEBUG)', + 'FCFLAGSOPT': '-O2 $(FREE) $(SAFE) $(FPIC) $(DEBUG)', + 'FCFLAGSOPT2': '-O1 $(FREE) $(SAFE) $(FPIC) $(DEBUG)' + } if self.getcfg('libint'): @@ -329,19 +329,17 @@ def configureIntelBased(self): extrainc = '-I%s' % self.modincpath options.update({ + ## -Vaxlib : older options + 'FREE': '-fpp -free', - ## -Vaxlib : older options - 'FREE': '-fpp -free', - - #SAFE = -assume protect_parens -fp-model precise -ftz # problems - 'SAFE': '-assume protect_parens -no-unroll-aggressive', + #SAFE = -assume protect_parens -fp-model precise -ftz # problems + 'SAFE': '-assume protect_parens -no-unroll-aggressive', - 'INCFLAGS': '$(DFLAGS) -I$(INTEL_INC) -I$(INTEL_INCF) %s' % extrainc, + 'INCFLAGS': '$(DFLAGS) -I$(INTEL_INC) -I$(INTEL_INCF) %s' % extrainc, - 'LDFLAGS': '$(INCFLAGS) -i-static', - 'OBJECTS_ARCHITECTURE': 'machine_intel.o', - - }) + 'LDFLAGS': '$(INCFLAGS) -i-static', + 'OBJECTS_ARCHITECTURE': 'machine_intel.o', + }) options['DFLAGS'] += ' -D__INTEL' @@ -365,13 +363,12 @@ def configureGCCBased(self): options = self.configureCommon() options.update({ + ## need this to prevent "Unterminated character constant beginning" errors + 'FREE': '-ffree-form -ffree-line-length-none', - ## need this to prevent "Unterminated character constant beginning" errors - 'FREE': '-ffree-form -ffree-line-length-none', - - 'LDFLAGS': '$(FCFLAGS)', - 'OBJECTS_ARCHITECTURE': 'machine_gfortran.o', - }) + 'LDFLAGS': '$(FCFLAGS)', + 'OBJECTS_ARCHITECTURE': 'machine_gfortran.o', + }) options['DFLAGS'] += ' -D__GFORTRAN' @@ -409,9 +406,9 @@ def configureMKL(self, options): """Configure for Intel Math Kernel Library (MKL)""" options.update({ - 'INTEL_INC': '$(MKLROOT)/include', - 'INTEL_INCF': '$(INTEL_INC)/fftw', - }) + 'INTEL_INC': '$(MKLROOT)/include', + 'INTEL_INCF': '$(INTEL_INC)/fftw', + }) options['DFLAGS'] += ' -D__FFTW3 -D__FFTMKL' @@ -433,7 +430,7 @@ def configureFFTW(self, options): 'FFTW_INC': '%s/include' % softroot, # GCC 'FFTW3INC': '%s/include' % softroot, # Intel 'FFTW3LIB': '%s/lib' % softroot, # Intel - }) + }) options['DFLAGS'] += ' -D__FFTW3' @@ -535,11 +532,12 @@ def test(self): dir_triplet=%(triplet)s leakcheck="YES" maxtasks=%(maxtasks)s - """ % {'f90':os.getenv('F90'), - 'base':self.builddir, - 'cp2k_version':self.getcfg('type'), - 'triplet':self.typearch, - 'maxtasks':self.getcfg('maxtasks') + """ % { + 'f90': os.getenv('F90'), + 'base': self.builddir, + 'cp2k_version': self.getcfg('type'), + 'triplet': self.typearch, + 'maxtasks': self.getcfg('maxtasks') } cfg_fn = "cp2k_regtest.cfg" @@ -635,9 +633,7 @@ def make_install(self): if os.path.isfile(exefile): shutil.copy2(exefile, targetdir) except OSError, err: - self.log.error("Copying executables from %s to bin dir %s failed: %s" % (exedir, - targetdir, - err) ) + self.log.error("Copying executables from %s to bin dir %s failed: %s" % (exedir, targetdir, err)) # copy tests srctests = os.path.join(self.getcfg('startfrom'), 'tests') @@ -668,10 +664,11 @@ def sanitycheck(self): if not self.getcfg('sanityCheckPaths'): cp2k_type = self.getcfg('type') - self.setcfg('sanityCheckPaths',{'files':["bin/%s.%s" % (x, cp2k_type) for x in ["cp2k", - "cp2k_shell", - "fes"]], - 'dirs':["tests"] + self.setcfg('sanityCheckPaths',{ + 'files': ["bin/%s.%s" % (x, cp2k_type) for x in ["cp2k", + "cp2k_shell", + "fes"]], + 'dirs': ["tests"] }) self.log.info("Customized sanity check paths: %s" % self.getcfg('sanityCheckPaths')) diff --git a/easybuild/easyblocks/d/doxygen.py b/easybuild/easyblocks/d/doxygen.py index f80d464a78..01fd00d1dd 100644 --- a/easybuild/easyblocks/d/doxygen.py +++ b/easybuild/easyblocks/d/doxygen.py @@ -37,10 +37,11 @@ def sanitycheck(self): """ if not self.getcfg('sanityCheckPaths'): - self.setcfg('sanityCheckPaths',{'files':["bin/doxygen"], - 'dirs':[] + self.setcfg('sanityCheckPaths',{ + 'files': ["bin/doxygen"], + 'dirs': [] }) - self.log.info("Customized sanity check paths: %s"%self.getcfg('sanityCheckPaths')) + self.log.info("Customized sanity check paths: %s" % self.getcfg('sanityCheckPaths')) - Application.sanitycheck(self) \ No newline at end of file + Application.sanitycheck(self) diff --git a/easybuild/easyblocks/g/g2clib.py b/easybuild/easyblocks/g/g2clib.py index beaebb2a24..5afce6ba5f 100644 --- a/easybuild/easyblocks/g/g2clib.py +++ b/easybuild/easyblocks/g/g2clib.py @@ -21,6 +21,7 @@ import glob import os import shutil + from easybuild.framework.application import Application class G2clib(Application): @@ -69,8 +70,9 @@ def sanitycheck(self): """Custom sanity check for g2clib.""" if not self.getcfg('sanityCheckPaths'): - self.setcfg('sanityCheckPaths', {'files':["lib/libgrib2c.a"], - 'dirs':["include"] + self.setcfg('sanityCheckPaths', { + 'files': ["lib/libgrib2c.a"], + 'dirs': ["include"] }) Application.sanitycheck(self) diff --git a/easybuild/easyblocks/g/g2lib.py b/easybuild/easyblocks/g/g2lib.py index 9cc357ba00..c778721784 100644 --- a/easybuild/easyblocks/g/g2lib.py +++ b/easybuild/easyblocks/g/g2lib.py @@ -20,6 +20,7 @@ ## import os import shutil + from easybuild.framework.application import Application class G2lib(Application): @@ -49,8 +50,7 @@ def make_install(self): targetdir = os.path.join(self.installdir, "lib") os.mkdir(targetdir) fn = "libg2.a" - shutil.copyfile(os.path.join(self.getcfg('startfrom'), fn), - os.path.join(targetdir, fn)) + shutil.copyfile(os.path.join(self.getcfg('startfrom'), fn), os.path.join(targetdir, fn)) except OSError, err: self.log.error("Failed to copy files to install dir: %s" % err) @@ -58,8 +58,9 @@ def sanitycheck(self): """Custom sanity check for g2lib.""" if not self.getcfg('sanityCheckPaths'): - self.setcfg('sanityCheckPaths', {'files':["lib/libg2.a"], - 'dirs':[] + self.setcfg('sanityCheckPaths', { + 'files': ["lib/libg2.a"], + 'dirs': [] }) Application.sanitycheck(self) diff --git a/easybuild/easyblocks/g/gcc.py b/easybuild/easyblocks/g/gcc.py index b8c26f0100..849ae856ac 100644 --- a/easybuild/easyblocks/g/gcc.py +++ b/easybuild/easyblocks/g/gcc.py @@ -24,11 +24,11 @@ from copy import copy from distutils.version import LooseVersion +import easybuild.tools.environment as env from easybuild.framework.application import Application from easybuild.tools.filetools import run_cmd from easybuild.tools.systemtools import get_kernel_name, get_shared_lib_ext, get_platform_name -import easybuild.tools.environment as env class GCC(Application): """ @@ -42,16 +42,16 @@ def __init__(self, *args, **kwargs): self.stagedbuild = False def extra_options(self): - extra_vars = {'languages':[[], "List of languages to build GCC for (--enable-languages) (default: [])"], - 'withlto':[True, "Enable LTO support (default: True)"], - 'withcloog':[False, "Build GCC with CLooG support (default: False)."], - 'withppl':[False, "Build GCC with PPL support (default: False)."], - 'pplwatchdog':[False, "Enable PPL watchdog (default: False)"], - 'clooguseisl':[False, "Use ISL with CLooG or not (use PPL otherwise) (default: False)"] + extra_vars = { + 'languages': [[], "List of languages to build GCC for (--enable-languages) (default: [])"], + 'withlto': [True, "Enable LTO support (default: True)"], + 'withcloog': [False, "Build GCC with CLooG support (default: False)."], + 'withppl': [False, "Build GCC with PPL support (default: False)."], + 'pplwatchdog': [False, "Enable PPL watchdog (default: False)"], + 'clooguseisl': [False, "Use ISL with CLooG or not (use PPL otherwise) (default: False)"] } return Application.extra_options(self, extra_vars) - def create_dir(self, dirname): """ Create a dir to build in. @@ -112,15 +112,16 @@ def prep_extra_src_dirs(self, stage, target_prefix=None): for d in all_dirs: for sd in extra_src_dirs: if d.startswith(sd): - found_src_dirs.append({'source_dir':d, - 'target_dir':sd - }) + found_src_dirs.append({ + 'source_dir': d, + 'target_dir': sd + }) # expected format: name[-subname]-version ds = os.path.basename(d).split('-') name = '-'.join(ds[0:-1]) - names.update({sd:name}) + names.update({sd: name}) ver = ds[-1] - versions.update({sd:ver}) + versions.update({sd: ver}) # we need to find all dirs specified, or else... if not len(found_src_dirs) == len(extra_src_dirs): @@ -145,10 +146,10 @@ def prep_extra_src_dirs(self, stage, target_prefix=None): self.log.debug("Prepared extra src dirs for %s: %s (configopts: %s)" % (stage, found_src_dirs, configopts)) return { - 'configopts':configopts, - 'names':names, - 'versions':versions - } + 'configopts': configopts, + 'names': names, + 'versions': versions + } def run_configure_cmd(self, cmd): """ @@ -226,7 +227,7 @@ def configure(self): # unstaged build, so just run standard configure/make/make install ## set prefixes self.log.info("Performing regular GCC build...") - configopts += " --prefix=%(p)s --with-local-prefix=%(p)s" % {'p' : self.installdir } + configopts += " --prefix=%(p)s --with-local-prefix=%(p)s" % {'p' : self.installdir} # III) create obj dir to build in, and change to it # GCC doesn't like to be built in the source dir @@ -237,10 +238,10 @@ def configure(self): # IV) actual configure, but not on default path cmd = "%s ../configure %s %s" % ( - self.getcfg('preconfigopts'), - self.configopts, - configopts - ) + self.getcfg('preconfigopts'), + self.configopts, + configopts + ) # instead of relying on uname, we run the same command GCC uses to # determine the platform @@ -272,9 +273,9 @@ def make(self): env.set('PATH', path) ld_lib_path = "%(dir)s/lib64:%(dir)s/lib:%(val)s" % { - 'dir':self.stage1installdir, - 'val':os.getenv('LD_LIBRARY_PATH') - } + 'dir': self.stage1installdir, + 'val': os.getenv('LD_LIBRARY_PATH') + } env.set('LD_LIBRARY_PATH', ld_lib_path) # @@ -420,7 +421,7 @@ def make(self): self.getcfg('preconfigopts'), self.configopts, configopts - ) + ) self.run_configure_cmd(cmd) # build with bootstrapping for self-containment @@ -483,9 +484,10 @@ def sanitycheck(self): lib64_files = ["lib64/%s" % x for x in lib64_files] libexec_files = ["libexec/%s/%s" % (common_infix, x) for x in libexec_files] - self.setcfg('sanityCheckPaths', {'files':bin_files + lib64_files + libexec_files, - 'dirs':dirs - }) + self.setcfg('sanityCheckPaths', { + 'files': bin_files + lib64_files + libexec_files, + 'dirs': dirs + }) self.log.info("Customized sanity check paths: %s" % self.getcfg('sanityCheckPaths')) @@ -496,8 +498,8 @@ def makeModuleReqGuess(self): Make sure all GCC libs are in LD_LIBRARY_PATH """ return { - 'PATH':['bin'], - 'LD_LIBRARY_PATH':['lib', 'lib64', - 'lib/gcc/%s' % (self.platform_lib, self.getcfg('version'))], - 'MANPATH':['man', 'share/man'] + 'PATH': ['bin'], + 'LD_LIBRARY_PATH': ['lib', 'lib64', + 'lib/gcc/%s' % (self.platform_lib, self.getcfg('version'))], + 'MANPATH': ['man', 'share/man'] } diff --git a/easybuild/easyblocks/h/hdf5.py b/easybuild/easyblocks/h/hdf5.py index b033e733d9..a725728a4b 100644 --- a/easybuild/easyblocks/h/hdf5.py +++ b/easybuild/easyblocks/h/hdf5.py @@ -19,6 +19,7 @@ # along with EasyBuild. If not, see . ## import os + from easybuild.framework.application import Application class HDF5(Application): @@ -49,7 +50,6 @@ def configure(self): Application.configure(self) - # default make and make install are ok def sanitycheck(self): @@ -63,19 +63,20 @@ def sanitycheck(self): else: extra_binaries = ["bin/%s" % x for x in ["h5cc", "h5fc"]] - self.setcfg('sanityCheckPaths',{'files':["bin/h5%s" % x for x in ["2gif", "c++", "copy", - "debug", "diff", "dump", - "import", "jam","ls", - "mkgrp", "perf_serial", - "redeploy", "repack", - "repart", "stat", "unjam"]] + - ["bin/gif2h5"] + extra_binaries + - ["lib/libhdf5%s.so" % x for x in ["_cpp", "_fortran", - "_hl_cpp", "_hl", - "hl_fortran", ""]], - 'dirs':['include'] + self.setcfg('sanityCheckPaths',{ + 'files': ["bin/h5%s" % x for x in ["2gif", "c++", "copy", + "debug", "diff", "dump", + "import", "jam","ls", + "mkgrp", "perf_serial", + "redeploy", "repack", + "repart", "stat", "unjam"]] + + ["bin/gif2h5"] + extra_binaries + + ["lib/libhdf5%s.so" % x for x in ["_cpp", "_fortran", + "_hl_cpp", "_hl", + "hl_fortran", ""]], + 'dirs': ['include'] }) - self.log.info("Customized sanity check paths: %s"%self.getcfg('sanityCheckPaths')) + self.log.info("Customized sanity check paths: %s" % self.getcfg('sanityCheckPaths')) Application.sanitycheck(self) diff --git a/easybuild/easyblocks/h/hpl.py b/easybuild/easyblocks/h/hpl.py index 8b09476cb1..3910b0c3c6 100644 --- a/easybuild/easyblocks/h/hpl.py +++ b/easybuild/easyblocks/h/hpl.py @@ -20,6 +20,7 @@ ## import os import shutil + from easybuild.framework.application import Application from easybuild.tools.filetools import run_cmd @@ -27,7 +28,7 @@ class HPL(Application): """ Support for building HPL (High Performance Linpack) - create Make.UNKNOWN - - build with make and install + - build with make and install """ def configure(self, subdir=None): @@ -74,11 +75,10 @@ def make(self): extra_makeopts = 'TOPdir="%s" ' % self.getcfg('startfrom') # compilers - extra_makeopts += 'CC="%(mpicc)s" MPICC="%(mpicc)s" LINKER="%(mpicc)s" ' % { 'mpicc':os.getenv('MPICC') } + extra_makeopts += 'CC="%(mpicc)s" MPICC="%(mpicc)s" LINKER="%(mpicc)s" ' % {'mpicc': os.getenv('MPICC')} # libraries: LAPACK and FFTW - extra_makeopts += 'LAlib="%s %s" ' % (os.getenv('LIBFFT'), - os.getenv('LIBLAPACK_MT')) + extra_makeopts += 'LAlib="%s %s" ' % (os.getenv('LIBFFT'), os.getenv('LIBLAPACK_MT')) # HPL options extra_makeopts += 'HPL_OPTS="%s -DUSING_FFTW" ' % os.getenv('CPPFLAGS') @@ -114,10 +114,11 @@ def sanitycheck(self): """ if not self.getcfg('sanityCheckPaths'): - self.setcfg('sanityCheckPaths',{'files':["bin/xhpl"], - 'dirs':[] + self.setcfg('sanityCheckPaths',{ + 'files': ["bin/xhpl"], + 'dirs': [] }) - self.log.info("Customized sanity check paths: %s"%self.getcfg('sanityCheckPaths')) + self.log.info("Customized sanity check paths: %s" % self.getcfg('sanityCheckPaths')) - Application.sanitycheck(self) \ No newline at end of file + Application.sanitycheck(self) diff --git a/easybuild/easyblocks/i/icc.py b/easybuild/easyblocks/i/icc.py index 937adad643..a4967496ed 100644 --- a/easybuild/easyblocks/i/icc.py +++ b/easybuild/easyblocks/i/icc.py @@ -20,7 +20,6 @@ ## import os - from distutils.version import LooseVersion from easybuild.easyblocks.i.intelbase import IntelBase @@ -42,11 +41,11 @@ def sanitycheck(self): else: libprefix = "lib/intel64/lib" - self.setcfg('sanityCheckPaths', {'files': - ["bin/intel64/%s" % x for x in ["icc", "icpc", "idb"]] + - ["%s%s" % (libprefix, x) for x in ["iomp5.a", "iomp5.so"]], - 'dirs':[] - }) + self.setcfg('sanityCheckPaths', { + 'files': ["bin/intel64/%s" % x for x in ["icc", "icpc", "idb"]] + + ["%s%s" % (libprefix, x) for x in ["iomp5.a", "iomp5.so"]], + 'dirs': [] + }) self.log.info("Customized sanity check paths: %s" % self.getcfg('sanityCheckPaths')) @@ -58,18 +57,18 @@ def make_module_req_guess(self): if self.getcfg('m32'): # 32-bit toolkit dirmap = { - 'PATH':['bin', 'bin/ia32', 'tbb/bin/ia32'], - 'LD_LIBRARY_PATH':['lib', 'lib/ia32'], - 'MANPATH':['man', 'share/man', 'man/en_US'], - 'IDB_HOME':['bin/intel64'] - } + 'PATH': ['bin', 'bin/ia32', 'tbb/bin/ia32'], + 'LD_LIBRARY_PATH': ['lib', 'lib/ia32'], + 'MANPATH': ['man', 'share/man', 'man/en_US'], + 'IDB_HOME': ['bin/intel64'] + } else: # 64-bit toolit dirmap = { - 'PATH':['bin', 'bin/intel64', 'tbb/bin/emt64'], - 'LD_LIBRARY_PATH':['lib', 'lib/intel64'], - 'MANPATH':['man', 'share/man', 'man/en_US'], - 'IDB_HOME':['bin/intel64'] + 'PATH': ['bin', 'bin/intel64', 'tbb/bin/emt64'], + 'LD_LIBRARY_PATH': ['lib', 'lib/intel64'], + 'MANPATH': ['man', 'share/man', 'man/en_US'], + 'IDB_HOME': ['bin/intel64'] } # in recent Intel compiler distributions, the actual binaries are @@ -110,7 +109,6 @@ def make_module_extra(self): txt = IntelBase.make_module_extra(self) txt += "prepend-path\t%s\t\t%s\n" % ('INTEL_LICENSE_FILE', self.license) - txt += "prepend-path\t%s\t\t$root/%s\n" % ('NLSPATH', 'idb/intel64/locale/%l_%t/%N') return txt diff --git a/easybuild/easyblocks/i/ifort.py b/easybuild/easyblocks/i/ifort.py index 084cc38808..5e55656708 100644 --- a/easybuild/easyblocks/i/ifort.py +++ b/easybuild/easyblocks/i/ifort.py @@ -40,11 +40,12 @@ def sanitycheck(self): else: libprefix = "lib/intel64/lib" - self.setcfg('sanityCheckPaths', {'files':["bin/intel64/%s" % x for x in ["ifort", "idb"]] + - ["%s%s" % (libprefix, x) for x in ["ifcore.a", "ifcore.so", "iomp5.a", "iomp5.so"]], - 'dirs':[] - }) + self.setcfg('sanityCheckPaths', { + 'files': ["bin/intel64/%s" % x for x in ["ifort", "idb"]] + + ["%s%s" % (libprefix, x) for x in ["ifcore.a", "ifcore.so", "iomp5.a", "iomp5.so"]], + 'dirs': [] + }) self.log.info("Customized sanity check paths: %s" % self.getcfg('sanityCheckPaths')) - IntelBase.sanitycheck(self) \ No newline at end of file + IntelBase.sanitycheck(self) diff --git a/easybuild/easyblocks/i/imkl.py b/easybuild/easyblocks/i/imkl.py index 866a33419f..2bdb187c34 100644 --- a/easybuild/easyblocks/i/imkl.py +++ b/easybuild/easyblocks/i/imkl.py @@ -22,15 +22,13 @@ import os import shutil import tempfile - from distutils.version import LooseVersion +import easybuild.tools.environment as env from easybuild.easyblocks.i.intelbase import IntelBase from easybuild.tools.filetools import run_cmd from easybuild.tools.modules import Modules -import easybuild.tools.environment as env - class Imkl(IntelBase): """ Class that can be used to install mkl @@ -43,7 +41,7 @@ def __init__(self, *args, **kwargs): IntelBase.__init__(self, *args, **kwargs) def extra_options(self): - extra_vars = {'interfaces':[True, "Indicates whether interfaces should be built (default: True)"]} + extra_vars = {'interfaces': [True, "Indicates whether interfaces should be built (default: True)"]} return IntelBase.extra_options(self, extra_vars) @@ -61,31 +59,32 @@ def make_module_req_guess(self): if self.getcfg('m32'): self.log.error("32-bit not supported yet for IMKL v%s (>= 10.3)" % self.version()) return { - 'PATH':['bin', 'mkl/bin', 'mkl/bin/intel64', 'composerxe-2011/bin'], - 'LD_LIBRARY_PATH':['lib/intel64', 'mkl/lib/intel64'], - 'LIBRARY_PATH':['lib/intel64', 'mkl/lib/intel64'], - 'MANPATH':['man', 'man/en_US'], - 'CPATH':['mkl/include', 'mkl/include/fftw'], - 'FPATH':['mkl/include', 'mkl/include/fftw'] + 'PATH': ['bin', 'mkl/bin', 'mkl/bin/intel64', 'composerxe-2011/bin'], + 'LD_LIBRARY_PATH': ['lib/intel64', 'mkl/lib/intel64'], + 'LIBRARY_PATH': ['lib/intel64', 'mkl/lib/intel64'], + 'MANPATH': ['man', 'man/en_US'], + 'CPATH': ['mkl/include', 'mkl/include/fftw'], + 'FPATH': ['mkl/include', 'mkl/include/fftw'] } else: if self.getcfg('m32'): return { - 'PATH':['bin', 'bin/ia32', 'tbb/bin/ia32'], - 'LD_LIBRARY_PATH':['lib', 'lib/32'], - 'LIBRARY_PATH':['lib', 'lib/32'], - 'MANPATH':['man', 'share/man', 'man/en_US'], - 'CPATH':['include'], - 'FPATH':['include'] - } + 'PATH': ['bin', 'bin/ia32', 'tbb/bin/ia32'], + 'LD_LIBRARY_PATH': ['lib', 'lib/32'], + 'LIBRARY_PATH': ['lib', 'lib/32'], + 'MANPATH': ['man', 'share/man', 'man/en_US'], + 'CPATH': ['include'], + 'FPATH': ['include'] + } + else: return { - 'PATH':['bin', 'bin/intel64', 'tbb/bin/em64t'], - 'LD_LIBRARY_PATH':['lib', 'lib/em64t'], - 'LIBRARY_PATH':['lib', 'lib/em64t'], - 'MANPATH':['man', 'share/man', 'man/en_US'], - 'CPATH':['include'], - 'FPATH':['include'] + 'PATH': ['bin', 'bin/intel64', 'tbb/bin/em64t'], + 'LD_LIBRARY_PATH': ['lib', 'lib/em64t'], + 'LIBRARY_PATH': ['lib', 'lib/em64t'], + 'MANPATH': ['man', 'share/man', 'man/en_US'], + 'CPATH': ['include'], + 'FPATH': ['include'] } def make_module_extra(self): @@ -96,7 +95,7 @@ def make_module_extra(self): txt += "prepend-path\t%s\t\t$root/%s\n" % ('NLSPATH', 'idb/32/locale/%l_%t/%N') else: txt += "prepend-path\t%s\t\t$root/%s\n" % ('NLSPATH', 'idb/intel64/locale/%l_%t/%N') - txt += "setenv\t%s\t\t$root\n" % ('MKLROOT') + txt += "setenv\t%s\t\t$root\n" % 'MKLROOT' return txt @@ -113,13 +112,13 @@ def postproc(self): self.log.error("32-bit not supported yet for IMKL v%s (>=10.3)" % self.version()) extra = { - 'libmkl.so':'GROUP (-lmkl_intel_lp64 -lmkl_intel_thread -lmkl_core)', - 'libmkl_em64t.a':'GROUP (libmkl_intel_lp64.a libmkl_intel_thread.a libmkl_core.a)', - 'libmkl_solver.a':'GROUP (libmkl_solver_lp64.a)', - 'libmkl_scalapack.a':'GROUP (libmkl_scalapack_lp64.a)', - 'libmkl_lapack.a':'GROUP (libmkl_intel_lp64.a libmkl_intel_thread.a libmkl_core.a)', - 'libmkl_cdft.a':'GROUP (libmkl_cdft_core.a)' - } + 'libmkl.so': 'GROUP (-lmkl_intel_lp64 -lmkl_intel_thread -lmkl_core)', + 'libmkl_em64t.a': 'GROUP (libmkl_intel_lp64.a libmkl_intel_thread.a libmkl_core.a)', + 'libmkl_solver.a': 'GROUP (libmkl_solver_lp64.a)', + 'libmkl_scalapack.a': 'GROUP (libmkl_scalapack_lp64.a)', + 'libmkl_lapack.a': 'GROUP (libmkl_intel_lp64.a libmkl_intel_thread.a libmkl_core.a)', + 'libmkl_cdft.a': 'GROUP (libmkl_cdft_core.a)' + } for fil, txt in extra.items(): dest = os.path.join(self.installdir, 'mkl/lib/intel64', fil) if not os.path.exists(dest): @@ -154,7 +153,7 @@ def postproc(self): os.chdir(interfacedir) self.log.info("Changed to interfaces directory %s" % interfacedir) except: - self.log.exception("Can't change to interfaces directory %s" % (interfacedir)) + self.log.exception("Can't change to interfaces directory %s" % interfacedir) for i in lis1 + lis2 + lis3: if i in lis1: @@ -214,7 +213,7 @@ def postproc(self): shutil.rmtree(tmpbuild) self.log.debug('Removed temporary directory %s' % tmpbuild) except: - self.log.exception("Removing temporary directory %s failed" % (tmpbuild)) + self.log.exception("Removing temporary directory %s failed" % tmpbuild) else: @@ -226,22 +225,22 @@ def postproc(self): #- form imkl 10.1 if self.getcfg('m32'): extra = { - 'libmkl.so':'GROUP (-lmkl_intel -lmkl_intel_thread -lmkl_core)', - 'libmkl_em64t.a':'GROUP (libmkl_intel.a libmkl_intel_thread.a libmkl_core.a)', - 'libmkl_solver.a':'GROUP (libmkl_solver.a)', - 'libmkl_scalapack.a':'GROUP (libmkl_scalapack_core.a)', - 'libmkl_lapack.a':'GROUP (libmkl_intel.a libmkl_intel_thread.a libmkl_core.a)', - 'libmkl_cdft.a':'GROUP (libmkl_cdft_core.a)' - } + 'libmkl.so': 'GROUP (-lmkl_intel -lmkl_intel_thread -lmkl_core)', + 'libmkl_em64t.a': 'GROUP (libmkl_intel.a libmkl_intel_thread.a libmkl_core.a)', + 'libmkl_solver.a': 'GROUP (libmkl_solver.a)', + 'libmkl_scalapack.a': 'GROUP (libmkl_scalapack_core.a)', + 'libmkl_lapack.a': 'GROUP (libmkl_intel.a libmkl_intel_thread.a libmkl_core.a)', + 'libmkl_cdft.a': 'GROUP (libmkl_cdft_core.a)' + } else: extra = { - 'libmkl.so':'GROUP (-lmkl_intel_lp64 -lmkl_intel_thread -lmkl_core)', - 'libmkl_em64t.a':'GROUP (libmkl_intel_lp64.a libmkl_intel_thread.a libmkl_core.a)', - 'libmkl_solver.a':'GROUP (libmkl_solver_lp64.a)', - 'libmkl_scalapack.a':'GROUP (libmkl_scalapack_lp64.a)', - 'libmkl_lapack.a':'GROUP (libmkl_intel_lp64.a libmkl_intel_thread.a libmkl_core.a)', - 'libmkl_cdft.a':'GROUP (libmkl_cdft_core.a)' - } + 'libmkl.so': 'GROUP (-lmkl_intel_lp64 -lmkl_intel_thread -lmkl_core)', + 'libmkl_em64t.a': 'GROUP (libmkl_intel_lp64.a libmkl_intel_thread.a libmkl_core.a)', + 'libmkl_solver.a': 'GROUP (libmkl_solver_lp64.a)', + 'libmkl_scalapack.a': 'GROUP (libmkl_scalapack_lp64.a)', + 'libmkl_lapack.a': 'GROUP (libmkl_intel_lp64.a libmkl_intel_thread.a libmkl_core.a)', + 'libmkl_cdft.a': 'GROUP (libmkl_cdft_core.a)' + } for fil, txt in extra.items(): if self.getcfg('m32'): dest = os.path.join(self.installdir, 'lib/32', fil) @@ -275,7 +274,7 @@ def postproc(self): try: os.chdir(interfacedir) except: - self.log.exception("Can't change to interfaces directory %s" % (interfacedir)) + self.log.exception("Can't change to interfaces directory %s" % interfacedir) interfacestarget = "libem64t" if self.getcfg('m32'): @@ -357,9 +356,10 @@ def sanitycheck(self): mklfiles = ["lib/em64t/libmkl.so", "include/mkl.h"] mkldirs = ["lib/em64t", "include/em64t", "interfaces"] - self.setcfg('sanityCheckPaths', {'files':mklfiles, - 'dirs':mkldirs - }) + self.setcfg('sanityCheckPaths', { + 'files': mklfiles, + 'dirs': mkldirs + }) self.log.info("Customized sanity check paths: %s" % self.getcfg('sanityCheckPaths')) diff --git a/easybuild/easyblocks/i/intelbase.py b/easybuild/easyblocks/i/intelbase.py index 5871157fac..25e177ed59 100644 --- a/easybuild/easyblocks/i/intelbase.py +++ b/easybuild/easyblocks/i/intelbase.py @@ -20,9 +20,10 @@ ## import os import shutil + +import easybuild.tools.environment as env from easybuild.framework.application import Application from easybuild.tools.filetools import run_cmd -import easybuild.tools.environment as env class IntelBase(Application): """ @@ -38,14 +39,15 @@ def __init__(self, *args, **kwargs): def extra_options(self, extra_vars=None): vars = Application.extra_options(self, extra_vars) - intel_vars = {'license':[None,"License file path (default: None)"], - 'license_activation':['license_server', "Indicates license activation type (default: 'license_server')"], + intel_vars = { + 'license':[None, "License file path (default: None)"], + 'license_activation': ['license_server', "Indicates license activation type (default: 'license_server')"], # 'usetmppath': # workaround for older SL5 version (5.5 and earlier) # used to be True, but False since SL5.6/SL6 # disables TMP_PATH env and command line option - 'usetmppath':[False, "Use temporary path for installation (default: False)"], - 'm32':[False, "Enable 32-bit toolkit (default: False)"], + 'usetmppath': [False, "Use temporary path for installation (default: False)"], + 'm32': [False, "Enable 32-bit toolkit (default: False)"], } intel_vars.update(vars) return intel_vars @@ -57,7 +59,7 @@ def clean_homedir(self): if os.path.exists(intelhome): try: shutil.rmtree(intelhome) - self.log.info("Cleaning up intel dir %s" % (intelhome)) + self.log.info("Cleaning up intel dir %s" % intelhome) except OSError, err: self.log.exception("Cleaning up intel dir %s failed: %s" % (intelhome, err)) @@ -122,7 +124,7 @@ def make_install(self): tmppathopt = "-t %s" % tmpdir ## set some extra env variables - env.set('LOCAL_INSTALL_VERBOSE','1') + env.set('LOCAL_INSTALL_VERBOSE', '1') env.set('VERBOSE_MODE', '1') env.set('INSTALL_PATH', self.installdir) diff --git a/easybuild/easyblocks/i/ipp.py b/easybuild/easyblocks/i/ipp.py index a03add7e35..bbf012620f 100644 --- a/easybuild/easyblocks/i/ipp.py +++ b/easybuild/easyblocks/i/ipp.py @@ -26,13 +26,15 @@ class Ipp(IntelBase): def sanitycheck(self): if not self.getcfg('sanityCheckPaths'): - self.setcfg('sanityCheckPaths', {'files':["ipp/lib/intel64/libipp%s" % y for x in ["ac", "cc", "ch", "core", "cv", "dc", "di", - "i", "j", "m", "r", "s", "sc", "vc", "vm"] - for y in ["%s.a" % x, "%s.so" % x]], - 'dirs':["compiler/lib/intel64", "ipp/bin", "ipp/include", - "ipp/interfaces/data-compression", "ipp/tools/intel64"] + self.setcfg('sanityCheckPaths', { + 'files': ["ipp/lib/intel64/libipp%s" % y + for x in ["ac", "cc", "ch", "core", "cv", "dc", "di", + "i", "j", "m", "r", "s", "sc", "vc", "vm"] + for y in ["%s.a" % x, "%s.so" % x]], + 'dirs': ["compiler/lib/intel64", "ipp/bin", "ipp/include", + "ipp/interfaces/data-compression", "ipp/tools/intel64"] }) self.log.info("Customized sanity check paths: %s" % self.getcfg('sanityCheckPaths')) - IntelBase.sanitycheck(self) \ No newline at end of file + IntelBase.sanitycheck(self) diff --git a/easybuild/easyblocks/i/itac.py b/easybuild/easyblocks/i/itac.py index 16b89b7c00..c592aac919 100644 --- a/easybuild/easyblocks/i/itac.py +++ b/easybuild/easyblocks/i/itac.py @@ -35,7 +35,7 @@ def __init__(self, *args, **kwargs): IntelBase.__init__(self, *args, **kwargs) def extra_options(self): - extra_vars = {'preferredmpi':['impi3', "Preferred MPI type (default: 'impi3')"]} + extra_vars = {'preferredmpi': ['impi3', "Preferred MPI type (default: 'impi3')"]} return IntelBase.extra_options(self, extra_vars) def make_install(self): @@ -56,7 +56,7 @@ def make_install(self): INSTALL_ITC=YES DEFAULT_MPI=%(mpi)s EULA=accept -""" % {'lic':self.license, 'ins':self.installdir, 'mpi':self.getcfg('preferredmpi')} +""" % {'lic': self.license, 'ins': self.installdir, 'mpi': self.getcfg('preferredmpi')} ## already in correct directory silentcfg = os.path.join(os.getcwd(), "silent.cfg") @@ -79,29 +79,29 @@ def make_module_req_guess(self): A dictionary of possible directories to look for """ guesses = { - 'MANPATH':['man'], - 'CLASSPATH':['itac/lib_%s' % self.getcfg('preferredmpi')], - 'VT_LIB_DIR':['itac/lib_%s' % self.getcfg('preferredmpi')], - 'VT_SLIB_DIR':['itac/lib_s%s' % self.getcfg('preferredmpi')] - } + 'MANPATH': ['man'], + 'CLASSPATH': ['itac/lib_%s' % self.getcfg('preferredmpi')], + 'VT_LIB_DIR': ['itac/lib_%s' % self.getcfg('preferredmpi')], + 'VT_SLIB_DIR': ['itac/lib_s%s' % self.getcfg('preferredmpi')] + } if self.getcfg('m32'): guesses.update({ - 'PATH':['bin', 'bin/ia32', 'ia32/bin'], - 'LD_LIBRARY_PATH':['lib', 'lib/ia32', 'ia32/lib'], - }) + 'PATH': ['bin', 'bin/ia32', 'ia32/bin'], + 'LD_LIBRARY_PATH': ['lib', 'lib/ia32', 'ia32/lib'], + }) else: guesses.update({ - 'PATH':['bin', 'bin/intel64', 'bin64'], - 'LD_LIBRARY_PATH':['lib', 'lib/intel64', 'lib64'], - }) + 'PATH': ['bin', 'bin/intel64', 'bin64'], + 'LD_LIBRARY_PATH': ['lib', 'lib/intel64', 'lib64'], + }) return guesses def make_module_extra(self): """Overwritten from IntelBase to add extra txt""" txt = IntelBase.make_module_extra(self) txt += "prepend-path\t%s\t\t%s\n" % ('INTEL_LICENSE_FILE', self.license) - txt += "setenv\t%s\t\t$root\n" % ('VT_ROOT') + txt += "setenv\t%s\t\t$root\n" % 'VT_ROOT' txt += "setenv\t%s\t\t%s\n" % ('VT_MPI', self.getcfg('preferredmpi')) txt += "setenv\t%s\t\t%s\n" % ('VT_ADD_LIBS', '"-ldwarf -lelf -lvtunwind -lnsl -lm -ldl -lpthread"') diff --git a/easybuild/easyblocks/l/lapack.py b/easybuild/easyblocks/l/lapack.py index 302b6a00ee..02fb1720c8 100644 --- a/easybuild/easyblocks/l/lapack.py +++ b/easybuild/easyblocks/l/lapack.py @@ -21,6 +21,7 @@ import glob import os import shutil + from easybuild.framework.application import Application from easybuild.tools.filetools import run_cmd @@ -31,9 +32,9 @@ def get_blas_lib(log): """ blaslib = None known_blas_libs = { - 'GotoBLAS' : '-L%s -lgoto', - 'ATLAS' : '-L%s -lf77blas -latlas' - } + 'GotoBLAS': '-L%s -lgoto', + 'ATLAS': '-L%s -lf77blas -latlas' + } for (key,val) in known_blas_libs.items(): softroot = 'SOFTROOT%s' % key.upper() if os.getenv(softroot): @@ -59,8 +60,9 @@ def __init__(self, *args, **kwargs): Application.__init__(self, *args, **kwargs) def extra_options(self): - extra_vars = {'supply_blas':[False, "Supply BLAS lib to LAPACK for building (default: False)"], - 'test_only':[False, "Only make tests, don't try and build LAPACK lib."] + extra_vars = { + 'supply_blas': [False, "Supply BLAS lib to LAPACK for building (default: False)"], + 'test_only': [False, "Only make tests, don't try and build LAPACK lib."] } return Application.extra_options(self, extra_vars) @@ -132,7 +134,6 @@ def make(self): # default make suffices (for now) Application.make(self) - def make_install(self): """ Install LAPACK: copy all .a files to lib dir in install directory @@ -165,7 +166,7 @@ def make_install(self): os.symlink(frompath, topath) except OSError, err: - self.log.error("Copying %s to installation dir %s failed: %s"%(srcdir, destdir, err)) + self.log.error("Copying %s to installation dir %s failed: %s" % (srcdir, destdir, err)) def test(self): """ @@ -205,10 +206,11 @@ def sanitycheck(self): """ if not self.getcfg('test_only'): if not self.getcfg('sanityCheckPaths'): - self.setcfg('sanityCheckPaths',{'files':["lib/%s"%x for x in ["liblapack.a","libtmglib.a"]], - 'dirs':[] + self.setcfg('sanityCheckPaths',{ + 'files': ["lib/%s" % x for x in ["liblapack.a", "libtmglib.a"]], + 'dirs': [] }) - self.log.info("Customized sanity check paths: %s"%self.getcfg('sanityCheckPaths')) + self.log.info("Customized sanity check paths: %s" % self.getcfg('sanityCheckPaths')) Application.sanitycheck(self) diff --git a/easybuild/easyblocks/l/libsmm.py b/easybuild/easyblocks/l/libsmm.py index bc02e3b347..8d39341c38 100644 --- a/easybuild/easyblocks/l/libsmm.py +++ b/easybuild/easyblocks/l/libsmm.py @@ -21,6 +21,7 @@ import os import shutil from distutils.version import LooseVersion + import easybuild from easybuild.framework.application import Application from easybuild.tools.filetools import run_cmd @@ -39,9 +40,10 @@ def __init__(self, *args, **kwargs): def extra_options(self): # default dimensions dd = [1,4,5,6,9,13,16,17,22] - extra_vars = {'transpose_flavour':[1, "Transpose flavour of routines (default: 1)"], - 'max_tiny_dim':[12, "Maximum tiny dimension (default: 12)"], - 'dims':[dd, "Generate routines for these matrix dims (default: %s)" % dd] + extra_vars = { + 'transpose_flavour': [1, "Transpose flavour of routines (default: 1)"], + 'max_tiny_dim': [12, "Maximum tiny dimension (default: 12)"], + 'dims': [dd, "Generate routines for these matrix dims (default: %s)" % dd] } return Application.extra_options(self, extra_vars) @@ -158,21 +160,20 @@ def make(self): self.log.error('No known BLAS library found!') cfgdict = { - 'eb_version' : easybuild.VERBOSE_VERSION, - 'datatype': None, - 'transposeflavour': self.getcfg('transpose_flavour'), - 'targetcompile': targetcompile, - 'hostcompile': hostcompile, - 'dims':' '.join([str(d) for d in self.getcfg('dims')]), - 'tiny_dims':' '.join([str(d) for d in range(1, self.getcfg('max_tiny_dim')+1)]), - 'tasks': self.getcfg('parallel'), - 'LIBBLAS':"%s %s" % (os.getenv('LDFLAGS'), os.getenv('LIBBLAS')) - } + 'eb_version': easybuild.VERBOSE_VERSION, + 'datatype': None, + 'transposeflavour': self.getcfg('transpose_flavour'), + 'targetcompile': targetcompile, + 'hostcompile': hostcompile, + 'dims': ' '.join([str(d) for d in self.getcfg('dims')]), + 'tiny_dims': ' '.join([str(d) for d in range(1, self.getcfg('max_tiny_dim')+1)]), + 'tasks': self.getcfg('parallel'), + 'LIBBLAS': "%s %s" % (os.getenv('LDFLAGS'), os.getenv('LIBBLAS')) + } # configure for various iterations - datatypes = [(1, 'double precision real'), - (3, 'double precision complex') - ] + datatypes = [(1, 'double precision real'), (3, 'double precision complex')] + for (dt, descr) in datatypes: cfgdict['datatype'] = dt try: @@ -201,9 +202,10 @@ def sanitycheck(self): """Custom sanity check for libsmm""" if not self.getcfg('sanityCheckPaths'): - self.setcfg('sanityCheckPaths', {'files':["lib/libsmm_%s.a" % x for x in ["dnn", "znn"]], - 'dirs':[] - }) + self.setcfg('sanityCheckPaths', { + 'files': ["lib/libsmm_%s.a" % x for x in ["dnn", "znn"]], + 'dirs': [] + }) self.log.info("Customized sanity check paths: %s" % self.getcfg('sanityCheckPaths')) diff --git a/easybuild/easyblocks/m/maple.py b/easybuild/easyblocks/m/maple.py index 04ca5ef020..45793c7610 100644 --- a/easybuild/easyblocks/m/maple.py +++ b/easybuild/easyblocks/m/maple.py @@ -20,6 +20,7 @@ ## import os import shutil + from easybuild.framework.application import Application from easybuild.tools.filetools import run_cmd_qa @@ -46,23 +47,24 @@ def make_install(self): cmd = "%s/Maple%sLinuxX86_64Installer.bin" % (self.builddir, self.getcfg('version')) - qa = {'PRESS TO CONTINUE:':'', - 'DO YOU ACCEPT THE TERMS OF THIS LICENSE AGREEMENT? (Y/N):':'Y', - 'ENTER AN ABSOLUTE PATH, OR PRESS TO ACCEPT THE DEFAULT :':self.installdir, - 'IS THIS CORRECT? (Y/N):':'Y', - 'Do you wish to have a shortcut installed on your desktop? ->1- Yes 2- No ENTER THE NUMBER FOR YOUR CHOICE, OR PRESS TO ACCEPT THE DEFAULT::':'2', - '->1- Single User License 2- Network License ENTER THE NUMBER FOR YOUR CHOICE, OR PRESS TO ACCEPT THE DEFAULT::':'2', - 'PRESS TO EXIT THE INSTALLER:':'', - 'License server (DEFAULT: ):':self.getcfg('licenseServer'), - 'Port number (optional) (DEFAULT: ):':'', - '->1- Configure toolbox for Matlab 2- Do not configure at this time ENTER THE NUMBER FOR YOUR CHOICE, OR PRESS TO ACCEPT THE DEFAULT::':'2' - } + qa = { + 'PRESS TO CONTINUE:': '', + 'DO YOU ACCEPT THE TERMS OF THIS LICENSE AGREEMENT? (Y/N):': 'Y', + 'ENTER AN ABSOLUTE PATH, OR PRESS TO ACCEPT THE DEFAULT :': self.installdir, + 'IS THIS CORRECT? (Y/N):': 'Y', + 'Do you wish to have a shortcut installed on your desktop? ->1- Yes 2- No ENTER THE NUMBER FOR YOUR CHOICE, OR PRESS TO ACCEPT THE DEFAULT::': '2', + '->1- Single User License 2- Network License ENTER THE NUMBER FOR YOUR CHOICE, OR PRESS TO ACCEPT THE DEFAULT::': '2', + 'PRESS TO EXIT THE INSTALLER:': '', + 'License server (DEFAULT: ):': self.getcfg('licenseServer'), + 'Port number (optional) (DEFAULT: ):': '', + '->1- Configure toolbox for Matlab 2- Do not configure at this time ENTER THE NUMBER FOR YOUR CHOICE, OR PRESS TO ACCEPT THE DEFAULT::': '2' + } no_qa = ['Graphical installers are not supported by the VM. The console mode will be used instead...', - 'Extracting the JRE from the installer archive...', - 'Launching installer...', - "Configuring the installer for this system's environment...", - 'Unpacking the JRE...', - '\[[-|]*'] + 'Extracting the JRE from the installer archive...', + 'Launching installer...', + "Configuring the installer for this system's environment...", + 'Unpacking the JRE...', + '\[[-|]*'] run_cmd_qa(cmd, qa, no_qa=no_qa, log_all=True, simple=True) diff --git a/easybuild/easyblocks/m/mrbayes.py b/easybuild/easyblocks/m/mrbayes.py index 934a07d0da..a7a2ef927e 100644 --- a/easybuild/easyblocks/m/mrbayes.py +++ b/easybuild/easyblocks/m/mrbayes.py @@ -22,6 +22,7 @@ import os import shutil from distutils.version import LooseVersion + from easybuild.framework.application import Application from easybuild.tools.filetools import run_cmd @@ -82,10 +83,10 @@ def sanitycheck(self): """Custom sanity check for MrBayes.""" if not self.getcfg('sanityCheckPaths'): - self.setcfg('sanityCheckPaths', {'files':["bin/mb"], - 'dirs':[] - } - ) + self.setcfg('sanityCheckPaths', { + 'files': ["bin/mb"], + 'dirs': [] + }) self.log.info("Customized sanity check paths: %s" % self.getcfg('sanityCheckPaths')) diff --git a/easybuild/easyblocks/m/mvapich2.py b/easybuild/easyblocks/m/mvapich2.py index ce3525975c..653e95ea03 100644 --- a/easybuild/easyblocks/m/mvapich2.py +++ b/easybuild/easyblocks/m/mvapich2.py @@ -19,8 +19,9 @@ # along with EasyBuild. If not, see . ## import os -from easybuild.framework.application import Application + import easybuild.tools.environment as env +from easybuild.framework.application import Application class MVAPICH2(Application): """ @@ -32,11 +33,12 @@ def __init__(self, *args, **kwargs): Application.__init__(self, *args, **kwargs) def extra_options(self): - extra_vars = {'withchkpt':[False, "Enable checkpointing support (required BLCR) (default: False)"], - 'withlimic2':[False, "Enable LiMIC2 support for intra-node communication (default: False)"], - 'withmpe':[False, "Build MPE routines (default: False)"], - 'debug':[False, "Enable debug build (which is slower) (default: False)"], - 'rdma_type':["gen2", "Specify the RDMA type (gen2/udapl) (default: gen2)"] + extra_vars = { + 'withchkpt': [False, "Enable checkpointing support (required BLCR) (default: False)"], + 'withlimic2': [False, "Enable LiMIC2 support for intra-node communication (default: False)"], + 'withmpe': [False, "Build MPE routines (default: False)"], + 'debug': [False, "Enable debug build (which is slower) (default: False)"], + 'rdma_type': ["gen2", "Specify the RDMA type (gen2/udapl) (default: gen2)"] } return Application.extra_options(self, extra_vars) @@ -76,11 +78,12 @@ def configure(self): env.set(new_envvar, envvar_val) env.set(envvar, '') else: - self.log.error("Both %(ev)s and %(nev)s set, can I overwrite %(nev)s with %(ev)s (%(evv)s) ?" % { - 'ev':envvar, - 'nev':new_envvar, - 'evv':envvar_val - }) + self.log.error("Both %(ev)s and %(nev)s set, can I overwrite %(nev)s with %(ev)s (%(evv)s) ?" % + { + 'ev': envvar, + 'nev': new_envvar, + 'evv': envvar_val + }) # enable specific support options (if desired) if self.getcfg('withmpe'): @@ -102,14 +105,15 @@ def sanitycheck(self): """ if not self.getcfg('sanityCheckPaths'): - self.setcfg('sanityCheckPaths',{'files':["bin/%s" % x for x in ["mpicc", "mpicxx", "mpif77", + self.setcfg('sanityCheckPaths',{ + 'files': ["bin/%s" % x for x in ["mpicc", "mpicxx", "mpif77", "mpif90", "mpiexec.hydra"]] + - ["lib/lib%s" % y for x in ["fmpich", "mpichcxx", "mpichf90", + ["lib/lib%s" % y for x in ["fmpich", "mpichcxx", "mpichf90", "mpich", "mpl", "opa"] for y in ["%s.so"%x, "%s.a"%x]], - 'dirs':["include"] + 'dirs': ["include"] }) - self.log.info("Customized sanity check paths: %s"%self.getcfg('sanityCheckPaths')) + self.log.info("Customized sanity check paths: %s" % self.getcfg('sanityCheckPaths')) Application.sanitycheck(self) diff --git a/easybuild/easyblocks/n/ncl.py b/easybuild/easyblocks/n/ncl.py index 153d418d58..2a45ffffa8 100644 --- a/easybuild/easyblocks/n/ncl.py +++ b/easybuild/easyblocks/n/ncl.py @@ -18,11 +18,12 @@ # You should have received a copy of the GNU General Public License # along with EasyBuild. If not, see . ## -from distutils.version import LooseVersion import fileinput import os import re import sys +from distutils.version import LooseVersion + from easybuild.framework.application import Application from easybuild.tools.filetools import run_cmd from easybuild.tools.modules import get_software_root @@ -31,12 +32,12 @@ class NCL(Application): """Support for building/installing NCL.""" def configure(self): - """Configure build: + """Configure build: - create Makefile.ini using make and run ymake script to create config file - patch config file with correct settings, and add missing config entries - create config/Site.local file to avoid interactive install - generate Makefile using config/ymkmf sciprt - - + - """ try: @@ -51,7 +52,7 @@ def configure(self): run_cmd(cmd, log_all=True, simple=True) # figure out name of config file - cfg_regexp = re.compile('^\s*SYSTEM_INCLUDE\s*=\s*"(.*)"\s*$',re.M) + cfg_regexp = re.compile('^\s*SYSTEM_INCLUDE\s*=\s*"(.*)"\s*$', re.M) f = open("Makefile", "r") txt = f.read() f.close() @@ -67,15 +68,15 @@ def configure(self): elif os.getenv('SOFTROOTGCC'): ctof_libs = '-lgfortran -lm' macrodict = { - 'CCompiler':os.getenv('CC'), - 'FCompiler':os.getenv('F77'), - 'CcOptions':'-ansi %s' % os.getenv('CFLAGS'), - 'FcOptions':os.getenv('FFLAGS'), - 'COptimizeFlag':os.getenv('CFLAGS'), - 'FOptimizeFlag':os.getenv('FFLAGS'), - 'ExtraSysLibraries':os.getenv('LDFLAGS'), - 'CtoFLibraries':ctof_libs - } + 'CCompiler': os.getenv('CC'), + 'FCompiler': os.getenv('F77'), + 'CcOptions': '-ansi %s' % os.getenv('CFLAGS'), + 'FcOptions': os.getenv('FFLAGS'), + 'COptimizeFlag': os.getenv('CFLAGS'), + 'FOptimizeFlag': os.getenv('FFLAGS'), + 'ExtraSysLibraries': os.getenv('LDFLAGS'), + 'CtoFLibraries': ctof_libs + } # replace config entries that are already there for line in fileinput.input(cfg_filename, inplace=1, backup='%s.orig' % cfg_filename): @@ -103,7 +104,7 @@ def configure(self): except OSError, err: self.log.error("Failed to change to the build dir %s: %s" % (self.getcfg('startfrom'), err)) - # instead of running the Configure script that asks a zillion questions, + # instead of running the Configure script that asks a zillion questions, # let's just generate the config/Site.local file ourselves... # order of deps is important @@ -144,10 +145,10 @@ def configure(self): #endif /* SecondSite */ """ % { - 'installdir' : self.installdir, - 'libs' : libs, - 'includes' : includes - } + 'installdir': self.installdir, + 'libs': libs, + 'includes': includes + } f = open("config/Site.local", "w") f.write(cfgtxt) @@ -170,8 +171,7 @@ def make_install(self): def make_module_extra(self): """Set NCARG_ROOT environment variable in module.""" - txt=Application.make_module_extra(self) - - txt+="setenv\tNCARG_ROOT\t$root\n" + txt = Application.make_module_extra(self) + txt += "setenv\tNCARG_ROOT\t$root\n" return txt diff --git a/easybuild/easyblocks/n/netcdf.py b/easybuild/easyblocks/n/netcdf.py index 809db5ccba..baf4978c1a 100644 --- a/easybuild/easyblocks/n/netcdf.py +++ b/easybuild/easyblocks/n/netcdf.py @@ -20,9 +20,10 @@ ## import os from distutils.version import LooseVersion -from easybuild.framework.application import Application + import easybuild.tools.environment as env import easybuild.tools.toolkit as toolkit +from easybuild.framework.application import Application class NetCDF(Application): """Support for building/installing netCDF""" @@ -38,7 +39,7 @@ def configure(self): self.updatecfg('configopts', 'FCFLAGS="%s" CC="%s" FC="%s"' % (os.getenv('FFLAGS'), os.getenv('MPICC'), os.getenv('F90') - )) + )) # add -DgFortran to CPPFLAGS when building with GCC if self.toolkit().toolkit_comp_family() == toolkit.GCC: @@ -62,14 +63,15 @@ def sanitycheck(self): libs += ["libnetcdf_c++.so", "libnetcdff.so", "libnetcdf_c++.a", "libnetcdff.a"] - self.setcfg('sanityCheckPaths',{'files':["bin/nc%s" % x for x in ["-config", "copy", "dump", + self.setcfg('sanityCheckPaths',{ + 'files': ["bin/nc%s" % x for x in ["-config", "copy", "dump", "gen", "gen3"]] + - ["lib/%s" % x for x in libs] + - ["include/%s" % x for x in incs], - 'dirs':[] + ["lib/%s" % x for x in libs] + + ["include/%s" % x for x in incs], + 'dirs': [] }) - self.log.info("Customized sanity check paths: %s"%self.getcfg('sanityCheckPaths')) + self.log.info("Customized sanity check paths: %s" % self.getcfg('sanityCheckPaths')) Application.sanitycheck(self) diff --git a/easybuild/easyblocks/n/netcdf_fortran.py b/easybuild/easyblocks/n/netcdf_fortran.py index 85db4d971a..2c295c84e8 100644 --- a/easybuild/easyblocks/n/netcdf_fortran.py +++ b/easybuild/easyblocks/n/netcdf_fortran.py @@ -19,9 +19,10 @@ # along with EasyBuild. If not, see . ## import os -from easybuild.framework.application import Application + import easybuild.tools.environment as env import easybuild.tools.toolkit as toolkit +from easybuild.framework.application import Application class NetCDF_Fortran(Application): """Support for building/installing the netCDF-Fortran library""" @@ -46,15 +47,14 @@ def sanitycheck(self): """ if not self.getcfg('sanityCheckPaths'): - self.setcfg('sanityCheckPaths',{'files':["bin/nf-config"] + - ["lib/%s" % x for x in ["libnetcdff.so", - "libnetcdff.a"]] + - ["include/%s" % x for x in ["netcdf.inc", - "netcdf.mod", - "typesizes.mod"]], - 'dirs':[] + self.setcfg('sanityCheckPaths',{ + 'files': ["bin/nf-config"] + + ["lib/%s" % x for x in ["libnetcdff.so", "libnetcdff.a"]] + + ["include/%s" % x for x in ["netcdf.inc", "netcdf.mod", + "typesizes.mod"]], + 'dirs': [] }) - self.log.info("Customized sanity check paths: %s"%self.getcfg('sanityCheckPaths')) + self.log.info("Customized sanity check paths: %s" % self.getcfg('sanityCheckPaths')) Application.sanitycheck(self) diff --git a/easybuild/easyblocks/o/openfoam.py b/easybuild/easyblocks/o/openfoam.py index 2bf7e2fa62..3014cb5967 100644 --- a/easybuild/easyblocks/o/openfoam.py +++ b/easybuild/easyblocks/o/openfoam.py @@ -18,12 +18,13 @@ # You should have received a copy of the GNU General Public License # along with EasyBuild. If not, see . ## -from distutils.version import LooseVersion import os import stat +from distutils.version import LooseVersion + +import easybuild.tools.toolkit as toolkit from easybuild.framework.application import Application from easybuild.tools.filetools import run_cmd, recursiveChmod -import easybuild.tools.toolkit as toolkit class OpenFOAM(Application): """Support for building and installing OpenFOAM.""" diff --git a/easybuild/easyblocks/p/python.py b/easybuild/easyblocks/p/python.py index 84a8516afe..b76499d978 100644 --- a/easybuild/easyblocks/p/python.py +++ b/easybuild/easyblocks/p/python.py @@ -20,9 +20,10 @@ ## import os import shutil + +import easybuild.tools.toolkit as toolkit from easybuild.framework.application import ApplicationPackage, Application from easybuild.tools.filetools import unpack, patch, run_cmd -import easybuild.tools.toolkit as toolkit class Python(Application): """Support for building/installing Python @@ -125,7 +126,7 @@ def test(self): extrapath = "" testinstalldir = os.path.join(self.builddir, "mytemporarytestinstalldir") if self.testinstall: - #Install in test directory and export PYTHONPATH + # Install in test directory and export PYTHONPATH try: os.makedirs(testinstalldir) except OSError: @@ -143,7 +144,6 @@ def test(self): if self.runtest: cmd = "%s%s" % (extrapath, self.runtest) - run_cmd(cmd, log_all=True, simple=True) if self.testinstall: @@ -275,10 +275,11 @@ def __init__(self, mself, pkg, pkginstalldeps): blas = ", ".join(blas_libs) self.sitecfg = self.sitecfg % \ - { 'lapack' : lapack, - 'blas' : blas, - 'libs' : ":".join([lib for lib in os.getenv('LDFLAGS').split(" -L")]), - 'includes' : ":".join([lib for lib in os.getenv('CPPFLAGS').split(" -I")]), + { + 'lapack': lapack, + 'blas': blas, + 'libs': ":".join([lib for lib in os.getenv('LDFLAGS').split(" -L")]), + 'includes': ":".join([lib for lib in os.getenv('CPPFLAGS').split(" -I")]), } self.sitecfgfn = 'site.cfg' diff --git a/easybuild/easyblocks/s/scalapack.py b/easybuild/easyblocks/s/scalapack.py index a70eab5cc1..fdfa82c831 100644 --- a/easybuild/easyblocks/s/scalapack.py +++ b/easybuild/easyblocks/s/scalapack.py @@ -21,6 +21,7 @@ import os import shutil from distutils.version import LooseVersion + from easybuild.framework.application import Application from easybuild.easyblocks.b.blacs import det_interface from easybuild.easyblocks.l.lapack import get_blas_lib @@ -74,13 +75,13 @@ def make(self): extra_makeopts = 'BLASLIB="%s -lpthread" LAPACKLIB=%s/lib/liblapack.a ' % ( get_blas_lib(self.log), os.getenv('SOFTROOTLAPACK') - ) + ) # build procedure changed in v2.0.0 if self.loosever < LooseVersion("2.0.0"): # determine interface - interface = det_interface(self.log, os.path.join(os.getenv('SOFTROOTBLACS'),'bin')) + interface = det_interface(self.log, os.path.join(os.getenv('SOFTROOTBLACS'), 'bin')) blacsroot = os.getenv('SOFTROOTBLACS') @@ -100,11 +101,10 @@ def make(self): if self.toolkit().opts['pic']: noopt += " -fPIC" extra_makeopts += 'F77="%(f77)s" CC="%(cc)s" NOOPT="%(noopt)s" CCFLAGS="-O3" ' % { - 'f77':mpif77, - 'cc':mpicc, - 'noopt':noopt - } - + 'f77': mpif77, + 'cc': mpicc, + 'noopt': noopt + } # set interface extra_makeopts += "CDEFS='-D%s -DNO_IEEE $(USEMPI)' " % interface @@ -118,9 +118,9 @@ def make(self): # set compilers and options extra_makeopts += 'FC="%(fc)s" CC="%(cc)s" ' % { - 'fc':mpif90, - 'cc':mpicc, - } + 'fc': mpif90, + 'cc': mpicc, + } # set interface extra_makeopts += 'CDEFS="-D%s" ' % interface @@ -139,15 +139,16 @@ def make_install(self): os.makedirs(dest) shutil.copy2(src,dest) except OSError, err: - self.log.error("Copying %s to installation dir %s failed: %s"%(src, dest, err)) + self.log.error("Copying %s to installation dir %s failed: %s" % (src, dest, err)) def sanitycheck(self): if not self.getcfg('sanityCheckPaths'): - self.setcfg('sanityCheckPaths',{'files':["lib/libscalapack.a"], - 'dirs':[] + self.setcfg('sanityCheckPaths',{ + 'files': ["lib/libscalapack.a"], + 'dirs': [] }) - self.log.info("Customized sanity check paths: %s"%self.getcfg('sanityCheckPaths')) + self.log.info("Customized sanity check paths: %s" % self.getcfg('sanityCheckPaths')) Application.sanitycheck(self) diff --git a/easybuild/easyblocks/t/tarball.py b/easybuild/easyblocks/t/tarball.py index 6388ab0011..28514810a5 100644 --- a/easybuild/easyblocks/t/tarball.py +++ b/easybuild/easyblocks/t/tarball.py @@ -19,11 +19,12 @@ # along with EasyBuild. If not, see . ## import shutil + from easybuild.framework.application import Application class Tarball(Application): """ - Precompiled software packaged as tarball: + Precompiled software packaged as tarball: - will unpack binary and copy it to the install dir """ @@ -41,7 +42,7 @@ def make(self): def make_install(self): - src=self.getcfg('startfrom') + src = self.getcfg('startfrom') # shutil.copytree cannot handle destination dirs that exist already. # On the other hand, Python2.4 cannot create entire paths during copytree. # Therefore, only the final directory is deleted. @@ -50,4 +51,4 @@ def make_install(self): # self.getcfg('keepsymlinks') is False by default except when explicitly put to True in .eb file shutil.copytree(src,self.installdir, symlinks=self.getcfg('keepsymlinks')) except: - self.log.exception("Copying %s to installation dir %s failed"%(src,self.installdir)) \ No newline at end of file + self.log.exception("Copying %s to installation dir %s failed" % (src,self.installdir)) diff --git a/easybuild/easyblocks/t/toolkit.py b/easybuild/easyblocks/t/toolkit.py index da69f49aa8..13fdd2188d 100644 --- a/easybuild/easyblocks/t/toolkit.py +++ b/easybuild/easyblocks/t/toolkit.py @@ -39,4 +39,4 @@ def sanityCheck(self): """ As a toolkit doens't install anything really, this is always true """ - self.sanityCheckOK = True \ No newline at end of file + self.sanityCheckOK = True diff --git a/easybuild/easyblocks/w/wps.py b/easybuild/easyblocks/w/wps.py index 0b86434b2f..f6076ea9c1 100644 --- a/easybuild/easyblocks/w/wps.py +++ b/easybuild/easyblocks/w/wps.py @@ -18,18 +18,19 @@ # You should have received a copy of the GNU General Public License # along with EasyBuild. If not, see . ## -from distutils.version import LooseVersion import fileinput import os import re import shutil import sys import tempfile +from distutils.version import LooseVersion + +import easybuild.tools.environment as env +import easybuild.tools.toolkit as toolkit from easybuild.framework.application import Application from easybuild.tools.filetools import patch_perl_script_autoflush, run_cmd, run_cmd_qa, unpack from easybuild.easyblocks.n.netcdf import set_netcdf_env_vars, get_netcdf_module_set_cmds -import easybuild.tools.environment as env -import easybuild.tools.toolkit as toolkit class WPS(Application): """Support for building/installing WPS.""" @@ -48,11 +49,12 @@ def extra_options(self): testdata_urls = [ "http://www.mmm.ucar.edu/wrf/src/data/avn_data.tar.gz", "http://www.mmm.ucar.edu/wrf/src/wps_files/geog.tar.gz" # 697MB download, 16GB unpacked! - ] + ] - extra_vars = {'buildtype':[None, "Specify the type of build (smpar: OpenMP, dmpar: MPI)."], - 'runtest':[True, "Build and run WPS tests (default: True)."], - 'testdata':[testdata_urls, "URL to test data required to run WPS test (default: %s)." % testdata_urls] + extra_vars = { + 'buildtype': [None, "Specify the type of build (smpar: OpenMP, dmpar: MPI)."], + 'runtest': [True, "Build and run WPS tests (default: True)."], + 'testdata': [testdata_urls, "URL to test data required to run WPS test (default: %s)." % testdata_urls] } return Application.extra_options(self, extra_vars) @@ -123,9 +125,9 @@ def configure(self): if LooseVersion(self.version()) >= LooseVersion("3.4"): knownbuildtypes = { - 'smpar':'serial', - 'dmpar':'dmpar' - } + 'smpar': 'serial', + 'dmpar': 'dmpar' + } if self.comp_fam == toolkit.INTEL: build_type_option = " Linux x86_64, Intel compiler" @@ -139,9 +141,9 @@ def configure(self): else: knownbuildtypes = { - 'smpar':'serial', - 'dmpar':'DM parallel' - } + 'smpar': 'serial', + 'dmpar': 'DM parallel' + } if self.comp_fam == toolkit.INTEL: build_type_option = "PC Linux x86_64, Intel compiler" @@ -167,21 +169,21 @@ def configure(self): no_qa = [] std_qa = { # named group in match will be used to construct answer - r"%s(.*\n)*Enter selection\s*\[[0-9]+-[0-9]+\]\s*:" % build_type_question:"%(nr)s", - } + r"%s(.*\n)*Enter selection\s*\[[0-9]+-[0-9]+\]\s*:" % build_type_question: "%(nr)s", + } run_cmd_qa(cmd, qa, no_qa=no_qa, std_qa=std_qa, log_all=True, simple=True) # make sure correct compilers and compiler flags are being used comps = { - 'SCC':"%s -I$(JASPERINC) -I%s" % (os.getenv('CC'), libpnginc), - 'SFC':os.getenv('F90'), - 'DM_FC':os.getenv('MPIF90'), - 'DM_CC':os.getenv('MPICC'), - 'FC':os.getenv('MPIF90'), - 'CC':os.getenv('MPICC'), - } - fn='configure.wps' + 'SCC': "%s -I$(JASPERINC) -I%s" % (os.getenv('CC'), libpnginc), + 'SFC': os.getenv('F90'), + 'DM_FC': os.getenv('MPIF90'), + 'DM_CC': os.getenv('MPICC'), + 'FC': os.getenv('MPIF90'), + 'CC': os.getenv('MPICC'), + } + fn = 'configure.wps' for line in fileinput.input(fn, inplace=1,backup='.orig.comps'): for k,v in comps.items(): line = re.sub(r"^(%s\s*=\s*).*$" % k, r"\1 %s" % v, line) @@ -238,9 +240,7 @@ def run_wps_cmd(cmdname): # setup directories and files for d in os.listdir(os.path.join(tmpdir, "geog")): - os.symlink(os.path.join(tmpdir, "geog", d), - os.path.join(tmpdir, d) - ) + os.symlink(os.path.join(tmpdir, "geog", d), os.path.join(tmpdir, d)) # patch namelist.wps file for geogrib for line in fileinput.input(namelist_file, inplace=1, backup='.orig.geogrid'): @@ -315,13 +315,13 @@ def sanitycheck(self): if not self.getcfg('sanityCheckPaths'): - self.setcfg('sanityCheckPaths',{'files':["WPS/%s"%x for x in ["geogrid.exe", - "metgrid.exe", - "ungrib.exe"]], - 'dirs':[] + self.setcfg('sanityCheckPaths', { + 'files': ["WPS/%s" % x for x in ["geogrid.exe", "metgrid.exe", + "ungrib.exe"]], + 'dirs': [] }) - self.log.info("Customized sanity check paths: %s"%self.getcfg('sanityCheckPaths')) + self.log.info("Customized sanity check paths: %s" % self.getcfg('sanityCheckPaths')) Application.sanitycheck(self) @@ -329,10 +329,10 @@ def make_module_req_guess(self): """Make sure PATH and LD_LIBRARY_PATH are set correctly.""" return { - 'PATH': [self.name()], - 'LD_LIBRARY_PATH': [self.name()], - 'MANPATH': [], - } + 'PATH': [self.name()], + 'LD_LIBRARY_PATH': [self.name()], + 'MANPATH': [], + } def make_module_extra(self): """Add netCDF environment variables to module file.""" diff --git a/easybuild/easyblocks/w/wrf.py b/easybuild/easyblocks/w/wrf.py index 05c6095f7c..5311fb32a9 100644 --- a/easybuild/easyblocks/w/wrf.py +++ b/easybuild/easyblocks/w/wrf.py @@ -22,11 +22,12 @@ import os import re import sys + +import easybuild.tools.environment as env +import easybuild.tools.toolkit as toolkit from easybuild.framework.application import Application from easybuild.tools.filetools import patch_perl_script_autoflush, run_cmd, run_cmd_qa from easybuild.easyblocks.n.netcdf import set_netcdf_env_vars, get_netcdf_module_set_cmds -import easybuild.tools.environment as env -import easybuild.tools.toolkit as toolkit class WRF(Application): """Support for building/installing WRF.""" @@ -40,10 +41,11 @@ def __init__(self,*args,**kwargs): self.comp_fam = None def extra_options(self): - extra_vars = {'buildtype':[None, "Specify the type of build (serial, smpar (OpenMP), " \ - "dmpar (MPI), dm+sm (hybrid OpenMP/MPI))."], - 'rewriteopts':[True, "Replace -O3 with CFLAGS/FFLAGS (default: True)."], - 'runtest':[True, "Build and run WRF tests (default: True)."] + extra_vars = { + 'buildtype': [None, "Specify the type of build (serial, smpar (OpenMP), " \ + "dmpar (MPI), dm+sm (hybrid OpenMP/MPI))."], + 'rewriteopts': [True, "Replace -O3 with CFLAGS/FFLAGS (default: True)."], + 'runtest': [True, "Build and run WRF tests (default: True)."] } return Application.extra_options(self, extra_vars) @@ -120,14 +122,14 @@ def configure(self): cmd = "./configure" qa = { # named group in match will be used to construct answer - "Compile for nesting? (1=basic, 2=preset moves, 3=vortex following) [default 1]:":"1", - "Compile for nesting? (0=no nesting, 1=basic, 2=preset moves, 3=vortex following) [default 0]:":"0" - } + "Compile for nesting? (1=basic, 2=preset moves, 3=vortex following) [default 1]:": "1", + "Compile for nesting? (0=no nesting, 1=basic, 2=preset moves, 3=vortex following) [default 0]:": "0" + } no_qa = [] std_qa = { # named group in match will be used to construct answer - r"%s.*\n(.*\n)*Enter selection\s*\[[0-9]+-[0-9]+\]\s*:" % build_type_question:"%(nr)s", - } + r"%s.*\n(.*\n)*Enter selection\s*\[[0-9]+-[0-9]+\]\s*:" % build_type_question: "%(nr)s", + } run_cmd_qa(cmd, qa, no_qa=no_qa, std_qa=std_qa, log_all=True, simple=True) @@ -135,12 +137,12 @@ def configure(self): # make sure correct compilers are being used comps = { - 'SCC':os.getenv('CC'), - 'SFC':os.getenv('F90'), - 'CCOMP':os.getenv('CC'), - 'DM_FC':os.getenv('MPIF90'), - 'DM_CC':"%s -DMPI2_SUPPORT" % os.getenv('MPICC'), - } + 'SCC': os.getenv('CC'), + 'SFC': os.getenv('F90'), + 'CCOMP': os.getenv('CC'), + 'DM_FC': os.getenv('MPIF90'), + 'DM_CC': "%s -DMPI2_SUPPORT" % os.getenv('MPICC'), + } for line in fileinput.input(cfgfile, inplace=1, backup='.orig.comps'): for k,v in comps.items(): line = re.sub(r"^(%s\s*=\s*).*$" % k, r"\1 %s" % v, line) @@ -150,7 +152,6 @@ def configure(self): if self.getcfg('rewriteopts'): ## replace default -O3 option in configure.wrf with CFLAGS/FFLAGS from environment - self.log.info("Rewriting optimization options in %s" % cfgfile) # set extra flags for Intel compilers @@ -322,28 +323,28 @@ def sanitycheck(self): fs = ["libwrflib.a", "wrf.exe", "ideal.exe", "real.exe", "ndown.exe", "nup.exe", "tc.exe"] ds = ["main", "run"] - self.setcfg('sanityCheckPaths',{'files':[os.path.join(self.wrfsubdir,"main",x) for x in fs], - 'dirs':[os.path.join(self.wrfsubdir,x) for x in ds] - }) + self.setcfg('sanityCheckPaths',{ + 'files': [os.path.join(self.wrfsubdir, "main", x) for x in fs], + 'dirs': [os.path.join(self.wrfsubdir, x) for x in ds] + }) - self.log.info("Customized sanity check paths: %s"%self.getcfg('sanityCheckPaths')) + self.log.info("Customized sanity check paths: %s" % self.getcfg('sanityCheckPaths')) Application.sanitycheck(self) def make_module_req_guess(self): - maindir = os.path.join(self.wrfsubdir,"main") + maindir = os.path.join(self.wrfsubdir, "main") return { - 'PATH': [maindir], - 'LD_LIBRARY_PATH': [maindir], - 'MANPATH': [], - } + 'PATH': [maindir], + 'LD_LIBRARY_PATH': [maindir], + 'MANPATH': [], + } def make_module_extra(self): txt = Application.make_module_extra(self) - txt += get_netcdf_module_set_cmds(self.log) return txt From b6d459bb5c9f318348ac3050524bf5e4275c78b8 Mon Sep 17 00:00:00 2001 From: Toon Willems Date: Fri, 3 Aug 2012 10:49:23 +0200 Subject: [PATCH 250/798] fix gpl headers --- easybuild/framework/application.py | 3 ++- easybuild/tools/config.py | 1 + easybuild/tools/environment.py | 20 ++++++++++++++++++++ easybuild/tools/filetools.py | 1 + easybuild/tools/pbs_job.py | 1 + easybuild/tools/repository.py | 1 + 6 files changed, 26 insertions(+), 1 deletion(-) diff --git a/easybuild/framework/application.py b/easybuild/framework/application.py index a5d233b66f..6cef8ca0ce 100644 --- a/easybuild/framework/application.py +++ b/easybuild/framework/application.py @@ -1,5 +1,6 @@ ## -# Copyright 2009-2012 Stijn De Weirdt, Dries Verdegem, Kenneth Hoste, Pieter De Baets, Jens Timmerman, Toon Willems +# Copyright 2009-2012 Stijn De Weirdt, Dries Verdegem, Kenneth Hoste, Pieter De Baets, Jens Timmerman +# Copyright 2012 Toon Willems # # This file is part of EasyBuild, # originally created by the HPC team of the University of Ghent (http://ugent.be/hpc). diff --git a/easybuild/tools/config.py b/easybuild/tools/config.py index 326bdb8fdb..16fe470a17 100644 --- a/easybuild/tools/config.py +++ b/easybuild/tools/config.py @@ -1,5 +1,6 @@ ## # Copyright 2009-2012 Stijn De Weirdt, Dries Verdegem, Kenneth Hoste, Pieter De Baets, Jens Timmerman +# Copyright 2012 Toon Willems # # This file is part of EasyBuild, # originally created by the HPC team of the University of Ghent (http://ugent.be/hpc). diff --git a/easybuild/tools/environment.py b/easybuild/tools/environment.py index 44d07c84c8..8e0b7d4507 100644 --- a/easybuild/tools/environment.py +++ b/easybuild/tools/environment.py @@ -1,3 +1,23 @@ +## +# Copyright 2012 Toon Willems +# +# This file is part of EasyBuild, +# originally created by the HPC team of the University of Ghent (http://ugent.be/hpc). +# +# http://github.com/hpcugent/easybuild +# +# EasyBuild is free software: you can redistribute it and/or modify +# it under the terms of the GNU General Public License as published by +# the Free Software Foundation v2. +# +# EasyBuild is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with EasyBuild. If not, see . +## import os changes = {} diff --git a/easybuild/tools/filetools.py b/easybuild/tools/filetools.py index c28adf8532..cb3077aa14 100644 --- a/easybuild/tools/filetools.py +++ b/easybuild/tools/filetools.py @@ -1,5 +1,6 @@ ## # Copyright 2009-2012 Stijn De Weirdt, Dries Verdegem, Kenneth Hoste, Pieter De Baets, Jens Timmerman +# Copyright 2012 Toon Willems # # This file is part of EasyBuild, # originally created by the HPC team of the University of Ghent (http://ugent.be/hpc). diff --git a/easybuild/tools/pbs_job.py b/easybuild/tools/pbs_job.py index 671ef0ffae..90449977d8 100644 --- a/easybuild/tools/pbs_job.py +++ b/easybuild/tools/pbs_job.py @@ -1,3 +1,4 @@ +## # Copyright 2012 Stijn De Weirdt, Toon Willems # # This file is part of EasyBuild, diff --git a/easybuild/tools/repository.py b/easybuild/tools/repository.py index 9a557a0185..1ac0b13cab 100644 --- a/easybuild/tools/repository.py +++ b/easybuild/tools/repository.py @@ -1,5 +1,6 @@ ## # Copyright 2009-2012 Stijn De Weirdt, Dries Verdegem, Kenneth Hoste, Pieter De Baets, Jens Timmerman +# Copyright 2012 Toon Willems # # This file is part of EasyBuild, # originally created by the HPC team of the University of Ghent (http://ugent.be/hpc). From 27b6e09e03eda2aee4fe5b852140943a86d74825 Mon Sep 17 00:00:00 2001 From: Kenneth Hoste Date: Wed, 1 Aug 2012 10:35:19 +0200 Subject: [PATCH 251/798] add support for building and installing FSL, add example easyconfig + patch --- easybuild/easyblocks/f/fsl.py | 100 ++++++++++++++++++ .../f/FSL/FSL-4.1.9-goalf-1.1.0-no-OFED.eb | 15 +++ .../f/FSL/FSL_melodic_makefile.patch | 11 ++ 3 files changed, 126 insertions(+) create mode 100644 easybuild/easyblocks/f/fsl.py create mode 100644 easybuild/easyconfigs/f/FSL/FSL-4.1.9-goalf-1.1.0-no-OFED.eb create mode 100644 easybuild/easyconfigs/f/FSL/FSL_melodic_makefile.patch diff --git a/easybuild/easyblocks/f/fsl.py b/easybuild/easyblocks/f/fsl.py new file mode 100644 index 0000000000..3b75c3d86a --- /dev/null +++ b/easybuild/easyblocks/f/fsl.py @@ -0,0 +1,100 @@ +## +# Copyright 2009-2012 Kenneth Hoste +# +# This file is part of EasyBuild, +# originally created by the HPC team of the University of Ghent (http://ugent.be/hpc). +# +# http://github.com/hpcugent/easybuild +# +# EasyBuild is free software: you can redistribute it and/or modify +# it under the terms of the GNU General Public License as published by +# the Free Software Foundation v2. +# +# EasyBuild is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with EasyBuild. If not, see . +## +import difflib +from distutils.version import LooseVersion +import os +import shutil +import easybuild.tools.environment as env +from easybuild.framework.application import Application +from easybuild.tools.filetools import run_cmd + +class FSL(Application): + """Support for building and installing FSL.""" + + def __init__(self,*args,**kwargs): + Application.__init__(self, args,kwargs) + + self.build_in_installdir = True + + self.fsldir = None + + def configure(self): + """Configure FSL build: set FSLDIR env var.""" + + self.fsldir = self.getcfg('startfrom') + env.set('FSLDIR', self.fsldir) + + # determine FSL machine type + cmd = ". %s/etc/fslconf/fsl.sh && echo $FSLMACHTYPE" % self.fsldir + (out, _) = run_cmd(cmd, log_all=True, simple=False) + fslmachtype = out.strip() + self.log.debug("FSL machine type: %s" % fslmachtype) + + # prepare config + ## either using matching config, or copy closest match + cfgdir = os.path.join(self.fsldir, "config") + try: + cfgs = os.listdir(cfgdir) + best_cfg = difflib.get_close_matches(fslmachtype, cfgs)[0] + + self.log.debug("Best matching config dir for %s is %s" % (fslmachtype, best_cfg)) + + if fslmachtype != best_cfg: + srcdir = os.path.join(cfgdir, best_cfg) + tgtdir = os.path.join(cfgdir, fslmachtype) + shutil.copytree(srcdir, tgtdir) + self.log.debug("Copied %s to %s" % (srcdir, tgtdir)) + except OSError, err: + self.log.error("Failed to copy closest matching config dir: %s" % err) + + def make(self): + """Building is performed in make_install.""" + pass + + def make_install(self): + """Build FSL using supplied script.""" + + cmd = ". %s/etc/fslconf/fsl.sh && ./build" % self.fsldir + run_cmd(cmd, log_all=True, simple=True) + + def make_module_req_guess(self): + + guesses = Application.make_module_req_guess(self) + + guesses.update({ + 'PATH': ["fsl/bin"], + 'LD_LIBRARY_PATH': ["fsl/lib"], + }) + + return guesses + + def sanitycheck(self): + """Custom sanity check for FSL""" + + if not self.getcfg('sanityCheckPaths'): + + self.setcfg('sanityCheckPaths',{'files':[], + 'dirs':["fsl/%s" % x for x in ["bin", "data", "etc", "extras", "include", "lib"]] + }) + + self.log.info("Customized sanity check paths: %s" % self.getcfg('sanityCheckPaths')) + + Application.sanitycheck(self) diff --git a/easybuild/easyconfigs/f/FSL/FSL-4.1.9-goalf-1.1.0-no-OFED.eb b/easybuild/easyconfigs/f/FSL/FSL-4.1.9-goalf-1.1.0-no-OFED.eb new file mode 100644 index 0000000000..0308c62580 --- /dev/null +++ b/easybuild/easyconfigs/f/FSL/FSL-4.1.9-goalf-1.1.0-no-OFED.eb @@ -0,0 +1,15 @@ +name='FSL' +version='4.1.9' + +homepage='http://www.fmrib.ox.ac.uk/fsl/' +description="""FSL is a comprehensive library of analysis tools for FMRI, MRI and DTI brain imaging data.""" + +toolkit={'name':'goalf','version':'1.1.0-no-OFED'} + +sourceURLs=["http://www.fmrib.ox.ac.uk/fsldownloads/"] +sources=['%s-%s-sources.tar.gz' % (name.lower(), version)] + +patches=['FSL_melodic_makefile.patch'] + +# libX11-devel is required for X11/Xlib.h, required by tk build +osdependencies=['libX11-devel'] diff --git a/easybuild/easyconfigs/f/FSL/FSL_melodic_makefile.patch b/easybuild/easyconfigs/f/FSL/FSL_melodic_makefile.patch new file mode 100644 index 0000000000..cdbe9bb801 --- /dev/null +++ b/easybuild/easyconfigs/f/FSL/FSL_melodic_makefile.patch @@ -0,0 +1,11 @@ +--- fsl.orig/src/melodic/Makefile 2012-07-31 15:45:06.997491869 +0200 ++++ fsl/src/melodic/Makefile 2012-07-31 15:58:39.172984156 +0200 +@@ -3,7 +3,7 @@ + include ${FSLCONFDIR}/default.mk + + OPTFLAGS = -O3 -Wno-deprecated +-OPTFLAGS_alphaev6-dec-osf 5.0-gcc2.95.2 = -O3 -mieee -mfp-trap-mode=sui ++#OPTFLAGS_alphaev6-dec-osf 5.0-gcc2.95.2 = -O3 -mieee -mfp-trap-mode=sui + + PROJNAME = melodic + \ No newline at end of file From bde2c8c4d28fe4bbbd7e9170d57dc9e647ea5a2e Mon Sep 17 00:00:00 2001 From: Kenneth Hoste Date: Wed, 1 Aug 2012 10:36:10 +0200 Subject: [PATCH 252/798] re-add import required for VERBOSE_VERSION, ignore PyDev warning on use of FileRepository in EasyBuild config (config is exec'ed, so it works) --- easybuild/build.py | 2 ++ easybuild/easybuild_config.py | 2 +- 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/easybuild/build.py b/easybuild/build.py index 7edb7b944a..f790785a61 100644 --- a/easybuild/build.py +++ b/easybuild/build.py @@ -28,6 +28,8 @@ import copy import platform from datetime import datetime + +import easybuild # required for VERBOSE_VERSION from easybuild.framework.application import Application, get_instance from easybuild.tools.build_log import EasyBuildError, initLogger, \ removeLogHandler, print_msg diff --git a/easybuild/easybuild_config.py b/easybuild/easybuild_config.py index 53c56eabcd..6c279394f5 100644 --- a/easybuild/easybuild_config.py +++ b/easybuild/easybuild_config.py @@ -59,7 +59,7 @@ ## optionally a subdir argument can be specified: ## `repository = FileRepository(repositoryPath, subdir)` repositoryPath = os.path.join(prefix, 'ebfiles_repo') -repository = FileRepository(repositoryPath) +repository = FileRepository(repositoryPath) #@UndefinedVariable # log format: (dir, filename template) # supported in template: name, version, data, time From 952c00dcd3190c4e107c6735cf0e9c82152c39a8 Mon Sep 17 00:00:00 2001 From: Kenneth Hoste Date: Wed, 1 Aug 2012 11:55:30 +0200 Subject: [PATCH 253/798] remove unneccesary import --- easybuild/easyblocks/f/fsl.py | 1 - 1 file changed, 1 deletion(-) diff --git a/easybuild/easyblocks/f/fsl.py b/easybuild/easyblocks/f/fsl.py index 3b75c3d86a..061da85eb3 100644 --- a/easybuild/easyblocks/f/fsl.py +++ b/easybuild/easyblocks/f/fsl.py @@ -19,7 +19,6 @@ # along with EasyBuild. If not, see . ## import difflib -from distutils.version import LooseVersion import os import shutil import easybuild.tools.environment as env From dd8378530fdfcbd9d471eb9b803a18631199bfd5 Mon Sep 17 00:00:00 2001 From: Kenneth Hoste Date: Wed, 1 Aug 2012 12:13:39 +0200 Subject: [PATCH 254/798] use toolkit_comp_family + constants in toolkit itself as well (eat your own dog food!) --- easybuild/tools/toolkit.py | 13 ++++++------- 1 file changed, 6 insertions(+), 7 deletions(-) diff --git a/easybuild/tools/toolkit.py b/easybuild/tools/toolkit.py index afff955b9f..582d714caf 100644 --- a/easybuild/tools/toolkit.py +++ b/easybuild/tools/toolkit.py @@ -315,9 +315,9 @@ def prepareACML(self): self._addDependencyVariables(['ACML']) - if os.getenv('SOFTROOTGCC'): + if self.toolkit_comp_family() == GCC: compiler = 'gfortran' - elif os.getenv('SOFTROOTIFORT'): + elif self.toolkit_comp_family() == INTEL: compiler = 'ifort' else: log.error("Don't know which compiler-specific subdir for ACML to use.") @@ -578,10 +578,9 @@ def prepareIMKL(self): self._flagsForSubdirs(mklRoot, mklld, flag="-L%s", varskey="LDFLAGS") self._flagsForSubdirs(mklRoot, mklcpp, flag="-I%s", varskey="CPPFLAGS") - if os.getenv('SOFTROOTGCC'): - if not (os.getenv('SOFTROOTICC') or os.getenv('SOFTROOTIFORT')): - for var in ['LIBLAPACK', 'LIBLAPACK_MT', 'LIBSCALAPACK', 'LIBSCALAPACK_MT']: - self.vars[var] = self.vars[var].replace('mkl_intel_lp64', 'mkl_gf_lp64') + if self.toolkit_comp_family() == GCC: + for var in ['LIBLAPACK', 'LIBLAPACK_MT', 'LIBSCALAPACK', 'LIBSCALAPACK_MT']: + self.vars[var] = self.vars[var].replace('mkl_intel_lp64', 'mkl_gf_lp64') else: log.error("Toolkit preparation with both GCC and Intel compilers loaded is not supported.") @@ -590,7 +589,7 @@ def prepareIMPI(self): Prepare for Intel MPI library """ - if os.getenv('SOFTROOTICC') and os.getenv('SOFTROOTIFORT') and not os.getenv('SOFTROOTGCC'): + if self.toolkit_comp_family() == INTEL: # Intel-based toolkit self.vars['MPICC'] = 'mpiicc %s' % self.m32flag From 8b068905b2953005c731aef60d49880d91cf547b Mon Sep 17 00:00:00 2001 From: Kenneth Hoste Date: Wed, 1 Aug 2012 14:28:24 +0200 Subject: [PATCH 255/798] fix refactoring error --- easybuild/tools/toolkit.py | 2 -- 1 file changed, 2 deletions(-) diff --git a/easybuild/tools/toolkit.py b/easybuild/tools/toolkit.py index 582d714caf..f0e4d37e76 100644 --- a/easybuild/tools/toolkit.py +++ b/easybuild/tools/toolkit.py @@ -581,8 +581,6 @@ def prepareIMKL(self): if self.toolkit_comp_family() == GCC: for var in ['LIBLAPACK', 'LIBLAPACK_MT', 'LIBSCALAPACK', 'LIBSCALAPACK_MT']: self.vars[var] = self.vars[var].replace('mkl_intel_lp64', 'mkl_gf_lp64') - else: - log.error("Toolkit preparation with both GCC and Intel compilers loaded is not supported.") def prepareIMPI(self): """ From c0dbac763dbb0511c208e994993ffaa897607103 Mon Sep 17 00:00:00 2001 From: Kenneth Hoste Date: Wed, 1 Aug 2012 15:46:32 +0200 Subject: [PATCH 256/798] only prepare for direct member module of a toolkit , not for implicit dependencies (like icc/ifort for imkl); add BLACS as explicit dependency for goalf toolkit in example easyconfig --- .../easyconfigs/g/goalf/goalf-1.1.0-no-OFED.eb | 5 ++++- easybuild/tools/modules.py | 15 +++++++++++---- easybuild/tools/toolkit.py | 6 +++--- 3 files changed, 18 insertions(+), 8 deletions(-) diff --git a/easybuild/easyconfigs/g/goalf/goalf-1.1.0-no-OFED.eb b/easybuild/easyconfigs/g/goalf/goalf-1.1.0-no-OFED.eb index af2332af87..1414524f2e 100644 --- a/easybuild/easyconfigs/g/goalf/goalf-1.1.0-no-OFED.eb +++ b/easybuild/easyconfigs/g/goalf/goalf-1.1.0-no-OFED.eb @@ -26,13 +26,16 @@ lapacklib='LAPACK' lapackver='3.4.0' lapack='%s-%s'%(lapacklib, lapackver) +blacsver='1.1' + ## compiler toolkit depencies dependencies=[(compname, compver), (mpilib, mpiver, '-%s%s'%(comp,mpisuff)), (blaslib, blasver, '-%s-%s'%(comp,lapack)), (lapacklib, lapackver, '-%s'%comp), ('FFTW', '3.3.1', '-%s-%s'%(comp,mpi)), - ('ScaLAPACK','1.8.0', '-%s-%s-%s-%s-BLACS-1.1'%(comp,mpi,blas,lapack)) + ('BLACS', blacsver, '-%s'%mpi), + ('ScaLAPACK','1.8.0', '-%s-%s-%s-%s-BLACS-%s'%(comp,mpi,blas,lapack,blacsver)) ] moduleclass='compiler' diff --git a/easybuild/tools/modules.py b/easybuild/tools/modules.py index 0eea9acd5f..091594c399 100644 --- a/easybuild/tools/modules.py +++ b/easybuild/tools/modules.py @@ -233,9 +233,9 @@ def loaded_modules(self): return loaded_modules - def dependencies_for(self, name, version): + def dependencies_for(self, name, version, depth=-1): """ - Obtain a list of dependencies for the given module (recursively) + Obtain a list of dependencies for the given module, determined recursively, up to a specified depth (optionally) """ modfilepath = self.modulefile_path(name, version) log.debug("modulefile path %s/%s: %s" % (name, version, modfilepath)) @@ -250,8 +250,15 @@ def dependencies_for(self, name, version): loadregex = re.compile("^\s+module load\s+(.*)$", re.M) mods = [mod.split('/') for mod in loadregex.findall(modtxt)] - # recursively determine dependencies for dependency modules - moddeps = [self.dependencies_for(modname, modversion) for (modname, modversion) in mods] + if depth > 0: + # recursively determine dependencies for these dependency modules + moddeps = [self.dependencies_for(modname, modversion, depth=depth-1) for (modname, modversion) in mods] + elif depth==0: + # stop recursion + moddeps = [] + else: + # recursively determine dependencies for dependency modules until all dependencies are resolved (no or negative depth given) + moddeps = [self.dependencies_for(modname, modversion) for (modname, modversion) in mods] deps = [{'name':modname, 'version':modversion} for (modname, modversion) in mods] diff --git a/easybuild/tools/toolkit.py b/easybuild/tools/toolkit.py index f0e4d37e76..5bfa19370a 100644 --- a/easybuild/tools/toolkit.py +++ b/easybuild/tools/toolkit.py @@ -159,9 +159,9 @@ def prepare(self, onlymod=None): modules.addModule(self.dependencies) modules.load() - ## Determine toolkit dependencies, so we can prepare for them - self.toolkit_deps = modules.dependencies_for(self.name, self.version) - log.debug('List of toolkit dependencies: %s' % self.toolkit_deps) + ## Determine direct toolkit dependencies, so we can prepare for them + self.toolkit_deps = modules.dependencies_for(self.name, self.version, depth=1) + log.debug('List of direct toolkit dependencies: %s' % self.toolkit_deps) ## Generate the variables to be set self._generate_variables() From 555be36fd552261beb76065eb051020f340666f6 Mon Sep 17 00:00:00 2001 From: Kenneth Hoste Date: Wed, 1 Aug 2012 16:25:33 +0200 Subject: [PATCH 257/798] correct depth in recursively depency searching --- easybuild/tools/modules.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/easybuild/tools/modules.py b/easybuild/tools/modules.py index 091594c399..36747509d2 100644 --- a/easybuild/tools/modules.py +++ b/easybuild/tools/modules.py @@ -250,9 +250,10 @@ def dependencies_for(self, name, version, depth=-1): loadregex = re.compile("^\s+module load\s+(.*)$", re.M) mods = [mod.split('/') for mod in loadregex.findall(modtxt)] + depth = depth - 1 if depth > 0: # recursively determine dependencies for these dependency modules - moddeps = [self.dependencies_for(modname, modversion, depth=depth-1) for (modname, modversion) in mods] + moddeps = [self.dependencies_for(modname, modversion, depth=depth) for (modname, modversion) in mods] elif depth==0: # stop recursion moddeps = [] From 4def8638dbf3043bb6cbf977a6807d9d9337866a Mon Sep 17 00:00:00 2001 From: Kenneth Hoste Date: Wed, 1 Aug 2012 16:27:34 +0200 Subject: [PATCH 258/798] check for errors in FSL build (see build.log) --- easybuild/easyblocks/f/fsl.py | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/easybuild/easyblocks/f/fsl.py b/easybuild/easyblocks/f/fsl.py index 061da85eb3..8c10af8973 100644 --- a/easybuild/easyblocks/f/fsl.py +++ b/easybuild/easyblocks/f/fsl.py @@ -20,6 +20,7 @@ ## import difflib import os +import re import shutil import easybuild.tools.environment as env from easybuild.framework.application import Application @@ -74,6 +75,16 @@ def make_install(self): cmd = ". %s/etc/fslconf/fsl.sh && ./build" % self.fsldir run_cmd(cmd, log_all=True, simple=True) + # check build.log file for success + buildlog = os.path.join(self.installdir, "fsl", "build.log") + f = open(buildlog, "r") + txt = f.read() + f.close() + + error_regexp = re.compile("ERROR in BUILD") + if error_regexp.search(txt): + self.log.error("Error detected in build log %s." % buildlog) + def make_module_req_guess(self): guesses = Application.make_module_req_guess(self) From b3926b9e43b9af9a111b54cbf94b3af8f9779141 Mon Sep 17 00:00:00 2001 From: Kenneth Hoste Date: Thu, 2 Aug 2012 08:35:37 +0200 Subject: [PATCH 259/798] fix BLACS version suffix in goalf example easyconfig (should include compiler as well) --- easybuild/easyconfigs/g/goalf/goalf-1.1.0-no-OFED.eb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/easybuild/easyconfigs/g/goalf/goalf-1.1.0-no-OFED.eb b/easybuild/easyconfigs/g/goalf/goalf-1.1.0-no-OFED.eb index 1414524f2e..e08a7f0c21 100644 --- a/easybuild/easyconfigs/g/goalf/goalf-1.1.0-no-OFED.eb +++ b/easybuild/easyconfigs/g/goalf/goalf-1.1.0-no-OFED.eb @@ -34,7 +34,7 @@ dependencies=[(compname, compver), (blaslib, blasver, '-%s-%s'%(comp,lapack)), (lapacklib, lapackver, '-%s'%comp), ('FFTW', '3.3.1', '-%s-%s'%(comp,mpi)), - ('BLACS', blacsver, '-%s'%mpi), + ('BLACS', blacsver, '-%s-%s'%(comp,mpi)), ('ScaLAPACK','1.8.0', '-%s-%s-%s-%s-BLACS-%s'%(comp,mpi,blas,lapack,blacsver)) ] From 42ac8b6402000e9d78b1c95d82129b697e0962b9 Mon Sep 17 00:00:00 2001 From: Kenneth Hoste Date: Thu, 2 Aug 2012 08:44:21 +0200 Subject: [PATCH 260/798] make sure setting LIBSCALAPACK works, also when there's no BLACS --- easybuild/tools/toolkit.py | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/easybuild/tools/toolkit.py b/easybuild/tools/toolkit.py index 5bfa19370a..c5969a8ce9 100644 --- a/easybuild/tools/toolkit.py +++ b/easybuild/tools/toolkit.py @@ -694,8 +694,11 @@ def prepareScaLAPACK(self): """ Prepare for ScaLAPACK library """ - self.vars['LIBSCALAPACK'] += " -lscalapack" - self.vars['LIBSCALAPACK_MT'] += " %s -lpthread" % self.vars['LIBSCALAPACK'] + + # we need to be careful here, LIBSCALAPACK(_MT) may be set by prepareBLACS, or not + self.vars['LIBSCALAPACK'] = "%s -lscalapack" % self.vars.get('LIBSCALAPACK', '') + self.vars['LIBSCALAPACK_MT'] = "%s %s -lpthread" % (self.vars['LIBSCALAPACK'], + self.vars.get('LIBSCALAPACK_MT', '')) self._addDependencyVariables(['ScaLAPACK']) From 055d4ecdf4d2caada473b49b7fd4193e662b95e1 Mon Sep 17 00:00:00 2001 From: Kenneth Hoste Date: Thu, 2 Aug 2012 11:22:59 +0200 Subject: [PATCH 261/798] complete patch with Makefile fixes; LD_LIBRARY_PATH shouldn't and doesn't need to be set --- .../f/FSL/FSL-4.1.9-goalf-1.1.0-no-OFED.eb | 2 +- ...lodic_makefile.patch => FSL_makefile_fixes.patch} | 12 +++++++++++- 2 files changed, 12 insertions(+), 2 deletions(-) rename easybuild/easyconfigs/f/FSL/{FSL_melodic_makefile.patch => FSL_makefile_fixes.patch} (50%) diff --git a/easybuild/easyconfigs/f/FSL/FSL-4.1.9-goalf-1.1.0-no-OFED.eb b/easybuild/easyconfigs/f/FSL/FSL-4.1.9-goalf-1.1.0-no-OFED.eb index 0308c62580..e989116d1b 100644 --- a/easybuild/easyconfigs/f/FSL/FSL-4.1.9-goalf-1.1.0-no-OFED.eb +++ b/easybuild/easyconfigs/f/FSL/FSL-4.1.9-goalf-1.1.0-no-OFED.eb @@ -9,7 +9,7 @@ toolkit={'name':'goalf','version':'1.1.0-no-OFED'} sourceURLs=["http://www.fmrib.ox.ac.uk/fsldownloads/"] sources=['%s-%s-sources.tar.gz' % (name.lower(), version)] -patches=['FSL_melodic_makefile.patch'] +patches=['FSL_makefile_fixes.patch'] # libX11-devel is required for X11/Xlib.h, required by tk build osdependencies=['libX11-devel'] diff --git a/easybuild/easyconfigs/f/FSL/FSL_melodic_makefile.patch b/easybuild/easyconfigs/f/FSL/FSL_makefile_fixes.patch similarity index 50% rename from easybuild/easyconfigs/f/FSL/FSL_melodic_makefile.patch rename to easybuild/easyconfigs/f/FSL/FSL_makefile_fixes.patch index cdbe9bb801..762967fa5a 100644 --- a/easybuild/easyconfigs/f/FSL/FSL_melodic_makefile.patch +++ b/easybuild/easyconfigs/f/FSL/FSL_makefile_fixes.patch @@ -8,4 +8,14 @@ +#OPTFLAGS_alphaev6-dec-osf 5.0-gcc2.95.2 = -O3 -mieee -mfp-trap-mode=sui PROJNAME = melodic - \ No newline at end of file + --- fsl.orig/src/libmeshutils/Makefile 2009-10-23 18:49:08.000000000 +0200 ++++ fsl/src/libmeshutils/Makefile 2012-08-02 11:20:48.707842124 +0200 +@@ -3,7 +3,7 @@ + + PROJNAME = meshUtils + +-LD_LIBRARY_PATH=${FSLDIR}/lib ++#LD_LIBRARY_PATH=${FSLDIR}/lib + + USRINCFLAGS = -I${INC_NEWMAT} -I${INC_ZLIB} -I${INC_PROB} -I${INC_BOOST} + USRLDFLAGS = -L${LIB_PROB} -L${LIB_NEWMAT} -L${LIB_ZLIB} From a8c9d866ee635fae54ace6759e71614d44438035 Mon Sep 17 00:00:00 2001 From: Kenneth Hoste Date: Thu, 2 Aug 2012 12:25:01 +0200 Subject: [PATCH 262/798] add setting of FSLDIR in module --- easybuild/easyblocks/f/fsl.py | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/easybuild/easyblocks/f/fsl.py b/easybuild/easyblocks/f/fsl.py index 8c10af8973..ab32c3cf97 100644 --- a/easybuild/easyblocks/f/fsl.py +++ b/easybuild/easyblocks/f/fsl.py @@ -86,6 +86,7 @@ def make_install(self): self.log.error("Error detected in build log %s." % buildlog) def make_module_req_guess(self): + """Set correct PATH and LD_LIBRARY_PATH variables.""" guesses = Application.make_module_req_guess(self) @@ -96,6 +97,15 @@ def make_module_req_guess(self): return guesses + def make_module_extra(self): + """Add setting of FSLDIR in module.""" + + txt = Application.make_module_extra(self) + + txt += self.moduleGenerator.setEnvironment("FSLDIR", "$root/fsl") + + return txt + def sanitycheck(self): """Custom sanity check for FSL""" From b2ee6b1426b5e9296557cf284c66d072f400d4fa Mon Sep 17 00:00:00 2001 From: Kenneth Hoste Date: Thu, 2 Aug 2012 14:48:45 +0200 Subject: [PATCH 263/798] extend patch file so other compilers can be used as well --- .../f/FSL/FSL_makefile_fixes.patch | 294 ++++++++++++++++++ 1 file changed, 294 insertions(+) diff --git a/easybuild/easyconfigs/f/FSL/FSL_makefile_fixes.patch b/easybuild/easyconfigs/f/FSL/FSL_makefile_fixes.patch index 762967fa5a..c78dd2e48a 100644 --- a/easybuild/easyconfigs/f/FSL/FSL_makefile_fixes.patch +++ b/easybuild/easyconfigs/f/FSL/FSL_makefile_fixes.patch @@ -19,3 +19,297 @@ USRINCFLAGS = -I${INC_NEWMAT} -I${INC_ZLIB} -I${INC_PROB} -I${INC_BOOST} USRLDFLAGS = -L${LIB_PROB} -L${LIB_NEWMAT} -L${LIB_ZLIB} +diff -ru fsl.orig/config/apple-darwin10-gcc4.2/systemvars.mk fsl/config/apple-darwin10-gcc4.2/systemvars.mk +--- fsl.orig/config/apple-darwin10-gcc4.2/systemvars.mk 2009-11-03 18:02:14.000000000 +0100 ++++ fsl/config/apple-darwin10-gcc4.2/systemvars.mk 2012-08-02 14:45:57.697749330 +0200 +@@ -3,8 +3,8 @@ + + # Compiler dependent variables + +-CC = cc +-CXX = c++ ++CC ?= cc ++CXX ?= c++ + CSTATICFLAGS = + CXXSTATICFLAGS = + +diff -ru fsl.orig/config/apple-darwin7-gcc3.1/systemvars.mk fsl/config/apple-darwin7-gcc3.1/systemvars.mk +--- fsl.orig/config/apple-darwin7-gcc3.1/systemvars.mk 2007-07-13 13:00:20.000000000 +0200 ++++ fsl/config/apple-darwin7-gcc3.1/systemvars.mk 2012-08-02 14:45:57.734749873 +0200 +@@ -7,8 +7,8 @@ + + # Compiler dependent variables + +-CC = cc +-CXX = c++ ++CC ?= cc ++CXX ?= c++ + CSTATICFLAGS = + CXXSTATICFLAGS = + +diff -ru fsl.orig/config/apple-darwin7-gcc3.3/systemvars.mk fsl/config/apple-darwin7-gcc3.3/systemvars.mk +--- fsl.orig/config/apple-darwin7-gcc3.3/systemvars.mk 2007-07-13 13:00:20.000000000 +0200 ++++ fsl/config/apple-darwin7-gcc3.3/systemvars.mk 2012-08-02 14:45:57.767750355 +0200 +@@ -7,8 +7,8 @@ + + # Compiler dependent variables + +-CC = cc +-CXX = c++ ++CC ?= cc ++CXX ?= c++ + CSTATICFLAGS = + CXXSTATICFLAGS = + +diff -ru fsl.orig/config/apple-darwin8-gcc4.0/systemvars.mk fsl/config/apple-darwin8-gcc4.0/systemvars.mk +--- fsl.orig/config/apple-darwin8-gcc4.0/systemvars.mk 2007-12-19 15:40:57.000000000 +0100 ++++ fsl/config/apple-darwin8-gcc4.0/systemvars.mk 2012-08-02 14:45:57.801750851 +0200 +@@ -3,8 +3,8 @@ + + # Compiler dependent variables + +-CC = cc +-CXX = c++ ++CC ?= cc ++CXX ?= c++ + CSTATICFLAGS = + CXXSTATICFLAGS = + +diff -ru fsl.orig/config/apple-darwin9-gcc4.0/systemvars.mk fsl/config/apple-darwin9-gcc4.0/systemvars.mk +--- fsl.orig/config/apple-darwin9-gcc4.0/systemvars.mk 2007-12-19 15:33:53.000000000 +0100 ++++ fsl/config/apple-darwin9-gcc4.0/systemvars.mk 2012-08-02 14:45:57.835751349 +0200 +@@ -3,8 +3,8 @@ + + # Compiler dependent variables + +-CC = cc +-CXX = c++ ++CC ?= cc ++CXX ?= c++ + CSTATICFLAGS = + CXXSTATICFLAGS = + +diff -ru fsl.orig/config/generic/systemvars.mk fsl/config/generic/systemvars.mk +--- fsl.orig/config/generic/systemvars.mk 2007-07-13 13:00:20.000000000 +0200 ++++ fsl/config/generic/systemvars.mk 2012-08-02 14:45:57.869751846 +0200 +@@ -16,8 +16,8 @@ + + # Compiler dependent variables + +-CC = gcc +-CXX = c++ ++CC ?= gcc ++CXX ?= c++ + CSTATICFLAGS = -static + CXXSTATICFLAGS = -static + +diff -ru fsl.orig/config/i686-pc-cygwin-gcc3.2/systemvars.mk fsl/config/i686-pc-cygwin-gcc3.2/systemvars.mk +--- fsl.orig/config/i686-pc-cygwin-gcc3.2/systemvars.mk 2007-07-13 13:00:20.000000000 +0200 ++++ fsl/config/i686-pc-cygwin-gcc3.2/systemvars.mk 2012-08-02 14:45:57.903752343 +0200 +@@ -18,8 +18,8 @@ + + # Compiler dependent variables + +-CC = gcc-2 +-CXX = c++-2 ++CC ?= gcc-2 ++CXX ?= c++-2 + CSTATICFLAGS = -static + CXXSTATICFLAGS = -static + +diff -ru fsl.orig/config/i686-pc-cygwin-gcc3.3/systemvars.mk fsl/config/i686-pc-cygwin-gcc3.3/systemvars.mk +--- fsl.orig/config/i686-pc-cygwin-gcc3.3/systemvars.mk 2007-07-13 13:00:20.000000000 +0200 ++++ fsl/config/i686-pc-cygwin-gcc3.3/systemvars.mk 2012-08-02 14:45:57.936752826 +0200 +@@ -18,8 +18,8 @@ + + # Compiler dependent variables + +-CC = gcc +-CXX = c++ ++CC ?= gcc ++CXX ?= c++ + CSTATICFLAGS = -static + CXXSTATICFLAGS = -static + +diff -ru fsl.orig/config/i686-pc-cygwin-gcc3.4/systemvars.mk fsl/config/i686-pc-cygwin-gcc3.4/systemvars.mk +--- fsl.orig/config/i686-pc-cygwin-gcc3.4/systemvars.mk 2007-07-13 13:00:20.000000000 +0200 ++++ fsl/config/i686-pc-cygwin-gcc3.4/systemvars.mk 2012-08-02 14:45:57.979753456 +0200 +@@ -18,8 +18,8 @@ + + # Compiler dependent variables + +-CC = gcc +-CXX = c++ ++CC ?= gcc ++CXX ?= c++ + CSTATICFLAGS = -static + CXXSTATICFLAGS = -static + +diff -ru fsl.orig/config/linux_32-gcc2.96/systemvars.mk fsl/config/linux_32-gcc2.96/systemvars.mk +--- fsl.orig/config/linux_32-gcc2.96/systemvars.mk 2007-07-25 17:21:07.000000000 +0200 ++++ fsl/config/linux_32-gcc2.96/systemvars.mk 2012-08-02 14:45:58.021754069 +0200 +@@ -18,8 +18,8 @@ + + # Compiler dependent variables + +-CC = gcc +-CXX = c++ ++CC ?= gcc ++CXX ?= c++ + CSTATICFLAGS = -static + CXXSTATICFLAGS = -static + +diff -ru fsl.orig/config/linux_32-gcc3.2/systemvars.mk fsl/config/linux_32-gcc3.2/systemvars.mk +--- fsl.orig/config/linux_32-gcc3.2/systemvars.mk 2007-07-25 17:21:08.000000000 +0200 ++++ fsl/config/linux_32-gcc3.2/systemvars.mk 2012-08-02 14:45:58.063754683 +0200 +@@ -18,8 +18,8 @@ + + # Compiler dependent variables + +-CC = gcc +-CXX = c++ ++CC ?= gcc ++CXX ?= c++ + CSTATICFLAGS = -static + CXXSTATICFLAGS = -static + +diff -ru fsl.orig/config/linux_32-gcc3.3/systemvars.mk fsl/config/linux_32-gcc3.3/systemvars.mk +--- fsl.orig/config/linux_32-gcc3.3/systemvars.mk 2007-07-25 17:21:09.000000000 +0200 ++++ fsl/config/linux_32-gcc3.3/systemvars.mk 2012-08-02 14:45:58.105755298 +0200 +@@ -18,8 +18,8 @@ + + # Compiler dependent variables + +-CC = gcc +-CXX = c++ ++CC ?= gcc ++CXX ?= c++ + CSTATICFLAGS = -static + CXXSTATICFLAGS = -static + +diff -ru fsl.orig/config/linux_32-gcc3.4/systemvars.mk fsl/config/linux_32-gcc3.4/systemvars.mk +--- fsl.orig/config/linux_32-gcc3.4/systemvars.mk 2007-07-25 17:21:10.000000000 +0200 ++++ fsl/config/linux_32-gcc3.4/systemvars.mk 2012-08-02 14:45:58.147755913 +0200 +@@ -18,8 +18,8 @@ + + # Compiler dependent variables + +-CC = gcc +-CXX = c++ ++CC ?= gcc ++CXX ?= c++ + CSTATICFLAGS = -static + CXXSTATICFLAGS = -static + +diff -ru fsl.orig/config/linux_32-gcc4.0/systemvars.mk fsl/config/linux_32-gcc4.0/systemvars.mk +--- fsl.orig/config/linux_32-gcc4.0/systemvars.mk 2007-07-25 17:21:11.000000000 +0200 ++++ fsl/config/linux_32-gcc4.0/systemvars.mk 2012-08-02 14:45:58.231757140 +0200 +@@ -18,8 +18,8 @@ + + # Compiler dependent variables + +-CC = gcc +-CXX = c++ ++CC ?= gcc ++CXX ?= c++ + CSTATICFLAGS = -static + CXXSTATICFLAGS = -static + +diff -ru fsl.orig/config/linux_32-gcc4.1/systemvars.mk fsl/config/linux_32-gcc4.1/systemvars.mk +--- fsl.orig/config/linux_32-gcc4.1/systemvars.mk 2007-07-13 13:00:21.000000000 +0200 ++++ fsl/config/linux_32-gcc4.1/systemvars.mk 2012-08-02 14:45:58.265757638 +0200 +@@ -18,8 +18,8 @@ + + # Compiler dependent variables + +-CC = gcc +-CXX = c++ ++CC ?= gcc ++CXX ?= c++ + CSTATICFLAGS = -static + CXXSTATICFLAGS = -static + +diff -ru fsl.orig/config/linux_64-gcc3.4/systemvars.mk fsl/config/linux_64-gcc3.4/systemvars.mk +--- fsl.orig/config/linux_64-gcc3.4/systemvars.mk 2007-07-25 17:21:12.000000000 +0200 ++++ fsl/config/linux_64-gcc3.4/systemvars.mk 2012-08-02 14:45:58.299758136 +0200 +@@ -18,8 +18,8 @@ + + # Compiler dependent variables + +-CC = gcc +-CXX = c++ ++CC ?= gcc ++CXX ?= c++ + CSTATICFLAGS = -static + CXXSTATICFLAGS = -static + +diff -ru fsl.orig/config/linux_64-gcc4.0/systemvars.mk fsl/config/linux_64-gcc4.0/systemvars.mk +--- fsl.orig/config/linux_64-gcc4.0/systemvars.mk 2007-07-25 17:21:13.000000000 +0200 ++++ fsl/config/linux_64-gcc4.0/systemvars.mk 2012-08-02 14:45:58.341758749 +0200 +@@ -18,8 +18,8 @@ + + # Compiler dependent variables + +-CC = gcc +-CXX = c++ ++CC ?= gcc ++CXX ?= c++ + CSTATICFLAGS = -static + CXXSTATICFLAGS = -static + +diff -ru fsl.orig/config/linux_64-gcc4.1/systemvars.mk fsl/config/linux_64-gcc4.1/systemvars.mk +--- fsl.orig/config/linux_64-gcc4.1/systemvars.mk 2007-07-25 11:19:45.000000000 +0200 ++++ fsl/config/linux_64-gcc4.1/systemvars.mk 2012-08-02 14:45:58.375759246 +0200 +@@ -18,8 +18,8 @@ + + # Compiler dependent variables + +-CC = gcc +-CXX = c++ ++CC ?= gcc ++CXX ?= c++ + CSTATICFLAGS = -static + CXXSTATICFLAGS = -static + +diff -ru fsl.orig/config/linux_64-gcc4.2/systemvars.mk fsl/config/linux_64-gcc4.2/systemvars.mk +--- fsl.orig/config/linux_64-gcc4.2/systemvars.mk 2008-06-26 15:25:42.000000000 +0200 ++++ fsl/config/linux_64-gcc4.2/systemvars.mk 2012-08-02 14:45:58.410759759 +0200 +@@ -18,8 +18,8 @@ + + # Compiler dependent variables + +-CC = gcc +-CXX = c++ ++CC ?= gcc ++CXX ?= c++ + CSTATICFLAGS = -static + CXXSTATICFLAGS = -static + +diff -ru fsl.orig/config/sparc-solaris2.8-gcc2.95/systemvars.mk fsl/config/sparc-solaris2.8-gcc2.95/systemvars.mk +--- fsl.orig/config/sparc-solaris2.8-gcc2.95/systemvars.mk 2007-07-13 13:00:21.000000000 +0200 ++++ fsl/config/sparc-solaris2.8-gcc2.95/systemvars.mk 2012-08-02 14:45:58.443760241 +0200 +@@ -5,8 +5,8 @@ + + # Compiler dependent variables + +-CC = gcc +-CXX = c++ ++CC ?= gcc ++CXX ?= c++ + + ARCHFLAGS = -mv8 -ffast-math -fomit-frame-pointer + +diff -ru fsl.orig/config/sparc-solaris2.9-gcc2.95/systemvars.mk fsl/config/sparc-solaris2.9-gcc2.95/systemvars.mk +--- fsl.orig/config/sparc-solaris2.9-gcc2.95/systemvars.mk 2007-07-13 13:00:21.000000000 +0200 ++++ fsl/config/sparc-solaris2.9-gcc2.95/systemvars.mk 2012-08-02 14:45:58.484760840 +0200 +@@ -5,8 +5,8 @@ + + # Compiler dependent variables + +-CC = gcc +-CXX = c++ ++CC ?= gcc ++CXX ?= c++ + + ARCHFLAGS = -mv8 -ffast-math -fomit-frame-pointer + ARCHLDFLAGS = -static From 5903401ebacfef5fd70786b3e04542fd42372293 Mon Sep 17 00:00:00 2001 From: Kenneth Hoste Date: Thu, 2 Aug 2012 15:20:34 +0200 Subject: [PATCH 264/798] add patch file for NaNs and Inf corrections required for building with Intel compilers --- .../f/FSL/FSL_icc_nan-inf_fix.patch | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) create mode 100644 easybuild/easyconfigs/f/FSL/FSL_icc_nan-inf_fix.patch diff --git a/easybuild/easyconfigs/f/FSL/FSL_icc_nan-inf_fix.patch b/easybuild/easyconfigs/f/FSL/FSL_icc_nan-inf_fix.patch new file mode 100644 index 0000000000..84fa1bbcfd --- /dev/null +++ b/easybuild/easyconfigs/f/FSL/FSL_icc_nan-inf_fix.patch @@ -0,0 +1,18 @@ +diff -ru fsl.orig/src/fslview/fsl/cprob/const.c fsl/src/fslview/fsl/cprob/const.c +--- fsl.orig/src/fslview/fsl/cprob/const.c 2006-08-21 18:47:10.000000000 +0200 ++++ fsl/src/fslview/fsl/cprob/const.c 2012-08-02 15:18:48.404398489 +0200 +@@ -89,12 +89,12 @@ + double THPIO4 = 2.35619449019234492885; /* 3*pi/4 */ + double TWOOPI = 6.36619772367581343075535E-1; /* 2/pi */ + #ifdef INFINITIES +-double INFINITY = 1.0/0.0; /* 99e999; */ ++double INFINITY = __builtin_inff(); + #else + double INFINITY = 1.79769313486231570815E308; /* 2**1024*(1-MACHEP) */ + #endif + #ifdef NANS +-double NAN = 1.0/0.0 - 1.0/0.0; ++double NAN = __builtin_nanf(""); + #else + double NAN = 0.0; + #endif From 57f8deb313fa4ddbe07924cc842fe3a4956e8a9d Mon Sep 17 00:00:00 2001 From: Kenneth Hoste Date: Thu, 2 Aug 2012 15:45:38 +0200 Subject: [PATCH 265/798] replace global log variable with self.log, which is consistent with e.g. Application (refs #7) --- easybuild/easyblocks/f/fsl.py | 5 ++- easybuild/tools/toolkit.py | 72 ++++++++++++++++++----------------- 2 files changed, 41 insertions(+), 36 deletions(-) diff --git a/easybuild/easyblocks/f/fsl.py b/easybuild/easyblocks/f/fsl.py index ab32c3cf97..a0edda78ab 100644 --- a/easybuild/easyblocks/f/fsl.py +++ b/easybuild/easyblocks/f/fsl.py @@ -22,6 +22,7 @@ import os import re import shutil + import easybuild.tools.environment as env from easybuild.framework.application import Application from easybuild.tools.filetools import run_cmd @@ -30,7 +31,9 @@ class FSL(Application): """Support for building and installing FSL.""" def __init__(self,*args,**kwargs): - Application.__init__(self, args,kwargs) + """Specify building in install dir, initialize custom variables.""" + + Application.__init__(self, *args, **kwargs) self.build_in_installdir = True diff --git a/easybuild/tools/toolkit.py b/easybuild/tools/toolkit.py index c5969a8ce9..1f6ee0b065 100644 --- a/easybuild/tools/toolkit.py +++ b/easybuild/tools/toolkit.py @@ -28,8 +28,6 @@ import easybuild.tools.environment as env -log = getLog('Toolkit') - # constant used for recognizing compilers, MPI libraries, ... GCC = "GCC" INTEL = "Intel" @@ -42,14 +40,18 @@ class Toolkit: """ def __init__(self, name, version): - """ Initialise toolkit name version """ + """ Initialise toolkit variables.""" + self.dependencies = [] self.vars = {} self.arch = None self.toolkit_deps = [] self.m32flag = '' - ## Option flags + # logger + self.log = getLog('Toolkit') + + # option flags self.opts = { 'usempi': False, 'cciscxx': False, 'pic': False, 'opt': False, 'noopt': False, 'lowopt': False, 'debug': False, 'optarch':True, @@ -88,7 +90,7 @@ def setOptions(self, options): if opt in self.opts: self.opts[opt] = options[opt] else: - log.warning("Undefined toolkit option %s specified." % opt) + self.log.warning("Undefined toolkit option %s specified." % opt) def getDependencyVersion(self, dependency): """ Generate a version string for a dependency on a module using this toolkit """ @@ -113,22 +115,22 @@ def getDependencyVersion(self, dependency): if len(matches) > 0: return matches[-1] else: - log.error('No toolkit version for dependency name %s (suffix %s) found' + self.log.error('No toolkit version for dependency name %s (suffix %s) found' % (dependency['name'], "%s%s" % (toolkit, suffix))) def addDependencies(self, dependencies): """ Verify if the given dependencies exist and add them """ mod = Modules() - log.debug("Adding toolkit dependencies") + self.log.debug("Adding toolkit dependencies") for dep in dependencies: if not 'tk' in dep: dep['tk'] = self.getDependencyVersion(dep) if not mod.exists(dep['name'], dep['tk']): - log.error('No module found for dependency %s/%s' % (dep['name'], dep['tk'])) + self.log.error('No module found for dependency %s/%s' % (dep['name'], dep['tk'])) else: self.dependencies.append(dep) - log.debug('Added toolkit dependency %s' % dep) + self.log.debug('Added toolkit dependency %s' % dep) def prepare(self, onlymod=None): """ @@ -141,13 +143,13 @@ def prepare(self, onlymod=None): (If string: comma separated list of variables that will be ignored). """ if not self._toolkitExists(): - log.error("No module found for toolkit name '%s' (%s)" % (self.name, self.version)) + self.log.error("No module found for toolkit name '%s' (%s)" % (self.name, self.version)) if self.name == 'dummy': if self.version == 'dummy': - log.info('Toolkit: dummy mode') + self.log.info('Toolkit: dummy mode') else: - log.info('Toolkit: dummy mode, but loading dependencies') + self.log.info('Toolkit: dummy mode, but loading dependencies') modules = Modules() modules.addModule(self.dependencies) modules.load() @@ -161,20 +163,20 @@ def prepare(self, onlymod=None): ## Determine direct toolkit dependencies, so we can prepare for them self.toolkit_deps = modules.dependencies_for(self.name, self.version, depth=1) - log.debug('List of direct toolkit dependencies: %s' % self.toolkit_deps) + self.log.debug('List of direct toolkit dependencies: %s' % self.toolkit_deps) ## Generate the variables to be set self._generate_variables() ## set the variables if not (onlymod == True): - log.debug("Variables being set: onlymod=%s" % onlymod) + self.log.debug("Variables being set: onlymod=%s" % onlymod) ## add LDFLAGS and CPPFLAGS from dependencies to self.vars self._addDependencyVariables() self._setVariables(onlymod) else: - log.debug("No variables set: onlymod=%s" % onlymod) + self.log.debug("No variables set: onlymod=%s" % onlymod) def _addDependencyVariables(self, names=None): """ Add LDFLAGS and CPPFLAGS to the self.vars based on the dependencies @@ -190,14 +192,14 @@ def _addDependencyVariables(self, names=None): for dep in deps: softwareRoot = get_software_root(dep['name']) if not softwareRoot: - log.error("%s was not found in environment (dep: %s)" % (dep['name'], dep)) + self.log.error("%s was not found in environment (dep: %s)" % (dep['name'], dep)) self._flagsForSubdirs(softwareRoot, cpp_paths, flag="-I%s", varskey="CPPFLAGS") self._flagsForSubdirs(softwareRoot, ld_paths, flag="-L%s", varskey="LDFLAGS") def _setVariables(self, dontset=None): """ Sets the environment variables """ - log.debug("Setting variables: dontset=%s" % dontset) + self.log.debug("Setting variables: dontset=%s" % dontset) dontsetlist = [] if type(dontset) == str: @@ -207,10 +209,10 @@ def _setVariables(self, dontset=None): for key, val in self.vars.items(): if key in dontsetlist: - log.debug("Not setting environment variable %s (value: %s)." % (key, val)) + self.log.debug("Not setting environment variable %s (value: %s)." % (key, val)) continue - log.debug("Setting environment variable %s to %s" % (key, val)) + self.log.debug("Setting environment variable %s to %s" % (key, val)) env.set(key, val) # also set unique named variables that can be used in Makefiles @@ -227,10 +229,10 @@ def _getOptimalArchitecture(self): self.arch = systemtools.get_cpu_vendor() if self.arch in optarchs: optarch = optarchs[self.arch] - log.info("Using %s as optarch for %s." % (optarch, self.arch)) + self.log.info("Using %s as optarch for %s." % (optarch, self.arch)) return optarch else: - log.error("Don't know how to set optarch for %s." % self.arch) + self.log.error("Don't know how to set optarch for %s." % self.arch) def _generate_variables(self): @@ -274,9 +276,9 @@ def _generate_variables(self): for meth_key in meth_keys: if meth_key.endswith("_%s" % self.name): depnames.append(self.name) - log.debug("Going to add preparation function for toolkit %s itself also" % self.name) + self.log.debug("Going to add preparation function for toolkit %s itself also" % self.name) break - log.debug("depnames: %s" % depnames) + self.log.debug("depnames: %s" % depnames) # figure out which preparation functions we need to run based on toolkit dependencies preparation_functions = {} @@ -293,9 +295,9 @@ def _generate_variables(self): for depname in copy.copy(depnames): if depname in found_meths: depnames.remove(depname) - log.error("Unable to find preparation functions for these toolkit dependencies: %s" % depnames) + self.log.error("Unable to find preparation functions for these toolkit dependencies: %s" % depnames) - log.debug("List of preparation functions: %s" % preparation_functions) + self.log.debug("List of preparation functions: %s" % preparation_functions) self.vars["LDFLAGS"] = '' self.vars["CPPFLAGS"] = '' @@ -311,7 +313,7 @@ def prepareACML(self): """ if self.opts['32bit']: - log.error("ERROR: 32-bit not supported (yet) for ACML.") + self.log.error("ERROR: 32-bit not supported (yet) for ACML.") self._addDependencyVariables(['ACML']) @@ -320,7 +322,7 @@ def prepareACML(self): elif self.toolkit_comp_family() == INTEL: compiler = 'ifort' else: - log.error("Don't know which compiler-specific subdir for ACML to use.") + self.log.error("Don't know which compiler-specific subdir for ACML to use.") self.vars['LDFLAGS'] += " -L%(acml)s/%(comp)s64/lib/ " % { # "%(acml)s/%(comp)s64/lib/libacml.a -lpthread" % { 'comp':compiler, @@ -383,7 +385,7 @@ def prepareGCC(self, withMPI=True): """ if self.opts['32bit']: - log.error("ERROR: 32-bit not supported yet for GCC based toolkits.") + self.log.error("ERROR: 32-bit not supported yet for GCC based toolkits.") # set basic GCC options self.vars['CC'] = 'gcc %s' % self.m32flag @@ -514,7 +516,7 @@ def prepareIMKL(self): mklRoot = os.getenv('MKLROOT') if not mklRoot: - log.error("MKLROOT not found in environment") + self.log.error("MKLROOT not found in environment") # For more inspiration: see http://software.intel.com/en-us/articles/intel-mkl-link-line-advisor/ @@ -569,7 +571,7 @@ def prepareIMKL(self): mklcpp = ['include', 'include/fftw'] else: if self.opts['32bit']: - log.error("32-bit libraries not supported yet for IMKL v%s (> v10.3)" % os.environ("SOFTROOTIMKL")) + self.log.error("32-bit libraries not supported yet for IMKL v%s (> v10.3)" % os.environ("SOFTROOTIMKL")) mklld = ['lib/intel64', 'mkl/lib/intel64'] mklcpp = ['mkl/include', 'mkl/include/fftw'] @@ -659,7 +661,7 @@ def prepareMPICH2(self): for i in ['CC', 'CXX', 'F77', 'F90']: self.vars[i] = self.vars["MPI%s" % i] else: - log.error("Don't know how to prepare for a non-ScaleMP MPICH2 library.") + self.log.error("Don't know how to prepare for a non-ScaleMP MPICH2 library.") def prepareSimpleMPI(self): """ @@ -744,7 +746,7 @@ def _flagsForSubdirs(self, base, subdirs, flag="-L%s", varskey=None): if os.path.isdir(directory): flags.append(flag % directory) else: - log.warning("Directory %s was not found" % directory) + self.log.warning("Directory %s was not found" % directory) if not varskey in self.vars: self.vars[varskey] = '' @@ -763,7 +765,7 @@ def det_toolkit_type(self, name, type_map): if match: return tk_type - log.error("Failed to determine %s based on toolkit dependencies." % name) + self.log.error("Failed to determine %s based on toolkit dependencies." % name) def toolkit_comp_family(self): """Determine compiler family based on toolkit dependencies.""" @@ -783,7 +785,7 @@ def get_openmp_flag(self): elif self.toolkit_comp_family() == GCC: return "-fopenmp" else: - log.error("Can't determine compiler flag for OpenMP.") + self.log.error("Can't determine compiler flag for OpenMP.") def toolkit_mpi_type(self): """Determine type of MPI library based on toolkit dependencies.""" @@ -848,4 +850,4 @@ def mpi_cmd_for(self, cmd, nr_ranks): if mpi_type in mpi_cmds.keys(): return mpi_cmds[mpi_type] % params else: - log.error("Don't know how to create an MPI command for MPI library of type '%s'." % mpi_type) + self.log.error("Don't know how to create an MPI command for MPI library of type '%s'." % mpi_type) From 8c2b3114901d26db4856d5c5082fd322153bdde7 Mon Sep 17 00:00:00 2001 From: Kenneth Hoste Date: Thu, 2 Aug 2012 15:47:00 +0200 Subject: [PATCH 266/798] processed AGs and TWs remarks in pull request --- .../f/FSL/FSL-4.1.9-goalf-1.1.0-no-OFED.eb | 16 ++--- .../g/goalf/goalf-1.1.0-no-OFED.eb | 63 ++++++++++--------- 2 files changed, 40 insertions(+), 39 deletions(-) diff --git a/easybuild/easyconfigs/f/FSL/FSL-4.1.9-goalf-1.1.0-no-OFED.eb b/easybuild/easyconfigs/f/FSL/FSL-4.1.9-goalf-1.1.0-no-OFED.eb index e989116d1b..65f7891e1f 100644 --- a/easybuild/easyconfigs/f/FSL/FSL-4.1.9-goalf-1.1.0-no-OFED.eb +++ b/easybuild/easyconfigs/f/FSL/FSL-4.1.9-goalf-1.1.0-no-OFED.eb @@ -1,15 +1,15 @@ -name='FSL' -version='4.1.9' +name = 'FSL' +version = '4.1.9' -homepage='http://www.fmrib.ox.ac.uk/fsl/' -description="""FSL is a comprehensive library of analysis tools for FMRI, MRI and DTI brain imaging data.""" +homepage = 'http://www.fmrib.ox.ac.uk/fsl/' +description = """FSL is a comprehensive library of analysis tools for FMRI, MRI and DTI brain imaging data.""" -toolkit={'name':'goalf','version':'1.1.0-no-OFED'} +toolkit = {'name':'goalf', 'version':'1.1.0-no-OFED'} -sourceURLs=["http://www.fmrib.ox.ac.uk/fsldownloads/"] -sources=['%s-%s-sources.tar.gz' % (name.lower(), version)] +sourceURLs = ["http://www.fmrib.ox.ac.uk/fsldownloads/"] +sources = ['%s-%s-sources.tar.gz' % (name.lower(), version)] -patches=['FSL_makefile_fixes.patch'] +patches = ['FSL_makefile_fixes.patch'] # libX11-devel is required for X11/Xlib.h, required by tk build osdependencies=['libX11-devel'] diff --git a/easybuild/easyconfigs/g/goalf/goalf-1.1.0-no-OFED.eb b/easybuild/easyconfigs/g/goalf/goalf-1.1.0-no-OFED.eb index e08a7f0c21..b67541e2ec 100644 --- a/easybuild/easyconfigs/g/goalf/goalf-1.1.0-no-OFED.eb +++ b/easybuild/easyconfigs/g/goalf/goalf-1.1.0-no-OFED.eb @@ -1,41 +1,42 @@ -easyblock="Toolkit" +easyblock = "Toolkit" -name='goalf' -version='1.1.0' -versionsuffix='-no-OFED' +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.""" +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'} +toolkit = {'name':'dummy', 'version':'dummy'} -compname='GCC' -compver='4.6.3' -comp='%s-%s' % (compname, compver) +compname = 'GCC' +compver = '4.6.3' +comp = '%s-%s' % (compname, compver) -mpilib='OpenMPI' -mpiver='1.4.5' -mpisuff='-no-OFED' -mpi='%s-%s%s' % (mpilib, mpiver, mpisuff) +mpilib = 'OpenMPI' +mpiver = '1.4.5' +mpisuff = '-no-OFED' +mpi = '%s-%s%s' % (mpilib, mpiver, mpisuff) -blaslib='ATLAS' -blasver='3.8.4' -blas='%s-%s'%(blaslib, blasver) +blaslib = 'ATLAS' +blasver = '3.8.4' +blas = '%s-%s'%(blaslib, blasver) -lapacklib='LAPACK' -lapackver='3.4.0' -lapack='%s-%s'%(lapacklib, lapackver) +lapacklib = 'LAPACK' +lapackver = '3.4.0' +lapack = '%s-%s' % (lapacklib, lapackver) -blacsver='1.1' +blacsver = '1.1' ## compiler toolkit depencies -dependencies=[(compname, compver), - (mpilib, mpiver, '-%s%s'%(comp,mpisuff)), - (blaslib, blasver, '-%s-%s'%(comp,lapack)), - (lapacklib, lapackver, '-%s'%comp), - ('FFTW', '3.3.1', '-%s-%s'%(comp,mpi)), - ('BLACS', blacsver, '-%s-%s'%(comp,mpi)), - ('ScaLAPACK','1.8.0', '-%s-%s-%s-%s-BLACS-%s'%(comp,mpi,blas,lapack,blacsver)) - ] - -moduleclass='compiler' +dependencies = [(compname, compver), + (mpilib, mpiver, '-%s%s' % (comp, mpisuff)), + (blaslib, blasver, '-%s-%s' % (comp, lapack)), + (lapacklib, lapackver, '-%s' % comp), + ('FFTW', '3.3.1', '-%s-%s' % (comp, mpi)), + ('BLACS', blacsver, '-%s-%s' % (comp, mpi)), + ('ScaLAPACK','1.8.0', '-%s-%s-%s-%s-BLACS-%s' % (comp, mpi, blas, lapack, blacsver)) + ] + +moduleclass = 'compiler' From f8b5bdd01650827e3b7f39ddf5e9a9c821fde11a Mon Sep 17 00:00:00 2001 From: Kenneth Hoste Date: Thu, 2 Aug 2012 15:54:56 +0200 Subject: [PATCH 267/798] clean up recursively determining dependencies, fix bug when depth was set to 0 (which resulted in infinite recursion) --- easybuild/tools/modules.py | 16 +++++++--------- 1 file changed, 7 insertions(+), 9 deletions(-) diff --git a/easybuild/tools/modules.py b/easybuild/tools/modules.py index 36747509d2..eff185f3ac 100644 --- a/easybuild/tools/modules.py +++ b/easybuild/tools/modules.py @@ -24,6 +24,7 @@ import os import re import subprocess +import sys from easybuild.tools.build_log import getLog, initLogger, EasyBuildError from easybuild.tools.filetools import convertName, run_cmd @@ -233,7 +234,8 @@ def loaded_modules(self): return loaded_modules - def dependencies_for(self, name, version, depth=-1): + # depth=sys.maxint should be equivalent to infinite recursion depth + def dependencies_for(self, name, version, depth=sys.maxint): """ Obtain a list of dependencies for the given module, determined recursively, up to a specified depth (optionally) """ @@ -250,16 +252,12 @@ def dependencies_for(self, name, version, depth=-1): loadregex = re.compile("^\s+module load\s+(.*)$", re.M) mods = [mod.split('/') for mod in loadregex.findall(modtxt)] - depth = depth - 1 if depth > 0: - # recursively determine dependencies for these dependency modules - moddeps = [self.dependencies_for(modname, modversion, depth=depth) for (modname, modversion) in mods] - elif depth==0: - # stop recursion - moddeps = [] + # recursively determine dependencies for these dependency modules, until depth is non-positive + moddeps = [self.dependencies_for(modname, modversion, depth=depth-1) for (modname, modversion) in mods] else: - # recursively determine dependencies for dependency modules until all dependencies are resolved (no or negative depth given) - moddeps = [self.dependencies_for(modname, modversion) for (modname, modversion) in mods] + # ignore any deeper dependencies + moddeps = [] deps = [{'name':modname, 'version':modversion} for (modname, modversion) in mods] From 82a71c9f102dd2bf3df570e7625dbf9acea02d2c Mon Sep 17 00:00:00 2001 From: Kenneth Hoste Date: Thu, 2 Aug 2012 16:02:03 +0200 Subject: [PATCH 268/798] fix patch file for building FSL with icc --- .../f/FSL/FSL_icc_nan-inf_fix.patch | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) diff --git a/easybuild/easyconfigs/f/FSL/FSL_icc_nan-inf_fix.patch b/easybuild/easyconfigs/f/FSL/FSL_icc_nan-inf_fix.patch index 84fa1bbcfd..05dcb9ff27 100644 --- a/easybuild/easyconfigs/f/FSL/FSL_icc_nan-inf_fix.patch +++ b/easybuild/easyconfigs/f/FSL/FSL_icc_nan-inf_fix.patch @@ -1,3 +1,21 @@ +diff -ru fsl.orig/extras/src/cprob/const.c fsl/extras/src/cprob/const.c +--- fsl.orig/extras/src/cprob/const.c 2006-08-21 18:47:10.000000000 +0200 ++++ fsl/extras/src/cprob/const.c 2012-08-02 15:58:31.812167292 +0200 +@@ -89,12 +89,12 @@ + double THPIO4 = 2.35619449019234492885; /* 3*pi/4 */ + double TWOOPI = 6.36619772367581343075535E-1; /* 2/pi */ + #ifdef INFINITIES +-double INFINITY = 1.0/0.0; /* 99e999; */ ++double INFINITY = __builtin_inff(); + #else + double INFINITY = 1.79769313486231570815E308; /* 2**1024*(1-MACHEP) */ + #endif + #ifdef NANS +-double NAN = 1.0/0.0 - 1.0/0.0; ++double NAN = __builtin_nanf(""); + #else + double NAN = 0.0; + #endif diff -ru fsl.orig/src/fslview/fsl/cprob/const.c fsl/src/fslview/fsl/cprob/const.c --- fsl.orig/src/fslview/fsl/cprob/const.c 2006-08-21 18:47:10.000000000 +0200 +++ fsl/src/fslview/fsl/cprob/const.c 2012-08-02 15:18:48.404398489 +0200 From f7fed35f06a8926fe8eedd6ff558bd221e84a537 Mon Sep 17 00:00:00 2001 From: Kenneth Hoste Date: Fri, 3 Aug 2012 06:30:11 +0200 Subject: [PATCH 269/798] build in make, also when we're building in install dir --- easybuild/easyblocks/f/fsl.py | 8 ++++---- easybuild/easyblocks/w/wps.py | 1 + easybuild/easyblocks/w/wrf.py | 3 ++- 3 files changed, 7 insertions(+), 5 deletions(-) diff --git a/easybuild/easyblocks/f/fsl.py b/easybuild/easyblocks/f/fsl.py index a0edda78ab..e6e8efb07f 100644 --- a/easybuild/easyblocks/f/fsl.py +++ b/easybuild/easyblocks/f/fsl.py @@ -69,10 +69,6 @@ def configure(self): self.log.error("Failed to copy closest matching config dir: %s" % err) def make(self): - """Building is performed in make_install.""" - pass - - def make_install(self): """Build FSL using supplied script.""" cmd = ". %s/etc/fslconf/fsl.sh && ./build" % self.fsldir @@ -88,6 +84,10 @@ def make_install(self): if error_regexp.search(txt): self.log.error("Error detected in build log %s." % buildlog) + def make_install(self): + """Building was performed in install dir, no explicit install step required.""" + pass + def make_module_req_guess(self): """Set correct PATH and LD_LIBRARY_PATH variables.""" diff --git a/easybuild/easyblocks/w/wps.py b/easybuild/easyblocks/w/wps.py index 8eba699d34..33bea6d5c4 100644 --- a/easybuild/easyblocks/w/wps.py +++ b/easybuild/easyblocks/w/wps.py @@ -300,6 +300,7 @@ def run_wps_cmd(cmdname): # installing is done in make, so we can run tests def make_install(self): + """Building was done in install dir, so just do some cleanup here.""" # make sure JASPER environment variables are unset env_vars = ['JASPERINC', 'JASPERLIB'] diff --git a/easybuild/easyblocks/w/wrf.py b/easybuild/easyblocks/w/wrf.py index 6eaa5f6da3..1c9178aed6 100644 --- a/easybuild/easyblocks/w/wrf.py +++ b/easybuild/easyblocks/w/wrf.py @@ -309,8 +309,9 @@ def run_test(): except OSError, err: self.log.error("An error occured when running test %s: %s" % (test, err)) - # installing is done in make, so we can run tests + # building/installing is done in make, so we can run tests def make_install(self): + """Building was done in install dir, so nothing to do in make_install.""" pass def sanitycheck(self): From cb6615ba9904cc6852bf292fbb39ec8345e7ca69 Mon Sep 17 00:00:00 2001 From: Kenneth Hoste Date: Fri, 3 Aug 2012 07:52:34 +0200 Subject: [PATCH 270/798] add example easyconfig for FSL with ictce toolkit (tested) --- .../easyconfigs/f/FSL/FSL-4.1.9-ictce-4.0.6.eb | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) create mode 100644 easybuild/easyconfigs/f/FSL/FSL-4.1.9-ictce-4.0.6.eb diff --git a/easybuild/easyconfigs/f/FSL/FSL-4.1.9-ictce-4.0.6.eb b/easybuild/easyconfigs/f/FSL/FSL-4.1.9-ictce-4.0.6.eb new file mode 100644 index 0000000000..fe37371797 --- /dev/null +++ b/easybuild/easyconfigs/f/FSL/FSL-4.1.9-ictce-4.0.6.eb @@ -0,0 +1,16 @@ +name='FSL' +version='4.1.9' + +homepage='http://www.fmrib.ox.ac.uk/fsl/' +description="""FSL is a comprehensive library of analysis tools for FMRI, MRI and DTI brain imaging data.""" + +toolkit={'name':'ictce','version':'4.0.6'} + +sourceURLs=["http://www.fmrib.ox.ac.uk/fsldownloads/"] +sources=['%s-%s-sources.tar.gz' % (name.lower(), version)] + +patches=['FSL_makefile_fixes.patch', + 'FSL_icc_nan-inf_fix.patch'] + +# libX11-devel is required for X11/Xlib.h, required by tk build +osdependencies=['libX11-devel'] From bf8181029bbdfb8b28496519c0eead7bc3d9ef47 Mon Sep 17 00:00:00 2001 From: Kenneth Hoste Date: Fri, 3 Aug 2012 08:56:35 +0200 Subject: [PATCH 271/798] fix module path adjustment for fake module (required for e.g. Python); add support for specifying directory to apply patch in (required for e.g. OpenFOAM) --- easybuild/framework/application.py | 31 +++++++++++++++++------------ easybuild/tools/module_generator.py | 21 ++++++++++--------- 2 files changed, 30 insertions(+), 22 deletions(-) diff --git a/easybuild/framework/application.py b/easybuild/framework/application.py index a5d233b66f..ed497e02d1 100644 --- a/easybuild/framework/application.py +++ b/easybuild/framework/application.py @@ -263,16 +263,20 @@ def addpatch(self, listOfPatches=None): for patchFile in listOfPatches: ## check if the patches can be located + copy = False suff = None level = None - if type(patchFile) == list: + if type(patchFile) in [list, tuple]: if not len(patchFile) == 2: - self.log.error("Unknown patch specification '%s', only two-element lists are supported!" % patchFile) + self.log.error("Unknown patch specification '%s', only two-element lists/tuples are supported!" % patchFile) pf = patchFile[0] if type(patchFile[1]) == int: level = patchFile[1] elif type(patchFile[1]) == str: + # non-patch files are assumed to be files to copy + if not patchFile[0].endswith('.patch'): + copy = True suff = patchFile[1] else: self.log.error("Wrong patch specification '%s', only int and string are supported as second element!" % patchFile) @@ -283,8 +287,10 @@ def addpatch(self, listOfPatches=None): if path: self.log.debug('File %s found for patch %s' % (path, patchFile)) tmppatch = {'name':pf, 'path':path} - if suff: + if suff and copy: tmppatch['copy'] = suff + elif suff: + tmppatch['sourcepath'] = suff if level: tmppatch['level'] = level self.patches.append(tmppatch) @@ -907,6 +913,7 @@ def runstep(self, step, methods, skippable=False): if skippable and self.skip: self.log.info("Skipping %s" % step) else: + self.log.info("Starting %s" % step) for m in methods: self.print_environ() m() @@ -1047,10 +1054,9 @@ def sanitycheck(self): self.log.debug("Sanity check: found non-empty directory %s in %s" % (d, self.installdir)) # make fake module - self.make_module(True) + mod_path = [self.make_module(True)] # load the module - mod_path = [self.moduleGenerator.module_path] mod_path.extend(Modules().modulePath) m = Modules(mod_path) self.log.debug("created module instance") @@ -1061,9 +1067,6 @@ def sanitycheck(self): self.log.debug("Loading module failed: %s" % err) self.sanityCheckOK = False - # clean up path for fake module - self.moduleGenerator.cleanup() - # chdir to installdir (beter environment for running tests) os.chdir(self.installdir) @@ -1288,7 +1291,7 @@ def make_module(self, fake=False): Generate a module file. """ self.moduleGenerator = ModuleGenerator(self, fake) - self.moduleGenerator.createFiles() + modpath = self.moduleGenerator.createFiles() txt = '' txt += self.make_module_description() @@ -1308,6 +1311,8 @@ def make_module(self, fake=False): self.log.info("Added modulefile: %s" % (self.moduleGenerator.filename)) + return modpath + def make_module_description(self): """ Create the module description. @@ -1404,14 +1409,14 @@ def packages(self): return if not self.skip: - self.make_module(fake=True) - # set MODULEPATH to self.builddir/all and load module + modpath = self.make_module(fake=True) + # adjust MODULEPATH tand load module if self.getcfg('pkgloadmodule'): - self.log.debug(' '.join(["self.builddir/all: ", os.path.join(self.builddir, 'all')])) + self.log.debug("Adding %s to MODULEPATH" % modpath) if self.skip: m = Modules() else: - m = Modules([os.path.join(self.builddir, 'all')] + os.environ['MODULEPATH'].split(':')) + m = Modules([modpath] + os.environ['MODULEPATH'].split(':')) if m.exists(self.name(), self.installversion): m.addModule([[self.name(), self.installversion]]) diff --git a/easybuild/tools/module_generator.py b/easybuild/tools/module_generator.py index 8c6ccfa343..f735474236 100644 --- a/easybuild/tools/module_generator.py +++ b/easybuild/tools/module_generator.py @@ -38,27 +38,28 @@ def __init__(self, application, fake=False): self.app = application self.fake = fake self.filename = None - self.module_path = None self.tmpdir = None def createFiles(self): """ Creates the absolute filename for the module. """ - base = installPath('mod') + module_path = installPath('mod') + + # general module class + general_class = 'all' # Fake mode: set installpath to temporary dir if self.fake: self.tmpdir = tempfile.mkdtemp() - log.debug("Fake mode: using %s (instead of %s)" % (self.tmpdir, base)) - base = self.tmpdir + log.debug("Fake mode: using %s (instead of %s)" % (self.tmpdir, module_path)) + module_path = self.tmpdir # Real file goes in 'all' category - self.module_path = os.path.join(base, 'all') - self.filename = os.path.join(self.module_path, self.app.name(), self.app.installversion) + self.filename = os.path.join(module_path, general_class, self.app.name(), self.app.installversion) # Make symlink in moduleclass category - classPath = os.path.join(base, self.app.getcfg('moduleclass'), self.app.name()) + classPath = os.path.join(module_path, self.app.getcfg('moduleclass'), self.app.name()) classPathFile = os.path.join(classPath, self.app.installversion) # Create directories and links @@ -81,6 +82,8 @@ def createFiles(self): except OSError, err: log.exception("Failed to create symlink from %s to %s: %s" % (classPathFile, self.filename, err)) + return os.path.join(module_path, general_class) + def getDescription(self, conflict=True): """ Generate a description. @@ -153,9 +156,9 @@ def setEnvironment(self, key, value): """ return "setenv\t%s\t\t%s\n" % (key, value) - def cleanup(self): + def __del__(self): """ - Clean up temporary directory used for fake modules, if any. + Desconstructor: clean up temporary directory used for fake modules, if any. """ if self.fake: log.info("Cleaning up fake modules dir %s" % self.tmpdir) From 63b0446e1ef9777df6466038cd0356c34bf98811 Mon Sep 17 00:00:00 2001 From: Kenneth Hoste Date: Fri, 3 Aug 2012 10:02:05 +0200 Subject: [PATCH 272/798] get rid of all commentary started with multiple hashes (#) --- easybuild/easyblocks/c/cp2k.py | 28 ++++++------ easybuild/easyblocks/f/fsl.py | 8 ++-- easybuild/easyblocks/g/gcc.py | 69 ++++++++++++++--------------- easybuild/easyblocks/h/hpl.py | 2 +- easybuild/easyblocks/i/imkl.py | 30 ++++++------- easybuild/easyblocks/i/impi.py | 4 +- easybuild/easyblocks/i/intelbase.py | 14 +++--- easybuild/easyblocks/i/itac.py | 4 +- easybuild/easyblocks/l/lapack.py | 4 +- easybuild/easyblocks/n/ncl.py | 2 +- easybuild/easyblocks/p/python.py | 2 +- easybuild/easyblocks/s/scalapack.py | 2 +- easybuild/easyblocks/w/wps.py | 2 +- easybuild/easyblocks/w/wrf.py | 4 +- 14 files changed, 87 insertions(+), 88 deletions(-) diff --git a/easybuild/easyblocks/c/cp2k.py b/easybuild/easyblocks/c/cp2k.py index c22932ca22..bf11aa33ac 100644 --- a/easybuild/easyblocks/c/cp2k.py +++ b/easybuild/easyblocks/c/cp2k.py @@ -84,8 +84,8 @@ def configure(self): """ # set compilers options according to toolkit config - ## full debug: -g -traceback -check all -fp-stack-check - ## -g links to mpi debug libs + # full debug: -g -traceback -check all -fp-stack-check + # -g links to mpi debug libs if self.tk.opts['debug']: self.debug = '-g' self.log.info("Debug build") @@ -168,7 +168,7 @@ def prepmodinc(self): if softrootimkl: - ## prepare modinc target path + # prepare modinc target path modincpath = os.path.join(self.builddir, 'modinc') self.log.debug("Preparing module files in %s" % modincpath) @@ -177,7 +177,7 @@ def prepmodinc(self): except OSError, err: self.log.error("Failed to create directory for module include files: %s" % err) - ## get list of modinc source files + # get list of modinc source files modincdir = os.path.join(softrootimkl, self.getcfg("modincprefix"), 'include') if type(self.getcfg("modinc")) == list: @@ -195,7 +195,7 @@ def prepmodinc(self): if not f77: self.log.error("F77 environment variable not set, can't continue.") - ## create modinc files + # create modinc files for f in modfiles: if f77.endswith('ifort') : cmd = "%s -module %s -c %s" % (f77, modincpath, f) @@ -214,8 +214,8 @@ def configureCommon(self): """Common configuration for all toolkits""" # openmp introduces 2 major differences - ## -automatic is default: -noautomatic -auto-scalar - ## some mem-bandwidth optimisation + # -automatic is default: -noautomatic -auto-scalar + # some mem-bandwidth optimisation if self.getcfg('type') == 'psmp': self.openmp = self.tk.get_openmp_flag() @@ -280,11 +280,11 @@ def configureCommon(self): # Build libint-wrapper, if required libint_wrapper = '' - ## required for old versions of GCC + # required for old versions of GCC if not self.compilerISO_C_BINDING: options['DFLAGS'] += ' -D__HAS_NO_ISO_C_BINDING' - ## determine path for libint_tools dir + # determine path for libint_tools dir libinttools_paths = ['libint_tools', 'tools/hfx_tools/libint_tools'] libinttools_path = None for path in libinttools_paths: @@ -295,7 +295,7 @@ def configureCommon(self): if not libinttools_path: self.log.error("No libinttools dir found") - ## build libint wrapper + # build libint wrapper cmd = "%s -c libint_cpp_wrapper.cpp -I%s/include" % (libintcompiler, softrootlibint) if not run_cmd(cmd, log_all=True, simple=True): self.log.error("Building the libint wrapper failed") @@ -327,7 +327,7 @@ def configureIntelBased(self): options.update({ - ## -Vaxlib : older options + # -Vaxlib : older options 'FREE': '-fpp -free', #SAFE = -assume protect_parens -fp-model precise -ftz # problems @@ -363,7 +363,7 @@ def configureGCCBased(self): options.update({ - ## need this to prevent "Unterminated character constant beginning" errors + # need this to prevent "Unterminated character constant beginning" errors 'FREE': '-ffree-form -ffree-line-length-none', 'LDFLAGS': '$(FCFLAGS)', @@ -502,7 +502,7 @@ def test(self): self.log.error("Failed to change to %s: %s" % self.builddir) # use regression test reference output if available - ## try and find an unpacked directory that starts with 'LAST-' + # try and find an unpacked directory that starts with 'LAST-' regtest_refdir = None for d in os.listdir(self.builddir): if d.startswith("LAST-"): @@ -609,7 +609,7 @@ def test_report(test_result): self.postmsg += test_report("WRONG") # number of new tests, will be high if a non-suitable regtest reference was used - ## will report error if count is positive (is that what we want?) + # will report error if count is positive (is that what we want?) self.postmsg += test_report("NEW") # number of correct tests: just report diff --git a/easybuild/easyblocks/f/fsl.py b/easybuild/easyblocks/f/fsl.py index e6e8efb07f..770e06b3a2 100644 --- a/easybuild/easyblocks/f/fsl.py +++ b/easybuild/easyblocks/f/fsl.py @@ -52,7 +52,7 @@ def configure(self): self.log.debug("FSL machine type: %s" % fslmachtype) # prepare config - ## either using matching config, or copy closest match + # either using matching config, or copy closest match cfgdir = os.path.join(self.fsldir, "config") try: cfgs = os.listdir(cfgdir) @@ -114,9 +114,9 @@ def sanitycheck(self): if not self.getcfg('sanityCheckPaths'): - self.setcfg('sanityCheckPaths',{'files':[], - 'dirs':["fsl/%s" % x for x in ["bin", "data", "etc", "extras", "include", "lib"]] - }) + self.setcfg('sanityCheckPaths', {'files':[], + 'dirs':["fsl/%s" % x for x in ["bin", "data", "etc", "extras", "include", "lib"]] + }) self.log.info("Customized sanity check paths: %s" % self.getcfg('sanityCheckPaths')) diff --git a/easybuild/easyblocks/g/gcc.py b/easybuild/easyblocks/g/gcc.py index fb73bc6c7f..23161d33e7 100644 --- a/easybuild/easyblocks/g/gcc.py +++ b/easybuild/easyblocks/g/gcc.py @@ -79,24 +79,24 @@ def prep_extra_src_dirs(self, stage, target_prefix=None): else: extra_src_dirs = ["gmp", "mpfr", "mpc"] - ## add optional ones that were selected (e.g. CLooG, PPL, ...) + # add optional ones that were selected (e.g. CLooG, PPL, ...) for x in ["cloog", "ppl"]: if self.getcfg('with%s' % x): extra_src_dirs.append(x) - ## see if modules are loaded - ## if module is available, just use the --with-X GCC configure option + # see if modules are loaded + # if module is available, just use the --with-X GCC configure option for extra in copy(extra_src_dirs): envvar = os.getenv('SOFTROOT%s' % extra.upper()) if envvar: configopts += " --with-%s=%s" % (extra, envvar) extra_src_dirs.remove(extra) elif extra in ["cloog", "ppl"] and stage in ["stage1", "stage3"]: - ## building CLooG or PPL requires a recent compiler - ## our best bet is to do a 3-staged build of GCC, and - ## build CLooG/PPL with the GCC we're building in stage 2 - ## then (bootstrap) build GCC in stage 3 - ## also, no need to stage cloog/ppl in stage3 (may even cause troubles) + # building CLooG or PPL requires a recent compiler + # our best bet is to do a 3-staged build of GCC, and + # build CLooG/PPL with the GCC we're building in stage 2 + # then (bootstrap) build GCC in stage 3 + # also, no need to stage cloog/ppl in stage3 (may even cause troubles) self.stagedbuild = True extra_src_dirs.remove(extra) @@ -185,28 +185,27 @@ def configure(self): # II) update config options - ## enable specified language support + # enable specified language support if self.getcfg('languages'): self.configopts += " --enable-languages=%s" % ','.join(self.getcfg('languages')) - ## enable link-time-optimization (LTO) support, if desired + # enable link-time-optimization (LTO) support, if desired if self.getcfg('withlto'): self.configopts += " --enable-lto" - ## configure for a release build + # configure for a release build self.configopts += " --enable-checking=release " - ## enable C++ support (required for GMP build), disable multilib (???) + # enable C++ support (required for GMP build), disable multilib (???) self.configopts += " --enable-cxx --disable-multilib" - ## build both static and dynamic libraries (???) + # build both static and dynamic libraries (???) self.configopts += " --enable-shared=yes --enable-static=yes " - ## use POSIX threads + # use POSIX threads self.configopts += " --enable-threads=posix " - ## use GOLD as default linker, enable plugin support + # use GOLD as default linker, enable plugin support self.configopts += " --enable-gold=default --enable-plugins " - ## self.configopts += " --enable-ld --with-plugin-ld=ld.gold" - ## enable bootstrap build for self-containment (unless for staged build) + # enable bootstrap build for self-containment (unless for staged build) if not self.stagedbuild: configopts += " --enable-bootstrap" else: @@ -222,7 +221,7 @@ def configure(self): else: # unstaged build, so just run standard configure/make/make install - ## set prefixes + # set prefixes self.log.info("Performing regular GCC build...") configopts += " --prefix=%(p)s --with-local-prefix=%(p)s" % {'p' : self.installdir } @@ -279,15 +278,15 @@ def make(self): # STAGE 2: build GMP/PPL/CLooG for stage 3 # - ## create dir to build GMP/PPL/CLooG in + # create dir to build GMP/PPL/CLooG in stage2dir = "stage2_stuff" stage2prefix = self.create_dir(stage2dir) - ## prepare directories to build GMP/PPL/CLooG + # prepare directories to build GMP/PPL/CLooG stage2_info = self.prep_extra_src_dirs("stage2", target_prefix=stage2prefix) configopts = stage2_info['configopts'] - ## build PPL and CLooG (GMP as dependency) + # build PPL and CLooG (GMP as dependency) for lib in ["gmp", "ppl", "cloog"]: @@ -312,10 +311,10 @@ def make(self): cmd = "./configure --prefix=%s --with-pic -disable-shared " % stage2prefix - ### only enable C/C++ interfaces (Java interface is sometimes troublesome) + # only enable C/C++ interfaces (Java interface is sometimes troublesome) cmd += "--enable-interfaces='c c++' " - ### enable watchdog (or not) + # enable watchdog (or not) if self.pplver <= LooseVersion("0.11"): if self.getcfg('pplwatchdog'): cmd += "--enable-watchdog " @@ -324,7 +323,7 @@ def make(self): elif self.getcfg('pplwatchdog'): self.log.error("Enabling PPL watchdog only supported in PPL <= v0.11 .") - ### make sure GMP we just built is found + # make sure GMP we just built is found cmd += "--with-gmp=%s " % stage2prefix elif lib == "cloog": @@ -335,7 +334,7 @@ def make(self): v0_16 = LooseVersion("0.16") cmd = "./configure --prefix=%s --with-pic --disable-shared " % stage2prefix - ### use isl or PPL + # use isl or PPL if self.getcfg('clooguseisl'): if self.cloogver >= v0_16: cmd += "--with-isl=bundled " @@ -349,7 +348,7 @@ def make(self): errormsg += "\nNeither using PPL or ISL-based ClooG, I'm out of options..." self.log.error(errormsg) - ### make sure GMP is found + # make sure GMP is found if self.cloogver >= v0_15 and self.cloogver < v0_16: cmd += "--with-gmp=%s " % stage2prefix elif self.cloogver >= v0_16: @@ -360,15 +359,15 @@ def make(self): else: self.log.error("Don't know how to configure for %s" % lib) - ### configure + # configure self.run_configure_cmd(cmd) - ### build and 'install' + # build and 'install' cmd = "make %s install" % paracmd run_cmd(cmd, log_all=True, simple=True) if lib == "gmp": - ### make sure correct GMP is found + # make sure correct GMP is found libpath = os.path.join(stage2prefix, 'lib') incpath = os.path.join(stage2prefix, 'include') @@ -379,22 +378,22 @@ def make(self): # STAGE 3: bootstrap build of final GCC (with PPL/CLooG support) # - ## create new obj dir and change into it + # create new obj dir and change into it self.create_dir("stage3_obj") - ## reconfigure for stage 3 build + # reconfigure for stage 3 build self.log.info("Stage 2 of 3-staged build completed, continuing with stage 2 (with CLooG and/or PPL support enabled)...") stage3_info = self.prep_extra_src_dirs("stage3") configopts = stage3_info['configopts'] configopts += " --prefix=%(p)s --with-local-prefix=%(p)s" % {'p' : self.installdir } - ## enable bootstrapping for self-containment + # enable bootstrapping for self-containment configopts += " --enable-bootstrap " - ## PPL config options + # PPL config options if self.getcfg('withppl'): - ### for PPL build and CLooG-PPL linking + # for PPL build and CLooG-PPL linking libstdcxxpath = "%s/lib64/libstdc++.a" % self.stage1installdir configopts += "--with-host-libstdcxx='-static-libgcc %s -lm' " % libstdcxxpath @@ -406,7 +405,7 @@ def make(self): else: configopts += "--disable-watchdog " - ## CLooG config options + # CLooG config options if self.getcfg('withcloog'): configopts += "--with-cloog=%s " % stage2prefix diff --git a/easybuild/easyblocks/h/hpl.py b/easybuild/easyblocks/h/hpl.py index 8b09476cb1..e27ea7060b 100644 --- a/easybuild/easyblocks/h/hpl.py +++ b/easybuild/easyblocks/h/hpl.py @@ -58,7 +58,7 @@ def configure(self, subdir=None): except OSError, err: self.log.exception("Failed to symlink Make.UNKNOWN from %s to %s: %s" % (setupdir, makeincfile, err)) - ## go back + # go back os.chdir(self.getcfg('startfrom')) def make(self): diff --git a/easybuild/easyblocks/i/imkl.py b/easybuild/easyblocks/i/imkl.py index 825881f75f..34e39aadb6 100644 --- a/easybuild/easyblocks/i/imkl.py +++ b/easybuild/easyblocks/i/imkl.py @@ -128,8 +128,8 @@ def postproc(self): except: self.log.exception("Can't write file %s" % (dest)) - #build the mkl interfaces (pic and no-pic) - ## load the dependencies + # build the mkl interfaces (pic and no-pic) + # load the dependencies m = Modules() m.addModule(self.dep) m.load() @@ -137,7 +137,7 @@ def postproc(self): if not self.getcfg('interfaces'): return - #Build the interfaces + # build the interfaces #- blas95 and lapack95 need more work, ignore for now #lis1=['blas95','fftw2xc','fftw2xf','lapack95'] @@ -155,13 +155,13 @@ def postproc(self): for i in lis1 + lis2 + lis3: if i in lis1: - ## Use INSTALL_DIR and CFLAGS and COPTS + # use INSTALL_DIR and CFLAGS and COPTS cmd = "make -f makefile libintel64" if i in lis2: - ## Use install_to and CFLAGS + # use install_to and CFLAGS cmd = "make -f makefile libintel64 install_to=$INSTALL_DIR" if i in lis3: - ## Use INSTALL_DIR and SPEC_OPT + # use INSTALL_DIR and SPEC_OPT extramakeopts = '' if os.getenv('SOFTROOTMPICH2'): extramakeopts = 'mpi=mpich2' @@ -175,7 +175,7 @@ def postproc(self): except: self.log.exception("Creating temporary directory failed") - ## always set INSTALL_DIR, SPEC_OPT, COPTS and CFLAGS + # always set INSTALL_DIR, SPEC_OPT, COPTS and CFLAGS env.set('INSTALL_DIR', tmpbuild) env.set('SPEC_OPT', opt) env.set('COPTS', opt) @@ -193,7 +193,7 @@ def postproc(self): for fil in os.listdir(tmpbuild): if opt == '-fPIC': - ## add _pic to filename + # add _pic to filename ff = fil.split('.') newfil = '.'.join(ff[:-1]) + '_pic.' + ff[-1] else: @@ -253,7 +253,7 @@ def postproc(self): except: self.log.exception("Can't write file %s" % (dest)) - ## load the dependencies + # load the dependencies m = Modules() m.addModule(self.dep) m.load() @@ -261,8 +261,8 @@ def postproc(self): if not self.getcfg('interfaces'): return - #Build the interfaces - #- blas95 and lapack95 need more work, ignore for now + # build the interfaces + # - blas95 and lapack95 need more work, ignore for now #lis1=['blas95','fftw2xc','fftw2x_cdft','fftw2xf','lapack95'] # blas95 and lapack also need include/.mod to be processed lis1 = ['fftw2xc', 'fftw2x_cdft', 'fftw2xf'] @@ -280,10 +280,10 @@ def postproc(self): for i in lis1 + lis2: if i in lis1: - ## Use INSTALL_DIR and SPEC_OPT + # use INSTALL_DIR and SPEC_OPT cmd = "make -f makefile %s" % interfacestarget if i in lis2: - ## Use install_to and CFLAGS + # use install_to and CFLAGS cmd = "make -f makefile %s install_to=$INSTALL_DIR" % interfacestarget @@ -294,7 +294,7 @@ def postproc(self): except: self.log.exception("Creating temporary directory failed") - ## always set INSTALL_DIR, SPEC_OPT and CFLAGS + # always set INSTALL_DIR, SPEC_OPT and CFLAGS env.set('INSTALL_DIR', tmpbuild) env.set('SPEC_OPT', opt) env.set('CFLAGS', opt) @@ -310,7 +310,7 @@ def postproc(self): for fil in os.listdir(tmpbuild): if opt == '-fPIC': - ## add _pic to filename + # add _pic to filename ff = fil.split('.') newfil = '.'.join(ff[:-1]) + '_pic.' + ff[-1] else: diff --git a/easybuild/easyblocks/i/impi.py b/easybuild/easyblocks/i/impi.py index 91c9d9e7f7..e943621f46 100644 --- a/easybuild/easyblocks/i/impi.py +++ b/easybuild/easyblocks/i/impi.py @@ -66,7 +66,7 @@ def make_install(self): """ % {'lic':self.license, 'ins':self.installdir} - ##already in correct directory + # already in correct directory silentcfg = os.path.join(os.getcwd(), "silent.cfg") try: f = open(silentcfg, 'w') @@ -74,7 +74,7 @@ def make_install(self): f.close() except: self.log.exception("Writing silent cfg file %s failed." % silent) - ## tmpdir + tmpdir = os.path.join(os.getcwd(), self.version(), 'mytmpdir') try: os.makedirs(tmpdir) diff --git a/easybuild/easyblocks/i/intelbase.py b/easybuild/easyblocks/i/intelbase.py index 70c03ce5ef..c65337c124 100644 --- a/easybuild/easyblocks/i/intelbase.py +++ b/easybuild/easyblocks/i/intelbase.py @@ -60,18 +60,18 @@ def clean_homedir(self): def configure(self): """Configure: handle license file and clean home dir.""" - ## obtain license path + # obtain license path self.license = self.getcfg('license') if self.license: self.log.info("Using license %s" % self.license) else: self.log.error("No license defined") - ## verify license path + # verify license path if not os.path.exists(self.license): self.log.error("Can't find license at %s" % self.license) - ## set INTEL_LICENSE_FILE + # set INTEL_LICENSE_FILE env.set("INTEL_LICENSE_FILE", self.license) # clean home directory @@ -97,7 +97,7 @@ def make_install(self): CONTINUE_WITH_OPTIONAL_ERROR=yes """ % (self.getcfg('license_activation'), self.license, self.installdir) - ## we should be already in the correct directory + # we should be already in the correct directory silentcfg = os.path.join(os.getcwd(), "silent.cfg") try: f = open(silentcfg, 'w') @@ -106,7 +106,7 @@ def make_install(self): except: self.log.exception("Writing silent cfg % failed" % silent) - ## workaround for mktmp: create tmp dir and use it + # workaround for mktmp: create tmp dir and use it tmpdir = os.path.join(self.getcfg('startfrom'), 'mytmpdir') try: os.makedirs(tmpdir) @@ -117,13 +117,13 @@ def make_install(self): env.set('TMP_PATH', tmpdir) tmppathopt = "-t %s" % tmpdir - ## set some extra env variables + # set some extra env variables env.set('LOCAL_INSTALL_VERBOSE','1') env.set('VERBOSE_MODE', '1') env.set('INSTALL_PATH', self.installdir) - ## perform installation + # perform installation cmd = "./install.sh %s -s %s" % (tmppathopt, silentcfg) return run_cmd(cmd, log_all=True, simple=True) diff --git a/easybuild/easyblocks/i/itac.py b/easybuild/easyblocks/i/itac.py index 5ff79eb461..f116397a33 100644 --- a/easybuild/easyblocks/i/itac.py +++ b/easybuild/easyblocks/i/itac.py @@ -56,12 +56,12 @@ def make_install(self): EULA=accept """ % {'lic':self.license, 'ins':self.installdir, 'mpi':self.getcfg('preferredmpi')} - ## already in correct directory + # already in correct directory silentcfg = os.path.join(os.getcwd(), "silent.cfg") f = open(silentcfg, 'w') f.write(silent) f.close() - ## tmpdir + tmpdir = os.path.join(os.getcwd(), self.version(), 'mytmpdir') try: os.makedirs(tmpdir) diff --git a/easybuild/easyblocks/l/lapack.py b/easybuild/easyblocks/l/lapack.py index b45829b92a..b21d1a88e8 100644 --- a/easybuild/easyblocks/l/lapack.py +++ b/easybuild/easyblocks/l/lapack.py @@ -146,14 +146,14 @@ def make_install(self): try: os.makedirs(destdir) - ## copy all .a files + # copy all .a files os.chdir(srcdir) for lib in glob.glob('*.a'): srcfile = os.path.join(srcdir, lib) self.log.debug("Copying file %s to dir %s" % (srcfile, destdir)) shutil.copy2(srcfile, destdir) - ## symlink libraries to sensible names, if they aren't renamed already + # symlink libraries to sensible names, if they aren't renamed already for (fromfile, tofile) in [('liblapack_LINUX.a', 'liblapack.a'), ('tmglib_LINUX.a', 'libtmglib.a')]: frompath = os.path.join(destdir, fromfile) diff --git a/easybuild/easyblocks/n/ncl.py b/easybuild/easyblocks/n/ncl.py index 153d418d58..5a16d9ff26 100644 --- a/easybuild/easyblocks/n/ncl.py +++ b/easybuild/easyblocks/n/ncl.py @@ -107,7 +107,7 @@ def configure(self): # let's just generate the config/Site.local file ourselves... # order of deps is important - ## HDF needs to go after netCDF, because both have a netcdf.h include file + # HDF needs to go after netCDF, because both have a netcdf.h include file deps = ["HDF5", "JasPer", "netCDF", "HDF", "g2lib", "g2clib", "Szip"] libs = '' diff --git a/easybuild/easyblocks/p/python.py b/easybuild/easyblocks/p/python.py index 9eda703000..2dd6eae2fe 100644 --- a/easybuild/easyblocks/p/python.py +++ b/easybuild/easyblocks/p/python.py @@ -201,7 +201,7 @@ def make(self): if ldflags: # LDFLAGS should not be set when building numpy/scipy, because it overwrites whatever numpy/scipy sets # see http://projects.scipy.org/numpy/ticket/182 - ## don't unset it with os.environ.pop('LDFLAGS'), doesn't work in Python 2.4 (see http://bugs.python.org/issue1287) + # don't unset it with os.environ.pop('LDFLAGS'), doesn't work in Python 2.4 (see http://bugs.python.org/issue1287) cmdprefix = "unset LDFLAGS && " self.log.debug("LDFLAGS was %s, will be cleared before numpy build with '%s'" % (ldflags, cmdprefix)) diff --git a/easybuild/easyblocks/s/scalapack.py b/easybuild/easyblocks/s/scalapack.py index 248db50eba..cc58d47b95 100644 --- a/easybuild/easyblocks/s/scalapack.py +++ b/easybuild/easyblocks/s/scalapack.py @@ -49,7 +49,7 @@ def configure(self): # make sure required dependencies are available deps = ["LAPACK"] - ## BLACS is only a dependency for ScaLAPACK versions prior to v2.0.0 + # BLACS is only a dependency for ScaLAPACK versions prior to v2.0.0 if self.loosever < LooseVersion("2.0.0"): deps.append("BLACS") for dep in deps: diff --git a/easybuild/easyblocks/w/wps.py b/easybuild/easyblocks/w/wps.py index 33bea6d5c4..2b95801209 100644 --- a/easybuild/easyblocks/w/wps.py +++ b/easybuild/easyblocks/w/wps.py @@ -245,7 +245,7 @@ def run_wps_cmd(cmdname): line = re.sub(r"^(\s*geog_data_path\s*=\s*).*$", r"\1 '%s'" % tmpdir, line) sys.stdout.write(line) - ## GEOGRID.TBL + # GEOGRID.TBL geogrid_dir = os.path.join(tmpdir, "geogrid") os.mkdir(geogrid_dir) os.symlink(os.path.join(wpsdir, "geogrid", "GEOGRID.TBL.ARW"), diff --git a/easybuild/easyblocks/w/wrf.py b/easybuild/easyblocks/w/wrf.py index 1c9178aed6..8a0380aa8d 100644 --- a/easybuild/easyblocks/w/wrf.py +++ b/easybuild/easyblocks/w/wrf.py @@ -151,7 +151,7 @@ def configure(self): # rewrite optimization options if desired if self.getcfg('rewriteopts'): - ## replace default -O3 option in configure.wrf with CFLAGS/FFLAGS from environment + # replace default -O3 option in configure.wrf with CFLAGS/FFLAGS from environment self.log.info("Rewriting optimization options in %s" % cfgfile) @@ -227,7 +227,7 @@ def test(self): # prepare run command - ## stack limit needs to be set to unlimited for WRF to work well + # stack limit needs to be set to unlimited for WRF to work well if self.getcfg('buildtype') in self.parallel_build_types: test_cmd = "ulimit -s unlimited && %s && %s" % (self.tk.mpi_cmd_for("./ideal.exe", 1), self.tk.mpi_cmd_for("./wrf.exe", n)) From 2f155b3c1091cf0b1048ed134faff8126d29a951 Mon Sep 17 00:00:00 2001 From: Kenneth Hoste Date: Fri, 3 Aug 2012 10:02:35 +0200 Subject: [PATCH 273/798] processed code style remark --- easybuild/framework/application.py | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/easybuild/framework/application.py b/easybuild/framework/application.py index ed497e02d1..8c31a92a15 100644 --- a/easybuild/framework/application.py +++ b/easybuild/framework/application.py @@ -287,10 +287,11 @@ def addpatch(self, listOfPatches=None): if path: self.log.debug('File %s found for patch %s' % (path, patchFile)) tmppatch = {'name':pf, 'path':path} - if suff and copy: - tmppatch['copy'] = suff - elif suff: - tmppatch['sourcepath'] = suff + if suff: + if copy: + tmppatch['copy'] = suff + else: + tmppatch['sourcepath'] = suff if level: tmppatch['level'] = level self.patches.append(tmppatch) From 93fff2c08881fa0c6d90d38216e46e1d97eee71f Mon Sep 17 00:00:00 2001 From: Jens Timmerman Date: Tue, 24 Jul 2012 16:12:15 +0200 Subject: [PATCH 274/798] added initial pasha support (for intel, with intel tbb) --- easybuild/easyblocks/p/pasha.py | 39 +++++++++++++++++++ .../PASHA/Pasha-1.0.3-goalf-1.1.0-no-OFED.eb | 18 +++++++++ .../p/PASHA/Pasha-1.0.3-ictce-4.0.6.eb | 17 ++++++++ 3 files changed, 74 insertions(+) create mode 100644 easybuild/easyblocks/p/pasha.py create mode 100644 easybuild/easyconfigs/p/PASHA/Pasha-1.0.3-goalf-1.1.0-no-OFED.eb create mode 100644 easybuild/easyconfigs/p/PASHA/Pasha-1.0.3-ictce-4.0.6.eb diff --git a/easybuild/easyblocks/p/pasha.py b/easybuild/easyblocks/p/pasha.py new file mode 100644 index 0000000000..9c6eb72068 --- /dev/null +++ b/easybuild/easyblocks/p/pasha.py @@ -0,0 +1,39 @@ +## +# Copyright 2012 Jens Timmerman +# +# This file is part of EasyBuild, +# originally created by the HPC team of the University of Ghent (http://ugent.be/hpc). +# +# http://github.com/hpcugent/easybuild +# +# EasyBuild is free software: you can redistribute it and/or modify +# it under the terms of the GNU General Public License as published by +# the Free Software Foundation v2. +# +# EasyBuild is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with EasyBuild. If not, see . +## +""" +pasha easyblock +""" +from easybuild.framework.application import Application + +class Pasha(Application): + """ + Extend Application to add extra configuration (overwrite variables in makefile) + """ + + def configure(self): + """overwriting configure from Application + Set some extra makeopts + """ + makeopts = self.getcfg('makeopts') + makeopts = "%s TBB_DIR=$SOFTROOTTBB/tbb MPI_CXX=$MPICXX OPM_FLAG=%s "\ + "MPI_DIR='' MPI_INC='' MPI_LIB='' MY_CXX=$CXX " % (makeopts, self.tk.get_openmp_flag()) + + self.setcfg('makeopts', makeopts) diff --git a/easybuild/easyconfigs/p/PASHA/Pasha-1.0.3-goalf-1.1.0-no-OFED.eb b/easybuild/easyconfigs/p/PASHA/Pasha-1.0.3-goalf-1.1.0-no-OFED.eb new file mode 100644 index 0000000000..d400f697e1 --- /dev/null +++ b/easybuild/easyconfigs/p/PASHA/Pasha-1.0.3-goalf-1.1.0-no-OFED.eb @@ -0,0 +1,18 @@ +name='Pasha' +version='1.0.3' + +homepage='http://pasha.sourceforge.net/' +description="PASHA is a parallel short read assembler for large genomes using de Bruijn graphs." + +toolkit={'name':'goalf','version':'1.1.0-no-OFED'} +toolkitopts={'pic':True,'opt':True,'optarch':True} + +dependencies=[ + ('tbb','- + +sources=['%s-%s.tar.gz' % (name, version)] +sourceURLs=[ + 'http://downloads.sourceforge.net/pasha', +] + +parallel=1 diff --git a/easybuild/easyconfigs/p/PASHA/Pasha-1.0.3-ictce-4.0.6.eb b/easybuild/easyconfigs/p/PASHA/Pasha-1.0.3-ictce-4.0.6.eb new file mode 100644 index 0000000000..2d48bc3db1 --- /dev/null +++ b/easybuild/easyconfigs/p/PASHA/Pasha-1.0.3-ictce-4.0.6.eb @@ -0,0 +1,17 @@ +name='Pasha' +version='1.0.3' + +homepage='http://pasha.sourceforge.net/' +description="PASHA is a parallel short read assembler for large genomes using de Bruijn graphs." + +toolkit={'name':'ictce','version':'4.0.6'} +toolkitopts={'pic':True,'opt':True,'optarch':True} + +dependencies=[ + ('tbb','4.0.0.233'), + ] + +sources=['%s-%s.tar.gz' % (name, version)] +sourceURLs=[ + 'http://downloads.sourceforge.net/pasha', +] From 016c850c03d31556ea63d2a21ba6948a23dc192b Mon Sep 17 00:00:00 2001 From: Jens Timmerman Date: Wed, 25 Jul 2012 11:33:50 +0200 Subject: [PATCH 275/798] added extra path to tbb module file --- easybuild/easyblocks/t/tbb.py | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/easybuild/easyblocks/t/tbb.py b/easybuild/easyblocks/t/tbb.py index 8458d3fdb9..ce0d63cf41 100644 --- a/easybuild/easyblocks/t/tbb.py +++ b/easybuild/easyblocks/t/tbb.py @@ -22,6 +22,9 @@ from easybuild.easyblocks.i.intelbase import IntelBase class Tbb(IntelBase): + """ + EasyBlock for tbb, threading building blocks + """ def sanitycheck(self): @@ -33,3 +36,12 @@ def sanitycheck(self): self.log.info("Customized sanity check paths: %s" % self.getcfg('sanityCheckPaths')) IntelBase.sanitycheck(self) + + def make_module_extra(self): + """Add correct path to lib to LD_LIBRARY_PATH. and intel license file""" + + txt = IntelBase.make_module_extra(self) + txt += "prepend-path\t%s\t\t$root/%s/%s/lib\n" % + ('LD_LIBRARY_PATH', os.environ['ARCHITECTURE'], os.environ['TBB_COMPILER']) + + return txt From 0e193175bc7fc588ab3d8db52fd93ae1ebe4c064 Mon Sep 17 00:00:00 2001 From: Jens Timmerman Date: Wed, 25 Jul 2012 11:37:44 +0200 Subject: [PATCH 276/798] import os --- easybuild/easyblocks/t/tbb.py | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/easybuild/easyblocks/t/tbb.py b/easybuild/easyblocks/t/tbb.py index ce0d63cf41..6096be33bf 100644 --- a/easybuild/easyblocks/t/tbb.py +++ b/easybuild/easyblocks/t/tbb.py @@ -19,6 +19,7 @@ # along with EasyBuild. If not, see . ## +import os from easybuild.easyblocks.i.intelbase import IntelBase class Tbb(IntelBase): @@ -41,7 +42,7 @@ def make_module_extra(self): """Add correct path to lib to LD_LIBRARY_PATH. and intel license file""" txt = IntelBase.make_module_extra(self) - txt += "prepend-path\t%s\t\t$root/%s/%s/lib\n" % - ('LD_LIBRARY_PATH', os.environ['ARCHITECTURE'], os.environ['TBB_COMPILER']) + txt += "prepend-path\t%s\t\t$root/%s/%s/lib\n" % \ + ('LD_LIBRARY_PATH', os.environ['ARCHITECTURE'], os.environ['TBB_COMPILER']) return txt From d5c6dcbee775da1e38acf91707055082e5562856 Mon Sep 17 00:00:00 2001 From: Jens Timmerman Date: Wed, 25 Jul 2012 16:34:04 +0200 Subject: [PATCH 277/798] fixed installation of tbb and added full pasha support --- easybuild/easyblocks/p/pasha.py | 17 ++++++++++++++++- easybuild/easyblocks/t/tbb.py | 15 ++++++++++++--- .../p/PASHA/Pasha-1.0.3-ictce-4.0.6.eb | 7 ++++++- easybuild/easyconfigs/t/tbb/tbb-4.0.5.339.eb | 19 +++++++++++++++++++ 4 files changed, 53 insertions(+), 5 deletions(-) create mode 100644 easybuild/easyconfigs/t/tbb/tbb-4.0.5.339.eb diff --git a/easybuild/easyblocks/p/pasha.py b/easybuild/easyblocks/p/pasha.py index 9c6eb72068..2111d938df 100644 --- a/easybuild/easyblocks/p/pasha.py +++ b/easybuild/easyblocks/p/pasha.py @@ -21,6 +21,8 @@ """ pasha easyblock """ +import shutil +import os from easybuild.framework.application import Application class Pasha(Application): @@ -34,6 +36,19 @@ def configure(self): """ makeopts = self.getcfg('makeopts') makeopts = "%s TBB_DIR=$SOFTROOTTBB/tbb MPI_CXX=$MPICXX OPM_FLAG=%s "\ - "MPI_DIR='' MPI_INC='' MPI_LIB='' MY_CXX=$CXX " % (makeopts, self.tk.get_openmp_flag()) + "MPI_DIR='' MPI_INC='' MPI_LIB='' MY_CXX=$CXX MPICH_IGNORE_CXX_SEEK=1" % (makeopts, self.tk.get_openmp_flag()) self.setcfg('makeopts', makeopts) + + def make_install(self): + """Overwriting make_install, since there is no install defined in the makefile""" + shutil.copytree(os.path.join(self.builddir, "%s-%s" % (self.name(), self.version()), 'bin'), os.path.join(self.installdir, 'bin')) + + def sanitycheck(self): + """Custom sanity check""" + self.setcfg('sanityCheckPaths', { + 'files':["bin/pasha-%s" % x for x in ["kmergen", "pregraph", "graph"]], + 'dirs':[""], + }) + + diff --git a/easybuild/easyblocks/t/tbb.py b/easybuild/easyblocks/t/tbb.py index 6096be33bf..4581e92dd1 100644 --- a/easybuild/easyblocks/t/tbb.py +++ b/easybuild/easyblocks/t/tbb.py @@ -20,6 +20,7 @@ ## import os +import shutil from easybuild.easyblocks.i.intelbase import IntelBase class Tbb(IntelBase): @@ -27,11 +28,20 @@ class Tbb(IntelBase): EasyBlock for tbb, threading building blocks """ + def make_install(self): + """overwrite make_install to add extra symlinks""" + IntelBase.make_install(self) + self.libpath = "%s/tbb/libs/intel64/%s/" % (self.installdir, "cc4.1.0_libc2.4_kernel2.6.16.21") + installibpath = os.path.join(self.installdir, 'tbb', 'lib') + shutil.move(installibpath, os.path.join(self.installdir, 'tbb', 'libs')) + os.symlink(self.libpath, installibpath) + + def sanitycheck(self): if not self.getcfg('sanityCheckPaths'): self.setcfg('sanityCheckPaths', {'files':[], - 'dirs':["tbb/bin", "tbb/lib/intel64"] + 'dirs':["tbb/bin", "tbb/lib/"] }) self.log.info("Customized sanity check paths: %s" % self.getcfg('sanityCheckPaths')) @@ -42,7 +52,6 @@ def make_module_extra(self): """Add correct path to lib to LD_LIBRARY_PATH. and intel license file""" txt = IntelBase.make_module_extra(self) - txt += "prepend-path\t%s\t\t$root/%s/%s/lib\n" % \ - ('LD_LIBRARY_PATH', os.environ['ARCHITECTURE'], os.environ['TBB_COMPILER']) + txt += "prepend-path\t%s\t\t%s\n" % ('LD_LIBRARY_PATH', self.libpath) return txt diff --git a/easybuild/easyconfigs/p/PASHA/Pasha-1.0.3-ictce-4.0.6.eb b/easybuild/easyconfigs/p/PASHA/Pasha-1.0.3-ictce-4.0.6.eb index 2d48bc3db1..4148d89f07 100644 --- a/easybuild/easyconfigs/p/PASHA/Pasha-1.0.3-ictce-4.0.6.eb +++ b/easybuild/easyconfigs/p/PASHA/Pasha-1.0.3-ictce-4.0.6.eb @@ -8,10 +8,15 @@ toolkit={'name':'ictce','version':'4.0.6'} toolkitopts={'pic':True,'opt':True,'optarch':True} dependencies=[ - ('tbb','4.0.0.233'), + ('tbb','4.0.5.339','',True), ] sources=['%s-%s.tar.gz' % (name, version)] sourceURLs=[ 'http://downloads.sourceforge.net/pasha', ] + +patches=[ + 'intelmpi.patch', + ] +parallel=1 diff --git a/easybuild/easyconfigs/t/tbb/tbb-4.0.5.339.eb b/easybuild/easyconfigs/t/tbb/tbb-4.0.5.339.eb new file mode 100644 index 0000000000..d7322f218e --- /dev/null +++ b/easybuild/easyconfigs/t/tbb/tbb-4.0.5.339.eb @@ -0,0 +1,19 @@ +name='tbb' +version='4.0.5.339' + +homepage='http://software.intel.com/en-us/articles/intel-tbb/' +description="""Intel Threading Building Blocks 4.0 (Intel TBB) is a widely used, award-winning C++ template library for creating reliable, portable, and scalable parallel applications. Use Intel TBB for a simple and rapid way of developing robust task-based parallel applications that scale to available processor cores, are compatible with multiple environments, and are easier to maintain. Intel TBB is the most proficient way to implement future-proof parallel applications that tap into the power and performance of multicore and manycore hardware platforms.""" + +toolkit={'name':'dummy','version':'dummy'} + +sources=['l_%s_%s.tgz' % (name,version)] + +patches=['tbb_productsdb.patch'] + +## compiler class +moduleclass='lib' + +dontcreateinstalldir='True' + +## licensepath +license="/apps/gent/licenses/intel" From 8cccc82637ff810845944780dc06119f5bfda53d Mon Sep 17 00:00:00 2001 From: Jens Timmerman Date: Thu, 26 Jul 2012 17:23:54 +0300 Subject: [PATCH 278/798] Processed remarks for pasha.py --- easybuild/easyblocks/p/pasha.py | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/easybuild/easyblocks/p/pasha.py b/easybuild/easyblocks/p/pasha.py index 2111d938df..c71befabe6 100644 --- a/easybuild/easyblocks/p/pasha.py +++ b/easybuild/easyblocks/p/pasha.py @@ -31,21 +31,21 @@ class Pasha(Application): """ def configure(self): - """overwriting configure from Application - Set some extra makeopts - """ + """Configure Pasha by setting make options.""" makeopts = self.getcfg('makeopts') makeopts = "%s TBB_DIR=$SOFTROOTTBB/tbb MPI_CXX=$MPICXX OPM_FLAG=%s "\ - "MPI_DIR='' MPI_INC='' MPI_LIB='' MY_CXX=$CXX MPICH_IGNORE_CXX_SEEK=1" % (makeopts, self.tk.get_openmp_flag()) + "MPI_DIR='' MPI_INC='' MPI_LIB='' MY_CXX=$CXX MPICH_IGNORE_CXX_SEEK=1" % \ + (makeopts, self.tk.get_openmp_flag()) self.setcfg('makeopts', makeopts) def make_install(self): - """Overwriting make_install, since there is no install defined in the makefile""" - shutil.copytree(os.path.join(self.builddir, "%s-%s" % (self.name(), self.version()), 'bin'), os.path.join(self.installdir, 'bin')) + """install by copying everything from 'bin' subdir in build dir to install dir""" + srcdir = os.path.join(self.builddir, "%s-%s" % (self.name(), self.version()), 'bin') + shutil.copytree(srcdir, os.path.join(self.installdir, 'bin')) def sanitycheck(self): - """Custom sanity check""" + """Custom sanity check for Pasha""" self.setcfg('sanityCheckPaths', { 'files':["bin/pasha-%s" % x for x in ["kmergen", "pregraph", "graph"]], 'dirs':[""], From 555f0afa50cb57cfa92bc6db11557f03d3590e62 Mon Sep 17 00:00:00 2001 From: Jens Timmerman Date: Fri, 27 Jul 2012 15:45:30 +0200 Subject: [PATCH 279/798] fixed docstrings in pasha.py --- easybuild/easyblocks/p/pasha.py | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/easybuild/easyblocks/p/pasha.py b/easybuild/easyblocks/p/pasha.py index c71befabe6..6ce8a3bd9d 100644 --- a/easybuild/easyblocks/p/pasha.py +++ b/easybuild/easyblocks/p/pasha.py @@ -19,15 +19,16 @@ # along with EasyBuild. If not, see . ## """ -pasha easyblock +EasyBuild support for Pasha, implemented as an easyblock """ + import shutil import os from easybuild.framework.application import Application class Pasha(Application): """ - Extend Application to add extra configuration (overwrite variables in makefile) + Support for building and installing Pasha" """ def configure(self): From ee1954f488aa64acdfe82807319d872659f13a94 Mon Sep 17 00:00:00 2001 From: Jens Timmerman Date: Tue, 31 Jul 2012 10:27:34 +0200 Subject: [PATCH 280/798] Processed comments on pull request #24 --- easybuild/easyblocks/t/tbb.py | 20 +++++++++++++++++-- .../PASHA/Pasha-1.0.3-goalf-1.1.0-no-OFED.eb | 18 ----------------- .../p/PASHA/Pasha-1.0.3-ictce-4.0.6.eb | 2 ++ easybuild/easyconfigs/t/tbb/tbb-4.0.0.233.eb | 12 +++++++++-- easybuild/easyconfigs/t/tbb/tbb-4.0.5.339.eb | 14 ++++++++++--- 5 files changed, 41 insertions(+), 25 deletions(-) delete mode 100644 easybuild/easyconfigs/p/PASHA/Pasha-1.0.3-goalf-1.1.0-no-OFED.eb diff --git a/easybuild/easyblocks/t/tbb.py b/easybuild/easyblocks/t/tbb.py index 4581e92dd1..891f1f1002 100644 --- a/easybuild/easyblocks/t/tbb.py +++ b/easybuild/easyblocks/t/tbb.py @@ -21,6 +21,7 @@ import os import shutil +import glob from easybuild.easyblocks.i.intelbase import IntelBase class Tbb(IntelBase): @@ -31,7 +32,21 @@ class Tbb(IntelBase): def make_install(self): """overwrite make_install to add extra symlinks""" IntelBase.make_install(self) - self.libpath = "%s/tbb/libs/intel64/%s/" % (self.installdir, "cc4.1.0_libc2.4_kernel2.6.16.21") + + # save libdir + os.chdir(self.installdir) + libglob = 'tbb/libs/intel64/cc*libc*_kernel*' + libs = glob.glob(libglob) + if len(libs): + libdir = libs[-1] # take the last one, should be ordered by cc version. + else: + self.log.error("No libs found using %s in %s" % (libglob, self.installdir)) + self.libdir = libdir + + + self.libpath = "%s/tbb/libs/intel64/%s/" % (self.installdir, libdir) + # applications go looking into tbb/lib so we move what's in there to libs + # and symlink the right lib from /tbb/libs/intel64/... to lib installibpath = os.path.join(self.installdir, 'tbb', 'lib') shutil.move(installibpath, os.path.join(self.installdir, 'tbb', 'libs')) os.symlink(self.libpath, installibpath) @@ -41,7 +56,7 @@ def sanitycheck(self): if not self.getcfg('sanityCheckPaths'): self.setcfg('sanityCheckPaths', {'files':[], - 'dirs':["tbb/bin", "tbb/lib/"] + 'dirs':["tbb/bin", "tbb/lib/", "tbb/libs/"] }) self.log.info("Customized sanity check paths: %s" % self.getcfg('sanityCheckPaths')) @@ -52,6 +67,7 @@ def make_module_extra(self): """Add correct path to lib to LD_LIBRARY_PATH. and intel license file""" txt = IntelBase.make_module_extra(self) + # since we have symlinked it we could also use $SOFTROOTTBB/tbb/lib here txt += "prepend-path\t%s\t\t%s\n" % ('LD_LIBRARY_PATH', self.libpath) return txt diff --git a/easybuild/easyconfigs/p/PASHA/Pasha-1.0.3-goalf-1.1.0-no-OFED.eb b/easybuild/easyconfigs/p/PASHA/Pasha-1.0.3-goalf-1.1.0-no-OFED.eb deleted file mode 100644 index d400f697e1..0000000000 --- a/easybuild/easyconfigs/p/PASHA/Pasha-1.0.3-goalf-1.1.0-no-OFED.eb +++ /dev/null @@ -1,18 +0,0 @@ -name='Pasha' -version='1.0.3' - -homepage='http://pasha.sourceforge.net/' -description="PASHA is a parallel short read assembler for large genomes using de Bruijn graphs." - -toolkit={'name':'goalf','version':'1.1.0-no-OFED'} -toolkitopts={'pic':True,'opt':True,'optarch':True} - -dependencies=[ - ('tbb','- - -sources=['%s-%s.tar.gz' % (name, version)] -sourceURLs=[ - 'http://downloads.sourceforge.net/pasha', -] - -parallel=1 diff --git a/easybuild/easyconfigs/p/PASHA/Pasha-1.0.3-ictce-4.0.6.eb b/easybuild/easyconfigs/p/PASHA/Pasha-1.0.3-ictce-4.0.6.eb index 4148d89f07..1b01d1ce2b 100644 --- a/easybuild/easyconfigs/p/PASHA/Pasha-1.0.3-ictce-4.0.6.eb +++ b/easybuild/easyconfigs/p/PASHA/Pasha-1.0.3-ictce-4.0.6.eb @@ -19,4 +19,6 @@ sourceURLs=[ patches=[ 'intelmpi.patch', ] + +# Pasha's makefile is not suited for parallel execution. parallel=1 diff --git a/easybuild/easyconfigs/t/tbb/tbb-4.0.0.233.eb b/easybuild/easyconfigs/t/tbb/tbb-4.0.0.233.eb index 080795776c..8a73e0e9fb 100644 --- a/easybuild/easyconfigs/t/tbb/tbb-4.0.0.233.eb +++ b/easybuild/easyconfigs/t/tbb/tbb-4.0.0.233.eb @@ -2,7 +2,14 @@ name='tbb' version='4.0.0.233' homepage='http://software.intel.com/en-us/articles/intel-tbb/' -description="""Intel Threading Building Blocks 4.0 (Intel TBB) is a widely used, award-winning C++ template library for creating reliable, portable, and scalable parallel applications. Use Intel TBB for a simple and rapid way of developing robust task-based parallel applications that scale to available processor cores, are compatible with multiple environments, and are easier to maintain. Intel TBB is the most proficient way to implement future-proof parallel applications that tap into the power and performance of multicore and manycore hardware platforms.""" +description="""Intel Threading Building Blocks 4.0 (Intel TBB) + is a widely used, award-winning C++ template library for creating reliable, + portable, and scalable parallel applications. + Use Intel TBB for a simple and rapid way of developing robust task-based + parallel applications that scale to available processor cores, are compatible + with multiple environments, and are easier to maintain. + Intel TBB is the most proficient way to implement future-proof parallel applications + that tap into the power and performance of multicore and manycore hardware platforms.""" toolkit={'name':'dummy','version':'dummy'} @@ -16,4 +23,5 @@ moduleclass='lib' dontcreateinstalldir='True' ## licensepath -license="/apps/gent/licenses/intel" +import os +license=os.path.join(os.getenv('HOME'),"licenses","intel","license.lic") diff --git a/easybuild/easyconfigs/t/tbb/tbb-4.0.5.339.eb b/easybuild/easyconfigs/t/tbb/tbb-4.0.5.339.eb index d7322f218e..597a88a488 100644 --- a/easybuild/easyconfigs/t/tbb/tbb-4.0.5.339.eb +++ b/easybuild/easyconfigs/t/tbb/tbb-4.0.5.339.eb @@ -2,8 +2,15 @@ name='tbb' version='4.0.5.339' homepage='http://software.intel.com/en-us/articles/intel-tbb/' -description="""Intel Threading Building Blocks 4.0 (Intel TBB) is a widely used, award-winning C++ template library for creating reliable, portable, and scalable parallel applications. Use Intel TBB for a simple and rapid way of developing robust task-based parallel applications that scale to available processor cores, are compatible with multiple environments, and are easier to maintain. Intel TBB is the most proficient way to implement future-proof parallel applications that tap into the power and performance of multicore and manycore hardware platforms.""" - +description="""Intel Threading Building Blocks 4.0 (Intel TBB) + is a widely used, award-winning C++ template library for creating reliable, + portable, and scalable parallel applications. + Use Intel TBB for a simple and rapid way of developing robust task-based + parallel applications that scale to available processor cores, are compatible + with multiple environments, and are easier to maintain. + Intel TBB is the most proficient way to implement future-proof parallel applications + that tap into the power and performance of multicore and manycore hardware platforms.""" + toolkit={'name':'dummy','version':'dummy'} sources=['l_%s_%s.tgz' % (name,version)] @@ -16,4 +23,5 @@ moduleclass='lib' dontcreateinstalldir='True' ## licensepath -license="/apps/gent/licenses/intel" +import os +license=os.path.join(os.getenv('HOME'),"licenses","intel","license.lic") From c2a979b21205c69fcac6572e0f70fa31c02c9c46 Mon Sep 17 00:00:00 2001 From: Kenneth Hoste Date: Wed, 1 Aug 2012 10:35:19 +0200 Subject: [PATCH 281/798] add support for building and installing FSL, add example easyconfig + patch --- easybuild/easyblocks/f/fsl.py | 100 ++++++++++++++++++ .../f/FSL/FSL-4.1.9-goalf-1.1.0-no-OFED.eb | 15 +++ .../f/FSL/FSL_melodic_makefile.patch | 11 ++ 3 files changed, 126 insertions(+) create mode 100644 easybuild/easyblocks/f/fsl.py create mode 100644 easybuild/easyconfigs/f/FSL/FSL-4.1.9-goalf-1.1.0-no-OFED.eb create mode 100644 easybuild/easyconfigs/f/FSL/FSL_melodic_makefile.patch diff --git a/easybuild/easyblocks/f/fsl.py b/easybuild/easyblocks/f/fsl.py new file mode 100644 index 0000000000..3b75c3d86a --- /dev/null +++ b/easybuild/easyblocks/f/fsl.py @@ -0,0 +1,100 @@ +## +# Copyright 2009-2012 Kenneth Hoste +# +# This file is part of EasyBuild, +# originally created by the HPC team of the University of Ghent (http://ugent.be/hpc). +# +# http://github.com/hpcugent/easybuild +# +# EasyBuild is free software: you can redistribute it and/or modify +# it under the terms of the GNU General Public License as published by +# the Free Software Foundation v2. +# +# EasyBuild is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with EasyBuild. If not, see . +## +import difflib +from distutils.version import LooseVersion +import os +import shutil +import easybuild.tools.environment as env +from easybuild.framework.application import Application +from easybuild.tools.filetools import run_cmd + +class FSL(Application): + """Support for building and installing FSL.""" + + def __init__(self,*args,**kwargs): + Application.__init__(self, args,kwargs) + + self.build_in_installdir = True + + self.fsldir = None + + def configure(self): + """Configure FSL build: set FSLDIR env var.""" + + self.fsldir = self.getcfg('startfrom') + env.set('FSLDIR', self.fsldir) + + # determine FSL machine type + cmd = ". %s/etc/fslconf/fsl.sh && echo $FSLMACHTYPE" % self.fsldir + (out, _) = run_cmd(cmd, log_all=True, simple=False) + fslmachtype = out.strip() + self.log.debug("FSL machine type: %s" % fslmachtype) + + # prepare config + ## either using matching config, or copy closest match + cfgdir = os.path.join(self.fsldir, "config") + try: + cfgs = os.listdir(cfgdir) + best_cfg = difflib.get_close_matches(fslmachtype, cfgs)[0] + + self.log.debug("Best matching config dir for %s is %s" % (fslmachtype, best_cfg)) + + if fslmachtype != best_cfg: + srcdir = os.path.join(cfgdir, best_cfg) + tgtdir = os.path.join(cfgdir, fslmachtype) + shutil.copytree(srcdir, tgtdir) + self.log.debug("Copied %s to %s" % (srcdir, tgtdir)) + except OSError, err: + self.log.error("Failed to copy closest matching config dir: %s" % err) + + def make(self): + """Building is performed in make_install.""" + pass + + def make_install(self): + """Build FSL using supplied script.""" + + cmd = ". %s/etc/fslconf/fsl.sh && ./build" % self.fsldir + run_cmd(cmd, log_all=True, simple=True) + + def make_module_req_guess(self): + + guesses = Application.make_module_req_guess(self) + + guesses.update({ + 'PATH': ["fsl/bin"], + 'LD_LIBRARY_PATH': ["fsl/lib"], + }) + + return guesses + + def sanitycheck(self): + """Custom sanity check for FSL""" + + if not self.getcfg('sanityCheckPaths'): + + self.setcfg('sanityCheckPaths',{'files':[], + 'dirs':["fsl/%s" % x for x in ["bin", "data", "etc", "extras", "include", "lib"]] + }) + + self.log.info("Customized sanity check paths: %s" % self.getcfg('sanityCheckPaths')) + + Application.sanitycheck(self) diff --git a/easybuild/easyconfigs/f/FSL/FSL-4.1.9-goalf-1.1.0-no-OFED.eb b/easybuild/easyconfigs/f/FSL/FSL-4.1.9-goalf-1.1.0-no-OFED.eb new file mode 100644 index 0000000000..0308c62580 --- /dev/null +++ b/easybuild/easyconfigs/f/FSL/FSL-4.1.9-goalf-1.1.0-no-OFED.eb @@ -0,0 +1,15 @@ +name='FSL' +version='4.1.9' + +homepage='http://www.fmrib.ox.ac.uk/fsl/' +description="""FSL is a comprehensive library of analysis tools for FMRI, MRI and DTI brain imaging data.""" + +toolkit={'name':'goalf','version':'1.1.0-no-OFED'} + +sourceURLs=["http://www.fmrib.ox.ac.uk/fsldownloads/"] +sources=['%s-%s-sources.tar.gz' % (name.lower(), version)] + +patches=['FSL_melodic_makefile.patch'] + +# libX11-devel is required for X11/Xlib.h, required by tk build +osdependencies=['libX11-devel'] diff --git a/easybuild/easyconfigs/f/FSL/FSL_melodic_makefile.patch b/easybuild/easyconfigs/f/FSL/FSL_melodic_makefile.patch new file mode 100644 index 0000000000..cdbe9bb801 --- /dev/null +++ b/easybuild/easyconfigs/f/FSL/FSL_melodic_makefile.patch @@ -0,0 +1,11 @@ +--- fsl.orig/src/melodic/Makefile 2012-07-31 15:45:06.997491869 +0200 ++++ fsl/src/melodic/Makefile 2012-07-31 15:58:39.172984156 +0200 +@@ -3,7 +3,7 @@ + include ${FSLCONFDIR}/default.mk + + OPTFLAGS = -O3 -Wno-deprecated +-OPTFLAGS_alphaev6-dec-osf 5.0-gcc2.95.2 = -O3 -mieee -mfp-trap-mode=sui ++#OPTFLAGS_alphaev6-dec-osf 5.0-gcc2.95.2 = -O3 -mieee -mfp-trap-mode=sui + + PROJNAME = melodic + \ No newline at end of file From 919cb42f2903aafb1f5d489fa04ca3b652b6d75f Mon Sep 17 00:00:00 2001 From: Kenneth Hoste Date: Wed, 1 Aug 2012 10:36:10 +0200 Subject: [PATCH 282/798] re-add import required for VERBOSE_VERSION, ignore PyDev warning on use of FileRepository in EasyBuild config (config is exec'ed, so it works) --- easybuild/build.py | 2 ++ easybuild/easybuild_config.py | 2 +- 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/easybuild/build.py b/easybuild/build.py index 7edb7b944a..f790785a61 100644 --- a/easybuild/build.py +++ b/easybuild/build.py @@ -28,6 +28,8 @@ import copy import platform from datetime import datetime + +import easybuild # required for VERBOSE_VERSION from easybuild.framework.application import Application, get_instance from easybuild.tools.build_log import EasyBuildError, initLogger, \ removeLogHandler, print_msg diff --git a/easybuild/easybuild_config.py b/easybuild/easybuild_config.py index 53c56eabcd..6c279394f5 100644 --- a/easybuild/easybuild_config.py +++ b/easybuild/easybuild_config.py @@ -59,7 +59,7 @@ ## optionally a subdir argument can be specified: ## `repository = FileRepository(repositoryPath, subdir)` repositoryPath = os.path.join(prefix, 'ebfiles_repo') -repository = FileRepository(repositoryPath) +repository = FileRepository(repositoryPath) #@UndefinedVariable # log format: (dir, filename template) # supported in template: name, version, data, time From 1c0a861fd60907e841a358d34e35c7d3097fdfbc Mon Sep 17 00:00:00 2001 From: Kenneth Hoste Date: Wed, 1 Aug 2012 11:55:30 +0200 Subject: [PATCH 283/798] remove unneccesary import --- easybuild/easyblocks/f/fsl.py | 1 - 1 file changed, 1 deletion(-) diff --git a/easybuild/easyblocks/f/fsl.py b/easybuild/easyblocks/f/fsl.py index 3b75c3d86a..061da85eb3 100644 --- a/easybuild/easyblocks/f/fsl.py +++ b/easybuild/easyblocks/f/fsl.py @@ -19,7 +19,6 @@ # along with EasyBuild. If not, see . ## import difflib -from distutils.version import LooseVersion import os import shutil import easybuild.tools.environment as env From 2c83ecc565b7e1f6110e23c8453cb90b9dda9790 Mon Sep 17 00:00:00 2001 From: Kenneth Hoste Date: Wed, 1 Aug 2012 12:13:39 +0200 Subject: [PATCH 284/798] use toolkit_comp_family + constants in toolkit itself as well (eat your own dog food!) --- easybuild/tools/toolkit.py | 13 ++++++------- 1 file changed, 6 insertions(+), 7 deletions(-) diff --git a/easybuild/tools/toolkit.py b/easybuild/tools/toolkit.py index afff955b9f..582d714caf 100644 --- a/easybuild/tools/toolkit.py +++ b/easybuild/tools/toolkit.py @@ -315,9 +315,9 @@ def prepareACML(self): self._addDependencyVariables(['ACML']) - if os.getenv('SOFTROOTGCC'): + if self.toolkit_comp_family() == GCC: compiler = 'gfortran' - elif os.getenv('SOFTROOTIFORT'): + elif self.toolkit_comp_family() == INTEL: compiler = 'ifort' else: log.error("Don't know which compiler-specific subdir for ACML to use.") @@ -578,10 +578,9 @@ def prepareIMKL(self): self._flagsForSubdirs(mklRoot, mklld, flag="-L%s", varskey="LDFLAGS") self._flagsForSubdirs(mklRoot, mklcpp, flag="-I%s", varskey="CPPFLAGS") - if os.getenv('SOFTROOTGCC'): - if not (os.getenv('SOFTROOTICC') or os.getenv('SOFTROOTIFORT')): - for var in ['LIBLAPACK', 'LIBLAPACK_MT', 'LIBSCALAPACK', 'LIBSCALAPACK_MT']: - self.vars[var] = self.vars[var].replace('mkl_intel_lp64', 'mkl_gf_lp64') + if self.toolkit_comp_family() == GCC: + for var in ['LIBLAPACK', 'LIBLAPACK_MT', 'LIBSCALAPACK', 'LIBSCALAPACK_MT']: + self.vars[var] = self.vars[var].replace('mkl_intel_lp64', 'mkl_gf_lp64') else: log.error("Toolkit preparation with both GCC and Intel compilers loaded is not supported.") @@ -590,7 +589,7 @@ def prepareIMPI(self): Prepare for Intel MPI library """ - if os.getenv('SOFTROOTICC') and os.getenv('SOFTROOTIFORT') and not os.getenv('SOFTROOTGCC'): + if self.toolkit_comp_family() == INTEL: # Intel-based toolkit self.vars['MPICC'] = 'mpiicc %s' % self.m32flag From 1fb1659da25f10951ce60785856d45039369152f Mon Sep 17 00:00:00 2001 From: Jens Timmerman Date: Wed, 1 Aug 2012 15:15:30 +0300 Subject: [PATCH 285/798] Use updatecfg instead of getcfg, update, setcfg --- easybuild/easyblocks/p/pasha.py | 9 +++------ 1 file changed, 3 insertions(+), 6 deletions(-) diff --git a/easybuild/easyblocks/p/pasha.py b/easybuild/easyblocks/p/pasha.py index 6ce8a3bd9d..fb8f311a51 100644 --- a/easybuild/easyblocks/p/pasha.py +++ b/easybuild/easyblocks/p/pasha.py @@ -33,12 +33,9 @@ class Pasha(Application): def configure(self): """Configure Pasha by setting make options.""" - makeopts = self.getcfg('makeopts') - makeopts = "%s TBB_DIR=$SOFTROOTTBB/tbb MPI_CXX=$MPICXX OPM_FLAG=%s "\ - "MPI_DIR='' MPI_INC='' MPI_LIB='' MY_CXX=$CXX MPICH_IGNORE_CXX_SEEK=1" % \ - (makeopts, self.tk.get_openmp_flag()) - - self.setcfg('makeopts', makeopts) + self.updatecfg('makeopts', "TBB_DIR=$SOFTROOTTBB/tbb MPI_CXX=$MPICXX OPM_FLAG=%s" % self.tk.get_openmp_flag()) + self.updatecfg('makeopts', "MPI_DIR='' MPI_INC='' MPI_LIB='' MY_CXX=$CXX MPICH_IGNORE_CXX_SEEK=1") + def make_install(self): """install by copying everything from 'bin' subdir in build dir to install dir""" From d4572fc76d47ec2625116df7869f1a580da91d55 Mon Sep 17 00:00:00 2001 From: Kenneth Hoste Date: Wed, 1 Aug 2012 14:28:24 +0200 Subject: [PATCH 286/798] fix refactoring error --- easybuild/tools/toolkit.py | 2 -- 1 file changed, 2 deletions(-) diff --git a/easybuild/tools/toolkit.py b/easybuild/tools/toolkit.py index 582d714caf..f0e4d37e76 100644 --- a/easybuild/tools/toolkit.py +++ b/easybuild/tools/toolkit.py @@ -581,8 +581,6 @@ def prepareIMKL(self): if self.toolkit_comp_family() == GCC: for var in ['LIBLAPACK', 'LIBLAPACK_MT', 'LIBSCALAPACK', 'LIBSCALAPACK_MT']: self.vars[var] = self.vars[var].replace('mkl_intel_lp64', 'mkl_gf_lp64') - else: - log.error("Toolkit preparation with both GCC and Intel compilers loaded is not supported.") def prepareIMPI(self): """ From d38ea4c408fddd3c5b63b4171d98255ea466bcb3 Mon Sep 17 00:00:00 2001 From: Kenneth Hoste Date: Wed, 1 Aug 2012 14:39:57 +0200 Subject: [PATCH 287/798] rename Pasha easyconfig dir, added patch file required for ictce, add easyconfig for goalf (refs #1127) --- .../p/Pasha/Pasha-1.0.3-goalf-1.1.0.eb | 16 ++++ .../Pasha-1.0.3-ictce-4.0.6.eb | 12 +-- easybuild/easyconfigs/p/Pasha/intelmpi.patch | 90 +++++++++++++++++++ 3 files changed, 109 insertions(+), 9 deletions(-) create mode 100644 easybuild/easyconfigs/p/Pasha/Pasha-1.0.3-goalf-1.1.0.eb rename easybuild/easyconfigs/p/{PASHA => Pasha}/Pasha-1.0.3-ictce-4.0.6.eb (71%) create mode 100644 easybuild/easyconfigs/p/Pasha/intelmpi.patch diff --git a/easybuild/easyconfigs/p/Pasha/Pasha-1.0.3-goalf-1.1.0.eb b/easybuild/easyconfigs/p/Pasha/Pasha-1.0.3-goalf-1.1.0.eb new file mode 100644 index 0000000000..fc7b9fa662 --- /dev/null +++ b/easybuild/easyconfigs/p/Pasha/Pasha-1.0.3-goalf-1.1.0.eb @@ -0,0 +1,16 @@ +name='Pasha' +version='1.0.3' + +homepage='http://pasha.sourceforge.net/' +description="PASHA is a parallel short read assembler for large genomes using de Bruijn graphs." + +toolkit={'name':'goalf','version':'1.1.0'} +toolkitopts={'pic':True,'opt':True,'optarch':True} + +dependencies=[('tbb','4.0.5.339','',True)] + +sourceURLs=['http://downloads.sourceforge.net/pasha'] +sources=['%s-%s.tar.gz' % (name, version)] + +# Pasha's makefile is not suited for parallel execution. +parallel=1 diff --git a/easybuild/easyconfigs/p/PASHA/Pasha-1.0.3-ictce-4.0.6.eb b/easybuild/easyconfigs/p/Pasha/Pasha-1.0.3-ictce-4.0.6.eb similarity index 71% rename from easybuild/easyconfigs/p/PASHA/Pasha-1.0.3-ictce-4.0.6.eb rename to easybuild/easyconfigs/p/Pasha/Pasha-1.0.3-ictce-4.0.6.eb index 1b01d1ce2b..07fb4c27e9 100644 --- a/easybuild/easyconfigs/p/PASHA/Pasha-1.0.3-ictce-4.0.6.eb +++ b/easybuild/easyconfigs/p/Pasha/Pasha-1.0.3-ictce-4.0.6.eb @@ -7,18 +7,12 @@ description="PASHA is a parallel short read assembler for large genomes using de toolkit={'name':'ictce','version':'4.0.6'} toolkitopts={'pic':True,'opt':True,'optarch':True} -dependencies=[ - ('tbb','4.0.5.339','',True), - ] +dependencies=[('tbb','4.0.5.339','',True)] +sourceURLs=['http://downloads.sourceforge.net/pasha'] sources=['%s-%s.tar.gz' % (name, version)] -sourceURLs=[ - 'http://downloads.sourceforge.net/pasha', -] -patches=[ - 'intelmpi.patch', - ] +patches=['intelmpi.patch'] # Pasha's makefile is not suited for parallel execution. parallel=1 diff --git a/easybuild/easyconfigs/p/Pasha/intelmpi.patch b/easybuild/easyconfigs/p/Pasha/intelmpi.patch new file mode 100644 index 0000000000..16075e78be --- /dev/null +++ b/easybuild/easyconfigs/p/Pasha/intelmpi.patch @@ -0,0 +1,90 @@ +--- Common/AlshaTypes.h.orig 2010-12-27 12:12:32.000000000 +0100 ++++ Common/AlshaTypes.h 2012-07-24 17:26:16.571882868 +0200 +@@ -10,6 +10,10 @@ + #ifndef ALAHSTYPES_H_ + #define ALAHSTYPES_H_ + ++#ifdef ALSHA_MPI ++#include ++#endif ++ + #include + #include + #include +@@ -27,9 +31,7 @@ + #include + #include + +-#ifdef ALSHA_MPI +-#include +-#endif ++ + + using namespace std; + using namespace __gnu_cxx; +--- Common/AlshaUtils.cpp.orig 2012-07-24 17:31:17.000000000 +0200 ++++ Common/AlshaUtils.cpp 2012-07-24 17:31:41.294903288 +0200 +@@ -7,12 +7,14 @@ + * Emails: liuy0039@ntu.edu.sg; nkcslyc@hotmail.com + */ + ++ ++#include "AlshaTypes.h" ++#include "AlshaUtils.h" ++ + #include + #include + #include + +-#include "AlshaTypes.h" +-#include "AlshaUtils.h" + + void* AlshaUtils::memAlloc(NumType size) + { +--- Common/AlshaFileParser.h.orig 2012-07-24 17:37:26.000000000 +0200 ++++ Common/AlshaFileParser.h 2012-07-24 17:37:54.934926782 +0200 +@@ -10,8 +10,8 @@ + #ifndef ALSHAFILEPARSER_H_ + #define ALSHAFILEPARSER_H_ + +-#include "../zlib/zlib.h" + #include "AlshaTypes.h" ++#include "../zlib/zlib.h" + #include "AlshaUtils.h" + #include + #include +--- PreGraph/AlshaMessage.cpp.orig 2012-07-24 18:07:42.123039163 +0200 ++++ PreGraph/AlshaMessage.cpp 2012-07-24 18:06:33.783034865 +0200 +@@ -7,6 +7,9 @@ + * Emails: liuy0039@ntu.edu.sg; nkcslyc@hotmail.com + */ + ++#define MPICH_IGNORE_CXX_SEEK ++#define MPICH_SKIP_MPICXX ++ + #include "AlshaMessage.h" + #include "AlshaComms.h" + #include "AlshaParams.h" +--- PreGraph/AlshaComms.cpp.orig 2010-08-18 14:53:36.000000000 +0200 ++++ PreGraph/AlshaComms.cpp 2012-07-24 18:09:14.332044961 +0200 +@@ -1,6 +1,6 @@ ++#include + #include "AlshaComms.h" + #include "AlshaParams.h" +-#include + + MPI_Request AlshaComms::msgRequest = MPI_REQUEST_NULL; + uint8_t* AlshaComms::RX_BUFFER = NULL; +--- PreGraph/AlshaThread.cpp.orig 2012-07-24 18:12:46.000000000 +0200 ++++ PreGraph/AlshaThread.cpp 2012-07-24 18:13:18.485060314 +0200 +@@ -7,6 +7,9 @@ + * Emails: liuy0039@ntu.edu.sg; nkcslyc@hotmail.com + */ + ++#define MPICH_IGNORE_CXX_SEEK ++#define MPICH_SKIP_MPICXX ++ + #include "AlshaThread.h" + #include "Alsha.h" + + From 583709b3bf5fd124b6e48d90b08e758543a047cf Mon Sep 17 00:00:00 2001 From: Kenneth Hoste Date: Wed, 1 Aug 2012 14:44:47 +0200 Subject: [PATCH 288/798] check for TBB dependency --- easybuild/easyblocks/p/pasha.py | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-) diff --git a/easybuild/easyblocks/p/pasha.py b/easybuild/easyblocks/p/pasha.py index fb8f311a51..875109e5b4 100644 --- a/easybuild/easyblocks/p/pasha.py +++ b/easybuild/easyblocks/p/pasha.py @@ -33,12 +33,17 @@ class Pasha(Application): def configure(self): """Configure Pasha by setting make options.""" - self.updatecfg('makeopts', "TBB_DIR=$SOFTROOTTBB/tbb MPI_CXX=$MPICXX OPM_FLAG=%s" % self.tk.get_openmp_flag()) + + tbb = os.getenv('SOFTROOTTBB') + if not tbb: + self.log.error("TBB module not loaded.") + + self.updatecfg('makeopts', "TBB_DIR=%s/tbb MPI_CXX=$MPICXX OPM_FLAG=%s" % (tbb, self.tk.get_openmp_flag())) self.updatecfg('makeopts', "MPI_DIR='' MPI_INC='' MPI_LIB='' MY_CXX=$CXX MPICH_IGNORE_CXX_SEEK=1") - def make_install(self): - """install by copying everything from 'bin' subdir in build dir to install dir""" + """Install by copying everything from 'bin' subdir in build dir to install dir""" + srcdir = os.path.join(self.builddir, "%s-%s" % (self.name(), self.version()), 'bin') shutil.copytree(srcdir, os.path.join(self.installdir, 'bin')) @@ -49,4 +54,3 @@ def sanitycheck(self): 'dirs':[""], }) - From ae05475256918b7ac21cdf26594b50ac9a7199a5 Mon Sep 17 00:00:00 2001 From: Kenneth Hoste Date: Wed, 1 Aug 2012 16:30:47 +0200 Subject: [PATCH 289/798] add no-OFED suffix to goalf toolkit for Pasha example easyconfig --- ...-1.0.3-goalf-1.1.0.eb => Pasha-1.0.3-goalf-1.1.0-no-OFED.eb} | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) rename easybuild/easyconfigs/p/Pasha/{Pasha-1.0.3-goalf-1.1.0.eb => Pasha-1.0.3-goalf-1.1.0-no-OFED.eb} (89%) diff --git a/easybuild/easyconfigs/p/Pasha/Pasha-1.0.3-goalf-1.1.0.eb b/easybuild/easyconfigs/p/Pasha/Pasha-1.0.3-goalf-1.1.0-no-OFED.eb similarity index 89% rename from easybuild/easyconfigs/p/Pasha/Pasha-1.0.3-goalf-1.1.0.eb rename to easybuild/easyconfigs/p/Pasha/Pasha-1.0.3-goalf-1.1.0-no-OFED.eb index fc7b9fa662..8c92d8a791 100644 --- a/easybuild/easyconfigs/p/Pasha/Pasha-1.0.3-goalf-1.1.0.eb +++ b/easybuild/easyconfigs/p/Pasha/Pasha-1.0.3-goalf-1.1.0-no-OFED.eb @@ -4,7 +4,7 @@ version='1.0.3' homepage='http://pasha.sourceforge.net/' description="PASHA is a parallel short read assembler for large genomes using de Bruijn graphs." -toolkit={'name':'goalf','version':'1.1.0'} +toolkit={'name':'goalf','version':'1.1.0-no-OFED'} toolkitopts={'pic':True,'opt':True,'optarch':True} dependencies=[('tbb','4.0.5.339','',True)] From 13304ae3273db140c1d055bbc0bb5496a0ba37d4 Mon Sep 17 00:00:00 2001 From: Kenneth Hoste Date: Thu, 2 Aug 2012 10:17:37 +0200 Subject: [PATCH 290/798] add patch for building Pasha with recent GCC compiler --- .../Pasha/Pasha-1.0.3-goalf-1.1.0-no-OFED.eb | 2 + .../p/Pasha/gcc-hash_fun-map-set.patch | 61 +++++++++++++++++++ 2 files changed, 63 insertions(+) create mode 100644 easybuild/easyconfigs/p/Pasha/gcc-hash_fun-map-set.patch diff --git a/easybuild/easyconfigs/p/Pasha/Pasha-1.0.3-goalf-1.1.0-no-OFED.eb b/easybuild/easyconfigs/p/Pasha/Pasha-1.0.3-goalf-1.1.0-no-OFED.eb index 8c92d8a791..e54ae6a9d5 100644 --- a/easybuild/easyconfigs/p/Pasha/Pasha-1.0.3-goalf-1.1.0-no-OFED.eb +++ b/easybuild/easyconfigs/p/Pasha/Pasha-1.0.3-goalf-1.1.0-no-OFED.eb @@ -12,5 +12,7 @@ dependencies=[('tbb','4.0.5.339','',True)] sourceURLs=['http://downloads.sourceforge.net/pasha'] sources=['%s-%s.tar.gz' % (name, version)] +patches=['gcc-hash_fun-map-set.patch'] + # Pasha's makefile is not suited for parallel execution. parallel=1 diff --git a/easybuild/easyconfigs/p/Pasha/gcc-hash_fun-map-set.patch b/easybuild/easyconfigs/p/Pasha/gcc-hash_fun-map-set.patch new file mode 100644 index 0000000000..a8a9cab2a3 --- /dev/null +++ b/easybuild/easyconfigs/p/Pasha/gcc-hash_fun-map-set.patch @@ -0,0 +1,61 @@ +diff -ru Pasha-1.0.3.orig/google/dense_hash_map Pasha-1.0.3/google/dense_hash_map +--- Pasha-1.0.3.orig/google/dense_hash_map 2010-12-07 04:43:26.000000000 +0100 ++++ Pasha-1.0.3/google/dense_hash_map 2012-08-02 10:15:22.758689520 +0200 +@@ -103,7 +103,7 @@ + #include // for equal_to + #include // for alloc<> + #include // for pair<> +-#include HASH_FUN_H // defined in config.h ++#include HASH_MAP_H // defined in config.h + #include + #include + +diff -ru Pasha-1.0.3.orig/google/dense_hash_set Pasha-1.0.3/google/dense_hash_set +--- Pasha-1.0.3.orig/google/dense_hash_set 2010-12-07 04:43:26.000000000 +0100 ++++ Pasha-1.0.3/google/dense_hash_set 2012-08-02 10:15:12.680591773 +0200 +@@ -107,7 +107,7 @@ + #include // for equal_to + #include // for alloc<> + #include // for pair<> +-#include HASH_FUN_H // defined in config.h ++#include HASH_SET_H // defined in config.h + #include + #include + +diff -ru Pasha-1.0.3.orig/google/sparsehash/sparseconfig.h Pasha-1.0.3/google/sparsehash/sparseconfig.h +--- Pasha-1.0.3.orig/google/sparsehash/sparseconfig.h 2010-12-07 04:43:26.000000000 +0100 ++++ Pasha-1.0.3/google/sparsehash/sparseconfig.h 2012-08-02 10:15:34.118799712 +0200 +@@ -7,7 +7,8 @@ + #define GOOGLE_NAMESPACE ::google + + /* the location of the header defining hash functions */ +-#define HASH_FUN_H ++#define HASH_MAP_H ++#define HASH_SET_H + + /* the namespace of the hash<> function */ + #define HASH_NAMESPACE __gnu_cxx +diff -ru Pasha-1.0.3.orig/google/sparse_hash_map Pasha-1.0.3/google/sparse_hash_map +--- Pasha-1.0.3.orig/google/sparse_hash_map 2010-12-07 04:43:26.000000000 +0100 ++++ Pasha-1.0.3/google/sparse_hash_map 2012-08-02 10:15:26.615727009 +0200 +@@ -91,7 +91,7 @@ + #include // for equal_to + #include // for alloc<> + #include // for pair<> +-#include HASH_FUN_H // defined in config.h ++#include HASH_MAP_H // defined in config.h + #include + #include + +diff -ru Pasha-1.0.3.orig/google/sparse_hash_set Pasha-1.0.3/google/sparse_hash_set +--- Pasha-1.0.3.orig/google/sparse_hash_set 2010-12-07 04:43:26.000000000 +0100 ++++ Pasha-1.0.3/google/sparse_hash_set 2012-08-02 10:15:17.334636915 +0200 +@@ -95,7 +95,7 @@ + #include // for equal_to + #include // for alloc<> + #include // for pair<> +-#include HASH_FUN_H // defined in config.h ++#include HASH_SET_H // defined in config.h + #include + #include + From 93e59df37f641dd3cd4d5e1b27dfe857d7283c18 Mon Sep 17 00:00:00 2001 From: Kenneth Hoste Date: Fri, 3 Aug 2012 07:06:14 +0200 Subject: [PATCH 291/798] use empty line between Python and EasyBuild imports everywhere --- easybuild/easyblocks/a/atlas.py | 1 + easybuild/easyblocks/b/binary.py | 2 +- easybuild/easyblocks/b/blacs.py | 1 + easybuild/easyblocks/c/cp2k.py | 1 + easybuild/easyblocks/f/fsl.py | 1 + easybuild/easyblocks/g/g2clib.py | 1 + easybuild/easyblocks/g/g2lib.py | 1 + easybuild/easyblocks/h/hdf5.py | 1 + easybuild/easyblocks/h/hpl.py | 1 + easybuild/easyblocks/i/icc.py | 1 - easybuild/easyblocks/i/imkl.py | 2 -- easybuild/easyblocks/i/impi.py | 1 - easybuild/easyblocks/i/intelbase.py | 1 + easybuild/easyblocks/l/lapack.py | 1 + easybuild/easyblocks/l/libsmm.py | 3 ++- easybuild/easyblocks/m/maple.py | 1 + easybuild/easyblocks/m/mrbayes.py | 1 + easybuild/easyblocks/m/mvapich2.py | 1 + easybuild/easyblocks/n/ncl.py | 1 + easybuild/easyblocks/n/netcdf.py | 1 + easybuild/easyblocks/n/netcdf_fortran.py | 1 + easybuild/easyblocks/p/python.py | 1 + easybuild/easyblocks/s/scalapack.py | 1 + easybuild/easyblocks/t/tarball.py | 1 + easybuild/easyblocks/t/tbb.py | 4 ++-- easybuild/easyblocks/w/wps.py | 1 + easybuild/easyblocks/w/wrf.py | 1 + 27 files changed, 26 insertions(+), 8 deletions(-) diff --git a/easybuild/easyblocks/a/atlas.py b/easybuild/easyblocks/a/atlas.py index 8dbb06fcec..c2c8fa4046 100644 --- a/easybuild/easyblocks/a/atlas.py +++ b/easybuild/easyblocks/a/atlas.py @@ -20,6 +20,7 @@ ## import re import os + from easybuild.framework.application import Application from easybuild.tools.filetools import run_cmd diff --git a/easybuild/easyblocks/b/binary.py b/easybuild/easyblocks/b/binary.py index e4e83ccd51..85a5eea026 100644 --- a/easybuild/easyblocks/b/binary.py +++ b/easybuild/easyblocks/b/binary.py @@ -22,7 +22,7 @@ EasyBlock for binary applications """ import shutil -import os + from easybuild.framework.application import Application class Binary(Application): diff --git a/easybuild/easyblocks/b/blacs.py b/easybuild/easyblocks/b/blacs.py index 7a89dd8ed8..96b0cf2403 100644 --- a/easybuild/easyblocks/b/blacs.py +++ b/easybuild/easyblocks/b/blacs.py @@ -22,6 +22,7 @@ import re import os import shutil + from easybuild.framework.application import Application from easybuild.tools.filetools import run_cmd diff --git a/easybuild/easyblocks/c/cp2k.py b/easybuild/easyblocks/c/cp2k.py index c22932ca22..19f7605aba 100644 --- a/easybuild/easyblocks/c/cp2k.py +++ b/easybuild/easyblocks/c/cp2k.py @@ -25,6 +25,7 @@ import os import shutil import sys + from easybuild.framework.application import Application from easybuild.tools.filetools import run_cmd import easybuild.tools.toolkit as toolkit diff --git a/easybuild/easyblocks/f/fsl.py b/easybuild/easyblocks/f/fsl.py index 061da85eb3..1179f02cc5 100644 --- a/easybuild/easyblocks/f/fsl.py +++ b/easybuild/easyblocks/f/fsl.py @@ -21,6 +21,7 @@ import difflib import os import shutil + import easybuild.tools.environment as env from easybuild.framework.application import Application from easybuild.tools.filetools import run_cmd diff --git a/easybuild/easyblocks/g/g2clib.py b/easybuild/easyblocks/g/g2clib.py index beaebb2a24..597197b490 100644 --- a/easybuild/easyblocks/g/g2clib.py +++ b/easybuild/easyblocks/g/g2clib.py @@ -21,6 +21,7 @@ import glob import os import shutil + from easybuild.framework.application import Application class G2clib(Application): diff --git a/easybuild/easyblocks/g/g2lib.py b/easybuild/easyblocks/g/g2lib.py index 9cc357ba00..edf63dfc38 100644 --- a/easybuild/easyblocks/g/g2lib.py +++ b/easybuild/easyblocks/g/g2lib.py @@ -20,6 +20,7 @@ ## import os import shutil + from easybuild.framework.application import Application class G2lib(Application): diff --git a/easybuild/easyblocks/h/hdf5.py b/easybuild/easyblocks/h/hdf5.py index 61aaebba79..47754e67bb 100644 --- a/easybuild/easyblocks/h/hdf5.py +++ b/easybuild/easyblocks/h/hdf5.py @@ -19,6 +19,7 @@ # along with EasyBuild. If not, see . ## import os + from easybuild.framework.application import Application class HDF5(Application): diff --git a/easybuild/easyblocks/h/hpl.py b/easybuild/easyblocks/h/hpl.py index 8b09476cb1..0c65b88edb 100644 --- a/easybuild/easyblocks/h/hpl.py +++ b/easybuild/easyblocks/h/hpl.py @@ -20,6 +20,7 @@ ## import os import shutil + from easybuild.framework.application import Application from easybuild.tools.filetools import run_cmd diff --git a/easybuild/easyblocks/i/icc.py b/easybuild/easyblocks/i/icc.py index 937adad643..897ef37722 100644 --- a/easybuild/easyblocks/i/icc.py +++ b/easybuild/easyblocks/i/icc.py @@ -20,7 +20,6 @@ ## import os - from distutils.version import LooseVersion from easybuild.easyblocks.i.intelbase import IntelBase diff --git a/easybuild/easyblocks/i/imkl.py b/easybuild/easyblocks/i/imkl.py index 825881f75f..82ccd073a3 100644 --- a/easybuild/easyblocks/i/imkl.py +++ b/easybuild/easyblocks/i/imkl.py @@ -22,13 +22,11 @@ import os import shutil import tempfile - from distutils.version import LooseVersion from easybuild.easyblocks.i.intelbase import IntelBase from easybuild.tools.filetools import run_cmd from easybuild.tools.modules import Modules - import easybuild.tools.environment as env class Imkl(IntelBase): diff --git a/easybuild/easyblocks/i/impi.py b/easybuild/easyblocks/i/impi.py index 91c9d9e7f7..dce79f702c 100644 --- a/easybuild/easyblocks/i/impi.py +++ b/easybuild/easyblocks/i/impi.py @@ -20,7 +20,6 @@ ## import os - from distutils.version import LooseVersion from easybuild.easyblocks.i.intelbase import IntelBase diff --git a/easybuild/easyblocks/i/intelbase.py b/easybuild/easyblocks/i/intelbase.py index 70c03ce5ef..a3ac5816b3 100644 --- a/easybuild/easyblocks/i/intelbase.py +++ b/easybuild/easyblocks/i/intelbase.py @@ -20,6 +20,7 @@ ## import os import shutil + from easybuild.framework.application import Application from easybuild.tools.filetools import run_cmd import easybuild.tools.environment as env diff --git a/easybuild/easyblocks/l/lapack.py b/easybuild/easyblocks/l/lapack.py index b45829b92a..58438f9e30 100644 --- a/easybuild/easyblocks/l/lapack.py +++ b/easybuild/easyblocks/l/lapack.py @@ -21,6 +21,7 @@ import glob import os import shutil + from easybuild.framework.application import Application from easybuild.tools.filetools import run_cmd diff --git a/easybuild/easyblocks/l/libsmm.py b/easybuild/easyblocks/l/libsmm.py index c63d361a9a..a699610263 100644 --- a/easybuild/easyblocks/l/libsmm.py +++ b/easybuild/easyblocks/l/libsmm.py @@ -21,7 +21,8 @@ import os import shutil from distutils.version import LooseVersion -import easybuild + +import easybuild # required for VERBOSE_VERSION from easybuild.framework.application import Application from easybuild.tools.filetools import run_cmd from easybuild.tools.modules import get_software_root diff --git a/easybuild/easyblocks/m/maple.py b/easybuild/easyblocks/m/maple.py index 04ca5ef020..fdb586cae6 100644 --- a/easybuild/easyblocks/m/maple.py +++ b/easybuild/easyblocks/m/maple.py @@ -20,6 +20,7 @@ ## import os import shutil + from easybuild.framework.application import Application from easybuild.tools.filetools import run_cmd_qa diff --git a/easybuild/easyblocks/m/mrbayes.py b/easybuild/easyblocks/m/mrbayes.py index 8181ad8dd9..40f64ce821 100644 --- a/easybuild/easyblocks/m/mrbayes.py +++ b/easybuild/easyblocks/m/mrbayes.py @@ -22,6 +22,7 @@ import os import shutil from distutils.version import LooseVersion + from easybuild.framework.application import Application from easybuild.tools.filetools import run_cmd diff --git a/easybuild/easyblocks/m/mvapich2.py b/easybuild/easyblocks/m/mvapich2.py index 6d08799024..d2d976bc5c 100644 --- a/easybuild/easyblocks/m/mvapich2.py +++ b/easybuild/easyblocks/m/mvapich2.py @@ -19,6 +19,7 @@ # along with EasyBuild. If not, see . ## import os + from easybuild.framework.application import Application import easybuild.tools.environment as env diff --git a/easybuild/easyblocks/n/ncl.py b/easybuild/easyblocks/n/ncl.py index 153d418d58..c4030e960a 100644 --- a/easybuild/easyblocks/n/ncl.py +++ b/easybuild/easyblocks/n/ncl.py @@ -23,6 +23,7 @@ import os import re import sys + from easybuild.framework.application import Application from easybuild.tools.filetools import run_cmd from easybuild.tools.modules import get_software_root diff --git a/easybuild/easyblocks/n/netcdf.py b/easybuild/easyblocks/n/netcdf.py index 63b30cfede..f7b515e256 100644 --- a/easybuild/easyblocks/n/netcdf.py +++ b/easybuild/easyblocks/n/netcdf.py @@ -20,6 +20,7 @@ ## import os from distutils.version import LooseVersion + from easybuild.framework.application import Application import easybuild.tools.environment as env import easybuild.tools.toolkit as toolkit diff --git a/easybuild/easyblocks/n/netcdf_fortran.py b/easybuild/easyblocks/n/netcdf_fortran.py index a1e9c8a4f3..057ee3139d 100644 --- a/easybuild/easyblocks/n/netcdf_fortran.py +++ b/easybuild/easyblocks/n/netcdf_fortran.py @@ -19,6 +19,7 @@ # along with EasyBuild. If not, see . ## import os + from easybuild.framework.application import Application import easybuild.tools.environment as env import easybuild.tools.toolkit as toolkit diff --git a/easybuild/easyblocks/p/python.py b/easybuild/easyblocks/p/python.py index 9eda703000..3a8c78895a 100644 --- a/easybuild/easyblocks/p/python.py +++ b/easybuild/easyblocks/p/python.py @@ -20,6 +20,7 @@ ## import os import shutil + from easybuild.framework.application import ApplicationPackage, Application from easybuild.tools.filetools import unpack, patch, run_cmd import easybuild.tools.toolkit as toolkit diff --git a/easybuild/easyblocks/s/scalapack.py b/easybuild/easyblocks/s/scalapack.py index 248db50eba..c6267ac9ef 100644 --- a/easybuild/easyblocks/s/scalapack.py +++ b/easybuild/easyblocks/s/scalapack.py @@ -21,6 +21,7 @@ import os import shutil from distutils.version import LooseVersion + from easybuild.framework.application import Application from easybuild.easyblocks.b.blacs import det_interface from easybuild.easyblocks.l.lapack import get_blas_lib diff --git a/easybuild/easyblocks/t/tarball.py b/easybuild/easyblocks/t/tarball.py index 6388ab0011..7bf5a5cfbe 100644 --- a/easybuild/easyblocks/t/tarball.py +++ b/easybuild/easyblocks/t/tarball.py @@ -19,6 +19,7 @@ # along with EasyBuild. If not, see . ## import shutil + from easybuild.framework.application import Application class Tarball(Application): diff --git a/easybuild/easyblocks/t/tbb.py b/easybuild/easyblocks/t/tbb.py index 891f1f1002..48c0c92e87 100644 --- a/easybuild/easyblocks/t/tbb.py +++ b/easybuild/easyblocks/t/tbb.py @@ -22,6 +22,7 @@ import os import shutil import glob + from easybuild.easyblocks.i.intelbase import IntelBase class Tbb(IntelBase): @@ -38,7 +39,7 @@ def make_install(self): libglob = 'tbb/libs/intel64/cc*libc*_kernel*' libs = glob.glob(libglob) if len(libs): - libdir = libs[-1] # take the last one, should be ordered by cc version. + libdir = libs[-1] # take the last one, should be ordered by cc version. else: self.log.error("No libs found using %s in %s" % (libglob, self.installdir)) self.libdir = libdir @@ -67,7 +68,6 @@ def make_module_extra(self): """Add correct path to lib to LD_LIBRARY_PATH. and intel license file""" txt = IntelBase.make_module_extra(self) - # since we have symlinked it we could also use $SOFTROOTTBB/tbb/lib here txt += "prepend-path\t%s\t\t%s\n" % ('LD_LIBRARY_PATH', self.libpath) return txt diff --git a/easybuild/easyblocks/w/wps.py b/easybuild/easyblocks/w/wps.py index 8eba699d34..dbeb9e6a15 100644 --- a/easybuild/easyblocks/w/wps.py +++ b/easybuild/easyblocks/w/wps.py @@ -25,6 +25,7 @@ import shutil import sys import tempfile + from easybuild.framework.application import Application from easybuild.tools.filetools import patch_perl_script_autoflush, run_cmd, run_cmd_qa, unpack from easybuild.easyblocks.n.netcdf import set_netcdf_env_vars, get_netcdf_module_set_cmds diff --git a/easybuild/easyblocks/w/wrf.py b/easybuild/easyblocks/w/wrf.py index 6eaa5f6da3..4a4ac84e07 100644 --- a/easybuild/easyblocks/w/wrf.py +++ b/easybuild/easyblocks/w/wrf.py @@ -22,6 +22,7 @@ import os import re import sys + from easybuild.framework.application import Application from easybuild.tools.filetools import patch_perl_script_autoflush, run_cmd, run_cmd_qa from easybuild.easyblocks.n.netcdf import set_netcdf_env_vars, get_netcdf_module_set_cmds From 5eaf2eb8ccd95e01f143d111df111359d14e9df4 Mon Sep 17 00:00:00 2001 From: Kenneth Hoste Date: Fri, 3 Aug 2012 07:09:55 +0200 Subject: [PATCH 292/798] process remarks made on pull request --- easybuild/easyblocks/p/pasha.py | 13 +++++----- easybuild/easyblocks/t/tbb.py | 6 ++--- .../Pasha/Pasha-1.0.3-goalf-1.1.0-no-OFED.eb | 24 ++++++++--------- .../p/Pasha/Pasha-1.0.3-ictce-4.0.6.eb | 26 +++++++++---------- 4 files changed, 35 insertions(+), 34 deletions(-) diff --git a/easybuild/easyblocks/p/pasha.py b/easybuild/easyblocks/p/pasha.py index 875109e5b4..2800f389ae 100644 --- a/easybuild/easyblocks/p/pasha.py +++ b/easybuild/easyblocks/p/pasha.py @@ -27,9 +27,7 @@ from easybuild.framework.application import Application class Pasha(Application): - """ - Support for building and installing Pasha" - """ + """Support for building and installing Pasha""" def configure(self): """Configure Pasha by setting make options.""" @@ -38,8 +36,9 @@ def configure(self): if not tbb: self.log.error("TBB module not loaded.") - self.updatecfg('makeopts', "TBB_DIR=%s/tbb MPI_CXX=$MPICXX OPM_FLAG=%s" % (tbb, self.tk.get_openmp_flag())) - self.updatecfg('makeopts', "MPI_DIR='' MPI_INC='' MPI_LIB='' MY_CXX=$CXX MPICH_IGNORE_CXX_SEEK=1") + self.updatecfg('makeopts', "TBB_DIR=%s/tbb MPI_DIR='' MPI_INC=''") + self.updatecfg('makeopts', "MPI_CXX=$MPICXX OPM_FLAG=%s" % (tbb, self.tk.get_openmp_flag())) + self.updatecfg('makeopts', "MPI_LIB='' MY_CXX=$CXX MPICH_IGNORE_CXX_SEEK=1") def make_install(self): """Install by copying everything from 'bin' subdir in build dir to install dir""" @@ -50,7 +49,9 @@ def make_install(self): def sanitycheck(self): """Custom sanity check for Pasha""" self.setcfg('sanityCheckPaths', { - 'files':["bin/pasha-%s" % x for x in ["kmergen", "pregraph", "graph"]], + 'files':["bin/pasha-%s" % x for x in ["kmergen", + "pregraph", + "graph"]], 'dirs':[""], }) diff --git a/easybuild/easyblocks/t/tbb.py b/easybuild/easyblocks/t/tbb.py index 48c0c92e87..28bdfa5f8f 100644 --- a/easybuild/easyblocks/t/tbb.py +++ b/easybuild/easyblocks/t/tbb.py @@ -48,9 +48,9 @@ def make_install(self): self.libpath = "%s/tbb/libs/intel64/%s/" % (self.installdir, libdir) # applications go looking into tbb/lib so we move what's in there to libs # and symlink the right lib from /tbb/libs/intel64/... to lib - installibpath = os.path.join(self.installdir, 'tbb', 'lib') - shutil.move(installibpath, os.path.join(self.installdir, 'tbb', 'libs')) - os.symlink(self.libpath, installibpath) + install_libpath = os.path.join(self.installdir, 'tbb', 'lib') + shutil.move(install_libpath, os.path.join(self.installdir, 'tbb', 'libs')) + os.symlink(self.libpath, install_libpath) def sanitycheck(self): diff --git a/easybuild/easyconfigs/p/Pasha/Pasha-1.0.3-goalf-1.1.0-no-OFED.eb b/easybuild/easyconfigs/p/Pasha/Pasha-1.0.3-goalf-1.1.0-no-OFED.eb index e54ae6a9d5..25f90bf065 100644 --- a/easybuild/easyconfigs/p/Pasha/Pasha-1.0.3-goalf-1.1.0-no-OFED.eb +++ b/easybuild/easyconfigs/p/Pasha/Pasha-1.0.3-goalf-1.1.0-no-OFED.eb @@ -1,18 +1,18 @@ -name='Pasha' -version='1.0.3' +name = 'Pasha' +version = '1.0.3' -homepage='http://pasha.sourceforge.net/' -description="PASHA is a parallel short read assembler for large genomes using de Bruijn graphs." +homepage = 'http://pasha.sourceforge.net/' +description = "PASHA is a parallel short read assembler for large genomes using de Bruijn graphs." -toolkit={'name':'goalf','version':'1.1.0-no-OFED'} -toolkitopts={'pic':True,'opt':True,'optarch':True} +toolkit = {'name':'goalf', 'version':'1.1.0-no-OFED'} +toolkitopts = {'pic':True, 'opt':True, 'optarch':True} -dependencies=[('tbb','4.0.5.339','',True)] +dependencies = [('tbb', '4.0.5.339', '', True)] -sourceURLs=['http://downloads.sourceforge.net/pasha'] -sources=['%s-%s.tar.gz' % (name, version)] +sourceURLs = ['http://downloads.sourceforge.net/pasha'] +sources = ['%s-%s.tar.gz' % (name, version)] -patches=['gcc-hash_fun-map-set.patch'] +patches = ['gcc-hash_fun-map-set.patch'] -# Pasha's makefile is not suited for parallel execution. -parallel=1 +# Pasha's makefile is not suited for parallel execution +parallel = 1 diff --git a/easybuild/easyconfigs/p/Pasha/Pasha-1.0.3-ictce-4.0.6.eb b/easybuild/easyconfigs/p/Pasha/Pasha-1.0.3-ictce-4.0.6.eb index 07fb4c27e9..d417442d44 100644 --- a/easybuild/easyconfigs/p/Pasha/Pasha-1.0.3-ictce-4.0.6.eb +++ b/easybuild/easyconfigs/p/Pasha/Pasha-1.0.3-ictce-4.0.6.eb @@ -1,18 +1,18 @@ -name='Pasha' -version='1.0.3' +name = 'Pasha' +version = '1.0.3' -homepage='http://pasha.sourceforge.net/' -description="PASHA is a parallel short read assembler for large genomes using de Bruijn graphs." +homepage = 'http://pasha.sourceforge.net/' +description = "PASHA is a parallel short read assembler for large genomes using de Bruijn graphs." -toolkit={'name':'ictce','version':'4.0.6'} -toolkitopts={'pic':True,'opt':True,'optarch':True} +toolkit = {'name':'ictce', 'version':'4.0.6'} +toolkitopts = {'pic':True, 'opt':True, 'optarch':True} -dependencies=[('tbb','4.0.5.339','',True)] +dependencies = [('tbb', '4.0.5.339', '', True)] -sourceURLs=['http://downloads.sourceforge.net/pasha'] -sources=['%s-%s.tar.gz' % (name, version)] +sourceURLs = ['http://downloads.sourceforge.net/pasha'] +sources = ['%s-%s.tar.gz' % (name, version)] -patches=['intelmpi.patch'] - -# Pasha's makefile is not suited for parallel execution. -parallel=1 +patches = ['intelmpi.patch'] + +# Pasha's makefile is not suited for parallel execution +parallel = 1 From 27aefbc3f434cb1bd5e0523587c797272afebc39 Mon Sep 17 00:00:00 2001 From: Kenneth Hoste Date: Fri, 3 Aug 2012 09:47:22 +0200 Subject: [PATCH 293/798] processed remarks w.r.t. import order and module docstrings --- easybuild/easyblocks/a/atlas.py | 4 ++++ easybuild/easyblocks/b/binary.py | 3 ++- easybuild/easyblocks/b/blacs.py | 4 ++++ easybuild/easyblocks/c/cp2k.py | 4 ++++ easybuild/easyblocks/d/doxygen.py | 4 ++++ easybuild/easyblocks/f/fsl.py | 4 ++++ easybuild/easyblocks/g/g2clib.py | 4 ++++ easybuild/easyblocks/g/g2lib.py | 4 ++++ easybuild/easyblocks/g/gcc.py | 4 ++++ easybuild/easyblocks/h/hdf5.py | 4 ++++ easybuild/easyblocks/h/hpl.py | 4 ++++ easybuild/easyblocks/i/icc.py | 3 +++ easybuild/easyblocks/i/ifort.py | 3 +++ easybuild/easyblocks/i/imkl.py | 6 +++++- easybuild/easyblocks/i/impi.py | 3 +++ easybuild/easyblocks/i/intelbase.py | 6 +++++- easybuild/easyblocks/i/ipp.py | 3 +++ easybuild/easyblocks/i/itac.py | 3 +++ easybuild/easyblocks/l/lapack.py | 4 ++++ easybuild/easyblocks/l/libsmm.py | 4 ++++ easybuild/easyblocks/m/maple.py | 4 ++++ easybuild/easyblocks/m/mrbayes.py | 4 ++++ easybuild/easyblocks/m/mvapich2.py | 6 +++++- easybuild/easyblocks/n/ncl.py | 4 ++++ easybuild/easyblocks/n/netcdf.py | 6 +++++- easybuild/easyblocks/n/netcdf_fortran.py | 6 +++++- easybuild/easyblocks/p/pasha.py | 2 +- easybuild/easyblocks/p/python.py | 4 ++++ easybuild/easyblocks/s/scalapack.py | 4 ++++ easybuild/easyblocks/t/tarball.py | 5 +++++ easybuild/easyblocks/t/tbb.py | 7 ++++--- easybuild/easyblocks/t/toolkit.py | 4 ++++ easybuild/easyblocks/w/wps.py | 10 +++++++--- easybuild/easyblocks/w/wrf.py | 8 ++++++-- 34 files changed, 137 insertions(+), 15 deletions(-) diff --git a/easybuild/easyblocks/a/atlas.py b/easybuild/easyblocks/a/atlas.py index c2c8fa4046..ffebc8705b 100644 --- a/easybuild/easyblocks/a/atlas.py +++ b/easybuild/easyblocks/a/atlas.py @@ -18,6 +18,10 @@ # You should have received a copy of the GNU General Public License # along with EasyBuild. If not, see . ## +""" +EasyBuild support for building and installing ATLAS, implemented as an easyblock +""" + import re import os diff --git a/easybuild/easyblocks/b/binary.py b/easybuild/easyblocks/b/binary.py index 85a5eea026..61bb0e9c2e 100644 --- a/easybuild/easyblocks/b/binary.py +++ b/easybuild/easyblocks/b/binary.py @@ -19,8 +19,9 @@ # along with EasyBuild. If not, see . ## """ -EasyBlock for binary applications +General EasyBuild support for software with a binary installer """ + import shutil from easybuild.framework.application import Application diff --git a/easybuild/easyblocks/b/blacs.py b/easybuild/easyblocks/b/blacs.py index 96b0cf2403..558951912d 100644 --- a/easybuild/easyblocks/b/blacs.py +++ b/easybuild/easyblocks/b/blacs.py @@ -18,6 +18,10 @@ # You should have received a copy of the GNU General Public License # along with EasyBuild. If not, see . ## +""" +EasyBuild support for building and installing BLACS, implemented as an easyblock +""" + import glob import re import os diff --git a/easybuild/easyblocks/c/cp2k.py b/easybuild/easyblocks/c/cp2k.py index 19f7605aba..f67f456e6d 100644 --- a/easybuild/easyblocks/c/cp2k.py +++ b/easybuild/easyblocks/c/cp2k.py @@ -18,6 +18,10 @@ # You should have received a copy of the GNU General Public License # along with EasyBuild. If not, see . ## +""" +EasyBuild support for building and installing CP2K, implemented as an easyblock +""" + from distutils.version import LooseVersion import fileinput import glob diff --git a/easybuild/easyblocks/d/doxygen.py b/easybuild/easyblocks/d/doxygen.py index f80d464a78..c2996e34f6 100644 --- a/easybuild/easyblocks/d/doxygen.py +++ b/easybuild/easyblocks/d/doxygen.py @@ -18,6 +18,10 @@ # You should have received a copy of the GNU General Public License # along with EasyBuild. If not, see . ## +""" +EasyBuild support for building and installing Doxygen, implemented as an easyblock +""" + from easybuild.framework.application import Application from easybuild.tools.filetools import run_cmd diff --git a/easybuild/easyblocks/f/fsl.py b/easybuild/easyblocks/f/fsl.py index 1179f02cc5..935a07e023 100644 --- a/easybuild/easyblocks/f/fsl.py +++ b/easybuild/easyblocks/f/fsl.py @@ -18,6 +18,10 @@ # You should have received a copy of the GNU General Public License # along with EasyBuild. If not, see . ## +""" +EasyBuild support for building and installing FSL, implemented as an easyblock +""" + import difflib import os import shutil diff --git a/easybuild/easyblocks/g/g2clib.py b/easybuild/easyblocks/g/g2clib.py index 597197b490..449d9ab98a 100644 --- a/easybuild/easyblocks/g/g2clib.py +++ b/easybuild/easyblocks/g/g2clib.py @@ -18,6 +18,10 @@ # You should have received a copy of the GNU General Public License # along with EasyBuild. If not, see . ## +""" +EasyBuild support for building and installing g2clib, implemented as an easyblock +""" + import glob import os import shutil diff --git a/easybuild/easyblocks/g/g2lib.py b/easybuild/easyblocks/g/g2lib.py index edf63dfc38..f3bf1affc8 100644 --- a/easybuild/easyblocks/g/g2lib.py +++ b/easybuild/easyblocks/g/g2lib.py @@ -18,6 +18,10 @@ # You should have received a copy of the GNU General Public License # along with EasyBuild. If not, see . ## +""" +EasyBuild support for building and installing g2lib, implemented as an easyblock +""" + import os import shutil diff --git a/easybuild/easyblocks/g/gcc.py b/easybuild/easyblocks/g/gcc.py index fb73bc6c7f..d42e4c7649 100644 --- a/easybuild/easyblocks/g/gcc.py +++ b/easybuild/easyblocks/g/gcc.py @@ -18,6 +18,10 @@ # You should have received a copy of the GNU General Public License # along with EasyBuild. If not, see . ## +""" +EasyBuild support for building and installing GCC, implemented as an easyblock +""" + import re import os import shutil diff --git a/easybuild/easyblocks/h/hdf5.py b/easybuild/easyblocks/h/hdf5.py index 47754e67bb..72e9097da2 100644 --- a/easybuild/easyblocks/h/hdf5.py +++ b/easybuild/easyblocks/h/hdf5.py @@ -18,6 +18,10 @@ # You should have received a copy of the GNU General Public License # along with EasyBuild. If not, see . ## +""" +EasyBuild support for building and installing HDF5, implemented as an easyblock +""" + import os from easybuild.framework.application import Application diff --git a/easybuild/easyblocks/h/hpl.py b/easybuild/easyblocks/h/hpl.py index 0c65b88edb..60833c0073 100644 --- a/easybuild/easyblocks/h/hpl.py +++ b/easybuild/easyblocks/h/hpl.py @@ -18,6 +18,10 @@ # You should have received a copy of the GNU General Public License # along with EasyBuild. If not, see . ## +""" +EasyBuild support for building and installing HPL, implemented as an easyblock +""" + import os import shutil diff --git a/easybuild/easyblocks/i/icc.py b/easybuild/easyblocks/i/icc.py index 897ef37722..1407357809 100644 --- a/easybuild/easyblocks/i/icc.py +++ b/easybuild/easyblocks/i/icc.py @@ -18,6 +18,9 @@ # You should have received a copy of the GNU General Public License # along with EasyBuild. If not, see . ## +""" +EasyBuild support for install the Intel C/C++ compiler suite, implemented as an easyblock +""" import os from distutils.version import LooseVersion diff --git a/easybuild/easyblocks/i/ifort.py b/easybuild/easyblocks/i/ifort.py index 084cc38808..d7d7ec0200 100644 --- a/easybuild/easyblocks/i/ifort.py +++ b/easybuild/easyblocks/i/ifort.py @@ -18,6 +18,9 @@ # You should have received a copy of the GNU General Public License # along with EasyBuild. If not, see . ## +""" +EasyBuild support for installing the Intel Fortran compiler suite, implemented as an easyblock +""" from distutils.version import LooseVersion diff --git a/easybuild/easyblocks/i/imkl.py b/easybuild/easyblocks/i/imkl.py index 82ccd073a3..3bc5f40c65 100644 --- a/easybuild/easyblocks/i/imkl.py +++ b/easybuild/easyblocks/i/imkl.py @@ -18,16 +18,20 @@ # You should have received a copy of the GNU General Public License # along with EasyBuild. If not, see . ## +""" +EasyBuild support for installing the Intel Math Kernel Library (MKL), implemented as an easyblock +""" import os import shutil import tempfile from distutils.version import LooseVersion +import easybuild.tools.environment as env from easybuild.easyblocks.i.intelbase import IntelBase from easybuild.tools.filetools import run_cmd from easybuild.tools.modules import Modules -import easybuild.tools.environment as env + class Imkl(IntelBase): """ diff --git a/easybuild/easyblocks/i/impi.py b/easybuild/easyblocks/i/impi.py index dce79f702c..c0bc02071f 100644 --- a/easybuild/easyblocks/i/impi.py +++ b/easybuild/easyblocks/i/impi.py @@ -18,6 +18,9 @@ # You should have received a copy of the GNU General Public License # along with EasyBuild. If not, see . ## +""" +EasyBuild support for installing the Intel MPI library, implemented as an easyblock +""" import os from distutils.version import LooseVersion diff --git a/easybuild/easyblocks/i/intelbase.py b/easybuild/easyblocks/i/intelbase.py index a3ac5816b3..175c73cae2 100644 --- a/easybuild/easyblocks/i/intelbase.py +++ b/easybuild/easyblocks/i/intelbase.py @@ -18,12 +18,16 @@ # You should have received a copy of the GNU General Public License # along with EasyBuild. If not, see . ## +""" +Generic EasyBuild support for installing Intel tools, implemented as an easyblock +""" + import os import shutil +import easybuild.tools.environment as env from easybuild.framework.application import Application from easybuild.tools.filetools import run_cmd -import easybuild.tools.environment as env class IntelBase(Application): """ diff --git a/easybuild/easyblocks/i/ipp.py b/easybuild/easyblocks/i/ipp.py index a03add7e35..d277c67b93 100644 --- a/easybuild/easyblocks/i/ipp.py +++ b/easybuild/easyblocks/i/ipp.py @@ -18,6 +18,9 @@ # You should have received a copy of the GNU General Public License # along with EasyBuild. If not, see . ## +""" +EasyBuild support for installing the Intel Performance Primitives (IPP) library, implemented as an easyblock +""" from easybuild.easyblocks.i.intelbase import IntelBase diff --git a/easybuild/easyblocks/i/itac.py b/easybuild/easyblocks/i/itac.py index 5ff79eb461..aa35f6fa57 100644 --- a/easybuild/easyblocks/i/itac.py +++ b/easybuild/easyblocks/i/itac.py @@ -18,6 +18,9 @@ # You should have received a copy of the GNU General Public License # along with EasyBuild. If not, see . ## +""" +EasyBuild support for installing the Intel Trace Analyzer and Collector (ITAC), implemented as an easyblock +""" import os diff --git a/easybuild/easyblocks/l/lapack.py b/easybuild/easyblocks/l/lapack.py index 58438f9e30..718f1703cb 100644 --- a/easybuild/easyblocks/l/lapack.py +++ b/easybuild/easyblocks/l/lapack.py @@ -18,6 +18,10 @@ # You should have received a copy of the GNU General Public License # along with EasyBuild. If not, see . ## +""" +EasyBuild support for building and installing LAPACK, implemented as an easyblock +""" + import glob import os import shutil diff --git a/easybuild/easyblocks/l/libsmm.py b/easybuild/easyblocks/l/libsmm.py index a699610263..aa5e1ab2ef 100644 --- a/easybuild/easyblocks/l/libsmm.py +++ b/easybuild/easyblocks/l/libsmm.py @@ -18,6 +18,10 @@ # You should have received a copy of the GNU General Public License # along with EasyBuild. If not, see . ## +""" +EasyBuild support for building and installing the libsmm library, implemented as an easyblock +""" + import os import shutil from distutils.version import LooseVersion diff --git a/easybuild/easyblocks/m/maple.py b/easybuild/easyblocks/m/maple.py index fdb586cae6..b60a43ae08 100644 --- a/easybuild/easyblocks/m/maple.py +++ b/easybuild/easyblocks/m/maple.py @@ -18,6 +18,10 @@ # You should have received a copy of the GNU General Public License # along with EasyBuild. If not, see . ## +""" +EasyBuild support for installing Maple, implemented as an easyblock +""" + import os import shutil diff --git a/easybuild/easyblocks/m/mrbayes.py b/easybuild/easyblocks/m/mrbayes.py index 40f64ce821..3fba903a9f 100644 --- a/easybuild/easyblocks/m/mrbayes.py +++ b/easybuild/easyblocks/m/mrbayes.py @@ -19,6 +19,10 @@ # You should have received a copy of the GNU General Public License # along with EasyBuild. If not, see . ## +""" +EasyBuild support for building and installing MrBayes, implemented as an easyblock +""" + import os import shutil from distutils.version import LooseVersion diff --git a/easybuild/easyblocks/m/mvapich2.py b/easybuild/easyblocks/m/mvapich2.py index d2d976bc5c..078276a176 100644 --- a/easybuild/easyblocks/m/mvapich2.py +++ b/easybuild/easyblocks/m/mvapich2.py @@ -18,10 +18,14 @@ # You should have received a copy of the GNU General Public License # along with EasyBuild. If not, see . ## +""" +EasyBuild support for building and installing the MVAPICH2 MPI library, implemented as an easyblock +""" + import os -from easybuild.framework.application import Application import easybuild.tools.environment as env +from easybuild.framework.application import Application class MVAPICH2(Application): """ diff --git a/easybuild/easyblocks/n/ncl.py b/easybuild/easyblocks/n/ncl.py index c4030e960a..b5e32ba73f 100644 --- a/easybuild/easyblocks/n/ncl.py +++ b/easybuild/easyblocks/n/ncl.py @@ -18,6 +18,10 @@ # You should have received a copy of the GNU General Public License # along with EasyBuild. If not, see . ## +""" +EasyBuild support for building and installing NCL, implemented as an easyblock +""" + from distutils.version import LooseVersion import fileinput import os diff --git a/easybuild/easyblocks/n/netcdf.py b/easybuild/easyblocks/n/netcdf.py index f7b515e256..16cdc07a50 100644 --- a/easybuild/easyblocks/n/netcdf.py +++ b/easybuild/easyblocks/n/netcdf.py @@ -18,12 +18,16 @@ # You should have received a copy of the GNU General Public License # along with EasyBuild. If not, see . ## +""" +EasyBuild support for building and installing netCDF, implemented as an easyblock +""" + import os from distutils.version import LooseVersion -from easybuild.framework.application import Application import easybuild.tools.environment as env import easybuild.tools.toolkit as toolkit +from easybuild.framework.application import Application class NetCDF(Application): """Support for building/installing netCDF""" diff --git a/easybuild/easyblocks/n/netcdf_fortran.py b/easybuild/easyblocks/n/netcdf_fortran.py index 057ee3139d..84a4cc9216 100644 --- a/easybuild/easyblocks/n/netcdf_fortran.py +++ b/easybuild/easyblocks/n/netcdf_fortran.py @@ -18,11 +18,15 @@ # You should have received a copy of the GNU General Public License # along with EasyBuild. If not, see . ## +""" +EasyBuild support for building and installing netCDF-Fortran, implemented as an easyblock +""" + import os -from easybuild.framework.application import Application import easybuild.tools.environment as env import easybuild.tools.toolkit as toolkit +from easybuild.framework.application import Application class NetCDF_Fortran(Application): """Support for building/installing the netCDF-Fortran library""" diff --git a/easybuild/easyblocks/p/pasha.py b/easybuild/easyblocks/p/pasha.py index 2800f389ae..50d231025f 100644 --- a/easybuild/easyblocks/p/pasha.py +++ b/easybuild/easyblocks/p/pasha.py @@ -19,7 +19,7 @@ # along with EasyBuild. If not, see . ## """ -EasyBuild support for Pasha, implemented as an easyblock +EasyBuild support for building and installing Pasha, implemented as an easyblock """ import shutil diff --git a/easybuild/easyblocks/p/python.py b/easybuild/easyblocks/p/python.py index 3a8c78895a..bfbae56c50 100644 --- a/easybuild/easyblocks/p/python.py +++ b/easybuild/easyblocks/p/python.py @@ -18,6 +18,10 @@ # You should have received a copy of the GNU General Public License # along with EasyBuild. If not, see . ## +""" +EasyBuild support for building and installing Python, implemented as an easyblock +""" + import os import shutil diff --git a/easybuild/easyblocks/s/scalapack.py b/easybuild/easyblocks/s/scalapack.py index c6267ac9ef..90917f348d 100644 --- a/easybuild/easyblocks/s/scalapack.py +++ b/easybuild/easyblocks/s/scalapack.py @@ -18,6 +18,10 @@ # You should have received a copy of the GNU General Public License # along with EasyBuild. If not, see . ## +""" +EasyBuild support for building and installing ScaLAPACK, implemented as an easyblock +""" + import os import shutil from distutils.version import LooseVersion diff --git a/easybuild/easyblocks/t/tarball.py b/easybuild/easyblocks/t/tarball.py index 7bf5a5cfbe..91c2e2a19a 100644 --- a/easybuild/easyblocks/t/tarball.py +++ b/easybuild/easyblocks/t/tarball.py @@ -18,6 +18,11 @@ # You should have received a copy of the GNU General Public License # along with EasyBuild. If not, see . ## +""" +EasyBuild support for installing (precompiled) software packages which are packaged as a tarball, +implemented as an easyblock +""" + import shutil from easybuild.framework.application import Application diff --git a/easybuild/easyblocks/t/tbb.py b/easybuild/easyblocks/t/tbb.py index 28bdfa5f8f..4bdfb24b5c 100644 --- a/easybuild/easyblocks/t/tbb.py +++ b/easybuild/easyblocks/t/tbb.py @@ -18,6 +18,9 @@ # You should have received a copy of the GNU General Public License # along with EasyBuild. If not, see . ## +""" +EasyBuild support for installing the Intel Threading Building Blocks (TBB) library, implemented as an easyblock +""" import os import shutil @@ -26,9 +29,7 @@ from easybuild.easyblocks.i.intelbase import IntelBase class Tbb(IntelBase): - """ - EasyBlock for tbb, threading building blocks - """ + """EasyBlock for tbb, threading building blocks""" def make_install(self): """overwrite make_install to add extra symlinks""" diff --git a/easybuild/easyblocks/t/toolkit.py b/easybuild/easyblocks/t/toolkit.py index da69f49aa8..d3671dfcc5 100644 --- a/easybuild/easyblocks/t/toolkit.py +++ b/easybuild/easyblocks/t/toolkit.py @@ -18,6 +18,10 @@ # You should have received a copy of the GNU General Public License # along with EasyBuild. If not, see . ## +""" +EasyBuild support for installing compiler toolkits, implemented as an easyblock +""" + from easybuild.framework.application import Application class Toolkit(Application): diff --git a/easybuild/easyblocks/w/wps.py b/easybuild/easyblocks/w/wps.py index dbeb9e6a15..c608a631d1 100644 --- a/easybuild/easyblocks/w/wps.py +++ b/easybuild/easyblocks/w/wps.py @@ -18,19 +18,23 @@ # You should have received a copy of the GNU General Public License # along with EasyBuild. If not, see . ## -from distutils.version import LooseVersion +""" +EasyBuild support for building and installing WPS, implemented as an easyblock +""" + import fileinput import os import re import shutil import sys import tempfile +from distutils.version import LooseVersion +import easybuild.tools.environment as env +import easybuild.tools.toolkit as toolkit from easybuild.framework.application import Application from easybuild.tools.filetools import patch_perl_script_autoflush, run_cmd, run_cmd_qa, unpack from easybuild.easyblocks.n.netcdf import set_netcdf_env_vars, get_netcdf_module_set_cmds -import easybuild.tools.environment as env -import easybuild.tools.toolkit as toolkit class WPS(Application): """Support for building/installing WPS.""" diff --git a/easybuild/easyblocks/w/wrf.py b/easybuild/easyblocks/w/wrf.py index 4a4ac84e07..6309446f55 100644 --- a/easybuild/easyblocks/w/wrf.py +++ b/easybuild/easyblocks/w/wrf.py @@ -18,16 +18,20 @@ # You should have received a copy of the GNU General Public License # along with EasyBuild. If not, see . ## +""" +EasyBuild support for building and installing WRF, implemented as an easyblock +""" + import fileinput import os import re import sys +import easybuild.tools.environment as env +import easybuild.tools.toolkit as toolkit from easybuild.framework.application import Application from easybuild.tools.filetools import patch_perl_script_autoflush, run_cmd, run_cmd_qa from easybuild.easyblocks.n.netcdf import set_netcdf_env_vars, get_netcdf_module_set_cmds -import easybuild.tools.environment as env -import easybuild.tools.toolkit as toolkit class WRF(Application): """Support for building/installing WRF.""" From b7d007cea088e072a86dc2c27bc5af71ed4bae8a Mon Sep 17 00:00:00 2001 From: Toon Willems Date: Fri, 3 Aug 2012 11:08:17 +0200 Subject: [PATCH 294/798] add module docstring --- easybuild/tools/environment.py | 3 +++ 1 file changed, 3 insertions(+) diff --git a/easybuild/tools/environment.py b/easybuild/tools/environment.py index 8e0b7d4507..6c60fbe3f6 100644 --- a/easybuild/tools/environment.py +++ b/easybuild/tools/environment.py @@ -18,6 +18,9 @@ # You should have received a copy of the GNU General Public License # along with EasyBuild. If not, see . ## +""" +utility module for modifying os.environ +""" import os changes = {} From 1bff26b1fe7609bc4f5520914700ab420cc3120e Mon Sep 17 00:00:00 2001 From: Toon Willems Date: Fri, 3 Aug 2012 10:45:56 +0200 Subject: [PATCH 295/798] add os.putenv and os.environ check in prep_for_release --- easybuild/scripts/prep_for_release.py | 30 ++++++++++++++++++++++++--- 1 file changed, 27 insertions(+), 3 deletions(-) diff --git a/easybuild/scripts/prep_for_release.py b/easybuild/scripts/prep_for_release.py index 771dd5b8aa..b51265ad42 100755 --- a/easybuild/scripts/prep_for_release.py +++ b/easybuild/scripts/prep_for_release.py @@ -30,10 +30,11 @@ usage: prep_for_release.py """ -from distutils.version import LooseVersion +import glob import re import os import sys +from distutils.version import LooseVersion try: import git except ImportError, err: @@ -189,10 +190,32 @@ def check_clean_master_branch(home): print "Current branch is clean, great work!" return ok +# check wheter os.putenv or os.environ[]= is used inside easyblocks +def check_easyblocks_for_environment(home): + files = glob.glob(os.path.join(home, 'easybuild/easyblocks/[a-z]/*.py')) + eb_files = filter(lambda x: os.path.basename(x) != '__init__.py', files) + + os_environ = re.compile("os\.environ\[\w+\]\s*=\s*") + os_putenv = re.compile("os\.putenv") + + found = [] + for eb_file in eb_files: + f = open(eb_file, "r") + text = f.read() + f.close() + + if os_putenv.search(text) or os_environ.search(text): + found.append(eb_file) + + for faulty in found: + warning("found os.environ or os.putenv inside eb_file: %s" % faulty) -# + return len(found) == 0 + + +# # MAIN -# +# # determine EasyBuild home dir, assuming this script is in /easybuild/scripts easybuild_home = os.path.sep.join(os.path.abspath(sys.argv[0]).split(os.path.sep)[:-3]) @@ -224,6 +247,7 @@ def check_clean_master_branch(home): # check for clean master branch all_checks.append(check_clean_master_branch(easybuild_home)) +all_checks.append(check_easyblocks_for_environment(easybuild_home)) if not all(all_checks): error("One or multiple checks have failed, EasyBuild is not ready to be released!") From 8bf5bb64fa399697063ac51fe7303299beb261e2 Mon Sep 17 00:00:00 2001 From: Toon Willems Date: Fri, 3 Aug 2012 11:50:42 +0200 Subject: [PATCH 296/798] empty lines --- easybuild/scripts/prep_for_release.py | 2 ++ 1 file changed, 2 insertions(+) diff --git a/easybuild/scripts/prep_for_release.py b/easybuild/scripts/prep_for_release.py index b51265ad42..b03d0ab02d 100755 --- a/easybuild/scripts/prep_for_release.py +++ b/easybuild/scripts/prep_for_release.py @@ -1,6 +1,7 @@ #!/usr/bin/env python ## # Copyright 2009-2012 Stijn De Weirdt, Dries Verdegem, Kenneth Hoste, Pieter De Baets, Jens Timmerman +# Copyright 2012 Toon Willems # # This file is part of EasyBuild, # originally created by the HPC team of the University of Ghent (http://ugent.be/hpc). @@ -41,6 +42,7 @@ sys.stderr.write("Failed to import git Python module, which is required to run this script: %s\n" % err) sys.exit(1) + # error function (exits) def error(msg): """Error function: print message to stderr and exit with non-zero exit code.""" From e30c52b6b643c0f47ba28e2297914c0dff00b816 Mon Sep 17 00:00:00 2001 From: Toon Willems Date: Fri, 3 Aug 2012 11:54:21 +0200 Subject: [PATCH 297/798] more empty lines --- easybuild/scripts/prep_for_release.py | 2 ++ 1 file changed, 2 insertions(+) diff --git a/easybuild/scripts/prep_for_release.py b/easybuild/scripts/prep_for_release.py index b03d0ab02d..8330476c73 100755 --- a/easybuild/scripts/prep_for_release.py +++ b/easybuild/scripts/prep_for_release.py @@ -192,6 +192,8 @@ def check_clean_master_branch(home): print "Current branch is clean, great work!" return ok + + # check wheter os.putenv or os.environ[]= is used inside easyblocks def check_easyblocks_for_environment(home): files = glob.glob(os.path.join(home, 'easybuild/easyblocks/[a-z]/*.py')) From 31712f40267703f11b07a70653149431d33c99cf Mon Sep 17 00:00:00 2001 From: Kenneth Hoste Date: Fri, 3 Aug 2012 11:55:14 +0200 Subject: [PATCH 298/798] use two empty lines before start of module + other minor code cleanup --- easybuild/build.py | 20 ++++++++++---------- easybuild/easyblocks/a/atlas.py | 1 + easybuild/easyblocks/b/binary.py | 1 + easybuild/easyblocks/b/blacs.py | 2 ++ easybuild/easyblocks/c/cp2k.py | 1 + easybuild/easyblocks/d/doxygen.py | 1 + easybuild/easyblocks/f/fsl.py | 1 + easybuild/easyblocks/g/g2clib.py | 1 + easybuild/easyblocks/g/g2lib.py | 1 + easybuild/easyblocks/g/gcc.py | 1 + easybuild/easyblocks/h/hdf5.py | 1 + easybuild/easyblocks/h/hpl.py | 1 + easybuild/easyblocks/i/icc.py | 1 + easybuild/easyblocks/i/ifort.py | 1 + easybuild/easyblocks/i/impi.py | 1 + easybuild/easyblocks/i/intelbase.py | 1 + easybuild/easyblocks/i/ipp.py | 1 + easybuild/easyblocks/i/itac.py | 1 + easybuild/easyblocks/l/lapack.py | 2 ++ easybuild/easyblocks/l/libsmm.py | 1 + easybuild/easyblocks/m/maple.py | 1 + easybuild/easyblocks/m/mrbayes.py | 1 + easybuild/easyblocks/m/mvapich2.py | 1 + easybuild/easyblocks/n/ncl.py | 1 + easybuild/easyblocks/n/netcdf.py | 1 + easybuild/easyblocks/n/netcdf_fortran.py | 1 + easybuild/easyblocks/o/openfoam.py | 1 + easybuild/easyblocks/p/pasha.py | 1 + easybuild/easyblocks/p/python.py | 1 + easybuild/easyblocks/s/scalapack.py | 1 + easybuild/easyblocks/t/tarball.py | 1 + easybuild/easyblocks/t/tbb.py | 1 + easybuild/easyblocks/t/toolkit.py | 1 + easybuild/easyblocks/w/wps.py | 1 + easybuild/easyblocks/w/wrf.py | 1 + easybuild/easybuild_config.py | 6 +++++- easybuild/framework/application.py | 18 ++++++++++++------ easybuild/tools/asyncprocess.py | 10 +++++----- easybuild/tools/build_log.py | 7 +++++-- easybuild/tools/class_dumper.py | 1 + easybuild/tools/config.py | 2 ++ easybuild/tools/environment.py | 1 + easybuild/tools/filetools.py | 2 +- easybuild/tools/module_generator.py | 2 ++ easybuild/tools/modules.py | 1 + easybuild/tools/pbs_job.py | 15 ++++++++++----- easybuild/tools/repository.py | 19 ++++++++++++------- easybuild/tools/systemtools.py | 6 ++++-- easybuild/tools/toolkit.py | 4 +++- 49 files changed, 110 insertions(+), 40 deletions(-) diff --git a/easybuild/build.py b/easybuild/build.py index f790785a61..1ee222212a 100644 --- a/easybuild/build.py +++ b/easybuild/build.py @@ -19,36 +19,36 @@ # You should have received a copy of the GNU General Public License # along with EasyBuild. If not, see . ## +""" +Main entry point for EasyBuild: build software from .eb input file +""" + +import copy +import platform import os import re import shutil import sys import tempfile import time -import copy -import platform from datetime import datetime +from optparse import OptionParser import easybuild # required for VERBOSE_VERSION +import easybuild.tools.config as config +import easybuild.tools.filetools as filetools from easybuild.framework.application import Application, get_instance from easybuild.tools.build_log import EasyBuildError, initLogger, \ removeLogHandler, print_msg from easybuild.tools.class_dumper import dumpClasses from easybuild.tools.modules import Modules, searchModule from easybuild.tools.config import getRepository -from optparse import OptionParser -import easybuild.tools.config as config -import easybuild.tools.filetools as filetools from easybuild.tools import systemtools from easybuild.tools.pbs_job import PbsJob -""" -Main entry point for EasyBuildBuild: build software from .eb input file -""" - # applications use their own logger, we need to tell them to debug or not -# so this global var is used. +# so this global variable is used. LOGDEBUG = False def add_build_options(parser): diff --git a/easybuild/easyblocks/a/atlas.py b/easybuild/easyblocks/a/atlas.py index ffebc8705b..11275daefd 100644 --- a/easybuild/easyblocks/a/atlas.py +++ b/easybuild/easyblocks/a/atlas.py @@ -28,6 +28,7 @@ from easybuild.framework.application import Application from easybuild.tools.filetools import run_cmd + class ATLAS(Application): """ Support for building ATLAS diff --git a/easybuild/easyblocks/b/binary.py b/easybuild/easyblocks/b/binary.py index 61bb0e9c2e..a77fc74c88 100644 --- a/easybuild/easyblocks/b/binary.py +++ b/easybuild/easyblocks/b/binary.py @@ -26,6 +26,7 @@ from easybuild.framework.application import Application + class Binary(Application): """Support for installing a binary package. Just unpack it and copy it to the installdir""" diff --git a/easybuild/easyblocks/b/blacs.py b/easybuild/easyblocks/b/blacs.py index 558951912d..fbf308c3fb 100644 --- a/easybuild/easyblocks/b/blacs.py +++ b/easybuild/easyblocks/b/blacs.py @@ -30,6 +30,7 @@ from easybuild.framework.application import Application from easybuild.tools.filetools import run_cmd + def det_interface(log, path): """Determine interface through xintface""" @@ -42,6 +43,7 @@ def det_interface(log, path): else: log.error("Failed to determine interface, output for xintface: %s" % out) + class BLACS(Application): """ Support for building/installing BLACS diff --git a/easybuild/easyblocks/c/cp2k.py b/easybuild/easyblocks/c/cp2k.py index f67f456e6d..41db5f4ea4 100644 --- a/easybuild/easyblocks/c/cp2k.py +++ b/easybuild/easyblocks/c/cp2k.py @@ -34,6 +34,7 @@ from easybuild.tools.filetools import run_cmd import easybuild.tools.toolkit as toolkit + class CP2K(Application): """ Support for building CP2K diff --git a/easybuild/easyblocks/d/doxygen.py b/easybuild/easyblocks/d/doxygen.py index c2996e34f6..9981617ae7 100644 --- a/easybuild/easyblocks/d/doxygen.py +++ b/easybuild/easyblocks/d/doxygen.py @@ -25,6 +25,7 @@ from easybuild.framework.application import Application from easybuild.tools.filetools import run_cmd + class Doxygen(Application): """Support for building/installing Doxygen""" diff --git a/easybuild/easyblocks/f/fsl.py b/easybuild/easyblocks/f/fsl.py index 935a07e023..776f0d74aa 100644 --- a/easybuild/easyblocks/f/fsl.py +++ b/easybuild/easyblocks/f/fsl.py @@ -30,6 +30,7 @@ from easybuild.framework.application import Application from easybuild.tools.filetools import run_cmd + class FSL(Application): """Support for building and installing FSL.""" diff --git a/easybuild/easyblocks/g/g2clib.py b/easybuild/easyblocks/g/g2clib.py index 449d9ab98a..cee19fd754 100644 --- a/easybuild/easyblocks/g/g2clib.py +++ b/easybuild/easyblocks/g/g2clib.py @@ -28,6 +28,7 @@ from easybuild.framework.application import Application + class G2clib(Application): """Support for building g2clib GRIB2 C library.""" diff --git a/easybuild/easyblocks/g/g2lib.py b/easybuild/easyblocks/g/g2lib.py index f3bf1affc8..290833fc6d 100644 --- a/easybuild/easyblocks/g/g2lib.py +++ b/easybuild/easyblocks/g/g2lib.py @@ -27,6 +27,7 @@ from easybuild.framework.application import Application + class G2lib(Application): """Support for building g2clib GRIB2 library.""" diff --git a/easybuild/easyblocks/g/gcc.py b/easybuild/easyblocks/g/gcc.py index d42e4c7649..f3cbb568d2 100644 --- a/easybuild/easyblocks/g/gcc.py +++ b/easybuild/easyblocks/g/gcc.py @@ -34,6 +34,7 @@ import easybuild.tools.environment as env + class GCC(Application): """ Self-contained build of GCC. diff --git a/easybuild/easyblocks/h/hdf5.py b/easybuild/easyblocks/h/hdf5.py index 72e9097da2..2f88c188fc 100644 --- a/easybuild/easyblocks/h/hdf5.py +++ b/easybuild/easyblocks/h/hdf5.py @@ -26,6 +26,7 @@ from easybuild.framework.application import Application + class HDF5(Application): """Support for building/installing HDF5""" diff --git a/easybuild/easyblocks/h/hpl.py b/easybuild/easyblocks/h/hpl.py index 60833c0073..c2b139c36b 100644 --- a/easybuild/easyblocks/h/hpl.py +++ b/easybuild/easyblocks/h/hpl.py @@ -28,6 +28,7 @@ from easybuild.framework.application import Application from easybuild.tools.filetools import run_cmd + class HPL(Application): """ Support for building HPL (High Performance Linpack) diff --git a/easybuild/easyblocks/i/icc.py b/easybuild/easyblocks/i/icc.py index 1407357809..cdf7280a29 100644 --- a/easybuild/easyblocks/i/icc.py +++ b/easybuild/easyblocks/i/icc.py @@ -27,6 +27,7 @@ from easybuild.easyblocks.i.intelbase import IntelBase + class Icc(IntelBase): """Support for installing icc diff --git a/easybuild/easyblocks/i/ifort.py b/easybuild/easyblocks/i/ifort.py index d7d7ec0200..1d2f7172b7 100644 --- a/easybuild/easyblocks/i/ifort.py +++ b/easybuild/easyblocks/i/ifort.py @@ -26,6 +26,7 @@ from easybuild.easyblocks.i.icc import Icc, IntelBase + class Ifort(Icc): """ Class that can be used to install ifort diff --git a/easybuild/easyblocks/i/impi.py b/easybuild/easyblocks/i/impi.py index c0bc02071f..3e7391f5af 100644 --- a/easybuild/easyblocks/i/impi.py +++ b/easybuild/easyblocks/i/impi.py @@ -28,6 +28,7 @@ from easybuild.easyblocks.i.intelbase import IntelBase from easybuild.tools.filetools import run_cmd + class Impi(IntelBase): """ Support for installing Intel MPI library diff --git a/easybuild/easyblocks/i/intelbase.py b/easybuild/easyblocks/i/intelbase.py index 175c73cae2..4bd4fe0d55 100644 --- a/easybuild/easyblocks/i/intelbase.py +++ b/easybuild/easyblocks/i/intelbase.py @@ -29,6 +29,7 @@ from easybuild.framework.application import Application from easybuild.tools.filetools import run_cmd + class IntelBase(Application): """ Base class for Intel software diff --git a/easybuild/easyblocks/i/ipp.py b/easybuild/easyblocks/i/ipp.py index d277c67b93..84dd925196 100644 --- a/easybuild/easyblocks/i/ipp.py +++ b/easybuild/easyblocks/i/ipp.py @@ -24,6 +24,7 @@ from easybuild.easyblocks.i.intelbase import IntelBase + class Ipp(IntelBase): def sanitycheck(self): diff --git a/easybuild/easyblocks/i/itac.py b/easybuild/easyblocks/i/itac.py index aa35f6fa57..f2baee0f43 100644 --- a/easybuild/easyblocks/i/itac.py +++ b/easybuild/easyblocks/i/itac.py @@ -27,6 +27,7 @@ from easybuild.easyblocks.i.intelbase import IntelBase from easybuild.tools.filetools import run_cmd + class Itac(IntelBase): """ Class that can be used to install itac diff --git a/easybuild/easyblocks/l/lapack.py b/easybuild/easyblocks/l/lapack.py index 718f1703cb..8e614a6122 100644 --- a/easybuild/easyblocks/l/lapack.py +++ b/easybuild/easyblocks/l/lapack.py @@ -29,6 +29,7 @@ from easybuild.framework.application import Application from easybuild.tools.filetools import run_cmd + # also used for e.g. ScaLAPACK def get_blas_lib(log): """ @@ -53,6 +54,7 @@ def get_blas_lib(log): return blaslib + class LAPACK(Application): """ Support for building LAPACK diff --git a/easybuild/easyblocks/l/libsmm.py b/easybuild/easyblocks/l/libsmm.py index aa5e1ab2ef..47c4f3a344 100644 --- a/easybuild/easyblocks/l/libsmm.py +++ b/easybuild/easyblocks/l/libsmm.py @@ -31,6 +31,7 @@ from easybuild.tools.filetools import run_cmd from easybuild.tools.modules import get_software_root + class Libsmm(Application): """ Support for the CP2K small matrix library diff --git a/easybuild/easyblocks/m/maple.py b/easybuild/easyblocks/m/maple.py index b60a43ae08..151fdabd53 100644 --- a/easybuild/easyblocks/m/maple.py +++ b/easybuild/easyblocks/m/maple.py @@ -28,6 +28,7 @@ from easybuild.framework.application import Application from easybuild.tools.filetools import run_cmd_qa + class Maple(Application): """Support for installing Maple.""" diff --git a/easybuild/easyblocks/m/mrbayes.py b/easybuild/easyblocks/m/mrbayes.py index 3fba903a9f..b1341fbee6 100644 --- a/easybuild/easyblocks/m/mrbayes.py +++ b/easybuild/easyblocks/m/mrbayes.py @@ -30,6 +30,7 @@ from easybuild.framework.application import Application from easybuild.tools.filetools import run_cmd + class MrBayes(Application): """Support for building/installing MrBayes.""" diff --git a/easybuild/easyblocks/m/mvapich2.py b/easybuild/easyblocks/m/mvapich2.py index 078276a176..68a1d0baf1 100644 --- a/easybuild/easyblocks/m/mvapich2.py +++ b/easybuild/easyblocks/m/mvapich2.py @@ -27,6 +27,7 @@ import easybuild.tools.environment as env from easybuild.framework.application import Application + class MVAPICH2(Application): """ Support for building the MVAPICH2 MPI library. diff --git a/easybuild/easyblocks/n/ncl.py b/easybuild/easyblocks/n/ncl.py index b5e32ba73f..006287d138 100644 --- a/easybuild/easyblocks/n/ncl.py +++ b/easybuild/easyblocks/n/ncl.py @@ -32,6 +32,7 @@ from easybuild.tools.filetools import run_cmd from easybuild.tools.modules import get_software_root + class NCL(Application): """Support for building/installing NCL.""" diff --git a/easybuild/easyblocks/n/netcdf.py b/easybuild/easyblocks/n/netcdf.py index 16cdc07a50..4a3e15d65a 100644 --- a/easybuild/easyblocks/n/netcdf.py +++ b/easybuild/easyblocks/n/netcdf.py @@ -29,6 +29,7 @@ import easybuild.tools.toolkit as toolkit from easybuild.framework.application import Application + class NetCDF(Application): """Support for building/installing netCDF""" diff --git a/easybuild/easyblocks/n/netcdf_fortran.py b/easybuild/easyblocks/n/netcdf_fortran.py index 84a4cc9216..4913421bf3 100644 --- a/easybuild/easyblocks/n/netcdf_fortran.py +++ b/easybuild/easyblocks/n/netcdf_fortran.py @@ -28,6 +28,7 @@ import easybuild.tools.toolkit as toolkit from easybuild.framework.application import Application + class NetCDF_Fortran(Application): """Support for building/installing the netCDF-Fortran library""" diff --git a/easybuild/easyblocks/o/openfoam.py b/easybuild/easyblocks/o/openfoam.py index 2bf7e2fa62..8054791059 100644 --- a/easybuild/easyblocks/o/openfoam.py +++ b/easybuild/easyblocks/o/openfoam.py @@ -25,6 +25,7 @@ from easybuild.tools.filetools import run_cmd, recursiveChmod import easybuild.tools.toolkit as toolkit + class OpenFOAM(Application): """Support for building and installing OpenFOAM.""" diff --git a/easybuild/easyblocks/p/pasha.py b/easybuild/easyblocks/p/pasha.py index 50d231025f..858fde4397 100644 --- a/easybuild/easyblocks/p/pasha.py +++ b/easybuild/easyblocks/p/pasha.py @@ -26,6 +26,7 @@ import os from easybuild.framework.application import Application + class Pasha(Application): """Support for building and installing Pasha""" diff --git a/easybuild/easyblocks/p/python.py b/easybuild/easyblocks/p/python.py index bfbae56c50..06f86014f2 100644 --- a/easybuild/easyblocks/p/python.py +++ b/easybuild/easyblocks/p/python.py @@ -29,6 +29,7 @@ from easybuild.tools.filetools import unpack, patch, run_cmd import easybuild.tools.toolkit as toolkit + class Python(Application): """Support for building/installing Python - default configure/make/make install works fine diff --git a/easybuild/easyblocks/s/scalapack.py b/easybuild/easyblocks/s/scalapack.py index 90917f348d..e7a8160113 100644 --- a/easybuild/easyblocks/s/scalapack.py +++ b/easybuild/easyblocks/s/scalapack.py @@ -30,6 +30,7 @@ from easybuild.easyblocks.b.blacs import det_interface from easybuild.easyblocks.l.lapack import get_blas_lib + class ScaLAPACK(Application): """ Support for building and installing ScaLAPACK, both versions 1.x and 2.x diff --git a/easybuild/easyblocks/t/tarball.py b/easybuild/easyblocks/t/tarball.py index 91c2e2a19a..e810585012 100644 --- a/easybuild/easyblocks/t/tarball.py +++ b/easybuild/easyblocks/t/tarball.py @@ -27,6 +27,7 @@ from easybuild.framework.application import Application + class Tarball(Application): """ Precompiled software packaged as tarball: diff --git a/easybuild/easyblocks/t/tbb.py b/easybuild/easyblocks/t/tbb.py index 4bdfb24b5c..6570f68126 100644 --- a/easybuild/easyblocks/t/tbb.py +++ b/easybuild/easyblocks/t/tbb.py @@ -28,6 +28,7 @@ from easybuild.easyblocks.i.intelbase import IntelBase + class Tbb(IntelBase): """EasyBlock for tbb, threading building blocks""" diff --git a/easybuild/easyblocks/t/toolkit.py b/easybuild/easyblocks/t/toolkit.py index d3671dfcc5..dcc8d1bea1 100644 --- a/easybuild/easyblocks/t/toolkit.py +++ b/easybuild/easyblocks/t/toolkit.py @@ -24,6 +24,7 @@ from easybuild.framework.application import Application + class Toolkit(Application): """ Compiler toolkit: generate module file only, nothing to make/install diff --git a/easybuild/easyblocks/w/wps.py b/easybuild/easyblocks/w/wps.py index c608a631d1..4d5884a1ee 100644 --- a/easybuild/easyblocks/w/wps.py +++ b/easybuild/easyblocks/w/wps.py @@ -36,6 +36,7 @@ from easybuild.tools.filetools import patch_perl_script_autoflush, run_cmd, run_cmd_qa, unpack from easybuild.easyblocks.n.netcdf import set_netcdf_env_vars, get_netcdf_module_set_cmds + class WPS(Application): """Support for building/installing WPS.""" diff --git a/easybuild/easyblocks/w/wrf.py b/easybuild/easyblocks/w/wrf.py index 6309446f55..7a08b2177b 100644 --- a/easybuild/easyblocks/w/wrf.py +++ b/easybuild/easyblocks/w/wrf.py @@ -33,6 +33,7 @@ from easybuild.tools.filetools import patch_perl_script_autoflush, run_cmd, run_cmd_qa from easybuild.easyblocks.n.netcdf import set_netcdf_env_vars, get_netcdf_module_set_cmds + class WRF(Application): """Support for building/installing WRF.""" diff --git a/easybuild/easybuild_config.py b/easybuild/easybuild_config.py index 6c279394f5..4bf8edeafd 100644 --- a/easybuild/easybuild_config.py +++ b/easybuild/easybuild_config.py @@ -18,6 +18,10 @@ # You should have received a copy of the GNU General Public License # along with EasyBuild. If not, see . ## +""" +EasyBuild configuration file. +""" + import os from easybuild.tools.build_log import getLog @@ -59,7 +63,7 @@ ## optionally a subdir argument can be specified: ## `repository = FileRepository(repositoryPath, subdir)` repositoryPath = os.path.join(prefix, 'ebfiles_repo') -repository = FileRepository(repositoryPath) #@UndefinedVariable +repository = FileRepository(repositoryPath) #@UndefinedVariable (this file gets exec'ed, so ignore this) # log format: (dir, filename template) # supported in template: name, version, data, time diff --git a/easybuild/framework/application.py b/easybuild/framework/application.py index a5d233b66f..0663e0b25e 100644 --- a/easybuild/framework/application.py +++ b/easybuild/framework/application.py @@ -18,16 +18,21 @@ # You should have received a copy of the GNU General Public License # along with EasyBuild. If not, see . ## -from difflib import get_close_matches -from distutils.version import LooseVersion +""" +Generic EasyBuild support for building and installing software, +using the 'standard' configure/make/make install procedure. +""" + import copy import glob -import grp #@UnresolvedImport +import grp #@UnresolvedImport import os import re import shutil import time import urllib +from difflib import get_close_matches +from distutils.version import LooseVersion import easybuild import easybuild.tools.config as config @@ -40,10 +45,10 @@ from easybuild.tools.toolkit import Toolkit from easybuild.tools.systemtools import get_core_count + class Application: """ - This is the dummy Application class. - All other Application classes should be inherited from this one + Support for building and installing applications with configure/make/make install """ ## INIT @@ -1749,9 +1754,10 @@ def get_instance(easyblock, log, name=None): log.error("Can't process provided module and class pair %s: %s" % (easyblock, err)) raise EasyBuildError(str(err)) + class ApplicationPackage: """ - Class for packages. + Support for installing packages. """ def __init__(self, mself, pkg, pkginstalldeps): """ diff --git a/easybuild/tools/asyncprocess.py b/easybuild/tools/asyncprocess.py index 7ca77d0b93..b55b3a646a 100644 --- a/easybuild/tools/asyncprocess.py +++ b/easybuild/tools/asyncprocess.py @@ -64,12 +64,12 @@ STDOUT = subprocess.STDOUT if subprocess.mswindows: - from win32file import ReadFile, WriteFile #IGNORE:F0401 #@UnresolvedImport - from win32pipe import PeekNamedPipe #IGNORE:F0401 #@UnresolvedImport - import msvcrt #IGNORE:F0401 + from win32file import ReadFile, WriteFile #@UnresolvedImport + from win32pipe import PeekNamedPipe ##@UnresolvedImport + import msvcrt #@UnresolvedImport else: - import select - import fcntl + import select #@UnresolvedImport + import fcntl #@UnresolvedImport class Popen(subprocess.Popen): diff --git a/easybuild/tools/build_log.py b/easybuild/tools/build_log.py index 41c100ec62..d3d18801ec 100644 --- a/easybuild/tools/build_log.py +++ b/easybuild/tools/build_log.py @@ -22,18 +22,19 @@ EasyBuild logger and log utilities, including our own EasybuildError class. """ -from socket import gethostname -from copy import copy import logging import os import sys import time +from socket import gethostname +from copy import copy import easybuild # EasyBuild message prefix EB_MSG_PREFIX = "==" + class EasyBuildError(Exception): """ EasyBuildError is thrown when EasyBuild runs into something horribly wrong. @@ -44,6 +45,7 @@ def __init__(self, msg): def __str__(self): return repr(self.msg) + class EasyBuildLog(logging.Logger): """ The EasyBuild logger, with its own error and exception functions. @@ -80,6 +82,7 @@ def exception(self, msg, *args): raise EasyBuildError(newMsg) + # set format for logger loggingFormat = EB_MSG_PREFIX + ' %(asctime)s %(name)s %(levelname)s %(message)s' formatter = logging.Formatter(loggingFormat) diff --git a/easybuild/tools/class_dumper.py b/easybuild/tools/class_dumper.py index b464414370..7060fcf5e4 100644 --- a/easybuild/tools/class_dumper.py +++ b/easybuild/tools/class_dumper.py @@ -22,6 +22,7 @@ import pyclbr import os + def dumpClasses(root): """Get a class tree, starting at root""" moduleRoot = None diff --git a/easybuild/tools/config.py b/easybuild/tools/config.py index 326bdb8fdb..0fc257d55a 100644 --- a/easybuild/tools/config.py +++ b/easybuild/tools/config.py @@ -21,11 +21,13 @@ """ EasyBuild configuration (paths, preferences, etc.) """ + import os from easybuild.tools.build_log import getLog import easybuild.tools.repository as repo + log = getLog('config') variables = {} diff --git a/easybuild/tools/environment.py b/easybuild/tools/environment.py index 44d07c84c8..6c332980b9 100644 --- a/easybuild/tools/environment.py +++ b/easybuild/tools/environment.py @@ -1,5 +1,6 @@ import os + changes = {} def write_changes(filename): diff --git a/easybuild/tools/filetools.py b/easybuild/tools/filetools.py index c28adf8532..865a1a118c 100644 --- a/easybuild/tools/filetools.py +++ b/easybuild/tools/filetools.py @@ -30,10 +30,10 @@ import tempfile import time +import easybuild.tools.environment as env from easybuild.tools.asyncprocess import Popen, PIPE, STDOUT, send_all, recv_some from easybuild.tools.build_log import getLog -import easybuild.tools.environment as env log = getLog('fileTools') errorsFoundInLog = 0 diff --git a/easybuild/tools/module_generator.py b/easybuild/tools/module_generator.py index 8c6ccfa343..346acbaf05 100644 --- a/easybuild/tools/module_generator.py +++ b/easybuild/tools/module_generator.py @@ -28,8 +28,10 @@ from easybuild.tools.build_log import getLog from easybuild.tools.config import installPath + log = getLog('moduleGenerator') + class ModuleGenerator: """ Class for generating module files. diff --git a/easybuild/tools/modules.py b/easybuild/tools/modules.py index 0eea9acd5f..35fe6acb35 100644 --- a/easybuild/tools/modules.py +++ b/easybuild/tools/modules.py @@ -28,6 +28,7 @@ from easybuild.tools.build_log import getLog, initLogger, EasyBuildError from easybuild.tools.filetools import convertName, run_cmd + log = getLog('Modules') outputMatchers = { # matches whitespace and module-listing headers diff --git a/easybuild/tools/pbs_job.py b/easybuild/tools/pbs_job.py index 671ef0ffae..0f0a4abc1d 100644 --- a/easybuild/tools/pbs_job.py +++ b/easybuild/tools/pbs_job.py @@ -17,12 +17,17 @@ # You should have received a copy of the GNU General Public License # along with EasyBuild. If not, see . ## -import os, sys, re +""" +Interface module to TORQUE (PBS). +""" + +import os from easybuild.tools.build_log import getLog + class PbsJob: - """Interaction with torque""" + """Interaction with TORQUE""" def __init__(self, script, name, env_vars=None): """ @@ -80,12 +85,12 @@ def submit(self): os.environ.setdefault('WORKDIR', os.getcwd()) defvars = ['MAIL', 'HOME', 'PATH', 'SHELL', 'WORKDIR'] - vars = ["PBS_O_%s=%s" % (x, os.environ.get(x, 'NOTFOUND_%s' % x)) for x in defvars] + pbsvars = ["PBS_O_%s=%s" % (x, os.environ.get(x, 'NOTFOUND_%s' % x)) for x in defvars] # extend PBS variables with specified variables - vars.extend(["%s=%s" % (name, value) for (name, value) in self.env_vars.items()]) + pbsvars.extend(["%s=%s" % (name, value) for (name, value) in self.env_vars.items()]) variable_attributes = pbs.new_attropl(1) variable_attributes[0].name = 'Variable_List' - variable_attributes[0].value = ",".join(vars) + variable_attributes[0].value = ",".join(pbsvars) pbs_attributes.extend(variable_attributes) diff --git a/easybuild/tools/repository.py b/easybuild/tools/repository.py index 9a557a0185..b1dd2512ed 100644 --- a/easybuild/tools/repository.py +++ b/easybuild/tools/repository.py @@ -27,12 +27,12 @@ import os import shutil import socket -import sys import tempfile import time import easybuild -from easybuild.tools.build_log import getLog, EasyBuildError +from easybuild.tools.build_log import getLog + log = getLog('repo') try: @@ -42,11 +42,12 @@ pass try: - import pysvn + import pysvn #@UnusedImport from pysvn import ClientError #IGNORE:E0611 pysvn fails to recognize ClientError is available except ImportError: pass + class Repository: """ Interface for repositories @@ -99,7 +100,9 @@ def cleanup(self): """ return + class FileRepository(Repository): + """Class for file repositories.""" def setupRepo(self): """ @@ -160,8 +163,9 @@ def addEasyconfig(self, cfg, name, version, stats, previous): class GitRepository(FileRepository): """ - Class representing a git repository. + Class for git repositories. """ + def __init__(self, *args): """ Initialize git client to None (will be set later) @@ -175,8 +179,8 @@ def setupRepo(self): Set up git repository. """ try: - import git - from git import GitCommandError + import git #@UnusedImport + from git import GitCommandError #@UnusedImport except ImportError: log.exception("GitPython failed to load") self.wc = tempfile.mkdtemp(prefix='git-wc-') @@ -252,8 +256,9 @@ def cleanup(self): class SvnRepository(FileRepository): """ - class representing an svn repository + Class for svn repositories """ + def __init__(self, *args): """ Set self.client to None. Real logic is in setupRepo and createWorkingCopy diff --git a/easybuild/tools/systemtools.py b/easybuild/tools/systemtools.py index b20f669e0b..a058f1ccd5 100644 --- a/easybuild/tools/systemtools.py +++ b/easybuild/tools/systemtools.py @@ -1,5 +1,5 @@ ## -# Copyright 2009-2012 Jens Timmerman +# Copyright 2009-2012 Jens Timmerman, Kenneth Hoste # # This file is part of EasyBuild, # originally created by the HPC team of the University of Ghent (http://ugent.be/hpc). @@ -19,16 +19,18 @@ # along with EasyBuild. If not, see . ## """ -This module contains some usefull functions for getting system information +Module with useful functions for getting system information """ import os import re from easybuild.tools.filetools import run_cmd + INTEL = 'Intel' AMD = 'AMD' VENDORS = {'GenuineIntel': INTEL, 'AuthenticAMD': AMD} + class SystemToolsException(Exception): """raised when systemtools fails""" diff --git a/easybuild/tools/toolkit.py b/easybuild/tools/toolkit.py index f0e4d37e76..2b3901e4ae 100644 --- a/easybuild/tools/toolkit.py +++ b/easybuild/tools/toolkit.py @@ -28,14 +28,16 @@ import easybuild.tools.environment as env + log = getLog('Toolkit') -# constant used for recognizing compilers, MPI libraries, ... +# constants used for recognizing compilers, MPI libraries, ... GCC = "GCC" INTEL = "Intel" OPENMPI = "OpenMPI" QLOGIC = "QLogic" + class Toolkit: """ Class for compiler toolkits, consisting out of a compiler and dependencies (libraries). From 37d20861acc7908890cfbe65d950fb8299bbbb3a Mon Sep 17 00:00:00 2001 From: Jens Timmerman Date: Tue, 24 Jul 2012 16:12:15 +0200 Subject: [PATCH 299/798] added initial pasha support (for intel, with intel tbb) --- easybuild/easyblocks/p/pasha.py | 39 +++++++++++++++++++ .../PASHA/Pasha-1.0.3-goalf-1.1.0-no-OFED.eb | 18 +++++++++ .../p/PASHA/Pasha-1.0.3-ictce-4.0.6.eb | 17 ++++++++ 3 files changed, 74 insertions(+) create mode 100644 easybuild/easyblocks/p/pasha.py create mode 100644 easybuild/easyconfigs/p/PASHA/Pasha-1.0.3-goalf-1.1.0-no-OFED.eb create mode 100644 easybuild/easyconfigs/p/PASHA/Pasha-1.0.3-ictce-4.0.6.eb diff --git a/easybuild/easyblocks/p/pasha.py b/easybuild/easyblocks/p/pasha.py new file mode 100644 index 0000000000..9c6eb72068 --- /dev/null +++ b/easybuild/easyblocks/p/pasha.py @@ -0,0 +1,39 @@ +## +# Copyright 2012 Jens Timmerman +# +# This file is part of EasyBuild, +# originally created by the HPC team of the University of Ghent (http://ugent.be/hpc). +# +# http://github.com/hpcugent/easybuild +# +# EasyBuild is free software: you can redistribute it and/or modify +# it under the terms of the GNU General Public License as published by +# the Free Software Foundation v2. +# +# EasyBuild is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with EasyBuild. If not, see . +## +""" +pasha easyblock +""" +from easybuild.framework.application import Application + +class Pasha(Application): + """ + Extend Application to add extra configuration (overwrite variables in makefile) + """ + + def configure(self): + """overwriting configure from Application + Set some extra makeopts + """ + makeopts = self.getcfg('makeopts') + makeopts = "%s TBB_DIR=$SOFTROOTTBB/tbb MPI_CXX=$MPICXX OPM_FLAG=%s "\ + "MPI_DIR='' MPI_INC='' MPI_LIB='' MY_CXX=$CXX " % (makeopts, self.tk.get_openmp_flag()) + + self.setcfg('makeopts', makeopts) diff --git a/easybuild/easyconfigs/p/PASHA/Pasha-1.0.3-goalf-1.1.0-no-OFED.eb b/easybuild/easyconfigs/p/PASHA/Pasha-1.0.3-goalf-1.1.0-no-OFED.eb new file mode 100644 index 0000000000..d400f697e1 --- /dev/null +++ b/easybuild/easyconfigs/p/PASHA/Pasha-1.0.3-goalf-1.1.0-no-OFED.eb @@ -0,0 +1,18 @@ +name='Pasha' +version='1.0.3' + +homepage='http://pasha.sourceforge.net/' +description="PASHA is a parallel short read assembler for large genomes using de Bruijn graphs." + +toolkit={'name':'goalf','version':'1.1.0-no-OFED'} +toolkitopts={'pic':True,'opt':True,'optarch':True} + +dependencies=[ + ('tbb','- + +sources=['%s-%s.tar.gz' % (name, version)] +sourceURLs=[ + 'http://downloads.sourceforge.net/pasha', +] + +parallel=1 diff --git a/easybuild/easyconfigs/p/PASHA/Pasha-1.0.3-ictce-4.0.6.eb b/easybuild/easyconfigs/p/PASHA/Pasha-1.0.3-ictce-4.0.6.eb new file mode 100644 index 0000000000..2d48bc3db1 --- /dev/null +++ b/easybuild/easyconfigs/p/PASHA/Pasha-1.0.3-ictce-4.0.6.eb @@ -0,0 +1,17 @@ +name='Pasha' +version='1.0.3' + +homepage='http://pasha.sourceforge.net/' +description="PASHA is a parallel short read assembler for large genomes using de Bruijn graphs." + +toolkit={'name':'ictce','version':'4.0.6'} +toolkitopts={'pic':True,'opt':True,'optarch':True} + +dependencies=[ + ('tbb','4.0.0.233'), + ] + +sources=['%s-%s.tar.gz' % (name, version)] +sourceURLs=[ + 'http://downloads.sourceforge.net/pasha', +] From 54422e4cc2cb6cade482db086701d6870c9c89ec Mon Sep 17 00:00:00 2001 From: Jens Timmerman Date: Wed, 25 Jul 2012 11:33:50 +0200 Subject: [PATCH 300/798] added extra path to tbb module file --- easybuild/easyblocks/t/tbb.py | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/easybuild/easyblocks/t/tbb.py b/easybuild/easyblocks/t/tbb.py index 8458d3fdb9..ce0d63cf41 100644 --- a/easybuild/easyblocks/t/tbb.py +++ b/easybuild/easyblocks/t/tbb.py @@ -22,6 +22,9 @@ from easybuild.easyblocks.i.intelbase import IntelBase class Tbb(IntelBase): + """ + EasyBlock for tbb, threading building blocks + """ def sanitycheck(self): @@ -33,3 +36,12 @@ def sanitycheck(self): self.log.info("Customized sanity check paths: %s" % self.getcfg('sanityCheckPaths')) IntelBase.sanitycheck(self) + + def make_module_extra(self): + """Add correct path to lib to LD_LIBRARY_PATH. and intel license file""" + + txt = IntelBase.make_module_extra(self) + txt += "prepend-path\t%s\t\t$root/%s/%s/lib\n" % + ('LD_LIBRARY_PATH', os.environ['ARCHITECTURE'], os.environ['TBB_COMPILER']) + + return txt From 992db394a39c94d796e975e08d4a22f8d100f3cf Mon Sep 17 00:00:00 2001 From: Jens Timmerman Date: Wed, 25 Jul 2012 11:37:44 +0200 Subject: [PATCH 301/798] import os --- easybuild/easyblocks/t/tbb.py | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/easybuild/easyblocks/t/tbb.py b/easybuild/easyblocks/t/tbb.py index ce0d63cf41..6096be33bf 100644 --- a/easybuild/easyblocks/t/tbb.py +++ b/easybuild/easyblocks/t/tbb.py @@ -19,6 +19,7 @@ # along with EasyBuild. If not, see . ## +import os from easybuild.easyblocks.i.intelbase import IntelBase class Tbb(IntelBase): @@ -41,7 +42,7 @@ def make_module_extra(self): """Add correct path to lib to LD_LIBRARY_PATH. and intel license file""" txt = IntelBase.make_module_extra(self) - txt += "prepend-path\t%s\t\t$root/%s/%s/lib\n" % - ('LD_LIBRARY_PATH', os.environ['ARCHITECTURE'], os.environ['TBB_COMPILER']) + txt += "prepend-path\t%s\t\t$root/%s/%s/lib\n" % \ + ('LD_LIBRARY_PATH', os.environ['ARCHITECTURE'], os.environ['TBB_COMPILER']) return txt From 230458aed7b8f97992f8c0604fcd1bc66513b48e Mon Sep 17 00:00:00 2001 From: Jens Timmerman Date: Wed, 25 Jul 2012 16:34:04 +0200 Subject: [PATCH 302/798] fixed installation of tbb and added full pasha support --- easybuild/easyblocks/p/pasha.py | 17 ++++++++++++++++- easybuild/easyblocks/t/tbb.py | 15 ++++++++++++--- .../p/PASHA/Pasha-1.0.3-ictce-4.0.6.eb | 7 ++++++- easybuild/easyconfigs/t/tbb/tbb-4.0.5.339.eb | 19 +++++++++++++++++++ 4 files changed, 53 insertions(+), 5 deletions(-) create mode 100644 easybuild/easyconfigs/t/tbb/tbb-4.0.5.339.eb diff --git a/easybuild/easyblocks/p/pasha.py b/easybuild/easyblocks/p/pasha.py index 9c6eb72068..2111d938df 100644 --- a/easybuild/easyblocks/p/pasha.py +++ b/easybuild/easyblocks/p/pasha.py @@ -21,6 +21,8 @@ """ pasha easyblock """ +import shutil +import os from easybuild.framework.application import Application class Pasha(Application): @@ -34,6 +36,19 @@ def configure(self): """ makeopts = self.getcfg('makeopts') makeopts = "%s TBB_DIR=$SOFTROOTTBB/tbb MPI_CXX=$MPICXX OPM_FLAG=%s "\ - "MPI_DIR='' MPI_INC='' MPI_LIB='' MY_CXX=$CXX " % (makeopts, self.tk.get_openmp_flag()) + "MPI_DIR='' MPI_INC='' MPI_LIB='' MY_CXX=$CXX MPICH_IGNORE_CXX_SEEK=1" % (makeopts, self.tk.get_openmp_flag()) self.setcfg('makeopts', makeopts) + + def make_install(self): + """Overwriting make_install, since there is no install defined in the makefile""" + shutil.copytree(os.path.join(self.builddir, "%s-%s" % (self.name(), self.version()), 'bin'), os.path.join(self.installdir, 'bin')) + + def sanitycheck(self): + """Custom sanity check""" + self.setcfg('sanityCheckPaths', { + 'files':["bin/pasha-%s" % x for x in ["kmergen", "pregraph", "graph"]], + 'dirs':[""], + }) + + diff --git a/easybuild/easyblocks/t/tbb.py b/easybuild/easyblocks/t/tbb.py index 6096be33bf..4581e92dd1 100644 --- a/easybuild/easyblocks/t/tbb.py +++ b/easybuild/easyblocks/t/tbb.py @@ -20,6 +20,7 @@ ## import os +import shutil from easybuild.easyblocks.i.intelbase import IntelBase class Tbb(IntelBase): @@ -27,11 +28,20 @@ class Tbb(IntelBase): EasyBlock for tbb, threading building blocks """ + def make_install(self): + """overwrite make_install to add extra symlinks""" + IntelBase.make_install(self) + self.libpath = "%s/tbb/libs/intel64/%s/" % (self.installdir, "cc4.1.0_libc2.4_kernel2.6.16.21") + installibpath = os.path.join(self.installdir, 'tbb', 'lib') + shutil.move(installibpath, os.path.join(self.installdir, 'tbb', 'libs')) + os.symlink(self.libpath, installibpath) + + def sanitycheck(self): if not self.getcfg('sanityCheckPaths'): self.setcfg('sanityCheckPaths', {'files':[], - 'dirs':["tbb/bin", "tbb/lib/intel64"] + 'dirs':["tbb/bin", "tbb/lib/"] }) self.log.info("Customized sanity check paths: %s" % self.getcfg('sanityCheckPaths')) @@ -42,7 +52,6 @@ def make_module_extra(self): """Add correct path to lib to LD_LIBRARY_PATH. and intel license file""" txt = IntelBase.make_module_extra(self) - txt += "prepend-path\t%s\t\t$root/%s/%s/lib\n" % \ - ('LD_LIBRARY_PATH', os.environ['ARCHITECTURE'], os.environ['TBB_COMPILER']) + txt += "prepend-path\t%s\t\t%s\n" % ('LD_LIBRARY_PATH', self.libpath) return txt diff --git a/easybuild/easyconfigs/p/PASHA/Pasha-1.0.3-ictce-4.0.6.eb b/easybuild/easyconfigs/p/PASHA/Pasha-1.0.3-ictce-4.0.6.eb index 2d48bc3db1..4148d89f07 100644 --- a/easybuild/easyconfigs/p/PASHA/Pasha-1.0.3-ictce-4.0.6.eb +++ b/easybuild/easyconfigs/p/PASHA/Pasha-1.0.3-ictce-4.0.6.eb @@ -8,10 +8,15 @@ toolkit={'name':'ictce','version':'4.0.6'} toolkitopts={'pic':True,'opt':True,'optarch':True} dependencies=[ - ('tbb','4.0.0.233'), + ('tbb','4.0.5.339','',True), ] sources=['%s-%s.tar.gz' % (name, version)] sourceURLs=[ 'http://downloads.sourceforge.net/pasha', ] + +patches=[ + 'intelmpi.patch', + ] +parallel=1 diff --git a/easybuild/easyconfigs/t/tbb/tbb-4.0.5.339.eb b/easybuild/easyconfigs/t/tbb/tbb-4.0.5.339.eb new file mode 100644 index 0000000000..d7322f218e --- /dev/null +++ b/easybuild/easyconfigs/t/tbb/tbb-4.0.5.339.eb @@ -0,0 +1,19 @@ +name='tbb' +version='4.0.5.339' + +homepage='http://software.intel.com/en-us/articles/intel-tbb/' +description="""Intel Threading Building Blocks 4.0 (Intel TBB) is a widely used, award-winning C++ template library for creating reliable, portable, and scalable parallel applications. Use Intel TBB for a simple and rapid way of developing robust task-based parallel applications that scale to available processor cores, are compatible with multiple environments, and are easier to maintain. Intel TBB is the most proficient way to implement future-proof parallel applications that tap into the power and performance of multicore and manycore hardware platforms.""" + +toolkit={'name':'dummy','version':'dummy'} + +sources=['l_%s_%s.tgz' % (name,version)] + +patches=['tbb_productsdb.patch'] + +## compiler class +moduleclass='lib' + +dontcreateinstalldir='True' + +## licensepath +license="/apps/gent/licenses/intel" From 717ed0474c9911469ad9faff7f6384859a09698f Mon Sep 17 00:00:00 2001 From: Jens Timmerman Date: Thu, 26 Jul 2012 17:23:54 +0300 Subject: [PATCH 303/798] Processed remarks for pasha.py --- easybuild/easyblocks/p/pasha.py | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/easybuild/easyblocks/p/pasha.py b/easybuild/easyblocks/p/pasha.py index 2111d938df..c71befabe6 100644 --- a/easybuild/easyblocks/p/pasha.py +++ b/easybuild/easyblocks/p/pasha.py @@ -31,21 +31,21 @@ class Pasha(Application): """ def configure(self): - """overwriting configure from Application - Set some extra makeopts - """ + """Configure Pasha by setting make options.""" makeopts = self.getcfg('makeopts') makeopts = "%s TBB_DIR=$SOFTROOTTBB/tbb MPI_CXX=$MPICXX OPM_FLAG=%s "\ - "MPI_DIR='' MPI_INC='' MPI_LIB='' MY_CXX=$CXX MPICH_IGNORE_CXX_SEEK=1" % (makeopts, self.tk.get_openmp_flag()) + "MPI_DIR='' MPI_INC='' MPI_LIB='' MY_CXX=$CXX MPICH_IGNORE_CXX_SEEK=1" % \ + (makeopts, self.tk.get_openmp_flag()) self.setcfg('makeopts', makeopts) def make_install(self): - """Overwriting make_install, since there is no install defined in the makefile""" - shutil.copytree(os.path.join(self.builddir, "%s-%s" % (self.name(), self.version()), 'bin'), os.path.join(self.installdir, 'bin')) + """install by copying everything from 'bin' subdir in build dir to install dir""" + srcdir = os.path.join(self.builddir, "%s-%s" % (self.name(), self.version()), 'bin') + shutil.copytree(srcdir, os.path.join(self.installdir, 'bin')) def sanitycheck(self): - """Custom sanity check""" + """Custom sanity check for Pasha""" self.setcfg('sanityCheckPaths', { 'files':["bin/pasha-%s" % x for x in ["kmergen", "pregraph", "graph"]], 'dirs':[""], From c638354ec6ef5dbc365a4a5d011b1832a166a8b8 Mon Sep 17 00:00:00 2001 From: Jens Timmerman Date: Fri, 27 Jul 2012 15:45:30 +0200 Subject: [PATCH 304/798] fixed docstrings in pasha.py --- easybuild/easyblocks/p/pasha.py | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/easybuild/easyblocks/p/pasha.py b/easybuild/easyblocks/p/pasha.py index c71befabe6..6ce8a3bd9d 100644 --- a/easybuild/easyblocks/p/pasha.py +++ b/easybuild/easyblocks/p/pasha.py @@ -19,15 +19,16 @@ # along with EasyBuild. If not, see . ## """ -pasha easyblock +EasyBuild support for Pasha, implemented as an easyblock """ + import shutil import os from easybuild.framework.application import Application class Pasha(Application): """ - Extend Application to add extra configuration (overwrite variables in makefile) + Support for building and installing Pasha" """ def configure(self): From 8771d1d7f4903f647381096286460d372c5c09ab Mon Sep 17 00:00:00 2001 From: Jens Timmerman Date: Tue, 31 Jul 2012 10:27:34 +0200 Subject: [PATCH 305/798] Processed comments on pull request #24 --- easybuild/easyblocks/t/tbb.py | 20 +++++++++++++++++-- .../PASHA/Pasha-1.0.3-goalf-1.1.0-no-OFED.eb | 18 ----------------- .../p/PASHA/Pasha-1.0.3-ictce-4.0.6.eb | 2 ++ easybuild/easyconfigs/t/tbb/tbb-4.0.0.233.eb | 12 +++++++++-- easybuild/easyconfigs/t/tbb/tbb-4.0.5.339.eb | 14 ++++++++++--- 5 files changed, 41 insertions(+), 25 deletions(-) delete mode 100644 easybuild/easyconfigs/p/PASHA/Pasha-1.0.3-goalf-1.1.0-no-OFED.eb diff --git a/easybuild/easyblocks/t/tbb.py b/easybuild/easyblocks/t/tbb.py index 4581e92dd1..891f1f1002 100644 --- a/easybuild/easyblocks/t/tbb.py +++ b/easybuild/easyblocks/t/tbb.py @@ -21,6 +21,7 @@ import os import shutil +import glob from easybuild.easyblocks.i.intelbase import IntelBase class Tbb(IntelBase): @@ -31,7 +32,21 @@ class Tbb(IntelBase): def make_install(self): """overwrite make_install to add extra symlinks""" IntelBase.make_install(self) - self.libpath = "%s/tbb/libs/intel64/%s/" % (self.installdir, "cc4.1.0_libc2.4_kernel2.6.16.21") + + # save libdir + os.chdir(self.installdir) + libglob = 'tbb/libs/intel64/cc*libc*_kernel*' + libs = glob.glob(libglob) + if len(libs): + libdir = libs[-1] # take the last one, should be ordered by cc version. + else: + self.log.error("No libs found using %s in %s" % (libglob, self.installdir)) + self.libdir = libdir + + + self.libpath = "%s/tbb/libs/intel64/%s/" % (self.installdir, libdir) + # applications go looking into tbb/lib so we move what's in there to libs + # and symlink the right lib from /tbb/libs/intel64/... to lib installibpath = os.path.join(self.installdir, 'tbb', 'lib') shutil.move(installibpath, os.path.join(self.installdir, 'tbb', 'libs')) os.symlink(self.libpath, installibpath) @@ -41,7 +56,7 @@ def sanitycheck(self): if not self.getcfg('sanityCheckPaths'): self.setcfg('sanityCheckPaths', {'files':[], - 'dirs':["tbb/bin", "tbb/lib/"] + 'dirs':["tbb/bin", "tbb/lib/", "tbb/libs/"] }) self.log.info("Customized sanity check paths: %s" % self.getcfg('sanityCheckPaths')) @@ -52,6 +67,7 @@ def make_module_extra(self): """Add correct path to lib to LD_LIBRARY_PATH. and intel license file""" txt = IntelBase.make_module_extra(self) + # since we have symlinked it we could also use $SOFTROOTTBB/tbb/lib here txt += "prepend-path\t%s\t\t%s\n" % ('LD_LIBRARY_PATH', self.libpath) return txt diff --git a/easybuild/easyconfigs/p/PASHA/Pasha-1.0.3-goalf-1.1.0-no-OFED.eb b/easybuild/easyconfigs/p/PASHA/Pasha-1.0.3-goalf-1.1.0-no-OFED.eb deleted file mode 100644 index d400f697e1..0000000000 --- a/easybuild/easyconfigs/p/PASHA/Pasha-1.0.3-goalf-1.1.0-no-OFED.eb +++ /dev/null @@ -1,18 +0,0 @@ -name='Pasha' -version='1.0.3' - -homepage='http://pasha.sourceforge.net/' -description="PASHA is a parallel short read assembler for large genomes using de Bruijn graphs." - -toolkit={'name':'goalf','version':'1.1.0-no-OFED'} -toolkitopts={'pic':True,'opt':True,'optarch':True} - -dependencies=[ - ('tbb','- - -sources=['%s-%s.tar.gz' % (name, version)] -sourceURLs=[ - 'http://downloads.sourceforge.net/pasha', -] - -parallel=1 diff --git a/easybuild/easyconfigs/p/PASHA/Pasha-1.0.3-ictce-4.0.6.eb b/easybuild/easyconfigs/p/PASHA/Pasha-1.0.3-ictce-4.0.6.eb index 4148d89f07..1b01d1ce2b 100644 --- a/easybuild/easyconfigs/p/PASHA/Pasha-1.0.3-ictce-4.0.6.eb +++ b/easybuild/easyconfigs/p/PASHA/Pasha-1.0.3-ictce-4.0.6.eb @@ -19,4 +19,6 @@ sourceURLs=[ patches=[ 'intelmpi.patch', ] + +# Pasha's makefile is not suited for parallel execution. parallel=1 diff --git a/easybuild/easyconfigs/t/tbb/tbb-4.0.0.233.eb b/easybuild/easyconfigs/t/tbb/tbb-4.0.0.233.eb index 080795776c..8a73e0e9fb 100644 --- a/easybuild/easyconfigs/t/tbb/tbb-4.0.0.233.eb +++ b/easybuild/easyconfigs/t/tbb/tbb-4.0.0.233.eb @@ -2,7 +2,14 @@ name='tbb' version='4.0.0.233' homepage='http://software.intel.com/en-us/articles/intel-tbb/' -description="""Intel Threading Building Blocks 4.0 (Intel TBB) is a widely used, award-winning C++ template library for creating reliable, portable, and scalable parallel applications. Use Intel TBB for a simple and rapid way of developing robust task-based parallel applications that scale to available processor cores, are compatible with multiple environments, and are easier to maintain. Intel TBB is the most proficient way to implement future-proof parallel applications that tap into the power and performance of multicore and manycore hardware platforms.""" +description="""Intel Threading Building Blocks 4.0 (Intel TBB) + is a widely used, award-winning C++ template library for creating reliable, + portable, and scalable parallel applications. + Use Intel TBB for a simple and rapid way of developing robust task-based + parallel applications that scale to available processor cores, are compatible + with multiple environments, and are easier to maintain. + Intel TBB is the most proficient way to implement future-proof parallel applications + that tap into the power and performance of multicore and manycore hardware platforms.""" toolkit={'name':'dummy','version':'dummy'} @@ -16,4 +23,5 @@ moduleclass='lib' dontcreateinstalldir='True' ## licensepath -license="/apps/gent/licenses/intel" +import os +license=os.path.join(os.getenv('HOME'),"licenses","intel","license.lic") diff --git a/easybuild/easyconfigs/t/tbb/tbb-4.0.5.339.eb b/easybuild/easyconfigs/t/tbb/tbb-4.0.5.339.eb index d7322f218e..597a88a488 100644 --- a/easybuild/easyconfigs/t/tbb/tbb-4.0.5.339.eb +++ b/easybuild/easyconfigs/t/tbb/tbb-4.0.5.339.eb @@ -2,8 +2,15 @@ name='tbb' version='4.0.5.339' homepage='http://software.intel.com/en-us/articles/intel-tbb/' -description="""Intel Threading Building Blocks 4.0 (Intel TBB) is a widely used, award-winning C++ template library for creating reliable, portable, and scalable parallel applications. Use Intel TBB for a simple and rapid way of developing robust task-based parallel applications that scale to available processor cores, are compatible with multiple environments, and are easier to maintain. Intel TBB is the most proficient way to implement future-proof parallel applications that tap into the power and performance of multicore and manycore hardware platforms.""" - +description="""Intel Threading Building Blocks 4.0 (Intel TBB) + is a widely used, award-winning C++ template library for creating reliable, + portable, and scalable parallel applications. + Use Intel TBB for a simple and rapid way of developing robust task-based + parallel applications that scale to available processor cores, are compatible + with multiple environments, and are easier to maintain. + Intel TBB is the most proficient way to implement future-proof parallel applications + that tap into the power and performance of multicore and manycore hardware platforms.""" + toolkit={'name':'dummy','version':'dummy'} sources=['l_%s_%s.tgz' % (name,version)] @@ -16,4 +23,5 @@ moduleclass='lib' dontcreateinstalldir='True' ## licensepath -license="/apps/gent/licenses/intel" +import os +license=os.path.join(os.getenv('HOME'),"licenses","intel","license.lic") From 977cc73d694e8e73310ffe97f27716c9194f60ea Mon Sep 17 00:00:00 2001 From: Jens Timmerman Date: Wed, 1 Aug 2012 15:15:30 +0300 Subject: [PATCH 306/798] Use updatecfg instead of getcfg, update, setcfg --- easybuild/easyblocks/p/pasha.py | 9 +++------ 1 file changed, 3 insertions(+), 6 deletions(-) diff --git a/easybuild/easyblocks/p/pasha.py b/easybuild/easyblocks/p/pasha.py index 6ce8a3bd9d..fb8f311a51 100644 --- a/easybuild/easyblocks/p/pasha.py +++ b/easybuild/easyblocks/p/pasha.py @@ -33,12 +33,9 @@ class Pasha(Application): def configure(self): """Configure Pasha by setting make options.""" - makeopts = self.getcfg('makeopts') - makeopts = "%s TBB_DIR=$SOFTROOTTBB/tbb MPI_CXX=$MPICXX OPM_FLAG=%s "\ - "MPI_DIR='' MPI_INC='' MPI_LIB='' MY_CXX=$CXX MPICH_IGNORE_CXX_SEEK=1" % \ - (makeopts, self.tk.get_openmp_flag()) - - self.setcfg('makeopts', makeopts) + self.updatecfg('makeopts', "TBB_DIR=$SOFTROOTTBB/tbb MPI_CXX=$MPICXX OPM_FLAG=%s" % self.tk.get_openmp_flag()) + self.updatecfg('makeopts', "MPI_DIR='' MPI_INC='' MPI_LIB='' MY_CXX=$CXX MPICH_IGNORE_CXX_SEEK=1") + def make_install(self): """install by copying everything from 'bin' subdir in build dir to install dir""" From b3936e7804d347281afba01ab9a6457aa845aaa6 Mon Sep 17 00:00:00 2001 From: Kenneth Hoste Date: Wed, 1 Aug 2012 14:39:57 +0200 Subject: [PATCH 307/798] rename Pasha easyconfig dir, added patch file required for ictce, add easyconfig for goalf (refs #1127) --- .../p/Pasha/Pasha-1.0.3-goalf-1.1.0.eb | 16 ++++ .../Pasha-1.0.3-ictce-4.0.6.eb | 12 +-- easybuild/easyconfigs/p/Pasha/intelmpi.patch | 90 +++++++++++++++++++ 3 files changed, 109 insertions(+), 9 deletions(-) create mode 100644 easybuild/easyconfigs/p/Pasha/Pasha-1.0.3-goalf-1.1.0.eb rename easybuild/easyconfigs/p/{PASHA => Pasha}/Pasha-1.0.3-ictce-4.0.6.eb (71%) create mode 100644 easybuild/easyconfigs/p/Pasha/intelmpi.patch diff --git a/easybuild/easyconfigs/p/Pasha/Pasha-1.0.3-goalf-1.1.0.eb b/easybuild/easyconfigs/p/Pasha/Pasha-1.0.3-goalf-1.1.0.eb new file mode 100644 index 0000000000..fc7b9fa662 --- /dev/null +++ b/easybuild/easyconfigs/p/Pasha/Pasha-1.0.3-goalf-1.1.0.eb @@ -0,0 +1,16 @@ +name='Pasha' +version='1.0.3' + +homepage='http://pasha.sourceforge.net/' +description="PASHA is a parallel short read assembler for large genomes using de Bruijn graphs." + +toolkit={'name':'goalf','version':'1.1.0'} +toolkitopts={'pic':True,'opt':True,'optarch':True} + +dependencies=[('tbb','4.0.5.339','',True)] + +sourceURLs=['http://downloads.sourceforge.net/pasha'] +sources=['%s-%s.tar.gz' % (name, version)] + +# Pasha's makefile is not suited for parallel execution. +parallel=1 diff --git a/easybuild/easyconfigs/p/PASHA/Pasha-1.0.3-ictce-4.0.6.eb b/easybuild/easyconfigs/p/Pasha/Pasha-1.0.3-ictce-4.0.6.eb similarity index 71% rename from easybuild/easyconfigs/p/PASHA/Pasha-1.0.3-ictce-4.0.6.eb rename to easybuild/easyconfigs/p/Pasha/Pasha-1.0.3-ictce-4.0.6.eb index 1b01d1ce2b..07fb4c27e9 100644 --- a/easybuild/easyconfigs/p/PASHA/Pasha-1.0.3-ictce-4.0.6.eb +++ b/easybuild/easyconfigs/p/Pasha/Pasha-1.0.3-ictce-4.0.6.eb @@ -7,18 +7,12 @@ description="PASHA is a parallel short read assembler for large genomes using de toolkit={'name':'ictce','version':'4.0.6'} toolkitopts={'pic':True,'opt':True,'optarch':True} -dependencies=[ - ('tbb','4.0.5.339','',True), - ] +dependencies=[('tbb','4.0.5.339','',True)] +sourceURLs=['http://downloads.sourceforge.net/pasha'] sources=['%s-%s.tar.gz' % (name, version)] -sourceURLs=[ - 'http://downloads.sourceforge.net/pasha', -] -patches=[ - 'intelmpi.patch', - ] +patches=['intelmpi.patch'] # Pasha's makefile is not suited for parallel execution. parallel=1 diff --git a/easybuild/easyconfigs/p/Pasha/intelmpi.patch b/easybuild/easyconfigs/p/Pasha/intelmpi.patch new file mode 100644 index 0000000000..16075e78be --- /dev/null +++ b/easybuild/easyconfigs/p/Pasha/intelmpi.patch @@ -0,0 +1,90 @@ +--- Common/AlshaTypes.h.orig 2010-12-27 12:12:32.000000000 +0100 ++++ Common/AlshaTypes.h 2012-07-24 17:26:16.571882868 +0200 +@@ -10,6 +10,10 @@ + #ifndef ALAHSTYPES_H_ + #define ALAHSTYPES_H_ + ++#ifdef ALSHA_MPI ++#include ++#endif ++ + #include + #include + #include +@@ -27,9 +31,7 @@ + #include + #include + +-#ifdef ALSHA_MPI +-#include +-#endif ++ + + using namespace std; + using namespace __gnu_cxx; +--- Common/AlshaUtils.cpp.orig 2012-07-24 17:31:17.000000000 +0200 ++++ Common/AlshaUtils.cpp 2012-07-24 17:31:41.294903288 +0200 +@@ -7,12 +7,14 @@ + * Emails: liuy0039@ntu.edu.sg; nkcslyc@hotmail.com + */ + ++ ++#include "AlshaTypes.h" ++#include "AlshaUtils.h" ++ + #include + #include + #include + +-#include "AlshaTypes.h" +-#include "AlshaUtils.h" + + void* AlshaUtils::memAlloc(NumType size) + { +--- Common/AlshaFileParser.h.orig 2012-07-24 17:37:26.000000000 +0200 ++++ Common/AlshaFileParser.h 2012-07-24 17:37:54.934926782 +0200 +@@ -10,8 +10,8 @@ + #ifndef ALSHAFILEPARSER_H_ + #define ALSHAFILEPARSER_H_ + +-#include "../zlib/zlib.h" + #include "AlshaTypes.h" ++#include "../zlib/zlib.h" + #include "AlshaUtils.h" + #include + #include +--- PreGraph/AlshaMessage.cpp.orig 2012-07-24 18:07:42.123039163 +0200 ++++ PreGraph/AlshaMessage.cpp 2012-07-24 18:06:33.783034865 +0200 +@@ -7,6 +7,9 @@ + * Emails: liuy0039@ntu.edu.sg; nkcslyc@hotmail.com + */ + ++#define MPICH_IGNORE_CXX_SEEK ++#define MPICH_SKIP_MPICXX ++ + #include "AlshaMessage.h" + #include "AlshaComms.h" + #include "AlshaParams.h" +--- PreGraph/AlshaComms.cpp.orig 2010-08-18 14:53:36.000000000 +0200 ++++ PreGraph/AlshaComms.cpp 2012-07-24 18:09:14.332044961 +0200 +@@ -1,6 +1,6 @@ ++#include + #include "AlshaComms.h" + #include "AlshaParams.h" +-#include + + MPI_Request AlshaComms::msgRequest = MPI_REQUEST_NULL; + uint8_t* AlshaComms::RX_BUFFER = NULL; +--- PreGraph/AlshaThread.cpp.orig 2012-07-24 18:12:46.000000000 +0200 ++++ PreGraph/AlshaThread.cpp 2012-07-24 18:13:18.485060314 +0200 +@@ -7,6 +7,9 @@ + * Emails: liuy0039@ntu.edu.sg; nkcslyc@hotmail.com + */ + ++#define MPICH_IGNORE_CXX_SEEK ++#define MPICH_SKIP_MPICXX ++ + #include "AlshaThread.h" + #include "Alsha.h" + + From 80fd0f54f517767bb9ce8373ab73dc47685609a3 Mon Sep 17 00:00:00 2001 From: Kenneth Hoste Date: Wed, 1 Aug 2012 14:44:47 +0200 Subject: [PATCH 308/798] check for TBB dependency --- easybuild/easyblocks/p/pasha.py | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-) diff --git a/easybuild/easyblocks/p/pasha.py b/easybuild/easyblocks/p/pasha.py index fb8f311a51..875109e5b4 100644 --- a/easybuild/easyblocks/p/pasha.py +++ b/easybuild/easyblocks/p/pasha.py @@ -33,12 +33,17 @@ class Pasha(Application): def configure(self): """Configure Pasha by setting make options.""" - self.updatecfg('makeopts', "TBB_DIR=$SOFTROOTTBB/tbb MPI_CXX=$MPICXX OPM_FLAG=%s" % self.tk.get_openmp_flag()) + + tbb = os.getenv('SOFTROOTTBB') + if not tbb: + self.log.error("TBB module not loaded.") + + self.updatecfg('makeopts', "TBB_DIR=%s/tbb MPI_CXX=$MPICXX OPM_FLAG=%s" % (tbb, self.tk.get_openmp_flag())) self.updatecfg('makeopts', "MPI_DIR='' MPI_INC='' MPI_LIB='' MY_CXX=$CXX MPICH_IGNORE_CXX_SEEK=1") - def make_install(self): - """install by copying everything from 'bin' subdir in build dir to install dir""" + """Install by copying everything from 'bin' subdir in build dir to install dir""" + srcdir = os.path.join(self.builddir, "%s-%s" % (self.name(), self.version()), 'bin') shutil.copytree(srcdir, os.path.join(self.installdir, 'bin')) @@ -49,4 +54,3 @@ def sanitycheck(self): 'dirs':[""], }) - From f8f909b7a4f9a7f250da23ada1f2836f81c85d1c Mon Sep 17 00:00:00 2001 From: Kenneth Hoste Date: Wed, 1 Aug 2012 16:30:47 +0200 Subject: [PATCH 309/798] add no-OFED suffix to goalf toolkit for Pasha example easyconfig --- ...-1.0.3-goalf-1.1.0.eb => Pasha-1.0.3-goalf-1.1.0-no-OFED.eb} | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) rename easybuild/easyconfigs/p/Pasha/{Pasha-1.0.3-goalf-1.1.0.eb => Pasha-1.0.3-goalf-1.1.0-no-OFED.eb} (89%) diff --git a/easybuild/easyconfigs/p/Pasha/Pasha-1.0.3-goalf-1.1.0.eb b/easybuild/easyconfigs/p/Pasha/Pasha-1.0.3-goalf-1.1.0-no-OFED.eb similarity index 89% rename from easybuild/easyconfigs/p/Pasha/Pasha-1.0.3-goalf-1.1.0.eb rename to easybuild/easyconfigs/p/Pasha/Pasha-1.0.3-goalf-1.1.0-no-OFED.eb index fc7b9fa662..8c92d8a791 100644 --- a/easybuild/easyconfigs/p/Pasha/Pasha-1.0.3-goalf-1.1.0.eb +++ b/easybuild/easyconfigs/p/Pasha/Pasha-1.0.3-goalf-1.1.0-no-OFED.eb @@ -4,7 +4,7 @@ version='1.0.3' homepage='http://pasha.sourceforge.net/' description="PASHA is a parallel short read assembler for large genomes using de Bruijn graphs." -toolkit={'name':'goalf','version':'1.1.0'} +toolkit={'name':'goalf','version':'1.1.0-no-OFED'} toolkitopts={'pic':True,'opt':True,'optarch':True} dependencies=[('tbb','4.0.5.339','',True)] From 3e3356534cad8af5c9a0b0affadabae9c9802001 Mon Sep 17 00:00:00 2001 From: Kenneth Hoste Date: Thu, 2 Aug 2012 10:17:37 +0200 Subject: [PATCH 310/798] add patch for building Pasha with recent GCC compiler --- .../Pasha/Pasha-1.0.3-goalf-1.1.0-no-OFED.eb | 2 + .../p/Pasha/gcc-hash_fun-map-set.patch | 61 +++++++++++++++++++ 2 files changed, 63 insertions(+) create mode 100644 easybuild/easyconfigs/p/Pasha/gcc-hash_fun-map-set.patch diff --git a/easybuild/easyconfigs/p/Pasha/Pasha-1.0.3-goalf-1.1.0-no-OFED.eb b/easybuild/easyconfigs/p/Pasha/Pasha-1.0.3-goalf-1.1.0-no-OFED.eb index 8c92d8a791..e54ae6a9d5 100644 --- a/easybuild/easyconfigs/p/Pasha/Pasha-1.0.3-goalf-1.1.0-no-OFED.eb +++ b/easybuild/easyconfigs/p/Pasha/Pasha-1.0.3-goalf-1.1.0-no-OFED.eb @@ -12,5 +12,7 @@ dependencies=[('tbb','4.0.5.339','',True)] sourceURLs=['http://downloads.sourceforge.net/pasha'] sources=['%s-%s.tar.gz' % (name, version)] +patches=['gcc-hash_fun-map-set.patch'] + # Pasha's makefile is not suited for parallel execution. parallel=1 diff --git a/easybuild/easyconfigs/p/Pasha/gcc-hash_fun-map-set.patch b/easybuild/easyconfigs/p/Pasha/gcc-hash_fun-map-set.patch new file mode 100644 index 0000000000..a8a9cab2a3 --- /dev/null +++ b/easybuild/easyconfigs/p/Pasha/gcc-hash_fun-map-set.patch @@ -0,0 +1,61 @@ +diff -ru Pasha-1.0.3.orig/google/dense_hash_map Pasha-1.0.3/google/dense_hash_map +--- Pasha-1.0.3.orig/google/dense_hash_map 2010-12-07 04:43:26.000000000 +0100 ++++ Pasha-1.0.3/google/dense_hash_map 2012-08-02 10:15:22.758689520 +0200 +@@ -103,7 +103,7 @@ + #include // for equal_to + #include // for alloc<> + #include // for pair<> +-#include HASH_FUN_H // defined in config.h ++#include HASH_MAP_H // defined in config.h + #include + #include + +diff -ru Pasha-1.0.3.orig/google/dense_hash_set Pasha-1.0.3/google/dense_hash_set +--- Pasha-1.0.3.orig/google/dense_hash_set 2010-12-07 04:43:26.000000000 +0100 ++++ Pasha-1.0.3/google/dense_hash_set 2012-08-02 10:15:12.680591773 +0200 +@@ -107,7 +107,7 @@ + #include // for equal_to + #include // for alloc<> + #include // for pair<> +-#include HASH_FUN_H // defined in config.h ++#include HASH_SET_H // defined in config.h + #include + #include + +diff -ru Pasha-1.0.3.orig/google/sparsehash/sparseconfig.h Pasha-1.0.3/google/sparsehash/sparseconfig.h +--- Pasha-1.0.3.orig/google/sparsehash/sparseconfig.h 2010-12-07 04:43:26.000000000 +0100 ++++ Pasha-1.0.3/google/sparsehash/sparseconfig.h 2012-08-02 10:15:34.118799712 +0200 +@@ -7,7 +7,8 @@ + #define GOOGLE_NAMESPACE ::google + + /* the location of the header defining hash functions */ +-#define HASH_FUN_H ++#define HASH_MAP_H ++#define HASH_SET_H + + /* the namespace of the hash<> function */ + #define HASH_NAMESPACE __gnu_cxx +diff -ru Pasha-1.0.3.orig/google/sparse_hash_map Pasha-1.0.3/google/sparse_hash_map +--- Pasha-1.0.3.orig/google/sparse_hash_map 2010-12-07 04:43:26.000000000 +0100 ++++ Pasha-1.0.3/google/sparse_hash_map 2012-08-02 10:15:26.615727009 +0200 +@@ -91,7 +91,7 @@ + #include // for equal_to + #include // for alloc<> + #include // for pair<> +-#include HASH_FUN_H // defined in config.h ++#include HASH_MAP_H // defined in config.h + #include + #include + +diff -ru Pasha-1.0.3.orig/google/sparse_hash_set Pasha-1.0.3/google/sparse_hash_set +--- Pasha-1.0.3.orig/google/sparse_hash_set 2010-12-07 04:43:26.000000000 +0100 ++++ Pasha-1.0.3/google/sparse_hash_set 2012-08-02 10:15:17.334636915 +0200 +@@ -95,7 +95,7 @@ + #include // for equal_to + #include // for alloc<> + #include // for pair<> +-#include HASH_FUN_H // defined in config.h ++#include HASH_SET_H // defined in config.h + #include + #include + From 33c9762b90acd0189cc07937e03dfdfe3c7d01a6 Mon Sep 17 00:00:00 2001 From: Kenneth Hoste Date: Fri, 3 Aug 2012 07:06:14 +0200 Subject: [PATCH 311/798] use empty line between Python and EasyBuild imports everywhere --- easybuild/easyblocks/a/atlas.py | 1 + easybuild/easyblocks/b/binary.py | 2 +- easybuild/easyblocks/b/blacs.py | 1 + easybuild/easyblocks/c/cp2k.py | 1 + easybuild/easyblocks/g/g2clib.py | 1 + easybuild/easyblocks/g/g2lib.py | 1 + easybuild/easyblocks/h/hdf5.py | 1 + easybuild/easyblocks/h/hpl.py | 1 + easybuild/easyblocks/i/icc.py | 1 - easybuild/easyblocks/i/imkl.py | 2 -- easybuild/easyblocks/i/impi.py | 1 - easybuild/easyblocks/i/intelbase.py | 1 + easybuild/easyblocks/l/lapack.py | 1 + easybuild/easyblocks/l/libsmm.py | 3 ++- easybuild/easyblocks/m/maple.py | 1 + easybuild/easyblocks/m/mrbayes.py | 1 + easybuild/easyblocks/m/mvapich2.py | 1 + easybuild/easyblocks/n/ncl.py | 1 + easybuild/easyblocks/n/netcdf.py | 1 + easybuild/easyblocks/n/netcdf_fortran.py | 1 + easybuild/easyblocks/p/python.py | 1 + easybuild/easyblocks/s/scalapack.py | 1 + easybuild/easyblocks/t/tarball.py | 1 + easybuild/easyblocks/t/tbb.py | 4 ++-- easybuild/easyblocks/w/wps.py | 1 + easybuild/easyblocks/w/wrf.py | 1 + 26 files changed, 25 insertions(+), 8 deletions(-) diff --git a/easybuild/easyblocks/a/atlas.py b/easybuild/easyblocks/a/atlas.py index 8dbb06fcec..c2c8fa4046 100644 --- a/easybuild/easyblocks/a/atlas.py +++ b/easybuild/easyblocks/a/atlas.py @@ -20,6 +20,7 @@ ## import re import os + from easybuild.framework.application import Application from easybuild.tools.filetools import run_cmd diff --git a/easybuild/easyblocks/b/binary.py b/easybuild/easyblocks/b/binary.py index e4e83ccd51..85a5eea026 100644 --- a/easybuild/easyblocks/b/binary.py +++ b/easybuild/easyblocks/b/binary.py @@ -22,7 +22,7 @@ EasyBlock for binary applications """ import shutil -import os + from easybuild.framework.application import Application class Binary(Application): diff --git a/easybuild/easyblocks/b/blacs.py b/easybuild/easyblocks/b/blacs.py index 7a89dd8ed8..96b0cf2403 100644 --- a/easybuild/easyblocks/b/blacs.py +++ b/easybuild/easyblocks/b/blacs.py @@ -22,6 +22,7 @@ import re import os import shutil + from easybuild.framework.application import Application from easybuild.tools.filetools import run_cmd diff --git a/easybuild/easyblocks/c/cp2k.py b/easybuild/easyblocks/c/cp2k.py index bf11aa33ac..ad192efddb 100644 --- a/easybuild/easyblocks/c/cp2k.py +++ b/easybuild/easyblocks/c/cp2k.py @@ -25,6 +25,7 @@ import os import shutil import sys + from easybuild.framework.application import Application from easybuild.tools.filetools import run_cmd import easybuild.tools.toolkit as toolkit diff --git a/easybuild/easyblocks/g/g2clib.py b/easybuild/easyblocks/g/g2clib.py index beaebb2a24..597197b490 100644 --- a/easybuild/easyblocks/g/g2clib.py +++ b/easybuild/easyblocks/g/g2clib.py @@ -21,6 +21,7 @@ import glob import os import shutil + from easybuild.framework.application import Application class G2clib(Application): diff --git a/easybuild/easyblocks/g/g2lib.py b/easybuild/easyblocks/g/g2lib.py index 9cc357ba00..edf63dfc38 100644 --- a/easybuild/easyblocks/g/g2lib.py +++ b/easybuild/easyblocks/g/g2lib.py @@ -20,6 +20,7 @@ ## import os import shutil + from easybuild.framework.application import Application class G2lib(Application): diff --git a/easybuild/easyblocks/h/hdf5.py b/easybuild/easyblocks/h/hdf5.py index 61aaebba79..47754e67bb 100644 --- a/easybuild/easyblocks/h/hdf5.py +++ b/easybuild/easyblocks/h/hdf5.py @@ -19,6 +19,7 @@ # along with EasyBuild. If not, see . ## import os + from easybuild.framework.application import Application class HDF5(Application): diff --git a/easybuild/easyblocks/h/hpl.py b/easybuild/easyblocks/h/hpl.py index e27ea7060b..02bafe7e22 100644 --- a/easybuild/easyblocks/h/hpl.py +++ b/easybuild/easyblocks/h/hpl.py @@ -20,6 +20,7 @@ ## import os import shutil + from easybuild.framework.application import Application from easybuild.tools.filetools import run_cmd diff --git a/easybuild/easyblocks/i/icc.py b/easybuild/easyblocks/i/icc.py index 937adad643..897ef37722 100644 --- a/easybuild/easyblocks/i/icc.py +++ b/easybuild/easyblocks/i/icc.py @@ -20,7 +20,6 @@ ## import os - from distutils.version import LooseVersion from easybuild.easyblocks.i.intelbase import IntelBase diff --git a/easybuild/easyblocks/i/imkl.py b/easybuild/easyblocks/i/imkl.py index 34e39aadb6..fbeddf2312 100644 --- a/easybuild/easyblocks/i/imkl.py +++ b/easybuild/easyblocks/i/imkl.py @@ -22,13 +22,11 @@ import os import shutil import tempfile - from distutils.version import LooseVersion from easybuild.easyblocks.i.intelbase import IntelBase from easybuild.tools.filetools import run_cmd from easybuild.tools.modules import Modules - import easybuild.tools.environment as env class Imkl(IntelBase): diff --git a/easybuild/easyblocks/i/impi.py b/easybuild/easyblocks/i/impi.py index e943621f46..38efe03721 100644 --- a/easybuild/easyblocks/i/impi.py +++ b/easybuild/easyblocks/i/impi.py @@ -20,7 +20,6 @@ ## import os - from distutils.version import LooseVersion from easybuild.easyblocks.i.intelbase import IntelBase diff --git a/easybuild/easyblocks/i/intelbase.py b/easybuild/easyblocks/i/intelbase.py index c65337c124..baf45271c8 100644 --- a/easybuild/easyblocks/i/intelbase.py +++ b/easybuild/easyblocks/i/intelbase.py @@ -20,6 +20,7 @@ ## import os import shutil + from easybuild.framework.application import Application from easybuild.tools.filetools import run_cmd import easybuild.tools.environment as env diff --git a/easybuild/easyblocks/l/lapack.py b/easybuild/easyblocks/l/lapack.py index b21d1a88e8..045c969454 100644 --- a/easybuild/easyblocks/l/lapack.py +++ b/easybuild/easyblocks/l/lapack.py @@ -21,6 +21,7 @@ import glob import os import shutil + from easybuild.framework.application import Application from easybuild.tools.filetools import run_cmd diff --git a/easybuild/easyblocks/l/libsmm.py b/easybuild/easyblocks/l/libsmm.py index c63d361a9a..a699610263 100644 --- a/easybuild/easyblocks/l/libsmm.py +++ b/easybuild/easyblocks/l/libsmm.py @@ -21,7 +21,8 @@ import os import shutil from distutils.version import LooseVersion -import easybuild + +import easybuild # required for VERBOSE_VERSION from easybuild.framework.application import Application from easybuild.tools.filetools import run_cmd from easybuild.tools.modules import get_software_root diff --git a/easybuild/easyblocks/m/maple.py b/easybuild/easyblocks/m/maple.py index 04ca5ef020..fdb586cae6 100644 --- a/easybuild/easyblocks/m/maple.py +++ b/easybuild/easyblocks/m/maple.py @@ -20,6 +20,7 @@ ## import os import shutil + from easybuild.framework.application import Application from easybuild.tools.filetools import run_cmd_qa diff --git a/easybuild/easyblocks/m/mrbayes.py b/easybuild/easyblocks/m/mrbayes.py index 8181ad8dd9..40f64ce821 100644 --- a/easybuild/easyblocks/m/mrbayes.py +++ b/easybuild/easyblocks/m/mrbayes.py @@ -22,6 +22,7 @@ import os import shutil from distutils.version import LooseVersion + from easybuild.framework.application import Application from easybuild.tools.filetools import run_cmd diff --git a/easybuild/easyblocks/m/mvapich2.py b/easybuild/easyblocks/m/mvapich2.py index 6d08799024..d2d976bc5c 100644 --- a/easybuild/easyblocks/m/mvapich2.py +++ b/easybuild/easyblocks/m/mvapich2.py @@ -19,6 +19,7 @@ # along with EasyBuild. If not, see . ## import os + from easybuild.framework.application import Application import easybuild.tools.environment as env diff --git a/easybuild/easyblocks/n/ncl.py b/easybuild/easyblocks/n/ncl.py index 5a16d9ff26..d02b67ec62 100644 --- a/easybuild/easyblocks/n/ncl.py +++ b/easybuild/easyblocks/n/ncl.py @@ -23,6 +23,7 @@ import os import re import sys + from easybuild.framework.application import Application from easybuild.tools.filetools import run_cmd from easybuild.tools.modules import get_software_root diff --git a/easybuild/easyblocks/n/netcdf.py b/easybuild/easyblocks/n/netcdf.py index 63b30cfede..f7b515e256 100644 --- a/easybuild/easyblocks/n/netcdf.py +++ b/easybuild/easyblocks/n/netcdf.py @@ -20,6 +20,7 @@ ## import os from distutils.version import LooseVersion + from easybuild.framework.application import Application import easybuild.tools.environment as env import easybuild.tools.toolkit as toolkit diff --git a/easybuild/easyblocks/n/netcdf_fortran.py b/easybuild/easyblocks/n/netcdf_fortran.py index a1e9c8a4f3..057ee3139d 100644 --- a/easybuild/easyblocks/n/netcdf_fortran.py +++ b/easybuild/easyblocks/n/netcdf_fortran.py @@ -19,6 +19,7 @@ # along with EasyBuild. If not, see . ## import os + from easybuild.framework.application import Application import easybuild.tools.environment as env import easybuild.tools.toolkit as toolkit diff --git a/easybuild/easyblocks/p/python.py b/easybuild/easyblocks/p/python.py index 2dd6eae2fe..abfa3157e3 100644 --- a/easybuild/easyblocks/p/python.py +++ b/easybuild/easyblocks/p/python.py @@ -20,6 +20,7 @@ ## import os import shutil + from easybuild.framework.application import ApplicationPackage, Application from easybuild.tools.filetools import unpack, patch, run_cmd import easybuild.tools.toolkit as toolkit diff --git a/easybuild/easyblocks/s/scalapack.py b/easybuild/easyblocks/s/scalapack.py index cc58d47b95..40908f2c7b 100644 --- a/easybuild/easyblocks/s/scalapack.py +++ b/easybuild/easyblocks/s/scalapack.py @@ -21,6 +21,7 @@ import os import shutil from distutils.version import LooseVersion + from easybuild.framework.application import Application from easybuild.easyblocks.b.blacs import det_interface from easybuild.easyblocks.l.lapack import get_blas_lib diff --git a/easybuild/easyblocks/t/tarball.py b/easybuild/easyblocks/t/tarball.py index 6388ab0011..7bf5a5cfbe 100644 --- a/easybuild/easyblocks/t/tarball.py +++ b/easybuild/easyblocks/t/tarball.py @@ -19,6 +19,7 @@ # along with EasyBuild. If not, see . ## import shutil + from easybuild.framework.application import Application class Tarball(Application): diff --git a/easybuild/easyblocks/t/tbb.py b/easybuild/easyblocks/t/tbb.py index 891f1f1002..48c0c92e87 100644 --- a/easybuild/easyblocks/t/tbb.py +++ b/easybuild/easyblocks/t/tbb.py @@ -22,6 +22,7 @@ import os import shutil import glob + from easybuild.easyblocks.i.intelbase import IntelBase class Tbb(IntelBase): @@ -38,7 +39,7 @@ def make_install(self): libglob = 'tbb/libs/intel64/cc*libc*_kernel*' libs = glob.glob(libglob) if len(libs): - libdir = libs[-1] # take the last one, should be ordered by cc version. + libdir = libs[-1] # take the last one, should be ordered by cc version. else: self.log.error("No libs found using %s in %s" % (libglob, self.installdir)) self.libdir = libdir @@ -67,7 +68,6 @@ def make_module_extra(self): """Add correct path to lib to LD_LIBRARY_PATH. and intel license file""" txt = IntelBase.make_module_extra(self) - # since we have symlinked it we could also use $SOFTROOTTBB/tbb/lib here txt += "prepend-path\t%s\t\t%s\n" % ('LD_LIBRARY_PATH', self.libpath) return txt diff --git a/easybuild/easyblocks/w/wps.py b/easybuild/easyblocks/w/wps.py index 2b95801209..b2e7f64edf 100644 --- a/easybuild/easyblocks/w/wps.py +++ b/easybuild/easyblocks/w/wps.py @@ -25,6 +25,7 @@ import shutil import sys import tempfile + from easybuild.framework.application import Application from easybuild.tools.filetools import patch_perl_script_autoflush, run_cmd, run_cmd_qa, unpack from easybuild.easyblocks.n.netcdf import set_netcdf_env_vars, get_netcdf_module_set_cmds diff --git a/easybuild/easyblocks/w/wrf.py b/easybuild/easyblocks/w/wrf.py index 8a0380aa8d..9a7cc16ef4 100644 --- a/easybuild/easyblocks/w/wrf.py +++ b/easybuild/easyblocks/w/wrf.py @@ -22,6 +22,7 @@ import os import re import sys + from easybuild.framework.application import Application from easybuild.tools.filetools import patch_perl_script_autoflush, run_cmd, run_cmd_qa from easybuild.easyblocks.n.netcdf import set_netcdf_env_vars, get_netcdf_module_set_cmds From f3379a4290d99f98d5251b15a20f6047527042bb Mon Sep 17 00:00:00 2001 From: Kenneth Hoste Date: Fri, 3 Aug 2012 07:09:55 +0200 Subject: [PATCH 312/798] process remarks made on pull request --- easybuild/easyblocks/p/pasha.py | 13 +++++----- easybuild/easyblocks/t/tbb.py | 6 ++--- .../Pasha/Pasha-1.0.3-goalf-1.1.0-no-OFED.eb | 24 ++++++++--------- .../p/Pasha/Pasha-1.0.3-ictce-4.0.6.eb | 26 +++++++++---------- 4 files changed, 35 insertions(+), 34 deletions(-) diff --git a/easybuild/easyblocks/p/pasha.py b/easybuild/easyblocks/p/pasha.py index 875109e5b4..2800f389ae 100644 --- a/easybuild/easyblocks/p/pasha.py +++ b/easybuild/easyblocks/p/pasha.py @@ -27,9 +27,7 @@ from easybuild.framework.application import Application class Pasha(Application): - """ - Support for building and installing Pasha" - """ + """Support for building and installing Pasha""" def configure(self): """Configure Pasha by setting make options.""" @@ -38,8 +36,9 @@ def configure(self): if not tbb: self.log.error("TBB module not loaded.") - self.updatecfg('makeopts', "TBB_DIR=%s/tbb MPI_CXX=$MPICXX OPM_FLAG=%s" % (tbb, self.tk.get_openmp_flag())) - self.updatecfg('makeopts', "MPI_DIR='' MPI_INC='' MPI_LIB='' MY_CXX=$CXX MPICH_IGNORE_CXX_SEEK=1") + self.updatecfg('makeopts', "TBB_DIR=%s/tbb MPI_DIR='' MPI_INC=''") + self.updatecfg('makeopts', "MPI_CXX=$MPICXX OPM_FLAG=%s" % (tbb, self.tk.get_openmp_flag())) + self.updatecfg('makeopts', "MPI_LIB='' MY_CXX=$CXX MPICH_IGNORE_CXX_SEEK=1") def make_install(self): """Install by copying everything from 'bin' subdir in build dir to install dir""" @@ -50,7 +49,9 @@ def make_install(self): def sanitycheck(self): """Custom sanity check for Pasha""" self.setcfg('sanityCheckPaths', { - 'files':["bin/pasha-%s" % x for x in ["kmergen", "pregraph", "graph"]], + 'files':["bin/pasha-%s" % x for x in ["kmergen", + "pregraph", + "graph"]], 'dirs':[""], }) diff --git a/easybuild/easyblocks/t/tbb.py b/easybuild/easyblocks/t/tbb.py index 48c0c92e87..28bdfa5f8f 100644 --- a/easybuild/easyblocks/t/tbb.py +++ b/easybuild/easyblocks/t/tbb.py @@ -48,9 +48,9 @@ def make_install(self): self.libpath = "%s/tbb/libs/intel64/%s/" % (self.installdir, libdir) # applications go looking into tbb/lib so we move what's in there to libs # and symlink the right lib from /tbb/libs/intel64/... to lib - installibpath = os.path.join(self.installdir, 'tbb', 'lib') - shutil.move(installibpath, os.path.join(self.installdir, 'tbb', 'libs')) - os.symlink(self.libpath, installibpath) + install_libpath = os.path.join(self.installdir, 'tbb', 'lib') + shutil.move(install_libpath, os.path.join(self.installdir, 'tbb', 'libs')) + os.symlink(self.libpath, install_libpath) def sanitycheck(self): diff --git a/easybuild/easyconfigs/p/Pasha/Pasha-1.0.3-goalf-1.1.0-no-OFED.eb b/easybuild/easyconfigs/p/Pasha/Pasha-1.0.3-goalf-1.1.0-no-OFED.eb index e54ae6a9d5..25f90bf065 100644 --- a/easybuild/easyconfigs/p/Pasha/Pasha-1.0.3-goalf-1.1.0-no-OFED.eb +++ b/easybuild/easyconfigs/p/Pasha/Pasha-1.0.3-goalf-1.1.0-no-OFED.eb @@ -1,18 +1,18 @@ -name='Pasha' -version='1.0.3' +name = 'Pasha' +version = '1.0.3' -homepage='http://pasha.sourceforge.net/' -description="PASHA is a parallel short read assembler for large genomes using de Bruijn graphs." +homepage = 'http://pasha.sourceforge.net/' +description = "PASHA is a parallel short read assembler for large genomes using de Bruijn graphs." -toolkit={'name':'goalf','version':'1.1.0-no-OFED'} -toolkitopts={'pic':True,'opt':True,'optarch':True} +toolkit = {'name':'goalf', 'version':'1.1.0-no-OFED'} +toolkitopts = {'pic':True, 'opt':True, 'optarch':True} -dependencies=[('tbb','4.0.5.339','',True)] +dependencies = [('tbb', '4.0.5.339', '', True)] -sourceURLs=['http://downloads.sourceforge.net/pasha'] -sources=['%s-%s.tar.gz' % (name, version)] +sourceURLs = ['http://downloads.sourceforge.net/pasha'] +sources = ['%s-%s.tar.gz' % (name, version)] -patches=['gcc-hash_fun-map-set.patch'] +patches = ['gcc-hash_fun-map-set.patch'] -# Pasha's makefile is not suited for parallel execution. -parallel=1 +# Pasha's makefile is not suited for parallel execution +parallel = 1 diff --git a/easybuild/easyconfigs/p/Pasha/Pasha-1.0.3-ictce-4.0.6.eb b/easybuild/easyconfigs/p/Pasha/Pasha-1.0.3-ictce-4.0.6.eb index 07fb4c27e9..d417442d44 100644 --- a/easybuild/easyconfigs/p/Pasha/Pasha-1.0.3-ictce-4.0.6.eb +++ b/easybuild/easyconfigs/p/Pasha/Pasha-1.0.3-ictce-4.0.6.eb @@ -1,18 +1,18 @@ -name='Pasha' -version='1.0.3' +name = 'Pasha' +version = '1.0.3' -homepage='http://pasha.sourceforge.net/' -description="PASHA is a parallel short read assembler for large genomes using de Bruijn graphs." +homepage = 'http://pasha.sourceforge.net/' +description = "PASHA is a parallel short read assembler for large genomes using de Bruijn graphs." -toolkit={'name':'ictce','version':'4.0.6'} -toolkitopts={'pic':True,'opt':True,'optarch':True} +toolkit = {'name':'ictce', 'version':'4.0.6'} +toolkitopts = {'pic':True, 'opt':True, 'optarch':True} -dependencies=[('tbb','4.0.5.339','',True)] +dependencies = [('tbb', '4.0.5.339', '', True)] -sourceURLs=['http://downloads.sourceforge.net/pasha'] -sources=['%s-%s.tar.gz' % (name, version)] +sourceURLs = ['http://downloads.sourceforge.net/pasha'] +sources = ['%s-%s.tar.gz' % (name, version)] -patches=['intelmpi.patch'] - -# Pasha's makefile is not suited for parallel execution. -parallel=1 +patches = ['intelmpi.patch'] + +# Pasha's makefile is not suited for parallel execution +parallel = 1 From d63356d390af29afde0b2f9845b9a9478f4ae122 Mon Sep 17 00:00:00 2001 From: Kenneth Hoste Date: Fri, 3 Aug 2012 09:47:22 +0200 Subject: [PATCH 313/798] processed remarks w.r.t. import order and module docstrings --- easybuild/easyblocks/a/atlas.py | 4 ++++ easybuild/easyblocks/b/binary.py | 3 ++- easybuild/easyblocks/b/blacs.py | 4 ++++ easybuild/easyblocks/c/cp2k.py | 4 ++++ easybuild/easyblocks/d/doxygen.py | 4 ++++ easybuild/easyblocks/f/fsl.py | 4 ++++ easybuild/easyblocks/g/g2clib.py | 4 ++++ easybuild/easyblocks/g/g2lib.py | 4 ++++ easybuild/easyblocks/g/gcc.py | 4 ++++ easybuild/easyblocks/h/hdf5.py | 4 ++++ easybuild/easyblocks/h/hpl.py | 4 ++++ easybuild/easyblocks/i/icc.py | 3 +++ easybuild/easyblocks/i/ifort.py | 3 +++ easybuild/easyblocks/i/imkl.py | 6 +++++- easybuild/easyblocks/i/impi.py | 3 +++ easybuild/easyblocks/i/intelbase.py | 6 +++++- easybuild/easyblocks/i/ipp.py | 3 +++ easybuild/easyblocks/i/itac.py | 3 +++ easybuild/easyblocks/l/lapack.py | 4 ++++ easybuild/easyblocks/l/libsmm.py | 4 ++++ easybuild/easyblocks/m/maple.py | 4 ++++ easybuild/easyblocks/m/mrbayes.py | 4 ++++ easybuild/easyblocks/m/mvapich2.py | 6 +++++- easybuild/easyblocks/n/ncl.py | 4 ++++ easybuild/easyblocks/n/netcdf.py | 6 +++++- easybuild/easyblocks/n/netcdf_fortran.py | 6 +++++- easybuild/easyblocks/p/pasha.py | 2 +- easybuild/easyblocks/p/python.py | 4 ++++ easybuild/easyblocks/s/scalapack.py | 4 ++++ easybuild/easyblocks/t/tarball.py | 5 +++++ easybuild/easyblocks/t/tbb.py | 7 ++++--- easybuild/easyblocks/t/toolkit.py | 4 ++++ easybuild/easyblocks/w/wps.py | 10 +++++++--- easybuild/easyblocks/w/wrf.py | 8 ++++++-- 34 files changed, 137 insertions(+), 15 deletions(-) diff --git a/easybuild/easyblocks/a/atlas.py b/easybuild/easyblocks/a/atlas.py index c2c8fa4046..ffebc8705b 100644 --- a/easybuild/easyblocks/a/atlas.py +++ b/easybuild/easyblocks/a/atlas.py @@ -18,6 +18,10 @@ # You should have received a copy of the GNU General Public License # along with EasyBuild. If not, see . ## +""" +EasyBuild support for building and installing ATLAS, implemented as an easyblock +""" + import re import os diff --git a/easybuild/easyblocks/b/binary.py b/easybuild/easyblocks/b/binary.py index 85a5eea026..61bb0e9c2e 100644 --- a/easybuild/easyblocks/b/binary.py +++ b/easybuild/easyblocks/b/binary.py @@ -19,8 +19,9 @@ # along with EasyBuild. If not, see . ## """ -EasyBlock for binary applications +General EasyBuild support for software with a binary installer """ + import shutil from easybuild.framework.application import Application diff --git a/easybuild/easyblocks/b/blacs.py b/easybuild/easyblocks/b/blacs.py index 96b0cf2403..558951912d 100644 --- a/easybuild/easyblocks/b/blacs.py +++ b/easybuild/easyblocks/b/blacs.py @@ -18,6 +18,10 @@ # You should have received a copy of the GNU General Public License # along with EasyBuild. If not, see . ## +""" +EasyBuild support for building and installing BLACS, implemented as an easyblock +""" + import glob import re import os diff --git a/easybuild/easyblocks/c/cp2k.py b/easybuild/easyblocks/c/cp2k.py index ad192efddb..3076267c74 100644 --- a/easybuild/easyblocks/c/cp2k.py +++ b/easybuild/easyblocks/c/cp2k.py @@ -18,6 +18,10 @@ # You should have received a copy of the GNU General Public License # along with EasyBuild. If not, see . ## +""" +EasyBuild support for building and installing CP2K, implemented as an easyblock +""" + from distutils.version import LooseVersion import fileinput import glob diff --git a/easybuild/easyblocks/d/doxygen.py b/easybuild/easyblocks/d/doxygen.py index f80d464a78..c2996e34f6 100644 --- a/easybuild/easyblocks/d/doxygen.py +++ b/easybuild/easyblocks/d/doxygen.py @@ -18,6 +18,10 @@ # You should have received a copy of the GNU General Public License # along with EasyBuild. If not, see . ## +""" +EasyBuild support for building and installing Doxygen, implemented as an easyblock +""" + from easybuild.framework.application import Application from easybuild.tools.filetools import run_cmd diff --git a/easybuild/easyblocks/f/fsl.py b/easybuild/easyblocks/f/fsl.py index 770e06b3a2..c72b888672 100644 --- a/easybuild/easyblocks/f/fsl.py +++ b/easybuild/easyblocks/f/fsl.py @@ -18,6 +18,10 @@ # You should have received a copy of the GNU General Public License # along with EasyBuild. If not, see . ## +""" +EasyBuild support for building and installing FSL, implemented as an easyblock +""" + import difflib import os import re diff --git a/easybuild/easyblocks/g/g2clib.py b/easybuild/easyblocks/g/g2clib.py index 597197b490..449d9ab98a 100644 --- a/easybuild/easyblocks/g/g2clib.py +++ b/easybuild/easyblocks/g/g2clib.py @@ -18,6 +18,10 @@ # You should have received a copy of the GNU General Public License # along with EasyBuild. If not, see . ## +""" +EasyBuild support for building and installing g2clib, implemented as an easyblock +""" + import glob import os import shutil diff --git a/easybuild/easyblocks/g/g2lib.py b/easybuild/easyblocks/g/g2lib.py index edf63dfc38..f3bf1affc8 100644 --- a/easybuild/easyblocks/g/g2lib.py +++ b/easybuild/easyblocks/g/g2lib.py @@ -18,6 +18,10 @@ # You should have received a copy of the GNU General Public License # along with EasyBuild. If not, see . ## +""" +EasyBuild support for building and installing g2lib, implemented as an easyblock +""" + import os import shutil diff --git a/easybuild/easyblocks/g/gcc.py b/easybuild/easyblocks/g/gcc.py index 23161d33e7..d9630c1f34 100644 --- a/easybuild/easyblocks/g/gcc.py +++ b/easybuild/easyblocks/g/gcc.py @@ -18,6 +18,10 @@ # You should have received a copy of the GNU General Public License # along with EasyBuild. If not, see . ## +""" +EasyBuild support for building and installing GCC, implemented as an easyblock +""" + import re import os import shutil diff --git a/easybuild/easyblocks/h/hdf5.py b/easybuild/easyblocks/h/hdf5.py index 47754e67bb..72e9097da2 100644 --- a/easybuild/easyblocks/h/hdf5.py +++ b/easybuild/easyblocks/h/hdf5.py @@ -18,6 +18,10 @@ # You should have received a copy of the GNU General Public License # along with EasyBuild. If not, see . ## +""" +EasyBuild support for building and installing HDF5, implemented as an easyblock +""" + import os from easybuild.framework.application import Application diff --git a/easybuild/easyblocks/h/hpl.py b/easybuild/easyblocks/h/hpl.py index 02bafe7e22..90f84b184a 100644 --- a/easybuild/easyblocks/h/hpl.py +++ b/easybuild/easyblocks/h/hpl.py @@ -18,6 +18,10 @@ # You should have received a copy of the GNU General Public License # along with EasyBuild. If not, see . ## +""" +EasyBuild support for building and installing HPL, implemented as an easyblock +""" + import os import shutil diff --git a/easybuild/easyblocks/i/icc.py b/easybuild/easyblocks/i/icc.py index 897ef37722..1407357809 100644 --- a/easybuild/easyblocks/i/icc.py +++ b/easybuild/easyblocks/i/icc.py @@ -18,6 +18,9 @@ # You should have received a copy of the GNU General Public License # along with EasyBuild. If not, see . ## +""" +EasyBuild support for install the Intel C/C++ compiler suite, implemented as an easyblock +""" import os from distutils.version import LooseVersion diff --git a/easybuild/easyblocks/i/ifort.py b/easybuild/easyblocks/i/ifort.py index 084cc38808..d7d7ec0200 100644 --- a/easybuild/easyblocks/i/ifort.py +++ b/easybuild/easyblocks/i/ifort.py @@ -18,6 +18,9 @@ # You should have received a copy of the GNU General Public License # along with EasyBuild. If not, see . ## +""" +EasyBuild support for installing the Intel Fortran compiler suite, implemented as an easyblock +""" from distutils.version import LooseVersion diff --git a/easybuild/easyblocks/i/imkl.py b/easybuild/easyblocks/i/imkl.py index fbeddf2312..a0193bf7d8 100644 --- a/easybuild/easyblocks/i/imkl.py +++ b/easybuild/easyblocks/i/imkl.py @@ -18,16 +18,20 @@ # You should have received a copy of the GNU General Public License # along with EasyBuild. If not, see . ## +""" +EasyBuild support for installing the Intel Math Kernel Library (MKL), implemented as an easyblock +""" import os import shutil import tempfile from distutils.version import LooseVersion +import easybuild.tools.environment as env from easybuild.easyblocks.i.intelbase import IntelBase from easybuild.tools.filetools import run_cmd from easybuild.tools.modules import Modules -import easybuild.tools.environment as env + class Imkl(IntelBase): """ diff --git a/easybuild/easyblocks/i/impi.py b/easybuild/easyblocks/i/impi.py index 38efe03721..d1b3a265c7 100644 --- a/easybuild/easyblocks/i/impi.py +++ b/easybuild/easyblocks/i/impi.py @@ -18,6 +18,9 @@ # You should have received a copy of the GNU General Public License # along with EasyBuild. If not, see . ## +""" +EasyBuild support for installing the Intel MPI library, implemented as an easyblock +""" import os from distutils.version import LooseVersion diff --git a/easybuild/easyblocks/i/intelbase.py b/easybuild/easyblocks/i/intelbase.py index baf45271c8..48ca777227 100644 --- a/easybuild/easyblocks/i/intelbase.py +++ b/easybuild/easyblocks/i/intelbase.py @@ -18,12 +18,16 @@ # You should have received a copy of the GNU General Public License # along with EasyBuild. If not, see . ## +""" +Generic EasyBuild support for installing Intel tools, implemented as an easyblock +""" + import os import shutil +import easybuild.tools.environment as env from easybuild.framework.application import Application from easybuild.tools.filetools import run_cmd -import easybuild.tools.environment as env class IntelBase(Application): """ diff --git a/easybuild/easyblocks/i/ipp.py b/easybuild/easyblocks/i/ipp.py index a03add7e35..d277c67b93 100644 --- a/easybuild/easyblocks/i/ipp.py +++ b/easybuild/easyblocks/i/ipp.py @@ -18,6 +18,9 @@ # You should have received a copy of the GNU General Public License # along with EasyBuild. If not, see . ## +""" +EasyBuild support for installing the Intel Performance Primitives (IPP) library, implemented as an easyblock +""" from easybuild.easyblocks.i.intelbase import IntelBase diff --git a/easybuild/easyblocks/i/itac.py b/easybuild/easyblocks/i/itac.py index f116397a33..b6e93711ed 100644 --- a/easybuild/easyblocks/i/itac.py +++ b/easybuild/easyblocks/i/itac.py @@ -18,6 +18,9 @@ # You should have received a copy of the GNU General Public License # along with EasyBuild. If not, see . ## +""" +EasyBuild support for installing the Intel Trace Analyzer and Collector (ITAC), implemented as an easyblock +""" import os diff --git a/easybuild/easyblocks/l/lapack.py b/easybuild/easyblocks/l/lapack.py index 045c969454..87d55b8611 100644 --- a/easybuild/easyblocks/l/lapack.py +++ b/easybuild/easyblocks/l/lapack.py @@ -18,6 +18,10 @@ # You should have received a copy of the GNU General Public License # along with EasyBuild. If not, see . ## +""" +EasyBuild support for building and installing LAPACK, implemented as an easyblock +""" + import glob import os import shutil diff --git a/easybuild/easyblocks/l/libsmm.py b/easybuild/easyblocks/l/libsmm.py index a699610263..aa5e1ab2ef 100644 --- a/easybuild/easyblocks/l/libsmm.py +++ b/easybuild/easyblocks/l/libsmm.py @@ -18,6 +18,10 @@ # You should have received a copy of the GNU General Public License # along with EasyBuild. If not, see . ## +""" +EasyBuild support for building and installing the libsmm library, implemented as an easyblock +""" + import os import shutil from distutils.version import LooseVersion diff --git a/easybuild/easyblocks/m/maple.py b/easybuild/easyblocks/m/maple.py index fdb586cae6..b60a43ae08 100644 --- a/easybuild/easyblocks/m/maple.py +++ b/easybuild/easyblocks/m/maple.py @@ -18,6 +18,10 @@ # You should have received a copy of the GNU General Public License # along with EasyBuild. If not, see . ## +""" +EasyBuild support for installing Maple, implemented as an easyblock +""" + import os import shutil diff --git a/easybuild/easyblocks/m/mrbayes.py b/easybuild/easyblocks/m/mrbayes.py index 40f64ce821..3fba903a9f 100644 --- a/easybuild/easyblocks/m/mrbayes.py +++ b/easybuild/easyblocks/m/mrbayes.py @@ -19,6 +19,10 @@ # You should have received a copy of the GNU General Public License # along with EasyBuild. If not, see . ## +""" +EasyBuild support for building and installing MrBayes, implemented as an easyblock +""" + import os import shutil from distutils.version import LooseVersion diff --git a/easybuild/easyblocks/m/mvapich2.py b/easybuild/easyblocks/m/mvapich2.py index d2d976bc5c..078276a176 100644 --- a/easybuild/easyblocks/m/mvapich2.py +++ b/easybuild/easyblocks/m/mvapich2.py @@ -18,10 +18,14 @@ # You should have received a copy of the GNU General Public License # along with EasyBuild. If not, see . ## +""" +EasyBuild support for building and installing the MVAPICH2 MPI library, implemented as an easyblock +""" + import os -from easybuild.framework.application import Application import easybuild.tools.environment as env +from easybuild.framework.application import Application class MVAPICH2(Application): """ diff --git a/easybuild/easyblocks/n/ncl.py b/easybuild/easyblocks/n/ncl.py index d02b67ec62..f3a8e5da69 100644 --- a/easybuild/easyblocks/n/ncl.py +++ b/easybuild/easyblocks/n/ncl.py @@ -18,6 +18,10 @@ # You should have received a copy of the GNU General Public License # along with EasyBuild. If not, see . ## +""" +EasyBuild support for building and installing NCL, implemented as an easyblock +""" + from distutils.version import LooseVersion import fileinput import os diff --git a/easybuild/easyblocks/n/netcdf.py b/easybuild/easyblocks/n/netcdf.py index f7b515e256..16cdc07a50 100644 --- a/easybuild/easyblocks/n/netcdf.py +++ b/easybuild/easyblocks/n/netcdf.py @@ -18,12 +18,16 @@ # You should have received a copy of the GNU General Public License # along with EasyBuild. If not, see . ## +""" +EasyBuild support for building and installing netCDF, implemented as an easyblock +""" + import os from distutils.version import LooseVersion -from easybuild.framework.application import Application import easybuild.tools.environment as env import easybuild.tools.toolkit as toolkit +from easybuild.framework.application import Application class NetCDF(Application): """Support for building/installing netCDF""" diff --git a/easybuild/easyblocks/n/netcdf_fortran.py b/easybuild/easyblocks/n/netcdf_fortran.py index 057ee3139d..84a4cc9216 100644 --- a/easybuild/easyblocks/n/netcdf_fortran.py +++ b/easybuild/easyblocks/n/netcdf_fortran.py @@ -18,11 +18,15 @@ # You should have received a copy of the GNU General Public License # along with EasyBuild. If not, see . ## +""" +EasyBuild support for building and installing netCDF-Fortran, implemented as an easyblock +""" + import os -from easybuild.framework.application import Application import easybuild.tools.environment as env import easybuild.tools.toolkit as toolkit +from easybuild.framework.application import Application class NetCDF_Fortran(Application): """Support for building/installing the netCDF-Fortran library""" diff --git a/easybuild/easyblocks/p/pasha.py b/easybuild/easyblocks/p/pasha.py index 2800f389ae..50d231025f 100644 --- a/easybuild/easyblocks/p/pasha.py +++ b/easybuild/easyblocks/p/pasha.py @@ -19,7 +19,7 @@ # along with EasyBuild. If not, see . ## """ -EasyBuild support for Pasha, implemented as an easyblock +EasyBuild support for building and installing Pasha, implemented as an easyblock """ import shutil diff --git a/easybuild/easyblocks/p/python.py b/easybuild/easyblocks/p/python.py index abfa3157e3..936b658e36 100644 --- a/easybuild/easyblocks/p/python.py +++ b/easybuild/easyblocks/p/python.py @@ -18,6 +18,10 @@ # You should have received a copy of the GNU General Public License # along with EasyBuild. If not, see . ## +""" +EasyBuild support for building and installing Python, implemented as an easyblock +""" + import os import shutil diff --git a/easybuild/easyblocks/s/scalapack.py b/easybuild/easyblocks/s/scalapack.py index 40908f2c7b..74e8bfba21 100644 --- a/easybuild/easyblocks/s/scalapack.py +++ b/easybuild/easyblocks/s/scalapack.py @@ -18,6 +18,10 @@ # You should have received a copy of the GNU General Public License # along with EasyBuild. If not, see . ## +""" +EasyBuild support for building and installing ScaLAPACK, implemented as an easyblock +""" + import os import shutil from distutils.version import LooseVersion diff --git a/easybuild/easyblocks/t/tarball.py b/easybuild/easyblocks/t/tarball.py index 7bf5a5cfbe..91c2e2a19a 100644 --- a/easybuild/easyblocks/t/tarball.py +++ b/easybuild/easyblocks/t/tarball.py @@ -18,6 +18,11 @@ # You should have received a copy of the GNU General Public License # along with EasyBuild. If not, see . ## +""" +EasyBuild support for installing (precompiled) software packages which are packaged as a tarball, +implemented as an easyblock +""" + import shutil from easybuild.framework.application import Application diff --git a/easybuild/easyblocks/t/tbb.py b/easybuild/easyblocks/t/tbb.py index 28bdfa5f8f..4bdfb24b5c 100644 --- a/easybuild/easyblocks/t/tbb.py +++ b/easybuild/easyblocks/t/tbb.py @@ -18,6 +18,9 @@ # You should have received a copy of the GNU General Public License # along with EasyBuild. If not, see . ## +""" +EasyBuild support for installing the Intel Threading Building Blocks (TBB) library, implemented as an easyblock +""" import os import shutil @@ -26,9 +29,7 @@ from easybuild.easyblocks.i.intelbase import IntelBase class Tbb(IntelBase): - """ - EasyBlock for tbb, threading building blocks - """ + """EasyBlock for tbb, threading building blocks""" def make_install(self): """overwrite make_install to add extra symlinks""" diff --git a/easybuild/easyblocks/t/toolkit.py b/easybuild/easyblocks/t/toolkit.py index da69f49aa8..d3671dfcc5 100644 --- a/easybuild/easyblocks/t/toolkit.py +++ b/easybuild/easyblocks/t/toolkit.py @@ -18,6 +18,10 @@ # You should have received a copy of the GNU General Public License # along with EasyBuild. If not, see . ## +""" +EasyBuild support for installing compiler toolkits, implemented as an easyblock +""" + from easybuild.framework.application import Application class Toolkit(Application): diff --git a/easybuild/easyblocks/w/wps.py b/easybuild/easyblocks/w/wps.py index b2e7f64edf..8ad66315dd 100644 --- a/easybuild/easyblocks/w/wps.py +++ b/easybuild/easyblocks/w/wps.py @@ -18,19 +18,23 @@ # You should have received a copy of the GNU General Public License # along with EasyBuild. If not, see . ## -from distutils.version import LooseVersion +""" +EasyBuild support for building and installing WPS, implemented as an easyblock +""" + import fileinput import os import re import shutil import sys import tempfile +from distutils.version import LooseVersion +import easybuild.tools.environment as env +import easybuild.tools.toolkit as toolkit from easybuild.framework.application import Application from easybuild.tools.filetools import patch_perl_script_autoflush, run_cmd, run_cmd_qa, unpack from easybuild.easyblocks.n.netcdf import set_netcdf_env_vars, get_netcdf_module_set_cmds -import easybuild.tools.environment as env -import easybuild.tools.toolkit as toolkit class WPS(Application): """Support for building/installing WPS.""" diff --git a/easybuild/easyblocks/w/wrf.py b/easybuild/easyblocks/w/wrf.py index 9a7cc16ef4..711c95a247 100644 --- a/easybuild/easyblocks/w/wrf.py +++ b/easybuild/easyblocks/w/wrf.py @@ -18,16 +18,20 @@ # You should have received a copy of the GNU General Public License # along with EasyBuild. If not, see . ## +""" +EasyBuild support for building and installing WRF, implemented as an easyblock +""" + import fileinput import os import re import sys +import easybuild.tools.environment as env +import easybuild.tools.toolkit as toolkit from easybuild.framework.application import Application from easybuild.tools.filetools import patch_perl_script_autoflush, run_cmd, run_cmd_qa from easybuild.easyblocks.n.netcdf import set_netcdf_env_vars, get_netcdf_module_set_cmds -import easybuild.tools.environment as env -import easybuild.tools.toolkit as toolkit class WRF(Application): """Support for building/installing WRF.""" From 6918384bcf9eeb1e6cd17f001b05cb618a134f09 Mon Sep 17 00:00:00 2001 From: Jens Timmerman Date: Tue, 24 Jul 2012 16:12:15 +0200 Subject: [PATCH 314/798] added initial pasha support (for intel, with intel tbb) --- .../p/PASHA/Pasha-1.0.3-goalf-1.1.0-no-OFED.eb | 18 ++++++++++++++++++ .../p/PASHA/Pasha-1.0.3-ictce-4.0.6.eb | 17 +++++++++++++++++ 2 files changed, 35 insertions(+) create mode 100644 easybuild/easyconfigs/p/PASHA/Pasha-1.0.3-goalf-1.1.0-no-OFED.eb create mode 100644 easybuild/easyconfigs/p/PASHA/Pasha-1.0.3-ictce-4.0.6.eb diff --git a/easybuild/easyconfigs/p/PASHA/Pasha-1.0.3-goalf-1.1.0-no-OFED.eb b/easybuild/easyconfigs/p/PASHA/Pasha-1.0.3-goalf-1.1.0-no-OFED.eb new file mode 100644 index 0000000000..d400f697e1 --- /dev/null +++ b/easybuild/easyconfigs/p/PASHA/Pasha-1.0.3-goalf-1.1.0-no-OFED.eb @@ -0,0 +1,18 @@ +name='Pasha' +version='1.0.3' + +homepage='http://pasha.sourceforge.net/' +description="PASHA is a parallel short read assembler for large genomes using de Bruijn graphs." + +toolkit={'name':'goalf','version':'1.1.0-no-OFED'} +toolkitopts={'pic':True,'opt':True,'optarch':True} + +dependencies=[ + ('tbb','- + +sources=['%s-%s.tar.gz' % (name, version)] +sourceURLs=[ + 'http://downloads.sourceforge.net/pasha', +] + +parallel=1 diff --git a/easybuild/easyconfigs/p/PASHA/Pasha-1.0.3-ictce-4.0.6.eb b/easybuild/easyconfigs/p/PASHA/Pasha-1.0.3-ictce-4.0.6.eb new file mode 100644 index 0000000000..2d48bc3db1 --- /dev/null +++ b/easybuild/easyconfigs/p/PASHA/Pasha-1.0.3-ictce-4.0.6.eb @@ -0,0 +1,17 @@ +name='Pasha' +version='1.0.3' + +homepage='http://pasha.sourceforge.net/' +description="PASHA is a parallel short read assembler for large genomes using de Bruijn graphs." + +toolkit={'name':'ictce','version':'4.0.6'} +toolkitopts={'pic':True,'opt':True,'optarch':True} + +dependencies=[ + ('tbb','4.0.0.233'), + ] + +sources=['%s-%s.tar.gz' % (name, version)] +sourceURLs=[ + 'http://downloads.sourceforge.net/pasha', +] From 1d053f386a239d94be19fb2b1eb8069798387b26 Mon Sep 17 00:00:00 2001 From: Jens Timmerman Date: Wed, 25 Jul 2012 11:33:50 +0200 Subject: [PATCH 315/798] added extra path to tbb module file --- easybuild/easyblocks/t/tbb.py | 1 - 1 file changed, 1 deletion(-) diff --git a/easybuild/easyblocks/t/tbb.py b/easybuild/easyblocks/t/tbb.py index 4bdfb24b5c..de5f7340e1 100644 --- a/easybuild/easyblocks/t/tbb.py +++ b/easybuild/easyblocks/t/tbb.py @@ -53,7 +53,6 @@ def make_install(self): shutil.move(install_libpath, os.path.join(self.installdir, 'tbb', 'libs')) os.symlink(self.libpath, install_libpath) - def sanitycheck(self): if not self.getcfg('sanityCheckPaths'): From d12d3bc0dd1cc061ae32d35f887cbc0b752f8482 Mon Sep 17 00:00:00 2001 From: Jens Timmerman Date: Wed, 25 Jul 2012 11:37:44 +0200 Subject: [PATCH 316/798] import os --- easybuild/easyblocks/t/tbb.py | 1 + 1 file changed, 1 insertion(+) diff --git a/easybuild/easyblocks/t/tbb.py b/easybuild/easyblocks/t/tbb.py index de5f7340e1..1f79efb56c 100644 --- a/easybuild/easyblocks/t/tbb.py +++ b/easybuild/easyblocks/t/tbb.py @@ -26,6 +26,7 @@ import shutil import glob +import os from easybuild.easyblocks.i.intelbase import IntelBase class Tbb(IntelBase): From e52a29ed8496bd6e47b0fed3ec659e379cf64170 Mon Sep 17 00:00:00 2001 From: Jens Timmerman Date: Wed, 25 Jul 2012 16:34:04 +0200 Subject: [PATCH 317/798] fixed installation of tbb and added full pasha support --- easybuild/easyblocks/t/tbb.py | 17 ++++++++++++++--- .../p/PASHA/Pasha-1.0.3-ictce-4.0.6.eb | 7 ++++++- 2 files changed, 20 insertions(+), 4 deletions(-) diff --git a/easybuild/easyblocks/t/tbb.py b/easybuild/easyblocks/t/tbb.py index 1f79efb56c..32f312514d 100644 --- a/easybuild/easyblocks/t/tbb.py +++ b/easybuild/easyblocks/t/tbb.py @@ -27,6 +27,7 @@ import glob import os +import shutil from easybuild.easyblocks.i.intelbase import IntelBase class Tbb(IntelBase): @@ -54,12 +55,22 @@ def make_install(self): shutil.move(install_libpath, os.path.join(self.installdir, 'tbb', 'libs')) os.symlink(self.libpath, install_libpath) + def make_install(self): + """overwrite make_install to add extra symlinks""" + IntelBase.make_install(self) + self.libpath = "%s/tbb/libs/intel64/%s/" % (self.installdir, "cc4.1.0_libc2.4_kernel2.6.16.21") + installibpath = os.path.join(self.installdir, 'tbb', 'lib') + shutil.move(installibpath, os.path.join(self.installdir, 'tbb', 'libs')) + os.symlink(self.libpath, installibpath) + + def sanitycheck(self): if not self.getcfg('sanityCheckPaths'): - self.setcfg('sanityCheckPaths', {'files':[], - 'dirs':["tbb/bin", "tbb/lib/", "tbb/libs/"] - }) + self.setcfg('sanityCheckPaths', { + 'files':[], + 'dirs':["tbb/bin", "tbb/lib/", "tbb/libs/"] + }) self.log.info("Customized sanity check paths: %s" % self.getcfg('sanityCheckPaths')) diff --git a/easybuild/easyconfigs/p/PASHA/Pasha-1.0.3-ictce-4.0.6.eb b/easybuild/easyconfigs/p/PASHA/Pasha-1.0.3-ictce-4.0.6.eb index 2d48bc3db1..4148d89f07 100644 --- a/easybuild/easyconfigs/p/PASHA/Pasha-1.0.3-ictce-4.0.6.eb +++ b/easybuild/easyconfigs/p/PASHA/Pasha-1.0.3-ictce-4.0.6.eb @@ -8,10 +8,15 @@ toolkit={'name':'ictce','version':'4.0.6'} toolkitopts={'pic':True,'opt':True,'optarch':True} dependencies=[ - ('tbb','4.0.0.233'), + ('tbb','4.0.5.339','',True), ] sources=['%s-%s.tar.gz' % (name, version)] sourceURLs=[ 'http://downloads.sourceforge.net/pasha', ] + +patches=[ + 'intelmpi.patch', + ] +parallel=1 From a1a79c1f21e07056e8ef6fabf3ab1726f463357e Mon Sep 17 00:00:00 2001 From: Jens Timmerman Date: Tue, 31 Jul 2012 10:27:34 +0200 Subject: [PATCH 318/798] Processed comments on pull request #24 --- easybuild/easyblocks/t/tbb.py | 18 +++++++++++++++++- .../p/PASHA/Pasha-1.0.3-goalf-1.1.0-no-OFED.eb | 18 ------------------ .../p/PASHA/Pasha-1.0.3-ictce-4.0.6.eb | 2 ++ 3 files changed, 19 insertions(+), 19 deletions(-) delete mode 100644 easybuild/easyconfigs/p/PASHA/Pasha-1.0.3-goalf-1.1.0-no-OFED.eb diff --git a/easybuild/easyblocks/t/tbb.py b/easybuild/easyblocks/t/tbb.py index 32f312514d..d7f38afa74 100644 --- a/easybuild/easyblocks/t/tbb.py +++ b/easybuild/easyblocks/t/tbb.py @@ -28,6 +28,7 @@ import os import shutil +import glob from easybuild.easyblocks.i.intelbase import IntelBase class Tbb(IntelBase): @@ -58,7 +59,21 @@ def make_install(self): def make_install(self): """overwrite make_install to add extra symlinks""" IntelBase.make_install(self) - self.libpath = "%s/tbb/libs/intel64/%s/" % (self.installdir, "cc4.1.0_libc2.4_kernel2.6.16.21") + + # save libdir + os.chdir(self.installdir) + libglob = 'tbb/libs/intel64/cc*libc*_kernel*' + libs = glob.glob(libglob) + if len(libs): + libdir = libs[-1] # take the last one, should be ordered by cc version. + else: + self.log.error("No libs found using %s in %s" % (libglob, self.installdir)) + self.libdir = libdir + + + self.libpath = "%s/tbb/libs/intel64/%s/" % (self.installdir, libdir) + # applications go looking into tbb/lib so we move what's in there to libs + # and symlink the right lib from /tbb/libs/intel64/... to lib installibpath = os.path.join(self.installdir, 'tbb', 'lib') shutil.move(installibpath, os.path.join(self.installdir, 'tbb', 'libs')) os.symlink(self.libpath, installibpath) @@ -80,6 +95,7 @@ def make_module_extra(self): """Add correct path to lib to LD_LIBRARY_PATH. and intel license file""" txt = IntelBase.make_module_extra(self) + # since we have symlinked it we could also use $SOFTROOTTBB/tbb/lib here txt += "prepend-path\t%s\t\t%s\n" % ('LD_LIBRARY_PATH', self.libpath) return txt diff --git a/easybuild/easyconfigs/p/PASHA/Pasha-1.0.3-goalf-1.1.0-no-OFED.eb b/easybuild/easyconfigs/p/PASHA/Pasha-1.0.3-goalf-1.1.0-no-OFED.eb deleted file mode 100644 index d400f697e1..0000000000 --- a/easybuild/easyconfigs/p/PASHA/Pasha-1.0.3-goalf-1.1.0-no-OFED.eb +++ /dev/null @@ -1,18 +0,0 @@ -name='Pasha' -version='1.0.3' - -homepage='http://pasha.sourceforge.net/' -description="PASHA is a parallel short read assembler for large genomes using de Bruijn graphs." - -toolkit={'name':'goalf','version':'1.1.0-no-OFED'} -toolkitopts={'pic':True,'opt':True,'optarch':True} - -dependencies=[ - ('tbb','- - -sources=['%s-%s.tar.gz' % (name, version)] -sourceURLs=[ - 'http://downloads.sourceforge.net/pasha', -] - -parallel=1 diff --git a/easybuild/easyconfigs/p/PASHA/Pasha-1.0.3-ictce-4.0.6.eb b/easybuild/easyconfigs/p/PASHA/Pasha-1.0.3-ictce-4.0.6.eb index 4148d89f07..1b01d1ce2b 100644 --- a/easybuild/easyconfigs/p/PASHA/Pasha-1.0.3-ictce-4.0.6.eb +++ b/easybuild/easyconfigs/p/PASHA/Pasha-1.0.3-ictce-4.0.6.eb @@ -19,4 +19,6 @@ sourceURLs=[ patches=[ 'intelmpi.patch', ] + +# Pasha's makefile is not suited for parallel execution. parallel=1 From c4b4d29ffb7e30241988f93a55030c9c09e71b92 Mon Sep 17 00:00:00 2001 From: Kenneth Hoste Date: Wed, 1 Aug 2012 14:39:57 +0200 Subject: [PATCH 319/798] rename Pasha easyconfig dir, added patch file required for ictce, add easyconfig for goalf (refs #1127) --- .../Pasha-1.0.3-goalf-1.1.0.eb} | 14 +++----------- 1 file changed, 3 insertions(+), 11 deletions(-) rename easybuild/easyconfigs/p/{PASHA/Pasha-1.0.3-ictce-4.0.6.eb => Pasha/Pasha-1.0.3-goalf-1.1.0.eb} (61%) diff --git a/easybuild/easyconfigs/p/PASHA/Pasha-1.0.3-ictce-4.0.6.eb b/easybuild/easyconfigs/p/Pasha/Pasha-1.0.3-goalf-1.1.0.eb similarity index 61% rename from easybuild/easyconfigs/p/PASHA/Pasha-1.0.3-ictce-4.0.6.eb rename to easybuild/easyconfigs/p/Pasha/Pasha-1.0.3-goalf-1.1.0.eb index 1b01d1ce2b..fc7b9fa662 100644 --- a/easybuild/easyconfigs/p/PASHA/Pasha-1.0.3-ictce-4.0.6.eb +++ b/easybuild/easyconfigs/p/Pasha/Pasha-1.0.3-goalf-1.1.0.eb @@ -4,21 +4,13 @@ version='1.0.3' homepage='http://pasha.sourceforge.net/' description="PASHA is a parallel short read assembler for large genomes using de Bruijn graphs." -toolkit={'name':'ictce','version':'4.0.6'} +toolkit={'name':'goalf','version':'1.1.0'} toolkitopts={'pic':True,'opt':True,'optarch':True} -dependencies=[ - ('tbb','4.0.5.339','',True), - ] +dependencies=[('tbb','4.0.5.339','',True)] +sourceURLs=['http://downloads.sourceforge.net/pasha'] sources=['%s-%s.tar.gz' % (name, version)] -sourceURLs=[ - 'http://downloads.sourceforge.net/pasha', -] -patches=[ - 'intelmpi.patch', - ] - # Pasha's makefile is not suited for parallel execution. parallel=1 From b592b92dd4045c219f9fe4fbf5535395a79a824d Mon Sep 17 00:00:00 2001 From: Kenneth Hoste Date: Wed, 1 Aug 2012 16:30:47 +0200 Subject: [PATCH 320/798] add no-OFED suffix to goalf toolkit for Pasha example easyconfig --- .../p/Pasha/Pasha-1.0.3-goalf-1.1.0.eb | 16 ---------------- 1 file changed, 16 deletions(-) delete mode 100644 easybuild/easyconfigs/p/Pasha/Pasha-1.0.3-goalf-1.1.0.eb diff --git a/easybuild/easyconfigs/p/Pasha/Pasha-1.0.3-goalf-1.1.0.eb b/easybuild/easyconfigs/p/Pasha/Pasha-1.0.3-goalf-1.1.0.eb deleted file mode 100644 index fc7b9fa662..0000000000 --- a/easybuild/easyconfigs/p/Pasha/Pasha-1.0.3-goalf-1.1.0.eb +++ /dev/null @@ -1,16 +0,0 @@ -name='Pasha' -version='1.0.3' - -homepage='http://pasha.sourceforge.net/' -description="PASHA is a parallel short read assembler for large genomes using de Bruijn graphs." - -toolkit={'name':'goalf','version':'1.1.0'} -toolkitopts={'pic':True,'opt':True,'optarch':True} - -dependencies=[('tbb','4.0.5.339','',True)] - -sourceURLs=['http://downloads.sourceforge.net/pasha'] -sources=['%s-%s.tar.gz' % (name, version)] - -# Pasha's makefile is not suited for parallel execution. -parallel=1 From fdcf35922e70916d14efa28e156e416ebccca73a Mon Sep 17 00:00:00 2001 From: Kenneth Hoste Date: Fri, 3 Aug 2012 07:06:14 +0200 Subject: [PATCH 321/798] use empty line between Python and EasyBuild imports everywhere --- easybuild/easyblocks/i/intelbase.py | 1 + easybuild/easyblocks/m/mvapich2.py | 1 + easybuild/easyblocks/n/netcdf.py | 1 + easybuild/easyblocks/n/netcdf_fortran.py | 1 + easybuild/easyblocks/t/tbb.py | 4 ++-- easybuild/easyblocks/w/wps.py | 1 + easybuild/easyblocks/w/wrf.py | 1 + 7 files changed, 8 insertions(+), 2 deletions(-) diff --git a/easybuild/easyblocks/i/intelbase.py b/easybuild/easyblocks/i/intelbase.py index 48ca777227..a60e8f3065 100644 --- a/easybuild/easyblocks/i/intelbase.py +++ b/easybuild/easyblocks/i/intelbase.py @@ -29,6 +29,7 @@ from easybuild.framework.application import Application from easybuild.tools.filetools import run_cmd + class IntelBase(Application): """ Base class for Intel software diff --git a/easybuild/easyblocks/m/mvapich2.py b/easybuild/easyblocks/m/mvapich2.py index 078276a176..68a1d0baf1 100644 --- a/easybuild/easyblocks/m/mvapich2.py +++ b/easybuild/easyblocks/m/mvapich2.py @@ -27,6 +27,7 @@ import easybuild.tools.environment as env from easybuild.framework.application import Application + class MVAPICH2(Application): """ Support for building the MVAPICH2 MPI library. diff --git a/easybuild/easyblocks/n/netcdf.py b/easybuild/easyblocks/n/netcdf.py index 16cdc07a50..4a3e15d65a 100644 --- a/easybuild/easyblocks/n/netcdf.py +++ b/easybuild/easyblocks/n/netcdf.py @@ -29,6 +29,7 @@ import easybuild.tools.toolkit as toolkit from easybuild.framework.application import Application + class NetCDF(Application): """Support for building/installing netCDF""" diff --git a/easybuild/easyblocks/n/netcdf_fortran.py b/easybuild/easyblocks/n/netcdf_fortran.py index 84a4cc9216..4913421bf3 100644 --- a/easybuild/easyblocks/n/netcdf_fortran.py +++ b/easybuild/easyblocks/n/netcdf_fortran.py @@ -28,6 +28,7 @@ import easybuild.tools.toolkit as toolkit from easybuild.framework.application import Application + class NetCDF_Fortran(Application): """Support for building/installing the netCDF-Fortran library""" diff --git a/easybuild/easyblocks/t/tbb.py b/easybuild/easyblocks/t/tbb.py index d7f38afa74..194d9bfd54 100644 --- a/easybuild/easyblocks/t/tbb.py +++ b/easybuild/easyblocks/t/tbb.py @@ -29,6 +29,7 @@ import os import shutil import glob + from easybuild.easyblocks.i.intelbase import IntelBase class Tbb(IntelBase): @@ -65,7 +66,7 @@ def make_install(self): libglob = 'tbb/libs/intel64/cc*libc*_kernel*' libs = glob.glob(libglob) if len(libs): - libdir = libs[-1] # take the last one, should be ordered by cc version. + libdir = libs[-1] # take the last one, should be ordered by cc version. else: self.log.error("No libs found using %s in %s" % (libglob, self.installdir)) self.libdir = libdir @@ -95,7 +96,6 @@ def make_module_extra(self): """Add correct path to lib to LD_LIBRARY_PATH. and intel license file""" txt = IntelBase.make_module_extra(self) - # since we have symlinked it we could also use $SOFTROOTTBB/tbb/lib here txt += "prepend-path\t%s\t\t%s\n" % ('LD_LIBRARY_PATH', self.libpath) return txt diff --git a/easybuild/easyblocks/w/wps.py b/easybuild/easyblocks/w/wps.py index 8ad66315dd..290cdc0499 100644 --- a/easybuild/easyblocks/w/wps.py +++ b/easybuild/easyblocks/w/wps.py @@ -36,6 +36,7 @@ from easybuild.tools.filetools import patch_perl_script_autoflush, run_cmd, run_cmd_qa, unpack from easybuild.easyblocks.n.netcdf import set_netcdf_env_vars, get_netcdf_module_set_cmds + class WPS(Application): """Support for building/installing WPS.""" diff --git a/easybuild/easyblocks/w/wrf.py b/easybuild/easyblocks/w/wrf.py index 711c95a247..d8e8c9f71b 100644 --- a/easybuild/easyblocks/w/wrf.py +++ b/easybuild/easyblocks/w/wrf.py @@ -33,6 +33,7 @@ from easybuild.tools.filetools import patch_perl_script_autoflush, run_cmd, run_cmd_qa from easybuild.easyblocks.n.netcdf import set_netcdf_env_vars, get_netcdf_module_set_cmds + class WRF(Application): """Support for building/installing WRF.""" From 7353e0bc7ed6fa6e9bd333866b03e5e8737fcb59 Mon Sep 17 00:00:00 2001 From: Kenneth Hoste Date: Fri, 3 Aug 2012 07:09:55 +0200 Subject: [PATCH 322/798] process remarks made on pull request --- easybuild/easyblocks/t/tbb.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/easybuild/easyblocks/t/tbb.py b/easybuild/easyblocks/t/tbb.py index 194d9bfd54..a7787e7340 100644 --- a/easybuild/easyblocks/t/tbb.py +++ b/easybuild/easyblocks/t/tbb.py @@ -75,9 +75,9 @@ def make_install(self): self.libpath = "%s/tbb/libs/intel64/%s/" % (self.installdir, libdir) # applications go looking into tbb/lib so we move what's in there to libs # and symlink the right lib from /tbb/libs/intel64/... to lib - installibpath = os.path.join(self.installdir, 'tbb', 'lib') - shutil.move(installibpath, os.path.join(self.installdir, 'tbb', 'libs')) - os.symlink(self.libpath, installibpath) + install_libpath = os.path.join(self.installdir, 'tbb', 'lib') + shutil.move(install_libpath, os.path.join(self.installdir, 'tbb', 'libs')) + os.symlink(self.libpath, install_libpath) def sanitycheck(self): From 0947f8e081edc875b13d93a55951bed49745503c Mon Sep 17 00:00:00 2001 From: Toon Willems Date: Fri, 3 Aug 2012 12:16:23 +0200 Subject: [PATCH 323/798] fix goalf test --- easybuild/easyblocks/t/toolkit.py | 16 ++++++++++++++-- 1 file changed, 14 insertions(+), 2 deletions(-) diff --git a/easybuild/easyblocks/t/toolkit.py b/easybuild/easyblocks/t/toolkit.py index 13fdd2188d..cb44b6f61c 100644 --- a/easybuild/easyblocks/t/toolkit.py +++ b/easybuild/easyblocks/t/toolkit.py @@ -32,10 +32,22 @@ def build(self): self.gen_installdir() self.make_installdir() - def makeModuleReq(self): + def configure(self): + """ Do nothing """ + pass + + def make(self): + """ Do nothing """ + pass + + def make_install(self): + """ Do nothing """ + pass + + def make_module_req(self): return '' - def sanityCheck(self): + def sanitycheck(self): """ As a toolkit doens't install anything really, this is always true """ From f3f100e5b14ac7bd7d7c216747c8d1f3d300f2e9 Mon Sep 17 00:00:00 2001 From: Kenneth Hoste Date: Fri, 3 Aug 2012 09:47:22 +0200 Subject: [PATCH 324/798] processed remarks w.r.t. import order and module docstrings --- easybuild/easyblocks/t/tbb.py | 23 ----------------------- 1 file changed, 23 deletions(-) diff --git a/easybuild/easyblocks/t/tbb.py b/easybuild/easyblocks/t/tbb.py index a7787e7340..d3a10be89a 100644 --- a/easybuild/easyblocks/t/tbb.py +++ b/easybuild/easyblocks/t/tbb.py @@ -57,29 +57,6 @@ def make_install(self): shutil.move(install_libpath, os.path.join(self.installdir, 'tbb', 'libs')) os.symlink(self.libpath, install_libpath) - def make_install(self): - """overwrite make_install to add extra symlinks""" - IntelBase.make_install(self) - - # save libdir - os.chdir(self.installdir) - libglob = 'tbb/libs/intel64/cc*libc*_kernel*' - libs = glob.glob(libglob) - if len(libs): - libdir = libs[-1] # take the last one, should be ordered by cc version. - else: - self.log.error("No libs found using %s in %s" % (libglob, self.installdir)) - self.libdir = libdir - - - self.libpath = "%s/tbb/libs/intel64/%s/" % (self.installdir, libdir) - # applications go looking into tbb/lib so we move what's in there to libs - # and symlink the right lib from /tbb/libs/intel64/... to lib - install_libpath = os.path.join(self.installdir, 'tbb', 'lib') - shutil.move(install_libpath, os.path.join(self.installdir, 'tbb', 'libs')) - os.symlink(self.libpath, install_libpath) - - def sanitycheck(self): if not self.getcfg('sanityCheckPaths'): From 1f866b466eddaaa20db1bc99cf32506e9359c9cf Mon Sep 17 00:00:00 2001 From: Kenneth Hoste Date: Fri, 3 Aug 2012 11:55:14 +0200 Subject: [PATCH 325/798] use two empty lines before start of module + other minor code cleanup --- easybuild/build.py | 20 ++++++++++---------- easybuild/easyblocks/a/atlas.py | 1 + easybuild/easyblocks/b/binary.py | 1 + easybuild/easyblocks/b/blacs.py | 2 ++ easybuild/easyblocks/c/cp2k.py | 1 + easybuild/easyblocks/d/doxygen.py | 1 + easybuild/easyblocks/f/fsl.py | 1 + easybuild/easyblocks/g/g2clib.py | 1 + easybuild/easyblocks/g/g2lib.py | 1 + easybuild/easyblocks/g/gcc.py | 1 + easybuild/easyblocks/h/hdf5.py | 1 + easybuild/easyblocks/h/hpl.py | 1 + easybuild/easyblocks/i/icc.py | 1 + easybuild/easyblocks/i/ifort.py | 1 + easybuild/easyblocks/i/impi.py | 1 + easybuild/easyblocks/i/ipp.py | 1 + easybuild/easyblocks/i/itac.py | 1 + easybuild/easyblocks/l/lapack.py | 2 ++ easybuild/easyblocks/l/libsmm.py | 1 + easybuild/easyblocks/m/maple.py | 1 + easybuild/easyblocks/m/mrbayes.py | 1 + easybuild/easyblocks/n/ncl.py | 1 + easybuild/easyblocks/o/openfoam.py | 1 + easybuild/easyblocks/p/pasha.py | 1 + easybuild/easyblocks/p/python.py | 1 + easybuild/easyblocks/s/scalapack.py | 1 + easybuild/easyblocks/t/tarball.py | 1 + easybuild/easyblocks/t/tbb.py | 1 + easybuild/easyblocks/t/toolkit.py | 1 + easybuild/easybuild_config.py | 6 +++++- easybuild/framework/application.py | 18 ++++++++++++------ easybuild/tools/asyncprocess.py | 10 +++++----- easybuild/tools/build_log.py | 7 +++++-- easybuild/tools/class_dumper.py | 1 + easybuild/tools/config.py | 2 ++ easybuild/tools/environment.py | 1 + easybuild/tools/filetools.py | 2 +- easybuild/tools/module_generator.py | 2 ++ easybuild/tools/modules.py | 1 + easybuild/tools/pbs_job.py | 15 ++++++++++----- easybuild/tools/repository.py | 19 ++++++++++++------- easybuild/tools/systemtools.py | 6 ++++-- easybuild/tools/toolkit.py | 4 +++- 43 files changed, 104 insertions(+), 40 deletions(-) diff --git a/easybuild/build.py b/easybuild/build.py index f790785a61..1ee222212a 100644 --- a/easybuild/build.py +++ b/easybuild/build.py @@ -19,36 +19,36 @@ # You should have received a copy of the GNU General Public License # along with EasyBuild. If not, see . ## +""" +Main entry point for EasyBuild: build software from .eb input file +""" + +import copy +import platform import os import re import shutil import sys import tempfile import time -import copy -import platform from datetime import datetime +from optparse import OptionParser import easybuild # required for VERBOSE_VERSION +import easybuild.tools.config as config +import easybuild.tools.filetools as filetools from easybuild.framework.application import Application, get_instance from easybuild.tools.build_log import EasyBuildError, initLogger, \ removeLogHandler, print_msg from easybuild.tools.class_dumper import dumpClasses from easybuild.tools.modules import Modules, searchModule from easybuild.tools.config import getRepository -from optparse import OptionParser -import easybuild.tools.config as config -import easybuild.tools.filetools as filetools from easybuild.tools import systemtools from easybuild.tools.pbs_job import PbsJob -""" -Main entry point for EasyBuildBuild: build software from .eb input file -""" - # applications use their own logger, we need to tell them to debug or not -# so this global var is used. +# so this global variable is used. LOGDEBUG = False def add_build_options(parser): diff --git a/easybuild/easyblocks/a/atlas.py b/easybuild/easyblocks/a/atlas.py index ffebc8705b..11275daefd 100644 --- a/easybuild/easyblocks/a/atlas.py +++ b/easybuild/easyblocks/a/atlas.py @@ -28,6 +28,7 @@ from easybuild.framework.application import Application from easybuild.tools.filetools import run_cmd + class ATLAS(Application): """ Support for building ATLAS diff --git a/easybuild/easyblocks/b/binary.py b/easybuild/easyblocks/b/binary.py index 61bb0e9c2e..a77fc74c88 100644 --- a/easybuild/easyblocks/b/binary.py +++ b/easybuild/easyblocks/b/binary.py @@ -26,6 +26,7 @@ from easybuild.framework.application import Application + class Binary(Application): """Support for installing a binary package. Just unpack it and copy it to the installdir""" diff --git a/easybuild/easyblocks/b/blacs.py b/easybuild/easyblocks/b/blacs.py index 558951912d..fbf308c3fb 100644 --- a/easybuild/easyblocks/b/blacs.py +++ b/easybuild/easyblocks/b/blacs.py @@ -30,6 +30,7 @@ from easybuild.framework.application import Application from easybuild.tools.filetools import run_cmd + def det_interface(log, path): """Determine interface through xintface""" @@ -42,6 +43,7 @@ def det_interface(log, path): else: log.error("Failed to determine interface, output for xintface: %s" % out) + class BLACS(Application): """ Support for building/installing BLACS diff --git a/easybuild/easyblocks/c/cp2k.py b/easybuild/easyblocks/c/cp2k.py index 3076267c74..6da5231982 100644 --- a/easybuild/easyblocks/c/cp2k.py +++ b/easybuild/easyblocks/c/cp2k.py @@ -34,6 +34,7 @@ from easybuild.tools.filetools import run_cmd import easybuild.tools.toolkit as toolkit + class CP2K(Application): """ Support for building CP2K diff --git a/easybuild/easyblocks/d/doxygen.py b/easybuild/easyblocks/d/doxygen.py index c2996e34f6..9981617ae7 100644 --- a/easybuild/easyblocks/d/doxygen.py +++ b/easybuild/easyblocks/d/doxygen.py @@ -25,6 +25,7 @@ from easybuild.framework.application import Application from easybuild.tools.filetools import run_cmd + class Doxygen(Application): """Support for building/installing Doxygen""" diff --git a/easybuild/easyblocks/f/fsl.py b/easybuild/easyblocks/f/fsl.py index c72b888672..55c7b28668 100644 --- a/easybuild/easyblocks/f/fsl.py +++ b/easybuild/easyblocks/f/fsl.py @@ -31,6 +31,7 @@ from easybuild.framework.application import Application from easybuild.tools.filetools import run_cmd + class FSL(Application): """Support for building and installing FSL.""" diff --git a/easybuild/easyblocks/g/g2clib.py b/easybuild/easyblocks/g/g2clib.py index 449d9ab98a..cee19fd754 100644 --- a/easybuild/easyblocks/g/g2clib.py +++ b/easybuild/easyblocks/g/g2clib.py @@ -28,6 +28,7 @@ from easybuild.framework.application import Application + class G2clib(Application): """Support for building g2clib GRIB2 C library.""" diff --git a/easybuild/easyblocks/g/g2lib.py b/easybuild/easyblocks/g/g2lib.py index f3bf1affc8..290833fc6d 100644 --- a/easybuild/easyblocks/g/g2lib.py +++ b/easybuild/easyblocks/g/g2lib.py @@ -27,6 +27,7 @@ from easybuild.framework.application import Application + class G2lib(Application): """Support for building g2clib GRIB2 library.""" diff --git a/easybuild/easyblocks/g/gcc.py b/easybuild/easyblocks/g/gcc.py index d9630c1f34..58c6bea9f0 100644 --- a/easybuild/easyblocks/g/gcc.py +++ b/easybuild/easyblocks/g/gcc.py @@ -34,6 +34,7 @@ import easybuild.tools.environment as env + class GCC(Application): """ Self-contained build of GCC. diff --git a/easybuild/easyblocks/h/hdf5.py b/easybuild/easyblocks/h/hdf5.py index 72e9097da2..2f88c188fc 100644 --- a/easybuild/easyblocks/h/hdf5.py +++ b/easybuild/easyblocks/h/hdf5.py @@ -26,6 +26,7 @@ from easybuild.framework.application import Application + class HDF5(Application): """Support for building/installing HDF5""" diff --git a/easybuild/easyblocks/h/hpl.py b/easybuild/easyblocks/h/hpl.py index 90f84b184a..f8e63238ca 100644 --- a/easybuild/easyblocks/h/hpl.py +++ b/easybuild/easyblocks/h/hpl.py @@ -28,6 +28,7 @@ from easybuild.framework.application import Application from easybuild.tools.filetools import run_cmd + class HPL(Application): """ Support for building HPL (High Performance Linpack) diff --git a/easybuild/easyblocks/i/icc.py b/easybuild/easyblocks/i/icc.py index 1407357809..cdf7280a29 100644 --- a/easybuild/easyblocks/i/icc.py +++ b/easybuild/easyblocks/i/icc.py @@ -27,6 +27,7 @@ from easybuild.easyblocks.i.intelbase import IntelBase + class Icc(IntelBase): """Support for installing icc diff --git a/easybuild/easyblocks/i/ifort.py b/easybuild/easyblocks/i/ifort.py index d7d7ec0200..1d2f7172b7 100644 --- a/easybuild/easyblocks/i/ifort.py +++ b/easybuild/easyblocks/i/ifort.py @@ -26,6 +26,7 @@ from easybuild.easyblocks.i.icc import Icc, IntelBase + class Ifort(Icc): """ Class that can be used to install ifort diff --git a/easybuild/easyblocks/i/impi.py b/easybuild/easyblocks/i/impi.py index d1b3a265c7..760ffab34a 100644 --- a/easybuild/easyblocks/i/impi.py +++ b/easybuild/easyblocks/i/impi.py @@ -28,6 +28,7 @@ from easybuild.easyblocks.i.intelbase import IntelBase from easybuild.tools.filetools import run_cmd + class Impi(IntelBase): """ Support for installing Intel MPI library diff --git a/easybuild/easyblocks/i/ipp.py b/easybuild/easyblocks/i/ipp.py index d277c67b93..84dd925196 100644 --- a/easybuild/easyblocks/i/ipp.py +++ b/easybuild/easyblocks/i/ipp.py @@ -24,6 +24,7 @@ from easybuild.easyblocks.i.intelbase import IntelBase + class Ipp(IntelBase): def sanitycheck(self): diff --git a/easybuild/easyblocks/i/itac.py b/easybuild/easyblocks/i/itac.py index b6e93711ed..a6d9a4bbd4 100644 --- a/easybuild/easyblocks/i/itac.py +++ b/easybuild/easyblocks/i/itac.py @@ -27,6 +27,7 @@ from easybuild.easyblocks.i.intelbase import IntelBase from easybuild.tools.filetools import run_cmd + class Itac(IntelBase): """ Class that can be used to install itac diff --git a/easybuild/easyblocks/l/lapack.py b/easybuild/easyblocks/l/lapack.py index 87d55b8611..6a3eabde89 100644 --- a/easybuild/easyblocks/l/lapack.py +++ b/easybuild/easyblocks/l/lapack.py @@ -29,6 +29,7 @@ from easybuild.framework.application import Application from easybuild.tools.filetools import run_cmd + # also used for e.g. ScaLAPACK def get_blas_lib(log): """ @@ -53,6 +54,7 @@ def get_blas_lib(log): return blaslib + class LAPACK(Application): """ Support for building LAPACK diff --git a/easybuild/easyblocks/l/libsmm.py b/easybuild/easyblocks/l/libsmm.py index aa5e1ab2ef..47c4f3a344 100644 --- a/easybuild/easyblocks/l/libsmm.py +++ b/easybuild/easyblocks/l/libsmm.py @@ -31,6 +31,7 @@ from easybuild.tools.filetools import run_cmd from easybuild.tools.modules import get_software_root + class Libsmm(Application): """ Support for the CP2K small matrix library diff --git a/easybuild/easyblocks/m/maple.py b/easybuild/easyblocks/m/maple.py index b60a43ae08..151fdabd53 100644 --- a/easybuild/easyblocks/m/maple.py +++ b/easybuild/easyblocks/m/maple.py @@ -28,6 +28,7 @@ from easybuild.framework.application import Application from easybuild.tools.filetools import run_cmd_qa + class Maple(Application): """Support for installing Maple.""" diff --git a/easybuild/easyblocks/m/mrbayes.py b/easybuild/easyblocks/m/mrbayes.py index 3fba903a9f..b1341fbee6 100644 --- a/easybuild/easyblocks/m/mrbayes.py +++ b/easybuild/easyblocks/m/mrbayes.py @@ -30,6 +30,7 @@ from easybuild.framework.application import Application from easybuild.tools.filetools import run_cmd + class MrBayes(Application): """Support for building/installing MrBayes.""" diff --git a/easybuild/easyblocks/n/ncl.py b/easybuild/easyblocks/n/ncl.py index f3a8e5da69..cbb8b9fe1b 100644 --- a/easybuild/easyblocks/n/ncl.py +++ b/easybuild/easyblocks/n/ncl.py @@ -32,6 +32,7 @@ from easybuild.tools.filetools import run_cmd from easybuild.tools.modules import get_software_root + class NCL(Application): """Support for building/installing NCL.""" diff --git a/easybuild/easyblocks/o/openfoam.py b/easybuild/easyblocks/o/openfoam.py index 2bf7e2fa62..8054791059 100644 --- a/easybuild/easyblocks/o/openfoam.py +++ b/easybuild/easyblocks/o/openfoam.py @@ -25,6 +25,7 @@ from easybuild.tools.filetools import run_cmd, recursiveChmod import easybuild.tools.toolkit as toolkit + class OpenFOAM(Application): """Support for building and installing OpenFOAM.""" diff --git a/easybuild/easyblocks/p/pasha.py b/easybuild/easyblocks/p/pasha.py index 50d231025f..858fde4397 100644 --- a/easybuild/easyblocks/p/pasha.py +++ b/easybuild/easyblocks/p/pasha.py @@ -26,6 +26,7 @@ import os from easybuild.framework.application import Application + class Pasha(Application): """Support for building and installing Pasha""" diff --git a/easybuild/easyblocks/p/python.py b/easybuild/easyblocks/p/python.py index 936b658e36..5525164a55 100644 --- a/easybuild/easyblocks/p/python.py +++ b/easybuild/easyblocks/p/python.py @@ -29,6 +29,7 @@ from easybuild.tools.filetools import unpack, patch, run_cmd import easybuild.tools.toolkit as toolkit + class Python(Application): """Support for building/installing Python - default configure/make/make install works fine diff --git a/easybuild/easyblocks/s/scalapack.py b/easybuild/easyblocks/s/scalapack.py index 74e8bfba21..edc7c77b6a 100644 --- a/easybuild/easyblocks/s/scalapack.py +++ b/easybuild/easyblocks/s/scalapack.py @@ -30,6 +30,7 @@ from easybuild.easyblocks.b.blacs import det_interface from easybuild.easyblocks.l.lapack import get_blas_lib + class ScaLAPACK(Application): """ Support for building and installing ScaLAPACK, both versions 1.x and 2.x diff --git a/easybuild/easyblocks/t/tarball.py b/easybuild/easyblocks/t/tarball.py index 91c2e2a19a..e810585012 100644 --- a/easybuild/easyblocks/t/tarball.py +++ b/easybuild/easyblocks/t/tarball.py @@ -27,6 +27,7 @@ from easybuild.framework.application import Application + class Tarball(Application): """ Precompiled software packaged as tarball: diff --git a/easybuild/easyblocks/t/tbb.py b/easybuild/easyblocks/t/tbb.py index d3a10be89a..4ea3db4784 100644 --- a/easybuild/easyblocks/t/tbb.py +++ b/easybuild/easyblocks/t/tbb.py @@ -32,6 +32,7 @@ from easybuild.easyblocks.i.intelbase import IntelBase + class Tbb(IntelBase): """EasyBlock for tbb, threading building blocks""" diff --git a/easybuild/easyblocks/t/toolkit.py b/easybuild/easyblocks/t/toolkit.py index d3671dfcc5..dcc8d1bea1 100644 --- a/easybuild/easyblocks/t/toolkit.py +++ b/easybuild/easyblocks/t/toolkit.py @@ -24,6 +24,7 @@ from easybuild.framework.application import Application + class Toolkit(Application): """ Compiler toolkit: generate module file only, nothing to make/install diff --git a/easybuild/easybuild_config.py b/easybuild/easybuild_config.py index 6c279394f5..4bf8edeafd 100644 --- a/easybuild/easybuild_config.py +++ b/easybuild/easybuild_config.py @@ -18,6 +18,10 @@ # You should have received a copy of the GNU General Public License # along with EasyBuild. If not, see . ## +""" +EasyBuild configuration file. +""" + import os from easybuild.tools.build_log import getLog @@ -59,7 +63,7 @@ ## optionally a subdir argument can be specified: ## `repository = FileRepository(repositoryPath, subdir)` repositoryPath = os.path.join(prefix, 'ebfiles_repo') -repository = FileRepository(repositoryPath) #@UndefinedVariable +repository = FileRepository(repositoryPath) #@UndefinedVariable (this file gets exec'ed, so ignore this) # log format: (dir, filename template) # supported in template: name, version, data, time diff --git a/easybuild/framework/application.py b/easybuild/framework/application.py index 8c31a92a15..d19480d04a 100644 --- a/easybuild/framework/application.py +++ b/easybuild/framework/application.py @@ -18,16 +18,21 @@ # You should have received a copy of the GNU General Public License # along with EasyBuild. If not, see . ## -from difflib import get_close_matches -from distutils.version import LooseVersion +""" +Generic EasyBuild support for building and installing software, +using the 'standard' configure/make/make install procedure. +""" + import copy import glob -import grp #@UnresolvedImport +import grp #@UnresolvedImport import os import re import shutil import time import urllib +from difflib import get_close_matches +from distutils.version import LooseVersion import easybuild import easybuild.tools.config as config @@ -40,10 +45,10 @@ from easybuild.tools.toolkit import Toolkit from easybuild.tools.systemtools import get_core_count + class Application: """ - This is the dummy Application class. - All other Application classes should be inherited from this one + Support for building and installing applications with configure/make/make install """ ## INIT @@ -1755,9 +1760,10 @@ def get_instance(easyblock, log, name=None): log.error("Can't process provided module and class pair %s: %s" % (easyblock, err)) raise EasyBuildError(str(err)) + class ApplicationPackage: """ - Class for packages. + Support for installing packages. """ def __init__(self, mself, pkg, pkginstalldeps): """ diff --git a/easybuild/tools/asyncprocess.py b/easybuild/tools/asyncprocess.py index 7ca77d0b93..b55b3a646a 100644 --- a/easybuild/tools/asyncprocess.py +++ b/easybuild/tools/asyncprocess.py @@ -64,12 +64,12 @@ STDOUT = subprocess.STDOUT if subprocess.mswindows: - from win32file import ReadFile, WriteFile #IGNORE:F0401 #@UnresolvedImport - from win32pipe import PeekNamedPipe #IGNORE:F0401 #@UnresolvedImport - import msvcrt #IGNORE:F0401 + from win32file import ReadFile, WriteFile #@UnresolvedImport + from win32pipe import PeekNamedPipe ##@UnresolvedImport + import msvcrt #@UnresolvedImport else: - import select - import fcntl + import select #@UnresolvedImport + import fcntl #@UnresolvedImport class Popen(subprocess.Popen): diff --git a/easybuild/tools/build_log.py b/easybuild/tools/build_log.py index 41c100ec62..d3d18801ec 100644 --- a/easybuild/tools/build_log.py +++ b/easybuild/tools/build_log.py @@ -22,18 +22,19 @@ EasyBuild logger and log utilities, including our own EasybuildError class. """ -from socket import gethostname -from copy import copy import logging import os import sys import time +from socket import gethostname +from copy import copy import easybuild # EasyBuild message prefix EB_MSG_PREFIX = "==" + class EasyBuildError(Exception): """ EasyBuildError is thrown when EasyBuild runs into something horribly wrong. @@ -44,6 +45,7 @@ def __init__(self, msg): def __str__(self): return repr(self.msg) + class EasyBuildLog(logging.Logger): """ The EasyBuild logger, with its own error and exception functions. @@ -80,6 +82,7 @@ def exception(self, msg, *args): raise EasyBuildError(newMsg) + # set format for logger loggingFormat = EB_MSG_PREFIX + ' %(asctime)s %(name)s %(levelname)s %(message)s' formatter = logging.Formatter(loggingFormat) diff --git a/easybuild/tools/class_dumper.py b/easybuild/tools/class_dumper.py index b464414370..7060fcf5e4 100644 --- a/easybuild/tools/class_dumper.py +++ b/easybuild/tools/class_dumper.py @@ -22,6 +22,7 @@ import pyclbr import os + def dumpClasses(root): """Get a class tree, starting at root""" moduleRoot = None diff --git a/easybuild/tools/config.py b/easybuild/tools/config.py index 326bdb8fdb..0fc257d55a 100644 --- a/easybuild/tools/config.py +++ b/easybuild/tools/config.py @@ -21,11 +21,13 @@ """ EasyBuild configuration (paths, preferences, etc.) """ + import os from easybuild.tools.build_log import getLog import easybuild.tools.repository as repo + log = getLog('config') variables = {} diff --git a/easybuild/tools/environment.py b/easybuild/tools/environment.py index 44d07c84c8..6c332980b9 100644 --- a/easybuild/tools/environment.py +++ b/easybuild/tools/environment.py @@ -1,5 +1,6 @@ import os + changes = {} def write_changes(filename): diff --git a/easybuild/tools/filetools.py b/easybuild/tools/filetools.py index c28adf8532..865a1a118c 100644 --- a/easybuild/tools/filetools.py +++ b/easybuild/tools/filetools.py @@ -30,10 +30,10 @@ import tempfile import time +import easybuild.tools.environment as env from easybuild.tools.asyncprocess import Popen, PIPE, STDOUT, send_all, recv_some from easybuild.tools.build_log import getLog -import easybuild.tools.environment as env log = getLog('fileTools') errorsFoundInLog = 0 diff --git a/easybuild/tools/module_generator.py b/easybuild/tools/module_generator.py index f735474236..0ef5bd6b7f 100644 --- a/easybuild/tools/module_generator.py +++ b/easybuild/tools/module_generator.py @@ -28,8 +28,10 @@ from easybuild.tools.build_log import getLog from easybuild.tools.config import installPath + log = getLog('moduleGenerator') + class ModuleGenerator: """ Class for generating module files. diff --git a/easybuild/tools/modules.py b/easybuild/tools/modules.py index eff185f3ac..ec7bce32e7 100644 --- a/easybuild/tools/modules.py +++ b/easybuild/tools/modules.py @@ -29,6 +29,7 @@ from easybuild.tools.build_log import getLog, initLogger, EasyBuildError from easybuild.tools.filetools import convertName, run_cmd + log = getLog('Modules') outputMatchers = { # matches whitespace and module-listing headers diff --git a/easybuild/tools/pbs_job.py b/easybuild/tools/pbs_job.py index 671ef0ffae..0f0a4abc1d 100644 --- a/easybuild/tools/pbs_job.py +++ b/easybuild/tools/pbs_job.py @@ -17,12 +17,17 @@ # You should have received a copy of the GNU General Public License # along with EasyBuild. If not, see . ## -import os, sys, re +""" +Interface module to TORQUE (PBS). +""" + +import os from easybuild.tools.build_log import getLog + class PbsJob: - """Interaction with torque""" + """Interaction with TORQUE""" def __init__(self, script, name, env_vars=None): """ @@ -80,12 +85,12 @@ def submit(self): os.environ.setdefault('WORKDIR', os.getcwd()) defvars = ['MAIL', 'HOME', 'PATH', 'SHELL', 'WORKDIR'] - vars = ["PBS_O_%s=%s" % (x, os.environ.get(x, 'NOTFOUND_%s' % x)) for x in defvars] + pbsvars = ["PBS_O_%s=%s" % (x, os.environ.get(x, 'NOTFOUND_%s' % x)) for x in defvars] # extend PBS variables with specified variables - vars.extend(["%s=%s" % (name, value) for (name, value) in self.env_vars.items()]) + pbsvars.extend(["%s=%s" % (name, value) for (name, value) in self.env_vars.items()]) variable_attributes = pbs.new_attropl(1) variable_attributes[0].name = 'Variable_List' - variable_attributes[0].value = ",".join(vars) + variable_attributes[0].value = ",".join(pbsvars) pbs_attributes.extend(variable_attributes) diff --git a/easybuild/tools/repository.py b/easybuild/tools/repository.py index 9a557a0185..b1dd2512ed 100644 --- a/easybuild/tools/repository.py +++ b/easybuild/tools/repository.py @@ -27,12 +27,12 @@ import os import shutil import socket -import sys import tempfile import time import easybuild -from easybuild.tools.build_log import getLog, EasyBuildError +from easybuild.tools.build_log import getLog + log = getLog('repo') try: @@ -42,11 +42,12 @@ pass try: - import pysvn + import pysvn #@UnusedImport from pysvn import ClientError #IGNORE:E0611 pysvn fails to recognize ClientError is available except ImportError: pass + class Repository: """ Interface for repositories @@ -99,7 +100,9 @@ def cleanup(self): """ return + class FileRepository(Repository): + """Class for file repositories.""" def setupRepo(self): """ @@ -160,8 +163,9 @@ def addEasyconfig(self, cfg, name, version, stats, previous): class GitRepository(FileRepository): """ - Class representing a git repository. + Class for git repositories. """ + def __init__(self, *args): """ Initialize git client to None (will be set later) @@ -175,8 +179,8 @@ def setupRepo(self): Set up git repository. """ try: - import git - from git import GitCommandError + import git #@UnusedImport + from git import GitCommandError #@UnusedImport except ImportError: log.exception("GitPython failed to load") self.wc = tempfile.mkdtemp(prefix='git-wc-') @@ -252,8 +256,9 @@ def cleanup(self): class SvnRepository(FileRepository): """ - class representing an svn repository + Class for svn repositories """ + def __init__(self, *args): """ Set self.client to None. Real logic is in setupRepo and createWorkingCopy diff --git a/easybuild/tools/systemtools.py b/easybuild/tools/systemtools.py index b20f669e0b..a058f1ccd5 100644 --- a/easybuild/tools/systemtools.py +++ b/easybuild/tools/systemtools.py @@ -1,5 +1,5 @@ ## -# Copyright 2009-2012 Jens Timmerman +# Copyright 2009-2012 Jens Timmerman, Kenneth Hoste # # This file is part of EasyBuild, # originally created by the HPC team of the University of Ghent (http://ugent.be/hpc). @@ -19,16 +19,18 @@ # along with EasyBuild. If not, see . ## """ -This module contains some usefull functions for getting system information +Module with useful functions for getting system information """ import os import re from easybuild.tools.filetools import run_cmd + INTEL = 'Intel' AMD = 'AMD' VENDORS = {'GenuineIntel': INTEL, 'AuthenticAMD': AMD} + class SystemToolsException(Exception): """raised when systemtools fails""" diff --git a/easybuild/tools/toolkit.py b/easybuild/tools/toolkit.py index 1f6ee0b065..fd34f5db10 100644 --- a/easybuild/tools/toolkit.py +++ b/easybuild/tools/toolkit.py @@ -28,12 +28,14 @@ import easybuild.tools.environment as env -# constant used for recognizing compilers, MPI libraries, ... + +# constants used for recognizing compilers, MPI libraries, ... GCC = "GCC" INTEL = "Intel" OPENMPI = "OpenMPI" QLOGIC = "QLogic" + class Toolkit: """ Class for compiler toolkits, consisting out of a compiler and dependencies (libraries). From c75697f656671f053c62bb0c0f32a9158206acf7 Mon Sep 17 00:00:00 2001 From: Toon Willems Date: Fri, 3 Aug 2012 12:29:24 +0200 Subject: [PATCH 326/798] typo and docstring --- easybuild/scripts/prep_for_release.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/easybuild/scripts/prep_for_release.py b/easybuild/scripts/prep_for_release.py index 8330476c73..4a2dc4d238 100755 --- a/easybuild/scripts/prep_for_release.py +++ b/easybuild/scripts/prep_for_release.py @@ -194,8 +194,10 @@ def check_clean_master_branch(home): return ok -# check wheter os.putenv or os.environ[]= is used inside easyblocks +# check whether os.putenv or os.environ[]= is used inside easyblocks def check_easyblocks_for_environment(home): + """ check whether os.putenv or os.environ[]= is used inside easyblocks """ + files = glob.glob(os.path.join(home, 'easybuild/easyblocks/[a-z]/*.py')) eb_files = filter(lambda x: os.path.basename(x) != '__init__.py', files) From 0b4959cf1906449cab9964abf40994fae3de882e Mon Sep 17 00:00:00 2001 From: Toon Willems Date: Fri, 3 Aug 2012 12:30:30 +0200 Subject: [PATCH 327/798] rename regex --- easybuild/scripts/prep_for_release.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/easybuild/scripts/prep_for_release.py b/easybuild/scripts/prep_for_release.py index 4a2dc4d238..3336348ec7 100755 --- a/easybuild/scripts/prep_for_release.py +++ b/easybuild/scripts/prep_for_release.py @@ -201,8 +201,8 @@ def check_easyblocks_for_environment(home): files = glob.glob(os.path.join(home, 'easybuild/easyblocks/[a-z]/*.py')) eb_files = filter(lambda x: os.path.basename(x) != '__init__.py', files) - os_environ = re.compile("os\.environ\[\w+\]\s*=\s*") - os_putenv = re.compile("os\.putenv") + os_env_re = re.compile("os\.environ\[\w+\]\s*=\s*") + os_putenv_re = re.compile("os\.putenv") found = [] for eb_file in eb_files: @@ -210,7 +210,7 @@ def check_easyblocks_for_environment(home): text = f.read() f.close() - if os_putenv.search(text) or os_environ.search(text): + if os_putenv_re.search(text) or os_env_re.search(text): found.append(eb_file) for faulty in found: From 94c7ab62f5f8439446f807435790587cf40a47fc Mon Sep 17 00:00:00 2001 From: Toon Willems Date: Fri, 3 Aug 2012 12:31:35 +0200 Subject: [PATCH 328/798] add comment --- easybuild/scripts/prep_for_release.py | 1 + 1 file changed, 1 insertion(+) diff --git a/easybuild/scripts/prep_for_release.py b/easybuild/scripts/prep_for_release.py index 3336348ec7..7f28bf9b86 100755 --- a/easybuild/scripts/prep_for_release.py +++ b/easybuild/scripts/prep_for_release.py @@ -253,6 +253,7 @@ def check_easyblocks_for_environment(home): # check for clean master branch all_checks.append(check_clean_master_branch(easybuild_home)) +# check for use of os.putenv and os.environ adjustments all_checks.append(check_easyblocks_for_environment(easybuild_home)) if not all(all_checks): From 99d84fd3fa654f4d86ec8598f0f3ef18f14110cc Mon Sep 17 00:00:00 2001 From: Toon Willems Date: Fri, 3 Aug 2012 12:32:36 +0200 Subject: [PATCH 329/798] forgot printing the fix --- easybuild/scripts/prep_for_release.py | 3 +++ 1 file changed, 3 insertions(+) diff --git a/easybuild/scripts/prep_for_release.py b/easybuild/scripts/prep_for_release.py index 7f28bf9b86..c75603842d 100755 --- a/easybuild/scripts/prep_for_release.py +++ b/easybuild/scripts/prep_for_release.py @@ -216,6 +216,9 @@ def check_easyblocks_for_environment(home): for faulty in found: warning("found os.environ or os.putenv inside eb_file: %s" % faulty) + if found: + warning("Only easybuild.tools.environment.set should be used for setting environment variables.") + return len(found) == 0 From 016dee7aa79295cff370f0308e31b6ea28aa39c7 Mon Sep 17 00:00:00 2001 From: Toon Willems Date: Fri, 3 Aug 2012 14:04:15 +0200 Subject: [PATCH 330/798] rechange headers based on @boegel's suggestion --- easybuild/__init__.py | 6 ++++- easybuild/build.py | 7 +++++- easybuild/easyblocks/0/__init__.py | 6 ++++- easybuild/easyblocks/__init__.py | 8 +++++-- easybuild/easyblocks/a/__init__.py | 6 ++++- easybuild/easyblocks/a/atlas.py | 10 +++++--- easybuild/easyblocks/b/__init__.py | 6 ++++- easybuild/easyblocks/b/binary.py | 8 +++++-- easybuild/easyblocks/b/blacs.py | 28 ++++++++++++---------- easybuild/easyblocks/c/__init__.py | 6 ++++- easybuild/easyblocks/c/cp2k.py | 30 ++++++++++++++---------- easybuild/easyblocks/d/__init__.py | 6 ++++- easybuild/easyblocks/d/doxygen.py | 8 +++++-- easybuild/easyblocks/e/__init__.py | 6 ++++- easybuild/easyblocks/f/__init__.py | 6 ++++- easybuild/easyblocks/g/__init__.py | 6 ++++- easybuild/easyblocks/g/g2clib.py | 6 ++++- easybuild/easyblocks/g/g2lib.py | 6 ++++- easybuild/easyblocks/g/gcc.py | 7 +++++- easybuild/easyblocks/h/__init__.py | 6 ++++- easybuild/easyblocks/h/hdf5.py | 8 +++++-- easybuild/easyblocks/h/hpl.py | 10 +++++--- easybuild/easyblocks/i/__init__.py | 6 ++++- easybuild/easyblocks/i/icc.py | 6 ++++- easybuild/easyblocks/i/ifort.py | 8 +++++-- easybuild/easyblocks/i/imkl.py | 6 ++++- easybuild/easyblocks/i/impi.py | 8 +++++-- easybuild/easyblocks/i/intelbase.py | 6 ++++- easybuild/easyblocks/i/ipp.py | 8 +++++-- easybuild/easyblocks/i/itac.py | 10 +++++--- easybuild/easyblocks/j/__init__.py | 6 ++++- easybuild/easyblocks/k/__init__.py | 6 ++++- easybuild/easyblocks/l/__init__.py | 6 ++++- easybuild/easyblocks/l/lapack.py | 6 ++++- easybuild/easyblocks/l/libsmm.py | 16 ++++++++----- easybuild/easyblocks/m/__init__.py | 6 ++++- easybuild/easyblocks/m/maple.py | 6 ++++- easybuild/easyblocks/m/mrbayes.py | 8 +++++-- easybuild/easyblocks/m/mvapich2.py | 6 ++++- easybuild/easyblocks/n/__init__.py | 6 ++++- easybuild/easyblocks/n/ncl.py | 12 ++++++---- easybuild/easyblocks/n/netcdf.py | 6 ++++- easybuild/easyblocks/n/netcdf_fortran.py | 6 ++++- easybuild/easyblocks/o/__init__.py | 6 ++++- easybuild/easyblocks/o/openfoam.py | 6 ++++- easybuild/easyblocks/p/__init__.py | 6 ++++- easybuild/easyblocks/p/python.py | 10 +++++--- easybuild/easyblocks/q/__init__.py | 6 ++++- easybuild/easyblocks/r/__init__.py | 6 ++++- easybuild/easyblocks/s/__init__.py | 6 ++++- easybuild/easyblocks/s/scalapack.py | 10 +++++--- easybuild/easyblocks/t/__init__.py | 6 ++++- easybuild/easyblocks/t/tarball.py | 10 +++++--- easybuild/easyblocks/t/tbb.py | 6 ++++- easybuild/easyblocks/t/toolkit.py | 8 +++++-- easybuild/easyblocks/u/__init__.py | 6 ++++- easybuild/easyblocks/v/__init__.py | 6 ++++- easybuild/easyblocks/w/__init__.py | 6 ++++- easybuild/easyblocks/w/wps.py | 6 ++++- easybuild/easyblocks/w/wrf.py | 6 ++++- easybuild/easyblocks/x/__init__.py | 6 ++++- easybuild/easyblocks/y/__init__.py | 6 ++++- easybuild/easyblocks/z/__init__.py | 6 ++++- easybuild/easybuild_config.py | 7 +++++- easybuild/framework/__init__.py | 6 ++++- easybuild/framework/application.py | 6 ++++- easybuild/scripts/port_easyblock.py | 12 ++++++---- easybuild/scripts/prep_for_release.py | 11 ++++++--- easybuild/scripts/repo_setup.py | 8 +++++-- easybuild/tools/__init__.py | 6 ++++- easybuild/tools/build_log.py | 6 ++++- easybuild/tools/class_dumper.py | 7 +++++- easybuild/tools/config.py | 6 ++++- easybuild/tools/filetools.py | 6 ++++- easybuild/tools/module_generator.py | 6 ++++- easybuild/tools/modules.py | 6 ++++- easybuild/tools/repository.py | 6 ++++- easybuild/tools/systemtools.py | 4 ++-- easybuild/tools/toolkit.py | 7 +++++- eb | 6 ++++- 80 files changed, 461 insertions(+), 139 deletions(-) diff --git a/easybuild/__init__.py b/easybuild/__init__.py index 6a08d0f4d0..16e323b723 100644 --- a/easybuild/__init__.py +++ b/easybuild/__init__.py @@ -1,5 +1,9 @@ ## -# Copyright 2009-2012 Stijn De Weirdt, Dries Verdegem, Kenneth Hoste, Pieter De Baets, Jens Timmerman +# Copyright 2009-2012 Stijn De Weirdt +# Copyright 2010 Dries Verdegem +# Copyright 2010-2012 Kenneth Hoste +# Copyright 2011 Pieter De Baets +# Copyright 2011-2012 Jens Timmerman # # This file is part of EasyBuild, # originally created by the HPC team of the University of Ghent (http://ugent.be/hpc). diff --git a/easybuild/build.py b/easybuild/build.py index 7edb7b944a..00c40e37bd 100644 --- a/easybuild/build.py +++ b/easybuild/build.py @@ -1,6 +1,11 @@ #!/usr/bin/env python ## -# Copyright 2009-2012 Stijn De Weirdt, Dries Verdegem, Kenneth Hoste, Pieter De Baets, Jens Timmerman, Toon Willems +# Copyright 2009-2012 Stijn De Weirdt +# Copyright 2010 Dries Verdegem +# Copyright 2010-2012 Kenneth Hoste +# Copyright 2011 Pieter De Baets +# Copyright 2011-2012 Jens Timmerman +# Copyright 2012 Toon Willems # # This file is part of EasyBuild, # originally created by the HPC team of the University of Ghent (http://ugent.be/hpc). diff --git a/easybuild/easyblocks/0/__init__.py b/easybuild/easyblocks/0/__init__.py index 975f868432..841038b2fa 100644 --- a/easybuild/easyblocks/0/__init__.py +++ b/easybuild/easyblocks/0/__init__.py @@ -1,5 +1,9 @@ ## -# Copyright 2009-2012 Stijn De Weirdt, Dries Verdegem, Kenneth Hoste, Pieter De Baets, Jens Timmerman +# Copyright 2009-2012 Stijn De Weirdt +# Copyright 2010 Dries Verdegem +# Copyright 2010-2012 Kenneth Hoste +# Copyright 2011 Pieter De Baets +# Copyright 2011-2012 Jens Timmerman # # This file is part of EasyBuild, # originally created by the HPC team of the University of Ghent (http://ugent.be/hpc). diff --git a/easybuild/easyblocks/__init__.py b/easybuild/easyblocks/__init__.py index d0858f2c74..71d40fecf2 100644 --- a/easybuild/easyblocks/__init__.py +++ b/easybuild/easyblocks/__init__.py @@ -1,5 +1,9 @@ ## -# Copyright 2009-2012 Stijn De Weirdt, Dries Verdegem, Kenneth Hoste, Pieter De Baets, Jens Timmerman +# Copyright 2009-2012 Stijn De Weirdt +# Copyright 2010 Dries Verdegem +# Copyright 2010-2012 Kenneth Hoste +# Copyright 2011 Pieter De Baets +# Copyright 2011-2012 Jens Timmerman # # This file is part of EasyBuild, # originally created by the HPC team of the University of Ghent (http://ugent.be/hpc). @@ -17,4 +21,4 @@ # # You should have received a copy of the GNU General Public License # along with EasyBuild. If not, see . -## \ No newline at end of file +## diff --git a/easybuild/easyblocks/a/__init__.py b/easybuild/easyblocks/a/__init__.py index 975f868432..841038b2fa 100644 --- a/easybuild/easyblocks/a/__init__.py +++ b/easybuild/easyblocks/a/__init__.py @@ -1,5 +1,9 @@ ## -# Copyright 2009-2012 Stijn De Weirdt, Dries Verdegem, Kenneth Hoste, Pieter De Baets, Jens Timmerman +# Copyright 2009-2012 Stijn De Weirdt +# Copyright 2010 Dries Verdegem +# Copyright 2010-2012 Kenneth Hoste +# Copyright 2011 Pieter De Baets +# Copyright 2011-2012 Jens Timmerman # # This file is part of EasyBuild, # originally created by the HPC team of the University of Ghent (http://ugent.be/hpc). diff --git a/easybuild/easyblocks/a/atlas.py b/easybuild/easyblocks/a/atlas.py index 8dbb06fcec..c1ae82a001 100644 --- a/easybuild/easyblocks/a/atlas.py +++ b/easybuild/easyblocks/a/atlas.py @@ -1,5 +1,9 @@ ## -# Copyright 2009-2012 Stijn De Weirdt, Dries Verdegem, Kenneth Hoste, Pieter De Baets, Jens Timmerman +# Copyright 2009-2012 Stijn De Weirdt +# Copyright 2010 Dries Verdegem +# Copyright 2010-2012 Kenneth Hoste +# Copyright 2011 Pieter De Baets +# Copyright 2011-2012 Jens Timmerman # # This file is part of EasyBuild, # originally created by the HPC team of the University of Ghent (http://ugent.be/hpc). @@ -132,9 +136,9 @@ def make(self, verbose=False): def make_install(self): """Install step - + Default make install and optionally remove incomplete lapack libs. - If the full_lapack option was set to false we don't + If the full_lapack option was set to false we don't """ Application.make_install(self) if not self.getcfg('full_lapack'): diff --git a/easybuild/easyblocks/b/__init__.py b/easybuild/easyblocks/b/__init__.py index 975f868432..841038b2fa 100644 --- a/easybuild/easyblocks/b/__init__.py +++ b/easybuild/easyblocks/b/__init__.py @@ -1,5 +1,9 @@ ## -# Copyright 2009-2012 Stijn De Weirdt, Dries Verdegem, Kenneth Hoste, Pieter De Baets, Jens Timmerman +# Copyright 2009-2012 Stijn De Weirdt +# Copyright 2010 Dries Verdegem +# Copyright 2010-2012 Kenneth Hoste +# Copyright 2011 Pieter De Baets +# Copyright 2011-2012 Jens Timmerman # # This file is part of EasyBuild, # originally created by the HPC team of the University of Ghent (http://ugent.be/hpc). diff --git a/easybuild/easyblocks/b/binary.py b/easybuild/easyblocks/b/binary.py index e4e83ccd51..2046e2ca28 100644 --- a/easybuild/easyblocks/b/binary.py +++ b/easybuild/easyblocks/b/binary.py @@ -1,5 +1,9 @@ ## -# Copyright 2009-2012 Stijn Deweirdt, Dries Verdegem, Kenneth Hoste, Pieter De Baets, Jens Timmerman +# Copyright 2009-2012 Stijn De Weirdt +# Copyright 2010 Dries Verdegem +# Copyright 2010-2012 Kenneth Hoste +# Copyright 2011 Pieter De Baets +# Copyright 2011-2012 Jens Timmerman # # This file is part of EasyBuild, # originally created by the HPC team of the University of Ghent (http://ugent.be/hpc). @@ -38,7 +42,7 @@ def make(self): pass def make_installdir(self): - """Do not actually create installdir, copytree in make_install doesn't + """Do not actually create installdir, copytree in make_install doesn't want the destination directory already exist But in python < 2.5 the actual path leading up to the directory has to exist.""" self.make_dir(self.installdir, clean=True, dontcreateinstalldir=True) diff --git a/easybuild/easyblocks/b/blacs.py b/easybuild/easyblocks/b/blacs.py index 7a89dd8ed8..be45f7fd4f 100644 --- a/easybuild/easyblocks/b/blacs.py +++ b/easybuild/easyblocks/b/blacs.py @@ -1,5 +1,9 @@ ## -# Copyright 2009-2012 Stijn De Weirdt, Dries Verdegem, Kenneth Hoste, Pieter De Baets, Jens Timmerman +# Copyright 2009-2012 Stijn De Weirdt +# Copyright 2010 Dries Verdegem +# Copyright 2010-2012 Kenneth Hoste +# Copyright 2011 Pieter De Baets +# Copyright 2011-2012 Jens Timmerman # # This file is part of EasyBuild, # originally created by the HPC team of the University of Ghent (http://ugent.be/hpc). @@ -27,9 +31,9 @@ def det_interface(log, path): """Determine interface through xintface""" - + (out, _) = run_cmd(os.path.join(path,"xintface"), log_all=True, simple=False) - + intregexp = re.compile(".*INTFACE\s*=\s*-D(\S+)\s*") res = intregexp.search(out) if res: @@ -97,7 +101,7 @@ def make(self): cmd = "make" cmd += " CC='%(mpicc)s' F77='%(mpif77)s -I$(MPIINCdir)' MPIdir=%(base)s" \ " MPILIB='%(mpilib)s' BTOPdir=%(builddir)s INTERFACE=NONE" % opts - + # determine interface using xintface run_cmd("%s xintface" % cmd, log_all=True, simple=True) @@ -117,17 +121,17 @@ def make(self): if not notregexp.search(out): # if it doesn't say '_NOT_', set it comm = "TRANSCOMM='-DCSameF77'" - + else: (_, ec) = run_cmd("%s xtc_UseMpich" % cmd, log_all=False, log_ok=False, simple=False) if ec == 0: - + (out, _) = run_cmd("mpirun -np 2 ./EXE/xtc_UseMpich", log_all=True, simple=False) - + if not notregexp.search(out): - + commregexp = re.compile('Set TRANSCOMM\s*=\s*(.*)$') - + res = commregexp.search(out) if res: # found how to set TRANSCOMM, so set it @@ -181,11 +185,11 @@ def make_install(self): try: os.makedirs(dest) - + shutil.copy2(src, dest) - + self.log.debug("Copied %s to %s" % (src, dest)) - + except OSError, err: self.log.error("Copying %s to installation dir %s failed: %s" % (src, dest, err)) diff --git a/easybuild/easyblocks/c/__init__.py b/easybuild/easyblocks/c/__init__.py index 975f868432..841038b2fa 100644 --- a/easybuild/easyblocks/c/__init__.py +++ b/easybuild/easyblocks/c/__init__.py @@ -1,5 +1,9 @@ ## -# Copyright 2009-2012 Stijn De Weirdt, Dries Verdegem, Kenneth Hoste, Pieter De Baets, Jens Timmerman +# Copyright 2009-2012 Stijn De Weirdt +# Copyright 2010 Dries Verdegem +# Copyright 2010-2012 Kenneth Hoste +# Copyright 2011 Pieter De Baets +# Copyright 2011-2012 Jens Timmerman # # This file is part of EasyBuild, # originally created by the HPC team of the University of Ghent (http://ugent.be/hpc). diff --git a/easybuild/easyblocks/c/cp2k.py b/easybuild/easyblocks/c/cp2k.py index c22932ca22..b35abde37e 100644 --- a/easybuild/easyblocks/c/cp2k.py +++ b/easybuild/easyblocks/c/cp2k.py @@ -1,5 +1,9 @@ ## -# Copyright 2009-2012 Stijn De Weirdt, Dries Verdegem, Kenneth Hoste, Pieter De Baets, Jens Timmerman +# Copyright 2009-2012 Stijn De Weirdt +# Copyright 2010 Dries Verdegem +# Copyright 2010-2012 Kenneth Hoste +# Copyright 2011 Pieter De Baets +# Copyright 2011-2012 Jens Timmerman # # This file is part of EasyBuild, # originally created by the HPC team of the University of Ghent (http://ugent.be/hpc). @@ -45,7 +49,7 @@ def __init__(self, *args, **kwargs): self.cfg.update({'type':['popt',"Type of build ('popt' or 'psmp') (default: 'popt)"], 'typeopt':[True,"Enable optimization (default: True)"], 'libint':[True,"Use LibInt (default: True)"], - 'modincprefix':['',"IMKL prefix for modinc include dir (default: '')"], + 'modincprefix':['',"IMKL prefix for modinc include dir (default: '')"], 'modinc':[[],"List of modinc's to use (*.f90), or 'True' to use all found at given prefix (default: [])"], 'extracflags':['',"Extra CFLAGS to be added (default: '')"], 'extradflags':['',"Extra DFLAGS to be added (default: '')"], @@ -129,9 +133,9 @@ def configure(self): if os.getenv('SOFTROOTIMKL'): options = self.configureMKL(options) elif os.getenv('SOFTROOTACML'): - options = self.configureACML(options) + options = self.configureACML(options) elif os.getenv('SOFTROOTATLAS'): - options = self.configureATLAS(options) + options = self.configureATLAS(options) if os.getenv('SOFTROOTFFTW'): options = self.configureFFTW(options) @@ -148,7 +152,7 @@ def configure(self): options['LIBS'] = "-Wl,--start-group %s -Wl,--end-group" % options['LIBS'] # create arch file using options set - archfile = os.path.join(self.getcfg('startfrom'), 'arch', + archfile = os.path.join(self.getcfg('startfrom'), 'arch', '%s.%s' % (self.typearch, self.getcfg('type'))) try: txt = self._generateMakefile(options) @@ -188,7 +192,7 @@ def prepmodinc(self): else: self.log.error("prepmodinc: Please specify either a boolean value " \ - "or a list of files in modinc (found: %s)." % + "or a list of files in modinc (found: %s)." % self.getcfg("modinc")) f77 = os.getenv('F77') @@ -235,7 +239,7 @@ def configureCommon(self): mpi2 = True else: self.log.debug("MPI-2 supporting MPI library %s not loaded.") - + if not mpi2: self.log.error("CP2K needs MPI-2, no known MPI-2 supporting library loaded?") @@ -248,7 +252,7 @@ def configureCommon(self): 'AR': 'ar -r', 'CPPFLAGS': '', - + 'FPIC': self.fpic, 'DEBUG': self.debug, @@ -409,14 +413,14 @@ def configureMKL(self, options): 'INTEL_INC': '$(MKLROOT)/include', 'INTEL_INCF': '$(INTEL_INC)/fftw', }) - + options['DFLAGS'] += ' -D__FFTW3 -D__FFTMKL' extra = '' if self.modincpath: extra = '-I%s' % self.modincpath options['CFLAGS'] += ' -I$(INTEL_INC) -I$(INTEL_INCF) %s $(FPIC) $(DEBUG)' % extra - + options['LIBS'] += ' %s %s' % (self.libsmm, os.getenv('LIBSCALAPACK')) return options @@ -632,8 +636,8 @@ def make_install(self): if os.path.isfile(exefile): shutil.copy2(exefile, targetdir) except OSError, err: - self.log.error("Copying executables from %s to bin dir %s failed: %s" % (exedir, - targetdir, + self.log.error("Copying executables from %s to bin dir %s failed: %s" % (exedir, + targetdir, err) ) # copy tests @@ -673,4 +677,4 @@ def sanitycheck(self): self.log.info("Customized sanity check paths: %s" % self.getcfg('sanityCheckPaths')) - Application.sanitycheck(self) \ No newline at end of file + Application.sanitycheck(self) diff --git a/easybuild/easyblocks/d/__init__.py b/easybuild/easyblocks/d/__init__.py index 975f868432..841038b2fa 100644 --- a/easybuild/easyblocks/d/__init__.py +++ b/easybuild/easyblocks/d/__init__.py @@ -1,5 +1,9 @@ ## -# Copyright 2009-2012 Stijn De Weirdt, Dries Verdegem, Kenneth Hoste, Pieter De Baets, Jens Timmerman +# Copyright 2009-2012 Stijn De Weirdt +# Copyright 2010 Dries Verdegem +# Copyright 2010-2012 Kenneth Hoste +# Copyright 2011 Pieter De Baets +# Copyright 2011-2012 Jens Timmerman # # This file is part of EasyBuild, # originally created by the HPC team of the University of Ghent (http://ugent.be/hpc). diff --git a/easybuild/easyblocks/d/doxygen.py b/easybuild/easyblocks/d/doxygen.py index f80d464a78..0459cd2208 100644 --- a/easybuild/easyblocks/d/doxygen.py +++ b/easybuild/easyblocks/d/doxygen.py @@ -1,5 +1,9 @@ ## -# Copyright 2009-2012 Stijn De Weirdt, Dries Verdegem, Kenneth Hoste, Pieter De Baets, Jens Timmerman +# Copyright 2009-2012 Stijn De Weirdt +# Copyright 2010 Dries Verdegem +# Copyright 2010-2012 Kenneth Hoste +# Copyright 2011 Pieter De Baets +# Copyright 2011-2012 Jens Timmerman # # This file is part of EasyBuild, # originally created by the HPC team of the University of Ghent (http://ugent.be/hpc). @@ -43,4 +47,4 @@ def sanitycheck(self): self.log.info("Customized sanity check paths: %s"%self.getcfg('sanityCheckPaths')) - Application.sanitycheck(self) \ No newline at end of file + Application.sanitycheck(self) diff --git a/easybuild/easyblocks/e/__init__.py b/easybuild/easyblocks/e/__init__.py index 975f868432..841038b2fa 100644 --- a/easybuild/easyblocks/e/__init__.py +++ b/easybuild/easyblocks/e/__init__.py @@ -1,5 +1,9 @@ ## -# Copyright 2009-2012 Stijn De Weirdt, Dries Verdegem, Kenneth Hoste, Pieter De Baets, Jens Timmerman +# Copyright 2009-2012 Stijn De Weirdt +# Copyright 2010 Dries Verdegem +# Copyright 2010-2012 Kenneth Hoste +# Copyright 2011 Pieter De Baets +# Copyright 2011-2012 Jens Timmerman # # This file is part of EasyBuild, # originally created by the HPC team of the University of Ghent (http://ugent.be/hpc). diff --git a/easybuild/easyblocks/f/__init__.py b/easybuild/easyblocks/f/__init__.py index 975f868432..841038b2fa 100644 --- a/easybuild/easyblocks/f/__init__.py +++ b/easybuild/easyblocks/f/__init__.py @@ -1,5 +1,9 @@ ## -# Copyright 2009-2012 Stijn De Weirdt, Dries Verdegem, Kenneth Hoste, Pieter De Baets, Jens Timmerman +# Copyright 2009-2012 Stijn De Weirdt +# Copyright 2010 Dries Verdegem +# Copyright 2010-2012 Kenneth Hoste +# Copyright 2011 Pieter De Baets +# Copyright 2011-2012 Jens Timmerman # # This file is part of EasyBuild, # originally created by the HPC team of the University of Ghent (http://ugent.be/hpc). diff --git a/easybuild/easyblocks/g/__init__.py b/easybuild/easyblocks/g/__init__.py index 975f868432..841038b2fa 100644 --- a/easybuild/easyblocks/g/__init__.py +++ b/easybuild/easyblocks/g/__init__.py @@ -1,5 +1,9 @@ ## -# Copyright 2009-2012 Stijn De Weirdt, Dries Verdegem, Kenneth Hoste, Pieter De Baets, Jens Timmerman +# Copyright 2009-2012 Stijn De Weirdt +# Copyright 2010 Dries Verdegem +# Copyright 2010-2012 Kenneth Hoste +# Copyright 2011 Pieter De Baets +# Copyright 2011-2012 Jens Timmerman # # This file is part of EasyBuild, # originally created by the HPC team of the University of Ghent (http://ugent.be/hpc). diff --git a/easybuild/easyblocks/g/g2clib.py b/easybuild/easyblocks/g/g2clib.py index beaebb2a24..1f17d1a44b 100644 --- a/easybuild/easyblocks/g/g2clib.py +++ b/easybuild/easyblocks/g/g2clib.py @@ -1,5 +1,9 @@ ## -# Copyright 2009-2012 Stijn De Weirdt, Dries Verdegem, Kenneth Hoste, Pieter De Baets, Jens Timmerman +# Copyright 2009-2012 Stijn De Weirdt +# Copyright 2010 Dries Verdegem +# Copyright 2010-2012 Kenneth Hoste +# Copyright 2011 Pieter De Baets +# Copyright 2011-2012 Jens Timmerman # # This file is part of EasyBuild, # originally created by the HPC team of the University of Ghent (http://ugent.be/hpc). diff --git a/easybuild/easyblocks/g/g2lib.py b/easybuild/easyblocks/g/g2lib.py index 9cc357ba00..41a5979dbb 100644 --- a/easybuild/easyblocks/g/g2lib.py +++ b/easybuild/easyblocks/g/g2lib.py @@ -1,5 +1,9 @@ ## -# Copyright 2009-2012 Stijn De Weirdt, Dries Verdegem, Kenneth Hoste, Pieter De Baets, Jens Timmerman +# Copyright 2009-2012 Stijn De Weirdt +# Copyright 2010 Dries Verdegem +# Copyright 2010-2012 Kenneth Hoste +# Copyright 2011 Pieter De Baets +# Copyright 2011-2012 Jens Timmerman # # This file is part of EasyBuild, # originally created by the HPC team of the University of Ghent (http://ugent.be/hpc). diff --git a/easybuild/easyblocks/g/gcc.py b/easybuild/easyblocks/g/gcc.py index fb73bc6c7f..1028455a63 100644 --- a/easybuild/easyblocks/g/gcc.py +++ b/easybuild/easyblocks/g/gcc.py @@ -1,5 +1,10 @@ ## -# Copyright 2009-2012 Stijn De weirdt, Dries Verdegem, Kenneth Hoste, Pieter De Baets, Jens Timmerman, Toon Willems +# Copyright 2009-2012 Stijn De Weirdt +# Copyright 2010 Dries Verdegem +# Copyright 2010-2012 Kenneth Hoste +# Copyright 2011 Pieter De Baets +# Copyright 2011-2012 Jens Timmerman +# Copyright 2012 Toon Willems # # This file is part of EasyBuild, # originally created by the HPC team of the University of Ghent (http://ugent.be/hpc). diff --git a/easybuild/easyblocks/h/__init__.py b/easybuild/easyblocks/h/__init__.py index 975f868432..841038b2fa 100644 --- a/easybuild/easyblocks/h/__init__.py +++ b/easybuild/easyblocks/h/__init__.py @@ -1,5 +1,9 @@ ## -# Copyright 2009-2012 Stijn De Weirdt, Dries Verdegem, Kenneth Hoste, Pieter De Baets, Jens Timmerman +# Copyright 2009-2012 Stijn De Weirdt +# Copyright 2010 Dries Verdegem +# Copyright 2010-2012 Kenneth Hoste +# Copyright 2011 Pieter De Baets +# Copyright 2011-2012 Jens Timmerman # # This file is part of EasyBuild, # originally created by the HPC team of the University of Ghent (http://ugent.be/hpc). diff --git a/easybuild/easyblocks/h/hdf5.py b/easybuild/easyblocks/h/hdf5.py index 61aaebba79..88d28e5441 100644 --- a/easybuild/easyblocks/h/hdf5.py +++ b/easybuild/easyblocks/h/hdf5.py @@ -1,5 +1,9 @@ ## -# Copyright 2009-2012 Stijn De Weirdt, Dries Verdegem, Kenneth Hoste, Pieter De Baets, Jens Timmerman +# Copyright 2009-2012 Stijn De Weirdt +# Copyright 2010 Dries Verdegem +# Copyright 2010-2012 Kenneth Hoste +# Copyright 2011 Pieter De Baets +# Copyright 2011-2012 Jens Timmerman # # This file is part of EasyBuild, # originally created by the HPC team of the University of Ghent (http://ugent.be/hpc). @@ -78,4 +82,4 @@ def sanitycheck(self): self.log.info("Customized sanity check paths: %s"%self.getcfg('sanityCheckPaths')) - Application.sanitycheck(self) \ No newline at end of file + Application.sanitycheck(self) diff --git a/easybuild/easyblocks/h/hpl.py b/easybuild/easyblocks/h/hpl.py index 8b09476cb1..f008234fb5 100644 --- a/easybuild/easyblocks/h/hpl.py +++ b/easybuild/easyblocks/h/hpl.py @@ -1,5 +1,9 @@ ## -# Copyright 2009-2012 Stijn De Weirdt, Dries Verdegem, Kenneth Hoste, Pieter De Baets, Jens Timmerman +# Copyright 2009-2012 Stijn De Weirdt +# Copyright 2010 Dries Verdegem +# Copyright 2010-2012 Kenneth Hoste +# Copyright 2011 Pieter De Baets +# Copyright 2011-2012 Jens Timmerman # # This file is part of EasyBuild, # originally created by the HPC team of the University of Ghent (http://ugent.be/hpc). @@ -27,7 +31,7 @@ class HPL(Application): """ Support for building HPL (High Performance Linpack) - create Make.UNKNOWN - - build with make and install + - build with make and install """ def configure(self, subdir=None): @@ -120,4 +124,4 @@ def sanitycheck(self): self.log.info("Customized sanity check paths: %s"%self.getcfg('sanityCheckPaths')) - Application.sanitycheck(self) \ No newline at end of file + Application.sanitycheck(self) diff --git a/easybuild/easyblocks/i/__init__.py b/easybuild/easyblocks/i/__init__.py index 975f868432..841038b2fa 100644 --- a/easybuild/easyblocks/i/__init__.py +++ b/easybuild/easyblocks/i/__init__.py @@ -1,5 +1,9 @@ ## -# Copyright 2009-2012 Stijn De Weirdt, Dries Verdegem, Kenneth Hoste, Pieter De Baets, Jens Timmerman +# Copyright 2009-2012 Stijn De Weirdt +# Copyright 2010 Dries Verdegem +# Copyright 2010-2012 Kenneth Hoste +# Copyright 2011 Pieter De Baets +# Copyright 2011-2012 Jens Timmerman # # This file is part of EasyBuild, # originally created by the HPC team of the University of Ghent (http://ugent.be/hpc). diff --git a/easybuild/easyblocks/i/icc.py b/easybuild/easyblocks/i/icc.py index 937adad643..e943429ffe 100644 --- a/easybuild/easyblocks/i/icc.py +++ b/easybuild/easyblocks/i/icc.py @@ -1,5 +1,9 @@ ## -# Copyright 2009-2012 Stijn De Weirdt, Dries Verdegem, Kenneth Hoste, Pieter De Baets, Jens Timmerman +# Copyright 2009-2012 Stijn De Weirdt +# Copyright 2010 Dries Verdegem +# Copyright 2010-2012 Kenneth Hoste +# Copyright 2011 Pieter De Baets +# Copyright 2011-2012 Jens Timmerman # # This file is part of EasyBuild, # originally created by the HPC team of the University of Ghent (http://ugent.be/hpc). diff --git a/easybuild/easyblocks/i/ifort.py b/easybuild/easyblocks/i/ifort.py index 084cc38808..d343c1f9ec 100644 --- a/easybuild/easyblocks/i/ifort.py +++ b/easybuild/easyblocks/i/ifort.py @@ -1,5 +1,9 @@ ## -# Copyright 2009-2012 Stijn De Weirdt, Dries Verdegem, Kenneth Hoste, Pieter De Baets, Jens Timmerman +# Copyright 2009-2012 Stijn De Weirdt +# Copyright 2010 Dries Verdegem +# Copyright 2010-2012 Kenneth Hoste +# Copyright 2011 Pieter De Baets +# Copyright 2011-2012 Jens Timmerman # # This file is part of EasyBuild, # originally created by the HPC team of the University of Ghent (http://ugent.be/hpc). @@ -47,4 +51,4 @@ def sanitycheck(self): self.log.info("Customized sanity check paths: %s" % self.getcfg('sanityCheckPaths')) - IntelBase.sanitycheck(self) \ No newline at end of file + IntelBase.sanitycheck(self) diff --git a/easybuild/easyblocks/i/imkl.py b/easybuild/easyblocks/i/imkl.py index 825881f75f..259550167f 100644 --- a/easybuild/easyblocks/i/imkl.py +++ b/easybuild/easyblocks/i/imkl.py @@ -1,5 +1,9 @@ ## -# Copyright 2009-2012 Stijn De Weirdt, Dries Verdegem, Kenneth Hoste, Pieter De Baets, Jens Timmerman +# Copyright 2009-2012 Stijn De Weirdt +# Copyright 2010 Dries Verdegem +# Copyright 2010-2012 Kenneth Hoste +# Copyright 2011 Pieter De Baets +# Copyright 2011-2012 Jens Timmerman # # This file is part of EasyBuild, # originally created by the HPC team of the University of Ghent (http://ugent.be/hpc). diff --git a/easybuild/easyblocks/i/impi.py b/easybuild/easyblocks/i/impi.py index 91c9d9e7f7..5dbdc118bd 100644 --- a/easybuild/easyblocks/i/impi.py +++ b/easybuild/easyblocks/i/impi.py @@ -1,5 +1,9 @@ ## -# Copyright 2009-2012 Stijn De Weirdt, Dries Verdegem, Kenneth Hoste, Pieter De Baets, Jens Timmerman +# Copyright 2009-2012 Stijn De Weirdt +# Copyright 2010 Dries Verdegem +# Copyright 2010-2012 Kenneth Hoste +# Copyright 2011 Pieter De Baets +# Copyright 2011-2012 Jens Timmerman # # This file is part of EasyBuild, # originally created by the HPC team of the University of Ghent (http://ugent.be/hpc). @@ -105,4 +109,4 @@ def make_module_extra(self): txt += "prepend-path\t%s\t\t%s\n" % ('INTEL_LICENSE_FILE', self.license) txt += "setenv\t%s\t\t$root\n" % ('I_MPI_ROOT') - return txt \ No newline at end of file + return txt diff --git a/easybuild/easyblocks/i/intelbase.py b/easybuild/easyblocks/i/intelbase.py index 70c03ce5ef..dd9c872c46 100644 --- a/easybuild/easyblocks/i/intelbase.py +++ b/easybuild/easyblocks/i/intelbase.py @@ -1,5 +1,9 @@ ## -# Copyright 2009-2012 Stijn De Weirdt, Dries Verdegem, Kenneth Hoste, Pieter De Baets, Jens Timmerman +# Copyright 2009-2012 Stijn De Weirdt +# Copyright 2010 Dries Verdegem +# Copyright 2010-2012 Kenneth Hoste +# Copyright 2011 Pieter De Baets +# Copyright 2011-2012 Jens Timmerman # # This file is part of EasyBuild, # originally created by the HPC team of the University of Ghent (http://ugent.be/hpc). diff --git a/easybuild/easyblocks/i/ipp.py b/easybuild/easyblocks/i/ipp.py index a03add7e35..0b79cc58de 100644 --- a/easybuild/easyblocks/i/ipp.py +++ b/easybuild/easyblocks/i/ipp.py @@ -1,5 +1,9 @@ ## -# Copyright 2009-2012 Stijn De Weirdt, Dries Verdegem, Kenneth Hoste, Pieter De Baets, Jens Timmerman +# Copyright 2009-2012 Stijn De Weirdt +# Copyright 2010 Dries Verdegem +# Copyright 2010-2012 Kenneth Hoste +# Copyright 2011 Pieter De Baets +# Copyright 2011-2012 Jens Timmerman # # This file is part of EasyBuild, # originally created by the HPC team of the University of Ghent (http://ugent.be/hpc). @@ -35,4 +39,4 @@ def sanitycheck(self): self.log.info("Customized sanity check paths: %s" % self.getcfg('sanityCheckPaths')) - IntelBase.sanitycheck(self) \ No newline at end of file + IntelBase.sanitycheck(self) diff --git a/easybuild/easyblocks/i/itac.py b/easybuild/easyblocks/i/itac.py index 5ff79eb461..e8d9e58988 100644 --- a/easybuild/easyblocks/i/itac.py +++ b/easybuild/easyblocks/i/itac.py @@ -1,5 +1,9 @@ ## -# Copyright 2009-2012 Stijn De Weirdt, Dries Verdegem, Kenneth Hoste, Pieter De Baets, Jens Timmerman +# Copyright 2009-2012 Stijn De Weirdt +# Copyright 2010 Dries Verdegem +# Copyright 2010-2012 Kenneth Hoste +# Copyright 2011 Pieter De Baets +# Copyright 2011-2012 Jens Timmerman # # This file is part of EasyBuild, # originally created by the HPC team of the University of Ghent (http://ugent.be/hpc). @@ -82,7 +86,7 @@ def make_module_req_guess(self): 'VT_LIB_DIR':['itac/lib_%s' % self.getcfg('preferredmpi')], 'VT_SLIB_DIR':['itac/lib_s%s' % self.getcfg('preferredmpi')] } - + if self.getcfg('m32'): guesses.update({ 'PATH':['bin', 'bin/ia32', 'ia32/bin'], @@ -103,4 +107,4 @@ def make_module_extra(self): txt += "setenv\t%s\t\t%s\n" % ('VT_MPI', self.getcfg('preferredmpi')) txt += "setenv\t%s\t\t%s\n" % ('VT_ADD_LIBS', '"-ldwarf -lelf -lvtunwind -lnsl -lm -ldl -lpthread"') - return txt \ No newline at end of file + return txt diff --git a/easybuild/easyblocks/j/__init__.py b/easybuild/easyblocks/j/__init__.py index 975f868432..841038b2fa 100644 --- a/easybuild/easyblocks/j/__init__.py +++ b/easybuild/easyblocks/j/__init__.py @@ -1,5 +1,9 @@ ## -# Copyright 2009-2012 Stijn De Weirdt, Dries Verdegem, Kenneth Hoste, Pieter De Baets, Jens Timmerman +# Copyright 2009-2012 Stijn De Weirdt +# Copyright 2010 Dries Verdegem +# Copyright 2010-2012 Kenneth Hoste +# Copyright 2011 Pieter De Baets +# Copyright 2011-2012 Jens Timmerman # # This file is part of EasyBuild, # originally created by the HPC team of the University of Ghent (http://ugent.be/hpc). diff --git a/easybuild/easyblocks/k/__init__.py b/easybuild/easyblocks/k/__init__.py index 975f868432..841038b2fa 100644 --- a/easybuild/easyblocks/k/__init__.py +++ b/easybuild/easyblocks/k/__init__.py @@ -1,5 +1,9 @@ ## -# Copyright 2009-2012 Stijn De Weirdt, Dries Verdegem, Kenneth Hoste, Pieter De Baets, Jens Timmerman +# Copyright 2009-2012 Stijn De Weirdt +# Copyright 2010 Dries Verdegem +# Copyright 2010-2012 Kenneth Hoste +# Copyright 2011 Pieter De Baets +# Copyright 2011-2012 Jens Timmerman # # This file is part of EasyBuild, # originally created by the HPC team of the University of Ghent (http://ugent.be/hpc). diff --git a/easybuild/easyblocks/l/__init__.py b/easybuild/easyblocks/l/__init__.py index 975f868432..841038b2fa 100644 --- a/easybuild/easyblocks/l/__init__.py +++ b/easybuild/easyblocks/l/__init__.py @@ -1,5 +1,9 @@ ## -# Copyright 2009-2012 Stijn De Weirdt, Dries Verdegem, Kenneth Hoste, Pieter De Baets, Jens Timmerman +# Copyright 2009-2012 Stijn De Weirdt +# Copyright 2010 Dries Verdegem +# Copyright 2010-2012 Kenneth Hoste +# Copyright 2011 Pieter De Baets +# Copyright 2011-2012 Jens Timmerman # # This file is part of EasyBuild, # originally created by the HPC team of the University of Ghent (http://ugent.be/hpc). diff --git a/easybuild/easyblocks/l/lapack.py b/easybuild/easyblocks/l/lapack.py index b45829b92a..642e3f069b 100644 --- a/easybuild/easyblocks/l/lapack.py +++ b/easybuild/easyblocks/l/lapack.py @@ -1,5 +1,9 @@ ## -# Copyright 2009-2012 Stijn De Weirdt, Dries Verdegem, Kenneth Hoste, Pieter De Baets, Jens Timmerman +# Copyright 2009-2012 Stijn De Weirdt +# Copyright 2010 Dries Verdegem +# Copyright 2010-2012 Kenneth Hoste +# Copyright 2011 Pieter De Baets +# Copyright 2011-2012 Jens Timmerman # # This file is part of EasyBuild, # originally created by the HPC team of the University of Ghent (http://ugent.be/hpc). diff --git a/easybuild/easyblocks/l/libsmm.py b/easybuild/easyblocks/l/libsmm.py index c63d361a9a..b4ab6ef264 100644 --- a/easybuild/easyblocks/l/libsmm.py +++ b/easybuild/easyblocks/l/libsmm.py @@ -1,5 +1,9 @@ ## -# Copyright 2009-2012 Stijn De Weirdt, Dries Verdegem, Kenneth Hoste, Pieter De Baets, Jens Timmerman +# Copyright 2009-2012 Stijn De Weirdt +# Copyright 2010 Dries Verdegem +# Copyright 2010-2012 Kenneth Hoste +# Copyright 2011 Pieter De Baets +# Copyright 2011-2012 Jens Timmerman # # This file is part of EasyBuild, # originally created by the HPC team of the University of Ghent (http://ugent.be/hpc). @@ -106,7 +110,7 @@ def make(self): # tiny dimensions are used as primitves and generated in an 'exhaustive' search. # They should be a sequence from 1 to N, -# where N is a number that is large enough to have good in cache performance +# where N is a number that is large enough to have good in cache performance # (e.g. for modern SSE cpus 8 to 12) # Too large (>12?) is not beneficial, but increases the time needed to build the library # Too small (<8) will lead to a slow library, but the build might proceed quickly @@ -114,7 +118,7 @@ def make(self): # dims_tiny="%(tiny_dims)s" -# host compiler... this is used only to compile a few tools needed to build the library. +# host compiler... this is used only to compile a few tools needed to build the library. # The library itself is not compiled this way. # This compiler needs to be able to deal with some Fortran2003 constructs. # @@ -152,7 +156,7 @@ def make(self): blas_found = True else: self.log.info("BLAS library %s not found" % blas_lib) - + if not blas_found: self.log.error('No known BLAS library found!') @@ -169,7 +173,7 @@ def make(self): } # configure for various iterations - datatypes = [(1, 'double precision real'), + datatypes = [(1, 'double precision real'), (3, 'double precision complex') ] for (dt, descr) in datatypes: @@ -206,4 +210,4 @@ def sanitycheck(self): self.log.info("Customized sanity check paths: %s" % self.getcfg('sanityCheckPaths')) - Application.sanitycheck(self) \ No newline at end of file + Application.sanitycheck(self) diff --git a/easybuild/easyblocks/m/__init__.py b/easybuild/easyblocks/m/__init__.py index 975f868432..841038b2fa 100644 --- a/easybuild/easyblocks/m/__init__.py +++ b/easybuild/easyblocks/m/__init__.py @@ -1,5 +1,9 @@ ## -# Copyright 2009-2012 Stijn De Weirdt, Dries Verdegem, Kenneth Hoste, Pieter De Baets, Jens Timmerman +# Copyright 2009-2012 Stijn De Weirdt +# Copyright 2010 Dries Verdegem +# Copyright 2010-2012 Kenneth Hoste +# Copyright 2011 Pieter De Baets +# Copyright 2011-2012 Jens Timmerman # # This file is part of EasyBuild, # originally created by the HPC team of the University of Ghent (http://ugent.be/hpc). diff --git a/easybuild/easyblocks/m/maple.py b/easybuild/easyblocks/m/maple.py index 04ca5ef020..d216f7945c 100644 --- a/easybuild/easyblocks/m/maple.py +++ b/easybuild/easyblocks/m/maple.py @@ -1,5 +1,9 @@ ## -# Copyright 2009-2012 Stijn Deweirdt, Dries Verdegem, Kenneth Hoste, Pieter De Baets, Jens Timmerman +# Copyright 2009-2012 Stijn De Weirdt +# Copyright 2010 Dries Verdegem +# Copyright 2010-2012 Kenneth Hoste +# Copyright 2011 Pieter De Baets +# Copyright 2011-2012 Jens Timmerman # # This file is part of EasyBuild, # originally created by the HPC team of the University of Ghent (http://ugent.be/hpc). diff --git a/easybuild/easyblocks/m/mrbayes.py b/easybuild/easyblocks/m/mrbayes.py index 8181ad8dd9..d0310cb50b 100644 --- a/easybuild/easyblocks/m/mrbayes.py +++ b/easybuild/easyblocks/m/mrbayes.py @@ -1,6 +1,10 @@ ## -# Copyright 2009-2012 Stijn De Weirdt, Dries Verdegem, Kenneth Hoste, Pieter De -# Baets, Jens Timmerman, Andy Georges +# Copyright 2009-2012 Stijn De Weirdt +# Copyright 2010 Dries Verdegem +# Copyright 2010-2012 Kenneth Hoste +# Copyright 2011 Pieter De Baets +# Copyright 2011-2012 Jens Timmerman +# Copyright 2012 Andy Georges # # This file is part of EasyBuild, # originally created by the HPC team of the University of Ghent (http://ugent.be/hpc). diff --git a/easybuild/easyblocks/m/mvapich2.py b/easybuild/easyblocks/m/mvapich2.py index 6d08799024..4e8395cc93 100644 --- a/easybuild/easyblocks/m/mvapich2.py +++ b/easybuild/easyblocks/m/mvapich2.py @@ -1,5 +1,9 @@ ## -# Copyright 2009-2012 Stijn De Weirdt, Dries Verdegem, Kenneth Hoste, Pieter De Baets, Jens Timmerman +# Copyright 2009-2012 Stijn De Weirdt +# Copyright 2010 Dries Verdegem +# Copyright 2010-2012 Kenneth Hoste +# Copyright 2011 Pieter De Baets +# Copyright 2011-2012 Jens Timmerman # # This file is part of EasyBuild, # originally created by the HPC team of the University of Ghent (http://ugent.be/hpc). diff --git a/easybuild/easyblocks/n/__init__.py b/easybuild/easyblocks/n/__init__.py index 975f868432..841038b2fa 100644 --- a/easybuild/easyblocks/n/__init__.py +++ b/easybuild/easyblocks/n/__init__.py @@ -1,5 +1,9 @@ ## -# Copyright 2009-2012 Stijn De Weirdt, Dries Verdegem, Kenneth Hoste, Pieter De Baets, Jens Timmerman +# Copyright 2009-2012 Stijn De Weirdt +# Copyright 2010 Dries Verdegem +# Copyright 2010-2012 Kenneth Hoste +# Copyright 2011 Pieter De Baets +# Copyright 2011-2012 Jens Timmerman # # This file is part of EasyBuild, # originally created by the HPC team of the University of Ghent (http://ugent.be/hpc). diff --git a/easybuild/easyblocks/n/ncl.py b/easybuild/easyblocks/n/ncl.py index 153d418d58..a90328582a 100644 --- a/easybuild/easyblocks/n/ncl.py +++ b/easybuild/easyblocks/n/ncl.py @@ -1,5 +1,9 @@ ## -# Copyright 2009-2012 Stijn De Weirdt, Dries Verdegem, Kenneth Hoste, Pieter De Baets, Jens Timmerman +# Copyright 2009-2012 Stijn De Weirdt +# Copyright 2010 Dries Verdegem +# Copyright 2010-2012 Kenneth Hoste +# Copyright 2011 Pieter De Baets +# Copyright 2011-2012 Jens Timmerman # # This file is part of EasyBuild, # originally created by the HPC team of the University of Ghent (http://ugent.be/hpc). @@ -31,12 +35,12 @@ class NCL(Application): """Support for building/installing NCL.""" def configure(self): - """Configure build: + """Configure build: - create Makefile.ini using make and run ymake script to create config file - patch config file with correct settings, and add missing config entries - create config/Site.local file to avoid interactive install - generate Makefile using config/ymkmf sciprt - - + - """ try: @@ -103,7 +107,7 @@ def configure(self): except OSError, err: self.log.error("Failed to change to the build dir %s: %s" % (self.getcfg('startfrom'), err)) - # instead of running the Configure script that asks a zillion questions, + # instead of running the Configure script that asks a zillion questions, # let's just generate the config/Site.local file ourselves... # order of deps is important diff --git a/easybuild/easyblocks/n/netcdf.py b/easybuild/easyblocks/n/netcdf.py index 63b30cfede..055ab06799 100644 --- a/easybuild/easyblocks/n/netcdf.py +++ b/easybuild/easyblocks/n/netcdf.py @@ -1,5 +1,9 @@ ## -# Copyright 2009-2012 Stijn De Weirdt, Dries Verdegem, Kenneth Hoste, Pieter De Baets, Jens Timmerman +# Copyright 2009-2012 Stijn De Weirdt +# Copyright 2010 Dries Verdegem +# Copyright 2010-2012 Kenneth Hoste +# Copyright 2011 Pieter De Baets +# Copyright 2011-2012 Jens Timmerman # # This file is part of EasyBuild, # originally created by the HPC team of the University of Ghent (http://ugent.be/hpc). diff --git a/easybuild/easyblocks/n/netcdf_fortran.py b/easybuild/easyblocks/n/netcdf_fortran.py index a1e9c8a4f3..af3283f251 100644 --- a/easybuild/easyblocks/n/netcdf_fortran.py +++ b/easybuild/easyblocks/n/netcdf_fortran.py @@ -1,5 +1,9 @@ ## -# Copyright 2009-2012 Stijn De Weirdt, Dries Verdegem, Kenneth Hoste, Pieter De Baets, Jens Timmerman +# Copyright 2009-2012 Stijn De Weirdt +# Copyright 2010 Dries Verdegem +# Copyright 2010-2012 Kenneth Hoste +# Copyright 2011 Pieter De Baets +# Copyright 2011-2012 Jens Timmerman # # This file is part of EasyBuild, # originally created by the HPC team of the University of Ghent (http://ugent.be/hpc). diff --git a/easybuild/easyblocks/o/__init__.py b/easybuild/easyblocks/o/__init__.py index 975f868432..841038b2fa 100644 --- a/easybuild/easyblocks/o/__init__.py +++ b/easybuild/easyblocks/o/__init__.py @@ -1,5 +1,9 @@ ## -# Copyright 2009-2012 Stijn De Weirdt, Dries Verdegem, Kenneth Hoste, Pieter De Baets, Jens Timmerman +# Copyright 2009-2012 Stijn De Weirdt +# Copyright 2010 Dries Verdegem +# Copyright 2010-2012 Kenneth Hoste +# Copyright 2011 Pieter De Baets +# Copyright 2011-2012 Jens Timmerman # # This file is part of EasyBuild, # originally created by the HPC team of the University of Ghent (http://ugent.be/hpc). diff --git a/easybuild/easyblocks/o/openfoam.py b/easybuild/easyblocks/o/openfoam.py index 2bf7e2fa62..d7589af4aa 100644 --- a/easybuild/easyblocks/o/openfoam.py +++ b/easybuild/easyblocks/o/openfoam.py @@ -1,5 +1,9 @@ ## -# Copyright 2009-2012 Stijn De Weirdt, Dries Verdegem, Kenneth Hoste, Pieter De Baets, Jens Timmerman +# Copyright 2009-2012 Stijn De Weirdt +# Copyright 2010 Dries Verdegem +# Copyright 2010-2012 Kenneth Hoste +# Copyright 2011 Pieter De Baets +# Copyright 2011-2012 Jens Timmerman # # This file is part of EasyBuild, # originally created by the HPC team of the University of Ghent (http://ugent.be/hpc). diff --git a/easybuild/easyblocks/p/__init__.py b/easybuild/easyblocks/p/__init__.py index 38d3a4e40a..5259a3a6e1 100644 --- a/easybuild/easyblocks/p/__init__.py +++ b/easybuild/easyblocks/p/__init__.py @@ -1,5 +1,9 @@ ## -# Copyright 2009-2012 Stijn De Weirdt, Dries Verdegem, Kenneth Hoste, Pieter De Baets, Jens Timmerman +# Copyright 2009-2012 Stijn De Weirdt +# Copyright 2010 Dries Verdegem +# Copyright 2010-2012 Kenneth Hoste +# Copyright 2011 Pieter De Baets +# Copyright 2011-2012 Jens Timmerman # # This file is part of EasyBuild, # originally created by the HPC team of the University of Ghent (http://ugent.be/hpc). diff --git a/easybuild/easyblocks/p/python.py b/easybuild/easyblocks/p/python.py index 9eda703000..0dc3d685f0 100644 --- a/easybuild/easyblocks/p/python.py +++ b/easybuild/easyblocks/p/python.py @@ -1,5 +1,9 @@ ## -# Copyright 2009-2012 Stijn De Weirdt, Dries Verdegem, Kenneth Hoste, Pieter De Baets, Jens Timmerman +# Copyright 2009-2012 Stijn De Weirdt +# Copyright 2010 Dries Verdegem +# Copyright 2010-2012 Kenneth Hoste +# Copyright 2011 Pieter De Baets +# Copyright 2011-2012 Jens Timmerman # # This file is part of EasyBuild, # originally created by the HPC team of the University of Ghent (http://ugent.be/hpc). @@ -31,7 +35,7 @@ class Python(Application): To extend Python by adding extra packages there are two ways: - list the packages in the pkglist, this will include the packages in this Python easyblock - create a seperate easyblock, so the packages can be loaded with module load - + e.g., you can include numpy and scipy in a default Python installation but also provide newer updated numpy and scipy versions by creating a PythonPackageModule for it. """ @@ -253,7 +257,7 @@ def __init__(self, mself, pkg, pkginstalldeps): self.log.error("Could not detect math kernel (mkl, atlas)") if "SOFTROOTIMKL" in os.environ or "SOFTROOTFFTW" in os.environ: - extrasiteconfig += """ + extrasiteconfig += """ [fftw] libraries = %s """ % os.getenv("LIBFFT") diff --git a/easybuild/easyblocks/q/__init__.py b/easybuild/easyblocks/q/__init__.py index 975f868432..841038b2fa 100644 --- a/easybuild/easyblocks/q/__init__.py +++ b/easybuild/easyblocks/q/__init__.py @@ -1,5 +1,9 @@ ## -# Copyright 2009-2012 Stijn De Weirdt, Dries Verdegem, Kenneth Hoste, Pieter De Baets, Jens Timmerman +# Copyright 2009-2012 Stijn De Weirdt +# Copyright 2010 Dries Verdegem +# Copyright 2010-2012 Kenneth Hoste +# Copyright 2011 Pieter De Baets +# Copyright 2011-2012 Jens Timmerman # # This file is part of EasyBuild, # originally created by the HPC team of the University of Ghent (http://ugent.be/hpc). diff --git a/easybuild/easyblocks/r/__init__.py b/easybuild/easyblocks/r/__init__.py index 975f868432..841038b2fa 100644 --- a/easybuild/easyblocks/r/__init__.py +++ b/easybuild/easyblocks/r/__init__.py @@ -1,5 +1,9 @@ ## -# Copyright 2009-2012 Stijn De Weirdt, Dries Verdegem, Kenneth Hoste, Pieter De Baets, Jens Timmerman +# Copyright 2009-2012 Stijn De Weirdt +# Copyright 2010 Dries Verdegem +# Copyright 2010-2012 Kenneth Hoste +# Copyright 2011 Pieter De Baets +# Copyright 2011-2012 Jens Timmerman # # This file is part of EasyBuild, # originally created by the HPC team of the University of Ghent (http://ugent.be/hpc). diff --git a/easybuild/easyblocks/s/__init__.py b/easybuild/easyblocks/s/__init__.py index 975f868432..841038b2fa 100644 --- a/easybuild/easyblocks/s/__init__.py +++ b/easybuild/easyblocks/s/__init__.py @@ -1,5 +1,9 @@ ## -# Copyright 2009-2012 Stijn De Weirdt, Dries Verdegem, Kenneth Hoste, Pieter De Baets, Jens Timmerman +# Copyright 2009-2012 Stijn De Weirdt +# Copyright 2010 Dries Verdegem +# Copyright 2010-2012 Kenneth Hoste +# Copyright 2011 Pieter De Baets +# Copyright 2011-2012 Jens Timmerman # # This file is part of EasyBuild, # originally created by the HPC team of the University of Ghent (http://ugent.be/hpc). diff --git a/easybuild/easyblocks/s/scalapack.py b/easybuild/easyblocks/s/scalapack.py index 248db50eba..8b246c37a6 100644 --- a/easybuild/easyblocks/s/scalapack.py +++ b/easybuild/easyblocks/s/scalapack.py @@ -1,5 +1,9 @@ ## -# Copyright 2009-2012 Stijn De Weirdt, Dries Verdegem, Kenneth Hoste, Pieter De Baets, Jens Timmerman +# Copyright 2009-2012 Stijn De Weirdt +# Copyright 2010 Dries Verdegem +# Copyright 2010-2012 Kenneth Hoste +# Copyright 2011 Pieter De Baets +# Copyright 2011-2012 Jens Timmerman # # This file is part of EasyBuild, # originally created by the HPC team of the University of Ghent (http://ugent.be/hpc). @@ -88,8 +92,8 @@ def make(self): extra_makeopts += 'home=%s BLACSdir=%s ' % (self.getcfg('startfrom'), blacsroot) # set BLACS libs correctly - for (var, lib) in [('BLACSFINIT', "F77init"), - ('BLACSCINIT', "Cinit"), + for (var, lib) in [('BLACSFINIT', "F77init"), + ('BLACSCINIT', "Cinit"), ('BLACSLIB', "")]: extra_makeopts += '%s=%s/lib/libblacs%s.a ' % (var, blacsroot, lib) diff --git a/easybuild/easyblocks/t/__init__.py b/easybuild/easyblocks/t/__init__.py index 975f868432..841038b2fa 100644 --- a/easybuild/easyblocks/t/__init__.py +++ b/easybuild/easyblocks/t/__init__.py @@ -1,5 +1,9 @@ ## -# Copyright 2009-2012 Stijn De Weirdt, Dries Verdegem, Kenneth Hoste, Pieter De Baets, Jens Timmerman +# Copyright 2009-2012 Stijn De Weirdt +# Copyright 2010 Dries Verdegem +# Copyright 2010-2012 Kenneth Hoste +# Copyright 2011 Pieter De Baets +# Copyright 2011-2012 Jens Timmerman # # This file is part of EasyBuild, # originally created by the HPC team of the University of Ghent (http://ugent.be/hpc). diff --git a/easybuild/easyblocks/t/tarball.py b/easybuild/easyblocks/t/tarball.py index 6388ab0011..c54a90ec2d 100644 --- a/easybuild/easyblocks/t/tarball.py +++ b/easybuild/easyblocks/t/tarball.py @@ -1,5 +1,9 @@ ## -# Copyright 2009-2012 Stijn De Weirdt, Dries Verdegem, Kenneth Hoste, Pieter De Baets, Jens Timmerman +# Copyright 2009-2012 Stijn De Weirdt +# Copyright 2010 Dries Verdegem +# Copyright 2010-2012 Kenneth Hoste +# Copyright 2011 Pieter De Baets +# Copyright 2011-2012 Jens Timmerman # # This file is part of EasyBuild, # originally created by the HPC team of the University of Ghent (http://ugent.be/hpc). @@ -23,7 +27,7 @@ class Tarball(Application): """ - Precompiled software packaged as tarball: + Precompiled software packaged as tarball: - will unpack binary and copy it to the install dir """ @@ -50,4 +54,4 @@ def make_install(self): # self.getcfg('keepsymlinks') is False by default except when explicitly put to True in .eb file shutil.copytree(src,self.installdir, symlinks=self.getcfg('keepsymlinks')) except: - self.log.exception("Copying %s to installation dir %s failed"%(src,self.installdir)) \ No newline at end of file + self.log.exception("Copying %s to installation dir %s failed"%(src,self.installdir)) diff --git a/easybuild/easyblocks/t/tbb.py b/easybuild/easyblocks/t/tbb.py index 8458d3fdb9..6bc90b6867 100644 --- a/easybuild/easyblocks/t/tbb.py +++ b/easybuild/easyblocks/t/tbb.py @@ -1,5 +1,9 @@ ## -# Copyright 2009-2012 Stijn De Weirdt, Dries Verdegem, Kenneth Hoste, Pieter De Baets, Jens Timmerman +# Copyright 2009-2012 Stijn De Weirdt +# Copyright 2010 Dries Verdegem +# Copyright 2010-2012 Kenneth Hoste +# Copyright 2011 Pieter De Baets +# Copyright 2011-2012 Jens Timmerman # # This file is part of EasyBuild, # originally created by the HPC team of the University of Ghent (http://ugent.be/hpc). diff --git a/easybuild/easyblocks/t/toolkit.py b/easybuild/easyblocks/t/toolkit.py index da69f49aa8..a064a8c242 100644 --- a/easybuild/easyblocks/t/toolkit.py +++ b/easybuild/easyblocks/t/toolkit.py @@ -1,5 +1,9 @@ ## -# Copyright 2009-2012 Stijn De Weirdt, Dries Verdegem, Kenneth Hoste, Pieter De Baets, Jens Timmerman +# Copyright 2009-2012 Stijn De Weirdt +# Copyright 2010 Dries Verdegem +# Copyright 2010-2012 Kenneth Hoste +# Copyright 2011 Pieter De Baets +# Copyright 2011-2012 Jens Timmerman # # This file is part of EasyBuild, # originally created by the HPC team of the University of Ghent (http://ugent.be/hpc). @@ -39,4 +43,4 @@ def sanityCheck(self): """ As a toolkit doens't install anything really, this is always true """ - self.sanityCheckOK = True \ No newline at end of file + self.sanityCheckOK = True diff --git a/easybuild/easyblocks/u/__init__.py b/easybuild/easyblocks/u/__init__.py index 975f868432..841038b2fa 100644 --- a/easybuild/easyblocks/u/__init__.py +++ b/easybuild/easyblocks/u/__init__.py @@ -1,5 +1,9 @@ ## -# Copyright 2009-2012 Stijn De Weirdt, Dries Verdegem, Kenneth Hoste, Pieter De Baets, Jens Timmerman +# Copyright 2009-2012 Stijn De Weirdt +# Copyright 2010 Dries Verdegem +# Copyright 2010-2012 Kenneth Hoste +# Copyright 2011 Pieter De Baets +# Copyright 2011-2012 Jens Timmerman # # This file is part of EasyBuild, # originally created by the HPC team of the University of Ghent (http://ugent.be/hpc). diff --git a/easybuild/easyblocks/v/__init__.py b/easybuild/easyblocks/v/__init__.py index 975f868432..841038b2fa 100644 --- a/easybuild/easyblocks/v/__init__.py +++ b/easybuild/easyblocks/v/__init__.py @@ -1,5 +1,9 @@ ## -# Copyright 2009-2012 Stijn De Weirdt, Dries Verdegem, Kenneth Hoste, Pieter De Baets, Jens Timmerman +# Copyright 2009-2012 Stijn De Weirdt +# Copyright 2010 Dries Verdegem +# Copyright 2010-2012 Kenneth Hoste +# Copyright 2011 Pieter De Baets +# Copyright 2011-2012 Jens Timmerman # # This file is part of EasyBuild, # originally created by the HPC team of the University of Ghent (http://ugent.be/hpc). diff --git a/easybuild/easyblocks/w/__init__.py b/easybuild/easyblocks/w/__init__.py index 975f868432..841038b2fa 100644 --- a/easybuild/easyblocks/w/__init__.py +++ b/easybuild/easyblocks/w/__init__.py @@ -1,5 +1,9 @@ ## -# Copyright 2009-2012 Stijn De Weirdt, Dries Verdegem, Kenneth Hoste, Pieter De Baets, Jens Timmerman +# Copyright 2009-2012 Stijn De Weirdt +# Copyright 2010 Dries Verdegem +# Copyright 2010-2012 Kenneth Hoste +# Copyright 2011 Pieter De Baets +# Copyright 2011-2012 Jens Timmerman # # This file is part of EasyBuild, # originally created by the HPC team of the University of Ghent (http://ugent.be/hpc). diff --git a/easybuild/easyblocks/w/wps.py b/easybuild/easyblocks/w/wps.py index 8eba699d34..63d9cdbc69 100644 --- a/easybuild/easyblocks/w/wps.py +++ b/easybuild/easyblocks/w/wps.py @@ -1,5 +1,9 @@ ## -# Copyright 2009-2012 Stijn De Weirdt, Dries Verdegem, Kenneth Hoste, Pieter De Baets, Jens Timmerman +# Copyright 2009-2012 Stijn De Weirdt +# Copyright 2010 Dries Verdegem +# Copyright 2010-2012 Kenneth Hoste +# Copyright 2011 Pieter De Baets +# Copyright 2011-2012 Jens Timmerman # # This file is part of EasyBuild, # originally created by the HPC team of the University of Ghent (http://ugent.be/hpc). diff --git a/easybuild/easyblocks/w/wrf.py b/easybuild/easyblocks/w/wrf.py index 6eaa5f6da3..861ef072da 100644 --- a/easybuild/easyblocks/w/wrf.py +++ b/easybuild/easyblocks/w/wrf.py @@ -1,5 +1,9 @@ ## -# Copyright 2009-2012 Stijn De Weirdt, Dries Verdegem, Kenneth Hoste, Pieter De Baets, Jens Timmerman +# Copyright 2009-2012 Stijn De Weirdt +# Copyright 2010 Dries Verdegem +# Copyright 2010-2012 Kenneth Hoste +# Copyright 2011 Pieter De Baets +# Copyright 2011-2012 Jens Timmerman # # This file is part of EasyBuild, # originally created by the HPC team of the University of Ghent (http://ugent.be/hpc). diff --git a/easybuild/easyblocks/x/__init__.py b/easybuild/easyblocks/x/__init__.py index 975f868432..841038b2fa 100644 --- a/easybuild/easyblocks/x/__init__.py +++ b/easybuild/easyblocks/x/__init__.py @@ -1,5 +1,9 @@ ## -# Copyright 2009-2012 Stijn De Weirdt, Dries Verdegem, Kenneth Hoste, Pieter De Baets, Jens Timmerman +# Copyright 2009-2012 Stijn De Weirdt +# Copyright 2010 Dries Verdegem +# Copyright 2010-2012 Kenneth Hoste +# Copyright 2011 Pieter De Baets +# Copyright 2011-2012 Jens Timmerman # # This file is part of EasyBuild, # originally created by the HPC team of the University of Ghent (http://ugent.be/hpc). diff --git a/easybuild/easyblocks/y/__init__.py b/easybuild/easyblocks/y/__init__.py index 975f868432..841038b2fa 100644 --- a/easybuild/easyblocks/y/__init__.py +++ b/easybuild/easyblocks/y/__init__.py @@ -1,5 +1,9 @@ ## -# Copyright 2009-2012 Stijn De Weirdt, Dries Verdegem, Kenneth Hoste, Pieter De Baets, Jens Timmerman +# Copyright 2009-2012 Stijn De Weirdt +# Copyright 2010 Dries Verdegem +# Copyright 2010-2012 Kenneth Hoste +# Copyright 2011 Pieter De Baets +# Copyright 2011-2012 Jens Timmerman # # This file is part of EasyBuild, # originally created by the HPC team of the University of Ghent (http://ugent.be/hpc). diff --git a/easybuild/easyblocks/z/__init__.py b/easybuild/easyblocks/z/__init__.py index 975f868432..841038b2fa 100644 --- a/easybuild/easyblocks/z/__init__.py +++ b/easybuild/easyblocks/z/__init__.py @@ -1,5 +1,9 @@ ## -# Copyright 2009-2012 Stijn De Weirdt, Dries Verdegem, Kenneth Hoste, Pieter De Baets, Jens Timmerman +# Copyright 2009-2012 Stijn De Weirdt +# Copyright 2010 Dries Verdegem +# Copyright 2010-2012 Kenneth Hoste +# Copyright 2011 Pieter De Baets +# Copyright 2011-2012 Jens Timmerman # # This file is part of EasyBuild, # originally created by the HPC team of the University of Ghent (http://ugent.be/hpc). diff --git a/easybuild/easybuild_config.py b/easybuild/easybuild_config.py index 53c56eabcd..5376eab9c6 100644 --- a/easybuild/easybuild_config.py +++ b/easybuild/easybuild_config.py @@ -1,5 +1,10 @@ ## -# Copyright 2009-2012 Stijn De Weirdt, Dries Verdegem, Kenneth Hoste, Pieter De Baets, Jens Timmerman, Toon Willems +# Copyright 2009-2012 Stijn De Weirdt +# Copyright 2010 Dries Verdegem +# Copyright 2010-2012 Kenneth Hoste +# Copyright 2011 Pieter De Baets +# Copyright 2011-2012 Jens Timmerman +# Copyright 2012 Toon Willems # # This file is part of EasyBuild, # originally created by the HPC team of the University of Ghent (http://ugent.be/hpc). diff --git a/easybuild/framework/__init__.py b/easybuild/framework/__init__.py index 0cc5ba4c4b..e8bc1036c0 100644 --- a/easybuild/framework/__init__.py +++ b/easybuild/framework/__init__.py @@ -1,5 +1,9 @@ ## -# Copyright 2009-2012 Stijn De Weirdt, Dries Verdegem, Kenneth Hoste, Pieter De Baets, Jens Timmerman +# Copyright 2009-2012 Stijn De Weirdt +# Copyright 2010 Dries Verdegem +# Copyright 2010-2012 Kenneth Hoste +# Copyright 2011 Pieter De Baets +# Copyright 2011-2012 Jens Timmerman # # This file is part of EasyBuild, # originally created by the HPC team of the University of Ghent (http://ugent.be/hpc). diff --git a/easybuild/framework/application.py b/easybuild/framework/application.py index 6cef8ca0ce..fba4c2c0b0 100644 --- a/easybuild/framework/application.py +++ b/easybuild/framework/application.py @@ -1,5 +1,9 @@ ## -# Copyright 2009-2012 Stijn De Weirdt, Dries Verdegem, Kenneth Hoste, Pieter De Baets, Jens Timmerman +# Copyright 2009-2012 Stijn De Weirdt +# Copyright 2010 Dries Verdegem +# Copyright 2010-2012 Kenneth Hoste +# Copyright 2011 Pieter De Baets +# Copyright 2011-2012 Jens Timmerman # Copyright 2012 Toon Willems # # This file is part of EasyBuild, diff --git a/easybuild/scripts/port_easyblock.py b/easybuild/scripts/port_easyblock.py index 64957d0684..2e97bd1306 100755 --- a/easybuild/scripts/port_easyblock.py +++ b/easybuild/scripts/port_easyblock.py @@ -1,6 +1,10 @@ #!/usr/bin/env python ## -# Copyright 2009-2012 Stijn De Weirdt, Dries Verdegem, Kenneth Hoste, Pieter De Baets, Jens Timmerman +# Copyright 2009-2012 Stijn De Weirdt +# Copyright 2010 Dries Verdegem +# Copyright 2010-2012 Kenneth Hoste +# Copyright 2011 Pieter De Baets +# Copyright 2011-2012 Jens Timmerman # # This file is part of EasyBuild, # originally created by the HPC team of the University of Ghent (http://ugent.be/hpc). @@ -29,7 +33,7 @@ e.g. getCfg, setCfg, makeInstall, sanityCheck, runrun and runqanda (+ arguments) * Exception is no longer used and all except blocks catch specific errors only * the code is free of errors and warnings, according to PyLint -* +* usage: check_code_cleanup.py """ @@ -241,10 +245,10 @@ def run_pylint(fn): else: print "No warnings or errors reported by PyLint we care about, nice job!\n" - return True + return True # MAIN -# +# # fetch easyblock to check from command line if len(sys.argv) == 2: diff --git a/easybuild/scripts/prep_for_release.py b/easybuild/scripts/prep_for_release.py index 771dd5b8aa..416e63f0fa 100755 --- a/easybuild/scripts/prep_for_release.py +++ b/easybuild/scripts/prep_for_release.py @@ -1,6 +1,11 @@ #!/usr/bin/env python ## -# Copyright 2009-2012 Stijn De Weirdt, Dries Verdegem, Kenneth Hoste, Pieter De Baets, Jens Timmerman +# Copyright 2009-2012 Stijn De Weirdt +# Copyright 2010 Dries Verdegem +# Copyright 2010-2012 Kenneth Hoste +# Copyright 2011 Pieter De Baets +# Copyright 2011-2012 Jens Timmerman +# Copyright 2012 Toon Willems # # This file is part of EasyBuild, # originally created by the HPC team of the University of Ghent (http://ugent.be/hpc). @@ -190,9 +195,9 @@ def check_clean_master_branch(home): return ok -# +# # MAIN -# +# # determine EasyBuild home dir, assuming this script is in /easybuild/scripts easybuild_home = os.path.sep.join(os.path.abspath(sys.argv[0]).split(os.path.sep)[:-3]) diff --git a/easybuild/scripts/repo_setup.py b/easybuild/scripts/repo_setup.py index be97a5c803..71c0512926 100755 --- a/easybuild/scripts/repo_setup.py +++ b/easybuild/scripts/repo_setup.py @@ -1,6 +1,10 @@ #!/usr/bin/env python ## -# Copyright 2009-2012 Stijn De Weirdt, Dries Verdegem, Kenneth Hoste, Pieter De Baets, Jens Timmerman +# Copyright 2009-2012 Stijn De Weirdt +# Copyright 2010 Dries Verdegem +# Copyright 2010-2012 Kenneth Hoste +# Copyright 2011 Pieter De Baets +# Copyright 2011-2012 Jens Timmerman # # This file is part of EasyBuild, # originally created by the HPC team of the University of Ghent (http://ugent.be/hpc). @@ -57,7 +61,7 @@ def create_subdirs(prefix, withinit=False, init_txt=''): dirname = "easybuild" os.mkdir(dirname) os.chdir(dirname) - + # create easyblocks dir and subdirs, with default init dirname = "easyblocks" os.mkdir(dirname) diff --git a/easybuild/tools/__init__.py b/easybuild/tools/__init__.py index 655f18dd60..cf63c02b29 100644 --- a/easybuild/tools/__init__.py +++ b/easybuild/tools/__init__.py @@ -1,5 +1,9 @@ ## -# Copyright 2009-2012 Stijn De Weirdt, Dries Verdegem, Kenneth Hoste, Pieter De Baets, Jens Timmerman +# Copyright 2009-2012 Stijn De Weirdt +# Copyright 2010 Dries Verdegem +# Copyright 2010-2012 Kenneth Hoste +# Copyright 2011 Pieter De Baets +# Copyright 2011-2012 Jens Timmerman # # This file is part of EasyBuild, # originally created by the HPC team of the University of Ghent (http://ugent.be/hpc). diff --git a/easybuild/tools/build_log.py b/easybuild/tools/build_log.py index 41c100ec62..2e62866f4f 100644 --- a/easybuild/tools/build_log.py +++ b/easybuild/tools/build_log.py @@ -1,5 +1,9 @@ ## -# Copyright 2009-2012 Stijn De Weirdt, Dries Verdegem, Kenneth Hoste, Pieter De Baets, Jens Timmerman +# Copyright 2009-2012 Stijn De Weirdt +# Copyright 2010 Dries Verdegem +# Copyright 2010-2012 Kenneth Hoste +# Copyright 2011 Pieter De Baets +# Copyright 2011-2012 Jens Timmerman # # This file is part of EasyBuild, # originally created by the HPC team of the University of Ghent (http://ugent.be/hpc). diff --git a/easybuild/tools/class_dumper.py b/easybuild/tools/class_dumper.py index b464414370..ed0148585e 100644 --- a/easybuild/tools/class_dumper.py +++ b/easybuild/tools/class_dumper.py @@ -1,5 +1,10 @@ ## -# Copyright 2009-2012 Stijn De Weirdt, Dries Verdegem, Kenneth Hoste, Pieter De Baets, Jens Timmerman +# Copyright 2009-2012 Stijn De Weirdt +# Copyright 2010 Dries Verdegem +# Copyright 2010-2012 Kenneth Hoste +# Copyright 2011 Pieter De Baets +# Copyright 2011-2012 Jens Timmerman +# Copyright 2012 Toon Willems # # This file is part of EasyBuild, # originally created by the HPC team of the University of Ghent (http://ugent.be/hpc). diff --git a/easybuild/tools/config.py b/easybuild/tools/config.py index 16fe470a17..7aaef73038 100644 --- a/easybuild/tools/config.py +++ b/easybuild/tools/config.py @@ -1,5 +1,9 @@ ## -# Copyright 2009-2012 Stijn De Weirdt, Dries Verdegem, Kenneth Hoste, Pieter De Baets, Jens Timmerman +# Copyright 2009-2012 Stijn De Weirdt +# Copyright 2010 Dries Verdegem +# Copyright 2010-2012 Kenneth Hoste +# Copyright 2011 Pieter De Baets +# Copyright 2011-2012 Jens Timmerman # Copyright 2012 Toon Willems # # This file is part of EasyBuild, diff --git a/easybuild/tools/filetools.py b/easybuild/tools/filetools.py index cb3077aa14..56a517825c 100644 --- a/easybuild/tools/filetools.py +++ b/easybuild/tools/filetools.py @@ -1,5 +1,9 @@ ## -# Copyright 2009-2012 Stijn De Weirdt, Dries Verdegem, Kenneth Hoste, Pieter De Baets, Jens Timmerman +# Copyright 2009-2012 Stijn De Weirdt +# Copyright 2010 Dries Verdegem +# Copyright 2010-2012 Kenneth Hoste +# Copyright 2011 Pieter De Baets +# Copyright 2011-2012 Jens Timmerman # Copyright 2012 Toon Willems # # This file is part of EasyBuild, diff --git a/easybuild/tools/module_generator.py b/easybuild/tools/module_generator.py index 8c6ccfa343..07e598c429 100644 --- a/easybuild/tools/module_generator.py +++ b/easybuild/tools/module_generator.py @@ -1,5 +1,9 @@ ## -# Copyright 2009-2012 Stijn De Weirdt, Dries Verdegem, Kenneth Hoste, Pieter De Baets, Jens Timmerman +# Copyright 2009-2012 Stijn De Weirdt +# Copyright 2010 Dries Verdegem +# Copyright 2010-2012 Kenneth Hoste +# Copyright 2011 Pieter De Baets +# Copyright 2011-2012 Jens Timmerman # # This file is part of EasyBuild, # originally created by the HPC team of the University of Ghent (http://ugent.be/hpc). diff --git a/easybuild/tools/modules.py b/easybuild/tools/modules.py index 0eea9acd5f..d75f181b6e 100644 --- a/easybuild/tools/modules.py +++ b/easybuild/tools/modules.py @@ -1,5 +1,9 @@ ## -# Copyright 2009-2012 Stijn De Weirdt, Dries Verdegem, Kenneth Hoste, Pieter De Baets, Jens Timmerman +# Copyright 2009-2012 Stijn De Weirdt +# Copyright 2010 Dries Verdegem +# Copyright 2010-2012 Kenneth Hoste +# Copyright 2011 Pieter De Baets +# Copyright 2011-2012 Jens Timmerman # # This file is part of EasyBuild, # originally created by the HPC team of the University of Ghent (http://ugent.be/hpc). diff --git a/easybuild/tools/repository.py b/easybuild/tools/repository.py index 1ac0b13cab..87d264928e 100644 --- a/easybuild/tools/repository.py +++ b/easybuild/tools/repository.py @@ -1,5 +1,9 @@ ## -# Copyright 2009-2012 Stijn De Weirdt, Dries Verdegem, Kenneth Hoste, Pieter De Baets, Jens Timmerman +# Copyright 2009-2012 Stijn De Weirdt +# Copyright 2010 Dries Verdegem +# Copyright 2010-2012 Kenneth Hoste +# Copyright 2011 Pieter De Baets +# Copyright 2011-2012 Jens Timmerman # Copyright 2012 Toon Willems # # This file is part of EasyBuild, diff --git a/easybuild/tools/systemtools.py b/easybuild/tools/systemtools.py index b20f669e0b..c0b6724c3a 100644 --- a/easybuild/tools/systemtools.py +++ b/easybuild/tools/systemtools.py @@ -1,5 +1,5 @@ ## -# Copyright 2009-2012 Jens Timmerman +# Copyright 2011-2012 Jens Timmerman # # This file is part of EasyBuild, # originally created by the HPC team of the University of Ghent (http://ugent.be/hpc). @@ -136,7 +136,7 @@ def get_kernel_name(): def get_shared_lib_ext(): """Determine extention for shared libraries - Linux: 'so', Darwin: 'dylib' + Linux: 'so', Darwin: 'dylib' """ shared_lib_exts = { 'Linux':'so', diff --git a/easybuild/tools/toolkit.py b/easybuild/tools/toolkit.py index afff955b9f..cc6e28ee04 100644 --- a/easybuild/tools/toolkit.py +++ b/easybuild/tools/toolkit.py @@ -1,5 +1,10 @@ ## -# Copyright 2009-2012 Stijn De Weirdt, Dries Verdegem, Kenneth Hoste, Pieter De Baets, Jens Timmerman +# Copyright 2009-2012 Stijn De Weirdt +# Copyright 2010 Dries Verdegem +# Copyright 2010-2012 Kenneth Hoste +# Copyright 2011 Pieter De Baets +# Copyright 2011-2012 Jens Timmerman +# Copyright 2012 Toon Willems # # This file is part of EasyBuild, # originally created by the HPC team of the University of Ghent (http://ugent.be/hpc). diff --git a/eb b/eb index 2f69593220..afdc6d6de3 100755 --- a/eb +++ b/eb @@ -1,6 +1,10 @@ #!/bin/bash ## -# Copyright 2009-2012 Stijn De Weirdt, Dries Verdegem, Kenneth Hoste, Pieter De Baets, Jens Timmerman +# Copyright 2009-2012 Stijn De Weirdt +# Copyright 2010 Dries Verdegem +# Copyright 2010-2012 Kenneth Hoste +# Copyright 2011 Pieter De Baets +# Copyright 2011-2012 Jens Timmerman # # This file is part of EasyBuild, # originally created by the HPC team of the University of Ghent (http://ugent.be/hpc). From e414302fc149c3d909ed79d4ff53ef18e92b1e63 Mon Sep 17 00:00:00 2001 From: Toon Willems Date: Fri, 3 Aug 2012 15:18:40 +0200 Subject: [PATCH 331/798] follow best practices --- easybuild/test/build.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/easybuild/test/build.py b/easybuild/test/build.py index f11bd93390..497b62698f 100644 --- a/easybuild/test/build.py +++ b/easybuild/test/build.py @@ -248,7 +248,8 @@ def runTest(self): # gather build stats build_time = round(time.time() - start_time, 2) - buildstats = {'build_time': build_time, + buildstats = { + 'build_time': build_time, 'platform': platform.platform(), 'core_count': systemtools.get_core_count(), 'cpu_model': systemtools.get_cpu_model(), From aaedcf85ca466768898ccc4b195c9265bd7dbc9f Mon Sep 17 00:00:00 2001 From: Toon Willems Date: Fri, 3 Aug 2012 16:37:49 +0200 Subject: [PATCH 332/798] use optparse, and also set /Users/nudded/.local/easybuild/modules/all --- easybuild/test/build.py | 29 +++++++++++++++++------------ 1 file changed, 17 insertions(+), 12 deletions(-) diff --git a/easybuild/test/build.py b/easybuild/test/build.py index 497b62698f..74d269a1b0 100644 --- a/easybuild/test/build.py +++ b/easybuild/test/build.py @@ -27,6 +27,7 @@ import unittest import xml.dom.minidom as xml from datetime import datetime +from optparse import OptionParser from unittest import TestCase from easybuild.tools.build_log import getLog, EasyBuildError, initLogger @@ -84,18 +85,19 @@ def setUp(self): self.parallel = False self.jobs = [] - # rudimentary option parsing - try: - sys.argv.remove("--job") - self.log.debug("--job has been specified, parallel build test initiated!") - self.parallel = True - except ValueError: - # just continue as we were - pass + parser = OptionParser() + parser.add_option("--job", action="store_true", dest="parallel", + help="submit jobs to build in parallel") + parser.add_option("--output-file", action="store", dest="output_file", + help="submit jobs to build in parallel") + + (opts, args) = parser.parse_args() + self.parallel = opts.parallel + self.output_file = output_file files = [] - if len(sys.argv) > 1: - for path in sys.argv[1:]: + if args: + for path in args: files += findEasyconfigs(path, log) else: # Default path @@ -150,8 +152,11 @@ def submit_jobs(self, files): if name.startswith("EASYBUILD"): easybuild_vars[name] = os.environ[name] - if "PYTHONPATH" in os.environ: - easybuild_vars["PYTHONPATH"] = os.environ["PYTHONPATH"] + others = ["PYTHONPATH", "MODULEPATH"] + + for env_var in others: + if env_var in os.environ: + easybuild_vars[env_var] = os.environ[env_var] for easyconfig in files: easybuild_vars['EASYBUILDTESTOUTPUT'] = "%s.xml" % easyconfig From d1bf87759ac0cb38c0cdeae04c34b4a83c992249 Mon Sep 17 00:00:00 2001 From: Toon Willems Date: Fri, 3 Aug 2012 16:58:01 +0200 Subject: [PATCH 333/798] add option to specify outputfile via commandline --- easybuild/test/build.py | 23 ++++++++++++----------- 1 file changed, 12 insertions(+), 11 deletions(-) diff --git a/easybuild/test/build.py b/easybuild/test/build.py index 74d269a1b0..acc087dfcf 100644 --- a/easybuild/test/build.py +++ b/easybuild/test/build.py @@ -88,12 +88,19 @@ def setUp(self): parser = OptionParser() parser.add_option("--job", action="store_true", dest="parallel", help="submit jobs to build in parallel") - parser.add_option("--output-file", action="store", dest="output_file", - help="submit jobs to build in parallel") + parser.add_option("--output-file", dest="filename", help="submit jobs to build in parallel") (opts, args) = parser.parse_args() self.parallel = opts.parallel - self.output_file = output_file + + if opts.filename: + filename = opts.filename + elif "EASYBILDTESTOUTPUT" in os.environ: + filename = os.environ["EASYBUILDTESTOUTPUT"] + else: + filename = "easybuild-test-%s.xml" % datetime.now().strftime("%d-%m-%Y-%H:%M:%S") + + self.output_file = os.path.join(self.cur_dir, filename) files = [] if args: @@ -273,14 +280,8 @@ def runTest(self): self.log.info("%s from %s packages failed to build!" % (failed, total)) - if "EASYBUILDTESTOUTPUT" in os.environ: - filename = os.environ["EASYBUILDTESTOUTPUT"] - else: - filename = "easybuild-test-%s.xml" % datetime.now().strftime("%d-%m-%Y-%H:%M:%S") - - filename = os.path.join(self.cur_dir, filename) - self.log.debug("writing xml output to %s" % filename) - write_to_xml(self.succes, self.test_results, filename) + self.log.debug("writing xml output to %s" % self.output_file) + write_to_xml(self.succes, self.test_results, self.output_file) # exit with non-zero exit-code when not build_ok if not self.build_ok: From 75963945bedd3b750dcb69648235c589f4f567c5 Mon Sep 17 00:00:00 2001 From: Toon Willems Date: Fri, 3 Aug 2012 17:01:07 +0200 Subject: [PATCH 334/798] seems my indentation was a bit screwed --- easybuild/test/build.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/easybuild/test/build.py b/easybuild/test/build.py index acc087dfcf..33decada82 100644 --- a/easybuild/test/build.py +++ b/easybuild/test/build.py @@ -162,8 +162,8 @@ def submit_jobs(self, files): others = ["PYTHONPATH", "MODULEPATH"] for env_var in others: - if env_var in os.environ: - easybuild_vars[env_var] = os.environ[env_var] + if env_var in os.environ: + easybuild_vars[env_var] = os.environ[env_var] for easyconfig in files: easybuild_vars['EASYBUILDTESTOUTPUT'] = "%s.xml" % easyconfig From 6cfd635a7370893dd37e435ec2bcf5c5d9d30488 Mon Sep 17 00:00:00 2001 From: Kenneth Hoste Date: Fri, 3 Aug 2012 10:08:44 +0200 Subject: [PATCH 335/798] add support for building with OpenMPI; build in make, fix permissions (also for ThirdParty dir) in make_install; extend sanity check --- easybuild/easyblocks/o/openfoam.py | 63 +++++++++++++++++++++--------- 1 file changed, 44 insertions(+), 19 deletions(-) diff --git a/easybuild/easyblocks/o/openfoam.py b/easybuild/easyblocks/o/openfoam.py index 8054791059..3418e853af 100644 --- a/easybuild/easyblocks/o/openfoam.py +++ b/easybuild/easyblocks/o/openfoam.py @@ -18,9 +18,14 @@ # You should have received a copy of the GNU General Public License # along with EasyBuild. If not, see . ## +""" +EasyBuild support for building and installing OpenFOAM, implemented as an easyblock +""" + from distutils.version import LooseVersion import os import stat + from easybuild.framework.application import Application from easybuild.tools.filetools import run_cmd, recursiveChmod import easybuild.tools.toolkit as toolkit @@ -39,6 +44,7 @@ def __init__(self,*args,**kwargs): self.wm_compiler= None self.wm_mplib = None self.mpipath = None + self.thrdpartydir = None def configure(self): """Configure OpenFOAM build by setting appropriate environment variables.""" @@ -47,9 +53,9 @@ def configure(self): os.putenv("FOAM_INST_DIR", self.installdir) # third party directory - thrdpartydir = "ThirdParty-%s" % self.version() - os.symlink(os.path.join("..", thrdpartydir), thrdpartydir) - os.putenv("WM_THIRD_PARTY_DIR", os.path.join(self.installdir, thrdpartydir)) + self.thrdpartydir = "ThirdParty-%s" % self.version() + os.symlink(os.path.join("..", self.thrdpartydir), self.thrdpartydir) + os.putenv("WM_THIRD_PARTY_DIR", os.path.join(self.installdir, self.thrdpartydir)) # compiler comp_fam = self.tk.toolkit_comp_family() @@ -79,6 +85,10 @@ def configure(self): self.mpipath = os.environ['SOFTROOTQLOGICMPI'] self.wm_mplib = "MPICH" + elif mpi_type == toolkit.OPENMPI: + self.mpipath = os.environ['SOFTROOTOPENMPI'] + self.wm_mplib = "MPI-MVAPICH2" + else: self.log.error("Unknown MPI, don't know how to set MPI_ARCH_PATH, WM_MPLIB or FOAM_MPI_LIBBIN") @@ -90,11 +100,7 @@ def configure(self): os.putenv("WM_NCOMPPROCS", str(self.getcfg('parallel'))) def make(self): - """Building is done in make_install.""" - pass - - def make_install(self): - """Build and install OpenFOAM.""" + """Build OpenFOAM using make after sourcing script to set environment.""" nameversion = "%s-%s"%(self.name(), self.version()) @@ -106,17 +112,20 @@ def make_install(self): 'makecmd':os.path.join(self.builddir, nameversion, "Allwmake")} run_cmd(cmd,log_all=True,simple=True,log_output=True) - # fix file permissions of various files (only known to be required for v1.x) + def make_install(self): + """Building was performed in install dir, so just fix permissions.""" + + # fix permissions of various OpenFOAM-x subdirectories (only known to be required for v1.x) if LooseVersion(self.version()) <= LooseVersion('2'): installPath = "%s/%s-%s"%(self.installdir, self.name(), self.version()) - for path in ["applications", "bin", "doc", "etc", "lib", "src", "tutorials"]: - # Make directories readable for others - recursiveChmod(os.path.join(installPath, path), stat.S_IROTH, add=True) + for d in ["applications", "bin", "doc", "etc", "lib", "src", "tutorials"]: + # Make directories readable and executable for others + recursiveChmod(os.path.join(installPath, d), stat.S_IROTH|stat.S_IXOTH, add=True) - for path in ["applications", "bin", "lib"]: - # Make directories executable for others - recursiveChmod(os.path.join(installPath, path), stat.S_IXOTH, add=True) + # fix permissions of ThirdParty subdirectories (also for 2.x) + for d in ["etc", "platforms"]: + recursiveChmod(os.path.join(self.installdir, self.thrdpartydir, d), stat.S_IROTH|stat.S_IXOTH, add=True) def sanitycheck(self): """Custom sanity check for OpenFOAM""" @@ -125,12 +134,28 @@ def sanitycheck(self): odir = "%s-%s" % (self.name(), self.version()) + psubdir = "linux64%sDPOpt" % self.wm_compiler + + if LooseVersion(self.version()) < LooseVersion("2"): + toolsdir = os.path.join(odir, "applications", "bin", psubdir) + + else: + toolsdir = os.path.join(odir, "platforms", psubdir, "bin") + pdirs = [] if LooseVersion(self.version()) >= LooseVersion("2"): - pdirs = ["%s/platforms/linux64%sDPOpt/%s" % (odir, self.wm_compiler, x) for x in ["bin", "lib"]] - - self.setcfg('sanityCheckPaths',{'files':["%s/etc/%s" % (odir, x) for x in ["bashrc", "cshrc"]], - 'dirs':["%s/bin" % odir] + pdirs + pdirs = [toolsdir, os.path.join(odir, "platforms", psubdir, "lib")] + + # some randomly selected binaries + # if one of these is missing, it's very likely something went wrong + bins = [os.path.join(odir, "bin", x) for x in []] + \ + [os.path.join(toolsdir, "buoyant%sSimpleFoam" % x) for x in ["", "Boussinesq"]] + \ + [os.path.join(toolsdir, "%sFoam" % x) for x in ["bubble", "engine", "sonic"]] + \ + [os.path.join(toolsdir, "surface%s" % x) for x in ["Add", "Find", "Smooth"]] + \ + [os.path.join(toolsdir, x) for x in ["deformedGeom", "engineSwirl", "modifyMesh", "refineMesh", "vorticity"]] + + self.setcfg('sanityCheckPaths',{'files':["%s/etc/%s" % (odir, x) for x in ["bashrc", "cshrc"]] + bins, + 'dirs':pdirs }) self.log.info("Customized sanity check paths: %s" % self.getcfg('sanityCheckPaths')) From dc3c9793c8d694f6cf5c39454a380244d3c857f3 Mon Sep 17 00:00:00 2001 From: Kenneth Hoste Date: Fri, 3 Aug 2012 10:44:55 +0200 Subject: [PATCH 336/798] use environment.set instead of os.putenv --- easybuild/easyblocks/o/openfoam.py | 15 ++++++++------- 1 file changed, 8 insertions(+), 7 deletions(-) diff --git a/easybuild/easyblocks/o/openfoam.py b/easybuild/easyblocks/o/openfoam.py index 3418e853af..bbef34d80c 100644 --- a/easybuild/easyblocks/o/openfoam.py +++ b/easybuild/easyblocks/o/openfoam.py @@ -28,6 +28,7 @@ from easybuild.framework.application import Application from easybuild.tools.filetools import run_cmd, recursiveChmod +import easybuild.tools.environment as env import easybuild.tools.toolkit as toolkit @@ -50,12 +51,12 @@ def configure(self): """Configure OpenFOAM build by setting appropriate environment variables.""" # installation directory - os.putenv("FOAM_INST_DIR", self.installdir) + env.set("FOAM_INST_DIR", self.installdir) # third party directory self.thrdpartydir = "ThirdParty-%s" % self.version() os.symlink(os.path.join("..", self.thrdpartydir), self.thrdpartydir) - os.putenv("WM_THIRD_PARTY_DIR", os.path.join(self.installdir, self.thrdpartydir)) + env.set("WM_THIRD_PARTY_DIR", os.path.join(self.installdir, self.thrdpartydir)) # compiler comp_fam = self.tk.toolkit_comp_family() @@ -72,7 +73,7 @@ def configure(self): else: self.log.error("Unknown compiler family, don't know how to set WM_COMPILER") - os.putenv("WM_COMPILER",self.wm_compiler) + env.set("WM_COMPILER",self.wm_compiler) # type of MPI mpi_type = self.tk.toolkit_mpi_type() @@ -92,12 +93,12 @@ def configure(self): else: self.log.error("Unknown MPI, don't know how to set MPI_ARCH_PATH, WM_MPLIB or FOAM_MPI_LIBBIN") - os.putenv("WM_MPLIB", self.wm_mplib) - os.putenv("MPI_ARCH_PATH", self.mpipath) - os.putenv("FOAM_MPI_LIBBIN", self.mpipath) + env.set("WM_MPLIB", self.wm_mplib) + env.set("MPI_ARCH_PATH", self.mpipath) + env.set("FOAM_MPI_LIBBIN", self.mpipath) # parallel build spec - os.putenv("WM_NCOMPPROCS", str(self.getcfg('parallel'))) + env.set("WM_NCOMPPROCS", str(self.getcfg('parallel'))) def make(self): """Build OpenFOAM using make after sourcing script to set environment.""" From 9991af84998818940c74deeff0c7331756030e91 Mon Sep 17 00:00:00 2001 From: Kenneth Hoste Date: Fri, 3 Aug 2012 11:12:02 +0200 Subject: [PATCH 337/798] add example easyconfig for OpenFOAM 2.1.1 with goalf toolkit + required patch files --- .../o/OpenFOAM/OpenFOAM-2.1.1-goalf-1.1.0.eb | 18 ++ .../o/OpenFOAM/cleanup-OpenFOAM-2.1.1.patch | 209 ++++++++++++++++++ .../o/OpenFOAM/cleanup-ThirdParty-2.1.1.patch | 18 ++ 3 files changed, 245 insertions(+) create mode 100644 easybuild/easyconfigs/o/OpenFOAM/OpenFOAM-2.1.1-goalf-1.1.0.eb create mode 100644 easybuild/easyconfigs/o/OpenFOAM/cleanup-OpenFOAM-2.1.1.patch create mode 100644 easybuild/easyconfigs/o/OpenFOAM/cleanup-ThirdParty-2.1.1.patch diff --git a/easybuild/easyconfigs/o/OpenFOAM/OpenFOAM-2.1.1-goalf-1.1.0.eb b/easybuild/easyconfigs/o/OpenFOAM/OpenFOAM-2.1.1-goalf-1.1.0.eb new file mode 100644 index 0000000000..6b3581648c --- /dev/null +++ b/easybuild/easyconfigs/o/OpenFOAM/OpenFOAM-2.1.1-goalf-1.1.0.eb @@ -0,0 +1,18 @@ +name='OpenFOAM' +version='2.1.1' + +homepage='http://www.openfoam.com/' +description="""OpenFOAM is a free, open source CFD software package. OpenFOAM has an extensive range of features to solve anything +from complex fluid flows involving chemical reactions, turbulence and heat transfer, to solid dynamics and electromagnetics.""" + +toolkit={'name':'goalf','version':'1.1.0-no-OFED'} + +sourceURLs=['http://downloads.sourceforge.net/foam/%s' % version] +sources=['%s-%s.tgz' % (name,version), + 'ThirdParty-%s.tgz' % version] + +patches=['cleanup-OpenFOAM-%s.patch' % version, + ('cleanup-ThirdParty-%s.patch' % version, "..") # patch should not be applied in OpenFOAM subdir + ] + +dependencies=[('flex', '2.5.35')] diff --git a/easybuild/easyconfigs/o/OpenFOAM/cleanup-OpenFOAM-2.1.1.patch b/easybuild/easyconfigs/o/OpenFOAM/cleanup-OpenFOAM-2.1.1.patch new file mode 100644 index 0000000000..103cd912b3 --- /dev/null +++ b/easybuild/easyconfigs/o/OpenFOAM/cleanup-OpenFOAM-2.1.1.patch @@ -0,0 +1,209 @@ +diff -ru OpenFOAM-2.1.1.orig/etc/bashrc OpenFOAM-2.1.1/etc/bashrc +--- OpenFOAM-2.1.1.orig/etc/bashrc 2012-05-24 16:51:32.000000000 +0200 ++++ OpenFOAM-2.1.1/etc/bashrc 2012-07-30 16:58:10.142065364 +0200 +@@ -63,7 +63,7 @@ + + #- Compiler: + # WM_COMPILER = Gcc | Gcc43 | Gcc44 | Gcc45 | Gcc46 | Clang | Icc (Intel icc) +-export WM_COMPILER=Gcc ++: ${WM_COMPILER:=Gcc}; export WM_COMPILER + unset WM_COMPILER_ARCH WM_COMPILER_LIB_ARCH + + #- Architecture: +@@ -81,7 +81,7 @@ + #- MPI implementation: + # WM_MPLIB = SYSTEMOPENMPI | OPENMPI | MPICH | MPICH-GM | HPMPI + # | GAMMA | MPI | QSMPI +-export WM_MPLIB=OPENMPI ++: ${WM_MPLIB:=OPENMPI}; export WM_MPLIB + + #- Operating System: + # WM_OSTYPE = POSIX | ??? +@@ -115,7 +115,7 @@ + + # Location of third-party software + # ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +-export WM_THIRD_PARTY_DIR=$WM_PROJECT_INST_DIR/ThirdParty-$WM_PROJECT_VERSION ++: ${WM_THIRD_PARTY_DIR:=$WM_PROJECT_INST_DIR/ThirdParty-$WM_PROJECT_VERSION}; export WM_THIRD_PARTY_DIR + + # Location of site-specific templates etc + # ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +diff -ru OpenFOAM-2.1.1.orig/etc/config/settings.csh OpenFOAM-2.1.1/etc/config/settings.csh +--- OpenFOAM-2.1.1.orig/etc/config/settings.csh 2012-05-24 16:51:32.000000000 +0200 ++++ OpenFOAM-2.1.1/etc/config/settings.csh 2012-07-30 16:58:10.142065364 +0200 +@@ -373,7 +373,7 @@ + # Communications library + # ~~~~~~~~~~~~~~~~~~~~~~ + +-unsetenv MPI_ARCH_PATH MPI_HOME FOAM_MPI_LIBBIN ++#unsetenv MPI_ARCH_PATH MPI_HOME FOAM_MPI_LIBBIN + + switch ("$WM_MPLIB") + case SYSTEMOPENMPI: +diff -ru OpenFOAM-2.1.1.orig/etc/config/settings.sh OpenFOAM-2.1.1/etc/config/settings.sh +--- OpenFOAM-2.1.1.orig/etc/config/settings.sh 2012-05-24 16:51:32.000000000 +0200 ++++ OpenFOAM-2.1.1/etc/config/settings.sh 2012-07-30 17:00:35.182064969 +0200 +@@ -389,7 +389,7 @@ + # Communications library + # ~~~~~~~~~~~~~~~~~~~~~~ + +-unset MPI_ARCH_PATH MPI_HOME FOAM_MPI_LIBBIN ++#unset MPI_ARCH_PATH MPI_HOME FOAM_MPI_LIBBIN + + case "$WM_MPLIB" in + SYSTEMOPENMPI) +@@ -574,6 +574,21 @@ + _foamAddPath $MPI_ARCH_PATH/bin64 + _foamAddLib $MPI_ARCH_PATH/lib64 + ;; ++ ++IMPI) ++ ++ export MPI_HOME=$SOFTROOTIMPI/intel64 ++ ++ export MPI_ARCH_PATH=$SOFTROOTIMPI/intel64 ++ ++ _foamAddPath $MPI_ARCH_PATH/bin ++ ++ _foamAddLib $MPI_ARCH_PATH/lib ++ ++ export FOAM_MPI_LIBBIN=$FOAM_LIBBIN/impi ++ ++;; ++ + *) + export FOAM_MPI=dummy + ;; +diff -ru OpenFOAM-2.1.1.orig/src/parallel/decompose/ptscotchDecomp/lnInclude/ptscotchDecomp.C OpenFOAM-2.1.1/src/parallel/decompose/ptscotchDecomp/lnInclude/ptscotchDecomp.C +--- OpenFOAM-2.1.1.orig/src/parallel/decompose/ptscotchDecomp/lnInclude/ptscotchDecomp.C 2012-05-24 16:51:32.000000000 +0200 ++++ OpenFOAM-2.1.1/src/parallel/decompose/ptscotchDecomp/lnInclude/ptscotchDecomp.C 2012-07-30 16:58:10.142065364 +0200 +@@ -112,6 +112,8 @@ + + \*---------------------------------------------------------------------------*/ + ++#include "mpi.h" ++ + #include "ptscotchDecomp.H" + #include "addToRunTimeSelectionTable.H" + #include "Time.H" +@@ -121,8 +123,8 @@ + + extern "C" + { +-#include + #include "mpi.h" ++#include + #include "ptscotch.h" + } + +diff -ru OpenFOAM-2.1.1.orig/src/parallel/decompose/ptscotchDecomp/Make/options OpenFOAM-2.1.1/src/parallel/decompose/ptscotchDecomp/Make/options +--- OpenFOAM-2.1.1.orig/src/parallel/decompose/ptscotchDecomp/Make/options 2012-05-24 16:51:32.000000000 +0200 ++++ OpenFOAM-2.1.1/src/parallel/decompose/ptscotchDecomp/Make/options 2012-07-30 16:58:10.142065364 +0200 +@@ -5,7 +5,7 @@ + $(PFLAGS) $(PINC) \ + -I$(SCOTCH_ROOT)/include \ + -I$(SCOTCH_ARCH_PATH)/include/$(FOAM_MPI) \ +- -I/usr/include/scotch \ ++ -I$(SOFTROOTSCOTCH)/include \ + -I../decompositionMethods/lnInclude + + LIB_LIBS = \ +diff -ru OpenFOAM-2.1.1.orig/src/parallel/decompose/ptscotchDecomp/ptscotchDecomp.C OpenFOAM-2.1.1/src/parallel/decompose/ptscotchDecomp/ptscotchDecomp.C +--- OpenFOAM-2.1.1.orig/src/parallel/decompose/ptscotchDecomp/ptscotchDecomp.C 2012-05-24 16:51:32.000000000 +0200 ++++ OpenFOAM-2.1.1/src/parallel/decompose/ptscotchDecomp/ptscotchDecomp.C 2012-07-30 16:58:10.142065364 +0200 +@@ -112,6 +112,8 @@ + + \*---------------------------------------------------------------------------*/ + ++#include "mpi.h" ++ + #include "ptscotchDecomp.H" + #include "addToRunTimeSelectionTable.H" + #include "Time.H" +@@ -121,8 +123,8 @@ + + extern "C" + { +-#include + #include "mpi.h" ++#include + #include "ptscotch.h" + } + +diff -ru OpenFOAM-2.1.1.orig/wmake/rules/linux64Gcc/c OpenFOAM-2.1.1/wmake/rules/linux64Gcc/c +--- OpenFOAM-2.1.1.orig/wmake/rules/linux64Gcc/c 2012-05-24 16:51:32.000000000 +0200 ++++ OpenFOAM-2.1.1/wmake/rules/linux64Gcc/c 2012-07-30 16:58:10.142065364 +0200 +@@ -2,7 +2,7 @@ + + cWARN = -Wall + +-cc = gcc -m64 ++cc = $(MPICC) + + include $(RULES)/c$(WM_COMPILE_OPTION) + +diff -ru OpenFOAM-2.1.1.orig/wmake/rules/linux64Gcc/c++ OpenFOAM-2.1.1/wmake/rules/linux64Gcc/c++ +--- OpenFOAM-2.1.1.orig/wmake/rules/linux64Gcc/c++ 2012-05-24 16:51:32.000000000 +0200 ++++ OpenFOAM-2.1.1/wmake/rules/linux64Gcc/c++ 2012-07-30 16:58:10.142065364 +0200 +@@ -2,7 +2,7 @@ + + c++WARN = -Wall -Wextra -Wno-unused-parameter -Wold-style-cast -Wnon-virtual-dtor + +-CC = g++ -m64 ++CC = $(MPICXX) + + include $(RULES)/c++$(WM_COMPILE_OPTION) + +diff -ru OpenFOAM-2.1.1.orig/wmake/rules/linux64Gcc/cOpt OpenFOAM-2.1.1/wmake/rules/linux64Gcc/cOpt +--- OpenFOAM-2.1.1.orig/wmake/rules/linux64Gcc/cOpt 2012-05-24 16:51:32.000000000 +0200 ++++ OpenFOAM-2.1.1/wmake/rules/linux64Gcc/cOpt 2012-07-30 16:58:10.142065364 +0200 +@@ -1,2 +1,2 @@ + cDBUG = +-cOPT = -O3 ++cOPT = $(CFLAGS) +diff -ru OpenFOAM-2.1.1.orig/wmake/rules/linux64Gcc/c++Opt OpenFOAM-2.1.1/wmake/rules/linux64Gcc/c++Opt +--- OpenFOAM-2.1.1.orig/wmake/rules/linux64Gcc/c++Opt 2012-05-24 16:51:32.000000000 +0200 ++++ OpenFOAM-2.1.1/wmake/rules/linux64Gcc/c++Opt 2012-07-30 16:58:10.142065364 +0200 +@@ -1,3 +1,3 @@ + #c++DBUG = -O0 -DFULLDEBUG -g + c++DBUG = +-c++OPT = -O3 ++c++OPT = $(CXXFLAGS) +diff -ru OpenFOAM-2.1.1.orig/wmake/rules/linux64Icc/c OpenFOAM-2.1.1/wmake/rules/linux64Icc/c +--- OpenFOAM-2.1.1.orig/wmake/rules/linux64Icc/c 2012-05-24 16:51:32.000000000 +0200 ++++ OpenFOAM-2.1.1/wmake/rules/linux64Icc/c 2012-07-30 16:58:10.142065364 +0200 +@@ -2,7 +2,7 @@ + + cWARN = + +-cc = icc ++cc = $(MPICC) + + include $(RULES)/c$(WM_COMPILE_OPTION) + +diff -ru OpenFOAM-2.1.1.orig/wmake/rules/linux64Icc/c++ OpenFOAM-2.1.1/wmake/rules/linux64Icc/c++ +--- OpenFOAM-2.1.1.orig/wmake/rules/linux64Icc/c++ 2012-05-24 16:51:32.000000000 +0200 ++++ OpenFOAM-2.1.1/wmake/rules/linux64Icc/c++ 2012-07-30 16:58:10.142065364 +0200 +@@ -2,7 +2,7 @@ + + c++WARN = -wd327,654,819,1125,1476,1505,1572 + +-CC = icpc -std=c++0x ++CC = $(MPICXX) + + include $(RULES)/c++$(WM_COMPILE_OPTION) + +diff -ru OpenFOAM-2.1.1.orig/wmake/rules/linux64Icc/cOpt OpenFOAM-2.1.1/wmake/rules/linux64Icc/cOpt +--- OpenFOAM-2.1.1.orig/wmake/rules/linux64Icc/cOpt 2012-05-24 16:51:32.000000000 +0200 ++++ OpenFOAM-2.1.1/wmake/rules/linux64Icc/cOpt 2012-07-30 16:58:10.142065364 +0200 +@@ -1,2 +1,2 @@ + cDBUG = +-cOPT = -O3 -no-prec-div ++cOPT = $(CFLAGS) +diff -ru OpenFOAM-2.1.1.orig/wmake/rules/linux64Icc/c++Opt OpenFOAM-2.1.1/wmake/rules/linux64Icc/c++Opt +--- OpenFOAM-2.1.1.orig/wmake/rules/linux64Icc/c++Opt 2012-05-24 16:51:32.000000000 +0200 ++++ OpenFOAM-2.1.1/wmake/rules/linux64Icc/c++Opt 2012-07-30 17:01:08.832064481 +0200 +@@ -1,2 +1,2 @@ + c++DBUG = +-c++OPT = -xSSE3 -O2 -no-prec-div ++c++OPT = $(CXXFLAGS) diff --git a/easybuild/easyconfigs/o/OpenFOAM/cleanup-ThirdParty-2.1.1.patch b/easybuild/easyconfigs/o/OpenFOAM/cleanup-ThirdParty-2.1.1.patch new file mode 100644 index 0000000000..567e385787 --- /dev/null +++ b/easybuild/easyconfigs/o/OpenFOAM/cleanup-ThirdParty-2.1.1.patch @@ -0,0 +1,18 @@ +diff -ru ThirdParty-2.1.1.ORIG/Allwmake ThirdParty-2.1.1/Allwmake +--- ThirdParty-2.1.1.ORIG/Allwmake 2011-08-15 13:30:50.862605278 +0200 ++++ ThirdParty-2.1.1/Allwmake 2011-08-15 13:31:09.902605278 +0200 +@@ -109,12 +109,12 @@ + ;; + + MPICH) +- if [ -r $MPI_ARCH_PATH/lib/libmpich.so ] ++ if [ -r $MPI_ARCH_PATH/lib64/libmpich.so ] + then + echo " have $WM_MPLIB shared library ($FOAM_MPI)" + echo + echo +- elif [ -r $MPI_ARCH_PATH/lib/libmpich.a ] ++ elif [ -r $MPI_ARCH_PATH/lib64/libmpich.a ] + then + echo " have $WM_MPLIB static library ($FOAM_MPI)" + echo From 836d761428ab108e21daa644e77fc4ba8b713d1e Mon Sep 17 00:00:00 2001 From: Kenneth Hoste Date: Fri, 3 Aug 2012 15:06:23 +0200 Subject: [PATCH 338/798] also fix permissions for ThirdParty root dir --- easybuild/easyblocks/o/openfoam.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/easybuild/easyblocks/o/openfoam.py b/easybuild/easyblocks/o/openfoam.py index bbef34d80c..b1d7b0df30 100644 --- a/easybuild/easyblocks/o/openfoam.py +++ b/easybuild/easyblocks/o/openfoam.py @@ -124,8 +124,8 @@ def make_install(self): # Make directories readable and executable for others recursiveChmod(os.path.join(installPath, d), stat.S_IROTH|stat.S_IXOTH, add=True) - # fix permissions of ThirdParty subdirectories (also for 2.x) - for d in ["etc", "platforms"]: + # fix permissions of ThirdParty dir and subdirs (also for 2.x) + for d in ["", "etc", "platforms"]: recursiveChmod(os.path.join(self.installdir, self.thrdpartydir, d), stat.S_IROTH|stat.S_IXOTH, add=True) def sanitycheck(self): From 545acbe0fc629efaa62b842306b10ca577def776 Mon Sep 17 00:00:00 2001 From: Kenneth Hoste Date: Fri, 3 Aug 2012 23:18:07 +0200 Subject: [PATCH 339/798] add logging for fixing of permissions --- easybuild/easyblocks/o/openfoam.py | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/easybuild/easyblocks/o/openfoam.py b/easybuild/easyblocks/o/openfoam.py index b1d7b0df30..d7788f3d32 100644 --- a/easybuild/easyblocks/o/openfoam.py +++ b/easybuild/easyblocks/o/openfoam.py @@ -122,11 +122,15 @@ def make_install(self): for d in ["applications", "bin", "doc", "etc", "lib", "src", "tutorials"]: # Make directories readable and executable for others - recursiveChmod(os.path.join(installPath, d), stat.S_IROTH|stat.S_IXOTH, add=True) + fullpath = os.path.join(installPath, d) + self.log.info("Fixing permissions for dir %s" % fullpath) + recursiveChmod(fullpath, stat.S_IROTH|stat.S_IXOTH, add=True) # fix permissions of ThirdParty dir and subdirs (also for 2.x) for d in ["", "etc", "platforms"]: - recursiveChmod(os.path.join(self.installdir, self.thrdpartydir, d), stat.S_IROTH|stat.S_IXOTH, add=True) + fullpath = os.path.join(self.installdir, self.thrdpartydir, d) + self.log.info("Fixing permissions for dir %s" % fullpath) + recursiveChmod(fullpath, stat.S_IROTH|stat.S_IXOTH, add=True) def sanitycheck(self): """Custom sanity check for OpenFOAM""" From 6122110b4f624171121d4ec11201d053385613ad Mon Sep 17 00:00:00 2001 From: Kenneth Hoste Date: Sat, 4 Aug 2012 09:28:02 +0200 Subject: [PATCH 340/798] fix fixing permissions of ThirdParty dir --- easybuild/easyblocks/o/openfoam.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/easybuild/easyblocks/o/openfoam.py b/easybuild/easyblocks/o/openfoam.py index d7788f3d32..4e836497f8 100644 --- a/easybuild/easyblocks/o/openfoam.py +++ b/easybuild/easyblocks/o/openfoam.py @@ -127,7 +127,9 @@ def make_install(self): recursiveChmod(fullpath, stat.S_IROTH|stat.S_IXOTH, add=True) # fix permissions of ThirdParty dir and subdirs (also for 2.x) - for d in ["", "etc", "platforms"]: + fullpath = os.path.join(self.installdir, self.thrdpartydir) + recursiveChmod(fullpath, stat.S_IROTH|stat.S_IXOTH, add=True) + for d in ["etc", "platforms"]: fullpath = os.path.join(self.installdir, self.thrdpartydir, d) self.log.info("Fixing permissions for dir %s" % fullpath) recursiveChmod(fullpath, stat.S_IROTH|stat.S_IXOTH, add=True) From d632a0802f567b36ef7a8364fdcbe56c30c6241d Mon Sep 17 00:00:00 2001 From: Kenneth Hoste Date: Sat, 4 Aug 2012 10:01:25 +0200 Subject: [PATCH 341/798] cleanup fixing permissions, rename recursiveChmod to adjust_permissions and add option to do it non-recursively --- easybuild/easyblocks/o/openfoam.py | 10 +++---- easybuild/tools/filetools.py | 44 +++++++++++++++++++----------- 2 files changed, 32 insertions(+), 22 deletions(-) diff --git a/easybuild/easyblocks/o/openfoam.py b/easybuild/easyblocks/o/openfoam.py index 4e836497f8..a38fb3b73a 100644 --- a/easybuild/easyblocks/o/openfoam.py +++ b/easybuild/easyblocks/o/openfoam.py @@ -27,7 +27,7 @@ import stat from easybuild.framework.application import Application -from easybuild.tools.filetools import run_cmd, recursiveChmod +from easybuild.tools.filetools import run_cmd, adjust_permissions import easybuild.tools.environment as env import easybuild.tools.toolkit as toolkit @@ -123,16 +123,14 @@ def make_install(self): for d in ["applications", "bin", "doc", "etc", "lib", "src", "tutorials"]: # Make directories readable and executable for others fullpath = os.path.join(installPath, d) - self.log.info("Fixing permissions for dir %s" % fullpath) - recursiveChmod(fullpath, stat.S_IROTH|stat.S_IXOTH, add=True) + adjust_permissions(fullpath, stat.S_IROTH|stat.S_IXOTH, add=True) # fix permissions of ThirdParty dir and subdirs (also for 2.x) fullpath = os.path.join(self.installdir, self.thrdpartydir) - recursiveChmod(fullpath, stat.S_IROTH|stat.S_IXOTH, add=True) + adjust_permissions(fullpath, stat.S_IROTH|stat.S_IXOTH, add=True, recursive=False) for d in ["etc", "platforms"]: fullpath = os.path.join(self.installdir, self.thrdpartydir, d) - self.log.info("Fixing permissions for dir %s" % fullpath) - recursiveChmod(fullpath, stat.S_IROTH|stat.S_IXOTH, add=True) + adjust_permissions(fullpath, stat.S_IROTH|stat.S_IXOTH, add=True) def sanitycheck(self): """Custom sanity check for OpenFOAM""" diff --git a/easybuild/tools/filetools.py b/easybuild/tools/filetools.py index 865a1a118c..5e7bbcc929 100644 --- a/easybuild/tools/filetools.py +++ b/easybuild/tools/filetools.py @@ -644,28 +644,40 @@ def parselogForError(txt, regExp=None, stdout=True, msg=None): return res -def recursiveChmod(path, permissionBits, add=True, onlyFiles=False): +def adjust_permissions(name, permissionBits, add=True, onlyFiles=False, recursive=True): """ Add or remove (if add is False) permissionBits from all files and directories (if onlyFiles is False) in path """ - for root, dirs, files in os.walk(path): - paths = files - if not onlyFiles: - paths += dirs - for path in paths: - # Ignore errors while walking (for example caused by bad links) - try: - absEl = os.path.join(root, path) - perms = os.stat(absEl)[stat.ST_MODE] + allpaths = [] - if add: - os.chmod(absEl, perms | permissionBits) - else: - os.chmod(absEl, perms & ~permissionBits) - except OSError, err: - log.debug("Failed to chmod %s (but ignoring it): %s" % (path, err)) + if recursive: + log.info("Adjusting permissions recursively for %s" % name) + for root, dirs, files in os.walk(name): + paths = files + if not onlyFiles: + paths += dirs + + for path in paths: + allpaths.append(os.path.join(root, path)) + + else: + log.info("Adjusting permissions for %s" % name) + allpaths = [name] + + for path in allpaths: + log.info("Adjusting permissions for %s" % path) + # ignore errors while adjusting permissions (for example caused by bad links) + try: + perms = os.stat(path)[stat.ST_MODE] + + if add: + os.chmod(path, perms | permissionBits) + else: + os.chmod(path, perms & ~permissionBits) + except OSError, err: + log.info("Failed to chmod %s (but ignoring it): %s" % (path, err)) def patch_perl_script_autoflush(path): # patch Perl script to enable autoflush, From 7846a2e6af70d474fe2f520cc1adb22abf2490ed Mon Sep 17 00:00:00 2001 From: Kenneth Hoste Date: Sat, 4 Aug 2012 19:50:48 +0200 Subject: [PATCH 342/798] add CPATH to list of vars to set in module (used for finding header files) --- easybuild/framework/application.py | 1 + 1 file changed, 1 insertion(+) diff --git a/easybuild/framework/application.py b/easybuild/framework/application.py index d19480d04a..c8e145366c 100644 --- a/easybuild/framework/application.py +++ b/easybuild/framework/application.py @@ -1372,6 +1372,7 @@ def make_module_req_guess(self): return { 'PATH': ['bin'], 'LD_LIBRARY_PATH': ['lib', 'lib64'], + 'CPATH':['include'], 'MANPATH': ['man', 'share/man'], 'PKG_CONFIG_PATH' : ['lib/pkgconfig'], } From 9c941fb3800210a82c40819905ab5cb1c5b5d481 Mon Sep 17 00:00:00 2001 From: Kenneth Hoste Date: Sat, 4 Aug 2012 19:51:59 +0200 Subject: [PATCH 343/798] flex is just a build dependency --- easybuild/easyconfigs/o/OpenFOAM/OpenFOAM-2.1.1-goalf-1.1.0.eb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/easybuild/easyconfigs/o/OpenFOAM/OpenFOAM-2.1.1-goalf-1.1.0.eb b/easybuild/easyconfigs/o/OpenFOAM/OpenFOAM-2.1.1-goalf-1.1.0.eb index 6b3581648c..4290187432 100644 --- a/easybuild/easyconfigs/o/OpenFOAM/OpenFOAM-2.1.1-goalf-1.1.0.eb +++ b/easybuild/easyconfigs/o/OpenFOAM/OpenFOAM-2.1.1-goalf-1.1.0.eb @@ -15,4 +15,4 @@ patches=['cleanup-OpenFOAM-%s.patch' % version, ('cleanup-ThirdParty-%s.patch' % version, "..") # patch should not be applied in OpenFOAM subdir ] -dependencies=[('flex', '2.5.35')] +builddependencies=[('flex', '2.5.35')] From ee680d8f4017ca3c1ffce862cbc88707bb841ff7 Mon Sep 17 00:00:00 2001 From: Kenneth Hoste Date: Sat, 4 Aug 2012 19:52:18 +0200 Subject: [PATCH 344/798] add example ictce easyconfigs for flex and OpenFOAM --- .../f/flex/flex-2.5.35-ictce-4.0.6.eb | 16 ++++++++++++++++ .../o/OpenFOAM/OpenFOAM-2.1.1-ictce-4.0.6.eb | 18 ++++++++++++++++++ 2 files changed, 34 insertions(+) create mode 100644 easybuild/easyconfigs/f/flex/flex-2.5.35-ictce-4.0.6.eb create mode 100644 easybuild/easyconfigs/o/OpenFOAM/OpenFOAM-2.1.1-ictce-4.0.6.eb diff --git a/easybuild/easyconfigs/f/flex/flex-2.5.35-ictce-4.0.6.eb b/easybuild/easyconfigs/f/flex/flex-2.5.35-ictce-4.0.6.eb new file mode 100644 index 0000000000..c20de2d754 --- /dev/null +++ b/easybuild/easyconfigs/f/flex/flex-2.5.35-ictce-4.0.6.eb @@ -0,0 +1,16 @@ +name='flex' +version='2.5.35' + +homepage='http://flex.sourceforge.net/' +description="""Flex (Fast Lexical Analyzer) is a tool for generating scanners. A scanner, sometimes called a tokenizer, +is a program which recognizes lexical patterns in text.""" + +toolkit={'name':'ictce','version':'4.0.6'} + +sources=['%s-%s.tar.gz'%(name.lower(),version)] +sourceURLs=['http://prdownloads.sourceforge.net/%s' % name.lower()] + +sanityCheckPaths = { + 'files':["bin/flex", "include/FlexLexer.h"] + ["lib/lib%s.a" % x for x in ["fl", "fl_pic"]], + 'dirs':[] + } diff --git a/easybuild/easyconfigs/o/OpenFOAM/OpenFOAM-2.1.1-ictce-4.0.6.eb b/easybuild/easyconfigs/o/OpenFOAM/OpenFOAM-2.1.1-ictce-4.0.6.eb new file mode 100644 index 0000000000..89e5f51a98 --- /dev/null +++ b/easybuild/easyconfigs/o/OpenFOAM/OpenFOAM-2.1.1-ictce-4.0.6.eb @@ -0,0 +1,18 @@ +name='OpenFOAM' +version='2.1.1' + +homepage='http://www.openfoam.com/' +description="""OpenFOAM is a free, open source CFD software package. OpenFOAM has an extensive range of features to solve anything +from complex fluid flows involving chemical reactions, turbulence and heat transfer, to solid dynamics and electromagnetics.""" + +toolkit={'name':'ictce','version':'4.0.6'} + +sourceURLs=['http://downloads.sourceforge.net/foam/%s' % version] +sources=['%s-%s.tgz' % (name,version), + 'ThirdParty-%s.tgz' % version] + +patches=['cleanup-OpenFOAM-%s.patch' % version, + ('cleanup-ThirdParty-%s.patch' % version, "..") # patch should not be applied in OpenFOAM subdir + ] + +builddependencies=[('flex', '2.5.35')] From deff777b121dbfad0717a6371a684347d218f645 Mon Sep 17 00:00:00 2001 From: Kenneth Hoste Date: Sun, 5 Aug 2012 09:58:58 +0200 Subject: [PATCH 345/798] fixed code style in example easyconfigs for flex and OpenFOAM note: flex needs to be rebuilt for OpenFOAM build to work (CPATH needs to be set in the flex module file) --- .../f/flex/flex-2.5.35-goalf-1.1.0-no-OFED.eb | 16 +++++------ .../f/flex/flex-2.5.35-ictce-3.2.2.u3.eb | 16 +++++------ .../f/flex/flex-2.5.35-ictce-4.0.6.eb | 16 +++++------ .../o/OpenFOAM/OpenFOAM-2.1.1-goalf-1.1.0.eb | 28 ++++++++++--------- .../o/OpenFOAM/OpenFOAM-2.1.1-ictce-4.0.6.eb | 28 ++++++++++--------- 5 files changed, 54 insertions(+), 50 deletions(-) diff --git a/easybuild/easyconfigs/f/flex/flex-2.5.35-goalf-1.1.0-no-OFED.eb b/easybuild/easyconfigs/f/flex/flex-2.5.35-goalf-1.1.0-no-OFED.eb index f3279f1281..6a06e45304 100644 --- a/easybuild/easyconfigs/f/flex/flex-2.5.35-goalf-1.1.0-no-OFED.eb +++ b/easybuild/easyconfigs/f/flex/flex-2.5.35-goalf-1.1.0-no-OFED.eb @@ -1,14 +1,14 @@ -name='flex' -version='2.5.35' +name = 'flex' +version = '2.5.35' -homepage='http://flex.sourceforge.net/' -description="""Flex (Fast Lexical Analyzer) is a tool for generating scanners. A scanner, sometimes called a tokenizer, -is a program which recognizes lexical patterns in text.""" +homepage = 'http://flex.sourceforge.net/' +description="""Flex (Fast Lexical Analyzer) is a tool for generating scanners. A scanner, +sometimes called a tokenizer, is a program which recognizes lexical patterns in text.""" -toolkit={'name':'goalf','version':'1.1.0-no-OFED'} +toolkit = {'name':'goalf', 'version':'1.1.0-no-OFED'} -sources=['%s-%s.tar.gz'%(name.lower(),version)] -sourceURLs=['http://prdownloads.sourceforge.net/%s' % name.lower()] +sources = ['%s-%s.tar.gz'%(name.lower(),version)] +sourceURLs = ['http://prdownloads.sourceforge.net/%s' % name.lower()] sanityCheckPaths = { 'files':["bin/flex", "include/FlexLexer.h"] + ["lib/lib%s.a" % x for x in ["fl", "fl_pic"]], diff --git a/easybuild/easyconfigs/f/flex/flex-2.5.35-ictce-3.2.2.u3.eb b/easybuild/easyconfigs/f/flex/flex-2.5.35-ictce-3.2.2.u3.eb index 83708df102..23fc2db64d 100644 --- a/easybuild/easyconfigs/f/flex/flex-2.5.35-ictce-3.2.2.u3.eb +++ b/easybuild/easyconfigs/f/flex/flex-2.5.35-ictce-3.2.2.u3.eb @@ -1,14 +1,14 @@ -name='flex' -version='2.5.35' +name = 'flex' +version = '2.5.35' -homepage='http://flex.sourceforge.net/' -description="""Flex (Fast Lexical Analyzer) is a tool for generating scanners. A scanner, sometimes called a tokenizer, -is a program which recognizes lexical patterns in text.""" +homepage = 'http://flex.sourceforge.net/' +description="""Flex (Fast Lexical Analyzer) is a tool for generating scanners. A scanner, +sometimes called a tokenizer, is a program which recognizes lexical patterns in text.""" -toolkit={'name':'ictce','version':'3.2.2.u3'} +toolkit = {'name':'ictce', 'version':'3.2.2.u3'} -sources=['%s-%s.tar.gz'%(name.lower(),version)] -sourceURLs=['http://prdownloads.sourceforge.net/%s' % name.lower()] +sources = ['%s-%s.tar.gz'%(name.lower(),version)] +sourceURLs = ['http://prdownloads.sourceforge.net/%s' % name.lower()] sanityCheckPaths = { 'files':["bin/flex", "include/FlexLexer.h"] + ["lib/lib%s.a" % x for x in ["fl", "fl_pic"]], diff --git a/easybuild/easyconfigs/f/flex/flex-2.5.35-ictce-4.0.6.eb b/easybuild/easyconfigs/f/flex/flex-2.5.35-ictce-4.0.6.eb index c20de2d754..194a2b7f3d 100644 --- a/easybuild/easyconfigs/f/flex/flex-2.5.35-ictce-4.0.6.eb +++ b/easybuild/easyconfigs/f/flex/flex-2.5.35-ictce-4.0.6.eb @@ -1,14 +1,14 @@ -name='flex' -version='2.5.35' +name = 'flex' +version = '2.5.35' -homepage='http://flex.sourceforge.net/' -description="""Flex (Fast Lexical Analyzer) is a tool for generating scanners. A scanner, sometimes called a tokenizer, -is a program which recognizes lexical patterns in text.""" +homepage = 'http://flex.sourceforge.net/' +description="""Flex (Fast Lexical Analyzer) is a tool for generating scanners. A scanner, +sometimes called a tokenizer, is a program which recognizes lexical patterns in text.""" -toolkit={'name':'ictce','version':'4.0.6'} +toolkit = {'name':'ictce', 'version':'4.0.6'} -sources=['%s-%s.tar.gz'%(name.lower(),version)] -sourceURLs=['http://prdownloads.sourceforge.net/%s' % name.lower()] +sources = ['%s-%s.tar.gz'%(name.lower(),version)] +sourceURLs = ['http://prdownloads.sourceforge.net/%s' % name.lower()] sanityCheckPaths = { 'files':["bin/flex", "include/FlexLexer.h"] + ["lib/lib%s.a" % x for x in ["fl", "fl_pic"]], diff --git a/easybuild/easyconfigs/o/OpenFOAM/OpenFOAM-2.1.1-goalf-1.1.0.eb b/easybuild/easyconfigs/o/OpenFOAM/OpenFOAM-2.1.1-goalf-1.1.0.eb index 4290187432..b0879f7b6a 100644 --- a/easybuild/easyconfigs/o/OpenFOAM/OpenFOAM-2.1.1-goalf-1.1.0.eb +++ b/easybuild/easyconfigs/o/OpenFOAM/OpenFOAM-2.1.1-goalf-1.1.0.eb @@ -1,18 +1,20 @@ -name='OpenFOAM' -version='2.1.1' +name = 'OpenFOAM' +version = '2.1.1' -homepage='http://www.openfoam.com/' -description="""OpenFOAM is a free, open source CFD software package. OpenFOAM has an extensive range of features to solve anything -from complex fluid flows involving chemical reactions, turbulence and heat transfer, to solid dynamics and electromagnetics.""" +homepage = 'http://www.openfoam.com/' +description = """OpenFOAM is a free, open source CFD software package. +OpenFOAM has an extensive range of features to solve anything from complex fluid flows +involving chemical reactions, turbulence and heat transfer, +to solid dynamics and electromagnetics.""" -toolkit={'name':'goalf','version':'1.1.0-no-OFED'} +toolkit = {'name':'goalf', 'version':'1.1.0-no-OFED'} -sourceURLs=['http://downloads.sourceforge.net/foam/%s' % version] -sources=['%s-%s.tgz' % (name,version), - 'ThirdParty-%s.tgz' % version] +sourceURLs = ['http://downloads.sourceforge.net/foam/%s' % version] +sources = ['%s-%s.tgz' % (name, version), + 'ThirdParty-%s.tgz' % version] -patches=['cleanup-OpenFOAM-%s.patch' % version, - ('cleanup-ThirdParty-%s.patch' % version, "..") # patch should not be applied in OpenFOAM subdir - ] +patches = ['cleanup-OpenFOAM-%s.patch' % version, + ('cleanup-ThirdParty-%s.patch' % version, "..") # patch should not be applied in OpenFOAM subdir + ] -builddependencies=[('flex', '2.5.35')] +builddependencies = [('flex', '2.5.35')] diff --git a/easybuild/easyconfigs/o/OpenFOAM/OpenFOAM-2.1.1-ictce-4.0.6.eb b/easybuild/easyconfigs/o/OpenFOAM/OpenFOAM-2.1.1-ictce-4.0.6.eb index 89e5f51a98..0972b3da20 100644 --- a/easybuild/easyconfigs/o/OpenFOAM/OpenFOAM-2.1.1-ictce-4.0.6.eb +++ b/easybuild/easyconfigs/o/OpenFOAM/OpenFOAM-2.1.1-ictce-4.0.6.eb @@ -1,18 +1,20 @@ -name='OpenFOAM' -version='2.1.1' +name = 'OpenFOAM' +version = '2.1.1' -homepage='http://www.openfoam.com/' -description="""OpenFOAM is a free, open source CFD software package. OpenFOAM has an extensive range of features to solve anything -from complex fluid flows involving chemical reactions, turbulence and heat transfer, to solid dynamics and electromagnetics.""" +homepage = 'http://www.openfoam.com/' +description = """OpenFOAM is a free, open source CFD software package. +OpenFOAM has an extensive range of features to solve anything from complex fluid flows +involving chemical reactions, turbulence and heat transfer, +to solid dynamics and electromagnetics.""" -toolkit={'name':'ictce','version':'4.0.6'} +toolkit = {'name':'ictce', 'version':'4.0.6'} -sourceURLs=['http://downloads.sourceforge.net/foam/%s' % version] -sources=['%s-%s.tgz' % (name,version), - 'ThirdParty-%s.tgz' % version] +sourceURLs = ['http://downloads.sourceforge.net/foam/%s' % version] +sources = ['%s-%s.tgz' % (name, version), + 'ThirdParty-%s.tgz' % version] -patches=['cleanup-OpenFOAM-%s.patch' % version, - ('cleanup-ThirdParty-%s.patch' % version, "..") # patch should not be applied in OpenFOAM subdir - ] +patches = ['cleanup-OpenFOAM-%s.patch' % version, + ('cleanup-ThirdParty-%s.patch' % version, "..") # patch should not be applied in OpenFOAM subdir + ] -builddependencies=[('flex', '2.5.35')] +builddependencies = [('flex', '2.5.35')] From 85d2f1cf7f5c28840d612ca3230be3268dadd9e7 Mon Sep 17 00:00:00 2001 From: Toon Willems Date: Fri, 3 Aug 2012 10:45:56 +0200 Subject: [PATCH 346/798] add os.putenv and os.environ check in prep_for_release Conflicts: easybuild/scripts/prep_for_release.py --- easybuild/scripts/prep_for_release.py | 26 +++++++++++++++++++++++++- 1 file changed, 25 insertions(+), 1 deletion(-) diff --git a/easybuild/scripts/prep_for_release.py b/easybuild/scripts/prep_for_release.py index 416e63f0fa..793618e93d 100755 --- a/easybuild/scripts/prep_for_release.py +++ b/easybuild/scripts/prep_for_release.py @@ -35,10 +35,11 @@ usage: prep_for_release.py """ -from distutils.version import LooseVersion +import glob import re import os import sys +from distutils.version import LooseVersion try: import git except ImportError, err: @@ -194,6 +195,28 @@ def check_clean_master_branch(home): print "Current branch is clean, great work!" return ok +# check wheter os.putenv or os.environ[]= is used inside easyblocks +def check_easyblocks_for_environment(home): + files = glob.glob(os.path.join(home, 'easybuild/easyblocks/[a-z]/*.py')) + eb_files = filter(lambda x: os.path.basename(x) != '__init__.py', files) + + os_environ = re.compile("os\.environ\[\w+\]\s*=\s*") + os_putenv = re.compile("os\.putenv") + + found = [] + for eb_file in eb_files: + f = open(eb_file, "r") + text = f.read() + f.close() + + if os_putenv.search(text) or os_environ.search(text): + found.append(eb_file) + + for faulty in found: + warning("found os.environ or os.putenv inside eb_file: %s" % faulty) + + return len(found) == 0 + # # MAIN @@ -229,6 +252,7 @@ def check_clean_master_branch(home): # check for clean master branch all_checks.append(check_clean_master_branch(easybuild_home)) +all_checks.append(check_easyblocks_for_environment(easybuild_home)) if not all(all_checks): error("One or multiple checks have failed, EasyBuild is not ready to be released!") From 1f76cf33edaa2f808dab432f399a4569fbba6a6d Mon Sep 17 00:00:00 2001 From: Toon Willems Date: Fri, 3 Aug 2012 11:50:42 +0200 Subject: [PATCH 347/798] empty lines Conflicts: easybuild/scripts/prep_for_release.py --- easybuild/scripts/prep_for_release.py | 1 + 1 file changed, 1 insertion(+) diff --git a/easybuild/scripts/prep_for_release.py b/easybuild/scripts/prep_for_release.py index 793618e93d..3cc52dcaa9 100755 --- a/easybuild/scripts/prep_for_release.py +++ b/easybuild/scripts/prep_for_release.py @@ -46,6 +46,7 @@ sys.stderr.write("Failed to import git Python module, which is required to run this script: %s\n" % err) sys.exit(1) + # error function (exits) def error(msg): """Error function: print message to stderr and exit with non-zero exit code.""" From 7b2685019ba654e2d76b2e78a9fb6ea70f67dd1f Mon Sep 17 00:00:00 2001 From: Toon Willems Date: Fri, 3 Aug 2012 10:45:56 +0200 Subject: [PATCH 348/798] add os.putenv and os.environ check in prep_for_release Conflicts: easybuild/scripts/prep_for_release.py --- easybuild/scripts/prep_for_release.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/easybuild/scripts/prep_for_release.py b/easybuild/scripts/prep_for_release.py index 3cc52dcaa9..25e3fdd8c3 100755 --- a/easybuild/scripts/prep_for_release.py +++ b/easybuild/scripts/prep_for_release.py @@ -215,7 +215,7 @@ def check_easyblocks_for_environment(home): for faulty in found: warning("found os.environ or os.putenv inside eb_file: %s" % faulty) - + return len(found) == 0 From 4a8974cad633fd20e0c2c6598a0014777fc0487d Mon Sep 17 00:00:00 2001 From: Toon Willems Date: Fri, 3 Aug 2012 12:29:24 +0200 Subject: [PATCH 349/798] typo and docstring Conflicts: easybuild/scripts/prep_for_release.py --- easybuild/scripts/prep_for_release.py | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/easybuild/scripts/prep_for_release.py b/easybuild/scripts/prep_for_release.py index 25e3fdd8c3..196448fdc6 100755 --- a/easybuild/scripts/prep_for_release.py +++ b/easybuild/scripts/prep_for_release.py @@ -196,8 +196,11 @@ def check_clean_master_branch(home): print "Current branch is clean, great work!" return ok -# check wheter os.putenv or os.environ[]= is used inside easyblocks + +# check whether os.putenv or os.environ[]= is used inside easyblocks def check_easyblocks_for_environment(home): + """ check whether os.putenv or os.environ[]= is used inside easyblocks """ + files = glob.glob(os.path.join(home, 'easybuild/easyblocks/[a-z]/*.py')) eb_files = filter(lambda x: os.path.basename(x) != '__init__.py', files) From 78994f11275e10b1e55cff36a1e923d1c367da9e Mon Sep 17 00:00:00 2001 From: Toon Willems Date: Fri, 3 Aug 2012 12:31:35 +0200 Subject: [PATCH 350/798] add comment --- easybuild/scripts/prep_for_release.py | 1 + 1 file changed, 1 insertion(+) diff --git a/easybuild/scripts/prep_for_release.py b/easybuild/scripts/prep_for_release.py index 196448fdc6..bceceebdde 100755 --- a/easybuild/scripts/prep_for_release.py +++ b/easybuild/scripts/prep_for_release.py @@ -256,6 +256,7 @@ def check_easyblocks_for_environment(home): # check for clean master branch all_checks.append(check_clean_master_branch(easybuild_home)) +# check for use of os.putenv and os.environ adjustments all_checks.append(check_easyblocks_for_environment(easybuild_home)) if not all(all_checks): From aa5f792987f7e8c183081a2cd6ebcaee8328d765 Mon Sep 17 00:00:00 2001 From: Toon Willems Date: Fri, 3 Aug 2012 12:32:36 +0200 Subject: [PATCH 351/798] forgot printing the fix Conflicts: easybuild/scripts/prep_for_release.py --- easybuild/scripts/prep_for_release.py | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/easybuild/scripts/prep_for_release.py b/easybuild/scripts/prep_for_release.py index bceceebdde..1ba46cfce4 100755 --- a/easybuild/scripts/prep_for_release.py +++ b/easybuild/scripts/prep_for_release.py @@ -218,7 +218,10 @@ def check_easyblocks_for_environment(home): for faulty in found: warning("found os.environ or os.putenv inside eb_file: %s" % faulty) - + + if found: + warning("Only easybuild.tools.environment.set should be used for setting environment variables.") + return len(found) == 0 From e3ff53200e5eaef80a1bdc7b0e4527cf6fd8b4da Mon Sep 17 00:00:00 2001 From: Kenneth Hoste Date: Sun, 5 Aug 2012 17:59:41 +0200 Subject: [PATCH 352/798] undo copyright change to facilitate merge --- easybuild/tools/systemtools.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/easybuild/tools/systemtools.py b/easybuild/tools/systemtools.py index a058f1ccd5..d3d211ece7 100644 --- a/easybuild/tools/systemtools.py +++ b/easybuild/tools/systemtools.py @@ -1,5 +1,5 @@ ## -# Copyright 2009-2012 Jens Timmerman, Kenneth Hoste +# Copyright 2009-2012 Jens Timmerman # # This file is part of EasyBuild, # originally created by the HPC team of the University of Ghent (http://ugent.be/hpc). From 83aa0a524cf217075b14f65cb8ed9403bf7fa23b Mon Sep 17 00:00:00 2001 From: Toon Willems Date: Fri, 3 Aug 2012 10:49:23 +0200 Subject: [PATCH 353/798] fix gpl headers --- easybuild/framework/application.py | 3 ++- easybuild/tools/config.py | 1 + easybuild/tools/environment.py | 20 ++++++++++++++++++++ easybuild/tools/filetools.py | 1 + easybuild/tools/pbs_job.py | 1 + easybuild/tools/repository.py | 1 + 6 files changed, 26 insertions(+), 1 deletion(-) diff --git a/easybuild/framework/application.py b/easybuild/framework/application.py index d19480d04a..8bce837a41 100644 --- a/easybuild/framework/application.py +++ b/easybuild/framework/application.py @@ -1,5 +1,6 @@ ## -# Copyright 2009-2012 Stijn De Weirdt, Dries Verdegem, Kenneth Hoste, Pieter De Baets, Jens Timmerman, Toon Willems +# Copyright 2009-2012 Stijn De Weirdt, Dries Verdegem, Kenneth Hoste, Pieter De Baets, Jens Timmerman +# Copyright 2012 Toon Willems # # This file is part of EasyBuild, # originally created by the HPC team of the University of Ghent (http://ugent.be/hpc). diff --git a/easybuild/tools/config.py b/easybuild/tools/config.py index 0fc257d55a..834cd4fd41 100644 --- a/easybuild/tools/config.py +++ b/easybuild/tools/config.py @@ -1,5 +1,6 @@ ## # Copyright 2009-2012 Stijn De Weirdt, Dries Verdegem, Kenneth Hoste, Pieter De Baets, Jens Timmerman +# Copyright 2012 Toon Willems # # This file is part of EasyBuild, # originally created by the HPC team of the University of Ghent (http://ugent.be/hpc). diff --git a/easybuild/tools/environment.py b/easybuild/tools/environment.py index 6c332980b9..35fcc40ffc 100644 --- a/easybuild/tools/environment.py +++ b/easybuild/tools/environment.py @@ -1,3 +1,23 @@ +## +# Copyright 2012 Toon Willems +# +# This file is part of EasyBuild, +# originally created by the HPC team of the University of Ghent (http://ugent.be/hpc). +# +# http://github.com/hpcugent/easybuild +# +# EasyBuild is free software: you can redistribute it and/or modify +# it under the terms of the GNU General Public License as published by +# the Free Software Foundation v2. +# +# EasyBuild is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with EasyBuild. If not, see . +## import os diff --git a/easybuild/tools/filetools.py b/easybuild/tools/filetools.py index 865a1a118c..9aa5d7595a 100644 --- a/easybuild/tools/filetools.py +++ b/easybuild/tools/filetools.py @@ -1,5 +1,6 @@ ## # Copyright 2009-2012 Stijn De Weirdt, Dries Verdegem, Kenneth Hoste, Pieter De Baets, Jens Timmerman +# Copyright 2012 Toon Willems # # This file is part of EasyBuild, # originally created by the HPC team of the University of Ghent (http://ugent.be/hpc). diff --git a/easybuild/tools/pbs_job.py b/easybuild/tools/pbs_job.py index 0f0a4abc1d..1710533883 100644 --- a/easybuild/tools/pbs_job.py +++ b/easybuild/tools/pbs_job.py @@ -1,3 +1,4 @@ +## # Copyright 2012 Stijn De Weirdt, Toon Willems # # This file is part of EasyBuild, diff --git a/easybuild/tools/repository.py b/easybuild/tools/repository.py index b1dd2512ed..0a9bc02569 100644 --- a/easybuild/tools/repository.py +++ b/easybuild/tools/repository.py @@ -1,5 +1,6 @@ ## # Copyright 2009-2012 Stijn De Weirdt, Dries Verdegem, Kenneth Hoste, Pieter De Baets, Jens Timmerman +# Copyright 2012 Toon Willems # # This file is part of EasyBuild, # originally created by the HPC team of the University of Ghent (http://ugent.be/hpc). From 5b4877317e71096ad95ce011869bf18989f7093a Mon Sep 17 00:00:00 2001 From: Toon Willems Date: Fri, 3 Aug 2012 11:08:17 +0200 Subject: [PATCH 354/798] add module docstring --- easybuild/tools/environment.py | 3 +++ 1 file changed, 3 insertions(+) diff --git a/easybuild/tools/environment.py b/easybuild/tools/environment.py index 35fcc40ffc..3b0869e25b 100644 --- a/easybuild/tools/environment.py +++ b/easybuild/tools/environment.py @@ -18,6 +18,9 @@ # You should have received a copy of the GNU General Public License # along with EasyBuild. If not, see . ## +""" +utility module for modifying os.environ +""" import os From e2cf77fb13bdab786d929bd5687baf8b737be994 Mon Sep 17 00:00:00 2001 From: Toon Willems Date: Fri, 3 Aug 2012 14:04:15 +0200 Subject: [PATCH 355/798] rechange headers based on @boegel's suggestion --- easybuild/__init__.py | 6 ++++- easybuild/build.py | 7 +++++- easybuild/easyblocks/0/__init__.py | 6 ++++- easybuild/easyblocks/__init__.py | 8 +++++-- easybuild/easyblocks/a/__init__.py | 6 ++++- easybuild/easyblocks/a/atlas.py | 10 +++++--- easybuild/easyblocks/b/__init__.py | 6 ++++- easybuild/easyblocks/b/binary.py | 8 +++++-- easybuild/easyblocks/b/blacs.py | 28 ++++++++++++---------- easybuild/easyblocks/c/__init__.py | 6 ++++- easybuild/easyblocks/c/cp2k.py | 30 ++++++++++++++---------- easybuild/easyblocks/d/__init__.py | 6 ++++- easybuild/easyblocks/d/doxygen.py | 8 +++++-- easybuild/easyblocks/e/__init__.py | 6 ++++- easybuild/easyblocks/f/__init__.py | 6 ++++- easybuild/easyblocks/g/__init__.py | 6 ++++- easybuild/easyblocks/g/g2clib.py | 6 ++++- easybuild/easyblocks/g/g2lib.py | 6 ++++- easybuild/easyblocks/g/gcc.py | 7 +++++- easybuild/easyblocks/h/__init__.py | 6 ++++- easybuild/easyblocks/h/hdf5.py | 8 +++++-- easybuild/easyblocks/h/hpl.py | 10 +++++--- easybuild/easyblocks/i/__init__.py | 6 ++++- easybuild/easyblocks/i/icc.py | 6 ++++- easybuild/easyblocks/i/ifort.py | 8 +++++-- easybuild/easyblocks/i/imkl.py | 6 ++++- easybuild/easyblocks/i/impi.py | 8 +++++-- easybuild/easyblocks/i/intelbase.py | 6 ++++- easybuild/easyblocks/i/ipp.py | 8 +++++-- easybuild/easyblocks/i/itac.py | 10 +++++--- easybuild/easyblocks/j/__init__.py | 6 ++++- easybuild/easyblocks/k/__init__.py | 6 ++++- easybuild/easyblocks/l/__init__.py | 6 ++++- easybuild/easyblocks/l/lapack.py | 6 ++++- easybuild/easyblocks/l/libsmm.py | 16 ++++++++----- easybuild/easyblocks/m/__init__.py | 6 ++++- easybuild/easyblocks/m/maple.py | 6 ++++- easybuild/easyblocks/m/mrbayes.py | 8 +++++-- easybuild/easyblocks/m/mvapich2.py | 6 ++++- easybuild/easyblocks/n/__init__.py | 6 ++++- easybuild/easyblocks/n/ncl.py | 12 ++++++---- easybuild/easyblocks/n/netcdf.py | 6 ++++- easybuild/easyblocks/n/netcdf_fortran.py | 6 ++++- easybuild/easyblocks/o/__init__.py | 6 ++++- easybuild/easyblocks/o/openfoam.py | 6 ++++- easybuild/easyblocks/p/__init__.py | 6 ++++- easybuild/easyblocks/p/python.py | 10 +++++--- easybuild/easyblocks/q/__init__.py | 6 ++++- easybuild/easyblocks/r/__init__.py | 6 ++++- easybuild/easyblocks/s/__init__.py | 6 ++++- easybuild/easyblocks/s/scalapack.py | 10 +++++--- easybuild/easyblocks/t/__init__.py | 6 ++++- easybuild/easyblocks/t/tarball.py | 10 +++++--- easybuild/easyblocks/t/tbb.py | 6 ++++- easybuild/easyblocks/t/toolkit.py | 8 +++++-- easybuild/easyblocks/u/__init__.py | 6 ++++- easybuild/easyblocks/v/__init__.py | 6 ++++- easybuild/easyblocks/w/__init__.py | 6 ++++- easybuild/easyblocks/w/wps.py | 6 ++++- easybuild/easyblocks/w/wrf.py | 6 ++++- easybuild/easyblocks/x/__init__.py | 6 ++++- easybuild/easyblocks/y/__init__.py | 6 ++++- easybuild/easyblocks/z/__init__.py | 6 ++++- easybuild/easybuild_config.py | 7 +++++- easybuild/framework/__init__.py | 6 ++++- easybuild/framework/application.py | 6 ++++- easybuild/scripts/port_easyblock.py | 12 ++++++---- easybuild/scripts/prep_for_release.py | 8 ++++--- easybuild/scripts/repo_setup.py | 8 +++++-- easybuild/tools/__init__.py | 6 ++++- easybuild/tools/build_log.py | 6 ++++- easybuild/tools/class_dumper.py | 7 +++++- easybuild/tools/config.py | 6 ++++- easybuild/tools/filetools.py | 6 ++++- easybuild/tools/module_generator.py | 6 ++++- easybuild/tools/modules.py | 6 ++++- easybuild/tools/repository.py | 6 ++++- easybuild/tools/systemtools.py | 4 ++-- easybuild/tools/toolkit.py | 7 +++++- eb | 6 ++++- 80 files changed, 458 insertions(+), 139 deletions(-) diff --git a/easybuild/__init__.py b/easybuild/__init__.py index 6a08d0f4d0..16e323b723 100644 --- a/easybuild/__init__.py +++ b/easybuild/__init__.py @@ -1,5 +1,9 @@ ## -# Copyright 2009-2012 Stijn De Weirdt, Dries Verdegem, Kenneth Hoste, Pieter De Baets, Jens Timmerman +# Copyright 2009-2012 Stijn De Weirdt +# Copyright 2010 Dries Verdegem +# Copyright 2010-2012 Kenneth Hoste +# Copyright 2011 Pieter De Baets +# Copyright 2011-2012 Jens Timmerman # # This file is part of EasyBuild, # originally created by the HPC team of the University of Ghent (http://ugent.be/hpc). diff --git a/easybuild/build.py b/easybuild/build.py index 1ee222212a..9de39f01da 100644 --- a/easybuild/build.py +++ b/easybuild/build.py @@ -1,6 +1,11 @@ #!/usr/bin/env python ## -# Copyright 2009-2012 Stijn De Weirdt, Dries Verdegem, Kenneth Hoste, Pieter De Baets, Jens Timmerman, Toon Willems +# Copyright 2009-2012 Stijn De Weirdt +# Copyright 2010 Dries Verdegem +# Copyright 2010-2012 Kenneth Hoste +# Copyright 2011 Pieter De Baets +# Copyright 2011-2012 Jens Timmerman +# Copyright 2012 Toon Willems # # This file is part of EasyBuild, # originally created by the HPC team of the University of Ghent (http://ugent.be/hpc). diff --git a/easybuild/easyblocks/0/__init__.py b/easybuild/easyblocks/0/__init__.py index 975f868432..841038b2fa 100644 --- a/easybuild/easyblocks/0/__init__.py +++ b/easybuild/easyblocks/0/__init__.py @@ -1,5 +1,9 @@ ## -# Copyright 2009-2012 Stijn De Weirdt, Dries Verdegem, Kenneth Hoste, Pieter De Baets, Jens Timmerman +# Copyright 2009-2012 Stijn De Weirdt +# Copyright 2010 Dries Verdegem +# Copyright 2010-2012 Kenneth Hoste +# Copyright 2011 Pieter De Baets +# Copyright 2011-2012 Jens Timmerman # # This file is part of EasyBuild, # originally created by the HPC team of the University of Ghent (http://ugent.be/hpc). diff --git a/easybuild/easyblocks/__init__.py b/easybuild/easyblocks/__init__.py index d0858f2c74..71d40fecf2 100644 --- a/easybuild/easyblocks/__init__.py +++ b/easybuild/easyblocks/__init__.py @@ -1,5 +1,9 @@ ## -# Copyright 2009-2012 Stijn De Weirdt, Dries Verdegem, Kenneth Hoste, Pieter De Baets, Jens Timmerman +# Copyright 2009-2012 Stijn De Weirdt +# Copyright 2010 Dries Verdegem +# Copyright 2010-2012 Kenneth Hoste +# Copyright 2011 Pieter De Baets +# Copyright 2011-2012 Jens Timmerman # # This file is part of EasyBuild, # originally created by the HPC team of the University of Ghent (http://ugent.be/hpc). @@ -17,4 +21,4 @@ # # You should have received a copy of the GNU General Public License # along with EasyBuild. If not, see . -## \ No newline at end of file +## diff --git a/easybuild/easyblocks/a/__init__.py b/easybuild/easyblocks/a/__init__.py index 975f868432..841038b2fa 100644 --- a/easybuild/easyblocks/a/__init__.py +++ b/easybuild/easyblocks/a/__init__.py @@ -1,5 +1,9 @@ ## -# Copyright 2009-2012 Stijn De Weirdt, Dries Verdegem, Kenneth Hoste, Pieter De Baets, Jens Timmerman +# Copyright 2009-2012 Stijn De Weirdt +# Copyright 2010 Dries Verdegem +# Copyright 2010-2012 Kenneth Hoste +# Copyright 2011 Pieter De Baets +# Copyright 2011-2012 Jens Timmerman # # This file is part of EasyBuild, # originally created by the HPC team of the University of Ghent (http://ugent.be/hpc). diff --git a/easybuild/easyblocks/a/atlas.py b/easybuild/easyblocks/a/atlas.py index 11275daefd..55bdde6d30 100644 --- a/easybuild/easyblocks/a/atlas.py +++ b/easybuild/easyblocks/a/atlas.py @@ -1,5 +1,9 @@ ## -# Copyright 2009-2012 Stijn De Weirdt, Dries Verdegem, Kenneth Hoste, Pieter De Baets, Jens Timmerman +# Copyright 2009-2012 Stijn De Weirdt +# Copyright 2010 Dries Verdegem +# Copyright 2010-2012 Kenneth Hoste +# Copyright 2011 Pieter De Baets +# Copyright 2011-2012 Jens Timmerman # # This file is part of EasyBuild, # originally created by the HPC team of the University of Ghent (http://ugent.be/hpc). @@ -138,9 +142,9 @@ def make(self, verbose=False): def make_install(self): """Install step - + Default make install and optionally remove incomplete lapack libs. - If the full_lapack option was set to false we don't + If the full_lapack option was set to false we don't """ Application.make_install(self) if not self.getcfg('full_lapack'): diff --git a/easybuild/easyblocks/b/__init__.py b/easybuild/easyblocks/b/__init__.py index 975f868432..841038b2fa 100644 --- a/easybuild/easyblocks/b/__init__.py +++ b/easybuild/easyblocks/b/__init__.py @@ -1,5 +1,9 @@ ## -# Copyright 2009-2012 Stijn De Weirdt, Dries Verdegem, Kenneth Hoste, Pieter De Baets, Jens Timmerman +# Copyright 2009-2012 Stijn De Weirdt +# Copyright 2010 Dries Verdegem +# Copyright 2010-2012 Kenneth Hoste +# Copyright 2011 Pieter De Baets +# Copyright 2011-2012 Jens Timmerman # # This file is part of EasyBuild, # originally created by the HPC team of the University of Ghent (http://ugent.be/hpc). diff --git a/easybuild/easyblocks/b/binary.py b/easybuild/easyblocks/b/binary.py index a77fc74c88..70c3492888 100644 --- a/easybuild/easyblocks/b/binary.py +++ b/easybuild/easyblocks/b/binary.py @@ -1,5 +1,9 @@ ## -# Copyright 2009-2012 Stijn Deweirdt, Dries Verdegem, Kenneth Hoste, Pieter De Baets, Jens Timmerman +# Copyright 2009-2012 Stijn De Weirdt +# Copyright 2010 Dries Verdegem +# Copyright 2010-2012 Kenneth Hoste +# Copyright 2011 Pieter De Baets +# Copyright 2011-2012 Jens Timmerman # # This file is part of EasyBuild, # originally created by the HPC team of the University of Ghent (http://ugent.be/hpc). @@ -40,7 +44,7 @@ def make(self): pass def make_installdir(self): - """Do not actually create installdir, copytree in make_install doesn't + """Do not actually create installdir, copytree in make_install doesn't want the destination directory already exist But in python < 2.5 the actual path leading up to the directory has to exist.""" self.make_dir(self.installdir, clean=True, dontcreateinstalldir=True) diff --git a/easybuild/easyblocks/b/blacs.py b/easybuild/easyblocks/b/blacs.py index fbf308c3fb..cbc1d56f1a 100644 --- a/easybuild/easyblocks/b/blacs.py +++ b/easybuild/easyblocks/b/blacs.py @@ -1,5 +1,9 @@ ## -# Copyright 2009-2012 Stijn De Weirdt, Dries Verdegem, Kenneth Hoste, Pieter De Baets, Jens Timmerman +# Copyright 2009-2012 Stijn De Weirdt +# Copyright 2010 Dries Verdegem +# Copyright 2010-2012 Kenneth Hoste +# Copyright 2011 Pieter De Baets +# Copyright 2011-2012 Jens Timmerman # # This file is part of EasyBuild, # originally created by the HPC team of the University of Ghent (http://ugent.be/hpc). @@ -33,9 +37,9 @@ def det_interface(log, path): """Determine interface through xintface""" - + (out, _) = run_cmd(os.path.join(path,"xintface"), log_all=True, simple=False) - + intregexp = re.compile(".*INTFACE\s*=\s*-D(\S+)\s*") res = intregexp.search(out) if res: @@ -104,7 +108,7 @@ def make(self): cmd = "make" cmd += " CC='%(mpicc)s' F77='%(mpif77)s -I$(MPIINCdir)' MPIdir=%(base)s" \ " MPILIB='%(mpilib)s' BTOPdir=%(builddir)s INTERFACE=NONE" % opts - + # determine interface using xintface run_cmd("%s xintface" % cmd, log_all=True, simple=True) @@ -124,17 +128,17 @@ def make(self): if not notregexp.search(out): # if it doesn't say '_NOT_', set it comm = "TRANSCOMM='-DCSameF77'" - + else: (_, ec) = run_cmd("%s xtc_UseMpich" % cmd, log_all=False, log_ok=False, simple=False) if ec == 0: - + (out, _) = run_cmd("mpirun -np 2 ./EXE/xtc_UseMpich", log_all=True, simple=False) - + if not notregexp.search(out): - + commregexp = re.compile('Set TRANSCOMM\s*=\s*(.*)$') - + res = commregexp.search(out) if res: # found how to set TRANSCOMM, so set it @@ -188,11 +192,11 @@ def make_install(self): try: os.makedirs(dest) - + shutil.copy2(src, dest) - + self.log.debug("Copied %s to %s" % (src, dest)) - + except OSError, err: self.log.error("Copying %s to installation dir %s failed: %s" % (src, dest, err)) diff --git a/easybuild/easyblocks/c/__init__.py b/easybuild/easyblocks/c/__init__.py index 975f868432..841038b2fa 100644 --- a/easybuild/easyblocks/c/__init__.py +++ b/easybuild/easyblocks/c/__init__.py @@ -1,5 +1,9 @@ ## -# Copyright 2009-2012 Stijn De Weirdt, Dries Verdegem, Kenneth Hoste, Pieter De Baets, Jens Timmerman +# Copyright 2009-2012 Stijn De Weirdt +# Copyright 2010 Dries Verdegem +# Copyright 2010-2012 Kenneth Hoste +# Copyright 2011 Pieter De Baets +# Copyright 2011-2012 Jens Timmerman # # This file is part of EasyBuild, # originally created by the HPC team of the University of Ghent (http://ugent.be/hpc). diff --git a/easybuild/easyblocks/c/cp2k.py b/easybuild/easyblocks/c/cp2k.py index 6da5231982..2f331dd183 100644 --- a/easybuild/easyblocks/c/cp2k.py +++ b/easybuild/easyblocks/c/cp2k.py @@ -1,5 +1,9 @@ ## -# Copyright 2009-2012 Stijn De Weirdt, Dries Verdegem, Kenneth Hoste, Pieter De Baets, Jens Timmerman +# Copyright 2009-2012 Stijn De Weirdt +# Copyright 2010 Dries Verdegem +# Copyright 2010-2012 Kenneth Hoste +# Copyright 2011 Pieter De Baets +# Copyright 2011-2012 Jens Timmerman # # This file is part of EasyBuild, # originally created by the HPC team of the University of Ghent (http://ugent.be/hpc). @@ -51,7 +55,7 @@ def __init__(self, *args, **kwargs): self.cfg.update({'type':['popt',"Type of build ('popt' or 'psmp') (default: 'popt)"], 'typeopt':[True,"Enable optimization (default: True)"], 'libint':[True,"Use LibInt (default: True)"], - 'modincprefix':['',"IMKL prefix for modinc include dir (default: '')"], + 'modincprefix':['',"IMKL prefix for modinc include dir (default: '')"], 'modinc':[[],"List of modinc's to use (*.f90), or 'True' to use all found at given prefix (default: [])"], 'extracflags':['',"Extra CFLAGS to be added (default: '')"], 'extradflags':['',"Extra DFLAGS to be added (default: '')"], @@ -135,9 +139,9 @@ def configure(self): if os.getenv('SOFTROOTIMKL'): options = self.configureMKL(options) elif os.getenv('SOFTROOTACML'): - options = self.configureACML(options) + options = self.configureACML(options) elif os.getenv('SOFTROOTATLAS'): - options = self.configureATLAS(options) + options = self.configureATLAS(options) if os.getenv('SOFTROOTFFTW'): options = self.configureFFTW(options) @@ -154,7 +158,7 @@ def configure(self): options['LIBS'] = "-Wl,--start-group %s -Wl,--end-group" % options['LIBS'] # create arch file using options set - archfile = os.path.join(self.getcfg('startfrom'), 'arch', + archfile = os.path.join(self.getcfg('startfrom'), 'arch', '%s.%s' % (self.typearch, self.getcfg('type'))) try: txt = self._generateMakefile(options) @@ -194,7 +198,7 @@ def prepmodinc(self): else: self.log.error("prepmodinc: Please specify either a boolean value " \ - "or a list of files in modinc (found: %s)." % + "or a list of files in modinc (found: %s)." % self.getcfg("modinc")) f77 = os.getenv('F77') @@ -241,7 +245,7 @@ def configureCommon(self): mpi2 = True else: self.log.debug("MPI-2 supporting MPI library %s not loaded.") - + if not mpi2: self.log.error("CP2K needs MPI-2, no known MPI-2 supporting library loaded?") @@ -254,7 +258,7 @@ def configureCommon(self): 'AR': 'ar -r', 'CPPFLAGS': '', - + 'FPIC': self.fpic, 'DEBUG': self.debug, @@ -415,14 +419,14 @@ def configureMKL(self, options): 'INTEL_INC': '$(MKLROOT)/include', 'INTEL_INCF': '$(INTEL_INC)/fftw', }) - + options['DFLAGS'] += ' -D__FFTW3 -D__FFTMKL' extra = '' if self.modincpath: extra = '-I%s' % self.modincpath options['CFLAGS'] += ' -I$(INTEL_INC) -I$(INTEL_INCF) %s $(FPIC) $(DEBUG)' % extra - + options['LIBS'] += ' %s %s' % (self.libsmm, os.getenv('LIBSCALAPACK')) return options @@ -638,8 +642,8 @@ def make_install(self): if os.path.isfile(exefile): shutil.copy2(exefile, targetdir) except OSError, err: - self.log.error("Copying executables from %s to bin dir %s failed: %s" % (exedir, - targetdir, + self.log.error("Copying executables from %s to bin dir %s failed: %s" % (exedir, + targetdir, err) ) # copy tests @@ -679,4 +683,4 @@ def sanitycheck(self): self.log.info("Customized sanity check paths: %s" % self.getcfg('sanityCheckPaths')) - Application.sanitycheck(self) \ No newline at end of file + Application.sanitycheck(self) diff --git a/easybuild/easyblocks/d/__init__.py b/easybuild/easyblocks/d/__init__.py index 975f868432..841038b2fa 100644 --- a/easybuild/easyblocks/d/__init__.py +++ b/easybuild/easyblocks/d/__init__.py @@ -1,5 +1,9 @@ ## -# Copyright 2009-2012 Stijn De Weirdt, Dries Verdegem, Kenneth Hoste, Pieter De Baets, Jens Timmerman +# Copyright 2009-2012 Stijn De Weirdt +# Copyright 2010 Dries Verdegem +# Copyright 2010-2012 Kenneth Hoste +# Copyright 2011 Pieter De Baets +# Copyright 2011-2012 Jens Timmerman # # This file is part of EasyBuild, # originally created by the HPC team of the University of Ghent (http://ugent.be/hpc). diff --git a/easybuild/easyblocks/d/doxygen.py b/easybuild/easyblocks/d/doxygen.py index 9981617ae7..34548d8ff8 100644 --- a/easybuild/easyblocks/d/doxygen.py +++ b/easybuild/easyblocks/d/doxygen.py @@ -1,5 +1,9 @@ ## -# Copyright 2009-2012 Stijn De Weirdt, Dries Verdegem, Kenneth Hoste, Pieter De Baets, Jens Timmerman +# Copyright 2009-2012 Stijn De Weirdt +# Copyright 2010 Dries Verdegem +# Copyright 2010-2012 Kenneth Hoste +# Copyright 2011 Pieter De Baets +# Copyright 2011-2012 Jens Timmerman # # This file is part of EasyBuild, # originally created by the HPC team of the University of Ghent (http://ugent.be/hpc). @@ -48,4 +52,4 @@ def sanitycheck(self): self.log.info("Customized sanity check paths: %s"%self.getcfg('sanityCheckPaths')) - Application.sanitycheck(self) \ No newline at end of file + Application.sanitycheck(self) diff --git a/easybuild/easyblocks/e/__init__.py b/easybuild/easyblocks/e/__init__.py index 975f868432..841038b2fa 100644 --- a/easybuild/easyblocks/e/__init__.py +++ b/easybuild/easyblocks/e/__init__.py @@ -1,5 +1,9 @@ ## -# Copyright 2009-2012 Stijn De Weirdt, Dries Verdegem, Kenneth Hoste, Pieter De Baets, Jens Timmerman +# Copyright 2009-2012 Stijn De Weirdt +# Copyright 2010 Dries Verdegem +# Copyright 2010-2012 Kenneth Hoste +# Copyright 2011 Pieter De Baets +# Copyright 2011-2012 Jens Timmerman # # This file is part of EasyBuild, # originally created by the HPC team of the University of Ghent (http://ugent.be/hpc). diff --git a/easybuild/easyblocks/f/__init__.py b/easybuild/easyblocks/f/__init__.py index 975f868432..841038b2fa 100644 --- a/easybuild/easyblocks/f/__init__.py +++ b/easybuild/easyblocks/f/__init__.py @@ -1,5 +1,9 @@ ## -# Copyright 2009-2012 Stijn De Weirdt, Dries Verdegem, Kenneth Hoste, Pieter De Baets, Jens Timmerman +# Copyright 2009-2012 Stijn De Weirdt +# Copyright 2010 Dries Verdegem +# Copyright 2010-2012 Kenneth Hoste +# Copyright 2011 Pieter De Baets +# Copyright 2011-2012 Jens Timmerman # # This file is part of EasyBuild, # originally created by the HPC team of the University of Ghent (http://ugent.be/hpc). diff --git a/easybuild/easyblocks/g/__init__.py b/easybuild/easyblocks/g/__init__.py index 975f868432..841038b2fa 100644 --- a/easybuild/easyblocks/g/__init__.py +++ b/easybuild/easyblocks/g/__init__.py @@ -1,5 +1,9 @@ ## -# Copyright 2009-2012 Stijn De Weirdt, Dries Verdegem, Kenneth Hoste, Pieter De Baets, Jens Timmerman +# Copyright 2009-2012 Stijn De Weirdt +# Copyright 2010 Dries Verdegem +# Copyright 2010-2012 Kenneth Hoste +# Copyright 2011 Pieter De Baets +# Copyright 2011-2012 Jens Timmerman # # This file is part of EasyBuild, # originally created by the HPC team of the University of Ghent (http://ugent.be/hpc). diff --git a/easybuild/easyblocks/g/g2clib.py b/easybuild/easyblocks/g/g2clib.py index cee19fd754..af3b1ecad0 100644 --- a/easybuild/easyblocks/g/g2clib.py +++ b/easybuild/easyblocks/g/g2clib.py @@ -1,5 +1,9 @@ ## -# Copyright 2009-2012 Stijn De Weirdt, Dries Verdegem, Kenneth Hoste, Pieter De Baets, Jens Timmerman +# Copyright 2009-2012 Stijn De Weirdt +# Copyright 2010 Dries Verdegem +# Copyright 2010-2012 Kenneth Hoste +# Copyright 2011 Pieter De Baets +# Copyright 2011-2012 Jens Timmerman # # This file is part of EasyBuild, # originally created by the HPC team of the University of Ghent (http://ugent.be/hpc). diff --git a/easybuild/easyblocks/g/g2lib.py b/easybuild/easyblocks/g/g2lib.py index 290833fc6d..0c4456585e 100644 --- a/easybuild/easyblocks/g/g2lib.py +++ b/easybuild/easyblocks/g/g2lib.py @@ -1,5 +1,9 @@ ## -# Copyright 2009-2012 Stijn De Weirdt, Dries Verdegem, Kenneth Hoste, Pieter De Baets, Jens Timmerman +# Copyright 2009-2012 Stijn De Weirdt +# Copyright 2010 Dries Verdegem +# Copyright 2010-2012 Kenneth Hoste +# Copyright 2011 Pieter De Baets +# Copyright 2011-2012 Jens Timmerman # # This file is part of EasyBuild, # originally created by the HPC team of the University of Ghent (http://ugent.be/hpc). diff --git a/easybuild/easyblocks/g/gcc.py b/easybuild/easyblocks/g/gcc.py index 58c6bea9f0..284eb9d97a 100644 --- a/easybuild/easyblocks/g/gcc.py +++ b/easybuild/easyblocks/g/gcc.py @@ -1,5 +1,10 @@ ## -# Copyright 2009-2012 Stijn De weirdt, Dries Verdegem, Kenneth Hoste, Pieter De Baets, Jens Timmerman, Toon Willems +# Copyright 2009-2012 Stijn De Weirdt +# Copyright 2010 Dries Verdegem +# Copyright 2010-2012 Kenneth Hoste +# Copyright 2011 Pieter De Baets +# Copyright 2011-2012 Jens Timmerman +# Copyright 2012 Toon Willems # # This file is part of EasyBuild, # originally created by the HPC team of the University of Ghent (http://ugent.be/hpc). diff --git a/easybuild/easyblocks/h/__init__.py b/easybuild/easyblocks/h/__init__.py index 975f868432..841038b2fa 100644 --- a/easybuild/easyblocks/h/__init__.py +++ b/easybuild/easyblocks/h/__init__.py @@ -1,5 +1,9 @@ ## -# Copyright 2009-2012 Stijn De Weirdt, Dries Verdegem, Kenneth Hoste, Pieter De Baets, Jens Timmerman +# Copyright 2009-2012 Stijn De Weirdt +# Copyright 2010 Dries Verdegem +# Copyright 2010-2012 Kenneth Hoste +# Copyright 2011 Pieter De Baets +# Copyright 2011-2012 Jens Timmerman # # This file is part of EasyBuild, # originally created by the HPC team of the University of Ghent (http://ugent.be/hpc). diff --git a/easybuild/easyblocks/h/hdf5.py b/easybuild/easyblocks/h/hdf5.py index 2f88c188fc..aaa68e389a 100644 --- a/easybuild/easyblocks/h/hdf5.py +++ b/easybuild/easyblocks/h/hdf5.py @@ -1,5 +1,9 @@ ## -# Copyright 2009-2012 Stijn De Weirdt, Dries Verdegem, Kenneth Hoste, Pieter De Baets, Jens Timmerman +# Copyright 2009-2012 Stijn De Weirdt +# Copyright 2010 Dries Verdegem +# Copyright 2010-2012 Kenneth Hoste +# Copyright 2011 Pieter De Baets +# Copyright 2011-2012 Jens Timmerman # # This file is part of EasyBuild, # originally created by the HPC team of the University of Ghent (http://ugent.be/hpc). @@ -84,4 +88,4 @@ def sanitycheck(self): self.log.info("Customized sanity check paths: %s"%self.getcfg('sanityCheckPaths')) - Application.sanitycheck(self) \ No newline at end of file + Application.sanitycheck(self) diff --git a/easybuild/easyblocks/h/hpl.py b/easybuild/easyblocks/h/hpl.py index f8e63238ca..13ac61a786 100644 --- a/easybuild/easyblocks/h/hpl.py +++ b/easybuild/easyblocks/h/hpl.py @@ -1,5 +1,9 @@ ## -# Copyright 2009-2012 Stijn De Weirdt, Dries Verdegem, Kenneth Hoste, Pieter De Baets, Jens Timmerman +# Copyright 2009-2012 Stijn De Weirdt +# Copyright 2010 Dries Verdegem +# Copyright 2010-2012 Kenneth Hoste +# Copyright 2011 Pieter De Baets +# Copyright 2011-2012 Jens Timmerman # # This file is part of EasyBuild, # originally created by the HPC team of the University of Ghent (http://ugent.be/hpc). @@ -33,7 +37,7 @@ class HPL(Application): """ Support for building HPL (High Performance Linpack) - create Make.UNKNOWN - - build with make and install + - build with make and install """ def configure(self, subdir=None): @@ -126,4 +130,4 @@ def sanitycheck(self): self.log.info("Customized sanity check paths: %s"%self.getcfg('sanityCheckPaths')) - Application.sanitycheck(self) \ No newline at end of file + Application.sanitycheck(self) diff --git a/easybuild/easyblocks/i/__init__.py b/easybuild/easyblocks/i/__init__.py index 975f868432..841038b2fa 100644 --- a/easybuild/easyblocks/i/__init__.py +++ b/easybuild/easyblocks/i/__init__.py @@ -1,5 +1,9 @@ ## -# Copyright 2009-2012 Stijn De Weirdt, Dries Verdegem, Kenneth Hoste, Pieter De Baets, Jens Timmerman +# Copyright 2009-2012 Stijn De Weirdt +# Copyright 2010 Dries Verdegem +# Copyright 2010-2012 Kenneth Hoste +# Copyright 2011 Pieter De Baets +# Copyright 2011-2012 Jens Timmerman # # This file is part of EasyBuild, # originally created by the HPC team of the University of Ghent (http://ugent.be/hpc). diff --git a/easybuild/easyblocks/i/icc.py b/easybuild/easyblocks/i/icc.py index cdf7280a29..3af529bfab 100644 --- a/easybuild/easyblocks/i/icc.py +++ b/easybuild/easyblocks/i/icc.py @@ -1,5 +1,9 @@ ## -# Copyright 2009-2012 Stijn De Weirdt, Dries Verdegem, Kenneth Hoste, Pieter De Baets, Jens Timmerman +# Copyright 2009-2012 Stijn De Weirdt +# Copyright 2010 Dries Verdegem +# Copyright 2010-2012 Kenneth Hoste +# Copyright 2011 Pieter De Baets +# Copyright 2011-2012 Jens Timmerman # # This file is part of EasyBuild, # originally created by the HPC team of the University of Ghent (http://ugent.be/hpc). diff --git a/easybuild/easyblocks/i/ifort.py b/easybuild/easyblocks/i/ifort.py index 1d2f7172b7..8553e82539 100644 --- a/easybuild/easyblocks/i/ifort.py +++ b/easybuild/easyblocks/i/ifort.py @@ -1,5 +1,9 @@ ## -# Copyright 2009-2012 Stijn De Weirdt, Dries Verdegem, Kenneth Hoste, Pieter De Baets, Jens Timmerman +# Copyright 2009-2012 Stijn De Weirdt +# Copyright 2010 Dries Verdegem +# Copyright 2010-2012 Kenneth Hoste +# Copyright 2011 Pieter De Baets +# Copyright 2011-2012 Jens Timmerman # # This file is part of EasyBuild, # originally created by the HPC team of the University of Ghent (http://ugent.be/hpc). @@ -51,4 +55,4 @@ def sanitycheck(self): self.log.info("Customized sanity check paths: %s" % self.getcfg('sanityCheckPaths')) - IntelBase.sanitycheck(self) \ No newline at end of file + IntelBase.sanitycheck(self) diff --git a/easybuild/easyblocks/i/imkl.py b/easybuild/easyblocks/i/imkl.py index a0193bf7d8..52e884ca7a 100644 --- a/easybuild/easyblocks/i/imkl.py +++ b/easybuild/easyblocks/i/imkl.py @@ -1,5 +1,9 @@ ## -# Copyright 2009-2012 Stijn De Weirdt, Dries Verdegem, Kenneth Hoste, Pieter De Baets, Jens Timmerman +# Copyright 2009-2012 Stijn De Weirdt +# Copyright 2010 Dries Verdegem +# Copyright 2010-2012 Kenneth Hoste +# Copyright 2011 Pieter De Baets +# Copyright 2011-2012 Jens Timmerman # # This file is part of EasyBuild, # originally created by the HPC team of the University of Ghent (http://ugent.be/hpc). diff --git a/easybuild/easyblocks/i/impi.py b/easybuild/easyblocks/i/impi.py index 760ffab34a..8c6ae8ab68 100644 --- a/easybuild/easyblocks/i/impi.py +++ b/easybuild/easyblocks/i/impi.py @@ -1,5 +1,9 @@ ## -# Copyright 2009-2012 Stijn De Weirdt, Dries Verdegem, Kenneth Hoste, Pieter De Baets, Jens Timmerman +# Copyright 2009-2012 Stijn De Weirdt +# Copyright 2010 Dries Verdegem +# Copyright 2010-2012 Kenneth Hoste +# Copyright 2011 Pieter De Baets +# Copyright 2011-2012 Jens Timmerman # # This file is part of EasyBuild, # originally created by the HPC team of the University of Ghent (http://ugent.be/hpc). @@ -108,4 +112,4 @@ def make_module_extra(self): txt += "prepend-path\t%s\t\t%s\n" % ('INTEL_LICENSE_FILE', self.license) txt += "setenv\t%s\t\t$root\n" % ('I_MPI_ROOT') - return txt \ No newline at end of file + return txt diff --git a/easybuild/easyblocks/i/intelbase.py b/easybuild/easyblocks/i/intelbase.py index a60e8f3065..969f5ca2da 100644 --- a/easybuild/easyblocks/i/intelbase.py +++ b/easybuild/easyblocks/i/intelbase.py @@ -1,5 +1,9 @@ ## -# Copyright 2009-2012 Stijn De Weirdt, Dries Verdegem, Kenneth Hoste, Pieter De Baets, Jens Timmerman +# Copyright 2009-2012 Stijn De Weirdt +# Copyright 2010 Dries Verdegem +# Copyright 2010-2012 Kenneth Hoste +# Copyright 2011 Pieter De Baets +# Copyright 2011-2012 Jens Timmerman # # This file is part of EasyBuild, # originally created by the HPC team of the University of Ghent (http://ugent.be/hpc). diff --git a/easybuild/easyblocks/i/ipp.py b/easybuild/easyblocks/i/ipp.py index 84dd925196..0b0b590204 100644 --- a/easybuild/easyblocks/i/ipp.py +++ b/easybuild/easyblocks/i/ipp.py @@ -1,5 +1,9 @@ ## -# Copyright 2009-2012 Stijn De Weirdt, Dries Verdegem, Kenneth Hoste, Pieter De Baets, Jens Timmerman +# Copyright 2009-2012 Stijn De Weirdt +# Copyright 2010 Dries Verdegem +# Copyright 2010-2012 Kenneth Hoste +# Copyright 2011 Pieter De Baets +# Copyright 2011-2012 Jens Timmerman # # This file is part of EasyBuild, # originally created by the HPC team of the University of Ghent (http://ugent.be/hpc). @@ -39,4 +43,4 @@ def sanitycheck(self): self.log.info("Customized sanity check paths: %s" % self.getcfg('sanityCheckPaths')) - IntelBase.sanitycheck(self) \ No newline at end of file + IntelBase.sanitycheck(self) diff --git a/easybuild/easyblocks/i/itac.py b/easybuild/easyblocks/i/itac.py index a6d9a4bbd4..55b2a1a86b 100644 --- a/easybuild/easyblocks/i/itac.py +++ b/easybuild/easyblocks/i/itac.py @@ -1,5 +1,9 @@ ## -# Copyright 2009-2012 Stijn De Weirdt, Dries Verdegem, Kenneth Hoste, Pieter De Baets, Jens Timmerman +# Copyright 2009-2012 Stijn De Weirdt +# Copyright 2010 Dries Verdegem +# Copyright 2010-2012 Kenneth Hoste +# Copyright 2011 Pieter De Baets +# Copyright 2011-2012 Jens Timmerman # # This file is part of EasyBuild, # originally created by the HPC team of the University of Ghent (http://ugent.be/hpc). @@ -86,7 +90,7 @@ def make_module_req_guess(self): 'VT_LIB_DIR':['itac/lib_%s' % self.getcfg('preferredmpi')], 'VT_SLIB_DIR':['itac/lib_s%s' % self.getcfg('preferredmpi')] } - + if self.getcfg('m32'): guesses.update({ 'PATH':['bin', 'bin/ia32', 'ia32/bin'], @@ -107,4 +111,4 @@ def make_module_extra(self): txt += "setenv\t%s\t\t%s\n" % ('VT_MPI', self.getcfg('preferredmpi')) txt += "setenv\t%s\t\t%s\n" % ('VT_ADD_LIBS', '"-ldwarf -lelf -lvtunwind -lnsl -lm -ldl -lpthread"') - return txt \ No newline at end of file + return txt diff --git a/easybuild/easyblocks/j/__init__.py b/easybuild/easyblocks/j/__init__.py index 975f868432..841038b2fa 100644 --- a/easybuild/easyblocks/j/__init__.py +++ b/easybuild/easyblocks/j/__init__.py @@ -1,5 +1,9 @@ ## -# Copyright 2009-2012 Stijn De Weirdt, Dries Verdegem, Kenneth Hoste, Pieter De Baets, Jens Timmerman +# Copyright 2009-2012 Stijn De Weirdt +# Copyright 2010 Dries Verdegem +# Copyright 2010-2012 Kenneth Hoste +# Copyright 2011 Pieter De Baets +# Copyright 2011-2012 Jens Timmerman # # This file is part of EasyBuild, # originally created by the HPC team of the University of Ghent (http://ugent.be/hpc). diff --git a/easybuild/easyblocks/k/__init__.py b/easybuild/easyblocks/k/__init__.py index 975f868432..841038b2fa 100644 --- a/easybuild/easyblocks/k/__init__.py +++ b/easybuild/easyblocks/k/__init__.py @@ -1,5 +1,9 @@ ## -# Copyright 2009-2012 Stijn De Weirdt, Dries Verdegem, Kenneth Hoste, Pieter De Baets, Jens Timmerman +# Copyright 2009-2012 Stijn De Weirdt +# Copyright 2010 Dries Verdegem +# Copyright 2010-2012 Kenneth Hoste +# Copyright 2011 Pieter De Baets +# Copyright 2011-2012 Jens Timmerman # # This file is part of EasyBuild, # originally created by the HPC team of the University of Ghent (http://ugent.be/hpc). diff --git a/easybuild/easyblocks/l/__init__.py b/easybuild/easyblocks/l/__init__.py index 975f868432..841038b2fa 100644 --- a/easybuild/easyblocks/l/__init__.py +++ b/easybuild/easyblocks/l/__init__.py @@ -1,5 +1,9 @@ ## -# Copyright 2009-2012 Stijn De Weirdt, Dries Verdegem, Kenneth Hoste, Pieter De Baets, Jens Timmerman +# Copyright 2009-2012 Stijn De Weirdt +# Copyright 2010 Dries Verdegem +# Copyright 2010-2012 Kenneth Hoste +# Copyright 2011 Pieter De Baets +# Copyright 2011-2012 Jens Timmerman # # This file is part of EasyBuild, # originally created by the HPC team of the University of Ghent (http://ugent.be/hpc). diff --git a/easybuild/easyblocks/l/lapack.py b/easybuild/easyblocks/l/lapack.py index 6a3eabde89..dd5c05db91 100644 --- a/easybuild/easyblocks/l/lapack.py +++ b/easybuild/easyblocks/l/lapack.py @@ -1,5 +1,9 @@ ## -# Copyright 2009-2012 Stijn De Weirdt, Dries Verdegem, Kenneth Hoste, Pieter De Baets, Jens Timmerman +# Copyright 2009-2012 Stijn De Weirdt +# Copyright 2010 Dries Verdegem +# Copyright 2010-2012 Kenneth Hoste +# Copyright 2011 Pieter De Baets +# Copyright 2011-2012 Jens Timmerman # # This file is part of EasyBuild, # originally created by the HPC team of the University of Ghent (http://ugent.be/hpc). diff --git a/easybuild/easyblocks/l/libsmm.py b/easybuild/easyblocks/l/libsmm.py index 47c4f3a344..74b97a4d92 100644 --- a/easybuild/easyblocks/l/libsmm.py +++ b/easybuild/easyblocks/l/libsmm.py @@ -1,5 +1,9 @@ ## -# Copyright 2009-2012 Stijn De Weirdt, Dries Verdegem, Kenneth Hoste, Pieter De Baets, Jens Timmerman +# Copyright 2009-2012 Stijn De Weirdt +# Copyright 2010 Dries Verdegem +# Copyright 2010-2012 Kenneth Hoste +# Copyright 2011 Pieter De Baets +# Copyright 2011-2012 Jens Timmerman # # This file is part of EasyBuild, # originally created by the HPC team of the University of Ghent (http://ugent.be/hpc). @@ -112,7 +116,7 @@ def make(self): # tiny dimensions are used as primitves and generated in an 'exhaustive' search. # They should be a sequence from 1 to N, -# where N is a number that is large enough to have good in cache performance +# where N is a number that is large enough to have good in cache performance # (e.g. for modern SSE cpus 8 to 12) # Too large (>12?) is not beneficial, but increases the time needed to build the library # Too small (<8) will lead to a slow library, but the build might proceed quickly @@ -120,7 +124,7 @@ def make(self): # dims_tiny="%(tiny_dims)s" -# host compiler... this is used only to compile a few tools needed to build the library. +# host compiler... this is used only to compile a few tools needed to build the library. # The library itself is not compiled this way. # This compiler needs to be able to deal with some Fortran2003 constructs. # @@ -158,7 +162,7 @@ def make(self): blas_found = True else: self.log.info("BLAS library %s not found" % blas_lib) - + if not blas_found: self.log.error('No known BLAS library found!') @@ -175,7 +179,7 @@ def make(self): } # configure for various iterations - datatypes = [(1, 'double precision real'), + datatypes = [(1, 'double precision real'), (3, 'double precision complex') ] for (dt, descr) in datatypes: @@ -212,4 +216,4 @@ def sanitycheck(self): self.log.info("Customized sanity check paths: %s" % self.getcfg('sanityCheckPaths')) - Application.sanitycheck(self) \ No newline at end of file + Application.sanitycheck(self) diff --git a/easybuild/easyblocks/m/__init__.py b/easybuild/easyblocks/m/__init__.py index 975f868432..841038b2fa 100644 --- a/easybuild/easyblocks/m/__init__.py +++ b/easybuild/easyblocks/m/__init__.py @@ -1,5 +1,9 @@ ## -# Copyright 2009-2012 Stijn De Weirdt, Dries Verdegem, Kenneth Hoste, Pieter De Baets, Jens Timmerman +# Copyright 2009-2012 Stijn De Weirdt +# Copyright 2010 Dries Verdegem +# Copyright 2010-2012 Kenneth Hoste +# Copyright 2011 Pieter De Baets +# Copyright 2011-2012 Jens Timmerman # # This file is part of EasyBuild, # originally created by the HPC team of the University of Ghent (http://ugent.be/hpc). diff --git a/easybuild/easyblocks/m/maple.py b/easybuild/easyblocks/m/maple.py index 151fdabd53..fe4f68fdb9 100644 --- a/easybuild/easyblocks/m/maple.py +++ b/easybuild/easyblocks/m/maple.py @@ -1,5 +1,9 @@ ## -# Copyright 2009-2012 Stijn Deweirdt, Dries Verdegem, Kenneth Hoste, Pieter De Baets, Jens Timmerman +# Copyright 2009-2012 Stijn De Weirdt +# Copyright 2010 Dries Verdegem +# Copyright 2010-2012 Kenneth Hoste +# Copyright 2011 Pieter De Baets +# Copyright 2011-2012 Jens Timmerman # # This file is part of EasyBuild, # originally created by the HPC team of the University of Ghent (http://ugent.be/hpc). diff --git a/easybuild/easyblocks/m/mrbayes.py b/easybuild/easyblocks/m/mrbayes.py index b1341fbee6..4cb2ae009b 100644 --- a/easybuild/easyblocks/m/mrbayes.py +++ b/easybuild/easyblocks/m/mrbayes.py @@ -1,6 +1,10 @@ ## -# Copyright 2009-2012 Stijn De Weirdt, Dries Verdegem, Kenneth Hoste, Pieter De -# Baets, Jens Timmerman, Andy Georges +# Copyright 2009-2012 Stijn De Weirdt +# Copyright 2010 Dries Verdegem +# Copyright 2010-2012 Kenneth Hoste +# Copyright 2011 Pieter De Baets +# Copyright 2011-2012 Jens Timmerman +# Copyright 2012 Andy Georges # # This file is part of EasyBuild, # originally created by the HPC team of the University of Ghent (http://ugent.be/hpc). diff --git a/easybuild/easyblocks/m/mvapich2.py b/easybuild/easyblocks/m/mvapich2.py index 68a1d0baf1..c64b4d7e8e 100644 --- a/easybuild/easyblocks/m/mvapich2.py +++ b/easybuild/easyblocks/m/mvapich2.py @@ -1,5 +1,9 @@ ## -# Copyright 2009-2012 Stijn De Weirdt, Dries Verdegem, Kenneth Hoste, Pieter De Baets, Jens Timmerman +# Copyright 2009-2012 Stijn De Weirdt +# Copyright 2010 Dries Verdegem +# Copyright 2010-2012 Kenneth Hoste +# Copyright 2011 Pieter De Baets +# Copyright 2011-2012 Jens Timmerman # # This file is part of EasyBuild, # originally created by the HPC team of the University of Ghent (http://ugent.be/hpc). diff --git a/easybuild/easyblocks/n/__init__.py b/easybuild/easyblocks/n/__init__.py index 975f868432..841038b2fa 100644 --- a/easybuild/easyblocks/n/__init__.py +++ b/easybuild/easyblocks/n/__init__.py @@ -1,5 +1,9 @@ ## -# Copyright 2009-2012 Stijn De Weirdt, Dries Verdegem, Kenneth Hoste, Pieter De Baets, Jens Timmerman +# Copyright 2009-2012 Stijn De Weirdt +# Copyright 2010 Dries Verdegem +# Copyright 2010-2012 Kenneth Hoste +# Copyright 2011 Pieter De Baets +# Copyright 2011-2012 Jens Timmerman # # This file is part of EasyBuild, # originally created by the HPC team of the University of Ghent (http://ugent.be/hpc). diff --git a/easybuild/easyblocks/n/ncl.py b/easybuild/easyblocks/n/ncl.py index cbb8b9fe1b..14f7cbbe6e 100644 --- a/easybuild/easyblocks/n/ncl.py +++ b/easybuild/easyblocks/n/ncl.py @@ -1,5 +1,9 @@ ## -# Copyright 2009-2012 Stijn De Weirdt, Dries Verdegem, Kenneth Hoste, Pieter De Baets, Jens Timmerman +# Copyright 2009-2012 Stijn De Weirdt +# Copyright 2010 Dries Verdegem +# Copyright 2010-2012 Kenneth Hoste +# Copyright 2011 Pieter De Baets +# Copyright 2011-2012 Jens Timmerman # # This file is part of EasyBuild, # originally created by the HPC team of the University of Ghent (http://ugent.be/hpc). @@ -37,12 +41,12 @@ class NCL(Application): """Support for building/installing NCL.""" def configure(self): - """Configure build: + """Configure build: - create Makefile.ini using make and run ymake script to create config file - patch config file with correct settings, and add missing config entries - create config/Site.local file to avoid interactive install - generate Makefile using config/ymkmf sciprt - - + - """ try: @@ -109,7 +113,7 @@ def configure(self): except OSError, err: self.log.error("Failed to change to the build dir %s: %s" % (self.getcfg('startfrom'), err)) - # instead of running the Configure script that asks a zillion questions, + # instead of running the Configure script that asks a zillion questions, # let's just generate the config/Site.local file ourselves... # order of deps is important diff --git a/easybuild/easyblocks/n/netcdf.py b/easybuild/easyblocks/n/netcdf.py index 4a3e15d65a..92151f1e07 100644 --- a/easybuild/easyblocks/n/netcdf.py +++ b/easybuild/easyblocks/n/netcdf.py @@ -1,5 +1,9 @@ ## -# Copyright 2009-2012 Stijn De Weirdt, Dries Verdegem, Kenneth Hoste, Pieter De Baets, Jens Timmerman +# Copyright 2009-2012 Stijn De Weirdt +# Copyright 2010 Dries Verdegem +# Copyright 2010-2012 Kenneth Hoste +# Copyright 2011 Pieter De Baets +# Copyright 2011-2012 Jens Timmerman # # This file is part of EasyBuild, # originally created by the HPC team of the University of Ghent (http://ugent.be/hpc). diff --git a/easybuild/easyblocks/n/netcdf_fortran.py b/easybuild/easyblocks/n/netcdf_fortran.py index 4913421bf3..093b897825 100644 --- a/easybuild/easyblocks/n/netcdf_fortran.py +++ b/easybuild/easyblocks/n/netcdf_fortran.py @@ -1,5 +1,9 @@ ## -# Copyright 2009-2012 Stijn De Weirdt, Dries Verdegem, Kenneth Hoste, Pieter De Baets, Jens Timmerman +# Copyright 2009-2012 Stijn De Weirdt +# Copyright 2010 Dries Verdegem +# Copyright 2010-2012 Kenneth Hoste +# Copyright 2011 Pieter De Baets +# Copyright 2011-2012 Jens Timmerman # # This file is part of EasyBuild, # originally created by the HPC team of the University of Ghent (http://ugent.be/hpc). diff --git a/easybuild/easyblocks/o/__init__.py b/easybuild/easyblocks/o/__init__.py index 975f868432..841038b2fa 100644 --- a/easybuild/easyblocks/o/__init__.py +++ b/easybuild/easyblocks/o/__init__.py @@ -1,5 +1,9 @@ ## -# Copyright 2009-2012 Stijn De Weirdt, Dries Verdegem, Kenneth Hoste, Pieter De Baets, Jens Timmerman +# Copyright 2009-2012 Stijn De Weirdt +# Copyright 2010 Dries Verdegem +# Copyright 2010-2012 Kenneth Hoste +# Copyright 2011 Pieter De Baets +# Copyright 2011-2012 Jens Timmerman # # This file is part of EasyBuild, # originally created by the HPC team of the University of Ghent (http://ugent.be/hpc). diff --git a/easybuild/easyblocks/o/openfoam.py b/easybuild/easyblocks/o/openfoam.py index 8054791059..bb34cfbec5 100644 --- a/easybuild/easyblocks/o/openfoam.py +++ b/easybuild/easyblocks/o/openfoam.py @@ -1,5 +1,9 @@ ## -# Copyright 2009-2012 Stijn De Weirdt, Dries Verdegem, Kenneth Hoste, Pieter De Baets, Jens Timmerman +# Copyright 2009-2012 Stijn De Weirdt +# Copyright 2010 Dries Verdegem +# Copyright 2010-2012 Kenneth Hoste +# Copyright 2011 Pieter De Baets +# Copyright 2011-2012 Jens Timmerman # # This file is part of EasyBuild, # originally created by the HPC team of the University of Ghent (http://ugent.be/hpc). diff --git a/easybuild/easyblocks/p/__init__.py b/easybuild/easyblocks/p/__init__.py index 38d3a4e40a..5259a3a6e1 100644 --- a/easybuild/easyblocks/p/__init__.py +++ b/easybuild/easyblocks/p/__init__.py @@ -1,5 +1,9 @@ ## -# Copyright 2009-2012 Stijn De Weirdt, Dries Verdegem, Kenneth Hoste, Pieter De Baets, Jens Timmerman +# Copyright 2009-2012 Stijn De Weirdt +# Copyright 2010 Dries Verdegem +# Copyright 2010-2012 Kenneth Hoste +# Copyright 2011 Pieter De Baets +# Copyright 2011-2012 Jens Timmerman # # This file is part of EasyBuild, # originally created by the HPC team of the University of Ghent (http://ugent.be/hpc). diff --git a/easybuild/easyblocks/p/python.py b/easybuild/easyblocks/p/python.py index 5525164a55..c207b4223a 100644 --- a/easybuild/easyblocks/p/python.py +++ b/easybuild/easyblocks/p/python.py @@ -1,5 +1,9 @@ ## -# Copyright 2009-2012 Stijn De Weirdt, Dries Verdegem, Kenneth Hoste, Pieter De Baets, Jens Timmerman +# Copyright 2009-2012 Stijn De Weirdt +# Copyright 2010 Dries Verdegem +# Copyright 2010-2012 Kenneth Hoste +# Copyright 2011 Pieter De Baets +# Copyright 2011-2012 Jens Timmerman # # This file is part of EasyBuild, # originally created by the HPC team of the University of Ghent (http://ugent.be/hpc). @@ -37,7 +41,7 @@ class Python(Application): To extend Python by adding extra packages there are two ways: - list the packages in the pkglist, this will include the packages in this Python easyblock - create a seperate easyblock, so the packages can be loaded with module load - + e.g., you can include numpy and scipy in a default Python installation but also provide newer updated numpy and scipy versions by creating a PythonPackageModule for it. """ @@ -259,7 +263,7 @@ def __init__(self, mself, pkg, pkginstalldeps): self.log.error("Could not detect math kernel (mkl, atlas)") if "SOFTROOTIMKL" in os.environ or "SOFTROOTFFTW" in os.environ: - extrasiteconfig += """ + extrasiteconfig += """ [fftw] libraries = %s """ % os.getenv("LIBFFT") diff --git a/easybuild/easyblocks/q/__init__.py b/easybuild/easyblocks/q/__init__.py index 975f868432..841038b2fa 100644 --- a/easybuild/easyblocks/q/__init__.py +++ b/easybuild/easyblocks/q/__init__.py @@ -1,5 +1,9 @@ ## -# Copyright 2009-2012 Stijn De Weirdt, Dries Verdegem, Kenneth Hoste, Pieter De Baets, Jens Timmerman +# Copyright 2009-2012 Stijn De Weirdt +# Copyright 2010 Dries Verdegem +# Copyright 2010-2012 Kenneth Hoste +# Copyright 2011 Pieter De Baets +# Copyright 2011-2012 Jens Timmerman # # This file is part of EasyBuild, # originally created by the HPC team of the University of Ghent (http://ugent.be/hpc). diff --git a/easybuild/easyblocks/r/__init__.py b/easybuild/easyblocks/r/__init__.py index 975f868432..841038b2fa 100644 --- a/easybuild/easyblocks/r/__init__.py +++ b/easybuild/easyblocks/r/__init__.py @@ -1,5 +1,9 @@ ## -# Copyright 2009-2012 Stijn De Weirdt, Dries Verdegem, Kenneth Hoste, Pieter De Baets, Jens Timmerman +# Copyright 2009-2012 Stijn De Weirdt +# Copyright 2010 Dries Verdegem +# Copyright 2010-2012 Kenneth Hoste +# Copyright 2011 Pieter De Baets +# Copyright 2011-2012 Jens Timmerman # # This file is part of EasyBuild, # originally created by the HPC team of the University of Ghent (http://ugent.be/hpc). diff --git a/easybuild/easyblocks/s/__init__.py b/easybuild/easyblocks/s/__init__.py index 975f868432..841038b2fa 100644 --- a/easybuild/easyblocks/s/__init__.py +++ b/easybuild/easyblocks/s/__init__.py @@ -1,5 +1,9 @@ ## -# Copyright 2009-2012 Stijn De Weirdt, Dries Verdegem, Kenneth Hoste, Pieter De Baets, Jens Timmerman +# Copyright 2009-2012 Stijn De Weirdt +# Copyright 2010 Dries Verdegem +# Copyright 2010-2012 Kenneth Hoste +# Copyright 2011 Pieter De Baets +# Copyright 2011-2012 Jens Timmerman # # This file is part of EasyBuild, # originally created by the HPC team of the University of Ghent (http://ugent.be/hpc). diff --git a/easybuild/easyblocks/s/scalapack.py b/easybuild/easyblocks/s/scalapack.py index edc7c77b6a..863a357af8 100644 --- a/easybuild/easyblocks/s/scalapack.py +++ b/easybuild/easyblocks/s/scalapack.py @@ -1,5 +1,9 @@ ## -# Copyright 2009-2012 Stijn De Weirdt, Dries Verdegem, Kenneth Hoste, Pieter De Baets, Jens Timmerman +# Copyright 2009-2012 Stijn De Weirdt +# Copyright 2010 Dries Verdegem +# Copyright 2010-2012 Kenneth Hoste +# Copyright 2011 Pieter De Baets +# Copyright 2011-2012 Jens Timmerman # # This file is part of EasyBuild, # originally created by the HPC team of the University of Ghent (http://ugent.be/hpc). @@ -94,8 +98,8 @@ def make(self): extra_makeopts += 'home=%s BLACSdir=%s ' % (self.getcfg('startfrom'), blacsroot) # set BLACS libs correctly - for (var, lib) in [('BLACSFINIT', "F77init"), - ('BLACSCINIT', "Cinit"), + for (var, lib) in [('BLACSFINIT', "F77init"), + ('BLACSCINIT', "Cinit"), ('BLACSLIB', "")]: extra_makeopts += '%s=%s/lib/libblacs%s.a ' % (var, blacsroot, lib) diff --git a/easybuild/easyblocks/t/__init__.py b/easybuild/easyblocks/t/__init__.py index 975f868432..841038b2fa 100644 --- a/easybuild/easyblocks/t/__init__.py +++ b/easybuild/easyblocks/t/__init__.py @@ -1,5 +1,9 @@ ## -# Copyright 2009-2012 Stijn De Weirdt, Dries Verdegem, Kenneth Hoste, Pieter De Baets, Jens Timmerman +# Copyright 2009-2012 Stijn De Weirdt +# Copyright 2010 Dries Verdegem +# Copyright 2010-2012 Kenneth Hoste +# Copyright 2011 Pieter De Baets +# Copyright 2011-2012 Jens Timmerman # # This file is part of EasyBuild, # originally created by the HPC team of the University of Ghent (http://ugent.be/hpc). diff --git a/easybuild/easyblocks/t/tarball.py b/easybuild/easyblocks/t/tarball.py index e810585012..42dbface48 100644 --- a/easybuild/easyblocks/t/tarball.py +++ b/easybuild/easyblocks/t/tarball.py @@ -1,5 +1,9 @@ ## -# Copyright 2009-2012 Stijn De Weirdt, Dries Verdegem, Kenneth Hoste, Pieter De Baets, Jens Timmerman +# Copyright 2009-2012 Stijn De Weirdt +# Copyright 2010 Dries Verdegem +# Copyright 2010-2012 Kenneth Hoste +# Copyright 2011 Pieter De Baets +# Copyright 2011-2012 Jens Timmerman # # This file is part of EasyBuild, # originally created by the HPC team of the University of Ghent (http://ugent.be/hpc). @@ -30,7 +34,7 @@ class Tarball(Application): """ - Precompiled software packaged as tarball: + Precompiled software packaged as tarball: - will unpack binary and copy it to the install dir """ @@ -57,4 +61,4 @@ def make_install(self): # self.getcfg('keepsymlinks') is False by default except when explicitly put to True in .eb file shutil.copytree(src,self.installdir, symlinks=self.getcfg('keepsymlinks')) except: - self.log.exception("Copying %s to installation dir %s failed"%(src,self.installdir)) \ No newline at end of file + self.log.exception("Copying %s to installation dir %s failed"%(src,self.installdir)) diff --git a/easybuild/easyblocks/t/tbb.py b/easybuild/easyblocks/t/tbb.py index 13223bd35b..b4602852a8 100644 --- a/easybuild/easyblocks/t/tbb.py +++ b/easybuild/easyblocks/t/tbb.py @@ -1,5 +1,9 @@ ## -# Copyright 2009-2012 Stijn De Weirdt, Dries Verdegem, Kenneth Hoste, Pieter De Baets, Jens Timmerman +# Copyright 2009-2012 Stijn De Weirdt +# Copyright 2010 Dries Verdegem +# Copyright 2010-2012 Kenneth Hoste +# Copyright 2011 Pieter De Baets +# Copyright 2011-2012 Jens Timmerman # # This file is part of EasyBuild, # originally created by the HPC team of the University of Ghent (http://ugent.be/hpc). diff --git a/easybuild/easyblocks/t/toolkit.py b/easybuild/easyblocks/t/toolkit.py index dcc8d1bea1..73e732c99d 100644 --- a/easybuild/easyblocks/t/toolkit.py +++ b/easybuild/easyblocks/t/toolkit.py @@ -1,5 +1,9 @@ ## -# Copyright 2009-2012 Stijn De Weirdt, Dries Verdegem, Kenneth Hoste, Pieter De Baets, Jens Timmerman +# Copyright 2009-2012 Stijn De Weirdt +# Copyright 2010 Dries Verdegem +# Copyright 2010-2012 Kenneth Hoste +# Copyright 2011 Pieter De Baets +# Copyright 2011-2012 Jens Timmerman # # This file is part of EasyBuild, # originally created by the HPC team of the University of Ghent (http://ugent.be/hpc). @@ -44,4 +48,4 @@ def sanityCheck(self): """ As a toolkit doens't install anything really, this is always true """ - self.sanityCheckOK = True \ No newline at end of file + self.sanityCheckOK = True diff --git a/easybuild/easyblocks/u/__init__.py b/easybuild/easyblocks/u/__init__.py index 975f868432..841038b2fa 100644 --- a/easybuild/easyblocks/u/__init__.py +++ b/easybuild/easyblocks/u/__init__.py @@ -1,5 +1,9 @@ ## -# Copyright 2009-2012 Stijn De Weirdt, Dries Verdegem, Kenneth Hoste, Pieter De Baets, Jens Timmerman +# Copyright 2009-2012 Stijn De Weirdt +# Copyright 2010 Dries Verdegem +# Copyright 2010-2012 Kenneth Hoste +# Copyright 2011 Pieter De Baets +# Copyright 2011-2012 Jens Timmerman # # This file is part of EasyBuild, # originally created by the HPC team of the University of Ghent (http://ugent.be/hpc). diff --git a/easybuild/easyblocks/v/__init__.py b/easybuild/easyblocks/v/__init__.py index 975f868432..841038b2fa 100644 --- a/easybuild/easyblocks/v/__init__.py +++ b/easybuild/easyblocks/v/__init__.py @@ -1,5 +1,9 @@ ## -# Copyright 2009-2012 Stijn De Weirdt, Dries Verdegem, Kenneth Hoste, Pieter De Baets, Jens Timmerman +# Copyright 2009-2012 Stijn De Weirdt +# Copyright 2010 Dries Verdegem +# Copyright 2010-2012 Kenneth Hoste +# Copyright 2011 Pieter De Baets +# Copyright 2011-2012 Jens Timmerman # # This file is part of EasyBuild, # originally created by the HPC team of the University of Ghent (http://ugent.be/hpc). diff --git a/easybuild/easyblocks/w/__init__.py b/easybuild/easyblocks/w/__init__.py index 975f868432..841038b2fa 100644 --- a/easybuild/easyblocks/w/__init__.py +++ b/easybuild/easyblocks/w/__init__.py @@ -1,5 +1,9 @@ ## -# Copyright 2009-2012 Stijn De Weirdt, Dries Verdegem, Kenneth Hoste, Pieter De Baets, Jens Timmerman +# Copyright 2009-2012 Stijn De Weirdt +# Copyright 2010 Dries Verdegem +# Copyright 2010-2012 Kenneth Hoste +# Copyright 2011 Pieter De Baets +# Copyright 2011-2012 Jens Timmerman # # This file is part of EasyBuild, # originally created by the HPC team of the University of Ghent (http://ugent.be/hpc). diff --git a/easybuild/easyblocks/w/wps.py b/easybuild/easyblocks/w/wps.py index 290cdc0499..491f6c672b 100644 --- a/easybuild/easyblocks/w/wps.py +++ b/easybuild/easyblocks/w/wps.py @@ -1,5 +1,9 @@ ## -# Copyright 2009-2012 Stijn De Weirdt, Dries Verdegem, Kenneth Hoste, Pieter De Baets, Jens Timmerman +# Copyright 2009-2012 Stijn De Weirdt +# Copyright 2010 Dries Verdegem +# Copyright 2010-2012 Kenneth Hoste +# Copyright 2011 Pieter De Baets +# Copyright 2011-2012 Jens Timmerman # # This file is part of EasyBuild, # originally created by the HPC team of the University of Ghent (http://ugent.be/hpc). diff --git a/easybuild/easyblocks/w/wrf.py b/easybuild/easyblocks/w/wrf.py index d8e8c9f71b..66640850c4 100644 --- a/easybuild/easyblocks/w/wrf.py +++ b/easybuild/easyblocks/w/wrf.py @@ -1,5 +1,9 @@ ## -# Copyright 2009-2012 Stijn De Weirdt, Dries Verdegem, Kenneth Hoste, Pieter De Baets, Jens Timmerman +# Copyright 2009-2012 Stijn De Weirdt +# Copyright 2010 Dries Verdegem +# Copyright 2010-2012 Kenneth Hoste +# Copyright 2011 Pieter De Baets +# Copyright 2011-2012 Jens Timmerman # # This file is part of EasyBuild, # originally created by the HPC team of the University of Ghent (http://ugent.be/hpc). diff --git a/easybuild/easyblocks/x/__init__.py b/easybuild/easyblocks/x/__init__.py index 975f868432..841038b2fa 100644 --- a/easybuild/easyblocks/x/__init__.py +++ b/easybuild/easyblocks/x/__init__.py @@ -1,5 +1,9 @@ ## -# Copyright 2009-2012 Stijn De Weirdt, Dries Verdegem, Kenneth Hoste, Pieter De Baets, Jens Timmerman +# Copyright 2009-2012 Stijn De Weirdt +# Copyright 2010 Dries Verdegem +# Copyright 2010-2012 Kenneth Hoste +# Copyright 2011 Pieter De Baets +# Copyright 2011-2012 Jens Timmerman # # This file is part of EasyBuild, # originally created by the HPC team of the University of Ghent (http://ugent.be/hpc). diff --git a/easybuild/easyblocks/y/__init__.py b/easybuild/easyblocks/y/__init__.py index 975f868432..841038b2fa 100644 --- a/easybuild/easyblocks/y/__init__.py +++ b/easybuild/easyblocks/y/__init__.py @@ -1,5 +1,9 @@ ## -# Copyright 2009-2012 Stijn De Weirdt, Dries Verdegem, Kenneth Hoste, Pieter De Baets, Jens Timmerman +# Copyright 2009-2012 Stijn De Weirdt +# Copyright 2010 Dries Verdegem +# Copyright 2010-2012 Kenneth Hoste +# Copyright 2011 Pieter De Baets +# Copyright 2011-2012 Jens Timmerman # # This file is part of EasyBuild, # originally created by the HPC team of the University of Ghent (http://ugent.be/hpc). diff --git a/easybuild/easyblocks/z/__init__.py b/easybuild/easyblocks/z/__init__.py index 975f868432..841038b2fa 100644 --- a/easybuild/easyblocks/z/__init__.py +++ b/easybuild/easyblocks/z/__init__.py @@ -1,5 +1,9 @@ ## -# Copyright 2009-2012 Stijn De Weirdt, Dries Verdegem, Kenneth Hoste, Pieter De Baets, Jens Timmerman +# Copyright 2009-2012 Stijn De Weirdt +# Copyright 2010 Dries Verdegem +# Copyright 2010-2012 Kenneth Hoste +# Copyright 2011 Pieter De Baets +# Copyright 2011-2012 Jens Timmerman # # This file is part of EasyBuild, # originally created by the HPC team of the University of Ghent (http://ugent.be/hpc). diff --git a/easybuild/easybuild_config.py b/easybuild/easybuild_config.py index 4bf8edeafd..ba9a1f8c8f 100644 --- a/easybuild/easybuild_config.py +++ b/easybuild/easybuild_config.py @@ -1,5 +1,10 @@ ## -# Copyright 2009-2012 Stijn De Weirdt, Dries Verdegem, Kenneth Hoste, Pieter De Baets, Jens Timmerman, Toon Willems +# Copyright 2009-2012 Stijn De Weirdt +# Copyright 2010 Dries Verdegem +# Copyright 2010-2012 Kenneth Hoste +# Copyright 2011 Pieter De Baets +# Copyright 2011-2012 Jens Timmerman +# Copyright 2012 Toon Willems # # This file is part of EasyBuild, # originally created by the HPC team of the University of Ghent (http://ugent.be/hpc). diff --git a/easybuild/framework/__init__.py b/easybuild/framework/__init__.py index 0cc5ba4c4b..e8bc1036c0 100644 --- a/easybuild/framework/__init__.py +++ b/easybuild/framework/__init__.py @@ -1,5 +1,9 @@ ## -# Copyright 2009-2012 Stijn De Weirdt, Dries Verdegem, Kenneth Hoste, Pieter De Baets, Jens Timmerman +# Copyright 2009-2012 Stijn De Weirdt +# Copyright 2010 Dries Verdegem +# Copyright 2010-2012 Kenneth Hoste +# Copyright 2011 Pieter De Baets +# Copyright 2011-2012 Jens Timmerman # # This file is part of EasyBuild, # originally created by the HPC team of the University of Ghent (http://ugent.be/hpc). diff --git a/easybuild/framework/application.py b/easybuild/framework/application.py index 8bce837a41..41b3c491cd 100644 --- a/easybuild/framework/application.py +++ b/easybuild/framework/application.py @@ -1,5 +1,9 @@ ## -# Copyright 2009-2012 Stijn De Weirdt, Dries Verdegem, Kenneth Hoste, Pieter De Baets, Jens Timmerman +# Copyright 2009-2012 Stijn De Weirdt +# Copyright 2010 Dries Verdegem +# Copyright 2010-2012 Kenneth Hoste +# Copyright 2011 Pieter De Baets +# Copyright 2011-2012 Jens Timmerman # Copyright 2012 Toon Willems # # This file is part of EasyBuild, diff --git a/easybuild/scripts/port_easyblock.py b/easybuild/scripts/port_easyblock.py index 64957d0684..2e97bd1306 100755 --- a/easybuild/scripts/port_easyblock.py +++ b/easybuild/scripts/port_easyblock.py @@ -1,6 +1,10 @@ #!/usr/bin/env python ## -# Copyright 2009-2012 Stijn De Weirdt, Dries Verdegem, Kenneth Hoste, Pieter De Baets, Jens Timmerman +# Copyright 2009-2012 Stijn De Weirdt +# Copyright 2010 Dries Verdegem +# Copyright 2010-2012 Kenneth Hoste +# Copyright 2011 Pieter De Baets +# Copyright 2011-2012 Jens Timmerman # # This file is part of EasyBuild, # originally created by the HPC team of the University of Ghent (http://ugent.be/hpc). @@ -29,7 +33,7 @@ e.g. getCfg, setCfg, makeInstall, sanityCheck, runrun and runqanda (+ arguments) * Exception is no longer used and all except blocks catch specific errors only * the code is free of errors and warnings, according to PyLint -* +* usage: check_code_cleanup.py """ @@ -241,10 +245,10 @@ def run_pylint(fn): else: print "No warnings or errors reported by PyLint we care about, nice job!\n" - return True + return True # MAIN -# +# # fetch easyblock to check from command line if len(sys.argv) == 2: diff --git a/easybuild/scripts/prep_for_release.py b/easybuild/scripts/prep_for_release.py index c75603842d..e27bdd5a79 100755 --- a/easybuild/scripts/prep_for_release.py +++ b/easybuild/scripts/prep_for_release.py @@ -1,6 +1,10 @@ #!/usr/bin/env python ## -# Copyright 2009-2012 Stijn De Weirdt, Dries Verdegem, Kenneth Hoste, Pieter De Baets, Jens Timmerman +# Copyright 2009-2012 Stijn De Weirdt +# Copyright 2010 Dries Verdegem +# Copyright 2010-2012 Kenneth Hoste +# Copyright 2011 Pieter De Baets +# Copyright 2011-2012 Jens Timmerman # Copyright 2012 Toon Willems # # This file is part of EasyBuild, @@ -193,7 +197,6 @@ def check_clean_master_branch(home): return ok - # check whether os.putenv or os.environ[]= is used inside easyblocks def check_easyblocks_for_environment(home): """ check whether os.putenv or os.environ[]= is used inside easyblocks """ @@ -221,7 +224,6 @@ def check_easyblocks_for_environment(home): return len(found) == 0 - # # MAIN # diff --git a/easybuild/scripts/repo_setup.py b/easybuild/scripts/repo_setup.py index be97a5c803..71c0512926 100755 --- a/easybuild/scripts/repo_setup.py +++ b/easybuild/scripts/repo_setup.py @@ -1,6 +1,10 @@ #!/usr/bin/env python ## -# Copyright 2009-2012 Stijn De Weirdt, Dries Verdegem, Kenneth Hoste, Pieter De Baets, Jens Timmerman +# Copyright 2009-2012 Stijn De Weirdt +# Copyright 2010 Dries Verdegem +# Copyright 2010-2012 Kenneth Hoste +# Copyright 2011 Pieter De Baets +# Copyright 2011-2012 Jens Timmerman # # This file is part of EasyBuild, # originally created by the HPC team of the University of Ghent (http://ugent.be/hpc). @@ -57,7 +61,7 @@ def create_subdirs(prefix, withinit=False, init_txt=''): dirname = "easybuild" os.mkdir(dirname) os.chdir(dirname) - + # create easyblocks dir and subdirs, with default init dirname = "easyblocks" os.mkdir(dirname) diff --git a/easybuild/tools/__init__.py b/easybuild/tools/__init__.py index 655f18dd60..cf63c02b29 100644 --- a/easybuild/tools/__init__.py +++ b/easybuild/tools/__init__.py @@ -1,5 +1,9 @@ ## -# Copyright 2009-2012 Stijn De Weirdt, Dries Verdegem, Kenneth Hoste, Pieter De Baets, Jens Timmerman +# Copyright 2009-2012 Stijn De Weirdt +# Copyright 2010 Dries Verdegem +# Copyright 2010-2012 Kenneth Hoste +# Copyright 2011 Pieter De Baets +# Copyright 2011-2012 Jens Timmerman # # This file is part of EasyBuild, # originally created by the HPC team of the University of Ghent (http://ugent.be/hpc). diff --git a/easybuild/tools/build_log.py b/easybuild/tools/build_log.py index d3d18801ec..70a04c7f53 100644 --- a/easybuild/tools/build_log.py +++ b/easybuild/tools/build_log.py @@ -1,5 +1,9 @@ ## -# Copyright 2009-2012 Stijn De Weirdt, Dries Verdegem, Kenneth Hoste, Pieter De Baets, Jens Timmerman +# Copyright 2009-2012 Stijn De Weirdt +# Copyright 2010 Dries Verdegem +# Copyright 2010-2012 Kenneth Hoste +# Copyright 2011 Pieter De Baets +# Copyright 2011-2012 Jens Timmerman # # This file is part of EasyBuild, # originally created by the HPC team of the University of Ghent (http://ugent.be/hpc). diff --git a/easybuild/tools/class_dumper.py b/easybuild/tools/class_dumper.py index 7060fcf5e4..226a7d52d9 100644 --- a/easybuild/tools/class_dumper.py +++ b/easybuild/tools/class_dumper.py @@ -1,5 +1,10 @@ ## -# Copyright 2009-2012 Stijn De Weirdt, Dries Verdegem, Kenneth Hoste, Pieter De Baets, Jens Timmerman +# Copyright 2009-2012 Stijn De Weirdt +# Copyright 2010 Dries Verdegem +# Copyright 2010-2012 Kenneth Hoste +# Copyright 2011 Pieter De Baets +# Copyright 2011-2012 Jens Timmerman +# Copyright 2012 Toon Willems # # This file is part of EasyBuild, # originally created by the HPC team of the University of Ghent (http://ugent.be/hpc). diff --git a/easybuild/tools/config.py b/easybuild/tools/config.py index 834cd4fd41..b878a5dbfd 100644 --- a/easybuild/tools/config.py +++ b/easybuild/tools/config.py @@ -1,5 +1,9 @@ ## -# Copyright 2009-2012 Stijn De Weirdt, Dries Verdegem, Kenneth Hoste, Pieter De Baets, Jens Timmerman +# Copyright 2009-2012 Stijn De Weirdt +# Copyright 2010 Dries Verdegem +# Copyright 2010-2012 Kenneth Hoste +# Copyright 2011 Pieter De Baets +# Copyright 2011-2012 Jens Timmerman # Copyright 2012 Toon Willems # # This file is part of EasyBuild, diff --git a/easybuild/tools/filetools.py b/easybuild/tools/filetools.py index 9aa5d7595a..18596467c6 100644 --- a/easybuild/tools/filetools.py +++ b/easybuild/tools/filetools.py @@ -1,5 +1,9 @@ ## -# Copyright 2009-2012 Stijn De Weirdt, Dries Verdegem, Kenneth Hoste, Pieter De Baets, Jens Timmerman +# Copyright 2009-2012 Stijn De Weirdt +# Copyright 2010 Dries Verdegem +# Copyright 2010-2012 Kenneth Hoste +# Copyright 2011 Pieter De Baets +# Copyright 2011-2012 Jens Timmerman # Copyright 2012 Toon Willems # # This file is part of EasyBuild, diff --git a/easybuild/tools/module_generator.py b/easybuild/tools/module_generator.py index 0ef5bd6b7f..a153ef082b 100644 --- a/easybuild/tools/module_generator.py +++ b/easybuild/tools/module_generator.py @@ -1,5 +1,9 @@ ## -# Copyright 2009-2012 Stijn De Weirdt, Dries Verdegem, Kenneth Hoste, Pieter De Baets, Jens Timmerman +# Copyright 2009-2012 Stijn De Weirdt +# Copyright 2010 Dries Verdegem +# Copyright 2010-2012 Kenneth Hoste +# Copyright 2011 Pieter De Baets +# Copyright 2011-2012 Jens Timmerman # # This file is part of EasyBuild, # originally created by the HPC team of the University of Ghent (http://ugent.be/hpc). diff --git a/easybuild/tools/modules.py b/easybuild/tools/modules.py index ec7bce32e7..d55ca7837a 100644 --- a/easybuild/tools/modules.py +++ b/easybuild/tools/modules.py @@ -1,5 +1,9 @@ ## -# Copyright 2009-2012 Stijn De Weirdt, Dries Verdegem, Kenneth Hoste, Pieter De Baets, Jens Timmerman +# Copyright 2009-2012 Stijn De Weirdt +# Copyright 2010 Dries Verdegem +# Copyright 2010-2012 Kenneth Hoste +# Copyright 2011 Pieter De Baets +# Copyright 2011-2012 Jens Timmerman # # This file is part of EasyBuild, # originally created by the HPC team of the University of Ghent (http://ugent.be/hpc). diff --git a/easybuild/tools/repository.py b/easybuild/tools/repository.py index 0a9bc02569..b2c12d7c72 100644 --- a/easybuild/tools/repository.py +++ b/easybuild/tools/repository.py @@ -1,5 +1,9 @@ ## -# Copyright 2009-2012 Stijn De Weirdt, Dries Verdegem, Kenneth Hoste, Pieter De Baets, Jens Timmerman +# Copyright 2009-2012 Stijn De Weirdt +# Copyright 2010 Dries Verdegem +# Copyright 2010-2012 Kenneth Hoste +# Copyright 2011 Pieter De Baets +# Copyright 2011-2012 Jens Timmerman # Copyright 2012 Toon Willems # # This file is part of EasyBuild, diff --git a/easybuild/tools/systemtools.py b/easybuild/tools/systemtools.py index d3d211ece7..13d139cf30 100644 --- a/easybuild/tools/systemtools.py +++ b/easybuild/tools/systemtools.py @@ -1,5 +1,5 @@ ## -# Copyright 2009-2012 Jens Timmerman +# Copyright 2011-2012 Jens Timmerman # # This file is part of EasyBuild, # originally created by the HPC team of the University of Ghent (http://ugent.be/hpc). @@ -138,7 +138,7 @@ def get_kernel_name(): def get_shared_lib_ext(): """Determine extention for shared libraries - Linux: 'so', Darwin: 'dylib' + Linux: 'so', Darwin: 'dylib' """ shared_lib_exts = { 'Linux':'so', diff --git a/easybuild/tools/toolkit.py b/easybuild/tools/toolkit.py index fd34f5db10..b3b0ea57a7 100644 --- a/easybuild/tools/toolkit.py +++ b/easybuild/tools/toolkit.py @@ -1,5 +1,10 @@ ## -# Copyright 2009-2012 Stijn De Weirdt, Dries Verdegem, Kenneth Hoste, Pieter De Baets, Jens Timmerman +# Copyright 2009-2012 Stijn De Weirdt +# Copyright 2010 Dries Verdegem +# Copyright 2010-2012 Kenneth Hoste +# Copyright 2011 Pieter De Baets +# Copyright 2011-2012 Jens Timmerman +# Copyright 2012 Toon Willems # # This file is part of EasyBuild, # originally created by the HPC team of the University of Ghent (http://ugent.be/hpc). diff --git a/eb b/eb index 2f69593220..afdc6d6de3 100755 --- a/eb +++ b/eb @@ -1,6 +1,10 @@ #!/bin/bash ## -# Copyright 2009-2012 Stijn De Weirdt, Dries Verdegem, Kenneth Hoste, Pieter De Baets, Jens Timmerman +# Copyright 2009-2012 Stijn De Weirdt +# Copyright 2010 Dries Verdegem +# Copyright 2010-2012 Kenneth Hoste +# Copyright 2011 Pieter De Baets +# Copyright 2011-2012 Jens Timmerman # # This file is part of EasyBuild, # originally created by the HPC team of the University of Ghent (http://ugent.be/hpc). From 6abe886c30712a8295262f4faa021eacac07c68f Mon Sep 17 00:00:00 2001 From: Toon Willems Date: Fri, 3 Aug 2012 10:45:56 +0200 Subject: [PATCH 356/798] add os.putenv and os.environ check in prep_for_release Conflicts: easybuild/scripts/prep_for_release.py --- easybuild/scripts/prep_for_release.py | 1 + 1 file changed, 1 insertion(+) diff --git a/easybuild/scripts/prep_for_release.py b/easybuild/scripts/prep_for_release.py index e27bdd5a79..30d91e03d8 100755 --- a/easybuild/scripts/prep_for_release.py +++ b/easybuild/scripts/prep_for_release.py @@ -258,6 +258,7 @@ def check_easyblocks_for_environment(home): # check for clean master branch all_checks.append(check_clean_master_branch(easybuild_home)) + # check for use of os.putenv and os.environ adjustments all_checks.append(check_easyblocks_for_environment(easybuild_home)) From 9c0febbed060952d700d0e146cb51b8860946913 Mon Sep 17 00:00:00 2001 From: Toon Willems Date: Mon, 6 Aug 2012 09:53:56 +0200 Subject: [PATCH 357/798] forgot to fix merge conflicts in build.py --- easybuild/build.py | 12 ------------ 1 file changed, 12 deletions(-) diff --git a/easybuild/build.py b/easybuild/build.py index 5e6a6dd0f6..048899ab04 100644 --- a/easybuild/build.py +++ b/easybuild/build.py @@ -32,29 +32,17 @@ import tempfile import time from datetime import datetime -<<<<<<< HEAD - -import easybuild.tools.config as config -import easybuild.tools.filetools as filetools -from easybuild.framework.application import Application, get_class -from easybuild.framework.easyblock import EasyBlock -======= from optparse import OptionParser import easybuild # required for VERBOSE_VERSION import easybuild.tools.config as config import easybuild.tools.filetools as filetools from easybuild.framework.application import Application, get_instance ->>>>>>> develop from easybuild.tools.build_log import EasyBuildError, initLogger, \ removeLogHandler, print_msg from easybuild.tools.class_dumper import dumpClasses from easybuild.tools.modules import Modules, searchModule from easybuild.tools.config import getRepository -<<<<<<< HEAD -from optparse import OptionParser -======= ->>>>>>> develop from easybuild.tools import systemtools from easybuild.tools.pbs_job import PbsJob From 984af653de104e318b8fb375033a2fca55740b3e Mon Sep 17 00:00:00 2001 From: Toon Willems Date: Mon, 6 Aug 2012 09:54:31 +0200 Subject: [PATCH 358/798] add empty line --- easybuild/build.py | 1 + 1 file changed, 1 insertion(+) diff --git a/easybuild/build.py b/easybuild/build.py index 048899ab04..ea5fc1a278 100644 --- a/easybuild/build.py +++ b/easybuild/build.py @@ -698,6 +698,7 @@ def build(module, options, log, origEnviron, exitOnFailure=True): else: return (True, applicationLog) + def submit_build_job(log): """ will submit the current command (sys.argv) without the --job paramater as a job From 3ef949093127079a000cc0b72b7f1383672db0de Mon Sep 17 00:00:00 2001 From: Toon Willems Date: Mon, 6 Aug 2012 09:55:21 +0200 Subject: [PATCH 359/798] rename app_cls -> app_class --- easybuild/build.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/easybuild/build.py b/easybuild/build.py index ea5fc1a278..fd30f0121a 100644 --- a/easybuild/build.py +++ b/easybuild/build.py @@ -563,8 +563,8 @@ def build(module, options, log, origEnviron, exitOnFailure=True): name = module['module'][0] try: - app_cls = get_class(easyblock, log, name=name) - app = app_cls(spec, debug=options.debug) + app_class = get_class(easyblock, log, name=name) + app = app_class(spec, debug=options.debug) log.info("Obtained application instance of for %s (easyblock: %s)" % (name, easyblock)) except EasyBuildError, err: error("Failed to get application instance for %s (easyblock: %s): %s" % (name, easyblock, err.msg)) From 2a76034d8ad24014001e4df714850b1e85b683ee Mon Sep 17 00:00:00 2001 From: Toon Willems Date: Mon, 6 Aug 2012 10:08:38 +0200 Subject: [PATCH 360/798] add module name for distribute --- easybuild/easyblocks/p/python.py | 1 + 1 file changed, 1 insertion(+) diff --git a/easybuild/easyblocks/p/python.py b/easybuild/easyblocks/p/python.py index c207b4223a..f1fbe5b1d7 100644 --- a/easybuild/easyblocks/p/python.py +++ b/easybuild/easyblocks/p/python.py @@ -55,6 +55,7 @@ def extra_packages_pre(self): # use __name__ here, since this is the module where DefaultPythonPackage is defined self.setcfg('pkgdefaultclass', (__name__, "DefaultPythonPackage")) self.setcfg('pkgfilter', ('python -c "import %(name)s"', "")) + self.setcfg('pkgmodulenames', {'distribute': 'setuptools'}) def make_install(self): """Extend make install to make sure that the 'python' command is present.""" From 39ac6b6f5c98811ef4d61fcbcd30ce67045c31a5 Mon Sep 17 00:00:00 2001 From: Toon Willems Date: Mon, 6 Aug 2012 10:25:50 +0200 Subject: [PATCH 361/798] this merge did not go as planned --- easybuild/build.py | 3 ++- easybuild/test/toolkit.py | 10 +++++----- 2 files changed, 7 insertions(+), 6 deletions(-) diff --git a/easybuild/build.py b/easybuild/build.py index fd30f0121a..93b82a11cc 100644 --- a/easybuild/build.py +++ b/easybuild/build.py @@ -37,7 +37,8 @@ import easybuild # required for VERBOSE_VERSION import easybuild.tools.config as config import easybuild.tools.filetools as filetools -from easybuild.framework.application import Application, get_instance +from easybuild.framework.application import Application, get_class +from easybuild.framework.easyblock import EasyBlock from easybuild.tools.build_log import EasyBuildError, initLogger, \ removeLogHandler, print_msg from easybuild.tools.class_dumper import dumpClasses diff --git a/easybuild/test/toolkit.py b/easybuild/test/toolkit.py index 4b4b10717e..68b8b2ff14 100644 --- a/easybuild/test/toolkit.py +++ b/easybuild/test/toolkit.py @@ -33,7 +33,7 @@ class MockModule(modules.Modules): modules = [] - def available(self, name=None, *args): + def available(self, name=None, *args, **kwargs): if name == 'gzip': return [('gzip', '1.4')] elif name == 'icc': @@ -41,16 +41,16 @@ def available(self, name=None, *args): else: return [] - def addModule(self, *args): + def addModule(self, *args, **kwargs): MockModule.modules.extend(*args) - def load(*args): + def load(*args, **kwargs): pass - def dependencies_for(*args): + def dependencies_for(*args, **kwargs): return [] - def get_software_root(*args): + def get_software_root(*args, **kwargs): return "tmp" From 486237bfd6d28c4838db2e419c32773c08935d63 Mon Sep 17 00:00:00 2001 From: Toon Willems Date: Mon, 6 Aug 2012 11:01:44 +0200 Subject: [PATCH 362/798] use new way of getting installversion --- easybuild/tools/module_generator.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/easybuild/tools/module_generator.py b/easybuild/tools/module_generator.py index 0ef5bd6b7f..91899d21fa 100644 --- a/easybuild/tools/module_generator.py +++ b/easybuild/tools/module_generator.py @@ -58,11 +58,11 @@ def createFiles(self): module_path = self.tmpdir # Real file goes in 'all' category - self.filename = os.path.join(module_path, general_class, self.app.name(), self.app.installversion) + self.filename = os.path.join(module_path, general_class, self.app.name(), self.app.installversion()) # Make symlink in moduleclass category classPath = os.path.join(module_path, self.app.getcfg('moduleclass'), self.app.name()) - classPathFile = os.path.join(classPath, self.app.installversion) + classPathFile = os.path.join(classPath, self.app.installversion()) # Create directories and links for directory in [os.path.dirname(x) for x in [self.filename, classPathFile]]: From 65464c0a78feb9cde2a8096c8c45656b5f0b2fb1 Mon Sep 17 00:00:00 2001 From: Toon Willems Date: Mon, 6 Aug 2012 11:02:05 +0200 Subject: [PATCH 363/798] create directory with individual logs per application --- easybuild/test/build.py | 26 +++++++++++++++++++++++--- 1 file changed, 23 insertions(+), 3 deletions(-) diff --git a/easybuild/test/build.py b/easybuild/test/build.py index 33decada82..4930ac2482 100644 --- a/easybuild/test/build.py +++ b/easybuild/test/build.py @@ -19,6 +19,7 @@ # along with EasyBuild. If not, see . ## import copy +import logging import platform import os import re @@ -39,6 +40,7 @@ import easybuild import easybuild.tools.config as config import easybuild.tools.systemtools as systemtools +import easybuild.tools.build_log as build_log class BuildTest(TestCase): @@ -93,15 +95,23 @@ def setUp(self): (opts, args) = parser.parse_args() self.parallel = opts.parallel + # Create base directory inside the current directory. This will be used to place + # all log files and the test output as xml + basename = "easybuild-test-%s" % datetime.now().strftime("%d-%m-%Y-%H:%M:%S") if opts.filename: filename = opts.filename - elif "EASYBILDTESTOUTPUT" in os.environ: + elif "EASYBUILDTESTOUTPUT" in os.environ: filename = os.environ["EASYBUILDTESTOUTPUT"] else: - filename = "easybuild-test-%s.xml" % datetime.now().strftime("%d-%m-%Y-%H:%M:%S") + filename = "easybuild-test.xml" - self.output_file = os.path.join(self.cur_dir, filename) + self.output_file = os.path.join(self.cur_dir, basename, filename) + self.output_dir = os.path.dirname(self.output_file) + if not os.path.isdir(self.output_dir): + os.makedirs(self.output_dir) + + # find all easyconfigs (either in specified paths or in 'easybuild/easyblocks') files = [] if args: for path in args: @@ -117,6 +127,7 @@ def setUp(self): self.submit_jobs(files) return + # process all the found easyconfig files packages = [] for file in files: try: @@ -237,6 +248,12 @@ def runTest(self): os.chdir(base_dir) modifyEnv(os.environ, base_env) + # create a handler per app so we can capture debug output per application + handler = logging.FileHandler(os.path.join(self.output_dir, "%s-%s.log" % (app.name(), app.installversion()))) + handler.setFormatter(build_log.formatter) + + app.log.addHandler(handler) + # take manual control over the building self.performStep("preparation", app, lambda x: x.prepare_build()) self.performStep("pre-build verification", app, lambda x: x.ready2build()) @@ -256,6 +273,9 @@ def runTest(self): self.performStep('sanity check', app, lambda x: x.sanitycheck()) self.performStep('cleanup', app, lambda x: x.cleanup()) + # remove handler + app.log.removeHandler(handler) + if app not in self.build_stopped: # gather build stats build_time = round(time.time() - start_time, 2) From 4a2ac6a4aa4eb1fb763bb36750b987b1bb38bf61 Mon Sep 17 00:00:00 2001 From: Kenneth Hoste Date: Mon, 6 Aug 2012 11:05:08 +0200 Subject: [PATCH 364/798] process minor remarks in pull request --- easybuild/easyblocks/o/openfoam.py | 6 +++--- .../f/flex/flex-2.5.35-goalf-1.1.0-no-OFED.eb | 2 +- .../easyconfigs/f/flex/flex-2.5.35-ictce-3.2.2.u3.eb | 2 +- .../easyconfigs/f/flex/flex-2.5.35-ictce-4.0.6.eb | 2 +- .../o/OpenFOAM/OpenFOAM-2.1.1-goalf-1.1.0.eb | 2 +- .../o/OpenFOAM/OpenFOAM-2.1.1-ictce-4.0.6.eb | 2 +- easybuild/tools/filetools.py | 12 ++++++++++++ 7 files changed, 20 insertions(+), 8 deletions(-) diff --git a/easybuild/easyblocks/o/openfoam.py b/easybuild/easyblocks/o/openfoam.py index a38fb3b73a..dff83b70e6 100644 --- a/easybuild/easyblocks/o/openfoam.py +++ b/easybuild/easyblocks/o/openfoam.py @@ -22,14 +22,14 @@ EasyBuild support for building and installing OpenFOAM, implemented as an easyblock """ -from distutils.version import LooseVersion import os import stat +from distutils.version import LooseVersion -from easybuild.framework.application import Application -from easybuild.tools.filetools import run_cmd, adjust_permissions import easybuild.tools.environment as env import easybuild.tools.toolkit as toolkit +from easybuild.framework.application import Application +from easybuild.tools.filetools import run_cmd, adjust_permissions class OpenFOAM(Application): diff --git a/easybuild/easyconfigs/f/flex/flex-2.5.35-goalf-1.1.0-no-OFED.eb b/easybuild/easyconfigs/f/flex/flex-2.5.35-goalf-1.1.0-no-OFED.eb index 6a06e45304..40d21e2605 100644 --- a/easybuild/easyconfigs/f/flex/flex-2.5.35-goalf-1.1.0-no-OFED.eb +++ b/easybuild/easyconfigs/f/flex/flex-2.5.35-goalf-1.1.0-no-OFED.eb @@ -2,7 +2,7 @@ name = 'flex' version = '2.5.35' homepage = 'http://flex.sourceforge.net/' -description="""Flex (Fast Lexical Analyzer) is a tool for generating scanners. A scanner, +description = """Flex (Fast Lexical Analyzer) is a tool for generating scanners. A scanner, sometimes called a tokenizer, is a program which recognizes lexical patterns in text.""" toolkit = {'name':'goalf', 'version':'1.1.0-no-OFED'} diff --git a/easybuild/easyconfigs/f/flex/flex-2.5.35-ictce-3.2.2.u3.eb b/easybuild/easyconfigs/f/flex/flex-2.5.35-ictce-3.2.2.u3.eb index 23fc2db64d..59abca5681 100644 --- a/easybuild/easyconfigs/f/flex/flex-2.5.35-ictce-3.2.2.u3.eb +++ b/easybuild/easyconfigs/f/flex/flex-2.5.35-ictce-3.2.2.u3.eb @@ -2,7 +2,7 @@ name = 'flex' version = '2.5.35' homepage = 'http://flex.sourceforge.net/' -description="""Flex (Fast Lexical Analyzer) is a tool for generating scanners. A scanner, +description = """Flex (Fast Lexical Analyzer) is a tool for generating scanners. A scanner, sometimes called a tokenizer, is a program which recognizes lexical patterns in text.""" toolkit = {'name':'ictce', 'version':'3.2.2.u3'} diff --git a/easybuild/easyconfigs/f/flex/flex-2.5.35-ictce-4.0.6.eb b/easybuild/easyconfigs/f/flex/flex-2.5.35-ictce-4.0.6.eb index 194a2b7f3d..f3f6cef649 100644 --- a/easybuild/easyconfigs/f/flex/flex-2.5.35-ictce-4.0.6.eb +++ b/easybuild/easyconfigs/f/flex/flex-2.5.35-ictce-4.0.6.eb @@ -2,7 +2,7 @@ name = 'flex' version = '2.5.35' homepage = 'http://flex.sourceforge.net/' -description="""Flex (Fast Lexical Analyzer) is a tool for generating scanners. A scanner, +description = """Flex (Fast Lexical Analyzer) is a tool for generating scanners. A scanner, sometimes called a tokenizer, is a program which recognizes lexical patterns in text.""" toolkit = {'name':'ictce', 'version':'4.0.6'} diff --git a/easybuild/easyconfigs/o/OpenFOAM/OpenFOAM-2.1.1-goalf-1.1.0.eb b/easybuild/easyconfigs/o/OpenFOAM/OpenFOAM-2.1.1-goalf-1.1.0.eb index b0879f7b6a..377adab222 100644 --- a/easybuild/easyconfigs/o/OpenFOAM/OpenFOAM-2.1.1-goalf-1.1.0.eb +++ b/easybuild/easyconfigs/o/OpenFOAM/OpenFOAM-2.1.1-goalf-1.1.0.eb @@ -14,7 +14,7 @@ sources = ['%s-%s.tgz' % (name, version), 'ThirdParty-%s.tgz' % version] patches = ['cleanup-OpenFOAM-%s.patch' % version, - ('cleanup-ThirdParty-%s.patch' % version, "..") # patch should not be applied in OpenFOAM subdir + ('cleanup-ThirdParty-%s.patch' % version, "..") # patch should not be applied in OpenFOAM subdir ] builddependencies = [('flex', '2.5.35')] diff --git a/easybuild/easyconfigs/o/OpenFOAM/OpenFOAM-2.1.1-ictce-4.0.6.eb b/easybuild/easyconfigs/o/OpenFOAM/OpenFOAM-2.1.1-ictce-4.0.6.eb index 0972b3da20..129a956038 100644 --- a/easybuild/easyconfigs/o/OpenFOAM/OpenFOAM-2.1.1-ictce-4.0.6.eb +++ b/easybuild/easyconfigs/o/OpenFOAM/OpenFOAM-2.1.1-ictce-4.0.6.eb @@ -14,7 +14,7 @@ sources = ['%s-%s.tgz' % (name, version), 'ThirdParty-%s.tgz' % version] patches = ['cleanup-OpenFOAM-%s.patch' % version, - ('cleanup-ThirdParty-%s.patch' % version, "..") # patch should not be applied in OpenFOAM subdir + ('cleanup-ThirdParty-%s.patch' % version, "..") # patch should not be applied in OpenFOAM subdir ] builddependencies = [('flex', '2.5.35')] diff --git a/easybuild/tools/filetools.py b/easybuild/tools/filetools.py index 5e7bbcc929..dd7332c153 100644 --- a/easybuild/tools/filetools.py +++ b/easybuild/tools/filetools.py @@ -40,6 +40,7 @@ strictness = 'warn' + def unpack(fn, dest, extra_options=None, overwrite=False): """ Given filename fn, try to unpack in directory dest @@ -76,6 +77,7 @@ def unpack(fn, dest, extra_options=None, overwrite=False): return findBaseDir() + def findBaseDir(): """ Try to locate a possible new base directory @@ -110,6 +112,7 @@ def getLocalDirsPurged(): log.debug("Possible new dir %s found" % newDir) return newDir + def extractCmd(fn, overwrite=False): """ Determines the file type of file fn, returns extract cmd @@ -151,6 +154,7 @@ def extractCmd(fn, overwrite=False): return ftype % fn + def patch(patchFile, dest, fn=None, copy=False, level=None): """ Apply a patch to source code in directory dest @@ -250,6 +254,7 @@ def patch(patchFile, dest, fn=None, copy=False, level=None): return result + def run_cmd(cmd, log_ok=True, log_all=False, simple=False, inp=None, regexp=True, log_output=False, path=None): """ Executes a command cmd @@ -327,6 +332,7 @@ def run_cmd(cmd, log_ok=True, log_all=False, simple=False, inp=None, regexp=True return parse_cmd_output(cmd, stdouterr, ec, simple, log_all, log_ok, regexp) + def run_cmd_qa(cmd, qa, no_qa=None, log_ok=True, log_all=False, simple=False, regexp=True, std_qa=None, path=None): """ Executes a command cmd @@ -514,6 +520,7 @@ def processQA(q, a): return parse_cmd_output(cmd, stdoutErr, ec, simple, log_all, log_ok, regexp) + def parse_cmd_output(cmd, stdouterr, ec, simple, log_all, log_ok, regexp): """ will parse and perform error checks based on strictness setting @@ -567,6 +574,7 @@ def parse_cmd_output(cmd, stdouterr, ec, simple, log_all, log_ok, regexp): # Because we are not running in simple mode, we return the output and ec to the user return (stdouterr, ec) + def modifyEnv(old, new): """ Compares 2 os.environ dumps. Adapts final environment. @@ -592,6 +600,7 @@ def modifyEnv(old, new): return 'ok' + def convertName(name, upper=False): """ Converts name so it can be used as variable name @@ -609,6 +618,7 @@ def convertName(name, upper=False): else: return name + def parselogForError(txt, regExp=None, stdout=True, msg=None): """ txt is multiline string. @@ -644,6 +654,7 @@ def parselogForError(txt, regExp=None, stdout=True, msg=None): return res + def adjust_permissions(name, permissionBits, add=True, onlyFiles=False, recursive=True): """ Add or remove (if add is False) permissionBits from all files @@ -679,6 +690,7 @@ def adjust_permissions(name, permissionBits, add=True, onlyFiles=False, recursiv except OSError, err: log.info("Failed to chmod %s (but ignoring it): %s" % (path, err)) + def patch_perl_script_autoflush(path): # patch Perl script to enable autoflush, # so that e.g. run_cmd_qa receives all output to answer questions From 530ea2b7fb1ccef5db36f31d387cba848747dca7 Mon Sep 17 00:00:00 2001 From: Toon Willems Date: Mon, 6 Aug 2012 11:21:48 +0200 Subject: [PATCH 365/798] set correct env_var --- easybuild/test/build.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/easybuild/test/build.py b/easybuild/test/build.py index 4930ac2482..cf44b95580 100644 --- a/easybuild/test/build.py +++ b/easybuild/test/build.py @@ -177,7 +177,7 @@ def submit_jobs(self, files): easybuild_vars[env_var] = os.environ[env_var] for easyconfig in files: - easybuild_vars['EASYBUILDTESTOUTPUT'] = "%s.xml" % easyconfig + easybuild_vars['EASYBUILDTESTOUTPUT'] = os.path.join(self.output_dir, "%s.xml" % easyconfig) command = "cd %s && python %s %s" % (self.cur_dir, sys.argv[0], easyconfig) self.log.debug("submitting: %s" % command) self.log.debug("env vars set: %s" % easybuild_vars) From d7347cdabdf7c179cdc9c75473deb5258d6250e4 Mon Sep 17 00:00:00 2001 From: Jens Timmerman Date: Fri, 27 Jul 2012 16:00:21 +0200 Subject: [PATCH 366/798] added initial cplex support --- easybuild/easyblocks/c/cplex.py | 99 +++++++++++++++++++++ easybuild/easyconfigs/c/CPLEX/cplex-12.4.eb | 13 +++ 2 files changed, 112 insertions(+) create mode 100644 easybuild/easyblocks/c/cplex.py create mode 100644 easybuild/easyconfigs/c/CPLEX/cplex-12.4.eb diff --git a/easybuild/easyblocks/c/cplex.py b/easybuild/easyblocks/c/cplex.py new file mode 100644 index 0000000000..4b80cda2ab --- /dev/null +++ b/easybuild/easyblocks/c/cplex.py @@ -0,0 +1,99 @@ +## +# Copyright 2009-2012 Stijn De Weirdt, Dries Verdegem, Kenneth Hoste, Pieter De Baets, Jens Timmerman +# +# This file is part of EasyBuild, +# originally created by the HPC team of the University of Ghent (http://ugent.be/hpc). +# +# http://github.com/hpcugent/easybuild +# +# EasyBuild is free software: you can redistribute it and/or modify +# it under the terms of the GNU General Public License as published by +# the Free Software Foundation v2. +# +# EasyBuild is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with EasyBuild. If not, see . +## +""" +EasyBuild support for cplex, implemented as an easyblock +""" +import os +import shutil +import stat +import glob +from easybuild.easyblocks.b.binary import Binary +from easybuild.tools.filetools import run_cmd_qa + + +class CPLEX(Binary): + """ + Version 12.2 has a self-extratcing package with a java installer + """ + def make_install(self): + tmpdir = os.path.join(self.builddir, 'tmp') + try: + os.chdir(self.builddir) + os.makedirs(tmpdir) + + os.putenv('IATEMPDIR', tmpdir) + os.environ['IATEMPDIR'] = tmpdir + + except OSError: + self.log.exception("Failed to change directory to %s" % self.builddir) + + # Run the source + # - self.src: first one is source. others ignored + src = self.src[0]['path'] + dst = os.path.join(self.builddir, self.src[0]['name']) + try: + shutil.copy2(src, self.builddir) + os.chmod(dst, stat.S_IRWXU) + except (OSError, IOError): + self.log.exception("Couldn't copy %s to %s" % (src, self.builddir)) + + cmd = "%s -i console" % dst + + qanda = {"PRESS TO CONTINUE:":"", + 'Press Enter to continue viewing the license agreement, or enter' \ + ' "1" to accept the agreement, "2" to decline it, "3" to print it,' \ + ' or "99" to go back to the previous screen.:':'1', + 'ENTER AN ABSOLUTE PATH, OR PRESS TO ACCEPT THE DEFAULT :':self.installdir, + 'IS THIS CORRECT? (Y/N):':'y', + 'PRESS TO INSTALL:':"", + "PRESS TO EXIT THE INSTALLER:":"", + "CHOOSE LOCALE BY NUMBER:":"", + "Choose Instance Management Option:":"" + } + noqanda = [r'Installing\.\.\..*\n.*------.*\n\n.*============.*\n.*$'] + + run_cmd_qa(cmd, qanda, no_qa=noqanda, log_all=True, simple=True) + + try: + os.chmod(self.installdir, stat.S_IRWXU | stat.S_IXOTH | stat.S_IXGRP | stat.S_IROTH | stat.S_IRGRP) + except OSError: + self.log.exception("Can't set permissions on %s" % self.installdir) + + def make_module_extra(self): + """ + Add installdir to path + """ + os.chdir(self.installdir) + binglob = 'cplex/bin/x86-64*' + bins = glob.glob(binglob) + if len(bins): + if len(bins) > 1: + self.log.error("More then one possible path for bin found: %s" % bins) + else: + bindir = bins[0] + else: + self.log.error("No bins found using %s in %s" % (binglob, self.installdir)) + + txt = Binary.make_module_extra(self) + txt += "prepend-path\tPATH\t\t$root/%s\n" % bindir + txt += "setenv\tCPLEX_HOME\t\t$root/cplex" + + return txt diff --git a/easybuild/easyconfigs/c/CPLEX/cplex-12.4.eb b/easybuild/easyconfigs/c/CPLEX/cplex-12.4.eb new file mode 100644 index 0000000000..5dec5cf047 --- /dev/null +++ b/easybuild/easyconfigs/c/CPLEX/cplex-12.4.eb @@ -0,0 +1,13 @@ +name='CPLEX' +version='12.4' + + +homepage='http://www-01.ibm.com/software/integration/optimization/cplex-optimizer/' +description="""IBM ILOG CPLEX Optimizer's mathematical programming technology enables + analytical decision support for improving efficiency, + reducing costs, and increasing profitability.""" + + +toolkit={'name':'dummy','version':'dummy'} + +sources=['cplex_studio%s.linux-x86-64.bin' % ''.join(version.split('.'))] \ No newline at end of file From 69e9d1ab99c993a5b51eba0e931f65b90574fc1e Mon Sep 17 00:00:00 2001 From: Jens Timmerman Date: Fri, 27 Jul 2012 17:12:34 +0200 Subject: [PATCH 367/798] added sanitycheck for cplex --- easybuild/easyblocks/c/cplex.py | 26 +++++++++++++++++++++++++- 1 file changed, 25 insertions(+), 1 deletion(-) diff --git a/easybuild/easyblocks/c/cplex.py b/easybuild/easyblocks/c/cplex.py index 4b80cda2ab..d82e584bbe 100644 --- a/easybuild/easyblocks/c/cplex.py +++ b/easybuild/easyblocks/c/cplex.py @@ -33,7 +33,17 @@ class CPLEX(Binary): """ Version 12.2 has a self-extratcing package with a java installer """ + + def unpack_src(self): + """overwrite unpack, this is non compressed binary file""" + self.src[0]['finalpath'] = self.builddir + + + def make_install(self): + """CPLEX has an installer that prompts for information, + so use Q&A here + """ tmpdir = os.path.join(self.builddir, 'tmp') try: os.chdir(self.builddir) @@ -91,9 +101,23 @@ def make_module_extra(self): bindir = bins[0] else: self.log.error("No bins found using %s in %s" % (binglob, self.installdir)) + self.bindir = bindir txt = Binary.make_module_extra(self) txt += "prepend-path\tPATH\t\t$root/%s\n" % bindir txt += "setenv\tCPLEX_HOME\t\t$root/cplex" - + self.log.debug("make_module_extra added %s" % txt) return txt + + def sanitycheck(self): + """Custom sanity check for CPLEX""" + + if not self.getcfg('sanityCheckPaths'): + self.setcfg('sanityCheckPaths', {'files':["%s/%s" % (self.bindir, x) for x in + ["convert", "cplex", "cplexamp"]], + 'dirs':[] + }) + + self.log.info("Customized sanity check paths: %s" % self.getcfg('sanityCheckPaths')) + + Binary.sanitycheck(self) From 54c852a964ba957d285787c2e0910862dadfc8be Mon Sep 17 00:00:00 2001 From: Jens Timmerman Date: Fri, 27 Jul 2012 17:17:01 +0200 Subject: [PATCH 368/798] create bindir before using it --- easybuild/easyblocks/c/cplex.py | 12 +++++++----- 1 file changed, 7 insertions(+), 5 deletions(-) diff --git a/easybuild/easyblocks/c/cplex.py b/easybuild/easyblocks/c/cplex.py index d82e584bbe..bbe9765e9b 100644 --- a/easybuild/easyblocks/c/cplex.py +++ b/easybuild/easyblocks/c/cplex.py @@ -87,10 +87,7 @@ def make_install(self): except OSError: self.log.exception("Can't set permissions on %s" % self.installdir) - def make_module_extra(self): - """ - Add installdir to path - """ + # save bindir os.chdir(self.installdir) binglob = 'cplex/bin/x86-64*' bins = glob.glob(binglob) @@ -103,8 +100,13 @@ def make_module_extra(self): self.log.error("No bins found using %s in %s" % (binglob, self.installdir)) self.bindir = bindir + def make_module_extra(self): + """ + Add installdir to path + """ + txt = Binary.make_module_extra(self) - txt += "prepend-path\tPATH\t\t$root/%s\n" % bindir + txt += "prepend-path\tPATH\t\t$root/%s\n" % self.bindir txt += "setenv\tCPLEX_HOME\t\t$root/cplex" self.log.debug("make_module_extra added %s" % txt) return txt From 742ca84993da1f4e67178673bd7fa30ef5208d63 Mon Sep 17 00:00:00 2001 From: Jens Timmerman Date: Wed, 1 Aug 2012 15:05:16 +0200 Subject: [PATCH 369/798] processed remarks by Kenneth --- easybuild/easyblocks/c/cplex.py | 41 +++++++++++---------- easybuild/easyconfigs/c/CPLEX/cplex-12.4.eb | 2 - 2 files changed, 21 insertions(+), 22 deletions(-) diff --git a/easybuild/easyblocks/c/cplex.py b/easybuild/easyblocks/c/cplex.py index bbe9765e9b..ae41f1cff6 100644 --- a/easybuild/easyblocks/c/cplex.py +++ b/easybuild/easyblocks/c/cplex.py @@ -19,7 +19,7 @@ # along with EasyBuild. If not, see . ## """ -EasyBuild support for cplex, implemented as an easyblock +EasyBuild support for CPLEX, implemented as an easyblock """ import os import shutil @@ -33,12 +33,23 @@ class CPLEX(Binary): """ Version 12.2 has a self-extratcing package with a java installer """ + def __init__(self, *args, **kwargs): + """Constructor""" + Binary.__init__(self, *args, **kwargs) + self.bindir = None def unpack_src(self): """overwrite unpack, this is non compressed binary file""" self.src[0]['finalpath'] = self.builddir - + #copy source to build dir. + src = self.src[0]['path'] + dst = os.path.join(self.builddir, self.src[0]['name']) + try: + shutil.copy2(src, self.builddir) + os.chmod(dst, stat.S_IRWXU) + except (OSError, IOError): + self.log.exception("Couldn't copy %s to %s" % (src, self.builddir)) def make_install(self): """CPLEX has an installer that prompts for information, @@ -49,22 +60,14 @@ def make_install(self): os.chdir(self.builddir) os.makedirs(tmpdir) - os.putenv('IATEMPDIR', tmpdir) - os.environ['IATEMPDIR'] = tmpdir - - except OSError: - self.log.exception("Failed to change directory to %s" % self.builddir) + except OSError, err: + self.log.exception("Failed to change directory to %s: %s" % (self.builddir, err)) - # Run the source - # - self.src: first one is source. others ignored - src = self.src[0]['path'] + os.putenv('IATEMPDIR', tmpdir) + os.environ['IATEMPDIR'] = tmpdir dst = os.path.join(self.builddir, self.src[0]['name']) - try: - shutil.copy2(src, self.builddir) - os.chmod(dst, stat.S_IRWXU) - except (OSError, IOError): - self.log.exception("Couldn't copy %s to %s" % (src, self.builddir)) + # Run the source cmd = "%s -i console" % dst qanda = {"PRESS TO CONTINUE:":"", @@ -87,7 +90,7 @@ def make_install(self): except OSError: self.log.exception("Can't set permissions on %s" % self.installdir) - # save bindir + # determine bin dir os.chdir(self.installdir) binglob = 'cplex/bin/x86-64*' bins = glob.glob(binglob) @@ -95,16 +98,14 @@ def make_install(self): if len(bins) > 1: self.log.error("More then one possible path for bin found: %s" % bins) else: - bindir = bins[0] + self.bindir = bins[0] else: self.log.error("No bins found using %s in %s" % (binglob, self.installdir)) - self.bindir = bindir def make_module_extra(self): """ - Add installdir to path + Add installdir to path and set CPLEX_HOME """ - txt = Binary.make_module_extra(self) txt += "prepend-path\tPATH\t\t$root/%s\n" % self.bindir txt += "setenv\tCPLEX_HOME\t\t$root/cplex" diff --git a/easybuild/easyconfigs/c/CPLEX/cplex-12.4.eb b/easybuild/easyconfigs/c/CPLEX/cplex-12.4.eb index 5dec5cf047..6ee9917fa0 100644 --- a/easybuild/easyconfigs/c/CPLEX/cplex-12.4.eb +++ b/easybuild/easyconfigs/c/CPLEX/cplex-12.4.eb @@ -1,13 +1,11 @@ name='CPLEX' version='12.4' - homepage='http://www-01.ibm.com/software/integration/optimization/cplex-optimizer/' description="""IBM ILOG CPLEX Optimizer's mathematical programming technology enables analytical decision support for improving efficiency, reducing costs, and increasing profitability.""" - toolkit={'name':'dummy','version':'dummy'} sources=['cplex_studio%s.linux-x86-64.bin' % ''.join(version.split('.'))] \ No newline at end of file From 3317ef3ff67e06e93e7b3faf9d7a6d24ca9c69b3 Mon Sep 17 00:00:00 2001 From: Jens Timmerman Date: Wed, 1 Aug 2012 16:34:47 +0200 Subject: [PATCH 370/798] moved copying of source files to binary, + created a packedbinary to provide the old functionality of binary (used by ORCA) --- easybuild/easyblocks/b/binary.py | 21 +++++++++-- easybuild/easyblocks/c/cplex.py | 16 +-------- easybuild/easyblocks/p/packedbinary.py | 36 +++++++++++++++++++ .../o/ORCA/ORCA-2_9_1-linux_x86-64.eb | 2 +- 4 files changed, 57 insertions(+), 18 deletions(-) create mode 100644 easybuild/easyblocks/p/packedbinary.py diff --git a/easybuild/easyblocks/b/binary.py b/easybuild/easyblocks/b/binary.py index a77fc74c88..f1d1a621ab 100644 --- a/easybuild/easyblocks/b/binary.py +++ b/easybuild/easyblocks/b/binary.py @@ -1,5 +1,5 @@ ## -# Copyright 2009-2012 Stijn Deweirdt, Dries Verdegem, Kenneth Hoste, Pieter De Baets, Jens Timmerman +# Copyright 2009-2012 Stijn De Weirdt, Dries Verdegem, Kenneth Hoste, Pieter De Baets, Jens Timmerman # # This file is part of EasyBuild, # originally created by the HPC team of the University of Ghent (http://ugent.be/hpc). @@ -23,13 +23,30 @@ """ import shutil +import os +import stat from easybuild.framework.application import Application class Binary(Application): """Support for installing a binary package. - Just unpack it and copy it to the installdir""" + Just copy it's sources to the installdir""" + + def unpack_src(self): + """Move all source files to the build directory""" + self.src[0]['finalpath'] = self.builddir + + # copy source to build dir. + for source in self.src: + src = source['path'] + dst = os.path.join(self.builddir, source['name']) + try: + shutil.copy2(src, self.builddir) + os.chmod(dst, stat.S_IRWXU) + except (OSError, IOError): + self.log.exception("Couldn't copy %s to %s" % (src, self.builddir)) + def configure(self): """No configuration, this is a binary package""" diff --git a/easybuild/easyblocks/c/cplex.py b/easybuild/easyblocks/c/cplex.py index ae41f1cff6..eb344689b9 100644 --- a/easybuild/easyblocks/c/cplex.py +++ b/easybuild/easyblocks/c/cplex.py @@ -23,7 +23,6 @@ """ import os import shutil -import stat import glob from easybuild.easyblocks.b.binary import Binary from easybuild.tools.filetools import run_cmd_qa @@ -38,19 +37,6 @@ def __init__(self, *args, **kwargs): Binary.__init__(self, *args, **kwargs) self.bindir = None - def unpack_src(self): - """overwrite unpack, this is non compressed binary file""" - self.src[0]['finalpath'] = self.builddir - - #copy source to build dir. - src = self.src[0]['path'] - dst = os.path.join(self.builddir, self.src[0]['name']) - try: - shutil.copy2(src, self.builddir) - os.chmod(dst, stat.S_IRWXU) - except (OSError, IOError): - self.log.exception("Couldn't copy %s to %s" % (src, self.builddir)) - def make_install(self): """CPLEX has an installer that prompts for information, so use Q&A here @@ -61,7 +47,7 @@ def make_install(self): os.makedirs(tmpdir) except OSError, err: - self.log.exception("Failed to change directory to %s: %s" % (self.builddir, err)) + self.log.exception("Failed to prepare for installation: %s" % err) os.putenv('IATEMPDIR', tmpdir) os.environ['IATEMPDIR'] = tmpdir diff --git a/easybuild/easyblocks/p/packedbinary.py b/easybuild/easyblocks/p/packedbinary.py new file mode 100644 index 0000000000..ce62d52f75 --- /dev/null +++ b/easybuild/easyblocks/p/packedbinary.py @@ -0,0 +1,36 @@ +## +# Copyright 2009-2012 Stijn De Weirdt, Dries Verdegem, Kenneth Hoste, Pieter De Baets, Jens Timmerman +# +# This file is part of EasyBuild, +# originally created by the HPC team of the University of Ghent (http://ugent.be/hpc). +# +# http://github.com/hpcugent/easybuild +# +# EasyBuild is free software: you can redistribute it and/or modify +# it under the terms of the GNU General Public License as published by +# the Free Software Foundation v2. +# +# EasyBuild is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with EasyBuild. If not, see . +## +""" +EasyBlock for binary applications that need unpacking +E.g., binary applications shipped as a .tar.gz file. +""" +from easybuild.framework.application import Application +from easybuild.easyblocks.b.binary import Binary + +class PackedBinary(Binary, Application): + """Support for installing a binary package. + Just copy it's sources to the installdir""" + + def unpack_src(self): + """Unpack the source""" + Application.unpack_src(self) + + diff --git a/easybuild/easyconfigs/o/ORCA/ORCA-2_9_1-linux_x86-64.eb b/easybuild/easyconfigs/o/ORCA/ORCA-2_9_1-linux_x86-64.eb index 74166c69ee..851b448f12 100644 --- a/easybuild/easyconfigs/o/ORCA/ORCA-2_9_1-linux_x86-64.eb +++ b/easybuild/easyconfigs/o/ORCA/ORCA-2_9_1-linux_x86-64.eb @@ -1,4 +1,4 @@ -easyblock="Binary" +easyblock="PackedBinary" name="ORCA" version='2_9_1-linux_x86-64' From ec0171d7dcae513ad196821d6e81c4441a5d0b20 Mon Sep 17 00:00:00 2001 From: Toon Willems Date: Mon, 6 Aug 2012 11:33:48 +0200 Subject: [PATCH 371/798] change how filename argument is used --- easybuild/test/build.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/easybuild/test/build.py b/easybuild/test/build.py index cf44b95580..d0f4e9fd66 100644 --- a/easybuild/test/build.py +++ b/easybuild/test/build.py @@ -99,13 +99,13 @@ def setUp(self): # all log files and the test output as xml basename = "easybuild-test-%s" % datetime.now().strftime("%d-%m-%Y-%H:%M:%S") if opts.filename: - filename = opts.filename + filename = os.path.abspath(opts.filename) elif "EASYBUILDTESTOUTPUT" in os.environ: filename = os.environ["EASYBUILDTESTOUTPUT"] else: - filename = "easybuild-test.xml" + filename = os.path.join(self.cur_dir, basename, "easybuild-test.xml") - self.output_file = os.path.join(self.cur_dir, basename, filename) + self.output_file = filename self.output_dir = os.path.dirname(self.output_file) if not os.path.isdir(self.output_dir): From a51726a55582881056d1318eb63174f6c134ae90 Mon Sep 17 00:00:00 2001 From: Toon Willems Date: Mon, 6 Aug 2012 11:40:52 +0200 Subject: [PATCH 372/798] fix bug where output directory was set wrong --- easybuild/test/build.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/easybuild/test/build.py b/easybuild/test/build.py index d0f4e9fd66..29e3fbf647 100644 --- a/easybuild/test/build.py +++ b/easybuild/test/build.py @@ -177,7 +177,8 @@ def submit_jobs(self, files): easybuild_vars[env_var] = os.environ[env_var] for easyconfig in files: - easybuild_vars['EASYBUILDTESTOUTPUT'] = os.path.join(self.output_dir, "%s.xml" % easyconfig) + easybuild_vars['EASYBUILDTESTOUTPUT'] = os.path.join(self.output_dir, "%s.xml" % + os.path.basename(easyconfig)) command = "cd %s && python %s %s" % (self.cur_dir, sys.argv[0], easyconfig) self.log.debug("submitting: %s" % command) self.log.debug("env vars set: %s" % easybuild_vars) From ecc69b7366f645be4fd86b85b8f63cbd348a6542 Mon Sep 17 00:00:00 2001 From: Kenneth Hoste Date: Mon, 6 Aug 2012 11:56:19 +0200 Subject: [PATCH 373/798] rebase on develop + cleanup of CPLEX support, binary classes and CPLEX/ORCA easyconfigs --- easybuild/easyblocks/b/binary.py | 12 ++-- easybuild/easyblocks/c/cplex.py | 69 ++++++++++--------- easybuild/easyblocks/p/packedbinary.py | 10 +-- easybuild/easyconfigs/c/CPLEX/cplex-12.4.eb | 16 ++--- .../o/ORCA/ORCA-2_9_1-linux_x86-64.eb | 41 +++++------ 5 files changed, 71 insertions(+), 77 deletions(-) diff --git a/easybuild/easyblocks/b/binary.py b/easybuild/easyblocks/b/binary.py index f1d1a621ab..22bbea07b6 100644 --- a/easybuild/easyblocks/b/binary.py +++ b/easybuild/easyblocks/b/binary.py @@ -35,6 +35,7 @@ class Binary(Application): def unpack_src(self): """Move all source files to the build directory""" + self.src[0]['finalpath'] = self.builddir # copy source to build dir. @@ -44,8 +45,8 @@ def unpack_src(self): try: shutil.copy2(src, self.builddir) os.chmod(dst, stat.S_IRWXU) - except (OSError, IOError): - self.log.exception("Couldn't copy %s to %s" % (src, self.builddir)) + except (OSError, IOError), err: + self.log.exception("Couldn't copy %s to %s: %s" % (src, self.builddir, err)) def configure(self): @@ -67,12 +68,9 @@ def make_install(self): shutil.copytree(self.getcfg('startfrom'), self.installdir, symlinks=True) def make_module_extra(self): - """ - Add the install directory to the PATH. - """ + """Add the install directory to the PATH.""" + txt = Application.make_module_extra(self) txt += self.moduleGenerator.prependPaths("PATH", [""]) - self.log.debug("make_module_extra added this: %s" % txt) - return txt diff --git a/easybuild/easyblocks/c/cplex.py b/easybuild/easyblocks/c/cplex.py index eb344689b9..fc8e98baea 100644 --- a/easybuild/easyblocks/c/cplex.py +++ b/easybuild/easyblocks/c/cplex.py @@ -21,26 +21,30 @@ """ EasyBuild support for CPLEX, implemented as an easyblock """ -import os -import shutil import glob +import os +import stat + +import easybuild.tools.environment as env from easybuild.easyblocks.b.binary import Binary from easybuild.tools.filetools import run_cmd_qa class CPLEX(Binary): """ - Version 12.2 has a self-extratcing package with a java installer + Support for installing CPLEX. + Version 12.2 has a self-extratcing package with a Java installer """ + def __init__(self, *args, **kwargs): - """Constructor""" + """Initialize CPLEX-specific variables.""" + Binary.__init__(self, *args, **kwargs) self.bindir = None def make_install(self): - """CPLEX has an installer that prompts for information, - so use Q&A here - """ + """CPLEX has an interactive installer, so use Q&A""" + tmpdir = os.path.join(self.builddir, 'tmp') try: os.chdir(self.builddir) @@ -49,52 +53,51 @@ def make_install(self): except OSError, err: self.log.exception("Failed to prepare for installation: %s" % err) - os.putenv('IATEMPDIR', tmpdir) - os.environ['IATEMPDIR'] = tmpdir + env.set('IATEMPDIR', tmpdir) dst = os.path.join(self.builddir, self.src[0]['name']) # Run the source cmd = "%s -i console" % dst - qanda = {"PRESS TO CONTINUE:":"", - 'Press Enter to continue viewing the license agreement, or enter' \ - ' "1" to accept the agreement, "2" to decline it, "3" to print it,' \ - ' or "99" to go back to the previous screen.:':'1', - 'ENTER AN ABSOLUTE PATH, OR PRESS TO ACCEPT THE DEFAULT :':self.installdir, - 'IS THIS CORRECT? (Y/N):':'y', - 'PRESS TO INSTALL:':"", - "PRESS TO EXIT THE INSTALLER:":"", - "CHOOSE LOCALE BY NUMBER:":"", - "Choose Instance Management Option:":"" - } + qanda = { + "PRESS TO CONTINUE:":"", + 'Press Enter to continue viewing the license agreement, or enter' \ + ' "1" to accept the agreement, "2" to decline it, "3" to print it,' \ + ' or "99" to go back to the previous screen.:':'1', + 'ENTER AN ABSOLUTE PATH, OR PRESS TO ACCEPT THE DEFAULT :':self.installdir, + 'IS THIS CORRECT? (Y/N):':'y', + 'PRESS TO INSTALL:':"", + "PRESS TO EXIT THE INSTALLER:":"", + "CHOOSE LOCALE BY NUMBER:":"", + "Choose Instance Management Option:":"" + } noqanda = [r'Installing\.\.\..*\n.*------.*\n\n.*============.*\n.*$'] run_cmd_qa(cmd, qanda, no_qa=noqanda, log_all=True, simple=True) try: - os.chmod(self.installdir, stat.S_IRWXU | stat.S_IXOTH | stat.S_IXGRP | stat.S_IROTH | stat.S_IRGRP) - except OSError: - self.log.exception("Can't set permissions on %s" % self.installdir) + os.chmod(self.installdir, stat.S_IRWXU|stat.S_IXOTH|stat.S_IXGRP|stat.S_IROTH|stat.S_IRGRP) + except OSError, err: + self.log.exception("Can't set permissions on %s: %s" % (self.installdir, err)) # determine bin dir os.chdir(self.installdir) binglob = 'cplex/bin/x86-64*' bins = glob.glob(binglob) - if len(bins): - if len(bins) > 1: - self.log.error("More then one possible path for bin found: %s" % bins) - else: - self.bindir = bins[0] + + if len(bins) == 1: + self.bindir = bins[0] + elif len(bins) > 1: + self.log.error("More than one possible path for bin found: %s" % bins) else: self.log.error("No bins found using %s in %s" % (binglob, self.installdir)) def make_module_extra(self): - """ - Add installdir to path and set CPLEX_HOME - """ + """Add installdir to path and set CPLEX_HOME""" + txt = Binary.make_module_extra(self) - txt += "prepend-path\tPATH\t\t$root/%s\n" % self.bindir - txt += "setenv\tCPLEX_HOME\t\t$root/cplex" + txt += self.moduleGenerator.prependPaths("PATH", [self.bindir]) + txt += self.moduleGenerator.setEnvironment("CPLEX_HOME", "$root/cplex") self.log.debug("make_module_extra added %s" % txt) return txt diff --git a/easybuild/easyblocks/p/packedbinary.py b/easybuild/easyblocks/p/packedbinary.py index ce62d52f75..385dc4ca11 100644 --- a/easybuild/easyblocks/p/packedbinary.py +++ b/easybuild/easyblocks/p/packedbinary.py @@ -19,18 +19,18 @@ # along with EasyBuild. If not, see . ## """ -EasyBlock for binary applications that need unpacking -E.g., binary applications shipped as a .tar.gz file. +EasyBlock for binary applications that need unpacking, +e.g., binary applications shipped as a .tar.gz file """ + from easybuild.framework.application import Application from easybuild.easyblocks.b.binary import Binary class PackedBinary(Binary, Application): - """Support for installing a binary package. - Just copy it's sources to the installdir""" + """Support for installing a packed binary package. + Just unpack it's source in the installdir""" def unpack_src(self): """Unpack the source""" Application.unpack_src(self) - diff --git a/easybuild/easyconfigs/c/CPLEX/cplex-12.4.eb b/easybuild/easyconfigs/c/CPLEX/cplex-12.4.eb index 6ee9917fa0..53f9fb6240 100644 --- a/easybuild/easyconfigs/c/CPLEX/cplex-12.4.eb +++ b/easybuild/easyconfigs/c/CPLEX/cplex-12.4.eb @@ -1,11 +1,11 @@ -name='CPLEX' -version='12.4' +name = 'CPLEX' +version = '12.4' -homepage='http://www-01.ibm.com/software/integration/optimization/cplex-optimizer/' -description="""IBM ILOG CPLEX Optimizer's mathematical programming technology enables - analytical decision support for improving efficiency, - reducing costs, and increasing profitability.""" +homepage = 'http://www-01.ibm.com/software/integration/optimization/cplex-optimizer/' +description = """IBM ILOG CPLEX Optimizer's mathematical programming technology enables +analytical decision support for improving efficiency, +reducing costs, and increasing profitability.""" -toolkit={'name':'dummy','version':'dummy'} +toolkit = {'name':'dummy', 'version':'dummy'} -sources=['cplex_studio%s.linux-x86-64.bin' % ''.join(version.split('.'))] \ No newline at end of file +sources = ['cplex_studio%s.linux-x86-64.bin' % ''.join(version.split('.'))] \ No newline at end of file diff --git a/easybuild/easyconfigs/o/ORCA/ORCA-2_9_1-linux_x86-64.eb b/easybuild/easyconfigs/o/ORCA/ORCA-2_9_1-linux_x86-64.eb index 851b448f12..325a86930e 100644 --- a/easybuild/easyconfigs/o/ORCA/ORCA-2_9_1-linux_x86-64.eb +++ b/easybuild/easyconfigs/o/ORCA/ORCA-2_9_1-linux_x86-64.eb @@ -1,36 +1,29 @@ -easyblock="PackedBinary" +easyblock = "PackedBinary" -name="ORCA" -version='2_9_1-linux_x86-64' +name = "ORCA" +version = '2_9_1-linux_x86-64' -homepage='http://www.thch.uni-bonn.de/tc/orca/' -description="""ORCA is a flexible, efficient and easy-to-use general purpose tool for quantum chemistry +homepage = 'http://www.thch.uni-bonn.de/tc/orca/' +description = """ORCA is a flexible, efficient and easy-to-use general purpose tool for quantum chemistry with specific emphasis on spectroscopic properties of open-shell molecules. It features a wide variety of standard quantum chemical methods ranging from semiempirical methods to DFT to single- and multireference correlated ab initio methods. It can also treat environmental and relativistic effects.""" -toolkit={'name':'dummy','version':'dummy'} -dependencies=[ - ('OpenMPI','1.4.5','-GCC-4.6.3-no-OFED'), - ] +toolkit = {'name':'dummy', 'version':'dummy'} +dependencies = [('OpenMPI','1.4.5','-GCC-4.6.3-no-OFED')] -sources=['%s_%s_%s.tbz' % (name.lower(), version.split('-')[0], "-".join(version.split('-')[1:]))] +sources = ['%s_%s_%s.tbz' % (name.lower(), version.split('-')[0], "-".join(version.split('-')[1:]))] sanityCheckPaths = { - 'files':['orca', 'orca_2mkl', 'orca_anoint', - 'orca_anoint_mpi', 'orca_asa', 'orca_casscf', - 'orca_casscf_mpi', 'orca_chelpg', 'orca_ciprep', - 'orca_cis', 'orca_cis_mpi', 'orca_cleanup', 'orca_cleanup_mpi', - 'orca_cpscf', 'orca_cpscf_mpi', 'orca_eca', 'orca_ecplib', - 'orca_eprnmr', 'orca_eprnmr_mpi', 'orca_euler', 'orca_fci', - 'orca_fitpes', 'orca_gstep', 'orca_gtoint', 'orca_gtoint_mpi', - 'orca_loc', 'orca_mapspc', 'orca_md', 'orca_mdci', 'orca_mdci_mpi', - 'orca_mergefrag', 'orca_mp2', 'orca_mp2_mpi', 'orca_mrci', - 'orca_mrci_mpi', 'orca_ndoint', 'orca_numfreq', 'orca_pc', - 'orca_pc_mpi', 'orca_plot', 'orca_pltvib', 'orca_pop', - 'orca_rel', 'orca_rocis', 'orca_rocis_mpi', 'orca_scf', - 'orca_scfgrad', 'orca_scfgrad_mpi', 'orca_scf_mpi', 'orca_soc', - 'orca_soc_mpi', 'orca_vib', 'orca_vpot', 'otool_cosmo'], + 'files':['orca_%s%s' % (x,y) for x in ['anoint', 'casscf', 'cis', 'cleanup', 'cpscf', + 'eprnmr', , 'gtoint', 'mdci', 'mp2', 'mrci', 'pc', + 'rocis', 'scf', 'scfgrad', 'soc'] + for y in ["", "_mpi]] + \ + :['orca_%s' % x for x in ['2mkl', 'asa', 'chelpg', 'ciprep', 'eca', 'ecplib', + 'euler', 'fci', 'fitpes', 'gstep', 'loc', 'mapspc', + 'md', 'mergefrag', 'ndoint', 'numfreq', 'plot', + 'pltvib', 'pop', 'rel', 'vib', 'vpot', 'cosmo'] + \ + ['orca', 'otool_cosmo'], 'dirs':[] } \ No newline at end of file From d6f361cc6726a397baef747c526429a8a7fd1edb Mon Sep 17 00:00:00 2001 From: Kenneth Hoste Date: Mon, 6 Aug 2012 12:04:32 +0200 Subject: [PATCH 374/798] fix typos in ORCA example easyconfig --- .../easyconfigs/o/ORCA/ORCA-2_9_1-linux_x86-64.eb | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/easybuild/easyconfigs/o/ORCA/ORCA-2_9_1-linux_x86-64.eb b/easybuild/easyconfigs/o/ORCA/ORCA-2_9_1-linux_x86-64.eb index 325a86930e..79bbecc98d 100644 --- a/easybuild/easyconfigs/o/ORCA/ORCA-2_9_1-linux_x86-64.eb +++ b/easybuild/easyconfigs/o/ORCA/ORCA-2_9_1-linux_x86-64.eb @@ -17,13 +17,13 @@ sources = ['%s_%s_%s.tbz' % (name.lower(), version.split('-')[0], "-".join(versi sanityCheckPaths = { 'files':['orca_%s%s' % (x,y) for x in ['anoint', 'casscf', 'cis', 'cleanup', 'cpscf', - 'eprnmr', , 'gtoint', 'mdci', 'mp2', 'mrci', 'pc', - 'rocis', 'scf', 'scfgrad', 'soc'] - for y in ["", "_mpi]] + \ - :['orca_%s' % x for x in ['2mkl', 'asa', 'chelpg', 'ciprep', 'eca', 'ecplib', - 'euler', 'fci', 'fitpes', 'gstep', 'loc', 'mapspc', - 'md', 'mergefrag', 'ndoint', 'numfreq', 'plot', - 'pltvib', 'pop', 'rel', 'vib', 'vpot', 'cosmo'] + \ + 'eprnmr', 'gtoint', 'mdci', 'mp2', 'mrci', 'pc', + 'rocis', 'scf', 'scfgrad', 'soc'] + for y in ["", "_mpi"]] + \ + ['orca_%s' % x for x in ['2mkl', 'asa', 'chelpg', 'ciprep', 'eca', 'ecplib', + 'euler', 'fci', 'fitpes', 'gstep', 'loc', 'mapspc', + 'md', 'mergefrag', 'ndoint', 'numfreq', 'plot', + 'pltvib', 'pop', 'rel', 'vib', 'vpot', 'cosmo']] + \ ['orca', 'otool_cosmo'], 'dirs':[] } \ No newline at end of file From 0b0dfa173d6e404c106f9fe67e3bcfc6a8f36378 Mon Sep 17 00:00:00 2001 From: Toon Willems Date: Mon, 6 Aug 2012 12:09:04 +0200 Subject: [PATCH 375/798] proper fix for distribute issue with python --- easybuild/easyblocks/p/python.py | 1 - .../Python/Python-3.2.3-goalf-1.1.0-no-OFED.eb | 17 +++++++++-------- .../p/Python/Python-3.2.3-ictce-4.0.6.eb | 17 +++++++++-------- 3 files changed, 18 insertions(+), 17 deletions(-) diff --git a/easybuild/easyblocks/p/python.py b/easybuild/easyblocks/p/python.py index f1fbe5b1d7..c207b4223a 100644 --- a/easybuild/easyblocks/p/python.py +++ b/easybuild/easyblocks/p/python.py @@ -55,7 +55,6 @@ def extra_packages_pre(self): # use __name__ here, since this is the module where DefaultPythonPackage is defined self.setcfg('pkgdefaultclass', (__name__, "DefaultPythonPackage")) self.setcfg('pkgfilter', ('python -c "import %(name)s"', "")) - self.setcfg('pkgmodulenames', {'distribute': 'setuptools'}) def make_install(self): """Extend make install to make sure that the 'python' command is present.""" diff --git a/easybuild/easyconfigs/p/Python/Python-3.2.3-goalf-1.1.0-no-OFED.eb b/easybuild/easyconfigs/p/Python/Python-3.2.3-goalf-1.1.0-no-OFED.eb index 7cfdb03fb3..f362ab6980 100644 --- a/easybuild/easyconfigs/p/Python/Python-3.2.3-goalf-1.1.0-no-OFED.eb +++ b/easybuild/easyconfigs/p/Python/Python-3.2.3-goalf-1.1.0-no-OFED.eb @@ -14,22 +14,23 @@ scipyversion = '0.10.1' pkglist=[ ('distribute','0.6.26'), ('pip','1.1'), - ('nose','1.1.2'), # used extends unit testing - ('numpy',numpyversion), - ('scipy',scipyversion), + ('nose','1.1.2'), # used extends unit testing + ('numpy',numpyversion), + ('scipy',scipyversion), ('mpi4py','1.3') ] +pkgmodulenames = {'distribute': 'setuptools'} + sources=['%s-%s.tgz'%(name,version)] sourceURLs=[ - 'http://www.python.org/ftp/%s/%s/' % (name.lower(),version), # Python + 'http://www.python.org/ftp/%s/%s/' % (name.lower(),version), # Python 'http://pypi.python.org/packages/source/d/distribute', # distribute 'http://pypi.python.org/packages/source/p/pip/', # pip - 'http://pypi.python.org/packages/source/n/nose/', # nose - ('http://sourceforge.net/projects/numpy/files/NumPy/%s' % numpyversion, 'download'), # numpy - ('http://sourceforge.net/projects/scipy/files/scipy/%s' % scipyversion, 'download'), # scipy + 'http://pypi.python.org/packages/source/n/nose/', # nose + ('http://sourceforge.net/projects/numpy/files/NumPy/%s' % numpyversion, 'download'), # numpy + ('http://sourceforge.net/projects/scipy/files/scipy/%s' % scipyversion, 'download'), # scipy 'http://mpi4py.googlecode.com/files', # mpi4py - ] configopts="--with-threads --enable-shared" diff --git a/easybuild/easyconfigs/p/Python/Python-3.2.3-ictce-4.0.6.eb b/easybuild/easyconfigs/p/Python/Python-3.2.3-ictce-4.0.6.eb index 62df309805..d5cd64af95 100644 --- a/easybuild/easyconfigs/p/Python/Python-3.2.3-ictce-4.0.6.eb +++ b/easybuild/easyconfigs/p/Python/Python-3.2.3-ictce-4.0.6.eb @@ -14,22 +14,23 @@ scipyversion = '0.10.1' pkglist=[ ('distribute','0.6.26'), ('pip','1.1'), - ('nose','1.1.2'), # used extends unit testing - ('numpy',numpyversion), - ('scipy',scipyversion), + ('nose','1.1.2'), # used extends unit testing + ('numpy',numpyversion), + ('scipy',scipyversion), ('mpi4py','1.3') ] +pkgmodulenames = {'distribute': 'setuptools'} + sources=['%s-%s.tgz'%(name,version)] sourceURLs=[ - 'http://www.python.org/ftp/%s/%s/' % (name.lower(),version), # Python + 'http://www.python.org/ftp/%s/%s/' % (name.lower(),version), # Python 'http://pypi.python.org/packages/source/d/distribute', # distribute 'http://pypi.python.org/packages/source/p/pip/', # pip - 'http://pypi.python.org/packages/source/n/nose/', # nose - ('http://sourceforge.net/projects/numpy/files/NumPy/%s' % numpyversion, 'download'), # numpy - ('http://sourceforge.net/projects/scipy/files/scipy/%s' % scipyversion, 'download'), # scipy + 'http://pypi.python.org/packages/source/n/nose/', # nose + ('http://sourceforge.net/projects/numpy/files/NumPy/%s' % numpyversion, 'download'), # numpy + ('http://sourceforge.net/projects/scipy/files/scipy/%s' % scipyversion, 'download'), # scipy 'http://mpi4py.googlecode.com/files', # mpi4py - ] configopts="--with-threads --enable-shared" From 5e3b3443d8184df04d592b8fc503b18480fb2064 Mon Sep 17 00:00:00 2001 From: Kenneth Hoste Date: Mon, 6 Aug 2012 12:15:45 +0200 Subject: [PATCH 376/798] fix typo in custom sanity check for ORCA --- easybuild/easyconfigs/o/ORCA/ORCA-2_9_1-linux_x86-64.eb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/easybuild/easyconfigs/o/ORCA/ORCA-2_9_1-linux_x86-64.eb b/easybuild/easyconfigs/o/ORCA/ORCA-2_9_1-linux_x86-64.eb index 79bbecc98d..f2bad21dfa 100644 --- a/easybuild/easyconfigs/o/ORCA/ORCA-2_9_1-linux_x86-64.eb +++ b/easybuild/easyconfigs/o/ORCA/ORCA-2_9_1-linux_x86-64.eb @@ -23,7 +23,7 @@ sanityCheckPaths = { ['orca_%s' % x for x in ['2mkl', 'asa', 'chelpg', 'ciprep', 'eca', 'ecplib', 'euler', 'fci', 'fitpes', 'gstep', 'loc', 'mapspc', 'md', 'mergefrag', 'ndoint', 'numfreq', 'plot', - 'pltvib', 'pop', 'rel', 'vib', 'vpot', 'cosmo']] + \ + 'pltvib', 'pop', 'rel', 'vib', 'vpot']] + \ ['orca', 'otool_cosmo'], 'dirs':[] } \ No newline at end of file From 4541540852713875af8537be0c592b516f892dea Mon Sep 17 00:00:00 2001 From: Kenneth Hoste Date: Mon, 6 Aug 2012 16:53:44 +0200 Subject: [PATCH 377/798] fix minor remarks --- easybuild/easyblocks/c/cplex.py | 2 +- easybuild/easyblocks/p/packedbinary.py | 4 +++- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/easybuild/easyblocks/c/cplex.py b/easybuild/easyblocks/c/cplex.py index fc8e98baea..28f4150213 100644 --- a/easybuild/easyblocks/c/cplex.py +++ b/easybuild/easyblocks/c/cplex.py @@ -33,7 +33,7 @@ class CPLEX(Binary): """ Support for installing CPLEX. - Version 12.2 has a self-extratcing package with a Java installer + Version 12.2 has a self-extracting package with a Java installer """ def __init__(self, *args, **kwargs): diff --git a/easybuild/easyblocks/p/packedbinary.py b/easybuild/easyblocks/p/packedbinary.py index 385dc4ca11..79d8a256be 100644 --- a/easybuild/easyblocks/p/packedbinary.py +++ b/easybuild/easyblocks/p/packedbinary.py @@ -26,9 +26,11 @@ from easybuild.framework.application import Application from easybuild.easyblocks.b.binary import Binary + class PackedBinary(Binary, Application): """Support for installing a packed binary package. - Just unpack it's source in the installdir""" + Just unpack its source in the installdir + """ def unpack_src(self): """Unpack the source""" From b9a5dba225e728821b36b738ee34c65ffe476997 Mon Sep 17 00:00:00 2001 From: Toon Willems Date: Mon, 6 Aug 2012 17:00:03 +0200 Subject: [PATCH 378/798] use name() instead of eb['name'] --- easybuild/build.py | 2 +- easybuild/framework/easyblock.py | 6 ++++++ 2 files changed, 7 insertions(+), 1 deletion(-) diff --git a/easybuild/build.py b/easybuild/build.py index 93b82a11cc..f338e65e1b 100644 --- a/easybuild/build.py +++ b/easybuild/build.py @@ -316,7 +316,7 @@ def processEasyconfig(path, log, onlyBlocks=None, regtest_online=False): ## this app will appear as following module in the list package = { 'spec': spec, - 'module': (eb['name'], eb.installversion()), + 'module': (eb.name(), eb.installversion()), 'dependencies': [] } if len(blocks) > 1: diff --git a/easybuild/framework/easyblock.py b/easybuild/framework/easyblock.py index fdb55daabe..1c3b9af6fb 100644 --- a/easybuild/framework/easyblock.py +++ b/easybuild/framework/easyblock.py @@ -236,6 +236,12 @@ def installversion(self): return name + def name(self): + """ + return name of the package + """ + return self['name'] + def _validate(self, attr, values): """ validation helper method. attr is the attribute it will check, values are the possible values. From b04fbcbbf8390b249acb8cb76593bc370c9d1450 Mon Sep 17 00:00:00 2001 From: Toon Willems Date: Mon, 6 Aug 2012 17:01:25 +0200 Subject: [PATCH 379/798] move to previous line --- easybuild/easyblocks/c/cp2k.py | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/easybuild/easyblocks/c/cp2k.py b/easybuild/easyblocks/c/cp2k.py index 245f755ea5..7661d64f71 100644 --- a/easybuild/easyblocks/c/cp2k.py +++ b/easybuild/easyblocks/c/cp2k.py @@ -198,8 +198,7 @@ def prepmodinc(self): else: self.log.error("prepmodinc: Please specify either a boolean value " \ - "or a list of files in modinc (found: %s)." % - self.getcfg("modinc")) + "or a list of files in modinc (found: %s)." % self.getcfg("modinc")) f77 = os.getenv('F77') if not f77: From cdb975184d44e56aac1441e09e6b3e062bbda1f5 Mon Sep 17 00:00:00 2001 From: Toon Willems Date: Mon, 6 Aug 2012 17:04:49 +0200 Subject: [PATCH 380/798] update indentation of long line --- easybuild/easyblocks/i/ifort.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/easybuild/easyblocks/i/ifort.py b/easybuild/easyblocks/i/ifort.py index d77a4aef6c..0e33ecc545 100644 --- a/easybuild/easyblocks/i/ifort.py +++ b/easybuild/easyblocks/i/ifort.py @@ -46,7 +46,8 @@ def sanitycheck(self): self.setcfg('sanityCheckPaths', { 'files': ["bin/intel64/%s" % x for x in ["ifort", "idb"]] + - ["%s%s" % (libprefix, x) for x in ["ifcore.a", "ifcore.so", "iomp5.a", "iomp5.so"]], + ["%s%s" % (libprefix, x) for x in ["ifcore.a", "ifcore.so", + "iomp5.a", "iomp5.so"]], 'dirs': [] }) From 643502447e87c7a43f189add60fbacc90f6db8c4 Mon Sep 17 00:00:00 2001 From: Toon Willems Date: Mon, 6 Aug 2012 17:16:00 +0200 Subject: [PATCH 381/798] use local variable --- easybuild/easyblocks/i/itac.py | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/easybuild/easyblocks/i/itac.py b/easybuild/easyblocks/i/itac.py index cbabd426f5..a27d3f4e7c 100644 --- a/easybuild/easyblocks/i/itac.py +++ b/easybuild/easyblocks/i/itac.py @@ -82,11 +82,12 @@ def make_module_req_guess(self): """ A dictionary of possible directories to look for """ + preferredmpi = self.getcfg("preferredmpi") guesses = { 'MANPATH': ['man'], - 'CLASSPATH': ['itac/lib_%s' % self.getcfg('preferredmpi')], - 'VT_LIB_DIR': ['itac/lib_%s' % self.getcfg('preferredmpi')], - 'VT_SLIB_DIR': ['itac/lib_s%s' % self.getcfg('preferredmpi')] + 'CLASSPATH': ['itac/lib_%s' % preferredmpi], + 'VT_LIB_DIR': ['itac/lib_%s' % preferredmpi)], + 'VT_SLIB_DIR': ['itac/lib_s%s' % preferredmpi)] } if self.getcfg('m32'): From 38227738ab732980911e26991ba694027ac7834a Mon Sep 17 00:00:00 2001 From: Toon Willems Date: Mon, 6 Aug 2012 17:17:18 +0200 Subject: [PATCH 382/798] update sanitycheck for lapack docstring --- easybuild/easyblocks/l/lapack.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/easybuild/easyblocks/l/lapack.py b/easybuild/easyblocks/l/lapack.py index 46c5637dbb..ebbad41e7a 100644 --- a/easybuild/easyblocks/l/lapack.py +++ b/easybuild/easyblocks/l/lapack.py @@ -208,7 +208,7 @@ def make_module(self, fake=False): def sanitycheck(self): """ - Custom sanity check for LAPACK. only run when not testing + Custom sanity check for LAPACK (only run when not testing) """ if not self.getcfg('test_only'): if not self.getcfg('sanityCheckPaths'): From dc8171ce031b7a13f980d1961815250342e4099b Mon Sep 17 00:00:00 2001 From: Kenneth Hoste Date: Mon, 6 Aug 2012 21:35:21 +0200 Subject: [PATCH 383/798] remote superfluous empty line --- easybuild/easyblocks/b/binary.py | 1 - 1 file changed, 1 deletion(-) diff --git a/easybuild/easyblocks/b/binary.py b/easybuild/easyblocks/b/binary.py index eea0932143..84855b4cdb 100644 --- a/easybuild/easyblocks/b/binary.py +++ b/easybuild/easyblocks/b/binary.py @@ -52,7 +52,6 @@ def unpack_src(self): except (OSError, IOError), err: self.log.exception("Couldn't copy %s to %s: %s" % (src, self.builddir, err)) - def configure(self): """No configuration, this is a binary package""" pass From 84d5738c7cec0d7d995471e5f0e5c3d96cd7b3e0 Mon Sep 17 00:00:00 2001 From: Toon Willems Date: Mon, 6 Aug 2012 21:40:02 +0200 Subject: [PATCH 384/798] cleanup python easyblock --- easybuild/easyblocks/p/python.py | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/easybuild/easyblocks/p/python.py b/easybuild/easyblocks/p/python.py index 90848077d8..311f3abb3c 100644 --- a/easybuild/easyblocks/p/python.py +++ b/easybuild/easyblocks/p/python.py @@ -185,8 +185,9 @@ def run(self): self.test() self.make_install() - def getcfg(self, *args): - return self.mself.getcfg(*args) + def getcfg(self, *args, **kwargs): + return self.mself.getcfg(*args, **kwargs) + class Nose(DefaultPythonPackage): """nose package""" @@ -198,6 +199,7 @@ def __init__(self, mself, pkg, pkginstalldeps): # and tar exiting with non-zero exit code self.unpack_options = ' --pax-option="delete=SCHILY.*" --pax-option="delete=LIBARCHIVE.*" ' + class FortranPythonPackage(DefaultPythonPackage): """Extends DefaultPythonPackage to add a Fortran compiler to the make call""" From 95326eeea09ee64e10a920a41e76216d07446def Mon Sep 17 00:00:00 2001 From: Toon Willems Date: Mon, 6 Aug 2012 21:42:31 +0200 Subject: [PATCH 385/798] exitsing -> existing --- easybuild/framework/application.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/easybuild/framework/application.py b/easybuild/framework/application.py index 3a473730e2..7d63522e87 100644 --- a/easybuild/framework/application.py +++ b/easybuild/framework/application.py @@ -345,7 +345,7 @@ def ready2build(self): if Modules().exists(self.name(), self.installversion()): self.skip = True self.log.info("Current version (name: %s, version: %s) found. Going to skip actually main build and\ - potential exitsing packages. Expert only." % (self.name(), self.installversion())) + potential existing packages. Expert only." % (self.name(), self.installversion())) else: self.log.info("No current version (name: %s, version: %s) found. Not skipping anything." % (self.name(), self.installversion())) From bbcf2d17044bc4dbcc6b678f279fce9880fab94b Mon Sep 17 00:00:00 2001 From: Toon Willems Date: Mon, 6 Aug 2012 21:44:30 +0200 Subject: [PATCH 386/798] 2 calls to log.debug --- easybuild/framework/application.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/easybuild/framework/application.py b/easybuild/framework/application.py index 7d63522e87..eed9dce455 100644 --- a/easybuild/framework/application.py +++ b/easybuild/framework/application.py @@ -329,8 +329,8 @@ def ready2build(self): # Do all dependencies have a toolkit version self.toolkit().addDependencies(self.cfg.dependencies()) if not len(self.cfg.dependencies()) == len(self.toolkit().dependencies): - self.log.debug("dep %s (%s)\ntk.dep %s (%s)" % (len(self.cfg.dependencies()), self.cfg.dependencies(), - len(self.toolkit().dependencies), self.toolkit().dependencies)) + self.log.debug("dep %s (%s)" % (len(self.cfg.dependencies()), self.cfg.dependencies())) + self.log.debug("tk.dep %s (%s)" % (len(self.toolkit().dependencies), self.toolkit().dependencies)) self.log.error('Not all dependencies have a matching toolkit version') # Check if the application is not loaded at the moment From bc29c12bc8c7fe5b75572bed9cad687debc71bd7 Mon Sep 17 00:00:00 2001 From: Toon Willems Date: Mon, 6 Aug 2012 21:51:34 +0200 Subject: [PATCH 387/798] change docstring --- easybuild/framework/application.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/easybuild/framework/application.py b/easybuild/framework/application.py index eed9dce455..15811038d2 100644 --- a/easybuild/framework/application.py +++ b/easybuild/framework/application.py @@ -1429,7 +1429,7 @@ class StopException(Exception): def get_class_for(modulepath, class_name): """ - Get instance for a given class and easyblock module path. + Get class for a given class name and easyblock module path. """ # >>> import pkgutil # >>> loader = pkgutil.find_loader('easybuild.apps.Base') From 1332da025327727aa24edc8aec723e42d44f4058 Mon Sep 17 00:00:00 2001 From: Toon Willems Date: Mon, 6 Aug 2012 21:53:46 +0200 Subject: [PATCH 388/798] fix spaces --- easybuild/framework/easyblock.py | 100 +++++++++++++++---------------- 1 file changed, 50 insertions(+), 50 deletions(-) diff --git a/easybuild/framework/easyblock.py b/easybuild/framework/easyblock.py index 1c3b9af6fb..268c935837 100644 --- a/easybuild/framework/easyblock.py +++ b/easybuild/framework/easyblock.py @@ -29,6 +29,7 @@ from easybuild.tools.systemtools import get_shared_lib_ext from easybuild.tools.filetools import run_cmd + class EasyBlock: """ Class which handles loading, reading, validation of easyconfigs @@ -39,64 +40,63 @@ class EasyBlock: validstops = ['cfg', 'source', 'patch', 'configure', 'make', 'install', 'test', 'postproc', 'cleanup', 'packages'] default_config = { - 'name':[None, "Name of software"], - 'version':[None, "Version of software"], + 'name': [None, "Name of software"], + 'version': [None, "Version of software"], 'easybuildVersion': [None, "EasyBuild-version this spec-file was written for"], - 'group':[None, "Name of the user group for which the software should be available"], - 'versionsuffix':['', 'Additional suffix for software version (placed after toolkit name)'], - 'versionprefix':['', 'Additional prefix for software version (placed before version and toolkit name)'], - 'runtest':[None, 'Indicates if a test should be run after make; should specify argument after make (for e.g., "test" for make test) (Default: None)'], - 'preconfigopts':['', 'Extra options pre-passed to configure.'], - 'configopts':['', 'Extra options passed to configure (Default already has --prefix)'], - 'premakeopts':['', 'Extra options pre-passed to make.'], - 'makeopts':['', 'Extra options passed to make (Default already has -j X)'], - 'installopts':['', 'Extra options for installation (Default: nothing)'], - 'moduleclass':['base', 'Module class to be used for this software (Default: base) (Valid: %s)' % validmoduleclasses], - 'moduleforceunload':[False, 'Force unload of all modules when loading the package (Default: False)'], - 'moduleloadnoconflict':[False, "Don't check for conflicts, unload other versions instead (Default: False)"], - 'startfrom':[None, 'Path to start the make in. If the path is absolute, use that path. If not, this is added to the guessed path.'], - 'onlytkmod':[False, 'Boolean/string to indicate if the toolkit should only load the enviornment with module (True) or also set all other variables (False) like compiler CC etc (If string: comma separated list of variables that will be ignored). (Default: False)'], - 'stop':[None, 'Keyword to halt the buildprocess at certain points. Valid are %s' % validstops], - 'homepage':[None, 'The homepage of the software'], - 'description':[None, 'A short description of the software'], - 'parallel':[None, 'Degree of parallelism for e.g. make (default: based on the number of cores and restrictions in ulimit)'], - 'maxparallel':[None, 'Max degree of parallelism (default: None)'], - 'keeppreviousinstall':[False, 'Boolean to keep the previous installation with identical name. Default False, expert s only!'], - 'cleanupoldbuild':[True, 'Boolean to remove (True) or backup (False) the previous build directory with identical name or not. Default True'], - 'cleanupoldinstall':[True, 'Boolean to remove (True) or backup (False) the previous install directory with identical name or not. Default True'], - 'dontcreateinstalldir':[False, 'Boolean to create (False) or not create (True) the install directory (Default False)'], - 'toolkit':[None, 'Name and version of toolkit'], - 'toolkitopts':['', 'Extra options for compilers'], - 'keepsymlinks':[False, 'Boolean to determine whether symlinks are to be kept during copying or if the content of the files pointed to should be copied'], - 'licenseServer':[None, 'License server for software'], - 'licenseServerPort':[None, 'Port for license server'], - 'key':[None, 'Key for installing software'], - 'pkglist':[[], 'List with packages added to the baseinstallation (Default: [])'], - 'pkgmodulenames':[{}, 'Dictionary with real modules names for packages, if they are different from the package name (Default: {})'], - 'pkgloadmodule':[True, 'Load the to-be installed software using temporary module (Default: True)'], - 'pkgtemplate':["%s-%s.tar.gz", "Template for package source file names (Default: %s-%s.tar.gz)"], - 'pkgfindsource':[True, "Find sources for packages (Default: True)"], - 'pkginstalldeps':[True, "Install dependencies for specified packages if necessary (Default: True)"], - 'pkgdefaultclass':[None, "List of module for and name of the default package class (Default: None)"], - 'skip':[False, "Skip existing software (Default: False)"], - 'pkgfilter':[None, "Package filter details. List with template for cmd and input to cmd (templates for name, version and src). (Default: None)"], - 'pkgpatches':[[], 'List with patches for packages (default: [])'], - 'pkgcfgs':[{}, 'Dictionary with config parameters for packages (default: {})'], - 'dependencies':[[], "List of dependencies (default: [])"], - 'builddependencies':[[], "List of build dependencies (default: [])"], - 'unpackOptions':[None, "Extra options for unpacking source (default: None)"], - 'modextravars':[{}, "Extra environment variables to be added to module file (default: {})"], - 'osdependencies':[[], "Packages that should be present on the system"], + 'group': [None, "Name of the user group for which the software should be available"], + 'versionsuffix': ['', 'Additional suffix for software version (placed after toolkit name)'], + 'versionprefix': ['', 'Additional prefix for software version (placed before version and toolkit name)'], + 'runtest': [None, 'Indicates if a test should be run after make; should specify argument after make (for e.g., "test" for make test) (Default: None)'], + 'preconfigopts': ['', 'Extra options pre-passed to configure.'], + 'configopts': ['', 'Extra options passed to configure (Default already has --prefix)'], + 'premakeopts': ['', 'Extra options pre-passed to make.'], + 'makeopts': ['', 'Extra options passed to make (Default already has -j X)'], + 'installopts': ['', 'Extra options for installation (Default: nothing)'], + 'moduleclass': ['base', 'Module class to be used for this software (Default: base) (Valid: %s)' % validmoduleclasses], + 'moduleforceunload': [False, 'Force unload of all modules when loading the package (Default: False)'], + 'moduleloadnoconflict': [False, "Don't check for conflicts, unload other versions instead (Default: False)"], + 'startfrom': [None, 'Path to start the make in. If the path is absolute, use that path. If not, this is added to the guessed path.'], + 'onlytkmod': [False, 'Boolean/string to indicate if the toolkit should only load the enviornment with module (True) or also set all other variables (False) like compiler CC etc (If string: comma separated list of variables that will be ignored). (Default: False)'], + 'stop': [None, 'Keyword to halt the buildprocess at certain points. Valid are %s' % validstops], + 'homepage': [None, 'The homepage of the software'], + 'description': [None, 'A short description of the software'], + 'parallel': [None, 'Degree of parallelism for e.g. make (default: based on the number of cores and restrictions in ulimit)'], + 'maxparallel': [None, 'Max degree of parallelism (default: None)'], + 'keeppreviousinstall': [False, 'Boolean to keep the previous installation with identical name. Default False, expert s only!'], + 'cleanupoldbuild': [True, 'Boolean to remove (True) or backup (False) the previous build directory with identical name or not. Default True'], + 'cleanupoldinstall': [True, 'Boolean to remove (True) or backup (False) the previous install directory with identical name or not. Default True'], + 'dontcreateinstalldir': [False, 'Boolean to create (False) or not create (True) the install directory (Default False)'], + 'toolkit': [None, 'Name and version of toolkit'], + 'toolkitopts': ['', 'Extra options for compilers'], + 'keepsymlinks': [False, 'Boolean to determine whether symlinks are to be kept during copying or if the content of the files pointed to should be copied'], + 'licenseServer': [None, 'License server for software'], + 'licenseServerPort': [None, 'Port for license server'], + 'key': [None, 'Key for installing software'], + 'pkglist': [[], 'List with packages added to the baseinstallation (Default: [])'], + 'pkgmodulenames': [{}, 'Dictionary with real modules names for packages, if they are different from the package name (Default: {})'], + 'pkgloadmodule': [True, 'Load the to-be installed software using temporary module (Default: True)'], + 'pkgtemplate': ["%s-%s.tar.gz", "Template for package source file names (Default: %s-%s.tar.gz)"], + 'pkgfindsource': [True, "Find sources for packages (Default: True)"], + 'pkginstalldeps': [True, "Install dependencies for specified packages if necessary (Default: True)"], + 'pkgdefaultclass': [None, "List of module for and name of the default package class (Default: None)"], + 'skip': [False, "Skip existing software (Default: False)"], + 'pkgfilter': [None, "Package filter details. List with template for cmd and input to cmd (templates for name, version and src). (Default: None)"], + 'pkgpatches': [[], 'List with patches for packages (default: [])'], + 'pkgcfgs': [{}, 'Dictionary with config parameters for packages (default: {})'], + 'dependencies': [[], "List of dependencies (default: [])"], + 'builddependencies': [[], "List of build dependencies (default: [])"], + 'unpackOptions': [None, "Extra options for unpacking source (default: None)"], + 'modextravars': [{}, "Extra environment variables to be added to module file (default: {})"], + 'osdependencies': [[], "Packages that should be present on the system"], 'sources': [[], "List of source files"], - 'sourceURLs' : [[], "List of URLs for source files"], + 'sourceURLs': [[], "List of URLs for source files"], 'patches': [[], "List of patches to apply"], 'tests': [[], "List of test-scripts to run after install. A test script should return a non-zero exit status to fail"], 'sanityCheckPaths': [{}, "List of files and directories to check (format: {'files':, 'dirs':}, default: {})"], 'sanityCheckCommand': [None, "format: (name, options) e.g. ('gzip','-h') . If set to True it will use (name, '-h')"], - 'buildstats' : [None, "A list of dicts with buildstats: build_time, platform, core_count, cpu_model, install_size, timestamp"], + 'buildstats': [None, "A list of dicts with buildstats: build_time, platform, core_count, cpu_model, install_size, timestamp"], } - def __init__(self, path, extra_options={}, validate=True): # perform a deepcopy of the default_config found in the easybuild.tools.easyblock module self.config = copy.deepcopy(self.default_config) From 1b67cff880d8cfb5024fd874ab663be8ce54938c Mon Sep 17 00:00:00 2001 From: Toon Willems Date: Mon, 6 Aug 2012 22:04:26 +0200 Subject: [PATCH 389/798] add docstring --- easybuild/framework/easyblock.py | 10 ++- easybuild/scripts/port_easyblock.py | 118 ++++++++++++++-------------- easybuild/test/asyncprocess.py | 5 +- 3 files changed, 68 insertions(+), 65 deletions(-) diff --git a/easybuild/framework/easyblock.py b/easybuild/framework/easyblock.py index 268c935837..6ebf141b6c 100644 --- a/easybuild/framework/easyblock.py +++ b/easybuild/framework/easyblock.py @@ -98,6 +98,12 @@ class EasyBlock: } def __init__(self, path, extra_options={}, validate=True): + """ + initialize an easyconfig. + path should be a path to a file that can be parsed + extra_options is a dict of extra variables that can be set in this specific instance + validate specifies whether validations should happen + """ # perform a deepcopy of the default_config found in the easybuild.tools.easyblock module self.config = copy.deepcopy(self.default_config) self.config.update(extra_options) @@ -282,9 +288,7 @@ def _parse_dependency(self, dep): output dict contains these attributes: ['name', 'version', 'suffix', 'dummy', 'tk'] - """ - attr = ['name', 'version', 'suffix', 'dummy'] dependency = {'name': '', 'version': '', 'suffix': '', 'dummy': False} if isinstance(dep, dict): @@ -308,14 +312,12 @@ def _parse_dependency(self, dep): return dependency - def __getitem__(self, key): """ will return the value without the help text """ return self.config[key][0] - def __setitem__(self, key, value): """ sets the value of key in config. diff --git a/easybuild/scripts/port_easyblock.py b/easybuild/scripts/port_easyblock.py index 2e97bd1306..942c632496 100755 --- a/easybuild/scripts/port_easyblock.py +++ b/easybuild/scripts/port_easyblock.py @@ -82,65 +82,65 @@ def rename_module(path): def refactor(txt): """Refactor given text, by refactoring function names, etc.""" refactor_map = { - 'addDependency':'add_dependency', - 'addPatch':'addpatch', - 'addSource':'addsource', - 'apps.Application import Application':'framework.application import Application', - 'applyPatch':'apply_patch', - 'autoBuild':'autobuild', - 'buildInInstallDir':'build_in_installdir', - 'buildLog':'build_log', - 'checkOsdeps':'check_osdeps', - 'classDumper':'class_dumper', - 'closeLog':'closelog', - 'dumpConfigurationOptions':'dump_cfg_options', - 'easybuild.buildsoft':'easybuild.tools', - 'escapeSpecial':'escapespecial', - 'extraPackages':'extra_packages', - 'extraPackagesPre':'extra_packages_pre', - 'fileLocate':'file_locate', - 'fileTools':'filetools', - 'filterPackages':'filter_packages', - 'findPackagePatches':'find_package_patches', - 'genInstallDir':'gen_installdir', - 'getCfg':'getcfg', - 'getSoftwareRoot':'get_software_root', - 'getInstance':'get_instance', - 'importCfg':'process_ebfile', - 'logall':'log_all', - 'logok':'log_ok', - 'logOutput':'log_output', - 'makeBuildDir':'make_builddir', - 'makeDir':'make_dir', - 'makeInstall':'make_install', - 'makeInstallDir':'make_installdir', - 'makeInstallVersion':'make_installversion', - 'makeModule':'make_module', - 'makeModuleDescription':'make_module_description', - 'makeModuleDep':'make_module_dep', - 'makeModuleReq':'make_module_req', - 'makeModuleReqGuess':'make_module_req_guess', - 'makeModuleExtra':'make_module_extra', - 'makeModuleExtraPackages':'make_module_extra_packages', - 'moduleGenerator':'module_generator', - 'noqanda=':'no_qa=', - 'parseDependency':'parse_dependency', - 'readyToBuild':'ready2build', - 'runrun':'run_cmd', - 'runqanda':'run_cmd_qa', - 'runTests':'runtests', - 'runStep':'runstep', - 'packagesFindSource':'find_package_sources', - 'postProc':'postproc', - 'sanityCheck':'sanitycheck', - 'setCfg':'setcfg', - 'setLogger':'setlogger', - 'setNameVersion':'set_name_version', - 'setParallelism':'setparallelism', - 'setToolkit':'settoolkit', - 'startFrom':'startfrom', - 'stdqa=':'std_qa=', - 'unpackSrc':'unpack_src', + 'addDependency': 'add_dependency', + 'addPatch': 'addpatch', + 'addSource': 'addsource', + 'apps.Application import Application': 'framework.application import Application', + 'applyPatch': 'apply_patch', + 'autoBuild': 'autobuild', + 'buildInInstallDir': 'build_in_installdir', + 'buildLog': 'build_log', + 'checkOsdeps': 'check_osdeps', + 'classDumper': 'class_dumper', + 'closeLog': 'closelog', + 'dumpConfigurationOptions': 'dump_cfg_options', + 'easybuild.buildsoft': 'easybuild.tools', + 'escapeSpecial': 'escapespecial', + 'extraPackages': 'extra_packages', + 'extraPackagesPre': 'extra_packages_pre', + 'fileLocate': 'file_locate', + 'fileTools': 'filetools', + 'filterPackages': 'filter_packages', + 'findPackagePatches': 'find_package_patches', + 'genInstallDir': 'gen_installdir', + 'getCfg': 'getcfg', + 'getSoftwareRoot': 'get_software_root', + 'getInstance': 'get_instance', + 'importCfg': 'process_ebfile', + 'logall': 'log_all', + 'logok': 'log_ok', + 'logOutput': 'log_output', + 'makeBuildDir': 'make_builddir', + 'makeDir': 'make_dir', + 'makeInstall': 'make_install', + 'makeInstallDir': 'make_installdir', + 'makeInstallVersion': 'make_installversion', + 'makeModule': 'make_module', + 'makeModuleDescription': 'make_module_description', + 'makeModuleDep': 'make_module_dep', + 'makeModuleReq': 'make_module_req', + 'makeModuleReqGuess': 'make_module_req_guess', + 'makeModuleExtra': 'make_module_extra', + 'makeModuleExtraPackages': 'make_module_extra_packages', + 'moduleGenerator': 'module_generator', + 'noqanda=': 'no_qa=', + 'parseDependency': 'parse_dependency', + 'readyToBuild': 'ready2build', + 'runrun': 'run_cmd', + 'runqanda': 'run_cmd_qa', + 'runTests': 'runtests', + 'runStep': 'runstep', + 'packagesFindSource': 'find_package_sources', + 'postProc': 'postproc', + 'sanityCheck': 'sanitycheck', + 'setCfg': 'setcfg', + 'setLogger': 'setlogger', + 'setNameVersion': 'set_name_version', + 'setParallelism': 'setparallelism', + 'setToolkit': 'settoolkit', + 'startFrom': 'startfrom', + 'stdqa=': 'std_qa=', + 'unpackSrc': 'unpack_src', } totn = 0 diff --git a/easybuild/test/asyncprocess.py b/easybuild/test/asyncprocess.py index ca84d230cc..153aa08a62 100644 --- a/easybuild/test/asyncprocess.py +++ b/easybuild/test/asyncprocess.py @@ -20,10 +20,11 @@ ## import os import re - from unittest import TestCase, TestSuite -from easybuild.tools.asyncprocess import Popen + import easybuild.tools.asyncprocess as p +from easybuild.tools.asyncprocess import Popen + class AsyncProcessTest(TestCase): From ac9ecda8c99bb7157d728e7f3847760bc8d540e5 Mon Sep 17 00:00:00 2001 From: Toon Willems Date: Mon, 6 Aug 2012 22:08:37 +0200 Subject: [PATCH 390/798] fix import order --- easybuild/test/build.py | 11 +++++------ 1 file changed, 5 insertions(+), 6 deletions(-) diff --git a/easybuild/test/build.py b/easybuild/test/build.py index 29e3fbf647..fde18bc42e 100644 --- a/easybuild/test/build.py +++ b/easybuild/test/build.py @@ -29,18 +29,17 @@ import xml.dom.minidom as xml from datetime import datetime from optparse import OptionParser - from unittest import TestCase -from easybuild.tools.build_log import getLog, EasyBuildError, initLogger -from easybuild.framework.application import get_class, Application -from easybuild.build import findEasyconfigs, processEasyconfig, resolveDependencies -from easybuild.tools.filetools import modifyEnv -from easybuild.tools.pbs_job import PbsJob import easybuild import easybuild.tools.config as config import easybuild.tools.systemtools as systemtools import easybuild.tools.build_log as build_log +from easybuild.tools.build_log import getLog, EasyBuildError, initLogger +from easybuild.framework.application import get_class, Application +from easybuild.build import findEasyconfigs, processEasyconfig, resolveDependencies +from easybuild.tools.filetools import modifyEnv +from easybuild.tools.pbs_job import PbsJob class BuildTest(TestCase): From 3a88d8eff1ea2c2ecf0726c104b31b303f73a643 Mon Sep 17 00:00:00 2001 From: Toon Willems Date: Mon, 6 Aug 2012 22:10:44 +0200 Subject: [PATCH 391/798] consistent empty lines + docstring --- easybuild/test/easyblock.py | 2 ++ 1 file changed, 2 insertions(+) diff --git a/easybuild/test/easyblock.py b/easybuild/test/easyblock.py index 91690e94d2..7f1c4c845c 100644 --- a/easybuild/test/easyblock.py +++ b/easybuild/test/easyblock.py @@ -26,7 +26,9 @@ from easybuild.tools.build_log import EasyBuildError from easybuild.tools.systemtools import get_shared_lib_ext + class EasyBlockTest(TestCase): + """ Baseclass for easyblock testcases """ def setUp(self): self.eb_file = "tmp-test-file" From 955bff052a4c6fe9a33f5b08392e29a928d06706 Mon Sep 17 00:00:00 2001 From: Toon Willems Date: Mon, 6 Aug 2012 22:14:39 +0200 Subject: [PATCH 392/798] docstring all the things --- easybuild/test/easyblock.py | 15 ++++++++++++++- 1 file changed, 14 insertions(+), 1 deletion(-) diff --git a/easybuild/test/easyblock.py b/easybuild/test/easyblock.py index 7f1c4c845c..7851d8de39 100644 --- a/easybuild/test/easyblock.py +++ b/easybuild/test/easyblock.py @@ -45,7 +45,9 @@ def assertErrorRegex(self, error, regex, call, *args): except error, err: self.assertTrue(re.search(regex, err.msg)) + class TestEmpty(EasyBlockTest): + """ Test empty easyblocks """ contents = "# empty string" @@ -55,6 +57,7 @@ def runTest(self): class TestMandatory(EasyBlockTest): + """ Test mandatory variable validation """ contents = """ name = "pi" @@ -76,7 +79,9 @@ def runTest(self): self.assertEqual(eb['toolkit'], {"name":"dummy", "version": "dummy"}) self.assertEqual(eb['description'], "test easyblock") + class TestValidation(EasyBlockTest): + """ test other validations """ contents = """ name = "pi" @@ -109,7 +114,9 @@ def runTest(self): self.setUp() self.assertErrorRegex(EasyBuildError, "SyntaxError", EasyBlock, self.eb_file) + class TestSharedLibExt(EasyBlockTest): + """ test availability of shared_lib_ext in easyblock context """ contents = """ name = "pi" @@ -124,7 +131,9 @@ def runTest(self): eb = EasyBlock(self.eb_file) self.assertEqual(eb['sanityCheckPaths']['files'][0], "lib/lib.%s" % get_shared_lib_ext()) + class TestDependency(EasyBlockTest): + """ Test parsing of dependencies """ contents = """ name = "pi" @@ -175,7 +184,9 @@ def runTest(self): eb['dependencies'] = [{'name': "test"}] self.assertErrorRegex(EasyBuildError, "without version", eb.dependencies) + class TestExtraOptions(EasyBlockTest): + """ test extra options constructor """ contents = """ name = "pi" @@ -212,7 +223,9 @@ def runTest(self): # test if extra toolkit options are being passed self.assertEqual(eb.toolkit().opts['static'], True) + class TestSuggestions(EasyBlockTest): + """ test suggestions on typos """ contents = """ name = "pi" @@ -228,7 +241,7 @@ def runTest(self): self.assertErrorRegex(EasyBuildError, "suggestions: dependencies", EasyBlock, self.eb_file) - def suite(): + """ return all the tests in this file """ return TestSuite([TestDependency(), TestEmpty(), TestExtraOptions(), TestMandatory(), TestSharedLibExt(), TestSuggestions(), TestValidation()]) From fbfc38695eca758157ce73349771a9e53be8a317 Mon Sep 17 00:00:00 2001 From: Toon Willems Date: Mon, 6 Aug 2012 23:08:48 +0200 Subject: [PATCH 393/798] docstrings all over test/ --- easybuild/test/asyncprocess.py | 4 ++++ easybuild/test/easyblock.py | 10 ++++++++++ easybuild/test/filetools.py | 6 ++++++ easybuild/test/modulegenerator.py | 5 +++++ easybuild/test/modules.py | 6 +++++- easybuild/test/repository.py | 9 +++++++-- easybuild/test/robot.py | 17 +++++++++++++---- easybuild/test/suite.py | 6 ++++-- easybuild/test/toolkit.py | 11 +++++++++++ 9 files changed, 65 insertions(+), 9 deletions(-) diff --git a/easybuild/test/asyncprocess.py b/easybuild/test/asyncprocess.py index 153aa08a62..bde81b1c43 100644 --- a/easybuild/test/asyncprocess.py +++ b/easybuild/test/asyncprocess.py @@ -27,11 +27,14 @@ class AsyncProcessTest(TestCase): + """ Testcase for asyncprocess """ def setUp(self): + """ setup a basic shell """ self.shell = Popen('sh', stdin=p.PIPE, stdout=p.PIPE, shell=True, executable='/bin/bash') def runTest(self): + """ try echoing some text and see if it comes back out """ p.send_all(self.shell, "echo hello\n") self.assertEqual(p.recv_some(self.shell), "hello\n") @@ -43,5 +46,6 @@ def runTest(self): self.assertRaises(Exception, p.recv_some, self.shell) def suite(): + """ returns all the testcases in this module """ return TestSuite([AsyncProcessTest()]) diff --git a/easybuild/test/easyblock.py b/easybuild/test/easyblock.py index 7851d8de39..b335ae2fb2 100644 --- a/easybuild/test/easyblock.py +++ b/easybuild/test/easyblock.py @@ -31,15 +31,18 @@ class EasyBlockTest(TestCase): """ Baseclass for easyblock testcases """ def setUp(self): + """ create temporary easyconfig file """ self.eb_file = "tmp-test-file" f = open(self.eb_file, "w") f.write(self.contents) f.close() def tearDown(self): + """ make sure to remove the temporary file """ os.remove(self.eb_file) def assertErrorRegex(self, error, regex, call, *args): + """ convenience method to match regex with the error message """ try: call(*args) except error, err: @@ -52,6 +55,7 @@ class TestEmpty(EasyBlockTest): contents = "# empty string" def runTest(self): + """ empty files should not parse! """ self.assertRaises(EasyBuildError, EasyBlock, self.eb_file) self.assertErrorRegex(EasyBuildError, "expected a valid path", EasyBlock, "") @@ -65,6 +69,7 @@ class TestMandatory(EasyBlockTest): """ def runTest(self): + """ make sure all checking of mandatory variables works """ self.assertErrorRegex(EasyBuildError, "mandatory variable \w* not provided", EasyBlock, self.eb_file) self.contents += "\n".join(['homepage = "http://google.com"', 'description = "test easyblock"', @@ -93,6 +98,7 @@ class TestValidation(EasyBlockTest): """ def runTest(self): + """ test other validations beside mandatory variables """ eb = EasyBlock(self.eb_file, validate=False) self.assertErrorRegex(EasyBuildError, "\w* provided \w* is not valid", eb.validate) @@ -128,6 +134,7 @@ class TestSharedLibExt(EasyBlockTest): """ def runTest(self): + """ inside easyconfigs shared_lib_ext should be set """ eb = EasyBlock(self.eb_file) self.assertEqual(eb['sanityCheckPaths']['files'][0], "lib/lib.%s" % get_shared_lib_ext()) @@ -146,6 +153,7 @@ class TestDependency(EasyBlockTest): """ def runTest(self): + """ test all possible ways of specifying dependencies """ eb = EasyBlock(self.eb_file) # should include builddependencies self.assertEqual(len(eb.dependencies()), 4) @@ -199,6 +207,7 @@ class TestExtraOptions(EasyBlockTest): """ def runTest(self): + """ extra_options should allow other variables to be stored """ eb = EasyBlock(self.eb_file) self.assertRaises(KeyError, lambda: eb['custom_key']) @@ -237,6 +246,7 @@ class TestSuggestions(EasyBlockTest): """ def runTest(self): + """ If a typo is present, suggestion should be provided (if possible) """ self.assertErrorRegex(EasyBuildError, "invalid variable dependencis", EasyBlock, self.eb_file) self.assertErrorRegex(EasyBuildError, "suggestions: dependencies", EasyBlock, self.eb_file) diff --git a/easybuild/test/filetools.py b/easybuild/test/filetools.py index ad3d9abd82..6aabffb953 100644 --- a/easybuild/test/filetools.py +++ b/easybuild/test/filetools.py @@ -26,8 +26,13 @@ import easybuild.tools.filetools as ft class FileToolsTest(TestCase): + """ Testcase for filetools module """ def runTest(self): + """ + verify all the possible extract commands + also run_cmd should work with some basic echo/exit combos + """ cmd = ft.extractCmd("test.zip") self.assertEqual("unzip -qq test.zip", cmd) @@ -75,4 +80,5 @@ def runTest(self): self.assertEqual(os.getcwd(), ft.findBaseDir()) def suite(): + """ returns all the testcases in this module """ return TestSuite([FileToolsTest()]) diff --git a/easybuild/test/modulegenerator.py b/easybuild/test/modulegenerator.py index dbf466a8fc..dd4682683a 100644 --- a/easybuild/test/modulegenerator.py +++ b/easybuild/test/modulegenerator.py @@ -26,13 +26,17 @@ from easybuild.tools.module_generator import ModuleGenerator from easybuild.framework.application import Application + class ModuleGeneratorTest(TestCase): + """ testcase for ModuleGenerator """ def setUp(self): + """ initialize ModuleGenerator with test Application """ self.modgen = ModuleGenerator(Application('easybuild/test/easyconfigs/gzip-1.4.eb')) self.modgen.app.installdir = "/tmp" def runTest(self): + """ since we set the installdir above, we can predict the output """ expected = """#%Module proc ModulesHelp { } { @@ -78,4 +82,5 @@ def runTest(self): self.assertEqual("setenv\tkey\t\tvalue\n", self.modgen.setEnvironment("key", "value")) def suite(): + """ returns all the testcases in this module """ return TestSuite([ModuleGeneratorTest()]) diff --git a/easybuild/test/modules.py b/easybuild/test/modules.py index 541d14d618..8e6f9d9222 100644 --- a/easybuild/test/modules.py +++ b/easybuild/test/modules.py @@ -20,13 +20,16 @@ ## import os +import easybuild.tools.modules as modules from unittest import TestCase, TestSuite from easybuild.tools.build_log import EasyBuildError, initLogger -import easybuild.tools.modules as modules + class ModulesTest(TestCase): + """ small test for Modules """ def runTest(self): + """ test if we load one module it is in the loaded_modules """ testmods = modules.Modules() ms = testmods.available('', None) if len(ms) != 0: @@ -39,6 +42,7 @@ def runTest(self): assert(tmp in testmods.loaded_modules()) def suite(): + """ returns all the testcases in this module """ return TestSuite([ModulesTest()]) diff --git a/easybuild/test/repository.py b/easybuild/test/repository.py index c8779e289e..0d98505b29 100644 --- a/easybuild/test/repository.py +++ b/easybuild/test/repository.py @@ -21,24 +21,29 @@ import os import re import shutil - from unittest import TestCase, TestSuite -import easybuild.tools.config as config +import easybuild.tools.config as config from easybuild.tools.repository import FileRepository + class RepositoryTest(TestCase): + """ very basis FileRepository test, we don't want git / svn dependency """ def setUp(self): + """ make sure temporary path does not exist """ self.path = '/tmp/tmp-easybuild-repo' shutil.rmtree(self.path, True) def runTest(self): + """ after initialization it should be the working copy """ repo = FileRepository(self.path) self.assertEqual(repo.wc, self.path) def tearDown(self): + """ clean up after myself """ shutil.rmtree(self.path, True) def suite(): + """ returns all the testcases in this module """ return TestSuite([RepositoryTest()]) diff --git a/easybuild/test/robot.py b/easybuild/test/robot.py index a34d6d7fdc..5c81d759da 100644 --- a/easybuild/test/robot.py +++ b/easybuild/test/robot.py @@ -20,24 +20,30 @@ ## import os from copy import deepcopy - from unittest import TestCase, TestSuite -from easybuild.tools.build_log import EasyBuildError, getLog -import easybuild.build as build + import easybuild.tools.modules as modules +import easybuild.build as build +from easybuild.tools.build_log import EasyBuildError, getLog from easybuild.tools.modules import Modules orig_modules = modules.Modules +base_easyconfig_dir = "easybuild/test/easyconfigs/" + + class MockModule(modules.Modules): + """ MockModule class, allows for controlling what Modules() will return """ def available(self, *args): + """ no module should be available """ return [] -base_easyconfig_dir = "easybuild/test/easyconfigs/" class RobotTest(TestCase): + """ Testcase for the robot dependency resolution """ def setUp(self): + """ dynamically replace Modules class with MockModule """ # replace Modules class with something we have control over modules.Modules = MockModule build.Modules = MockModule @@ -45,6 +51,7 @@ def setUp(self): self.log = getLog("RobotTest") def runTest(self): + """ Test with some basic testcases (also check if he can find dependencies inside the given directory """ package = { 'spec': '_', 'module': ("name", "version"), @@ -82,8 +89,10 @@ def runTest(self): def tearDown(self): + """ reset the Modules back to its original """ modules.Modules = orig_modules def suite(): + """ returns all the testcases in this module """ return TestSuite([RobotTest()]) diff --git a/easybuild/test/suite.py b/easybuild/test/suite.py index e979dc0a92..30358f56c2 100644 --- a/easybuild/test/suite.py +++ b/easybuild/test/suite.py @@ -18,6 +18,9 @@ # You should have received a copy of the GNU General Public License # along with EasyBuild. If not, see . ## +""" this module is a collection of all the testcases """ +import unittest + # toolkit should be first to allow hacks to work import easybuild.test.toolkit as t import easybuild.test.asyncprocess as a @@ -28,7 +31,6 @@ import easybuild.test.repository as r import easybuild.test.robot as robot -import unittest - +# call suite() for each module and then run them all suite = unittest.TestSuite(map(lambda x: x.suite(), [t, r, e, mg, m, f, a, robot])) unittest.TextTestRunner().run(suite) diff --git a/easybuild/test/toolkit.py b/easybuild/test/toolkit.py index 68b8b2ff14..c1f0575be3 100644 --- a/easybuild/test/toolkit.py +++ b/easybuild/test/toolkit.py @@ -32,8 +32,10 @@ OrigModules = modules.Modules class MockModule(modules.Modules): + """ MockModule class, which mocks Modules behaviour """ modules = [] def available(self, name=None, *args, **kwargs): + """ Change available to return values based on the given name """ if name == 'gzip': return [('gzip', '1.4')] elif name == 'icc': @@ -42,21 +44,27 @@ def available(self, name=None, *args, **kwargs): return [] def addModule(self, *args, **kwargs): + """ convenience method, just appends to a list we can access """ MockModule.modules.extend(*args) def load(*args, **kwargs): + """ Modules can handle this """ pass def dependencies_for(*args, **kwargs): + """ customize dependencies_for to always return an empty list """ return [] def get_software_root(*args, **kwargs): + """ this function is here so I can later replace the original """ return "tmp" class ToolkitTest(TestCase): + """ testcase for Toolkit """ def setUp(self): + """ set some toolkit objects, replace Modules class """ # dynamically replace Modules class toolkit.Modules = MockModule modules.Modules = MockModule @@ -68,6 +76,7 @@ def setUp(self): self.dummy_tk = Toolkit("dummy", "1.0") def runTest(self): + """ check parsing and interaction with Modules """ self.assertEqual(self.tk_32bit.name, 'icc') # assert m32flag has been set self.assertEqual(self.tk_32bit.m32flag, ' -m32') @@ -114,7 +123,9 @@ def runTest(self): MockModule.modules = [] def tearDown(self): + """ reset Modules to its original """ modules.Modules = OrigModules def suite(): + """ returns all the testcases in this module """ return TestSuite([ToolkitTest()]) From eadd8b225dbc54c6c4a4b2e542157937f5c9f193 Mon Sep 17 00:00:00 2001 From: Toon Willems Date: Tue, 7 Aug 2012 08:38:02 +0200 Subject: [PATCH 394/798] add spaces to test easyconfigs --- easybuild/test/easyconfigs/GCC-4.6.3.eb | 4 ++-- easybuild/test/easyconfigs/gzip-1.4-GCC-4.6.3.eb | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/easybuild/test/easyconfigs/GCC-4.6.3.eb b/easybuild/test/easyconfigs/GCC-4.6.3.eb index 9f6d17718c..0f55f10706 100644 --- a/easybuild/test/easyconfigs/GCC-4.6.3.eb +++ b/easybuild/test/easyconfigs/GCC-4.6.3.eb @@ -4,7 +4,7 @@ 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'} +toolkit={'name': 'dummy','version': 'dummy'} sources=['%s-%s.tar.gz'%(name.lower(),version), 'gmp-5.0.4.tar.bz2', @@ -17,7 +17,7 @@ sourceURLs=['http://ftpmirror.gnu.org/%(name)s/%(name)s-%(version)s' % {'name':n 'http://www.multiprecision.org/mpc/download', # MPC official ] -languages=['c','c++','fortran','lto'] +languages=['c', 'c++', 'fortran', 'lto'] ## compiler class moduleclass='compiler' diff --git a/easybuild/test/easyconfigs/gzip-1.4-GCC-4.6.3.eb b/easybuild/test/easyconfigs/gzip-1.4-GCC-4.6.3.eb index 6f8a868d57..fef34825e6 100644 --- a/easybuild/test/easyconfigs/gzip-1.4-GCC-4.6.3.eb +++ b/easybuild/test/easyconfigs/gzip-1.4-GCC-4.6.3.eb @@ -5,7 +5,7 @@ homepage = "http://www.gzip.org/" description = "gzip (GNU zip) is a popular data compression program as a replacement for compress" # test toolkit specification -toolkit = {'name':'GCC','version':'4.6.3'} +toolkit = {'name': 'GCC','version': '4.6.3'} # source tarball filename sources = ['%s-%s.tar.gz'%(name,version)] From 9baa34524b0761fde7ab9e3574e8bc7877495f0b Mon Sep 17 00:00:00 2001 From: Kenneth Hoste Date: Tue, 15 May 2012 09:54:55 +0200 Subject: [PATCH 395/798] ported support for building DOLFIN and Boost (untested) --- easybuild/easyblocks/b/boost.py | 126 ++++++++++++++++ easybuild/easyblocks/c/cmake.py | 45 ++++++ easybuild/easyblocks/c/cmakepythonpackage.py | 54 +++++++ easybuild/easyblocks/d/dolphin.py | 134 ++++++++++++++++++ easybuild/easyblocks/p/pythonpackage.py | 78 ++++++++++ .../b/Boost/.Boost-1.49.0-ictce-4.0.6.eb.swp | Bin 0 -> 12288 bytes .../b/Boost/Boost-1.49.0-ictce-4.0.6.eb | 24 ++++ .../d/DOLFIN/DOLFIN-1.0.0-ictce-4.0.6.eb | 40 ++++++ .../d/DOLFIN/wl_pkg_linkflags.patch | 20 +++ easybuild/tools/toolkit.py | 13 ++ 10 files changed, 534 insertions(+) create mode 100644 easybuild/easyblocks/b/boost.py create mode 100644 easybuild/easyblocks/c/cmake.py create mode 100644 easybuild/easyblocks/c/cmakepythonpackage.py create mode 100644 easybuild/easyblocks/d/dolphin.py create mode 100644 easybuild/easyblocks/p/pythonpackage.py create mode 100644 easybuild/easyconfigs/b/Boost/.Boost-1.49.0-ictce-4.0.6.eb.swp create mode 100644 easybuild/easyconfigs/b/Boost/Boost-1.49.0-ictce-4.0.6.eb create mode 100644 easybuild/easyconfigs/d/DOLFIN/DOLFIN-1.0.0-ictce-4.0.6.eb create mode 100644 easybuild/easyconfigs/d/DOLFIN/wl_pkg_linkflags.patch diff --git a/easybuild/easyblocks/b/boost.py b/easybuild/easyblocks/b/boost.py new file mode 100644 index 0000000000..1ed787a492 --- /dev/null +++ b/easybuild/easyblocks/b/boost.py @@ -0,0 +1,126 @@ +## +# Copyright 2009-2012 Stijn Deweirdt, Dries Verdegem, Kenneth Hoste, Pieter De Baets, Jens Timmerman +# +# This file is part of EasyBuild, +# originally created by the HPC team of the University of Ghent (http://ugent.be/hpc). +# +# http://github.com/hpcugent/easybuild +# +# EasyBuild is free software: you can redistribute it and/or modify +# it under the terms of the GNU General Public License as published by +# the Free Software Foundation v2. +# +# EasyBuild is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with EasyBuild. If not, see . +## +import os +import shutil +from easybuild.framework.application import Application +from easybuild.tools.filetools import run_cmd + +class Boost(Application): + + def __init__(self, *args, **kwargs): + Application.__init__(self, args, kwargs) + self.cfg.update({'boost_mpi':[False, "Build mpi boost module (default: False)"]}) + + def configure(self): + """Configure Boost build using custom tools""" + + # create build directory (Boost doesn't like being built in source dir) + try: + self.objdir = os.path.join(self.builddir, 'obj') + os.mkdir(self.objdir) + self.log.debug("Succesfully created directory %s" % self.objdir) + except OSError, err: + self.log.error("Failed to create directory %s: %s" % (self.objdir, err)) + + # generate config depending on compiler used + toolset = None + if os.getenv('SOFTROOTICC'): + toolset = 'intel-linux' + elif os.getenv('SOFTROOTGCC'): + toolset = 'gcc' + else: + self.log.error("Unknown compiler used, aborting.") + + cmd = "./bootstrap.sh --with-toolset=%s --prefix=%s" % (toolset, self.objdir) + + run_cmd(cmd, log_all=True, simple=True) + + if self.getcfg('boost_mpi'): + + self.tk.opts['usempi'] = True + # configure the boost mpi module + # http://www.boost.org/doc/libs/1_47_0/doc/html/mpi/getting_started.html + # let Boost.Build know to look here for the config file + f = open('user-config.jam', 'a') + f.write("using mpi : %s ;" % os.getenv("MPICXX")) + f.close() + + + def make(self): + """Build Boost with bjam tool.""" + + bjamoptions = " --prefix=%s" % self.objdir + + if self.getcfg('boost_mpi'): + + self.log.info("Building boost_mpi library") + + bjammpioptions = "%s --user-config=user-config.jam --with-mpi" % bjamoptions + + # build mpi lib first + try: + # let bjam know about the user-config.jam file we created in the configure step + run_cmd("./bjam %s" % bjammpioptions, log_all=True, simple=True) + except Exception, err: + self.log.error("Failed to build the Boost MPI library: %s" % err) + + try: + # boost.mpi was built, let's 'install' it now + run_cmd("./bjam %s install" % bjammpioptions, log_all=True, simple=True) + except Exception, err: + self.log.error("Failed to install the Boost MPI library in %s: %s" % (self.objdir, err)) + + # install remainder of boost libraries + self.log.info("Installing boost libraries") + + cmd = "./bjam %s install" % bjamoptions + try: + run_cmd(cmd, log_all=True, simple=True) + except Exception, err: + self.log.error("Failed to build the Boost libraries: %s" % err) + + def make_install(self): + """Install Boost by copying file to install dir.""" + + self.log.info("Copying %s to installation dir %s" % (self.objdir, self.installdir)) + + try: + for f in os.listdir(self.objdir): + src = os.path.join(self.objdir, f) + dst = os.path.join(self.installdir, f) + if os.path.isdir(src): + shutil.copytree(src, dst) + else: + shutil.copy2(src, dst) + except OSError, err: + self.log.error("Copying %s to installation dir %s failed: %s" % (self.objdir, self.installdir, err)) + + def sanitycheck(self): + """Custom sanity check for Boost.""" + + if not self.getcfg('sanityCheckPaths'): + + self.setcfg('sanityCheckPaths', {'files': ['lib/libboost_%s.so' % x for x in ['python', 'system']], + 'dirs':['include/boost']}) + + self.log.info("Customized sanity check paths: %s" % self.getcfg('sanityCheckPaths')) + + Application.sanitycheck(self) \ No newline at end of file diff --git a/easybuild/easyblocks/c/cmake.py b/easybuild/easyblocks/c/cmake.py new file mode 100644 index 0000000000..db1e09262d --- /dev/null +++ b/easybuild/easyblocks/c/cmake.py @@ -0,0 +1,45 @@ +## +# Copyright 2009-2012 Stijn Deweirdt, Dries Verdegem, Kenneth Hoste, Pieter De Baets, Jens Timmerman +# +# This file is part of EasyBuild, +# originally created by the HPC team of the University of Ghent (http://ugent.be/hpc). +# +# http://github.com/hpcugent/easybuild +# +# EasyBuild is free software: you can redistribute it and/or modify +# it under the terms of the GNU General Public License as published by +# the Free Software Foundation v2. +# +# EasyBuild is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with EasyBuild. If not, see . +## +import os +from easybuild.framework.application import Application +from easybuild.tools.filetools import run_cmd + +class CMake(Application): + """Support for configuring build with CMake instead of traditional configure script""" + + def configure(self, builddir=None): + """Configure build using cmake""" + + if not builddir: + builddir = '.' + + compilers = "-DCMAKE_C_FLAGS='%s' -DCMAKE_C_COMPILER='%s' " % (os.getenv('CFLAGS'), + os.getenv('CC')) + compilers += "-DCMAKE_CXX_FLAGS='%s' -DCMAKE_CXX_COMPILER='%s' " % (os.getenv('CXXFLAGS'), + os.getenv('CXX')) + + command = "%s cmake -DCMAKE_INSTALL_PREFIX=%s %s %s %s" % (self.getcfg('preconfigopts'), + self.installdir, + compilers, + builddir, + self.getcfg('configopts') + ) + run_cmd(command, log_all=True, simple=True) diff --git a/easybuild/easyblocks/c/cmakepythonpackage.py b/easybuild/easyblocks/c/cmakepythonpackage.py new file mode 100644 index 0000000000..9ac2abf29a --- /dev/null +++ b/easybuild/easyblocks/c/cmakepythonpackage.py @@ -0,0 +1,54 @@ +# Copyright 2009-2012 Stijn Deweirdt, Dries Verdegem, Kenneth Hoste, Pieter De Baets, Jens Timmerman +# +# This file is part of EasyBuild, +# originally created by the HPC team of the University of Ghent (http://ugent.be/hpc). +# +# http://github.com/hpcugent/easybuild +# +# EasyBuild is free software: you can redistribute it and/or modify +# it under the terms of the GNU General Public License as published by +# the Free Software Foundation v2. +# +# EasyBuild is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with EasyBuild. If not, see . +## +from easybuild.easyblocks.c.cmake import CMake +from easybuild.easyblocks.p.pythonpackage import PythonPackage + +class CMakePythonPackage(CMake, PythonPackage): + """Build a Python module with cmake. + + Some packages use cmake to first build and install c Python modules + and then put the Python package in lib/pythonX.Y/site-packages + We install this in a seperate location and generate a module file + witch sets the PYTHONPATH. + + We use the default CMake implementation, and use make_module_extra from PythonPackage. + """ + + def __init__(self, *args, **kwargs): + PythonPackage.__init__(self, *args, **kwargs) + + def configure(self): + """Main onfiguration is with cmake""" + + PythonPackage.configure(self) + + CMake.configure(self) + + def make(self): + """Build with make""" + CMake.make(self) + + def make_install(self): + """Install with make install""" + CMake.make_install(self) + + def make_module_extra(self): + """Extra Python package module parameters""" + PythonPackage.make_module_extra(self) \ No newline at end of file diff --git a/easybuild/easyblocks/d/dolphin.py b/easybuild/easyblocks/d/dolphin.py new file mode 100644 index 0000000000..1264ded14e --- /dev/null +++ b/easybuild/easyblocks/d/dolphin.py @@ -0,0 +1,134 @@ +## +# Copyright 2009-2012 Stijn Deweirdt, Dries Verdegem, Kenneth Hoste, Pieter De Baets, Jens Timmerman +# +# This file is part of EasyBuild, +# originally created by the HPC team of the University of Ghent (http://ugent.be/hpc). +# +# http://github.com/hpcugent/easybuild +# +# EasyBuild is free software: you can redistribute it and/or modify +# it under the terms of the GNU General Public License as published by +# the Free Software Foundation v2. +# +# EasyBuild is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with EasyBuild. If not, see . +## +import os +from easybuild.easyblocks.c.cmakepythonpackage import CMakePythonPackage +from easybuild.tools.modules import get_software_root +from easybuild.tools.toolkit import get_openmp_flag + +class Dolfin(CMakePythonPackage): + """Extension of the CMakePythonPackage for Dolfin. + + Dolfin needs some environment variables to be set at run time. + """ + + def configure(self): + """Configure Dolfin build.""" + + # make sure that required dependencies are loaded + deps = ['Armadillo', 'Boost', 'ParMETIS', 'Python', 'SCOTCH', 'SuiteSparse', 'UFC'] + depsdict = {} + for dep in deps: + deproot = get_software_root(dep) + if not deproot: + self.log.error("Dependency %s not available." % dep) + else: + depsdict.update({dep:deproot}) + + # set correct compilers to be used at runtime + self.updatecfg('configopts', ' -DMPI_C_COMPILER="$MPICC"') + self.updatecfg('configopts', ' -DMPI_CXX_COMPILER="$MPICXX"') + + # Boost config parameters + self.updatecfg('configopts', " -DBoost_DIR=%s" % depsdict['Boost']) + self.updatecfg('configopts', " -DBOOST_INCLUDEDIR=%s/include" % depsdict['Boost']) + self.updatecfg('configopts', " -DBoost_DEBUG=ON -DBOOST_ROOT=%s" % depsdict['Boost']) + + # UFC and Armadillo config params + self.updatecfg('configopts', " -DUFC_DIR=%s" % depsdict['UFC']) + self.updatecfg('configopts', "-DARMADILLO_DIR:PATH=%s " % depsdict['Armadillo']) + + # specify MPI library + # FIXME + self.updatecfg('configopts', ' -DMPI_COMPILER="%s"' % self.getenv('MPICC')) + + if not os.getenv('MPI_LIB_SHARED') or not os.getenv('MPI_INC'): + self.updatecfg('configopts', ' -DMPI_LIBRARY="%s"' % os.getenv('MPI_LIB_SHARED')) + self.updatecfg('configopts', ' -DMPI_INCLUDE_PATH="%s"' % os.getenv('MPI_INC')) + else: + self.log.error('MPI_LIB_SHARED or MPI_INC not set, could not determine MPI-related paths.') + + # specify Python paths + python_short_ver = ".".join(os.getenv('SOFTVERSIONPYTHON').split(".")[0:2]) + self.updatecfg('configopts', " -DPYTHON_INCLUDE_PATH=%s/include/python%s" % (depsdict['Python'], + python_short_ver)) + self.updatecfg('configopts', " -DPYTHON_LIBRARIES=%s/lib/libpython%s.so" % (depsdict['Python'], + python_short_ver)) + + # SuiteSparse config params + suitesparse = depsdict['SuiteSparse'] + umfpack_params = ' -DUMFPACK_DIR="%s/UMFPACK"' % suitesparse + umfpack_params += ' -DAMD_DIR="%s/UMFPACK"' % suitesparse + umfpack_params += ' -DCHOLMOD_DIR="%s/CHOLMOD"' % suitesparse + umfpack_params += ' -DUFCONFIG_DIR="%s/UFconfig"' % suitesparse + umfpack_params += ' -DCAMD_LIBRARY:PATH="%s/CAMD/lib/libcamd.a"' % suitesparse + umfpack_params += ' -DCCOLAMD_LIBRARY:PATH="%s/CCOLAMD/lib/libccolamd.a"' % suitesparse + umfpack_params += ' -DCOLAMD_LIBRARY:PATH="%s/COLAMD/lib/libcolamd.a"' % suitesparse + self.updatecfg('configopts', umfpack_params) + + # ParMETIS and SCOTCH + self.updatecfg('configopts', ' -DPARMETIS_DIR="%s"' % depsdict['ParMETIS']) + self.updatecfg('configopts', ' -DSCOTCH_DIR="%s"' % depsdict['SCOTCH']) + + # BLACS and LAPACK + self.updatecfg('configopts', ' -DBLAS_LIBRARIES:PATH="$LIBBLAS"') + self.updatecfg('configopts', ' -DLAPACK_LIBRARIES:PATH="$LIBLAPACK"') + + #set correct openmp options + openmp = get_openmp_flag(self.log) + self.updatecfg('configopts', ' -DOpenMP_CXX_FLAGS="%s"' % openmp) + self.updatecfg('configopts', ' -DOpenMP_C_FLAGS="%s"' % openmp) + + CMakePythonPackage.configure(self) + + def make_module_extra(self): + """Set extra environment variables for Dolfin.""" + + txt = CMakePythonPackage.make_module_extra(self) + + # Dolfin needs to find Boost and the UFC pkgconfig file + txt += "setenv\tBOOST_DIR\t%s\n" % get_software_root('Boost') + txt += "prepend-path\tPKG_CONFIG_PATH\t%s/lib/pkgconfig\n" % get_software_root('UFC') + txt += "prepend-path\tPKG_CONFIG_PATH\t%s/lib/pkgconfig\n" % self.installdir + + envvars = ['I_MPI_CXX', 'I_MPI_CC'] + for envvar in envvars: + envar_val = os.getenv(envvar) + if not envar_val: + self.log.error("%s not defined in environment, needed by DOLFIN" % envvar) + else: + txt += "setenv\t%s\t%s\n" % (envvar, envar_val) + + return txt + + def sanitycheck(self): + """Custom sanity check for Dolfin.""" + + if not self.getcfg('sanityCheckPaths'): + + self.setcfg('sanityCheckPaths', {'files': ['bin/dolfin-%s' % x for x in ['version','convert', + 'order','plot']] + + ['include/dolfin.h'], + 'dirs':['%s/dolfin' % self.pylibdir] + }) + + self.log.info("Customized sanity check paths: %s" % self.getcfg('sanityCheckPaths')) + + CMakePythonPackage.sanitycheck(self) diff --git a/easybuild/easyblocks/p/pythonpackage.py b/easybuild/easyblocks/p/pythonpackage.py new file mode 100644 index 0000000000..d556797f2c --- /dev/null +++ b/easybuild/easyblocks/p/pythonpackage.py @@ -0,0 +1,78 @@ +## +# Copyright 2009-2012 Stijn Deweirdt, Dries Verdegem, Kenneth Hoste, Pieter De Baets, Jens Timmerman +# +# This file is part of EasyBuild, +# originally created by the HPC team of the University of Ghent (http://ugent.be/hpc). +# +# http://github.com/hpcugent/easybuild +# +# EasyBuild is free software: you can redistribute it and/or modify +# it under the terms of the GNU General Public License as published by +# the Free Software Foundation v2. +# +# EasyBuild is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with EasyBuild. If not, see . +## +import os +from easybuild.framework.application import Application +from easybuild.tools.filetools import run_cmd + +class PythonPackage(Application): + """Builds and installs a Python package, and provides a dedicated module file""" + + def __init__(self, *args, **kwargs): + Application.__init__(self, *args, **kwargs) + + # Python packages lib dir + self.pylibdir = os.path.join("lib","python%s", "site-packages") + + def configure(self): + """Set Python packages lib dir.""" + + python_version = os.getenv('SOFTVERSIONPYTHON') + if not python_version: + self.log.error('Python not available.') + + python_short_ver = ".".join(python_version.split(".")[0:2]) + + self.pylibdir = self.pylibdir % python_short_ver + + def make(self): + """Build Python package using setup.py""" + + cmd = "python setup.py build" + + run_cmd(cmd, logall=True, simple=True) + + def make_install(self): + """Install Python package to a custom path using setup.py""" + + cmd = "python setup.py install --prefix=%s %s" % (self.installdir, self.getcfg('installopts')) + + run_cmd(cmd, logall=True, simple=True) + + def make_module_extra(self): + """Add install path to PYTHONPATH""" + + pythonversion = os.getenv("SOFTVERSIONPYTHON") + if not pythonversion: + self.log.error("Python module not loaded.") + + txt = Application.make_module_extra(self) + + # geting installation directory witrh distutils doesn't work in Python 2.4 + #installdir = distutils.sysconfig.get_python_lib(plat_specific=True, + # prefix=self.installdir) + + # get major.minor version + shortver = ".".join(pythonversion.split(".")[0:2]) + installdir = os.path.join(self.installdir , "lib/python%s/site-packages" % shortver) + + txt += "prepend-path\tPYTHONPATH\t%s\n" % installdir + + return txt \ No newline at end of file diff --git a/easybuild/easyconfigs/b/Boost/.Boost-1.49.0-ictce-4.0.6.eb.swp b/easybuild/easyconfigs/b/Boost/.Boost-1.49.0-ictce-4.0.6.eb.swp new file mode 100644 index 0000000000000000000000000000000000000000..c8fdbd3a3d7a884049557a5bd55144b558507f2c GIT binary patch literal 12288 zcmeI2-D(p-6vwAth=O0}jfxjzB}_t_*~E`l13_u2P*5!57nBetyC==Go1JlI(pXFN zPH*)_@XiO&8=pXY6ZH{%0ncpGRs|Kj)1HBUc6QFp&j0*&ZkC)*?cU-|J}WOUY{wX@ z?|*;mHS4h99Aj(HGtNVZ{I%X0Z!6)MfM)ys=7AfmhrrJa7JF8-dK)H?1 zK&MH4w_EgLlXdlqi#pMqK|`b8YF%EuB5PG0`xvShWlhdV=={k7#fiY)Brx#Z>gB`i z!ufhF05~^!mY+C&cW<(wtcd^-AOb{y2oM1xKm>@u9wp%I1bd3P?;GcTa(tcm={mlp z3lSg!M1Tko0U|&IhyW2F0z`la5CJ0a4-!xbV{Z;IcIGge$N&GgzyH4;W$ZKR6Y2x% zA)Irn%)W;)?T|-?(okpEPy~F3dMZH2jM?FJ5LOno*y%N+aN~7+huA>%E zmr!5O&r8$`6g4711c(3;AOb{y2oM1xKm`6{0vwxDnf4p=J&4zql<&D^(bXw9(UQtq z$da;1btgh~LOpQ1Z?$wrR9IN+jY-$EH`e2_frGvcqkr|pzh3xDD_XR8^G-ehrn`K{ ze1ox_{wR7*rOxo87*&t!qi^p63zfi>Oz5NJ(vk?7os z#nc_LD51>W{}5l_x6o2vFE*Q zMA2xhYw{J48TiQNW)))ZqEb0ieWOVfmKv3yh0$(d`;u#yob)P}E04u!FPWMlfbT-w#ETpJZDws$D z;bcJ;>yUFl(*-HwWMrAg|`Iu3-oXw*sRvYzRK jRV&ckhCdt*W$_Xv@{a^#V-HO+Dwr26cx;MdYr(z&r~h*r literal 0 HcmV?d00001 diff --git a/easybuild/easyconfigs/b/Boost/Boost-1.49.0-ictce-4.0.6.eb b/easybuild/easyconfigs/b/Boost/Boost-1.49.0-ictce-4.0.6.eb new file mode 100644 index 0000000000..5cbbeb31c7 --- /dev/null +++ b/easybuild/easyconfigs/b/Boost/Boost-1.49.0-ictce-4.0.6.eb @@ -0,0 +1,24 @@ +name='Boost' +version='1.49.0' + +homepage='http://www.boost.org/' +description="Boost provides free peer-reviewed portable C++ source libraries." + +toolkit={'name':'ictce','version':'4.0.6'} +toolkitopts={'pic':True} + +dependencies=[('Python','2.7.3')] + +sources=['%s_%s.tar.gz'%(name.lower(), '_'.join(version.split('.')))] +sourceURLs=['http://sourceforge.net/projects/%(name)s/files/%(name)s/%(version)s' % {'name':name, 'version':version}, 'download'] + +patches=['intellinuxjam_fPIC.patch'] + +sanityCheckPaths = {'files': ['lib/libboost_python.so','lib/libboost_system.so'], 'dirs':['include/boost']} + +#also build boost_mpi +boost_mpi=True + +if boost_mpi: + toolkitopts['usempi'] =True + sanityCheckPaths['files'].append('lib/libboost_mpi.so') diff --git a/easybuild/easyconfigs/d/DOLFIN/DOLFIN-1.0.0-ictce-4.0.6.eb b/easybuild/easyconfigs/d/DOLFIN/DOLFIN-1.0.0-ictce-4.0.6.eb new file mode 100644 index 0000000000..9af976714c --- /dev/null +++ b/easybuild/easyconfigs/d/DOLFIN/DOLFIN-1.0.0-ictce-4.0.6.eb @@ -0,0 +1,40 @@ +name='DOLFIN' +version='1.0.0' + +homepage='https://launchpad.net/dolfin' +description="DOLFIN is the C++/Python interface of FEniCS, providing a consistent PSE (Problem Solving Environment) for ordinary and partial differential equations." + +toolkit={'name':'ictce','version':'4.0.6'} +toolkitopts={'usempi':True, 'packed-groups':True} + +majver = version.split('.') +if majver[0] == '0': + majver = majver[0] +else: + majver = '.'.join(majver[0:2]) + +sources=['%s-%s.tar.gz'%(name.lower(),version)] +sourceURLs=['https://launchpad.net/%s/%s.x/%s/+download' % (name.lower(), majver, version)] + +patches=['wl_pkg_linkflags.patch'] + +builddependencies = [('CMake', '2.8.4', '', True)] + +python_version = '2.7.3' + +# some dependencies use dummy toolkit +dependencies=[ + ('Python', python_version), + ('Boost', '1.49.0'), + ('UFC', '2.0.5'), + ('FFC', '1.0.0', '', True), + ('FIAT', '1.0.0', '', True), + ('Instant', '1.0.0', '', True), + ('Viper', '1.0.0', '', True), + ('UFL', '1.0.0', '', True), + ('SCOTCH', '5.1.12b_esmumps'), + ('Armadillo', '2.4.4'), + ('ParMETIS', '4.0.2'), + ('SWIG', '2.0.4', "-Python-%s" % python_version), + ('SuiteSparse', '3.7.0', '-withparmetis', False), + ] diff --git a/easybuild/easyconfigs/d/DOLFIN/wl_pkg_linkflags.patch b/easybuild/easyconfigs/d/DOLFIN/wl_pkg_linkflags.patch new file mode 100644 index 0000000000..cee8d5f4c8 --- /dev/null +++ b/easybuild/easyconfigs/d/DOLFIN/wl_pkg_linkflags.patch @@ -0,0 +1,20 @@ +--- dolfin/CMakeLists.txt.orig 2012-03-27 16:40:12.595869000 +0200 ++++ dolfin/CMakeLists.txt 2012-03-27 16:43:49.937744000 +0200 +@@ -266,21 +266,28 @@ + "${_lib}" + ) + +- # Only add libraries that matches the form -L -l +- if ("${_linkflags}" MATCHES "-L.+ -l.+") +- set(PKG_LINKFLAGS "${_linkflags} ${PKG_LINKFLAGS}") ++ #also add -Wl,x,x,x,x directives ++ if ("${_lib}" MATCHES "-Wl,[^ ]*") ++ set(PKG_LINKFLAGS "${_lib} ${PKG_LINKFLAGS}") ++ else() ++ # Only add libraries that matches the form -L -l ++ if ("${_linkflags}" MATCHES "-L.+ -l.+") ++ set(PKG_LINKFLAGS "${_linkflags} ${PKG_LINKFLAGS}") ++ endif() + endif() + endforeach() + diff --git a/easybuild/tools/toolkit.py b/easybuild/tools/toolkit.py index b3b0ea57a7..1885f5b974 100644 --- a/easybuild/tools/toolkit.py +++ b/easybuild/tools/toolkit.py @@ -622,6 +622,19 @@ def prepareIMPI(self): self.vars['MPIF77'] = 'mpif77 -fc=%s %s ' % (self.vars['F77'], self.m32flag) self.vars['MPIF90'] = 'mpif90 -fc=%s %s ' % (self.vars['F90'], self.m32flag) + impiroot = os.getenv('SOFTROOTIMPI') + if self.opts['32bit']: + log.error("Don't know how to set IMPI paths for 32-bit.") + else: + if LooseVersion(os.getenv('SOFTVERSIONIMPI')) < LooseVersion("100"): + log.error("Don't know how to set IMPI paths for old versions.") + else: + mpi_lib = os.path.join(impiroot, 'lib64', 'libmpi') + self.vars['MPI_INC'] = os.path.join(impiroot, 'include64') + + self.vars['MPI_LIB_SHARED'] = "%s.so" % mpi_lib + self.vars['MPI_LIB_STATIC'] = "%s.a" % mpi_lib + def prepareItac(self): """ Prepare for Intel Trace Collector library From d7d3b343cc5fbb87b94a0d647f42827e22c7f90b Mon Sep 17 00:00:00 2001 From: Jens Timmerman Date: Tue, 15 May 2012 11:16:16 +0200 Subject: [PATCH 396/798] fixed dolphin, get_software_root renamed, boost url fixed, removed swap file --- easybuild/easyblocks/d/dolphin.py | 14 +++++++------- .../b/Boost/.Boost-1.49.0-ictce-4.0.6.eb.swp | Bin 12288 -> 0 bytes .../b/Boost/Boost-1.49.0-ictce-4.0.6.eb | 2 +- easybuild/tools/modules.py | 4 ++-- easybuild/tools/toolkit.py | 4 ++-- 5 files changed, 12 insertions(+), 12 deletions(-) delete mode 100644 easybuild/easyconfigs/b/Boost/.Boost-1.49.0-ictce-4.0.6.eb.swp diff --git a/easybuild/easyblocks/d/dolphin.py b/easybuild/easyblocks/d/dolphin.py index 1264ded14e..b8f24e92b5 100644 --- a/easybuild/easyblocks/d/dolphin.py +++ b/easybuild/easyblocks/d/dolphin.py @@ -67,9 +67,9 @@ def configure(self): # specify Python paths python_short_ver = ".".join(os.getenv('SOFTVERSIONPYTHON').split(".")[0:2]) - self.updatecfg('configopts', " -DPYTHON_INCLUDE_PATH=%s/include/python%s" % (depsdict['Python'], + self.updatecfg('configopts', " -DPYTHON_INCLUDE_PATH=%s/include/python%s" % (depsdict['Python'], python_short_ver)) - self.updatecfg('configopts', " -DPYTHON_LIBRARIES=%s/lib/libpython%s.so" % (depsdict['Python'], + self.updatecfg('configopts', " -DPYTHON_LIBRARIES=%s/lib/libpython%s.so" % (depsdict['Python'], python_short_ver)) # SuiteSparse config params @@ -95,14 +95,14 @@ def configure(self): openmp = get_openmp_flag(self.log) self.updatecfg('configopts', ' -DOpenMP_CXX_FLAGS="%s"' % openmp) self.updatecfg('configopts', ' -DOpenMP_C_FLAGS="%s"' % openmp) - + CMakePythonPackage.configure(self) def make_module_extra(self): """Set extra environment variables for Dolfin.""" txt = CMakePythonPackage.make_module_extra(self) - + # Dolfin needs to find Boost and the UFC pkgconfig file txt += "setenv\tBOOST_DIR\t%s\n" % get_software_root('Boost') txt += "prepend-path\tPKG_CONFIG_PATH\t%s/lib/pkgconfig\n" % get_software_root('UFC') @@ -115,7 +115,7 @@ def make_module_extra(self): self.log.error("%s not defined in environment, needed by DOLFIN" % envvar) else: txt += "setenv\t%s\t%s\n" % (envvar, envar_val) - + return txt def sanitycheck(self): @@ -123,8 +123,8 @@ def sanitycheck(self): if not self.getcfg('sanityCheckPaths'): - self.setcfg('sanityCheckPaths', {'files': ['bin/dolfin-%s' % x for x in ['version','convert', - 'order','plot']] + self.setcfg('sanityCheckPaths', {'files': ['bin/dolfin-%s' % x for x in ['version', 'convert', + 'order', 'plot']] + ['include/dolfin.h'], 'dirs':['%s/dolfin' % self.pylibdir] }) diff --git a/easybuild/easyconfigs/b/Boost/.Boost-1.49.0-ictce-4.0.6.eb.swp b/easybuild/easyconfigs/b/Boost/.Boost-1.49.0-ictce-4.0.6.eb.swp deleted file mode 100644 index c8fdbd3a3d7a884049557a5bd55144b558507f2c..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 12288 zcmeI2-D(p-6vwAth=O0}jfxjzB}_t_*~E`l13_u2P*5!57nBetyC==Go1JlI(pXFN zPH*)_@XiO&8=pXY6ZH{%0ncpGRs|Kj)1HBUc6QFp&j0*&ZkC)*?cU-|J}WOUY{wX@ z?|*;mHS4h99Aj(HGtNVZ{I%X0Z!6)MfM)ys=7AfmhrrJa7JF8-dK)H?1 zK&MH4w_EgLlXdlqi#pMqK|`b8YF%EuB5PG0`xvShWlhdV=={k7#fiY)Brx#Z>gB`i z!ufhF05~^!mY+C&cW<(wtcd^-AOb{y2oM1xKm>@u9wp%I1bd3P?;GcTa(tcm={mlp z3lSg!M1Tko0U|&IhyW2F0z`la5CJ0a4-!xbV{Z;IcIGge$N&GgzyH4;W$ZKR6Y2x% zA)Irn%)W;)?T|-?(okpEPy~F3dMZH2jM?FJ5LOno*y%N+aN~7+huA>%E zmr!5O&r8$`6g4711c(3;AOb{y2oM1xKm`6{0vwxDnf4p=J&4zql<&D^(bXw9(UQtq z$da;1btgh~LOpQ1Z?$wrR9IN+jY-$EH`e2_frGvcqkr|pzh3xDD_XR8^G-ehrn`K{ ze1ox_{wR7*rOxo87*&t!qi^p63zfi>Oz5NJ(vk?7os z#nc_LD51>W{}5l_x6o2vFE*Q zMA2xhYw{J48TiQNW)))ZqEb0ieWOVfmKv3yh0$(d`;u#yob)P}E04u!FPWMlfbT-w#ETpJZDws$D z;bcJ;>yUFl(*-HwWMrAg|`Iu3-oXw*sRvYzRK jRV&ckhCdt*W$_Xv@{a^#V-HO+Dwr26cx;MdYr(z&r~h*r diff --git a/easybuild/easyconfigs/b/Boost/Boost-1.49.0-ictce-4.0.6.eb b/easybuild/easyconfigs/b/Boost/Boost-1.49.0-ictce-4.0.6.eb index 5cbbeb31c7..f72a8aa810 100644 --- a/easybuild/easyconfigs/b/Boost/Boost-1.49.0-ictce-4.0.6.eb +++ b/easybuild/easyconfigs/b/Boost/Boost-1.49.0-ictce-4.0.6.eb @@ -10,7 +10,7 @@ toolkitopts={'pic':True} dependencies=[('Python','2.7.3')] sources=['%s_%s.tar.gz'%(name.lower(), '_'.join(version.split('.')))] -sourceURLs=['http://sourceforge.net/projects/%(name)s/files/%(name)s/%(version)s' % {'name':name, 'version':version}, 'download'] +sourceURLs=[('http://sourceforge.net/projects/%(name)s/files/%(name)s/%(version)s' % {'name':name.lower(), 'version':version}, 'download')] patches=['intellinuxjam_fPIC.patch'] diff --git a/easybuild/tools/modules.py b/easybuild/tools/modules.py index d55ca7837a..8933cf4007 100644 --- a/easybuild/tools/modules.py +++ b/easybuild/tools/modules.py @@ -168,7 +168,7 @@ def modulefile_path(self, name, version): modinfo = self.show(name, version) # second line of module show output contains full path of module file - return modinfo.split('\n')[1].replace(':','') + return modinfo.split('\n')[1].replace(':', '') def runModule(self, *args, **kwargs): """ @@ -191,7 +191,7 @@ def runModule(self, *args, **kwargs): os.environ['MODULEPATH'] = originalModulePath if kwargs.get('return_output', False): - return (stdout+stderr) + return (stdout + stderr) else: # Change the environment diff --git a/easybuild/tools/toolkit.py b/easybuild/tools/toolkit.py index 1885f5b974..873b9c54ba 100644 --- a/easybuild/tools/toolkit.py +++ b/easybuild/tools/toolkit.py @@ -550,9 +550,9 @@ def prepareIMKL(self): 'libsfxsl':libsfxsl } - fftwsuff="" + fftwsuff = "" if self.opts['pic']: - fftwsuff="_pic" + fftwsuff = "_pic" # only include interface lib if it's there fftlib = "-Wl:-Bstatic -lfftw3xc_intel%s -Wl:-Bdynamic" % fftwsuff From 2c5d713df7a905af91e840d1829e978d613bcf7c Mon Sep 17 00:00:00 2001 From: Jens Timmerman Date: Wed, 16 May 2012 15:37:04 +0200 Subject: [PATCH 397/798] fixes in pythonpackage, cmakepythonpackage and toolkit + added .eb files and needed easyblocks for: Boost, CMake, DOLFIN, FFC, FIAT, Instant, PCRE, SWIG, ScientificPython, UFC, UFL and Viper metis, ParMETIS, SCOTCH These are all building except DOLFIN itself --- easybuild/easyblocks/c/cmakepythonpackage.py | 14 +- easybuild/easyblocks/d/dolfin.py | 135 ++++++++++++++++++ easybuild/easyblocks/m/metis.py | 69 +++++++++ easybuild/easyblocks/p/parmetis.py | 128 +++++++++++++++++ easybuild/easyblocks/p/pythonpackage.py | 6 +- easybuild/easyblocks/s/scotch.py | 95 ++++++++++++ easybuild/easyblocks/s/suitesparse.py | 88 ++++++++++++ .../Armadillo-2.4.4-goalf-1.1.0-no-OFED.eb | 25 ++++ .../Boost/Boost-1.49.0-goalf-1.1.0-no-OFED.eb | 24 ++++ .../b/Boost/intellinuxjam_fPIC.patch | 21 +++ .../CMake/CMake-2.8.4-goalf-1.1.0-no-OFED.eb | 15 ++ .../DOLFIN-1.0.0-goalf-1.1.0-no-OFED.eb | 43 ++++++ .../d/DOLFIN/DOLFIN-1.0.0-ictce-4.0.6.eb | 14 +- .../d/DOLFIN/wl_pkg_linkflags.patch | 5 +- ...-1.0.0-goalf-1.1.0-no-OFED-Python-2.7.3.eb | 33 +++++ ...-1.0.0-goalf-1.1.0-no-OFED-Python-2.7.3.eb | 28 ++++ ...-1.0.0-goalf-1.1.0-no-OFED-Python-2.7.3.eb | 29 ++++ .../OpenMPI-1.4.5-GCC-4.6.3-no-OFED.eb | 4 +- .../p/PCRE/PCRE-8.12-goalf-1.1.0-no-OFED.eb | 16 +++ .../ParMETIS-4.0.2-goalf-1.1.0-no-OFED.eb | 23 +++ ...TCH-5.1.12b_esmumps-goalf-1.1.0-no-OFED.eb | 17 +++ ...-2.0.6-goalf-1.1.0-no-OFED-Python-2.7.3.eb | 48 +++++++ ...on-2.8-goalf-1.1.0-no-OFED-Python-2.7.3.eb | 26 ++++ ...kl_UseEnvCompiler_EnableParmetis-3.7.patch | 44 ++++++ ...l_UseEnvCompiler_EnableParmetis-3.7.patch~ | 0 ...-3.7.0-goalf-1.1.0-no-OFED-withparmetis.eb | 24 ++++ .../u/UFC/UFC-2.0.5-goalf-1.1.0-no-OFED.eb | 38 +++++ ...-1.0.0-goalf-1.1.0-no-OFED-Python-2.7.3.eb | 23 +++ ...-1.0.0-goalf-1.1.0-no-OFED-Python-2.7.3.eb | 28 ++++ easybuild/tools/toolkit.py | 11 +- 30 files changed, 1050 insertions(+), 24 deletions(-) create mode 100644 easybuild/easyblocks/d/dolfin.py create mode 100644 easybuild/easyblocks/m/metis.py create mode 100644 easybuild/easyblocks/p/parmetis.py create mode 100644 easybuild/easyblocks/s/scotch.py create mode 100644 easybuild/easyblocks/s/suitesparse.py create mode 100644 easybuild/easyconfigs/a/Armadillo/Armadillo-2.4.4-goalf-1.1.0-no-OFED.eb create mode 100644 easybuild/easyconfigs/b/Boost/Boost-1.49.0-goalf-1.1.0-no-OFED.eb create mode 100644 easybuild/easyconfigs/b/Boost/intellinuxjam_fPIC.patch create mode 100644 easybuild/easyconfigs/c/CMake/CMake-2.8.4-goalf-1.1.0-no-OFED.eb create mode 100644 easybuild/easyconfigs/d/DOLFIN/DOLFIN-1.0.0-goalf-1.1.0-no-OFED.eb create mode 100644 easybuild/easyconfigs/f/FFC/FFC-1.0.0-goalf-1.1.0-no-OFED-Python-2.7.3.eb create mode 100644 easybuild/easyconfigs/f/FIAT/FIAT-1.0.0-goalf-1.1.0-no-OFED-Python-2.7.3.eb create mode 100644 easybuild/easyconfigs/i/Instant/Instant-1.0.0-goalf-1.1.0-no-OFED-Python-2.7.3.eb create mode 100644 easybuild/easyconfigs/p/PCRE/PCRE-8.12-goalf-1.1.0-no-OFED.eb create mode 100644 easybuild/easyconfigs/p/ParMETIS/ParMETIS-4.0.2-goalf-1.1.0-no-OFED.eb create mode 100644 easybuild/easyconfigs/s/SCOTCH/SCOTCH-5.1.12b_esmumps-goalf-1.1.0-no-OFED.eb create mode 100644 easybuild/easyconfigs/s/SWIG/SWIG-2.0.6-goalf-1.1.0-no-OFED-Python-2.7.3.eb create mode 100644 easybuild/easyconfigs/s/ScientificPython/ScientificPython-2.8-goalf-1.1.0-no-OFED-Python-2.7.3.eb create mode 100644 easybuild/easyconfigs/s/SuiteSparse/BlasLapackFromMkl_UseEnvCompiler_EnableParmetis-3.7.patch create mode 100644 easybuild/easyconfigs/s/SuiteSparse/BlasLapackFromMkl_UseEnvCompiler_EnableParmetis-3.7.patch~ create mode 100644 easybuild/easyconfigs/s/SuiteSparse/SuiteSparse-3.7.0-goalf-1.1.0-no-OFED-withparmetis.eb create mode 100644 easybuild/easyconfigs/u/UFC/UFC-2.0.5-goalf-1.1.0-no-OFED.eb create mode 100644 easybuild/easyconfigs/u/UFL/UFL-1.0.0-goalf-1.1.0-no-OFED-Python-2.7.3.eb create mode 100644 easybuild/easyconfigs/v/Viper/Viper-1.0.0-goalf-1.1.0-no-OFED-Python-2.7.3.eb diff --git a/easybuild/easyblocks/c/cmakepythonpackage.py b/easybuild/easyblocks/c/cmakepythonpackage.py index 9ac2abf29a..a6213ad15e 100644 --- a/easybuild/easyblocks/c/cmakepythonpackage.py +++ b/easybuild/easyblocks/c/cmakepythonpackage.py @@ -38,17 +38,17 @@ def configure(self): """Main onfiguration is with cmake""" PythonPackage.configure(self) - - CMake.configure(self) - def make(self): + return CMake.configure(self) + + def make(self): """Build with make""" - CMake.make(self) + return CMake.make(self) - def make_install(self): + def make_install(self): """Install with make install""" - CMake.make_install(self) + return CMake.make_install(self) def make_module_extra(self): """Extra Python package module parameters""" - PythonPackage.make_module_extra(self) \ No newline at end of file + return PythonPackage.make_module_extra(self) diff --git a/easybuild/easyblocks/d/dolfin.py b/easybuild/easyblocks/d/dolfin.py new file mode 100644 index 0000000000..0e03b94564 --- /dev/null +++ b/easybuild/easyblocks/d/dolfin.py @@ -0,0 +1,135 @@ +## +# Copyright 2009-2012 Stijn Deweirdt, Dries Verdegem, Kenneth Hoste, Pieter De Baets, Jens Timmerman +# +# This file is part of EasyBuild, +# originally created by the HPC team of the University of Ghent (http://ugent.be/hpc). +# +# http://github.com/hpcugent/easybuild +# +# EasyBuild is free software: you can redistribute it and/or modify +# it under the terms of the GNU General Public License as published by +# the Free Software Foundation v2. +# +# EasyBuild is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with EasyBuild. If not, see . +## +import os +from easybuild.easyblocks.c.cmakepythonpackage import CMakePythonPackage +from easybuild.tools.modules import get_software_root +from easybuild.tools.toolkit import get_openmp_flag + +class Dolfin(CMakePythonPackage): + """Extension of the CMakePythonPackage for Dolfin. + + Dolfin needs some environment variables to be set at run time. + """ + + def configure(self): + """Configure Dolfin build.""" + + # make sure that required dependencies are loaded + deps = ['Armadillo', 'Boost', 'ParMETIS', 'Python', 'SCOTCH', 'SuiteSparse', 'UFC'] + depsdict = {} + for dep in deps: + deproot = get_software_root(dep) + if not deproot: + self.log.error("Dependency %s not available." % dep) + else: + depsdict.update({dep:deproot}) + + # set correct compilers to be used at runtime + self.updatecfg('configopts', ' -DMPI_C_COMPILER="$MPICC"') + self.updatecfg('configopts', ' -DMPI_CXX_COMPILER="$MPICXX"') + + # Boost config parameters + #self.updatecfg('configopts', " -DBoost_DIR=%s" % depsdict['Boost']) + self.updatecfg('configopts', " -DBOOST_INCLUDEDIR=%s/include" % depsdict['Boost']) + self.updatecfg('configopts', " -DBoost_DEBUG=ON -DBOOST_ROOT=%s" % depsdict['Boost']) + + # UFC and Armadillo config params + self.updatecfg('configopts', " -DUFC_DIR=%s" % depsdict['UFC']) + self.updatecfg('configopts', "-DARMADILLO_DIR:PATH=%s " % depsdict['Armadillo']) + + # specify MPI library + # FIXME + self.updatecfg('configopts', ' -DMPI_COMPILER="%s"' % os.getenv('MPICC')) + + if not os.getenv('MPI_LIB_SHARED') or not os.getenv('MPI_INC'): + self.updatecfg('configopts', ' -DMPI_LIBRARY="%s"' % os.getenv('MPI_LIB_SHARED')) + self.updatecfg('configopts', ' -DMPI_INCLUDE_PATH="%s"' % os.getenv('MPI_INC')) + else: + self.log.error('MPI_LIB_SHARED or MPI_INC not set, could not determine MPI-related paths.') + + # specify Python paths + python_short_ver = ".".join(os.getenv('SOFTVERSIONPYTHON').split(".")[0:2]) + self.updatecfg('configopts', " -DPYTHON_INCLUDE_PATH=%s/include/python%s" % (depsdict['Python'], + python_short_ver)) + self.updatecfg('configopts', " -DPYTHON_LIBRARY=%s/lib/libpython%s.so" % (depsdict['Python'], + python_short_ver)) + + # SuiteSparse config params + suitesparse = depsdict['SuiteSparse'] + umfpack_params = ' -DUMFPACK_DIR="%s/UMFPACK"' % suitesparse + umfpack_params += ' -DAMD_DIR="%s/UMFPACK"' % suitesparse + umfpack_params += ' -DCHOLMOD_DIR="%s/CHOLMOD"' % suitesparse + umfpack_params += ' -DUFCONFIG_DIR="%s/UFconfig"' % suitesparse + umfpack_params += ' -DCAMD_LIBRARY:PATH="%s/CAMD/lib/libcamd.a"' % suitesparse + umfpack_params += ' -DCCOLAMD_LIBRARY:PATH="%s/CCOLAMD/lib/libccolamd.a"' % suitesparse + umfpack_params += ' -DCOLAMD_LIBRARY:PATH="%s/COLAMD/lib/libcolamd.a"' % suitesparse + self.updatecfg('configopts', umfpack_params) + + # ParMETIS and SCOTCH + + self.updatecfg('configopts', ' -DSCOTCH_DIR="%s" -DSCOTCH_DEBUG:BOOL=ON' % depsdict['SCOTCH']) + self.updatecfg('configopts', ' -DPARMETIS_DIR="%s"' % depsdict['ParMETIS']) + + # BLACS and LAPACK + self.updatecfg('configopts', ' -DBLAS_LIBRARIES:PATH="$LIBBLAS"') + self.updatecfg('configopts', ' -DLAPACK_LIBRARIES:PATH="$LIBLAPACK"') + + #set correct openmp options + openmp = get_openmp_flag(self.log) + self.updatecfg('configopts', ' -DOpenMP_CXX_FLAGS="%s"' % openmp) + self.updatecfg('configopts', ' -DOpenMP_C_FLAGS="%s"' % openmp) + + CMakePythonPackage.configure(self) + + def make_module_extra(self): + """Set extra environment variables for Dolfin.""" + + txt = CMakePythonPackage.make_module_extra(self) + + # Dolfin needs to find Boost and the UFC pkgconfig file + txt += "setenv\tBOOST_DIR\t%s\n" % get_software_root('Boost') + txt += "prepend-path\tPKG_CONFIG_PATH\t%s/lib/pkgconfig\n" % get_software_root('UFC') + txt += "prepend-path\tPKG_CONFIG_PATH\t%s/lib/pkgconfig\n" % self.installdir + + envvars = ['I_MPI_CXX', 'I_MPI_CC'] + for envvar in envvars: + envar_val = os.getenv(envvar) + if not envar_val and self.tk.name in ['ictce', 'iqacml']: + self.log.error("%s not defined in environment, needed by DOLFIN" % envvar) + else: + txt += "setenv\t%s\t%s\n" % (envvar, envar_val) + + return txt + + def sanitycheck(self): + """Custom sanity check for Dolfin.""" + + if not self.getcfg('sanityCheckPaths'): + + self.setcfg('sanityCheckPaths', {'files': ['bin/dolfin-%s' % x for x in ['version', 'convert', + 'order', 'plot']] + + ['include/dolfin.h'], + 'dirs':['%s/dolfin' % self.pylibdir] + }) + + self.log.info("Customized sanity check paths: %s" % self.getcfg('sanityCheckPaths')) + + CMakePythonPackage.sanitycheck(self) diff --git a/easybuild/easyblocks/m/metis.py b/easybuild/easyblocks/m/metis.py new file mode 100644 index 0000000000..6cebc6a80c --- /dev/null +++ b/easybuild/easyblocks/m/metis.py @@ -0,0 +1,69 @@ +## +# Copyright 2009-2012 Stijn Deweirdt, Dries Verdegem, Kenneth Hoste, Pieter De Baets, Jens Timmerman +# +# This file is part of EasyBuild, +# originally created by the HPC team of the University of Ghent (http://ugent.be/hpc). +# +# http://github.com/hpcugent/easybuild +# +# EasyBuild is free software: you can redistribute it and/or modify +# it under the terms of the GNU General Public License as published by +# the Free Software Foundation v2. +# +# EasyBuild is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with EasyBuild. If not, see . +## +from easybuild.framework.application import Application +import os +import shutil +class METIS(Application): + + def configure(self): + pass + + def make_install(self): + #TODO: make a general mkdir function + try: + self.libdir = os.path.join(self.installdir, 'lib') + os.mkdir(self.libdir) + self.log.debug("Succesfully created directory %s" % self.libdir) + except Exception, err: + self.log.error("Failed to create directory %s: %s" % (self.libdir, err)) + + try: + self.includedir = os.path.join(self.installdir, 'include') + os.mkdir(self.includedir) + self.log.debug("Succesfully created directory %s" % self.includedir) + except Exception, err: + self.log.error("Failed to create directory %s: %s" % (self.includedir, err)) + + try: + src = os.path.join(self.getcfg('startfrom'), 'libmetis.a') + dst = os.path.join(self.libdir, 'libmetis.a') + shutil.copy2(src, dst) + except Exception, err: + self.log.error("Copying file libmetis.a to lib dir failed: %s" % err) + + try: + for f in ['defs.h', 'macros.h', 'metis.h', 'proto.h', 'rename.h', 'struct.h']: + src = os.path.join(self.getcfg('startfrom'), 'Lib', f) + dst = os.path.join(self.includedir, f) + shutil.copy2(src, dst) + os.chmod(dst, 0755) + except Exception, err: + self.log.error("Copying file metis.h to include dir failed: %s" % err) + + # Other applications depending on ParMETIS (SuiteSparse for one) look for both ParMETIS libraries + # and headerfiles in the Lib directory (capital L). The following symlinks are hence created. + try: + self.Libdir = os.path.join(self.installdir, 'Lib') + os.symlink(self.libdir, self.Libdir) + for f in ['defs.h', 'macros.h', 'metis.h', 'proto.h', 'rename.h', 'struct.h']: + os.symlink(os.path.join(self.includedir, file), os.path.join(self.libdir, f)) + except Exception, err: + self.log.error("Something went wrong during symlink creation: %s" % err) diff --git a/easybuild/easyblocks/p/parmetis.py b/easybuild/easyblocks/p/parmetis.py new file mode 100644 index 0000000000..32014b9a8d --- /dev/null +++ b/easybuild/easyblocks/p/parmetis.py @@ -0,0 +1,128 @@ +## +# Copyright 2009-2012 Stijn Deweirdt, Dries Verdegem, Kenneth Hoste, Pieter De Baets, Jens Timmerman +# +# This file is part of EasyBuild, +# originally created by the HPC team of the University of Ghent (http://ugent.be/hpc). +# +# http://github.com/hpcugent/easybuild +# +# EasyBuild is free software: you can redistribute it and/or modify +# it under the terms of the GNU General Public License as published by +# the Free Software Foundation v2. +# +# EasyBuild is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with EasyBuild. If not, see . +## +from easybuild.easyblocks.m.metis import METIS +from easybuild.tools.filetools import run_cmd +import os +import shutil + +class ParMETIS(METIS): + """ + Easyblock for the ParMETIS package + Parmetis + """ + + def configure(self): + if self.version() < "4": + return METIS.configure(self) + #else + #tested with 4.0.2, now actually requires cmake to be run first + #for bot parmetis and metis + for buildir in [ 'build' ] : + cmd = 'cd %s && cmake .. %s -DCMAKE_INSTALL_PREFIX="%s" && cd %s' % \ + (buildir, self.getcfg('configopts'), self.installdir, self.getcfg('startfrom')) + run_cmd(cmd, log_all=True, simple=True) + + + + def make(self): + """ + make ParMETIS and Metis + """ + paracmd = '' + if self.getcfg('parallel'): + paracmd = "-j %s" % self.getcfg('parallel') + + cmd = "%s make %s %s" % (self.getcfg('premakeopts'), paracmd, self.getcfg('makeopts')) + if self.version() >= "4": + cmd = "cd build && %s && cd %s " % (cmd, self.getcfg('startfrom')) + # #make metis seperatly + # cmdmetis = "cd metis/build && %s make %s %s && cd %s" % (self.getCfg('premakeopts'), paracmd, self.getCfg('makeopts'),self.getCfg('startfrom')) + # runrun(cmdmetis, logall=True, simple=True) + run_cmd(cmd, log_all=True, simple=True) + + def make_install(self): + + includedir = os.path.join(self.installdir, 'include') + libdir = os.path.join(self.installdir, 'lib') + + if self.version() >= "4": + #includedir etc changed in v4, use a normal makeinstall + cmd = "cd build && make install %s && cd %s" % (self.getcfg('installopts'), + self.getcfg('startfrom')) + run_cmd(cmd, log_all=True, simple=True) + # we build metis seperatlly now + #cmd = "cd metis/build && make install %s && cd %s " % (self.getCfg('installopts'),self.getCfg('startfrom')) + #runrun(cmd, logall=True, simple=True) + try: + src = os.path.join(self.getcfg('startfrom'), 'build/libmetis/libmetis.a') + dst = os.path.join(libdir, 'libmetis.a') + shutil.copy2(src, dst) + except Exception, err: + self.log.error("Copying files to installation dir failed: %s" % err) + try: + src = os.path.join(self.getcfg('startfrom'), 'build/metis/include/metis.h') + dst = os.path.join(includedir, 'metis.h') + shutil.copy2(src, dst) + except Exception, err: + self.log.error("Copying files to installation dir failed: %s" % err) + + else: + + try: + os.mkdir(libdir) + self.log.debug("Succesfully created directory %s" % libdir) + except Exception, err: + self.log.error("Failed to create directory %s: %s" % (libdir, err)) + + try: + os.mkdir(includedir) + self.log.debug("Succesfully created directory %s" % includedir) + except Exception, err: + self.log.error("Failed to create directory %s: %s" % (includedir, err)) + + try: + for fil in ['libmetis.a', 'libparmetis.a']: + src = os.path.join(self.getcfg('startfrom'), fil) + dst = os.path.join(libdir, fil) + shutil.copy2(src, dst) + except Exception, err: + self.log.error("Copying files to installation dir failed: %s" % err) + + try: + src = os.path.join(self.getcfg('startfrom'), 'parmetis.h') + dst = os.path.join(includedir, 'parmetis.h') + shutil.copy2(src, dst) + # Some applications (SuiteSparse) can only use METIS (not ParMETIS), but header files are the same + dst = os.path.join(includedir, 'metis.h') + shutil.copy2(src, dst) + except Exception, err: + self.log.error("Copying files to installation dir failed: %s" % err) + + # Other applications depending on ParMETIS (SuiteSparse for one) look for both ParMETIS libraries + # and headerfiles in the Lib directory (capital L). The following symlink are hence created. + try: + Libdir = os.path.join(self.installdir, 'Lib') + os.symlink(libdir, Libdir) + os.symlink(os.path.join(includedir, 'metis.h'), os.path.join(libdir, 'metis.h')) + os.symlink(os.path.join(includedir, 'parmetis.h'), + os.path.join(libdir, 'parmetis.h')) + except Exception, err: + self.log.error("Something went wrong during symlink creation: %s" % err) diff --git a/easybuild/easyblocks/p/pythonpackage.py b/easybuild/easyblocks/p/pythonpackage.py index d556797f2c..42170ac52b 100644 --- a/easybuild/easyblocks/p/pythonpackage.py +++ b/easybuild/easyblocks/p/pythonpackage.py @@ -47,14 +47,14 @@ def make(self): cmd = "python setup.py build" - run_cmd(cmd, logall=True, simple=True) + run_cmd(cmd, log_all=True, simple=True) def make_install(self): """Install Python package to a custom path using setup.py""" cmd = "python setup.py install --prefix=%s %s" % (self.installdir, self.getcfg('installopts')) - run_cmd(cmd, logall=True, simple=True) + run_cmd(cmd, log_all=True, simple=True) def make_module_extra(self): """Add install path to PYTHONPATH""" @@ -75,4 +75,4 @@ def make_module_extra(self): txt += "prepend-path\tPYTHONPATH\t%s\n" % installdir - return txt \ No newline at end of file + return txt diff --git a/easybuild/easyblocks/s/scotch.py b/easybuild/easyblocks/s/scotch.py new file mode 100644 index 0000000000..df48428f4a --- /dev/null +++ b/easybuild/easyblocks/s/scotch.py @@ -0,0 +1,95 @@ +## +# Copyright 2009-2012 Stijn Deweirdt, Dries Verdegem, Kenneth Hoste, Pieter De Baets, Jens Timmerman +# +# This file is part of EasyBuild, +# originally created by the HPC team of the University of Ghent (http://ugent.be/hpc). +# +# http://github.com/hpcugent/easybuild +# +# EasyBuild is free software: you can redistribute it and/or modify +# it under the terms of the GNU General Public License as published by +# the Free Software Foundation v2. +# +# EasyBuild is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with EasyBuild. If not, see . +## +from easybuild.framework.application import Application +from easybuild.tools.filetools import run_cmd +import os +import re +import shutil + +class SCOTCH(Application): + """ + Easyblock for building SCOTCH + - http://www.labri.fr/perso/pelegrin/scotch/ + """ + def configure(self): + if self.tk.name in ['ictce', 'iqacml']: + makefilename = 'Makefile.inc.x86-64_pc_linux2.icc' + + elif self.tk.name in ['goalf'] : + makefilename = 'Makefile.inc.x86-64_pc_linux2' + else: + self.log.error("Don't know how to handle toolkit %s." % self.tk.name) + + try: + srcdir = os.path.join(self.getcfg('startfrom'), 'src') + src = os.path.join(srcdir, 'Make.inc', makefilename) + dst = os.path.join(srcdir, 'Makefile.inc') + shutil.copy2(src, dst) + self.log.debug("Successfully copied Makefile.inc to src dir.") + except Exception: + self.log.exception("Copying Makefile.inc to src dir failed.") + try: + os.chdir(srcdir) + self.log.debug("Changing to src dir.") + except Exception, err: + self.log.error("Failed to change to src dir: %s" % err) + + def make(self): + ccs = os.environ['CC'] + ccp = os.environ['MPICC'] + ccd = os.environ['MPICC'] + cflags = "" + if self.tk.name == "iqacml": + cflags = "-fPIC -O3 -DCOMMON_FILE_COMPRESS_GZ -DCOMMON_PTHREAD -DCOMMON_RANDOM_FIXED_SEED -DSCOTCH_RENAME -restrict -DIDXSIZE64" + elif self.tk.name == 'ictce': + cflags = "-fPIC -O3 -DCOMMON_FILE_COMPRESS_GZ -DCOMMON_PTHREAD -DCOMMON_RANDOM_FIXED_SEED -DSCOTCH_RENAME -DSCOTCH_PTHREAD -restrict -DIDXSIZE64" + else: + cflags = "-fPIC -O3 -DCOMMON_FILE_COMPRESS_GZ -DCOMMON_PTHREAD -DCOMMON_RANDOM_FIXED_SEED -DSCOTCH_RENAME -DSCOTCH_PTHREAD -Drestrict=__restrict" + cmd = 'make CCS="%s" CCP="%s" CCD="%s" CFLAGS="%s" scotch' % (ccs, ccp, ccd, cflags) + run_cmd(cmd, log_all=True, simple=True) + cmd = 'make CCS="%s" CCP="%s" CCD="%s" CFLAGS="%s" ptscotch' % (ccs, ccp, ccd, cflags) + run_cmd(cmd, log_all=True, simple=True) + + def make_install(self): + try: + for d in ["include", "lib", "bin", "man"]: + src = os.path.join(self.getcfg('startfrom'), d) + dst = os.path.join(self.installdir, d) + shutil.copytree(src, dst) + except Exception, err: + self.log.error("Copying %s to installation dir %s failed: %s" % (src, dst, err)) + + scotchlibdir = os.path.join(self.installdir, 'lib') + scotchgrouplib = os.path.join(scotchlibdir, 'libscotch_group.a') + liblistorig = os.listdir(scotchlibdir) + liblist = [] + regmetis = re.compile(r".*metis.*") + for lib in liblistorig: + if not regmetis.match(lib): liblist.append(lib) + line = ' '.join(liblist) + line = "GROUP (%s)" % line + try: + f = open(scotchgrouplib, 'w') + f.write(line) + f.close() + self.log.info("Successfully written group lib file: %s" % scotchgrouplib) + except Exception, err: + self.log.error("Can't write to file %s: %s" % (scotchgrouplib, err)) diff --git a/easybuild/easyblocks/s/suitesparse.py b/easybuild/easyblocks/s/suitesparse.py new file mode 100644 index 0000000000..4e4a346813 --- /dev/null +++ b/easybuild/easyblocks/s/suitesparse.py @@ -0,0 +1,88 @@ +## +# Copyright 2009-2012 Stijn Deweirdt, Dries Verdegem, Kenneth Hoste, Pieter De Baets, Jens Timmerman +# +# This file is part of EasyBuild, +# originally created by the HPC team of the University of Ghent (http://ugent.be/hpc). +# +# http://github.com/hpcugent/easybuild +# +# EasyBuild is free software: you can redistribute it and/or modify +# it under the terms of the GNU General Public License as published by +# the Free Software Foundation v2. +# +# EasyBuild is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with EasyBuild. If not, see . +## +from easybuild.framework.application import Application +from easybuild.tools.filetools import run_cmd +import os +import shutil + +class SuiteSparse(Application): + + def configure(self): + pass + + def make(self): + cmd = 'make' + + run_cmd(cmd, log_all=True, simple=True) + + def make_install(self): + """ + Just copy the contents of the builddir to the installdir + - keep permissions with copy2 !! + """ + for x in os.listdir(self.getcfg('startfrom')): + src = os.path.join(self.getcfg('startfrom'), x) + dst = os.path.join(self.installdir, x) + try: + if os.path.isdir(src): + shutil.copytree(src, dst) + #symlink + # - dst/Lib to dst/lib + # - dst/Include to dst/include + for c in ['Lib', 'Include']: + nsrc = os.path.join(dst, c) + ndst = os.path.join(dst, c.lower()) + if os.path.exists(nsrc): + os.symlink(nsrc, ndst) + else: + shutil.copy2(src, dst) + except: + self.log.exception("Copying src %s to dst %s failed" % (src, dst)) + + # Some extra symlinks are necessary for UMFPACK to work. + for f in ['AMD/include/amd.h', 'AMD/include/amd_internal.h', 'UFconfig/UFconfig.h']: + src = os.path.join(self.installdir, f) + dst = os.path.join(self.installdir, 'UMFPACK', 'include', f.split('/')[-1]) + if os.path.exists(src): + try: os.symlink(src, dst) + except Exception, err: + self.log.error("Failed to make symbolic link from %s to %s: %s" % (src, dst, err)) + + for f in ['AMD/lib/libamd.a']: + src = os.path.join(self.installdir, f) + dst = os.path.join(self.installdir, 'UMFPACK', 'lib', f.split('/')[-1]) + if os.path.exists(src): + try: os.symlink(src, dst) + except Exception, err: + self.log.error("Failed to make symbolic link from %s to %s: %s" % (src, dst, err)) + + def sanitycheck(self): + + if not self.getcfg('sanityCheckPaths'): + self.setcfg('sanityCheckPaths', {'files':["%s/lib/lib%s.a" % (x, x.lower()) for x in ["AMD", "BTF", "CAMD", "CCOLAMD", "CHOLMOD", "COLAMD", + "CXSparse", "KLU", "LDL", "RBio", "SPQR", "UMFPACK"]] + + ["CSparse3/lib/libcsparse.a"], + 'dirs':[ "MATLAB_Tools"] + }) + + self.log.info("Customized sanity check paths: %s" % self.getcfg('sanityCheckPaths')) + + Application.sanitycheck(self) diff --git a/easybuild/easyconfigs/a/Armadillo/Armadillo-2.4.4-goalf-1.1.0-no-OFED.eb b/easybuild/easyconfigs/a/Armadillo/Armadillo-2.4.4-goalf-1.1.0-no-OFED.eb new file mode 100644 index 0000000000..5326c1fb68 --- /dev/null +++ b/easybuild/easyconfigs/a/Armadillo/Armadillo-2.4.4-goalf-1.1.0-no-OFED.eb @@ -0,0 +1,25 @@ +name='Armadillo' +version='2.4.4' + +easyblock= "CMake" +homepage='http://arma.sourceforge.net/' +description="Armadillo is an open-source C++ linear algebra library (matrix maths) aiming towards a good balance between speed and ease of use. Integer, floating point and complex numbers are supported, as well as a subset of trigonometric and statistics functions." + +sourceURLs=['http://sourceforge.net/projects/arma/files'] +toolkit={'name':'goalf','version':'1.1.0-no-OFED'} +builddependencies = [ + ('CMake','2.8.4'), + ] + +#manually add toolkit suffix here, plus True for letting the dependency use it's own toolkit and not the dummy one +dependencies=[ + ('Boost','1.49.0'), + ] + +sources=['%s-%s.tar.gz'%(name.lower(),version)] + +sanityCheckPaths = {'files': ['lib/libarmadillo.so','include/armadillo'], 'dirs':['include','include/armadillo_bits']} + +#extra options for cmake +configopts=' -DBoost_DIR=$SOFTROOTBOOST -DBOOST_INCLUDEDIR=$SOFTROOTBOOST/include -DBoost_DEBUG=ON -DBOOST_ROOT=$SOFTROOTBOOST -DBLAS_LIBRARY:PATH="$LIBBLAS"' +configopts += ' -DLAPACK_LIBRARY:PATH="$LIBLAPACK"' diff --git a/easybuild/easyconfigs/b/Boost/Boost-1.49.0-goalf-1.1.0-no-OFED.eb b/easybuild/easyconfigs/b/Boost/Boost-1.49.0-goalf-1.1.0-no-OFED.eb new file mode 100644 index 0000000000..f974f5f2a1 --- /dev/null +++ b/easybuild/easyconfigs/b/Boost/Boost-1.49.0-goalf-1.1.0-no-OFED.eb @@ -0,0 +1,24 @@ +name='Boost' +version='1.49.0' + +homepage='http://www.boost.org/' +description="Boost provides free peer-reviewed portable C++ source libraries." + +toolkit={'name':'goalf','version':'1.1.0-no-OFED'} +toolkitopts={'pic':True} + +dependencies=[('Python','2.7.3')] + +sources=['%s_%s.tar.gz'%(name.lower(), '_'.join(version.split('.')))] +sourceURLs=[('http://sourceforge.net/projects/%(name)s/files/%(name)s/%(version)s' % {'name':name.lower(), 'version':version}, 'download')] + +patches=['intellinuxjam_fPIC.patch'] + +sanityCheckPaths = {'files': ['lib/libboost_python.so','lib/libboost_system.so'], 'dirs':['include/boost']} + +#also build boost_mpi +boost_mpi=True + +if boost_mpi: + toolkitopts['usempi'] =True + sanityCheckPaths['files'].append('lib/libboost_mpi.so') diff --git a/easybuild/easyconfigs/b/Boost/intellinuxjam_fPIC.patch b/easybuild/easyconfigs/b/Boost/intellinuxjam_fPIC.patch new file mode 100644 index 0000000000..27c86f46d6 --- /dev/null +++ b/easybuild/easyconfigs/b/Boost/intellinuxjam_fPIC.patch @@ -0,0 +1,21 @@ +--- tools/build/v2/tools/intel-linux.jam.orig 2010-06-24 15:16:30.987009211 +0200 ++++ tools/build/v2/tools/intel-linux.jam 2010-06-24 15:17:29.954033026 +0200 +@@ -114,6 +114,8 @@ + { + gcc.setup-threading $(targets) : $(sources) : $(properties) ; + gcc.setup-fpic $(targets) : $(sources) : $(properties) ; ++ OPTIONS on $(targets) += -fPIC ; ++ OPTIONS on $(targets) += -v ; + gcc.setup-address-model $(targets) : $(sources) : $(properties) ; + DEPENDS $(<) : [ on $(<) return $(PCH_FILE) ] ; + } +@@ -127,6 +129,8 @@ + { + gcc.setup-threading $(targets) : $(sources) : $(properties) ; + gcc.setup-fpic $(targets) : $(sources) : $(properties) ; ++ OPTIONS on $(targets) += -fPIC ; ++ OPTIONS on $(targets) += -v ; + gcc.setup-address-model $(targets) : $(sources) : $(properties) ; + DEPENDS $(<) : [ on $(<) return $(PCH_FILE) ] ; + } + diff --git a/easybuild/easyconfigs/c/CMake/CMake-2.8.4-goalf-1.1.0-no-OFED.eb b/easybuild/easyconfigs/c/CMake/CMake-2.8.4-goalf-1.1.0-no-OFED.eb new file mode 100644 index 0000000000..e721af6204 --- /dev/null +++ b/easybuild/easyconfigs/c/CMake/CMake-2.8.4-goalf-1.1.0-no-OFED.eb @@ -0,0 +1,15 @@ +name='CMake' +version='2.8.4' + +homepage='http://www.cmake.org' +description="""CMake, the cross-platform, open-source build system. CMake is a family of tools designed to build, test and package software. """ + +toolkit={'name':'goalf','version':'1.1.0-no-OFED'} +sources=['%s-%s.tar.gz'%(name.lower(),version)] +majorversion = ".".join(version.split('.')[:-1]) +sourceURLs = ['http://www.cmake.org/files/v%s' % majorversion] +sanityCheckPaths={ + 'files':["bin/%s" % x for x in ['cmake','cpack','ctest']], + 'dirs':[] + } + diff --git a/easybuild/easyconfigs/d/DOLFIN/DOLFIN-1.0.0-goalf-1.1.0-no-OFED.eb b/easybuild/easyconfigs/d/DOLFIN/DOLFIN-1.0.0-goalf-1.1.0-no-OFED.eb new file mode 100644 index 0000000000..568cdf274c --- /dev/null +++ b/easybuild/easyconfigs/d/DOLFIN/DOLFIN-1.0.0-goalf-1.1.0-no-OFED.eb @@ -0,0 +1,43 @@ +name='DOLFIN' +version='1.0.0' + +easyblock="Dolfin" + +homepage='https://launchpad.net/dolfin' +description="DOLFIN is the C++/Python interface of FEniCS, providing a consistent PSE (Problem Solving Environment) for ordinary and partial differential equations." + +toolkit={'name':'goalf','version':'1.1.0-no-OFED'} +toolkitopts={'usempi':True, 'packed-groups':False} + +majver = version.split('.') +if majver[0] == '0': + majver = majver[0] +else: + majver = '.'.join(majver[0:2]) + +sources=['%s-%s.tar.gz'%(name.lower(),version)] +sourceURLs=['https://launchpad.net/%s/%s.x/%s/+download' % (name.lower(), majver, version)] + +patches=['wl_pkg_linkflags.patch'] + +builddependencies = [('CMake', '2.8.4')] + +python_version = '2.7.3' +versionsuffix = '-%s-%s-Python-%s' % (toolkit['name'], toolkit['version'], python_version) + +# some dependencies use dummy toolkit +dependencies=[ + ('Python', python_version), + ('Boost', '1.49.0'), + ('UFC', '2.0.5'), + ('FFC', '1.0.0', versionsuffix, True), + ('FIAT', '1.0.0', versionsuffix, True), + ('Instant', '1.0.0', versionsuffix, True), + ('Viper', '1.0.0', versionsuffix, True), + ('UFL', '1.0.0', versionsuffix, True), + ('SCOTCH', '5.1.12b_esmumps'), + ('Armadillo', '2.4.4'), + ('ParMETIS', '4.0.2'), + ('SWIG', '2.0.6', versionsuffix, True), + ('SuiteSparse', '3.7.0', '-withparmetis', False), + ] diff --git a/easybuild/easyconfigs/d/DOLFIN/DOLFIN-1.0.0-ictce-4.0.6.eb b/easybuild/easyconfigs/d/DOLFIN/DOLFIN-1.0.0-ictce-4.0.6.eb index 9af976714c..f5196045fa 100644 --- a/easybuild/easyconfigs/d/DOLFIN/DOLFIN-1.0.0-ictce-4.0.6.eb +++ b/easybuild/easyconfigs/d/DOLFIN/DOLFIN-1.0.0-ictce-4.0.6.eb @@ -21,20 +21,22 @@ patches=['wl_pkg_linkflags.patch'] builddependencies = [('CMake', '2.8.4', '', True)] python_version = '2.7.3' +versionsuffix = '-Python-%s' % python_version + # some dependencies use dummy toolkit dependencies=[ ('Python', python_version), ('Boost', '1.49.0'), ('UFC', '2.0.5'), - ('FFC', '1.0.0', '', True), - ('FIAT', '1.0.0', '', True), - ('Instant', '1.0.0', '', True), - ('Viper', '1.0.0', '', True), - ('UFL', '1.0.0', '', True), + ('FFC', '1.0.0', versionsuffix), + ('FIAT', '1.0.0', versionsuffix), + ('Instant', '1.0.0', versionsuffix), + ('Viper', '1.0.0', versionsuffix), + ('UFL', '1.0.0', versionsuffix), ('SCOTCH', '5.1.12b_esmumps'), ('Armadillo', '2.4.4'), ('ParMETIS', '4.0.2'), - ('SWIG', '2.0.4', "-Python-%s" % python_version), + ('SWIG', '2.0.6', versionsuffix), ('SuiteSparse', '3.7.0', '-withparmetis', False), ] diff --git a/easybuild/easyconfigs/d/DOLFIN/wl_pkg_linkflags.patch b/easybuild/easyconfigs/d/DOLFIN/wl_pkg_linkflags.patch index cee8d5f4c8..f16cde32b9 100644 --- a/easybuild/easyconfigs/d/DOLFIN/wl_pkg_linkflags.patch +++ b/easybuild/easyconfigs/d/DOLFIN/wl_pkg_linkflags.patch @@ -1,6 +1,6 @@ --- dolfin/CMakeLists.txt.orig 2012-03-27 16:40:12.595869000 +0200 -+++ dolfin/CMakeLists.txt 2012-03-27 16:43:49.937744000 +0200 -@@ -266,21 +266,28 @@ ++++ dolfin/CMakeLists.txt 2012-03-27 17:22:38.628180000 +0200 +@@ -266,9 +266,14 @@ "${_lib}" ) @@ -17,4 +17,3 @@ + endif() endif() endforeach() - diff --git a/easybuild/easyconfigs/f/FFC/FFC-1.0.0-goalf-1.1.0-no-OFED-Python-2.7.3.eb b/easybuild/easyconfigs/f/FFC/FFC-1.0.0-goalf-1.1.0-no-OFED-Python-2.7.3.eb new file mode 100644 index 0000000000..0bab98821e --- /dev/null +++ b/easybuild/easyconfigs/f/FFC/FFC-1.0.0-goalf-1.1.0-no-OFED-Python-2.7.3.eb @@ -0,0 +1,33 @@ +name='FFC' +version='1.0.0' + +easyblock="PythonPackage" + +homepage='https://launchpad.net/ffc' +description="FEniCS Form Compiler (FFC) works as a compiler for multilinear forms by generating code (C++) for the evaluation of a multilinear form given in mathematical notation." + + +pythonversion = '2.7.3' +pythonshortversion = ".".join(pythonversion.split(".")[:-1]) + +#dummy toolkit, but we want to load dependencies, so empty version +toolkit={'name':'dummy','version':''} +toolkitsuffix = "-goalf-1.1.0-no-OFED" +pythonsuffix = "-Python-%s" % pythonversion +versionsuffix = "%s%s" % (toolkitsuffix, pythonsuffix) + +#manually add toolkit suffix here, plus True for letting the dependency use it's own toolkit and not the dummy one +dependencies=[ + ('Python', pythonversion, toolkitsuffix, True), + ('UFL', '1.0.0', versionsuffix, True), + ('FIAT', '1.0.0', versionsuffix, True), + ('UFC', '2.0.5', toolkitsuffix, True), + ('Viper', '1.0.0', versionsuffix, True), + ] + +sources=['%s-%s.tar.gz'%(name.lower(),version)] +majorversion = "%s.x" % ".".join(version.split('.')[:-1]) +sourceURLs=['https://launchpad.net/FFC/%s/%s/+download/' % (majorversion, version)] + + +sanityCheckPaths = {'files': ['bin/ffc'], 'dirs':['lib/python%s/site-packages/ffc' % pythonshortversion]} diff --git a/easybuild/easyconfigs/f/FIAT/FIAT-1.0.0-goalf-1.1.0-no-OFED-Python-2.7.3.eb b/easybuild/easyconfigs/f/FIAT/FIAT-1.0.0-goalf-1.1.0-no-OFED-Python-2.7.3.eb new file mode 100644 index 0000000000..ea8a5b747b --- /dev/null +++ b/easybuild/easyconfigs/f/FIAT/FIAT-1.0.0-goalf-1.1.0-no-OFED-Python-2.7.3.eb @@ -0,0 +1,28 @@ +name='FIAT' +version='1.0.0' + +easyblock="PythonPackage" +homepage='https://launchpad.net/fiat' +description="The FInite element Automatic Tabulator FIAT supports generation of arbitrary order instances of the Lagrange elements on lines, triangles, and tetrahedra. It is also capable of generating arbitrary order instances of Jacobi-type quadrature rules on the same element shapes." + +#dummy toolkit, but we want to load dependencies, so empty version +toolkit={'name':'dummy','version':''} + +pythonversion = '2.7.3' +pythonshortversion = ".".join(pythonversion.split(".")[:-1]) + +toolkit={'name':'dummy','version':''} +toolkitsuffix = "-goalf-1.1.0-no-OFED" +versionsuffix = "%s-Python-%s" % (toolkitsuffix, pythonversion) + +#manually add toolkit suffix here, plus True for letting the dependency use it's own toolkit and not the dummy one +dependencies=[ + ('Python', pythonversion, toolkitsuffix, True), + ('ScientificPython','2.8', versionsuffix, True), + ] + +sources=['%s-%s.tar.gz'%(name.lower(),version)] +majorversion = "%s.x" % ".".join(version.split('.')[:-1]) +sourceURLs=['https://launchpad.net/FIAT/%s/%s/+download/' % (majorversion, version)] + +sanityCheckPaths = {'files': [], 'dirs':['lib/python%s/site-packages/FIAT' % pythonshortversion]} diff --git a/easybuild/easyconfigs/i/Instant/Instant-1.0.0-goalf-1.1.0-no-OFED-Python-2.7.3.eb b/easybuild/easyconfigs/i/Instant/Instant-1.0.0-goalf-1.1.0-no-OFED-Python-2.7.3.eb new file mode 100644 index 0000000000..265a331fb7 --- /dev/null +++ b/easybuild/easyconfigs/i/Instant/Instant-1.0.0-goalf-1.1.0-no-OFED-Python-2.7.3.eb @@ -0,0 +1,29 @@ +name='Instant' +version='1.0.0' + +easyblock="PythonPackage" + +homepage='https://launchpad.net/instant' +description="Instant is a Python module that allows for instant inlining of C and C++ code in Python. It is a small Python module built on top of SWIG and Distutils. It is part of the FEniCS Project (http://fenicsproject.org)." + +#dummy toolkit, but we want to load dependencies, so empty version +toolkit={'name':'dummy','version':''} + +pythonversion = '2.7.3' +pythonshortversion = ".".join(pythonversion.split(".")[:-1]) +toolkitversion = '-goalf-1.1.0-no-OFED' +versionsuffix = '%s-Python-%s' % (toolkitversion, pythonversion) + +#manually add toolkit suffix here, plus True for letting the dependency use it's own toolkit and not the dummy one +dependencies=[ + ('Python',pythonversion,toolkitversion,True), + ('SWIG','2.0.6',versionsuffix,True), + + ] + +sources=['%s-%s.tar.gz'%(name.lower(),version)] +majorversion = "%s.x" % ".".join(version.split('.')[:-1]) + +sourceURLs=['https://launchpad.net/instant/%s/%s/+download/' % (majorversion, version)] + +sanityCheckPaths = {'files': ['bin/'], 'dirs':['lib/python%s/site-packages/instant' % pythonshortversion]} diff --git a/easybuild/easyconfigs/o/OpenMPI/OpenMPI-1.4.5-GCC-4.6.3-no-OFED.eb b/easybuild/easyconfigs/o/OpenMPI/OpenMPI-1.4.5-GCC-4.6.3-no-OFED.eb index bcb0a8c7a6..607c36fb2b 100644 --- a/easybuild/easyconfigs/o/OpenMPI/OpenMPI-1.4.5-GCC-4.6.3-no-OFED.eb +++ b/easybuild/easyconfigs/o/OpenMPI/OpenMPI-1.4.5-GCC-4.6.3-no-OFED.eb @@ -12,9 +12,7 @@ sourceURLs=['http://www.open-mpi.org/software/ompi/v%s/downloads' % '.'.join(ver configopts='--with-threads=posix --enable-shared --enable-mpi-threads' -patches=[ - 'pax_disable.patch', - ] +patches=['pax_disable.patch'] moduleclass='lib' diff --git a/easybuild/easyconfigs/p/PCRE/PCRE-8.12-goalf-1.1.0-no-OFED.eb b/easybuild/easyconfigs/p/PCRE/PCRE-8.12-goalf-1.1.0-no-OFED.eb new file mode 100644 index 0000000000..91b0f36617 --- /dev/null +++ b/easybuild/easyconfigs/p/PCRE/PCRE-8.12-goalf-1.1.0-no-OFED.eb @@ -0,0 +1,16 @@ +name='PCRE' +version='8.12' + +homepage='http://www.pcre.org/' +description="The PCRE library is a set of functions that implement regular expression pattern matching using the same syntax and semantics as Perl 5." + +toolkit={'name':'goalf','version':'1.1.0-no-OFED'} + +toolkitopts={'optarch':True} + +configopts="--with-pic --disable-cpp" + +sources=['%s-%s.tar.gz'%(name.lower(),version)] +sourceURLs=['http://prdownloads.sourceforge.net/pcre'] + +moduleclass='lib' diff --git a/easybuild/easyconfigs/p/ParMETIS/ParMETIS-4.0.2-goalf-1.1.0-no-OFED.eb b/easybuild/easyconfigs/p/ParMETIS/ParMETIS-4.0.2-goalf-1.1.0-no-OFED.eb new file mode 100644 index 0000000000..a04dc557aa --- /dev/null +++ b/easybuild/easyconfigs/p/ParMETIS/ParMETIS-4.0.2-goalf-1.1.0-no-OFED.eb @@ -0,0 +1,23 @@ +easyblock="ParMETIS" + +name='ParMETIS' +version='4.0.2' + +homepage='http://glaros.dtc.umn.edu/gkhome/metis/parmetis/overview' +description="ParMETIS is an MPI-based parallel library that implements a variety of algorithms for partitioning unstructured graphs, meshes, and for computing fill-reducing orderings of sparse matrices. ParMETIS extends the functionality provided by METIS and includes routines that are especially suited for parallel AMR computations and large scale numerical simulations. The algorithms implemented in ParMETIS are based on the parallel multilevel k-way graph-partitioning, adaptive repartitioning, and parallel multi-constrained partitioning schemes." +builddependencies = [ + ('CMake','2.8.4'), + ] + +toolkit={'name':'goalf','version':'1.1.0-no-OFED'} +toolkitopts={'optarch':True, 'usempi': True} + +sources=['%s-%s.tar.gz' % (name.lower(),version)] +sourceURLs = ['http://glaros.dtc.umn.edu/gkhome/fetch/sw/parmetis'] + +makeopts='CC="$MPICC -fPIC" LIBDIR=""' +configopts = '-DCMAKE_C_COMPILER="$MPICC" -DCMAKE_C_FLAGS="-fPIC" -DOPENMP="-openmp"' +configopts += ' -DMETIS_PATH=../metis' +configopts += ' -DGKLIB_PATH=../metis/GKlib' + +moduleclass='lib' diff --git a/easybuild/easyconfigs/s/SCOTCH/SCOTCH-5.1.12b_esmumps-goalf-1.1.0-no-OFED.eb b/easybuild/easyconfigs/s/SCOTCH/SCOTCH-5.1.12b_esmumps-goalf-1.1.0-no-OFED.eb new file mode 100644 index 0000000000..91a2bf7571 --- /dev/null +++ b/easybuild/easyconfigs/s/SCOTCH/SCOTCH-5.1.12b_esmumps-goalf-1.1.0-no-OFED.eb @@ -0,0 +1,17 @@ +# Built with 1.0-r4456a1ab03d75b8852074a58b6fd249b86e3a700 on 2012-03-26_10-26-04 +easyblock="SCOTCH" + +name='SCOTCH' +version='5.1.12b_esmumps' + +homepage='http://www.labri.fr/perso/pelegrin/scotch/' +description="Software package and libraries for sequential and parallel graph partitioning, static mapping, and sparse matrix block ordering, and sequential mesh and hypergraph partitioning" + +toolkit={'name':'goalf','version':'1.1.0-no-OFED'} + +sources=['%s_%s.tar.gz'%(name.lower(),version)] +sourceURLs = ['https://gforge.inria.fr/frs/download.php/28978/'] + +toolkitopts={'pic':True} + +moduleclass='lib' diff --git a/easybuild/easyconfigs/s/SWIG/SWIG-2.0.6-goalf-1.1.0-no-OFED-Python-2.7.3.eb b/easybuild/easyconfigs/s/SWIG/SWIG-2.0.6-goalf-1.1.0-no-OFED-Python-2.7.3.eb new file mode 100644 index 0000000000..be68b5d8bd --- /dev/null +++ b/easybuild/easyconfigs/s/SWIG/SWIG-2.0.6-goalf-1.1.0-no-OFED-Python-2.7.3.eb @@ -0,0 +1,48 @@ +name='SWIG' +version='2.0.6' + +homepage='http://www.swig.org/' +description="SWIG is a software development tool that connects programs written in C and C++ with a variety of high-level programming languages." + +toolkit={'name':'goalf','version':'1.1.0-no-OFED'} +toolkitopts={'pic':True,'opt':True,'optarch':True} + +sources=['%s-%s.tar.gz'%(name.lower(),version)] +sourceURLs = ['http://prdownloads.sourceforge.net/swig'] +pythonversion='2.7.3' +versionsuffix='-Python-%s'%pythonversion +dependencies=[ + ('Python', pythonversion), + ('PCRE','8.12'), + ] + +configopts=" " + +## disable all +configopts+="--without-r " +configopts+="--without-clisp " +configopts+="--without-allegrocl " +configopts+="--without-lua " +configopts+="--without-csharp " +configopts+="--without-chicken " +configopts+="--without-pike " +configopts+="--without-ocaml " +configopts+="--without-php " +configopts+="--without-ruby " +configopts+="--without-mzscheme " +configopts+="--without-guile " +configopts+="--without-gcj " +configopts+="--without-java " +configopts+="--without-octave " +configopts+="--without-perl5 " +configopts+="--without-python3 " +configopts+="--without-tcl " + +configopts+="--with-python=$SOFTROOTPYTHON/bin/python " + +moduleclass='base' + +sanityCheckPaths={ + 'files':["bin/ccache-swig","bin/swig"], + 'dirs':[] + } diff --git a/easybuild/easyconfigs/s/ScientificPython/ScientificPython-2.8-goalf-1.1.0-no-OFED-Python-2.7.3.eb b/easybuild/easyconfigs/s/ScientificPython/ScientificPython-2.8-goalf-1.1.0-no-OFED-Python-2.7.3.eb new file mode 100644 index 0000000000..c00a592253 --- /dev/null +++ b/easybuild/easyconfigs/s/ScientificPython/ScientificPython-2.8-goalf-1.1.0-no-OFED-Python-2.7.3.eb @@ -0,0 +1,26 @@ +name='ScientificPython' +version='2.8' + +easyblock="PythonPackage" + +homepage='https://sourcesup.cru.fr/projects/scientific-py/' +description="ScientificPython is a collection of Python modules for scientific computing. It contains support for geometry, mathematical functions, statistics, physical units, IO, visualization, and parallelization." + +#dummy toolkit, but we want to load dependencies, so empty version +toolkit={'name':'dummy','version':''} + +pythonversion = '2.7.3' +pythonshortversion = ".".join(pythonversion.split(".")[:-1]) + +toolkitsuffix = "-goalf-1.1.0-no-OFED" +versionsuffix = "%s-Python-%s" % (toolkitsuffix, pythonversion) + +#manually add toolkit suffix here, plus True for letting the dependency use it's own toolkit and not the dummy one +dependencies=[ + ('Python',pythonversion,toolkitsuffix,True), + ] + +sources=['%s-%s.tar.gz'%(name,version)] +sourceURLs = ['https://sourcesup.renater.fr/frs/download.php/2309'] + +sanityCheckPaths = {'files': [], 'dirs':['lib/python%s/site-packages/Scientific' % pythonshortversion]} diff --git a/easybuild/easyconfigs/s/SuiteSparse/BlasLapackFromMkl_UseEnvCompiler_EnableParmetis-3.7.patch b/easybuild/easyconfigs/s/SuiteSparse/BlasLapackFromMkl_UseEnvCompiler_EnableParmetis-3.7.patch new file mode 100644 index 0000000000..6ff2945e12 --- /dev/null +++ b/easybuild/easyconfigs/s/SuiteSparse/BlasLapackFromMkl_UseEnvCompiler_EnableParmetis-3.7.patch @@ -0,0 +1,44 @@ +--- ./UFconfig/UFconfig.mk 2011-12-08 20:19:48.000000000 +0100 ++++ ../SuiteSparse_patched/UFconfig/UFconfig.mk 2012-03-26 13:46:32.081278439 +0200 +@@ -53,7 +53,7 @@ + # default make environment. + + # C and C++ compiler flags. The first three are standard for *.c and *.cpp +-CF = $(CFLAGS) $(CPPFLAGS) $(TARGET_ARCH) -O3 -fexceptions -fPIC ++CF = $(CFLAGS) $(CPPFLAGS) $(TARGET_ARCH) -fPIC #-O3 -fexceptions + + # ranlib, and ar, for generating libraries. If you don't need ranlib, + # just change it to RANLAB = echo +@@ -148,8 +148,9 @@ + # The path is relative to where it is used, in CHOLMOD/Lib, CHOLMOD/MATLAB, etc. + # You may wish to use an absolute path. METIS is optional. Compile + # CHOLMOD with -DNPARTITION if you do not wish to use METIS. +-METIS_PATH = ../../metis-4.0 +-METIS = ../../metis-4.0/libmetis.a ++METIS_PATH = $(SOFTROOTPARMETIS) ++METIS = $(SOFTROOTPARMETIS)/lib/libparmetis.a $(SOFTROOTPARMETIS)/lib/libmetis.a ++ + + #------------------------------------------------------------------------------ + # UMFPACK configuration: +@@ -251,9 +252,15 @@ + # Linux + #------------------------------------------------------------------------------ + +-# Using default compilers: +-# CC = gcc +-# CFLAGS = -O3 -fexceptions ++# Using mpi compilers: ++CC = $(SOFTVARMPICC) ++CFLAGS = $(SOFTVARCFLAGS) ++CXX = $(SOFTVARMPICXX) ++F77 = $(SOFTVARMPIF77) ++F77FLAGS = $(SOFTVARFFLAGS) ++INTEL_LIB = $(MKLROOT)/lib/em64t ++BLAS = -L$(INTEL_LIB) -Bstatic -lmkl_em64t -Bdynamic -liomp5 -lguide -lpthread ++LAPACK = -L$(INTEL_LIB) -Bstatic -lmkl_lapack -lmkl_em64t -Bdynamic -liomp5 -lguide -lpthread + + # alternatives: + # CFLAGS = -g -fexceptions \ + + diff --git a/easybuild/easyconfigs/s/SuiteSparse/BlasLapackFromMkl_UseEnvCompiler_EnableParmetis-3.7.patch~ b/easybuild/easyconfigs/s/SuiteSparse/BlasLapackFromMkl_UseEnvCompiler_EnableParmetis-3.7.patch~ new file mode 100644 index 0000000000..e69de29bb2 diff --git a/easybuild/easyconfigs/s/SuiteSparse/SuiteSparse-3.7.0-goalf-1.1.0-no-OFED-withparmetis.eb b/easybuild/easyconfigs/s/SuiteSparse/SuiteSparse-3.7.0-goalf-1.1.0-no-OFED-withparmetis.eb new file mode 100644 index 0000000000..8fa40dff46 --- /dev/null +++ b/easybuild/easyconfigs/s/SuiteSparse/SuiteSparse-3.7.0-goalf-1.1.0-no-OFED-withparmetis.eb @@ -0,0 +1,24 @@ +easyblock='SuiteSparse' + +name='SuiteSparse' +version='3.7.0' + +homepage='http://www.cise.ufl.edu/research/sparse/SuiteSparse/' +description="SuiteSparse is a collection of libraries manipulate sparse matrices." + +toolkit={'name':'goalf','version':'1.1.0-no-OFED'} + +toolkitopts={'opt':True,'unroll':True,'pic':True,'intel-static':True} + +sources=['%s-%s.tar.gz'%(name,version)] +sourceURLs = ['http://www.cise.ufl.edu/research/sparse/SuiteSparse'] + +dependencies=[('ParMETIS','4.0.2')] + +patches=['BlasLapackFromMkl_UseEnvCompiler_EnableParmetis-3.7.patch'] + +# SuiteSparse depends on the linear version of ParMETIS +versionsuffix='-withparmetis' + +moduleclass='lib' + diff --git a/easybuild/easyconfigs/u/UFC/UFC-2.0.5-goalf-1.1.0-no-OFED.eb b/easybuild/easyconfigs/u/UFC/UFC-2.0.5-goalf-1.1.0-no-OFED.eb new file mode 100644 index 0000000000..013f7b299f --- /dev/null +++ b/easybuild/easyconfigs/u/UFC/UFC-2.0.5-goalf-1.1.0-no-OFED.eb @@ -0,0 +1,38 @@ +name='UFC' +version='2.0.5' + +easyblock="CMakePythonPackage" + +majorversion = "%s.x" % ".".join(version.split('.')[:-1]) + +homepage='https://launchpad.net/ufc' +sourceURLs=['https://launchpad.net/ufc/%s/%s/+download/' % (majorversion, version) ] + +description="UFC (Unified Form-assembly Code) is a unified framework for finite element assembly. More precisely, it defines a fixed interface for communicating low level routines (functions) for evaluating and assembling finite element variational forms." + +#dummy toolkit, but we want to load dependencies, so empty version +toolkit={'name':'goalf','version':'1.1.0-no-OFED'} +builddependencies = [ + ('CMake','2.8.4'), + ] +pythonversion = '2.7.3' +pythonshortversion = ".".join(pythonversion.split(".")[:-1]) +pythonsuffix = "-Python-%s" % pythonversion + +#manually add toolkit suffix here, plus True for letting the dependency use it's own toolkit and not the dummy one +dependencies=[ + ('Python',pythonversion), + ('Boost','1.49.0'), + ('SWIG','2.0.6', pythonsuffix), + ('Instant','1.0.0', pythonsuffix), + ] + +sources=['%s-%s.tar.gz'%(name.lower(),version)] + +sanityCheckPaths = {'files': ['include/ufc.h'], 'dirs':['lib/python%s/site-packages/ufc_utils/' % pythonshortversion]} + +#extra options for cmake +configopts=" -DBoost_DIR=$SOFTROOTBOOST -DBOOST_INCLUDEDIR=$SOFTROOTBOOST/include -DBoost_DEBUG=ON -DBOOST_ROOT=$SOFTROOTBOOST" +configopts+=" -DUFC_ENABLE_PYTHON:BOOL=ON -DSWIG_FOUND:BOOL=ON -DPYTHON_LIBRARY=$SOFTROOTPYTHON/lib/libpython%s.so"%pythonshortversion +configopts+=" -DPYTHON_INCLUDE_PATH=$SOFTROOTPYTHON/include/python%s"%pythonshortversion + diff --git a/easybuild/easyconfigs/u/UFL/UFL-1.0.0-goalf-1.1.0-no-OFED-Python-2.7.3.eb b/easybuild/easyconfigs/u/UFL/UFL-1.0.0-goalf-1.1.0-no-OFED-Python-2.7.3.eb new file mode 100644 index 0000000000..8dc7bf6547 --- /dev/null +++ b/easybuild/easyconfigs/u/UFL/UFL-1.0.0-goalf-1.1.0-no-OFED-Python-2.7.3.eb @@ -0,0 +1,23 @@ +name='UFL' +version='1.0.0' + +easyblock="PythonPackage" +homepage='https://launchpad.net/ufl' +description="The Unified Form Language (UFL) is a domain specific language for declaration of finite element discretizations of variational forms. More precisely, it defines a flexible interface for choosing finite element spaces and defining expressions for weak forms in a notation close to mathematical notation." + +#dummy toolkit, but we want to load dependencies, so empty version +toolkit={'name':'dummy','version':''} +pythonversion = '2.7.3' +toolkitsuffix = "-goalf-1.1.0-no-OFED" +versionsuffix = "%s-Python-%s" % (toolkitsuffix, pythonversion) + + + +#manually add toolkit suffix here, plus True for letting the dependency use it's own toolkit and not the dummy one +dependencies=[ + ('Python',pythonversion,toolkitsuffix,True), + ] + +sources=['%s-%s.tar.gz'%(name.lower(),version)] +majorversion = "%s.x" % ".".join(version.split('.')[:-1]) +sourceURLs=['https://launchpad.net/UFL/%s/%s/+download/' % (majorversion, version)] diff --git a/easybuild/easyconfigs/v/Viper/Viper-1.0.0-goalf-1.1.0-no-OFED-Python-2.7.3.eb b/easybuild/easyconfigs/v/Viper/Viper-1.0.0-goalf-1.1.0-no-OFED-Python-2.7.3.eb new file mode 100644 index 0000000000..704dfbba9f --- /dev/null +++ b/easybuild/easyconfigs/v/Viper/Viper-1.0.0-goalf-1.1.0-no-OFED-Python-2.7.3.eb @@ -0,0 +1,28 @@ +name='Viper' +version='1.0.0' + +easyblock="PythonPackage" +homepage='https://launchpad.net/fenics-viper' +description="Viper is a minimalistic scientific plotter and run-time visualization module. Viper has support for visualizing meshes and solutions in DOLFIN." + +#dummy toolkit, but we want to load dependencies, so empty version +toolkit={'name':'dummy','version':''} + +pythonversion = '2.7.3' +pythonshortversion = ".".join(pythonversion.split(".")[:-1]) + +toolkitsuffix = "-goalf-1.1.0-no-OFED" +versionsuffix = "%s-Python-%s" % (toolkitsuffix, pythonversion) + +#manually add toolkit suffix here, plus True for letting the dependency use it's own toolkit and not the dummy one +dependencies=[ + ('Python',pythonversion,toolkitsuffix,True), + ] + +sources=['%s-%s.tar.gz'%(name.lower(),version)] + +majorversion = "%s.x" % ".".join(version.split('.')[:-1]) +sourceURLs=['https://launchpad.net/fenics-viper/%s/%s/+download/' % (majorversion, version)] + + +sanityCheckPaths = {'files': ['bin/'], 'dirs':['lib/python%s/site-packages/viper' % pythonshortversion]} diff --git a/easybuild/tools/toolkit.py b/easybuild/tools/toolkit.py index 873b9c54ba..3cfad8f78f 100644 --- a/easybuild/tools/toolkit.py +++ b/easybuild/tools/toolkit.py @@ -347,8 +347,8 @@ def prepareATLAS(self): Prepare for ATLAS BLAS/LAPACK library """ - self.vars['LIBBLAS'] = " -lcblas -lf77blas -latlas -lgfortran" - self.vars['LIBBLAS_MT'] = " -lptcblas -lptf77blas -latlas -lgfortran -lpthread" + self.vars['LIBBLAS'] = "-lcblas -lf77blas -latlas -lgfortran" + self.vars['LIBBLAS_MT'] = "-lptcblas -lptf77blas -latlas -lgfortran -lpthread" self._addDependencyVariables(['ATLAS']) @@ -704,12 +704,19 @@ def prepareMVAPICH2(self): """ Prepare for MVAPICH2 MPI library """ + #TODO: + #self.vars['MPI_LIB_STATIC'] = ?? + #self.vars['MPI_LIB_SHARED'] = ?? self.prepareSimpleMPI() def prepareOpenMPI(self): """ Prepare for OpenMPI MPI library """ + + #TODO: + #self.vars['MPI_LIB_STATIC'] = ?? + self.vars['MPI_LIB_SHARED'] = "%s/lib/libmpi.so" % os.getenv('SOFTROOTOPENMPI') self.prepareSimpleMPI() def prepareScaLAPACK(self): From db67454be4fa7b1e465b7b36d21e9df4e8a71fdc Mon Sep 17 00:00:00 2001 From: Jens Timmerman Date: Mon, 21 May 2012 10:03:24 +0200 Subject: [PATCH 398/798] delete obsolete dolphin.py --- easybuild/easyblocks/d/dolphin.py | 134 ------------------------------ 1 file changed, 134 deletions(-) delete mode 100644 easybuild/easyblocks/d/dolphin.py diff --git a/easybuild/easyblocks/d/dolphin.py b/easybuild/easyblocks/d/dolphin.py deleted file mode 100644 index b8f24e92b5..0000000000 --- a/easybuild/easyblocks/d/dolphin.py +++ /dev/null @@ -1,134 +0,0 @@ -## -# Copyright 2009-2012 Stijn Deweirdt, Dries Verdegem, Kenneth Hoste, Pieter De Baets, Jens Timmerman -# -# This file is part of EasyBuild, -# originally created by the HPC team of the University of Ghent (http://ugent.be/hpc). -# -# http://github.com/hpcugent/easybuild -# -# EasyBuild is free software: you can redistribute it and/or modify -# it under the terms of the GNU General Public License as published by -# the Free Software Foundation v2. -# -# EasyBuild is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU General Public License for more details. -# -# You should have received a copy of the GNU General Public License -# along with EasyBuild. If not, see . -## -import os -from easybuild.easyblocks.c.cmakepythonpackage import CMakePythonPackage -from easybuild.tools.modules import get_software_root -from easybuild.tools.toolkit import get_openmp_flag - -class Dolfin(CMakePythonPackage): - """Extension of the CMakePythonPackage for Dolfin. - - Dolfin needs some environment variables to be set at run time. - """ - - def configure(self): - """Configure Dolfin build.""" - - # make sure that required dependencies are loaded - deps = ['Armadillo', 'Boost', 'ParMETIS', 'Python', 'SCOTCH', 'SuiteSparse', 'UFC'] - depsdict = {} - for dep in deps: - deproot = get_software_root(dep) - if not deproot: - self.log.error("Dependency %s not available." % dep) - else: - depsdict.update({dep:deproot}) - - # set correct compilers to be used at runtime - self.updatecfg('configopts', ' -DMPI_C_COMPILER="$MPICC"') - self.updatecfg('configopts', ' -DMPI_CXX_COMPILER="$MPICXX"') - - # Boost config parameters - self.updatecfg('configopts', " -DBoost_DIR=%s" % depsdict['Boost']) - self.updatecfg('configopts', " -DBOOST_INCLUDEDIR=%s/include" % depsdict['Boost']) - self.updatecfg('configopts', " -DBoost_DEBUG=ON -DBOOST_ROOT=%s" % depsdict['Boost']) - - # UFC and Armadillo config params - self.updatecfg('configopts', " -DUFC_DIR=%s" % depsdict['UFC']) - self.updatecfg('configopts', "-DARMADILLO_DIR:PATH=%s " % depsdict['Armadillo']) - - # specify MPI library - # FIXME - self.updatecfg('configopts', ' -DMPI_COMPILER="%s"' % self.getenv('MPICC')) - - if not os.getenv('MPI_LIB_SHARED') or not os.getenv('MPI_INC'): - self.updatecfg('configopts', ' -DMPI_LIBRARY="%s"' % os.getenv('MPI_LIB_SHARED')) - self.updatecfg('configopts', ' -DMPI_INCLUDE_PATH="%s"' % os.getenv('MPI_INC')) - else: - self.log.error('MPI_LIB_SHARED or MPI_INC not set, could not determine MPI-related paths.') - - # specify Python paths - python_short_ver = ".".join(os.getenv('SOFTVERSIONPYTHON').split(".")[0:2]) - self.updatecfg('configopts', " -DPYTHON_INCLUDE_PATH=%s/include/python%s" % (depsdict['Python'], - python_short_ver)) - self.updatecfg('configopts', " -DPYTHON_LIBRARIES=%s/lib/libpython%s.so" % (depsdict['Python'], - python_short_ver)) - - # SuiteSparse config params - suitesparse = depsdict['SuiteSparse'] - umfpack_params = ' -DUMFPACK_DIR="%s/UMFPACK"' % suitesparse - umfpack_params += ' -DAMD_DIR="%s/UMFPACK"' % suitesparse - umfpack_params += ' -DCHOLMOD_DIR="%s/CHOLMOD"' % suitesparse - umfpack_params += ' -DUFCONFIG_DIR="%s/UFconfig"' % suitesparse - umfpack_params += ' -DCAMD_LIBRARY:PATH="%s/CAMD/lib/libcamd.a"' % suitesparse - umfpack_params += ' -DCCOLAMD_LIBRARY:PATH="%s/CCOLAMD/lib/libccolamd.a"' % suitesparse - umfpack_params += ' -DCOLAMD_LIBRARY:PATH="%s/COLAMD/lib/libcolamd.a"' % suitesparse - self.updatecfg('configopts', umfpack_params) - - # ParMETIS and SCOTCH - self.updatecfg('configopts', ' -DPARMETIS_DIR="%s"' % depsdict['ParMETIS']) - self.updatecfg('configopts', ' -DSCOTCH_DIR="%s"' % depsdict['SCOTCH']) - - # BLACS and LAPACK - self.updatecfg('configopts', ' -DBLAS_LIBRARIES:PATH="$LIBBLAS"') - self.updatecfg('configopts', ' -DLAPACK_LIBRARIES:PATH="$LIBLAPACK"') - - #set correct openmp options - openmp = get_openmp_flag(self.log) - self.updatecfg('configopts', ' -DOpenMP_CXX_FLAGS="%s"' % openmp) - self.updatecfg('configopts', ' -DOpenMP_C_FLAGS="%s"' % openmp) - - CMakePythonPackage.configure(self) - - def make_module_extra(self): - """Set extra environment variables for Dolfin.""" - - txt = CMakePythonPackage.make_module_extra(self) - - # Dolfin needs to find Boost and the UFC pkgconfig file - txt += "setenv\tBOOST_DIR\t%s\n" % get_software_root('Boost') - txt += "prepend-path\tPKG_CONFIG_PATH\t%s/lib/pkgconfig\n" % get_software_root('UFC') - txt += "prepend-path\tPKG_CONFIG_PATH\t%s/lib/pkgconfig\n" % self.installdir - - envvars = ['I_MPI_CXX', 'I_MPI_CC'] - for envvar in envvars: - envar_val = os.getenv(envvar) - if not envar_val: - self.log.error("%s not defined in environment, needed by DOLFIN" % envvar) - else: - txt += "setenv\t%s\t%s\n" % (envvar, envar_val) - - return txt - - def sanitycheck(self): - """Custom sanity check for Dolfin.""" - - if not self.getcfg('sanityCheckPaths'): - - self.setcfg('sanityCheckPaths', {'files': ['bin/dolfin-%s' % x for x in ['version', 'convert', - 'order', 'plot']] - + ['include/dolfin.h'], - 'dirs':['%s/dolfin' % self.pylibdir] - }) - - self.log.info("Customized sanity check paths: %s" % self.getcfg('sanityCheckPaths')) - - CMakePythonPackage.sanitycheck(self) From cd6f7cd2b0e583de28fdae2a0f6802546dbbbf21 Mon Sep 17 00:00:00 2001 From: Toon Willems Date: Tue, 7 Aug 2012 08:41:26 +0200 Subject: [PATCH 399/798] more style changes --- easybuild/tools/environment.py | 3 ++- easybuild/tools/toolkit.py | 6 +++--- 2 files changed, 5 insertions(+), 4 deletions(-) diff --git a/easybuild/tools/environment.py b/easybuild/tools/environment.py index 3b0869e25b..9c62680471 100644 --- a/easybuild/tools/environment.py +++ b/easybuild/tools/environment.py @@ -23,7 +23,6 @@ """ import os - changes = {} def write_changes(filename): @@ -38,6 +37,7 @@ def write_changes(filename): script.close() reset_changes() + def reset_changes(): """ Reset the changes tracked by this module @@ -45,6 +45,7 @@ def reset_changes(): global changes changes = {} + def set(key, value): """ put key in the environment with value diff --git a/easybuild/tools/toolkit.py b/easybuild/tools/toolkit.py index 8cca3ab2d7..69a7f68c96 100644 --- a/easybuild/tools/toolkit.py +++ b/easybuild/tools/toolkit.py @@ -777,9 +777,9 @@ def toolkit_comp_family(self): """Determine compiler family based on toolkit dependencies.""" comp_families = { # always use tuples as keys! - ('icc', 'ifort'):INTEL, # Intel toolkit has both icc and ifort - ('GCC', ):GCC # GCC toolkit uses GCC as compiler suite - } + ('icc', 'ifort'): INTEL, # Intel toolkit has both icc and ifort + ('GCC', ): GCC # GCC toolkit uses GCC as compiler suite + } return self.det_toolkit_type("compiler family", comp_families) From 034c7461534f297ad43029e058cf13d1ff66edde Mon Sep 17 00:00:00 2001 From: Jens Timmerman Date: Mon, 21 May 2012 10:56:01 +0200 Subject: [PATCH 400/798] added a mkdir function to filetools (closes #283) --- easybuild/tools/filetools.py | 30 ++++++++++++++++++++++++++++++ 1 file changed, 30 insertions(+) diff --git a/easybuild/tools/filetools.py b/easybuild/tools/filetools.py index 18596467c6..314877fdc2 100644 --- a/easybuild/tools/filetools.py +++ b/easybuild/tools/filetools.py @@ -34,6 +34,7 @@ import subprocess import tempfile import time +import errno import easybuild.tools.environment as env from easybuild.tools.asyncprocess import Popen, PIPE, STDOUT, send_all, recv_some @@ -693,3 +694,32 @@ def patch_perl_script_autoflush(path): except IOError, err: log.error("Failed to patch Perl configure script: %s" % err) + +def mkdir(directory, parrents=False): + """ + Create a directory + Directory is the path to make + log is the logger to which to log debugging or error info. + + When parents is True then no error if existing + and make parent directories as needed + (this is the mkdir -p behaviour) + """ + if parrents: + try: + os.makedirs(directory) + log.debug("Succesfully created directory %s and needed parents" % directory) + except OSError, err: + if err.errno == errno.EEXIST: + log.debug("Directory %s already exitst" % directory) + else: + log.error("Failed to create directory %s: %s" % (directory, err)) + else:#not parrents + try: + os.mkdir(directory) + log.debug("Succesfully created directory %s" % directory) + except OSError, err: + if err.errno == errno.EEXIST: + log.warning("Directory %s already exitst" % directory) + else: + log.error("Failed to create directory %s: %s" % (directory, err)) From 9cb446a87306e2a9c411dc95723e18e07f3c42d5 Mon Sep 17 00:00:00 2001 From: Jens Timmerman Date: Mon, 21 May 2012 13:38:15 +0200 Subject: [PATCH 401/798] code cleanup in easyblocks --- easybuild/easyblocks/c/cmakepythonpackage.py | 17 ++--- easybuild/easyblocks/d/dolfin.py | 1 - easybuild/easyblocks/m/metis.py | 47 ++++++------- easybuild/easyblocks/p/parmetis.py | 72 +++++++++++--------- easybuild/easyblocks/s/scotch.py | 25 ++++--- 5 files changed, 89 insertions(+), 73 deletions(-) diff --git a/easybuild/easyblocks/c/cmakepythonpackage.py b/easybuild/easyblocks/c/cmakepythonpackage.py index a6213ad15e..d3a5682cf4 100644 --- a/easybuild/easyblocks/c/cmakepythonpackage.py +++ b/easybuild/easyblocks/c/cmakepythonpackage.py @@ -21,7 +21,7 @@ from easybuild.easyblocks.p.pythonpackage import PythonPackage class CMakePythonPackage(CMake, PythonPackage): - """Build a Python module with cmake. + """Build a Python package and module with cmake. Some packages use cmake to first build and install c Python modules and then put the Python package in lib/pythonX.Y/site-packages @@ -34,21 +34,22 @@ class CMakePythonPackage(CMake, PythonPackage): def __init__(self, *args, **kwargs): PythonPackage.__init__(self, *args, **kwargs) - def configure(self): + def configure(self, *args, **kwargs): """Main onfiguration is with cmake""" - PythonPackage.configure(self) + PythonPackage.configure(self, *args, **kwargs) - return CMake.configure(self) + CMake.configure(self, *args, **kwargs) - def make(self): - """Build with make""" - return CMake.make(self) + def make(self, *args, **kwargs): + """Build with cmake""" + return CMake.make(self, *args, **kwargs) def make_install(self): - """Install with make install""" + """Install with cmake install""" return CMake.make_install(self) def make_module_extra(self): """Extra Python package module parameters""" + #we return a string here. return PythonPackage.make_module_extra(self) diff --git a/easybuild/easyblocks/d/dolfin.py b/easybuild/easyblocks/d/dolfin.py index 0e03b94564..5408baef5b 100644 --- a/easybuild/easyblocks/d/dolfin.py +++ b/easybuild/easyblocks/d/dolfin.py @@ -56,7 +56,6 @@ def configure(self): self.updatecfg('configopts', "-DARMADILLO_DIR:PATH=%s " % depsdict['Armadillo']) # specify MPI library - # FIXME self.updatecfg('configopts', ' -DMPI_COMPILER="%s"' % os.getenv('MPICC')) if not os.getenv('MPI_LIB_SHARED') or not os.getenv('MPI_INC'): diff --git a/easybuild/easyblocks/m/metis.py b/easybuild/easyblocks/m/metis.py index 6cebc6a80c..20c5e0f366 100644 --- a/easybuild/easyblocks/m/metis.py +++ b/easybuild/easyblocks/m/metis.py @@ -18,52 +18,53 @@ # You should have received a copy of the GNU General Public License # along with EasyBuild. If not, see . ## -from easybuild.framework.application import Application + import os import shutil + +from easybuild.framework.application import Application +from easybuild.tools.filetools import mkdir + class METIS(Application): - def configure(self): + + def configure(self, *args, **kwargs): + """No configuration is done for METIS""" pass def make_install(self): - #TODO: make a general mkdir function - try: - self.libdir = os.path.join(self.installdir, 'lib') - os.mkdir(self.libdir) - self.log.debug("Succesfully created directory %s" % self.libdir) - except Exception, err: - self.log.error("Failed to create directory %s: %s" % (self.libdir, err)) + """ Manually copy the required files to the right place. + + And create symlins where expected by other applications + (in Lib instead of lib)""" + libdir = os.path.join(self.installdir, 'lib') + mkdir(libdir) - try: - self.includedir = os.path.join(self.installdir, 'include') - os.mkdir(self.includedir) - self.log.debug("Succesfully created directory %s" % self.includedir) - except Exception, err: - self.log.error("Failed to create directory %s: %s" % (self.includedir, err)) + includedir = os.path.join(self.installdir, 'include') + mkdir(includedir) try: src = os.path.join(self.getcfg('startfrom'), 'libmetis.a') - dst = os.path.join(self.libdir, 'libmetis.a') + dst = os.path.join(libdir, 'libmetis.a') shutil.copy2(src, dst) - except Exception, err: + except OSError, err: self.log.error("Copying file libmetis.a to lib dir failed: %s" % err) try: for f in ['defs.h', 'macros.h', 'metis.h', 'proto.h', 'rename.h', 'struct.h']: src = os.path.join(self.getcfg('startfrom'), 'Lib', f) - dst = os.path.join(self.includedir, f) + dst = os.path.join(includedir, f) shutil.copy2(src, dst) os.chmod(dst, 0755) - except Exception, err: + except OSError, err: self.log.error("Copying file metis.h to include dir failed: %s" % err) # Other applications depending on ParMETIS (SuiteSparse for one) look for both ParMETIS libraries # and headerfiles in the Lib directory (capital L). The following symlinks are hence created. try: - self.Libdir = os.path.join(self.installdir, 'Lib') - os.symlink(self.libdir, self.Libdir) + Libdir = os.path.join(self.installdir, 'Lib') + os.symlink(libdir, Libdir) for f in ['defs.h', 'macros.h', 'metis.h', 'proto.h', 'rename.h', 'struct.h']: - os.symlink(os.path.join(self.includedir, file), os.path.join(self.libdir, f)) - except Exception, err: + os.symlink(os.path.join(includedir, file), os.path.join(libdir, f)) + except OSError, err: self.log.error("Something went wrong during symlink creation: %s" % err) diff --git a/easybuild/easyblocks/p/parmetis.py b/easybuild/easyblocks/p/parmetis.py index 32014b9a8d..cbfff8ad07 100644 --- a/easybuild/easyblocks/p/parmetis.py +++ b/easybuild/easyblocks/p/parmetis.py @@ -18,11 +18,17 @@ # You should have received a copy of the GNU General Public License # along with EasyBuild. If not, see . ## -from easybuild.easyblocks.m.metis import METIS -from easybuild.tools.filetools import run_cmd +""" +ParMETIS easyblock +""" + import os import shutil +from distutils.version import LooseVersion +from easybuild.easyblocks.m.metis import METIS +from easybuild.tools.filetools import run_cmd, mkdir + class ParMETIS(METIS): """ Easyblock for the ParMETIS package @@ -30,9 +36,15 @@ class ParMETIS(METIS): """ def configure(self): - if self.version() < "4": + """ + For versions of ParMETIS < 4 configure METIS separately + New versions of ParMETIS include METIS + + Run 'cmake' in the build dir to get rid of a 'user friendly' + help message that is displayed without this step. + """ + if self.version() < LooseVersion("4"): return METIS.configure(self) - #else #tested with 4.0.2, now actually requires cmake to be run first #for bot parmetis and metis for buildir in [ 'build' ] : @@ -42,68 +54,62 @@ def configure(self): - def make(self): + def make(self, verbose=False): """ make ParMETIS and Metis + + Calling make + for version > 4 cmake is run in the build dir. """ paracmd = '' if self.getcfg('parallel'): paracmd = "-j %s" % self.getcfg('parallel') cmd = "%s make %s %s" % (self.getcfg('premakeopts'), paracmd, self.getcfg('makeopts')) - if self.version() >= "4": + if self.version() >= LooseVersion("4"): + #this is done in the build dir. cmd = "cd build && %s && cd %s " % (cmd, self.getcfg('startfrom')) - # #make metis seperatly - # cmdmetis = "cd metis/build && %s make %s %s && cd %s" % (self.getCfg('premakeopts'), paracmd, self.getCfg('makeopts'),self.getCfg('startfrom')) - # runrun(cmdmetis, logall=True, simple=True) - run_cmd(cmd, log_all=True, simple=True) + run_cmd(cmd, log_all=True, simple=True, log_output=verbose) def make_install(self): - + """ + Manually copy files over to the right places + (libmetis.a, libparmetis.a, metis.h, parmetis.h) + Also create symlinks where expected by other packages (Lib directory) + """ includedir = os.path.join(self.installdir, 'include') libdir = os.path.join(self.installdir, 'lib') - if self.version() >= "4": + if self.version() >= LooseVersion("4"): #includedir etc changed in v4, use a normal makeinstall cmd = "cd build && make install %s && cd %s" % (self.getcfg('installopts'), self.getcfg('startfrom')) run_cmd(cmd, log_all=True, simple=True) - # we build metis seperatlly now - #cmd = "cd metis/build && make install %s && cd %s " % (self.getCfg('installopts'),self.getCfg('startfrom')) - #runrun(cmd, logall=True, simple=True) + try: src = os.path.join(self.getcfg('startfrom'), 'build/libmetis/libmetis.a') dst = os.path.join(libdir, 'libmetis.a') shutil.copy2(src, dst) - except Exception, err: + except OSError, err: self.log.error("Copying files to installation dir failed: %s" % err) try: src = os.path.join(self.getcfg('startfrom'), 'build/metis/include/metis.h') dst = os.path.join(includedir, 'metis.h') shutil.copy2(src, dst) - except Exception, err: + except OSError, err: self.log.error("Copying files to installation dir failed: %s" % err) else: - try: - os.mkdir(libdir) - self.log.debug("Succesfully created directory %s" % libdir) - except Exception, err: - self.log.error("Failed to create directory %s: %s" % (libdir, err)) - - try: - os.mkdir(includedir) - self.log.debug("Succesfully created directory %s" % includedir) - except Exception, err: - self.log.error("Failed to create directory %s: %s" % (includedir, err)) + mkdir(libdir) + mkdir(includedir) try: for fil in ['libmetis.a', 'libparmetis.a']: src = os.path.join(self.getcfg('startfrom'), fil) dst = os.path.join(libdir, fil) shutil.copy2(src, dst) - except Exception, err: + except OSError, err: self.log.error("Copying files to installation dir failed: %s" % err) try: @@ -113,16 +119,16 @@ def make_install(self): # Some applications (SuiteSparse) can only use METIS (not ParMETIS), but header files are the same dst = os.path.join(includedir, 'metis.h') shutil.copy2(src, dst) - except Exception, err: + except OSError, err: self.log.error("Copying files to installation dir failed: %s" % err) # Other applications depending on ParMETIS (SuiteSparse for one) look for both ParMETIS libraries # and headerfiles in the Lib directory (capital L). The following symlink are hence created. try: - Libdir = os.path.join(self.installdir, 'Lib') - os.symlink(libdir, Libdir) + llibdir = os.path.join(self.installdir, 'Lib') + os.symlink(libdir, llibdir) os.symlink(os.path.join(includedir, 'metis.h'), os.path.join(libdir, 'metis.h')) os.symlink(os.path.join(includedir, 'parmetis.h'), os.path.join(libdir, 'parmetis.h')) - except Exception, err: + except OSError, err: self.log.error("Something went wrong during symlink creation: %s" % err) diff --git a/easybuild/easyblocks/s/scotch.py b/easybuild/easyblocks/s/scotch.py index df48428f4a..6418b1f56f 100644 --- a/easybuild/easyblocks/s/scotch.py +++ b/easybuild/easyblocks/s/scotch.py @@ -18,22 +18,28 @@ # You should have received a copy of the GNU General Public License # along with EasyBuild. If not, see . ## -from easybuild.framework.application import Application -from easybuild.tools.filetools import run_cmd +""" +This module contains the SCOTCH easyblock. +""" import os import re import shutil +from easybuild.framework.application import Application +from easybuild.tools.filetools import run_cmd class SCOTCH(Application): """ Easyblock for building SCOTCH - - http://www.labri.fr/perso/pelegrin/scotch/ """ def configure(self): + """ + Locate the correct makefile, and copy this to a general Makefile.inc + (as shipped and expected by SCOTCH) + """ if self.tk.name in ['ictce', 'iqacml']: makefilename = 'Makefile.inc.x86-64_pc_linux2.icc' - elif self.tk.name in ['goalf'] : + elif self.tk.name in ['goalf']: makefilename = 'Makefile.inc.x86-64_pc_linux2' else: self.log.error("Don't know how to handle toolkit %s." % self.tk.name) @@ -44,15 +50,18 @@ def configure(self): dst = os.path.join(srcdir, 'Makefile.inc') shutil.copy2(src, dst) self.log.debug("Successfully copied Makefile.inc to src dir.") - except Exception: - self.log.exception("Copying Makefile.inc to src dir failed.") + except OSError: + self.log.error("Copying Makefile.inc to src dir failed.") try: os.chdir(srcdir) self.log.debug("Changing to src dir.") - except Exception, err: + except OSError, err: self.log.error("Failed to change to src dir: %s" % err) def make(self): + """ + Run make, but with some special options for SCOTCH depending on the compiler + """ ccs = os.environ['CC'] ccp = os.environ['MPICC'] ccd = os.environ['MPICC'] @@ -74,7 +83,7 @@ def make_install(self): src = os.path.join(self.getcfg('startfrom'), d) dst = os.path.join(self.installdir, d) shutil.copytree(src, dst) - except Exception, err: + except OSError, err: self.log.error("Copying %s to installation dir %s failed: %s" % (src, dst, err)) scotchlibdir = os.path.join(self.installdir, 'lib') From de16713b1a744354e2022000c84a9f08ba3665aa Mon Sep 17 00:00:00 2001 From: Jens Timmerman Date: Tue, 19 Jun 2012 18:16:14 +0200 Subject: [PATCH 402/798] added support for building dolfin with goalf, fix bug in scotch (we don't need metis things from scotch) --- easybuild/easyblocks/d/dolfin.py | 9 +++- easybuild/easyblocks/s/scotch.py | 38 +++++++++++---- easybuild/tools/filetools.py | 82 +++++++++++++++++++++++++++++++- 3 files changed, 117 insertions(+), 12 deletions(-) diff --git a/easybuild/easyblocks/d/dolfin.py b/easybuild/easyblocks/d/dolfin.py index 5408baef5b..3cf0ec80e3 100644 --- a/easybuild/easyblocks/d/dolfin.py +++ b/easybuild/easyblocks/d/dolfin.py @@ -42,6 +42,9 @@ def configure(self): else: depsdict.update({dep:deproot}) + #run cmake in debug mode + + self.updatecfg('configopts', ' -DCMAKE_BUILD_TYPE=Debug') # set correct compilers to be used at runtime self.updatecfg('configopts', ' -DMPI_C_COMPILER="$MPICC"') self.updatecfg('configopts', ' -DMPI_CXX_COMPILER="$MPICXX"') @@ -83,14 +86,16 @@ def configure(self): self.updatecfg('configopts', umfpack_params) # ParMETIS and SCOTCH - - self.updatecfg('configopts', ' -DSCOTCH_DIR="%s" -DSCOTCH_DEBUG:BOOL=ON' % depsdict['SCOTCH']) self.updatecfg('configopts', ' -DPARMETIS_DIR="%s"' % depsdict['ParMETIS']) + self.updatecfg('configopts', ' -DSCOTCH_DIR="%s" -DSCOTCH_DEBUG:BOOL=ON' % depsdict['SCOTCH']) # BLACS and LAPACK self.updatecfg('configopts', ' -DBLAS_LIBRARIES:PATH="$LIBBLAS"') self.updatecfg('configopts', ' -DLAPACK_LIBRARIES:PATH="$LIBLAPACK"') + #CFLAGS + self.updatecfg('configopts', ' -DCGAL_DIR:PATH="$SOFTROOTCGAL"') + #set correct openmp options openmp = get_openmp_flag(self.log) self.updatecfg('configopts', ' -DOpenMP_CXX_FLAGS="%s"' % openmp) diff --git a/easybuild/easyblocks/s/scotch.py b/easybuild/easyblocks/s/scotch.py index 6418b1f56f..25ddeb8113 100644 --- a/easybuild/easyblocks/s/scotch.py +++ b/easybuild/easyblocks/s/scotch.py @@ -21,25 +21,28 @@ """ This module contains the SCOTCH easyblock. """ +import fileinput import os import re +import sys import shutil from easybuild.framework.application import Application -from easybuild.tools.filetools import run_cmd +from easybuild.tools.filetools import run_cmd, copytree + class SCOTCH(Application): """ Easyblock for building SCOTCH - """ + """ def configure(self): """ Locate the correct makefile, and copy this to a general Makefile.inc (as shipped and expected by SCOTCH) """ - if self.tk.name in ['ictce', 'iqacml']: + if "SOFTROOTICC" in os.environ: makefilename = 'Makefile.inc.x86-64_pc_linux2.icc' - elif self.tk.name in ['goalf']: + elif "SOFTROOTGCC" in os.environ: makefilename = 'Makefile.inc.x86-64_pc_linux2' else: self.log.error("Don't know how to handle toolkit %s." % self.tk.name) @@ -52,6 +55,22 @@ def configure(self): self.log.debug("Successfully copied Makefile.inc to src dir.") except OSError: self.log.error("Copying Makefile.inc to src dir failed.") + + #the default behaviour of these makefiles is still wrong + #e.g., we need -lpthread + try: + for line in fileinput.input(dst, inplace=1, backup='.orig.patchictce'): + #use $CC and the like since we're at it. + line = re.sub(r"^CCS\s*=.*$", "CCS\t= $(CC)", line) + line = re.sub(r"^CCP\s*=.*$", "CCP\t= $(MPICC)", line) + line = re.sub(r"^CCD\s*=.*$", "CCD\t= $(MPICC)", line) + #append -lpthread to LDFLAGS + line = re.sub(r"^LDFLAGS\s*=(?P.*$)", "LDFLAGS\t=\g -lpthread", line) + line = re.sub(r"^CFLAGS\s*=(?P.*$)", "CFLAGS\t=\g -fPIC", line) + sys.stdout.write(line) + except IOError, err: + self.log.error("Can't modify/write Makefile in 'Makefile.inc': %s" % (err)) + try: os.chdir(srcdir) self.log.debug("Changing to src dir.") @@ -78,11 +97,14 @@ def make(self): run_cmd(cmd, log_all=True, simple=True) def make_install(self): + self.log.debug("starting scotch's make_install") + regmetis = re.compile(r".*metis.*") try: - for d in ["include", "lib", "bin", "man"]: + for d in ["include", "lib", "bin", "man"]:#removed , here, we don't need metis.h etc. src = os.path.join(self.getcfg('startfrom'), d) dst = os.path.join(self.installdir, d) - shutil.copytree(src, dst) + #we don't need any metis stuff from scotch! + copytree(src, dst, ignore=lambda path, files: [x for x in files if regmetis.match(x)]) except OSError, err: self.log.error("Copying %s to installation dir %s failed: %s" % (src, dst, err)) @@ -90,10 +112,10 @@ def make_install(self): scotchgrouplib = os.path.join(scotchlibdir, 'libscotch_group.a') liblistorig = os.listdir(scotchlibdir) liblist = [] - regmetis = re.compile(r".*metis.*") + for lib in liblistorig: if not regmetis.match(lib): liblist.append(lib) - line = ' '.join(liblist) + line = ' '.join(liblistorig) line = "GROUP (%s)" % line try: f = open(scotchgrouplib, 'w') diff --git a/easybuild/tools/filetools.py b/easybuild/tools/filetools.py index 314877fdc2..372b7e77cd 100644 --- a/easybuild/tools/filetools.py +++ b/easybuild/tools/filetools.py @@ -26,6 +26,7 @@ """ Set of file tools """ +import errno import os import re import shutil @@ -34,10 +35,10 @@ import subprocess import tempfile import time -import errno import easybuild.tools.environment as env -from easybuild.tools.asyncprocess import Popen, PIPE, STDOUT, send_all, recv_some +from easybuild.tools.asyncprocess import Popen, PIPE, STDOUT, send_all, \ + recv_some from easybuild.tools.build_log import getLog @@ -723,3 +724,80 @@ def mkdir(directory, parrents=False): log.warning("Directory %s already exitst" % directory) else: log.error("Failed to create directory %s: %s" % (directory, err)) + + +def copytree(src, dst, symlinks=False, ignore=None): + """ + Copied from Lib/shutil.py in python 2.7, since we need this to work for python2.4 aswell + and this code can be improved... + + Recursively copy a directory tree using copy2(). + + The destination directory must not already exist. + If exception(s) occur, an Error is raised with a list of reasons. + + If the optional symlinks flag is true, symbolic links in the + source tree result in symbolic links in the destination tree; if + it is false, the contents of the files pointed to by symbolic + links are copied. + + The optional ignore argument is a callable. If given, it + is called with the `src` parameter, which is the directory + being visited by copytree(), and `names` which is the list of + `src` contents, as returned by os.listdir(): + + callable(src, names) -> ignored_names + + Since copytree() is called recursively, the callable will be + called once for each directory that is copied. It returns a + list of names relative to the `src` directory that should + not be copied. + + XXX Consider this example code rather than the ultimate tool. + + """ + class Error(EnvironmentError): + pass + try: + WindowsError + except NameError: + WindowsError = None + + names = os.listdir(src) + if ignore is not None: + ignored_names = ignore(src, names) + else: + ignored_names = set() + log.debug("copytree: skipping copy of %s" % ignored_names) + os.makedirs(dst) + errors = [] + for name in names: + if name in ignored_names: + continue + srcname = os.path.join(src, name) + dstname = os.path.join(dst, name) + try: + if symlinks and os.path.islink(srcname): + linkto = os.readlink(srcname) + os.symlink(linkto, dstname) + elif os.path.isdir(srcname): + copytree(srcname, dstname, symlinks, ignore) + else: + # Will raise a SpecialFileError for unsupported file types + shutil.copy2(srcname, dstname) + # catch the Error from the recursive copytree so that we can + # continue with other files + except Error, err: + errors.extend(err.args[0]) + except EnvironmentError, why: + errors.append((srcname, dstname, str(why))) + try: + shutil.copystat(src, dst) + except OSError, why: + if WindowsError is not None and isinstance(why, WindowsError): + # Copying file access times may fail on Windows + pass + else: + errors.extend((src, dst, str(why))) + if errors: + raise Error, errors From d4877a06e9d15d5ea3b9a23778570448380ad4a0 Mon Sep 17 00:00:00 2001 From: Jens Timmerman Date: Wed, 20 Jun 2012 17:18:37 +0200 Subject: [PATCH 403/798] fixed MPI_INC not being defined in all toolkits, added support for building dolfin with CGAL (and it's dependencies GMP and MPFR) --- easybuild/easyblocks/c/cgal.py | 31 +++++++++++++++++++ easybuild/easyblocks/d/dolfin.py | 11 +++++-- easybuild/easyblocks/p/pythonpackage.py | 8 +++-- easybuild/easyblocks/s/scotch.py | 16 +++++----- .../c/CGAL/CGAL-4.0-goalf-1.1.0-no-OFED.eb | 19 ++++++++++++ .../DOLFIN-1.0.0-goalf-1.1.0-no-OFED.eb | 19 +++++++----- .../d/DOLFIN/DOLFIN-1.0.0-ictce-4.0.6.eb | 1 - .../g/GMP/GMP-5.0.5-goalf-1.1.0-no-OFED.eb | 14 +++++++++ ...-1.0.0-goalf-1.1.0-no-OFED-Python-2.7.3.eb | 3 +- .../m/MPFR/MPFR-3.1.0-goalf-1.1.0-no-OFED.eb | 17 ++++++++++ ...2.0.4-goalf-1.1.0-no-OFED-Python-2.7.3.eb} | 2 +- .../u/UFC/UFC-2.0.5-goalf-1.1.0-no-OFED.eb | 3 +- easybuild/tools/toolkit.py | 9 ++++++ 13 files changed, 127 insertions(+), 26 deletions(-) create mode 100644 easybuild/easyblocks/c/cgal.py create mode 100644 easybuild/easyconfigs/c/CGAL/CGAL-4.0-goalf-1.1.0-no-OFED.eb create mode 100644 easybuild/easyconfigs/g/GMP/GMP-5.0.5-goalf-1.1.0-no-OFED.eb create mode 100644 easybuild/easyconfigs/m/MPFR/MPFR-3.1.0-goalf-1.1.0-no-OFED.eb rename easybuild/easyconfigs/s/SWIG/{SWIG-2.0.6-goalf-1.1.0-no-OFED-Python-2.7.3.eb => SWIG-2.0.4-goalf-1.1.0-no-OFED-Python-2.7.3.eb} (98%) diff --git a/easybuild/easyblocks/c/cgal.py b/easybuild/easyblocks/c/cgal.py new file mode 100644 index 0000000000..bda263227b --- /dev/null +++ b/easybuild/easyblocks/c/cgal.py @@ -0,0 +1,31 @@ +# Copyright 2012 Jens Timmerman +# +# This file is part of EasyBuild, +# originally created by the HPC team of the University of Ghent (http://ugent.be/hpc). +# +# http://github.com/hpcugent/easybuild +# +# EasyBuild is free software: you can redistribute it and/or modify +# it under the terms of the GNU General Public License as published by +# the Free Software Foundation v2. +# +# EasyBuild is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with EasyBuild. If not, see . +## +import os +from easybuild.easyblocks.c.cmake import CMake + +class CGAL(CMake): + def configure(self): + """add some extra environment variables here before doing the configure""" + os.environ['GMP_INC_DIR'] = "%s%s" % (os.environ['SOFTROOTGMP'], "/include/") + os.environ['GMP_LIB_DIR'] = "%s%s" % (os.environ['SOFTROOTGMP'], "/lib/") + os.environ['MPFR_INC_DIR'] = "%s%s" % (os.environ['SOFTROOTMPFR'], "/include/") + os.environ['MPFR_LIB_DIR'] = "%s%s" % (os.environ['SOFTROOTMPFR'], "/lib/") + os.environ['BOOST_ROOT'] = os.environ['SOFTROOTBOOST'] + CMake.configure(self) diff --git a/easybuild/easyblocks/d/dolfin.py b/easybuild/easyblocks/d/dolfin.py index 3cf0ec80e3..dc3a945510 100644 --- a/easybuild/easyblocks/d/dolfin.py +++ b/easybuild/easyblocks/d/dolfin.py @@ -19,6 +19,7 @@ # along with EasyBuild. If not, see . ## import os +from distutils.version import LooseVersion from easybuild.easyblocks.c.cmakepythonpackage import CMakePythonPackage from easybuild.tools.modules import get_software_root from easybuild.tools.toolkit import get_openmp_flag @@ -32,6 +33,13 @@ class Dolfin(CMakePythonPackage): def configure(self): """Configure Dolfin build.""" + #dolfin does not work with swig 2.0.5 and 2.0.6 + #is this fixed in 2.0.7?? see https://bugs.launchpad.net/dolfin/+bug/996398 + # If so, change this check accordingly. + if LooseVersion(os.environ['SOFTVERSIONSWIG']) > '2.0.4': + self.log.error("Using bad version of SWIG, expecting swig <= 2.0.4." \ + " See https://bugs.launchpad.net/dolfin/+bug/996398") + # make sure that required dependencies are loaded deps = ['Armadillo', 'Boost', 'ParMETIS', 'Python', 'SCOTCH', 'SuiteSparse', 'UFC'] depsdict = {} @@ -61,7 +69,7 @@ def configure(self): # specify MPI library self.updatecfg('configopts', ' -DMPI_COMPILER="%s"' % os.getenv('MPICC')) - if not os.getenv('MPI_LIB_SHARED') or not os.getenv('MPI_INC'): + if os.getenv('MPI_LIB_SHARED') and os.getenv('MPI_INC'): self.updatecfg('configopts', ' -DMPI_LIBRARY="%s"' % os.getenv('MPI_LIB_SHARED')) self.updatecfg('configopts', ' -DMPI_INCLUDE_PATH="%s"' % os.getenv('MPI_INC')) else: @@ -127,7 +135,6 @@ def sanitycheck(self): """Custom sanity check for Dolfin.""" if not self.getcfg('sanityCheckPaths'): - self.setcfg('sanityCheckPaths', {'files': ['bin/dolfin-%s' % x for x in ['version', 'convert', 'order', 'plot']] + ['include/dolfin.h'], diff --git a/easybuild/easyblocks/p/pythonpackage.py b/easybuild/easyblocks/p/pythonpackage.py index 42170ac52b..7e49abdab2 100644 --- a/easybuild/easyblocks/p/pythonpackage.py +++ b/easybuild/easyblocks/p/pythonpackage.py @@ -27,13 +27,13 @@ class PythonPackage(Application): def __init__(self, *args, **kwargs): Application.__init__(self, *args, **kwargs) - + # Python packages lib dir - self.pylibdir = os.path.join("lib","python%s", "site-packages") + self.pylibdir = os.path.join("lib", "python%s", "site-packages") def configure(self): """Set Python packages lib dir.""" - + self.log.debug("PythonPackage: configuring") python_version = os.getenv('SOFTVERSIONPYTHON') if not python_version: self.log.error('Python not available.') @@ -41,6 +41,8 @@ def configure(self): python_short_ver = ".".join(python_version.split(".")[0:2]) self.pylibdir = self.pylibdir % python_short_ver + self.log.debug("pylibdir: %s" % self.pylibdir) + def make(self): """Build Python package using setup.py""" diff --git a/easybuild/easyblocks/s/scotch.py b/easybuild/easyblocks/s/scotch.py index 25ddeb8113..1f42f87658 100644 --- a/easybuild/easyblocks/s/scotch.py +++ b/easybuild/easyblocks/s/scotch.py @@ -66,7 +66,6 @@ def configure(self): line = re.sub(r"^CCD\s*=.*$", "CCD\t= $(MPICC)", line) #append -lpthread to LDFLAGS line = re.sub(r"^LDFLAGS\s*=(?P.*$)", "LDFLAGS\t=\g -lpthread", line) - line = re.sub(r"^CFLAGS\s*=(?P.*$)", "CFLAGS\t=\g -fPIC", line) sys.stdout.write(line) except IOError, err: self.log.error("Can't modify/write Makefile in 'Makefile.inc': %s" % (err)) @@ -85,9 +84,10 @@ def make(self): ccp = os.environ['MPICC'] ccd = os.environ['MPICC'] cflags = "" - if self.tk.name == "iqacml": - cflags = "-fPIC -O3 -DCOMMON_FILE_COMPRESS_GZ -DCOMMON_PTHREAD -DCOMMON_RANDOM_FIXED_SEED -DSCOTCH_RENAME -restrict -DIDXSIZE64" - elif self.tk.name == 'ictce': + #if self.tk.name == "iqacml": + # cflags = "-fPIC -O3 -DCOMMON_FILE_COMPRESS_GZ -DCOMMON_PTHREAD -DCOMMON_RANDOM_FIXED_SEED -DSCOTCH_RENAME -restrict -DIDXSIZE64" + #GCC doens't know -restrict + if not "SOFTROOTGCC" in os.environ: cflags = "-fPIC -O3 -DCOMMON_FILE_COMPRESS_GZ -DCOMMON_PTHREAD -DCOMMON_RANDOM_FIXED_SEED -DSCOTCH_RENAME -DSCOTCH_PTHREAD -restrict -DIDXSIZE64" else: cflags = "-fPIC -O3 -DCOMMON_FILE_COMPRESS_GZ -DCOMMON_PTHREAD -DCOMMON_RANDOM_FIXED_SEED -DSCOTCH_RENAME -DSCOTCH_PTHREAD -Drestrict=__restrict" @@ -105,16 +105,14 @@ def make_install(self): dst = os.path.join(self.installdir, d) #we don't need any metis stuff from scotch! copytree(src, dst, ignore=lambda path, files: [x for x in files if regmetis.match(x)]) + except OSError, err: self.log.error("Copying %s to installation dir %s failed: %s" % (src, dst, err)) scotchlibdir = os.path.join(self.installdir, 'lib') scotchgrouplib = os.path.join(scotchlibdir, 'libscotch_group.a') - liblistorig = os.listdir(scotchlibdir) - liblist = [] - for lib in liblistorig: - if not regmetis.match(lib): liblist.append(lib) + liblistorig = os.listdir(scotchlibdir) line = ' '.join(liblistorig) line = "GROUP (%s)" % line try: @@ -122,5 +120,5 @@ def make_install(self): f.write(line) f.close() self.log.info("Successfully written group lib file: %s" % scotchgrouplib) - except Exception, err: + except IOError, err: self.log.error("Can't write to file %s: %s" % (scotchgrouplib, err)) diff --git a/easybuild/easyconfigs/c/CGAL/CGAL-4.0-goalf-1.1.0-no-OFED.eb b/easybuild/easyconfigs/c/CGAL/CGAL-4.0-goalf-1.1.0-no-OFED.eb new file mode 100644 index 0000000000..b23adc5a38 --- /dev/null +++ b/easybuild/easyconfigs/c/CGAL/CGAL-4.0-goalf-1.1.0-no-OFED.eb @@ -0,0 +1,19 @@ +name='CGAL' +version='4.0' + +homepage='http://www.cgal.org/' +description="""The goal of the CGAL Open Source Project is to provide easy access to efficient +and reliable geometric algorithms in the form of a C++ library. """ + +dependencies=[ + ('CMake','2.8.4'), + ('GMP','5.0.5'), + ('Boost','1.49.0'), + ('MPFR','3.1.0'), + ] + +toolkit={'name':'goalf','version':'1.1.0-no-OFED'} +sources=['%s-%s.tar.gz'%(name,version)] +sourceURLs = ['http://fenicsproject.org/pub/software/contrib/'] + + diff --git a/easybuild/easyconfigs/d/DOLFIN/DOLFIN-1.0.0-goalf-1.1.0-no-OFED.eb b/easybuild/easyconfigs/d/DOLFIN/DOLFIN-1.0.0-goalf-1.1.0-no-OFED.eb index 568cdf274c..df175aeb07 100644 --- a/easybuild/easyconfigs/d/DOLFIN/DOLFIN-1.0.0-goalf-1.1.0-no-OFED.eb +++ b/easybuild/easyconfigs/d/DOLFIN/DOLFIN-1.0.0-goalf-1.1.0-no-OFED.eb @@ -23,21 +23,24 @@ patches=['wl_pkg_linkflags.patch'] builddependencies = [('CMake', '2.8.4')] python_version = '2.7.3' -versionsuffix = '-%s-%s-Python-%s' % (toolkit['name'], toolkit['version'], python_version) +versionsuffix = '-Python-%s' % (python_version) # some dependencies use dummy toolkit dependencies=[ ('Python', python_version), ('Boost', '1.49.0'), ('UFC', '2.0.5'), - ('FFC', '1.0.0', versionsuffix, True), - ('FIAT', '1.0.0', versionsuffix, True), - ('Instant', '1.0.0', versionsuffix, True), - ('Viper', '1.0.0', versionsuffix, True), - ('UFL', '1.0.0', versionsuffix, True), + ('SWIG','2.0.4',versionsuffix),#we need 2.0.4 here, since there are regression in swig + # see https://bugs.launchpad.net/dolfin/+bug/996398 + ('FFC', '1.0.0', versionsuffix), + ('FIAT', '1.0.0', versionsuffix), + ('Instant', '1.0.0', versionsuffix), + ('Viper', '1.0.0', versionsuffix), + ('UFL', '1.0.0', versionsuffix), ('SCOTCH', '5.1.12b_esmumps'), ('Armadillo', '2.4.4'), ('ParMETIS', '4.0.2'), - ('SWIG', '2.0.6', versionsuffix, True), - ('SuiteSparse', '3.7.0', '-withparmetis', False), + ('SuiteSparse', '3.7.0', '-withparmetis'), + ('CGAL', '4.0'), + ('zlib', '1.2.7'), ] diff --git a/easybuild/easyconfigs/d/DOLFIN/DOLFIN-1.0.0-ictce-4.0.6.eb b/easybuild/easyconfigs/d/DOLFIN/DOLFIN-1.0.0-ictce-4.0.6.eb index f5196045fa..f93543fddd 100644 --- a/easybuild/easyconfigs/d/DOLFIN/DOLFIN-1.0.0-ictce-4.0.6.eb +++ b/easybuild/easyconfigs/d/DOLFIN/DOLFIN-1.0.0-ictce-4.0.6.eb @@ -37,6 +37,5 @@ dependencies=[ ('SCOTCH', '5.1.12b_esmumps'), ('Armadillo', '2.4.4'), ('ParMETIS', '4.0.2'), - ('SWIG', '2.0.6', versionsuffix), ('SuiteSparse', '3.7.0', '-withparmetis', False), ] diff --git a/easybuild/easyconfigs/g/GMP/GMP-5.0.5-goalf-1.1.0-no-OFED.eb b/easybuild/easyconfigs/g/GMP/GMP-5.0.5-goalf-1.1.0-no-OFED.eb new file mode 100644 index 0000000000..c33bf4c966 --- /dev/null +++ b/easybuild/easyconfigs/g/GMP/GMP-5.0.5-goalf-1.1.0-no-OFED.eb @@ -0,0 +1,14 @@ +name='GMP' +version='5.0.5' + +homepage='http://gmplib.org/' +description="""GMP is a free library for arbitrary precision arithmetic, +operating on signed integers, rational numbers, and floating point numbers. """ + + +toolkit={'name':'goalf','version':'1.1.0-no-OFED'} +sources=['%s-%s.tar.bz2'%(name.lower(),version)] +sourceURLs = ['http://ftp.gnu.org/gnu/gmp'] + +runtest='check' +sanityCheckPaths={'dirs':[],'files':['lib/libgmp.so','include/gmp.h']} diff --git a/easybuild/easyconfigs/i/Instant/Instant-1.0.0-goalf-1.1.0-no-OFED-Python-2.7.3.eb b/easybuild/easyconfigs/i/Instant/Instant-1.0.0-goalf-1.1.0-no-OFED-Python-2.7.3.eb index 265a331fb7..5680eabd61 100644 --- a/easybuild/easyconfigs/i/Instant/Instant-1.0.0-goalf-1.1.0-no-OFED-Python-2.7.3.eb +++ b/easybuild/easyconfigs/i/Instant/Instant-1.0.0-goalf-1.1.0-no-OFED-Python-2.7.3.eb @@ -17,7 +17,8 @@ versionsuffix = '%s-Python-%s' % (toolkitversion, pythonversion) #manually add toolkit suffix here, plus True for letting the dependency use it's own toolkit and not the dummy one dependencies=[ ('Python',pythonversion,toolkitversion,True), - ('SWIG','2.0.6',versionsuffix,True), + ('SWIG','2.0.4',versionsuffix,True),#we need 2.0.4 here, since there are regression in swig + # see https://bugs.launchpad.net/dolfin/+bug/996398 ] diff --git a/easybuild/easyconfigs/m/MPFR/MPFR-3.1.0-goalf-1.1.0-no-OFED.eb b/easybuild/easyconfigs/m/MPFR/MPFR-3.1.0-goalf-1.1.0-no-OFED.eb new file mode 100644 index 0000000000..7d7a3d0334 --- /dev/null +++ b/easybuild/easyconfigs/m/MPFR/MPFR-3.1.0-goalf-1.1.0-no-OFED.eb @@ -0,0 +1,17 @@ +name='MPFR' +version='3.1.0' + +homepage='http://www.mpfr.org' +description="""The MPFR library is a C library for multiple-precision +floating-point computations with correct rounding.""" + +dependencies=[ + ('GMP','5.0.5'), + ] + +toolkit={'name':'goalf','version':'1.1.0-no-OFED'} +sources=['%s-%s.tar.bz2'%(name.lower(),version)] +sourceURLs = ['http://www.mpfr.org/mpfr-current/'] + +runtest='check' +sanityCheckPaths={'dirs':[],'files':['lib/libmpfr.so','include/mpfr.h']} diff --git a/easybuild/easyconfigs/s/SWIG/SWIG-2.0.6-goalf-1.1.0-no-OFED-Python-2.7.3.eb b/easybuild/easyconfigs/s/SWIG/SWIG-2.0.4-goalf-1.1.0-no-OFED-Python-2.7.3.eb similarity index 98% rename from easybuild/easyconfigs/s/SWIG/SWIG-2.0.6-goalf-1.1.0-no-OFED-Python-2.7.3.eb rename to easybuild/easyconfigs/s/SWIG/SWIG-2.0.4-goalf-1.1.0-no-OFED-Python-2.7.3.eb index be68b5d8bd..f999cc2911 100644 --- a/easybuild/easyconfigs/s/SWIG/SWIG-2.0.6-goalf-1.1.0-no-OFED-Python-2.7.3.eb +++ b/easybuild/easyconfigs/s/SWIG/SWIG-2.0.4-goalf-1.1.0-no-OFED-Python-2.7.3.eb @@ -1,5 +1,5 @@ name='SWIG' -version='2.0.6' +version='2.0.4' homepage='http://www.swig.org/' description="SWIG is a software development tool that connects programs written in C and C++ with a variety of high-level programming languages." diff --git a/easybuild/easyconfigs/u/UFC/UFC-2.0.5-goalf-1.1.0-no-OFED.eb b/easybuild/easyconfigs/u/UFC/UFC-2.0.5-goalf-1.1.0-no-OFED.eb index 013f7b299f..a388d49356 100644 --- a/easybuild/easyconfigs/u/UFC/UFC-2.0.5-goalf-1.1.0-no-OFED.eb +++ b/easybuild/easyconfigs/u/UFC/UFC-2.0.5-goalf-1.1.0-no-OFED.eb @@ -23,8 +23,9 @@ pythonsuffix = "-Python-%s" % pythonversion dependencies=[ ('Python',pythonversion), ('Boost','1.49.0'), - ('SWIG','2.0.6', pythonsuffix), ('Instant','1.0.0', pythonsuffix), + ('SWIG','2.0.4',pythonsuffix),#we need 2.0.4 here, since there are regression in swig + # see https://bugs.launchpad.net/dolfin/+bug/996398 ] sources=['%s-%s.tar.gz'%(name.lower(),version)] diff --git a/easybuild/tools/toolkit.py b/easybuild/tools/toolkit.py index 3cfad8f78f..a366bafa3e 100644 --- a/easybuild/tools/toolkit.py +++ b/easybuild/tools/toolkit.py @@ -653,6 +653,9 @@ def prepareQLogicMPI(self): for i in ['CC', 'CXX', 'F77', 'F90']: self.vars[i] = self.vars["MPI%s" % i] + self.vars['MPI_INC'] = "%s/include" % os.getenv('SOFTROOTQLOGICMPI') + self.vars['MPI_LIB_SHARED'] = "%s/lib/libmpich.so" % os.getenv('SOFTROOTMPICH2') + def prepareLAPACK(self): """ Prepare for LAPACK library @@ -680,6 +683,10 @@ def prepareMPICH2(self): if self.opts['usempi']: for i in ['CC', 'CXX', 'F77', 'F90']: self.vars[i] = self.vars["MPI%s" % i] + + self.vars['MPI_INC'] = "%s/include" % os.getenv('SOFTROOTMPICH2') + self.vars['MPI_LIB_SHARED'] = "%s/lib/libmpich.so" % os.getenv('SOFTROOTMPICH2') + self.vars['MPI_LIB_STATIC'] = "%s/lib/libmpich.a" % os.getenv('SOFTROOTMPICH2') else: self.log.error("Don't know how to prepare for a non-ScaleMP MPICH2 library.") @@ -700,6 +707,7 @@ def prepareSimpleMPI(self): for i in ['CC', 'CXX', 'F77', 'F90']: self.vars[i] = self.vars["MPI%s" % i] + def prepareMVAPICH2(self): """ Prepare for MVAPICH2 MPI library @@ -717,6 +725,7 @@ def prepareOpenMPI(self): #TODO: #self.vars['MPI_LIB_STATIC'] = ?? self.vars['MPI_LIB_SHARED'] = "%s/lib/libmpi.so" % os.getenv('SOFTROOTOPENMPI') + self.vars['MPI_INC'] = "%s/include" % os.getenv('SOFTROOTOPENMPI') self.prepareSimpleMPI() def prepareScaLAPACK(self): From 7055eca2934f37b261691dfda51ea3f1c3d3b35e Mon Sep 17 00:00:00 2001 From: Jens Timmerman Date: Thu, 21 Jun 2012 14:22:19 +0200 Subject: [PATCH 404/798] use an actual version in the impi version check --- easybuild/tools/toolkit.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/easybuild/tools/toolkit.py b/easybuild/tools/toolkit.py index a366bafa3e..f8ae6aebc8 100644 --- a/easybuild/tools/toolkit.py +++ b/easybuild/tools/toolkit.py @@ -626,7 +626,8 @@ def prepareIMPI(self): if self.opts['32bit']: log.error("Don't know how to set IMPI paths for 32-bit.") else: - if LooseVersion(os.getenv('SOFTVERSIONIMPI')) < LooseVersion("100"): + if LooseVersion(os.getenv('SOFTVERSIONIMPI')) < LooseVersion("3.2.1.009"): + #this could have been different in older versions, we only checked for 3.2.1.009 and up (to 4.0.2.003) log.error("Don't know how to set IMPI paths for old versions.") else: mpi_lib = os.path.join(impiroot, 'lib64', 'libmpi') From 319c2052364074627a031dc2113edbd29d693766 Mon Sep 17 00:00:00 2001 From: Jens Timmerman Date: Thu, 21 Jun 2012 14:33:26 +0200 Subject: [PATCH 405/798] always set LIBFFT in prepare IMKL --- easybuild/tools/toolkit.py | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) diff --git a/easybuild/tools/toolkit.py b/easybuild/tools/toolkit.py index f8ae6aebc8..0951e9857e 100644 --- a/easybuild/tools/toolkit.py +++ b/easybuild/tools/toolkit.py @@ -553,12 +553,8 @@ def prepareIMKL(self): fftwsuff = "" if self.opts['pic']: fftwsuff = "_pic" - # only include interface lib if it's there - fftlib = "-Wl:-Bstatic -lfftw3xc_intel%s -Wl:-Bdynamic" % fftwsuff - self.vars['LIBFFT'] = '' - if os.path.exists(fftlib): - self.vars['LIBFFT'] += fftlib + self.vars['LIBFFT'] = "-Wl:-Bstatic -lfftw3xc_intel%s -Wl:-Bdynamic" % fftwsuff if self.opts['packed-groups']: #we pack groups toghether, since some tools like pkg-utils don't work well with them for i in ['LIBLAPACK', 'LIBBLAS', 'LIBLAPACK_MT', 'LIBSCALAPACK' ]: From 1a73d08600a981495baa10b8daf89d756ff66b2b Mon Sep 17 00:00:00 2001 From: Jens Timmerman Date: Thu, 21 Jun 2012 14:54:14 +0200 Subject: [PATCH 406/798] UFC needed a python suffix --- .../f/FFC/FFC-1.0.0-goalf-1.1.0-no-OFED-Python-2.7.3.eb | 2 +- ...no-OFED.eb => UFC-2.0.5-goalf-1.1.0-no-OFED-python-2.7.3.eb} | 1 + 2 files changed, 2 insertions(+), 1 deletion(-) rename easybuild/easyconfigs/u/UFC/{UFC-2.0.5-goalf-1.1.0-no-OFED.eb => UFC-2.0.5-goalf-1.1.0-no-OFED-python-2.7.3.eb} (96%) diff --git a/easybuild/easyconfigs/f/FFC/FFC-1.0.0-goalf-1.1.0-no-OFED-Python-2.7.3.eb b/easybuild/easyconfigs/f/FFC/FFC-1.0.0-goalf-1.1.0-no-OFED-Python-2.7.3.eb index 0bab98821e..ddcb7f8cab 100644 --- a/easybuild/easyconfigs/f/FFC/FFC-1.0.0-goalf-1.1.0-no-OFED-Python-2.7.3.eb +++ b/easybuild/easyconfigs/f/FFC/FFC-1.0.0-goalf-1.1.0-no-OFED-Python-2.7.3.eb @@ -21,7 +21,7 @@ dependencies=[ ('Python', pythonversion, toolkitsuffix, True), ('UFL', '1.0.0', versionsuffix, True), ('FIAT', '1.0.0', versionsuffix, True), - ('UFC', '2.0.5', toolkitsuffix, True), + ('UFC', '2.0.5', versionsuffix, True), ('Viper', '1.0.0', versionsuffix, True), ] diff --git a/easybuild/easyconfigs/u/UFC/UFC-2.0.5-goalf-1.1.0-no-OFED.eb b/easybuild/easyconfigs/u/UFC/UFC-2.0.5-goalf-1.1.0-no-OFED-python-2.7.3.eb similarity index 96% rename from easybuild/easyconfigs/u/UFC/UFC-2.0.5-goalf-1.1.0-no-OFED.eb rename to easybuild/easyconfigs/u/UFC/UFC-2.0.5-goalf-1.1.0-no-OFED-python-2.7.3.eb index a388d49356..f2712cd2ad 100644 --- a/easybuild/easyconfigs/u/UFC/UFC-2.0.5-goalf-1.1.0-no-OFED.eb +++ b/easybuild/easyconfigs/u/UFC/UFC-2.0.5-goalf-1.1.0-no-OFED-python-2.7.3.eb @@ -18,6 +18,7 @@ builddependencies = [ pythonversion = '2.7.3' pythonshortversion = ".".join(pythonversion.split(".")[:-1]) pythonsuffix = "-Python-%s" % pythonversion +versionsuffix='%s-%s%s' % (toolkit['name'],toolkit['version'],pythonsuffix) #manually add toolkit suffix here, plus True for letting the dependency use it's own toolkit and not the dummy one dependencies=[ From 31bc9638522e6a80e3fd0699bc9d2167a961e203 Mon Sep 17 00:00:00 2001 From: Jens Timmerman Date: Thu, 21 Jun 2012 14:59:41 +0200 Subject: [PATCH 407/798] UFC needed a python suffix: fixed typo --- ....eb => UFC-2.0.5-goalf-1.1.0-no-OFED-Python-2.7.3.eb} | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) rename easybuild/easyconfigs/u/UFC/{UFC-2.0.5-goalf-1.1.0-no-OFED-python-2.7.3.eb => UFC-2.0.5-goalf-1.1.0-no-OFED-Python-2.7.3.eb} (83%) diff --git a/easybuild/easyconfigs/u/UFC/UFC-2.0.5-goalf-1.1.0-no-OFED-python-2.7.3.eb b/easybuild/easyconfigs/u/UFC/UFC-2.0.5-goalf-1.1.0-no-OFED-Python-2.7.3.eb similarity index 83% rename from easybuild/easyconfigs/u/UFC/UFC-2.0.5-goalf-1.1.0-no-OFED-python-2.7.3.eb rename to easybuild/easyconfigs/u/UFC/UFC-2.0.5-goalf-1.1.0-no-OFED-Python-2.7.3.eb index f2712cd2ad..8cc38d570a 100644 --- a/easybuild/easyconfigs/u/UFC/UFC-2.0.5-goalf-1.1.0-no-OFED-python-2.7.3.eb +++ b/easybuild/easyconfigs/u/UFC/UFC-2.0.5-goalf-1.1.0-no-OFED-Python-2.7.3.eb @@ -17,15 +17,14 @@ builddependencies = [ ] pythonversion = '2.7.3' pythonshortversion = ".".join(pythonversion.split(".")[:-1]) -pythonsuffix = "-Python-%s" % pythonversion -versionsuffix='%s-%s%s' % (toolkit['name'],toolkit['version'],pythonsuffix) +versionsuffix = "-Python-%s" % pythonversion #manually add toolkit suffix here, plus True for letting the dependency use it's own toolkit and not the dummy one dependencies=[ - ('Python',pythonversion), + ('Python',versionsuffix), ('Boost','1.49.0'), - ('Instant','1.0.0', pythonsuffix), - ('SWIG','2.0.4',pythonsuffix),#we need 2.0.4 here, since there are regression in swig + ('Instant','1.0.0', versionsuffix), + ('SWIG','2.0.4',versionsuffix),#we need 2.0.4 here, since there are regression in swig # see https://bugs.launchpad.net/dolfin/+bug/996398 ] From 7ea30c3b76d4d58bff9637935b6199b34a54ee30 Mon Sep 17 00:00:00 2001 From: Jens Timmerman Date: Thu, 21 Jun 2012 15:22:26 +0200 Subject: [PATCH 408/798] Boost also needs a version suffix --- ...D.eb => Boost-1.49.0-goalf-1.1.0-no-OFED-Python-2.7.3.eb} | 5 ++++- ...tce-4.0.6.eb => Boost-1.49.0-ictce-4.0.6-Python-2.7.3.eb} | 5 ++++- ...D.eb => DOLFIN-1.0.0-goalf-1.1.0-no-OFED-Python-2.7.3.eb} | 2 +- ...tce-4.0.6.eb => DOLFIN-1.0.0-ictce-4.0.6-Python-2.7.3.eb} | 0 .../u/UFC/UFC-2.0.5-goalf-1.1.0-no-OFED-Python-2.7.3.eb | 2 +- 5 files changed, 10 insertions(+), 4 deletions(-) rename easybuild/easyconfigs/b/Boost/{Boost-1.49.0-goalf-1.1.0-no-OFED.eb => Boost-1.49.0-goalf-1.1.0-no-OFED-Python-2.7.3.eb} (87%) rename easybuild/easyconfigs/b/Boost/{Boost-1.49.0-ictce-4.0.6.eb => Boost-1.49.0-ictce-4.0.6-Python-2.7.3.eb} (87%) rename easybuild/easyconfigs/d/DOLFIN/{DOLFIN-1.0.0-goalf-1.1.0-no-OFED.eb => DOLFIN-1.0.0-goalf-1.1.0-no-OFED-Python-2.7.3.eb} (96%) rename easybuild/easyconfigs/d/DOLFIN/{DOLFIN-1.0.0-ictce-4.0.6.eb => DOLFIN-1.0.0-ictce-4.0.6-Python-2.7.3.eb} (100%) diff --git a/easybuild/easyconfigs/b/Boost/Boost-1.49.0-goalf-1.1.0-no-OFED.eb b/easybuild/easyconfigs/b/Boost/Boost-1.49.0-goalf-1.1.0-no-OFED-Python-2.7.3.eb similarity index 87% rename from easybuild/easyconfigs/b/Boost/Boost-1.49.0-goalf-1.1.0-no-OFED.eb rename to easybuild/easyconfigs/b/Boost/Boost-1.49.0-goalf-1.1.0-no-OFED-Python-2.7.3.eb index f974f5f2a1..90ec3d1cbd 100644 --- a/easybuild/easyconfigs/b/Boost/Boost-1.49.0-goalf-1.1.0-no-OFED.eb +++ b/easybuild/easyconfigs/b/Boost/Boost-1.49.0-goalf-1.1.0-no-OFED-Python-2.7.3.eb @@ -7,7 +7,10 @@ description="Boost provides free peer-reviewed portable C++ source libraries." toolkit={'name':'goalf','version':'1.1.0-no-OFED'} toolkitopts={'pic':True} -dependencies=[('Python','2.7.3')] +pythonversion='2.7.3' +versionsuffix='-Python-%s'%pythonversion + +dependencies=[('Python',pythonversion)] sources=['%s_%s.tar.gz'%(name.lower(), '_'.join(version.split('.')))] sourceURLs=[('http://sourceforge.net/projects/%(name)s/files/%(name)s/%(version)s' % {'name':name.lower(), 'version':version}, 'download')] diff --git a/easybuild/easyconfigs/b/Boost/Boost-1.49.0-ictce-4.0.6.eb b/easybuild/easyconfigs/b/Boost/Boost-1.49.0-ictce-4.0.6-Python-2.7.3.eb similarity index 87% rename from easybuild/easyconfigs/b/Boost/Boost-1.49.0-ictce-4.0.6.eb rename to easybuild/easyconfigs/b/Boost/Boost-1.49.0-ictce-4.0.6-Python-2.7.3.eb index f72a8aa810..86afb05dab 100644 --- a/easybuild/easyconfigs/b/Boost/Boost-1.49.0-ictce-4.0.6.eb +++ b/easybuild/easyconfigs/b/Boost/Boost-1.49.0-ictce-4.0.6-Python-2.7.3.eb @@ -7,7 +7,10 @@ description="Boost provides free peer-reviewed portable C++ source libraries." toolkit={'name':'ictce','version':'4.0.6'} toolkitopts={'pic':True} -dependencies=[('Python','2.7.3')] +pythonversion='2.7.3' +versionsuffix='-Python-%s'%pythonversion + +dependencies=[('Python',pythonversion)] sources=['%s_%s.tar.gz'%(name.lower(), '_'.join(version.split('.')))] sourceURLs=[('http://sourceforge.net/projects/%(name)s/files/%(name)s/%(version)s' % {'name':name.lower(), 'version':version}, 'download')] diff --git a/easybuild/easyconfigs/d/DOLFIN/DOLFIN-1.0.0-goalf-1.1.0-no-OFED.eb b/easybuild/easyconfigs/d/DOLFIN/DOLFIN-1.0.0-goalf-1.1.0-no-OFED-Python-2.7.3.eb similarity index 96% rename from easybuild/easyconfigs/d/DOLFIN/DOLFIN-1.0.0-goalf-1.1.0-no-OFED.eb rename to easybuild/easyconfigs/d/DOLFIN/DOLFIN-1.0.0-goalf-1.1.0-no-OFED-Python-2.7.3.eb index df175aeb07..41eaf167f8 100644 --- a/easybuild/easyconfigs/d/DOLFIN/DOLFIN-1.0.0-goalf-1.1.0-no-OFED.eb +++ b/easybuild/easyconfigs/d/DOLFIN/DOLFIN-1.0.0-goalf-1.1.0-no-OFED-Python-2.7.3.eb @@ -28,7 +28,7 @@ versionsuffix = '-Python-%s' % (python_version) # some dependencies use dummy toolkit dependencies=[ ('Python', python_version), - ('Boost', '1.49.0'), + ('Boost', '1.49.0',versionsuffix ), ('UFC', '2.0.5'), ('SWIG','2.0.4',versionsuffix),#we need 2.0.4 here, since there are regression in swig # see https://bugs.launchpad.net/dolfin/+bug/996398 diff --git a/easybuild/easyconfigs/d/DOLFIN/DOLFIN-1.0.0-ictce-4.0.6.eb b/easybuild/easyconfigs/d/DOLFIN/DOLFIN-1.0.0-ictce-4.0.6-Python-2.7.3.eb similarity index 100% rename from easybuild/easyconfigs/d/DOLFIN/DOLFIN-1.0.0-ictce-4.0.6.eb rename to easybuild/easyconfigs/d/DOLFIN/DOLFIN-1.0.0-ictce-4.0.6-Python-2.7.3.eb diff --git a/easybuild/easyconfigs/u/UFC/UFC-2.0.5-goalf-1.1.0-no-OFED-Python-2.7.3.eb b/easybuild/easyconfigs/u/UFC/UFC-2.0.5-goalf-1.1.0-no-OFED-Python-2.7.3.eb index 8cc38d570a..8b44a8f699 100644 --- a/easybuild/easyconfigs/u/UFC/UFC-2.0.5-goalf-1.1.0-no-OFED-Python-2.7.3.eb +++ b/easybuild/easyconfigs/u/UFC/UFC-2.0.5-goalf-1.1.0-no-OFED-Python-2.7.3.eb @@ -22,7 +22,7 @@ versionsuffix = "-Python-%s" % pythonversion #manually add toolkit suffix here, plus True for letting the dependency use it's own toolkit and not the dummy one dependencies=[ ('Python',versionsuffix), - ('Boost','1.49.0'), + ('Boost','1.49.0',versionsuffix), ('Instant','1.0.0', versionsuffix), ('SWIG','2.0.4',versionsuffix),#we need 2.0.4 here, since there are regression in swig # see https://bugs.launchpad.net/dolfin/+bug/996398 From 60a51b2ecd69730e7043346e71969e8f47af26dd Mon Sep 17 00:00:00 2001 From: Jens Timmerman Date: Fri, 22 Jun 2012 13:50:55 +0200 Subject: [PATCH 409/798] Armadillo also needed a python suffix, since it has a dependency that uses python (boost) --- ...2.4.4-goalf-1.1.0-no-OFED-Python-2.7.3.eb} | 4 ++- ...rmadillo-2.4.4-ictce-4.0.6-Python-2.7.3.eb | 27 +++++++++++++++++++ .../DOLFIN-1.0.0-ictce-4.0.6-Python-2.7.3.eb | 27 ++++++++++++------- 3 files changed, 47 insertions(+), 11 deletions(-) rename easybuild/easyconfigs/a/Armadillo/{Armadillo-2.4.4-goalf-1.1.0-no-OFED.eb => Armadillo-2.4.4-goalf-1.1.0-no-OFED-Python-2.7.3.eb} (90%) create mode 100644 easybuild/easyconfigs/a/Armadillo/Armadillo-2.4.4-ictce-4.0.6-Python-2.7.3.eb diff --git a/easybuild/easyconfigs/a/Armadillo/Armadillo-2.4.4-goalf-1.1.0-no-OFED.eb b/easybuild/easyconfigs/a/Armadillo/Armadillo-2.4.4-goalf-1.1.0-no-OFED-Python-2.7.3.eb similarity index 90% rename from easybuild/easyconfigs/a/Armadillo/Armadillo-2.4.4-goalf-1.1.0-no-OFED.eb rename to easybuild/easyconfigs/a/Armadillo/Armadillo-2.4.4-goalf-1.1.0-no-OFED-Python-2.7.3.eb index 5326c1fb68..ca4ec65244 100644 --- a/easybuild/easyconfigs/a/Armadillo/Armadillo-2.4.4-goalf-1.1.0-no-OFED.eb +++ b/easybuild/easyconfigs/a/Armadillo/Armadillo-2.4.4-goalf-1.1.0-no-OFED-Python-2.7.3.eb @@ -1,5 +1,6 @@ name='Armadillo' version='2.4.4' +pythonversion='2.7.3' easyblock= "CMake" homepage='http://arma.sourceforge.net/' @@ -10,10 +11,11 @@ toolkit={'name':'goalf','version':'1.1.0-no-OFED'} builddependencies = [ ('CMake','2.8.4'), ] +versionsuffix="-Python-%s" % pythonversion #manually add toolkit suffix here, plus True for letting the dependency use it's own toolkit and not the dummy one dependencies=[ - ('Boost','1.49.0'), + ('Boost','1.49.0', versionsuffix), ] sources=['%s-%s.tar.gz'%(name.lower(),version)] diff --git a/easybuild/easyconfigs/a/Armadillo/Armadillo-2.4.4-ictce-4.0.6-Python-2.7.3.eb b/easybuild/easyconfigs/a/Armadillo/Armadillo-2.4.4-ictce-4.0.6-Python-2.7.3.eb new file mode 100644 index 0000000000..57841006d9 --- /dev/null +++ b/easybuild/easyconfigs/a/Armadillo/Armadillo-2.4.4-ictce-4.0.6-Python-2.7.3.eb @@ -0,0 +1,27 @@ +name='Armadillo' +version='2.4.4' +pythonversion='2.7.3' + +easyblock= "CMake" +homepage='http://arma.sourceforge.net/' +description="Armadillo is an open-source C++ linear algebra library (matrix maths) aiming towards a good balance between speed and ease of use. Integer, floating point and complex numbers are supported, as well as a subset of trigonometric and statistics functions." + +sourceURLs=['http://sourceforge.net/projects/arma/files'] +toolkit={'name':'ictce','version':'4.0.6'} +builddependencies = [ + ('CMake','2.8.4'), + ] +versionsuffix="-Python-%s" % pythonversion + +#manually add toolkit suffix here, plus True for letting the dependency use it's own toolkit and not the dummy one +dependencies=[ + ('Boost','1.49.0', versionsuffix), + ] + +sources=['%s-%s.tar.gz'%(name.lower(),version)] + +sanityCheckPaths = {'files': ['lib/libarmadillo.so','include/armadillo'], 'dirs':['include','include/armadillo_bits']} + +#extra options for cmake +configopts=' -DBoost_DIR=$SOFTROOTBOOST -DBOOST_INCLUDEDIR=$SOFTROOTBOOST/include -DBoost_DEBUG=ON -DBOOST_ROOT=$SOFTROOTBOOST -DBLAS_LIBRARY:PATH="$LIBBLAS"' +configopts += ' -DLAPACK_LIBRARY:PATH="$LIBLAPACK"' diff --git a/easybuild/easyconfigs/d/DOLFIN/DOLFIN-1.0.0-ictce-4.0.6-Python-2.7.3.eb b/easybuild/easyconfigs/d/DOLFIN/DOLFIN-1.0.0-ictce-4.0.6-Python-2.7.3.eb index f93543fddd..43abdfcf69 100644 --- a/easybuild/easyconfigs/d/DOLFIN/DOLFIN-1.0.0-ictce-4.0.6-Python-2.7.3.eb +++ b/easybuild/easyconfigs/d/DOLFIN/DOLFIN-1.0.0-ictce-4.0.6-Python-2.7.3.eb @@ -1,11 +1,15 @@ name='DOLFIN' version='1.0.0' +python_version = '2.7.3' + +easyblock="Dolfin" + homepage='https://launchpad.net/dolfin' description="DOLFIN is the C++/Python interface of FEniCS, providing a consistent PSE (Problem Solving Environment) for ordinary and partial differential equations." -toolkit={'name':'ictce','version':'4.0.6'} -toolkitopts={'usempi':True, 'packed-groups':True} +toolkit={'name':'goalf','version':'1.1.0-no-OFED'} +toolkitopts={'usempi':True, 'packed-groups':False} majver = version.split('.') if majver[0] == '0': @@ -18,24 +22,27 @@ sourceURLs=['https://launchpad.net/%s/%s.x/%s/+download' % (name.lower(), majver patches=['wl_pkg_linkflags.patch'] -builddependencies = [('CMake', '2.8.4', '', True)] - -python_version = '2.7.3' -versionsuffix = '-Python-%s' % python_version +builddependencies = [('CMake', '2.8.4')] +#packages get installed inside python, so we need to know what python version to use. +versionsuffix = '-Python-%s' % (python_version) # some dependencies use dummy toolkit dependencies=[ ('Python', python_version), - ('Boost', '1.49.0'), - ('UFC', '2.0.5'), + ('Boost', '1.49.0', versionsuffix ), + ('UFC', '2.0.5', versionsuffix), + ('SWIG','2.0.4',versionsuffix),#we need 2.0.4 here, since there are regression in swig + # see https://bugs.launchpad.net/dolfin/+bug/996398 ('FFC', '1.0.0', versionsuffix), ('FIAT', '1.0.0', versionsuffix), ('Instant', '1.0.0', versionsuffix), ('Viper', '1.0.0', versionsuffix), ('UFL', '1.0.0', versionsuffix), ('SCOTCH', '5.1.12b_esmumps'), - ('Armadillo', '2.4.4'), + ('Armadillo', '2.4.4', versionsuffix), ('ParMETIS', '4.0.2'), - ('SuiteSparse', '3.7.0', '-withparmetis', False), + ('SuiteSparse', '3.7.0', '-withparmetis'), + ('CGAL', '4.0'), + ('zlib', '1.2.7'), ] From 023c78cf969479a5f4006a90ef85dc569ccaed37 Mon Sep 17 00:00:00 2001 From: Jens Timmerman Date: Fri, 22 Jun 2012 13:57:06 +0200 Subject: [PATCH 410/798] Added CGAL and packed-groups to DOLFIN ictce .eb, added debug in modules.py and commented out broken git code (this is fixed upstream) --- .../d/DOLFIN/DOLFIN-1.0.0-ictce-4.0.6-Python-2.7.3.eb | 2 +- easybuild/tools/repository.py | 9 +++++++-- 2 files changed, 8 insertions(+), 3 deletions(-) diff --git a/easybuild/easyconfigs/d/DOLFIN/DOLFIN-1.0.0-ictce-4.0.6-Python-2.7.3.eb b/easybuild/easyconfigs/d/DOLFIN/DOLFIN-1.0.0-ictce-4.0.6-Python-2.7.3.eb index 43abdfcf69..6b7f7013ef 100644 --- a/easybuild/easyconfigs/d/DOLFIN/DOLFIN-1.0.0-ictce-4.0.6-Python-2.7.3.eb +++ b/easybuild/easyconfigs/d/DOLFIN/DOLFIN-1.0.0-ictce-4.0.6-Python-2.7.3.eb @@ -9,7 +9,7 @@ homepage='https://launchpad.net/dolfin' description="DOLFIN is the C++/Python interface of FEniCS, providing a consistent PSE (Problem Solving Environment) for ordinary and partial differential equations." toolkit={'name':'goalf','version':'1.1.0-no-OFED'} -toolkitopts={'usempi':True, 'packed-groups':False} +toolkitopts={'usempi':True, 'packed-groups':True} majver = version.split('.') if majver[0] == '0': diff --git a/easybuild/tools/repository.py b/easybuild/tools/repository.py index b2c12d7c72..c799859584 100644 --- a/easybuild/tools/repository.py +++ b/easybuild/tools/repository.py @@ -222,14 +222,19 @@ def createWorkingCopy(self): def addEasyconfig(self, cfg, name, version, stats, append): """ Add easyconfig to git repository. - """ - dest = FileRepository.addEasyconfig(self, cfg, name, version, stats, append) + log.debug("Adding cfg: %s with name %s" % (cfg, name)) + if name.startswith(self.wc): + name = name.replace(self.wc, "", 1) #remove self.wc again + name = os.path.join(self.wc, self.path, name) #create proper name, with path inside repo in it + dest = Repository.addEasyconfig(self, cfg, name, version, stats, append) ## add it to version control if dest: try: self.client.add(dest) except GitCommandError, err: log.warning("adding %s to git failed: %s" % (dest, err)) + """ + pass def commit(self, msg=None): """ From b1cd61b4c4f2ff73bc6458ca3045ec4cc904350a Mon Sep 17 00:00:00 2001 From: Jens Timmerman Date: Fri, 22 Jun 2012 13:59:50 +0200 Subject: [PATCH 411/798] actually use ictce for DOLFIN ictce --- .../d/DOLFIN/DOLFIN-1.0.0-ictce-4.0.6-Python-2.7.3.eb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/easybuild/easyconfigs/d/DOLFIN/DOLFIN-1.0.0-ictce-4.0.6-Python-2.7.3.eb b/easybuild/easyconfigs/d/DOLFIN/DOLFIN-1.0.0-ictce-4.0.6-Python-2.7.3.eb index 6b7f7013ef..ee35ce4ce2 100644 --- a/easybuild/easyconfigs/d/DOLFIN/DOLFIN-1.0.0-ictce-4.0.6-Python-2.7.3.eb +++ b/easybuild/easyconfigs/d/DOLFIN/DOLFIN-1.0.0-ictce-4.0.6-Python-2.7.3.eb @@ -8,7 +8,7 @@ easyblock="Dolfin" homepage='https://launchpad.net/dolfin' description="DOLFIN is the C++/Python interface of FEniCS, providing a consistent PSE (Problem Solving Environment) for ordinary and partial differential equations." -toolkit={'name':'goalf','version':'1.1.0-no-OFED'} +toolkit={'name':'ictce','version':'4.0.6'} toolkitopts={'usempi':True, 'packed-groups':True} majver = version.split('.') From 56fb757468d46798a6d9c9b724fa8c04afb5786c Mon Sep 17 00:00:00 2001 From: Jens Timmerman Date: Fri, 22 Jun 2012 14:12:08 +0200 Subject: [PATCH 412/798] CGAL also depends on boost and needs a python suffix --- ...L-4.0-goalf-1.1.0-no-OFED-Python-2.7.3.eb} | 10 ++++++-- .../CGAL/CGAL-4.0-ictce-4.0.6-Python-2.7.3.eb | 23 +++++++++++++++++++ ...-1.0.0-goalf-1.1.0-no-OFED-Python-2.7.3.eb | 6 ++--- .../DOLFIN-1.0.0-ictce-4.0.6-Python-2.7.3.eb | 2 +- 4 files changed, 35 insertions(+), 6 deletions(-) rename easybuild/easyconfigs/c/CGAL/{CGAL-4.0-goalf-1.1.0-no-OFED.eb => CGAL-4.0-goalf-1.1.0-no-OFED-Python-2.7.3.eb} (81%) create mode 100644 easybuild/easyconfigs/c/CGAL/CGAL-4.0-ictce-4.0.6-Python-2.7.3.eb diff --git a/easybuild/easyconfigs/c/CGAL/CGAL-4.0-goalf-1.1.0-no-OFED.eb b/easybuild/easyconfigs/c/CGAL/CGAL-4.0-goalf-1.1.0-no-OFED-Python-2.7.3.eb similarity index 81% rename from easybuild/easyconfigs/c/CGAL/CGAL-4.0-goalf-1.1.0-no-OFED.eb rename to easybuild/easyconfigs/c/CGAL/CGAL-4.0-goalf-1.1.0-no-OFED-Python-2.7.3.eb index b23adc5a38..5fe11c6ef5 100644 --- a/easybuild/easyconfigs/c/CGAL/CGAL-4.0-goalf-1.1.0-no-OFED.eb +++ b/easybuild/easyconfigs/c/CGAL/CGAL-4.0-goalf-1.1.0-no-OFED-Python-2.7.3.eb @@ -1,18 +1,24 @@ name='CGAL' version='4.0' +pythonversion='2.7.3' + + homepage='http://www.cgal.org/' description="""The goal of the CGAL Open Source Project is to provide easy access to efficient and reliable geometric algorithms in the form of a C++ library. """ + +toolkit={'name':'goalf','version':'1.1.0-no-OFED'} +versionsuffix="-Python-%s" % pythonversion + dependencies=[ ('CMake','2.8.4'), ('GMP','5.0.5'), - ('Boost','1.49.0'), + ('Boost','1.49.0', versionsuffix), ('MPFR','3.1.0'), ] -toolkit={'name':'goalf','version':'1.1.0-no-OFED'} sources=['%s-%s.tar.gz'%(name,version)] sourceURLs = ['http://fenicsproject.org/pub/software/contrib/'] diff --git a/easybuild/easyconfigs/c/CGAL/CGAL-4.0-ictce-4.0.6-Python-2.7.3.eb b/easybuild/easyconfigs/c/CGAL/CGAL-4.0-ictce-4.0.6-Python-2.7.3.eb new file mode 100644 index 0000000000..1946d65cb7 --- /dev/null +++ b/easybuild/easyconfigs/c/CGAL/CGAL-4.0-ictce-4.0.6-Python-2.7.3.eb @@ -0,0 +1,23 @@ +name='CGAL' +version='4.0' +pythonversion='2.7.3' + +homepage='http://www.cgal.org/' +description="""The goal of the CGAL Open Source Project is to provide easy access to efficient +and reliable geometric algorithms in the form of a C++ library. """ + + +toolkit={'name':'ictce','version':'4.0.6'} +versionsuffix="-Python-%s" % pythonversion + +dependencies=[ + ('CMake','2.8.4'), + ('GMP','5.0.5'), + ('Boost','1.49.0', versionsuffix), + ('MPFR','3.1.0'), + ] + +sources=['%s-%s.tar.gz'%(name,version)] +sourceURLs = ['http://fenicsproject.org/pub/software/contrib/'] + + diff --git a/easybuild/easyconfigs/d/DOLFIN/DOLFIN-1.0.0-goalf-1.1.0-no-OFED-Python-2.7.3.eb b/easybuild/easyconfigs/d/DOLFIN/DOLFIN-1.0.0-goalf-1.1.0-no-OFED-Python-2.7.3.eb index 41eaf167f8..1de350d060 100644 --- a/easybuild/easyconfigs/d/DOLFIN/DOLFIN-1.0.0-goalf-1.1.0-no-OFED-Python-2.7.3.eb +++ b/easybuild/easyconfigs/d/DOLFIN/DOLFIN-1.0.0-goalf-1.1.0-no-OFED-Python-2.7.3.eb @@ -28,8 +28,8 @@ versionsuffix = '-Python-%s' % (python_version) # some dependencies use dummy toolkit dependencies=[ ('Python', python_version), - ('Boost', '1.49.0',versionsuffix ), - ('UFC', '2.0.5'), + ('Boost', '1.49.0', versionsuffix ), + ('UFC', '2.0.5', versionsuffix), ('SWIG','2.0.4',versionsuffix),#we need 2.0.4 here, since there are regression in swig # see https://bugs.launchpad.net/dolfin/+bug/996398 ('FFC', '1.0.0', versionsuffix), @@ -41,6 +41,6 @@ dependencies=[ ('Armadillo', '2.4.4'), ('ParMETIS', '4.0.2'), ('SuiteSparse', '3.7.0', '-withparmetis'), - ('CGAL', '4.0'), + ('CGAL', '4.0', versionsuffix), ('zlib', '1.2.7'), ] diff --git a/easybuild/easyconfigs/d/DOLFIN/DOLFIN-1.0.0-ictce-4.0.6-Python-2.7.3.eb b/easybuild/easyconfigs/d/DOLFIN/DOLFIN-1.0.0-ictce-4.0.6-Python-2.7.3.eb index ee35ce4ce2..c4f6a1810e 100644 --- a/easybuild/easyconfigs/d/DOLFIN/DOLFIN-1.0.0-ictce-4.0.6-Python-2.7.3.eb +++ b/easybuild/easyconfigs/d/DOLFIN/DOLFIN-1.0.0-ictce-4.0.6-Python-2.7.3.eb @@ -43,6 +43,6 @@ dependencies=[ ('Armadillo', '2.4.4', versionsuffix), ('ParMETIS', '4.0.2'), ('SuiteSparse', '3.7.0', '-withparmetis'), - ('CGAL', '4.0'), + ('CGAL', '4.0', versionsuffix), ('zlib', '1.2.7'), ] From bd76764fc49613a4ce0fa20947ef52438f91f113 Mon Sep 17 00:00:00 2001 From: Kenneth Hoste Date: Mon, 25 Jun 2012 09:15:35 +0200 Subject: [PATCH 413/798] fix SDW's name in license header --- easybuild/easyblocks/b/boost.py | 2 +- easybuild/easyblocks/c/cmake.py | 2 +- easybuild/easyblocks/c/cmakepythonpackage.py | 2 +- easybuild/easyblocks/d/dolfin.py | 2 +- easybuild/easyblocks/m/metis.py | 2 +- easybuild/easyblocks/p/parmetis.py | 2 +- easybuild/easyblocks/p/pythonpackage.py | 2 +- easybuild/easyblocks/s/scotch.py | 2 +- easybuild/easyblocks/s/suitesparse.py | 2 +- 9 files changed, 9 insertions(+), 9 deletions(-) diff --git a/easybuild/easyblocks/b/boost.py b/easybuild/easyblocks/b/boost.py index 1ed787a492..8e99a67c44 100644 --- a/easybuild/easyblocks/b/boost.py +++ b/easybuild/easyblocks/b/boost.py @@ -1,5 +1,5 @@ ## -# Copyright 2009-2012 Stijn Deweirdt, Dries Verdegem, Kenneth Hoste, Pieter De Baets, Jens Timmerman +# Copyright 2009-2012 Stijn De Weirdt, Dries Verdegem, Kenneth Hoste, Pieter De Baets, Jens Timmerman # # This file is part of EasyBuild, # originally created by the HPC team of the University of Ghent (http://ugent.be/hpc). diff --git a/easybuild/easyblocks/c/cmake.py b/easybuild/easyblocks/c/cmake.py index db1e09262d..e682c4fe86 100644 --- a/easybuild/easyblocks/c/cmake.py +++ b/easybuild/easyblocks/c/cmake.py @@ -1,5 +1,5 @@ ## -# Copyright 2009-2012 Stijn Deweirdt, Dries Verdegem, Kenneth Hoste, Pieter De Baets, Jens Timmerman +# Copyright 2009-2012 Stijn De Weirdt, Dries Verdegem, Kenneth Hoste, Pieter De Baets, Jens Timmerman # # This file is part of EasyBuild, # originally created by the HPC team of the University of Ghent (http://ugent.be/hpc). diff --git a/easybuild/easyblocks/c/cmakepythonpackage.py b/easybuild/easyblocks/c/cmakepythonpackage.py index d3a5682cf4..795c6fbd54 100644 --- a/easybuild/easyblocks/c/cmakepythonpackage.py +++ b/easybuild/easyblocks/c/cmakepythonpackage.py @@ -1,4 +1,4 @@ -# Copyright 2009-2012 Stijn Deweirdt, Dries Verdegem, Kenneth Hoste, Pieter De Baets, Jens Timmerman +# Copyright 2009-2012 Stijn De Weirdt, Dries Verdegem, Kenneth Hoste, Pieter De Baets, Jens Timmerman # # This file is part of EasyBuild, # originally created by the HPC team of the University of Ghent (http://ugent.be/hpc). diff --git a/easybuild/easyblocks/d/dolfin.py b/easybuild/easyblocks/d/dolfin.py index dc3a945510..d882f83da5 100644 --- a/easybuild/easyblocks/d/dolfin.py +++ b/easybuild/easyblocks/d/dolfin.py @@ -1,5 +1,5 @@ ## -# Copyright 2009-2012 Stijn Deweirdt, Dries Verdegem, Kenneth Hoste, Pieter De Baets, Jens Timmerman +# Copyright 2009-2012 Stijn De Weirdt, Dries Verdegem, Kenneth Hoste, Pieter De Baets, Jens Timmerman # # This file is part of EasyBuild, # originally created by the HPC team of the University of Ghent (http://ugent.be/hpc). diff --git a/easybuild/easyblocks/m/metis.py b/easybuild/easyblocks/m/metis.py index 20c5e0f366..cbc1b5d665 100644 --- a/easybuild/easyblocks/m/metis.py +++ b/easybuild/easyblocks/m/metis.py @@ -1,5 +1,5 @@ ## -# Copyright 2009-2012 Stijn Deweirdt, Dries Verdegem, Kenneth Hoste, Pieter De Baets, Jens Timmerman +# Copyright 2009-2012 Stijn De Weirdt, Dries Verdegem, Kenneth Hoste, Pieter De Baets, Jens Timmerman # # This file is part of EasyBuild, # originally created by the HPC team of the University of Ghent (http://ugent.be/hpc). diff --git a/easybuild/easyblocks/p/parmetis.py b/easybuild/easyblocks/p/parmetis.py index cbfff8ad07..c815a55415 100644 --- a/easybuild/easyblocks/p/parmetis.py +++ b/easybuild/easyblocks/p/parmetis.py @@ -1,5 +1,5 @@ ## -# Copyright 2009-2012 Stijn Deweirdt, Dries Verdegem, Kenneth Hoste, Pieter De Baets, Jens Timmerman +# Copyright 2009-2012 Stijn De Weirdt, Dries Verdegem, Kenneth Hoste, Pieter De Baets, Jens Timmerman # # This file is part of EasyBuild, # originally created by the HPC team of the University of Ghent (http://ugent.be/hpc). diff --git a/easybuild/easyblocks/p/pythonpackage.py b/easybuild/easyblocks/p/pythonpackage.py index 7e49abdab2..60c559e238 100644 --- a/easybuild/easyblocks/p/pythonpackage.py +++ b/easybuild/easyblocks/p/pythonpackage.py @@ -1,5 +1,5 @@ ## -# Copyright 2009-2012 Stijn Deweirdt, Dries Verdegem, Kenneth Hoste, Pieter De Baets, Jens Timmerman +# Copyright 2009-2012 Stijn De Weirdt, Dries Verdegem, Kenneth Hoste, Pieter De Baets, Jens Timmerman # # This file is part of EasyBuild, # originally created by the HPC team of the University of Ghent (http://ugent.be/hpc). diff --git a/easybuild/easyblocks/s/scotch.py b/easybuild/easyblocks/s/scotch.py index 1f42f87658..5b56af2595 100644 --- a/easybuild/easyblocks/s/scotch.py +++ b/easybuild/easyblocks/s/scotch.py @@ -1,5 +1,5 @@ ## -# Copyright 2009-2012 Stijn Deweirdt, Dries Verdegem, Kenneth Hoste, Pieter De Baets, Jens Timmerman +# Copyright 2009-2012 Stijn De Weirdt, Dries Verdegem, Kenneth Hoste, Pieter De Baets, Jens Timmerman # # This file is part of EasyBuild, # originally created by the HPC team of the University of Ghent (http://ugent.be/hpc). diff --git a/easybuild/easyblocks/s/suitesparse.py b/easybuild/easyblocks/s/suitesparse.py index 4e4a346813..6d7de89f4b 100644 --- a/easybuild/easyblocks/s/suitesparse.py +++ b/easybuild/easyblocks/s/suitesparse.py @@ -1,5 +1,5 @@ ## -# Copyright 2009-2012 Stijn Deweirdt, Dries Verdegem, Kenneth Hoste, Pieter De Baets, Jens Timmerman +# Copyright 2009-2012 Stijn De Weirdt, Dries Verdegem, Kenneth Hoste, Pieter De Baets, Jens Timmerman # # This file is part of EasyBuild, # originally created by the HPC team of the University of Ghent (http://ugent.be/hpc). From 8b693405d5031d81006c10fbfd60cae8a892a6a9 Mon Sep 17 00:00:00 2001 From: Kenneth Hoste Date: Mon, 25 Jun 2012 11:52:23 +0200 Subject: [PATCH 414/798] don't use try-except block around run_cmd --- easybuild/easyblocks/b/boost.py | 28 ++++++++++++---------------- 1 file changed, 12 insertions(+), 16 deletions(-) diff --git a/easybuild/easyblocks/b/boost.py b/easybuild/easyblocks/b/boost.py index 8e99a67c44..e88d90dd8b 100644 --- a/easybuild/easyblocks/b/boost.py +++ b/easybuild/easyblocks/b/boost.py @@ -24,9 +24,13 @@ from easybuild.tools.filetools import run_cmd class Boost(Application): + """Support for building Boost.""" def __init__(self, *args, **kwargs): Application.__init__(self, args, kwargs) + + self.objdir = None + self.cfg.update({'boost_mpi':[False, "Build mpi boost module (default: False)"]}) def configure(self): @@ -41,6 +45,7 @@ def configure(self): self.log.error("Failed to create directory %s: %s" % (self.objdir, err)) # generate config depending on compiler used + # FIXME: use toolkit_comp_family for this toolset = None if os.getenv('SOFTROOTICC'): toolset = 'intel-linux' @@ -50,7 +55,6 @@ def configure(self): self.log.error("Unknown compiler used, aborting.") cmd = "./bootstrap.sh --with-toolset=%s --prefix=%s" % (toolset, self.objdir) - run_cmd(cmd, log_all=True, simple=True) if self.getcfg('boost_mpi'): @@ -76,26 +80,18 @@ def make(self): bjammpioptions = "%s --user-config=user-config.jam --with-mpi" % bjamoptions # build mpi lib first - try: - # let bjam know about the user-config.jam file we created in the configure step - run_cmd("./bjam %s" % bjammpioptions, log_all=True, simple=True) - except Exception, err: - self.log.error("Failed to build the Boost MPI library: %s" % err) - - try: - # boost.mpi was built, let's 'install' it now - run_cmd("./bjam %s install" % bjammpioptions, log_all=True, simple=True) - except Exception, err: - self.log.error("Failed to install the Boost MPI library in %s: %s" % (self.objdir, err)) + + # let bjam know about the user-config.jam file we created in the configure step + run_cmd("./bjam %s" % bjammpioptions, log_all=True, simple=True) + + # boost.mpi was built, let's 'install' it now + run_cmd("./bjam %s install" % bjammpioptions, log_all=True, simple=True) # install remainder of boost libraries self.log.info("Installing boost libraries") cmd = "./bjam %s install" % bjamoptions - try: - run_cmd(cmd, log_all=True, simple=True) - except Exception, err: - self.log.error("Failed to build the Boost libraries: %s" % err) + run_cmd(cmd, log_all=True, simple=True) def make_install(self): """Install Boost by copying file to install dir.""" From 793b792cedcfcb6afe5dfbfa455e5859329433ba Mon Sep 17 00:00:00 2001 From: Kenneth Hoste Date: Mon, 25 Jun 2012 11:58:28 +0200 Subject: [PATCH 415/798] check for dependencies, use get_software_root function --- easybuild/easyblocks/c/cgal.py | 22 ++++++++++++++++------ 1 file changed, 16 insertions(+), 6 deletions(-) diff --git a/easybuild/easyblocks/c/cgal.py b/easybuild/easyblocks/c/cgal.py index bda263227b..14c4944157 100644 --- a/easybuild/easyblocks/c/cgal.py +++ b/easybuild/easyblocks/c/cgal.py @@ -19,13 +19,23 @@ ## import os from easybuild.easyblocks.c.cmake import CMake +from easybuild.tools.modules import get_software_root class CGAL(CMake): + """Support for building CGal.""" + def configure(self): - """add some extra environment variables here before doing the configure""" - os.environ['GMP_INC_DIR'] = "%s%s" % (os.environ['SOFTROOTGMP'], "/include/") - os.environ['GMP_LIB_DIR'] = "%s%s" % (os.environ['SOFTROOTGMP'], "/lib/") - os.environ['MPFR_INC_DIR'] = "%s%s" % (os.environ['SOFTROOTMPFR'], "/include/") - os.environ['MPFR_LIB_DIR'] = "%s%s" % (os.environ['SOFTROOTMPFR'], "/lib/") - os.environ['BOOST_ROOT'] = os.environ['SOFTROOTBOOST'] + """Set some extra environment variables before configuring.""" + + deps = ["Boost", "GMP", "MPFR"] + for dep in deps: + if not get_software_root(dep): + self.log.error("Dependency module %s not loaded?" % dep) + + for lib in ["GMP", "MPFR"]: + os.environ['%s_INC_DIR' % lib] = "%s%s" % (get_software_root(lib), "/include/") + os.environ['%s_LIB_DIR' % lib] = "%s%s" % (get_software_root(lib), "/lib/") + + os.environ['BOOST_ROOT'] = get_software_root("Boost") + CMake.configure(self) From 97ceb2f4be15b5801c2b09d3bab5c116acf90a14 Mon Sep 17 00:00:00 2001 From: Kenneth Hoste Date: Mon, 25 Jun 2012 12:04:56 +0200 Subject: [PATCH 416/798] cosmetic changes to comments --- easybuild/easyblocks/c/cmakepythonpackage.py | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/easybuild/easyblocks/c/cmakepythonpackage.py b/easybuild/easyblocks/c/cmakepythonpackage.py index 795c6fbd54..5b0155020d 100644 --- a/easybuild/easyblocks/c/cmakepythonpackage.py +++ b/easybuild/easyblocks/c/cmakepythonpackage.py @@ -22,12 +22,13 @@ class CMakePythonPackage(CMake, PythonPackage): """Build a Python package and module with cmake. - - Some packages use cmake to first build and install c Python modules - and then put the Python package in lib/pythonX.Y/site-packages + + Some packages use cmake to first build and install C Python packages + and then put the Python package in lib/pythonX.Y/site-packages. + We install this in a seperate location and generate a module file witch sets the PYTHONPATH. - + We use the default CMake implementation, and use make_module_extra from PythonPackage. """ @@ -35,14 +36,14 @@ def __init__(self, *args, **kwargs): PythonPackage.__init__(self, *args, **kwargs) def configure(self, *args, **kwargs): - """Main onfiguration is with cmake""" + """Main configuration using cmake""" PythonPackage.configure(self, *args, **kwargs) CMake.configure(self, *args, **kwargs) def make(self, *args, **kwargs): - """Build with cmake""" + """Build Python package with cmake""" return CMake.make(self, *args, **kwargs) def make_install(self): @@ -50,6 +51,5 @@ def make_install(self): return CMake.make_install(self) def make_module_extra(self): - """Extra Python package module parameters""" - #we return a string here. + """Add extra Python package module parameters""" return PythonPackage.make_module_extra(self) From 9855ceeb6b0cba06129499b6d92754068e6466e2 Mon Sep 17 00:00:00 2001 From: Kenneth Hoste Date: Mon, 25 Jun 2012 12:16:38 +0200 Subject: [PATCH 417/798] add SWIG as dependency, fix comments, remove check on compiler toolkit --- easybuild/easyblocks/d/dolfin.py | 31 +++++++++++++++---------------- 1 file changed, 15 insertions(+), 16 deletions(-) diff --git a/easybuild/easyblocks/d/dolfin.py b/easybuild/easyblocks/d/dolfin.py index d882f83da5..869b64b73d 100644 --- a/easybuild/easyblocks/d/dolfin.py +++ b/easybuild/easyblocks/d/dolfin.py @@ -33,15 +33,8 @@ class Dolfin(CMakePythonPackage): def configure(self): """Configure Dolfin build.""" - #dolfin does not work with swig 2.0.5 and 2.0.6 - #is this fixed in 2.0.7?? see https://bugs.launchpad.net/dolfin/+bug/996398 - # If so, change this check accordingly. - if LooseVersion(os.environ['SOFTVERSIONSWIG']) > '2.0.4': - self.log.error("Using bad version of SWIG, expecting swig <= 2.0.4." \ - " See https://bugs.launchpad.net/dolfin/+bug/996398") - # make sure that required dependencies are loaded - deps = ['Armadillo', 'Boost', 'ParMETIS', 'Python', 'SCOTCH', 'SuiteSparse', 'UFC'] + deps = ['Armadillo', 'Boost', 'ParMETIS', 'Python', 'SCOTCH', 'SWIG', 'SuiteSparse', 'UFC'] depsdict = {} for dep in deps: deproot = get_software_root(dep) @@ -50,15 +43,21 @@ def configure(self): else: depsdict.update({dep:deproot}) - #run cmake in debug mode + # dolfin does not work with swig 2.0.5 and 2.0.6 + # is this fixed in 2.0.7?? see https://bugs.launchpad.net/dolfin/+bug/996398 + # If so, change this check accordingly. + if LooseVersion(os.environ['SOFTVERSIONSWIG']) > '2.0.4': + self.log.error("Using bad version of SWIG, expecting swig <= 2.0.4." \ + " See https://bugs.launchpad.net/dolfin/+bug/996398") + # run cmake in debug mode self.updatecfg('configopts', ' -DCMAKE_BUILD_TYPE=Debug') + # set correct compilers to be used at runtime self.updatecfg('configopts', ' -DMPI_C_COMPILER="$MPICC"') self.updatecfg('configopts', ' -DMPI_CXX_COMPILER="$MPICXX"') # Boost config parameters - #self.updatecfg('configopts', " -DBoost_DIR=%s" % depsdict['Boost']) self.updatecfg('configopts', " -DBOOST_INCLUDEDIR=%s/include" % depsdict['Boost']) self.updatecfg('configopts', " -DBoost_DEBUG=ON -DBOOST_ROOT=%s" % depsdict['Boost']) @@ -80,7 +79,7 @@ def configure(self): self.updatecfg('configopts', " -DPYTHON_INCLUDE_PATH=%s/include/python%s" % (depsdict['Python'], python_short_ver)) self.updatecfg('configopts', " -DPYTHON_LIBRARY=%s/lib/libpython%s.so" % (depsdict['Python'], - python_short_ver)) + python_short_ver)) # SuiteSparse config params suitesparse = depsdict['SuiteSparse'] @@ -101,14 +100,15 @@ def configure(self): self.updatecfg('configopts', ' -DBLAS_LIBRARIES:PATH="$LIBBLAS"') self.updatecfg('configopts', ' -DLAPACK_LIBRARIES:PATH="$LIBLAPACK"') - #CFLAGS + # CGAL self.updatecfg('configopts', ' -DCGAL_DIR:PATH="$SOFTROOTCGAL"') - #set correct openmp options + # set correct openmp options openmp = get_openmp_flag(self.log) self.updatecfg('configopts', ' -DOpenMP_CXX_FLAGS="%s"' % openmp) self.updatecfg('configopts', ' -DOpenMP_C_FLAGS="%s"' % openmp) + # configure CMakePythonPackage.configure(self) def make_module_extra(self): @@ -124,9 +124,8 @@ def make_module_extra(self): envvars = ['I_MPI_CXX', 'I_MPI_CC'] for envvar in envvars: envar_val = os.getenv(envvar) - if not envar_val and self.tk.name in ['ictce', 'iqacml']: - self.log.error("%s not defined in environment, needed by DOLFIN" % envvar) - else: + # if environment variable is set, also set it in module + if envar_val: txt += "setenv\t%s\t%s\n" % (envvar, envar_val) return txt From b4772929be57c17806424b0d82f2df3fa9458c3d Mon Sep 17 00:00:00 2001 From: Kenneth Hoste Date: Mon, 25 Jun 2012 13:13:17 +0200 Subject: [PATCH 418/798] cosmetic changes to comments --- easybuild/easyblocks/m/metis.py | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/easybuild/easyblocks/m/metis.py b/easybuild/easyblocks/m/metis.py index cbc1b5d665..d8a0c5334e 100644 --- a/easybuild/easyblocks/m/metis.py +++ b/easybuild/easyblocks/m/metis.py @@ -21,21 +21,19 @@ import os import shutil - from easybuild.framework.application import Application from easybuild.tools.filetools import mkdir class METIS(Application): - + """Support for building METIS.""" def configure(self, *args, **kwargs): - """No configuration is done for METIS""" pass def make_install(self): - """ Manually copy the required files to the right place. + """Manually copy the required files to the right place. - And create symlins where expected by other applications + And create symlinks where expected by other applications (in Lib instead of lib)""" libdir = os.path.join(self.installdir, 'lib') mkdir(libdir) @@ -43,6 +41,7 @@ def make_install(self): includedir = os.path.join(self.installdir, 'include') mkdir(includedir) + # copy libraries try: src = os.path.join(self.getcfg('startfrom'), 'libmetis.a') dst = os.path.join(libdir, 'libmetis.a') @@ -50,6 +49,7 @@ def make_install(self): except OSError, err: self.log.error("Copying file libmetis.a to lib dir failed: %s" % err) + # copy include files try: for f in ['defs.h', 'macros.h', 'metis.h', 'proto.h', 'rename.h', 'struct.h']: src = os.path.join(self.getcfg('startfrom'), 'Lib', f) @@ -60,7 +60,7 @@ def make_install(self): self.log.error("Copying file metis.h to include dir failed: %s" % err) # Other applications depending on ParMETIS (SuiteSparse for one) look for both ParMETIS libraries - # and headerfiles in the Lib directory (capital L). The following symlinks are hence created. + # and header files in the Lib directory (capital L). The following symlinks are hence created. try: Libdir = os.path.join(self.installdir, 'Lib') os.symlink(libdir, Libdir) From ec4c260772c658360f3c94595c6dfa5c70b8c05c Mon Sep 17 00:00:00 2001 From: Kenneth Hoste Date: Mon, 25 Jun 2012 13:23:30 +0200 Subject: [PATCH 419/798] use LooseVersion with self.version in version checks, remove hardcoding of 'build' dir, cosmetic changes to comments --- easybuild/easyblocks/p/parmetis.py | 65 ++++++++++++++---------------- 1 file changed, 30 insertions(+), 35 deletions(-) diff --git a/easybuild/easyblocks/p/parmetis.py b/easybuild/easyblocks/p/parmetis.py index c815a55415..25e5223979 100644 --- a/easybuild/easyblocks/p/parmetis.py +++ b/easybuild/easyblocks/p/parmetis.py @@ -18,10 +18,6 @@ # You should have received a copy of the GNU General Public License # along with EasyBuild. If not, see . ## -""" -ParMETIS easyblock -""" - import os import shutil @@ -30,68 +26,65 @@ from easybuild.tools.filetools import run_cmd, mkdir class ParMETIS(METIS): - """ - Easyblock for the ParMETIS package - Parmetis - """ + """Support for building and installing ParMETIS.""" def configure(self): - """ + """Configure ParMETIS build. For versions of ParMETIS < 4 configure METIS separately New versions of ParMETIS include METIS Run 'cmake' in the build dir to get rid of a 'user friendly' help message that is displayed without this step. """ - if self.version() < LooseVersion("4"): - return METIS.configure(self) - #tested with 4.0.2, now actually requires cmake to be run first - #for bot parmetis and metis - for buildir in [ 'build' ] : - cmd = 'cd %s && cmake .. %s -DCMAKE_INSTALL_PREFIX="%s" && cd %s' % \ - (buildir, self.getcfg('configopts'), self.installdir, self.getcfg('startfrom')) - run_cmd(cmd, log_all=True, simple=True) - + if LooseVersion(self.version()) < LooseVersion("4"): + return METIS.configure(self)\ + # tested with 4.0.2, now actually requires cmake to be run first + # for both parmetis and metis + self.parmetis_builddir = 'build' + cmd = 'cd %s && cmake .. %s -DCMAKE_INSTALL_PREFIX="%s" && cd %s' % \ + (self.parmetis_builddir, self.getcfg('configopts'), self.installdir, self.getcfg('startfrom')) + run_cmd(cmd, log_all=True, simple=True) def make(self, verbose=False): - """ - make ParMETIS and Metis - - Calling make - for version > 4 cmake is run in the build dir. - """ + """Build METIS and ParMETIS using make.""" + paracmd = '' if self.getcfg('parallel'): paracmd = "-j %s" % self.getcfg('parallel') cmd = "%s make %s %s" % (self.getcfg('premakeopts'), paracmd, self.getcfg('makeopts')) - if self.version() >= LooseVersion("4"): - #this is done in the build dir. - cmd = "cd build && %s && cd %s " % (cmd, self.getcfg('startfrom')) + + # run make in build dir as well for recent version + if LooseVersion(self.version()) >= LooseVersion("4"): + cmd = "cd %s && %s && cd %s " % (self.parmetis_builddir, cmd, self.getcfg('startfrom')) + run_cmd(cmd, log_all=True, simple=True, log_output=verbose) def make_install(self): - """ - Manually copy files over to the right places - (libmetis.a, libparmetis.a, metis.h, parmetis.h) + """Install by copying files over to the right places + Also create symlinks where expected by other packages (Lib directory) """ includedir = os.path.join(self.installdir, 'include') libdir = os.path.join(self.installdir, 'lib') - if self.version() >= LooseVersion("4"): - #includedir etc changed in v4, use a normal makeinstall - cmd = "cd build && make install %s && cd %s" % (self.getcfg('installopts'), - self.getcfg('startfrom')) + if LooseVersion(self.version()) >= LooseVersion("4"): + #i ncludedir etc changed in v4, use a normal makeinstall + cmd = "cd %s && make install %s && cd %s" % (self.parmetis_builddir, + self.getcfg('installopts'), + self.getcfg('startfrom')) run_cmd(cmd, log_all=True, simple=True) + # libraries try: src = os.path.join(self.getcfg('startfrom'), 'build/libmetis/libmetis.a') dst = os.path.join(libdir, 'libmetis.a') shutil.copy2(src, dst) except OSError, err: self.log.error("Copying files to installation dir failed: %s" % err) + + # include files try: src = os.path.join(self.getcfg('startfrom'), 'build/metis/include/metis.h') dst = os.path.join(includedir, 'metis.h') @@ -104,6 +97,7 @@ def make_install(self): mkdir(libdir) mkdir(includedir) + # libraries try: for fil in ['libmetis.a', 'libparmetis.a']: src = os.path.join(self.getcfg('startfrom'), fil) @@ -112,6 +106,7 @@ def make_install(self): except OSError, err: self.log.error("Copying files to installation dir failed: %s" % err) + # include files try: src = os.path.join(self.getcfg('startfrom'), 'parmetis.h') dst = os.path.join(includedir, 'parmetis.h') @@ -123,7 +118,7 @@ def make_install(self): self.log.error("Copying files to installation dir failed: %s" % err) # Other applications depending on ParMETIS (SuiteSparse for one) look for both ParMETIS libraries - # and headerfiles in the Lib directory (capital L). The following symlink are hence created. + # and header files in the Lib directory (capital L). The following symlink are hence created. try: llibdir = os.path.join(self.installdir, 'Lib') os.symlink(libdir, llibdir) From 405c07c89decc3cc3c20ebf27e29ef1817732507 Mon Sep 17 00:00:00 2001 From: Kenneth Hoste Date: Mon, 25 Jun 2012 13:26:58 +0200 Subject: [PATCH 420/798] reuse self.pylibdir in make_module_extra --- easybuild/easyblocks/p/pythonpackage.py | 20 ++++++-------------- 1 file changed, 6 insertions(+), 14 deletions(-) diff --git a/easybuild/easyblocks/p/pythonpackage.py b/easybuild/easyblocks/p/pythonpackage.py index 60c559e238..2be39043ca 100644 --- a/easybuild/easyblocks/p/pythonpackage.py +++ b/easybuild/easyblocks/p/pythonpackage.py @@ -33,48 +33,40 @@ def __init__(self, *args, **kwargs): def configure(self): """Set Python packages lib dir.""" + self.log.debug("PythonPackage: configuring") + python_version = os.getenv('SOFTVERSIONPYTHON') if not python_version: - self.log.error('Python not available.') + self.log.error('Python module not loaded.') python_short_ver = ".".join(python_version.split(".")[0:2]) self.pylibdir = self.pylibdir % python_short_ver - self.log.debug("pylibdir: %s" % self.pylibdir) + self.log.debug("pylibdir: %s" % self.pylibdir) def make(self): """Build Python package using setup.py""" cmd = "python setup.py build" - run_cmd(cmd, log_all=True, simple=True) def make_install(self): """Install Python package to a custom path using setup.py""" cmd = "python setup.py install --prefix=%s %s" % (self.installdir, self.getcfg('installopts')) - run_cmd(cmd, log_all=True, simple=True) def make_module_extra(self): """Add install path to PYTHONPATH""" - pythonversion = os.getenv("SOFTVERSIONPYTHON") - if not pythonversion: - self.log.error("Python module not loaded.") - txt = Application.make_module_extra(self) - # geting installation directory witrh distutils doesn't work in Python 2.4 + # geting installation directory with distutils doesn't work in Python 2.4 #installdir = distutils.sysconfig.get_python_lib(plat_specific=True, # prefix=self.installdir) - # get major.minor version - shortver = ".".join(pythonversion.split(".")[0:2]) - installdir = os.path.join(self.installdir , "lib/python%s/site-packages" % shortver) - - txt += "prepend-path\tPYTHONPATH\t%s\n" % installdir + txt += "prepend-path\tPYTHONPATH\t%s\n" % os.path.join(self.installdir , self.pylibdir) return txt From 9688acd3ccac3cc2d26f076767cd9cb0decacbab Mon Sep 17 00:00:00 2001 From: Kenneth Hoste Date: Mon, 25 Jun 2012 16:57:22 +0200 Subject: [PATCH 421/798] improve comments, add FIXMEs for toolkit_comp_family, move stuff that uses os functions into try-except block --- easybuild/easyblocks/s/scotch.py | 65 ++++++++++++++++---------------- 1 file changed, 32 insertions(+), 33 deletions(-) diff --git a/easybuild/easyblocks/s/scotch.py b/easybuild/easyblocks/s/scotch.py index 5b56af2595..b449981e91 100644 --- a/easybuild/easyblocks/s/scotch.py +++ b/easybuild/easyblocks/s/scotch.py @@ -18,9 +18,6 @@ # You should have received a copy of the GNU General Public License # along with EasyBuild. If not, see . ## -""" -This module contains the SCOTCH easyblock. -""" import fileinput import os import re @@ -29,24 +26,21 @@ from easybuild.framework.application import Application from easybuild.tools.filetools import run_cmd, copytree - class SCOTCH(Application): - """ - Easyblock for building SCOTCH - """ + """Support for building/installing SCOTCH.""" + def configure(self): - """ - Locate the correct makefile, and copy this to a general Makefile.inc - (as shipped and expected by SCOTCH) - """ + """Configure SCOTCH build: locate the correct makefile, and copy this to a general Makefile.inc""" + + # FIXME: use toolkit_comp_family for this if "SOFTROOTICC" in os.environ: makefilename = 'Makefile.inc.x86-64_pc_linux2.icc' - elif "SOFTROOTGCC" in os.environ: makefilename = 'Makefile.inc.x86-64_pc_linux2' else: self.log.error("Don't know how to handle toolkit %s." % self.tk.name) + # create Makefile.inc try: srcdir = os.path.join(self.getcfg('startfrom'), 'src') src = os.path.join(srcdir, 'Make.inc', makefilename) @@ -56,20 +50,21 @@ def configure(self): except OSError: self.log.error("Copying Makefile.inc to src dir failed.") - #the default behaviour of these makefiles is still wrong - #e.g., we need -lpthread + # the default behaviour of these makefiles is still wrong + # e.g., we need -lpthread try: for line in fileinput.input(dst, inplace=1, backup='.orig.patchictce'): - #use $CC and the like since we're at it. + # use $CC and the likes since we're at it. line = re.sub(r"^CCS\s*=.*$", "CCS\t= $(CC)", line) line = re.sub(r"^CCP\s*=.*$", "CCP\t= $(MPICC)", line) line = re.sub(r"^CCD\s*=.*$", "CCD\t= $(MPICC)", line) - #append -lpthread to LDFLAGS + # append -lpthread to LDFLAGS line = re.sub(r"^LDFLAGS\s*=(?P.*$)", "LDFLAGS\t=\g -lpthread", line) sys.stdout.write(line) except IOError, err: self.log.error("Can't modify/write Makefile in 'Makefile.inc': %s" % (err)) + # change to src dir for building try: os.chdir(srcdir) self.log.debug("Changing to src dir.") @@ -77,48 +72,52 @@ def configure(self): self.log.error("Failed to change to src dir: %s" % err) def make(self): - """ - Run make, but with some special options for SCOTCH depending on the compiler - """ + """Build by running make, but with some special options for SCOTCH depending on the compiler.""" + ccs = os.environ['CC'] ccp = os.environ['MPICC'] ccd = os.environ['MPICC'] cflags = "" - #if self.tk.name == "iqacml": - # cflags = "-fPIC -O3 -DCOMMON_FILE_COMPRESS_GZ -DCOMMON_PTHREAD -DCOMMON_RANDOM_FIXED_SEED -DSCOTCH_RENAME -restrict -DIDXSIZE64" - #GCC doens't know -restrict + + # FIXME: use toolkit_comp_family for this if not "SOFTROOTGCC" in os.environ: cflags = "-fPIC -O3 -DCOMMON_FILE_COMPRESS_GZ -DCOMMON_PTHREAD -DCOMMON_RANDOM_FIXED_SEED -DSCOTCH_RENAME -DSCOTCH_PTHREAD -restrict -DIDXSIZE64" else: cflags = "-fPIC -O3 -DCOMMON_FILE_COMPRESS_GZ -DCOMMON_PTHREAD -DCOMMON_RANDOM_FIXED_SEED -DSCOTCH_RENAME -DSCOTCH_PTHREAD -Drestrict=__restrict" - cmd = 'make CCS="%s" CCP="%s" CCD="%s" CFLAGS="%s" scotch' % (ccs, ccp, ccd, cflags) - run_cmd(cmd, log_all=True, simple=True) - cmd = 'make CCS="%s" CCP="%s" CCD="%s" CFLAGS="%s" ptscotch' % (ccs, ccp, ccd, cflags) - run_cmd(cmd, log_all=True, simple=True) + + # actually build + for app in ["scotch", "ptscotch"]: + cmd = 'make CCS="%s" CCP="%s" CCD="%s" CFLAGS="%s" %s' % (ccs, ccp, ccd, cflags, app) + run_cmd(cmd, log_all=True, simple=True) def make_install(self): - self.log.debug("starting scotch's make_install") + """Install by copying files and creating group library file.""" + + self.log.debug("Installing SCOTCH") + + # copy files to install dir regmetis = re.compile(r".*metis.*") try: - for d in ["include", "lib", "bin", "man"]:#removed , here, we don't need metis.h etc. + for d in ["include", "lib", "bin", "man"]: src = os.path.join(self.getcfg('startfrom'), d) dst = os.path.join(self.installdir, d) - #we don't need any metis stuff from scotch! + # we don't need any metis stuff from scotch! copytree(src, dst, ignore=lambda path, files: [x for x in files if regmetis.match(x)]) except OSError, err: self.log.error("Copying %s to installation dir %s failed: %s" % (src, dst, err)) + # create group library file scotchlibdir = os.path.join(self.installdir, 'lib') scotchgrouplib = os.path.join(scotchlibdir, 'libscotch_group.a') - liblistorig = os.listdir(scotchlibdir) - line = ' '.join(liblistorig) - line = "GROUP (%s)" % line try: + line = ' '.join(os.listdir(scotchlibdir)) + line = "GROUP (%s)" % line + f = open(scotchgrouplib, 'w') f.write(line) f.close() self.log.info("Successfully written group lib file: %s" % scotchgrouplib) - except IOError, err: + except (IOError, OSError), err: self.log.error("Can't write to file %s: %s" % (scotchgrouplib, err)) From d20bbb7090f5d9962f09e7ca78fd7da27985994a Mon Sep 17 00:00:00 2001 From: Kenneth Hoste Date: Mon, 25 Jun 2012 17:01:44 +0200 Subject: [PATCH 422/798] add dummy custom sanity checks for CGAL, METIS, ParMETIS and SCOTCH --- easybuild/easyblocks/c/cgal.py | 12 ++++++++++++ easybuild/easyblocks/m/metis.py | 12 ++++++++++++ easybuild/easyblocks/p/parmetis.py | 13 +++++++++++++ easybuild/easyblocks/s/scotch.py | 12 ++++++++++++ 4 files changed, 49 insertions(+) diff --git a/easybuild/easyblocks/c/cgal.py b/easybuild/easyblocks/c/cgal.py index 14c4944157..4acae27319 100644 --- a/easybuild/easyblocks/c/cgal.py +++ b/easybuild/easyblocks/c/cgal.py @@ -39,3 +39,15 @@ def configure(self): os.environ['BOOST_ROOT'] = get_software_root("Boost") CMake.configure(self) + + def sanitycheck(self): + """Custom sanity check for CGAL.""" + + if not self.getcfg('sanityCheckPaths'): + + self.setcfg('sanityCheckPaths', {'files': ['THIS_WILL_FAIL'], + 'dirs':['THIS_WILL_FAIL_TOO']}) + + self.log.info("Customized sanity check paths: %s" % self.getcfg('sanityCheckPaths')) + + CMake.sanitycheck(self) \ No newline at end of file diff --git a/easybuild/easyblocks/m/metis.py b/easybuild/easyblocks/m/metis.py index d8a0c5334e..9cd23fd26f 100644 --- a/easybuild/easyblocks/m/metis.py +++ b/easybuild/easyblocks/m/metis.py @@ -68,3 +68,15 @@ def make_install(self): os.symlink(os.path.join(includedir, file), os.path.join(libdir, f)) except OSError, err: self.log.error("Something went wrong during symlink creation: %s" % err) + + def sanitycheck(self): + """Custom sanity check for METIS.""" + + if not self.getcfg('sanityCheckPaths'): + + self.setcfg('sanityCheckPaths', {'files': ['THIS_WILL_FAIL'], + 'dirs':['THIS_WILL_FAIL_TOO']}) + + self.log.info("Customized sanity check paths: %s" % self.getcfg('sanityCheckPaths')) + + Application.sanitycheck(self) \ No newline at end of file diff --git a/easybuild/easyblocks/p/parmetis.py b/easybuild/easyblocks/p/parmetis.py index 25e5223979..3d98cb17f9 100644 --- a/easybuild/easyblocks/p/parmetis.py +++ b/easybuild/easyblocks/p/parmetis.py @@ -22,6 +22,7 @@ import shutil from distutils.version import LooseVersion +from easybuild.framework.application import Application from easybuild.easyblocks.m.metis import METIS from easybuild.tools.filetools import run_cmd, mkdir @@ -127,3 +128,15 @@ def make_install(self): os.path.join(libdir, 'parmetis.h')) except OSError, err: self.log.error("Something went wrong during symlink creation: %s" % err) + + def sanitycheck(self): + """Custom sanity check for ParMETIS.""" + + if not self.getcfg('sanityCheckPaths'): + + self.setcfg('sanityCheckPaths', {'files': ['THIS_WILL_FAIL'], + 'dirs':['THIS_WILL_FAIL_TOO']}) + + self.log.info("Customized sanity check paths: %s" % self.getcfg('sanityCheckPaths')) + + Application.sanitycheck(self) \ No newline at end of file diff --git a/easybuild/easyblocks/s/scotch.py b/easybuild/easyblocks/s/scotch.py index b449981e91..d304f664d2 100644 --- a/easybuild/easyblocks/s/scotch.py +++ b/easybuild/easyblocks/s/scotch.py @@ -121,3 +121,15 @@ def make_install(self): self.log.info("Successfully written group lib file: %s" % scotchgrouplib) except (IOError, OSError), err: self.log.error("Can't write to file %s: %s" % (scotchgrouplib, err)) + + def sanitycheck(self): + """Custom sanity check for SCOTCH.""" + + if not self.getcfg('sanityCheckPaths'): + + self.setcfg('sanityCheckPaths', {'files': ['THIS_WILL_FAIL'], + 'dirs':['THIS_WILL_FAIL_TOO']}) + + self.log.info("Customized sanity check paths: %s" % self.getcfg('sanityCheckPaths')) + + Application.sanitycheck(self) \ No newline at end of file From 60ba20754fd7978f175af41041a017ea29dd0f98 Mon Sep 17 00:00:00 2001 From: Kenneth Hoste Date: Mon, 25 Jun 2012 17:10:31 +0200 Subject: [PATCH 423/798] remove unneccessary overriding of make function, cleaned up duplicate code in make_install, shortened lines in sanity check --- easybuild/easyblocks/s/suitesparse.py | 38 ++++++++++----------------- 1 file changed, 14 insertions(+), 24 deletions(-) diff --git a/easybuild/easyblocks/s/suitesparse.py b/easybuild/easyblocks/s/suitesparse.py index 6d7de89f4b..02265e3571 100644 --- a/easybuild/easyblocks/s/suitesparse.py +++ b/easybuild/easyblocks/s/suitesparse.py @@ -18,24 +18,18 @@ # You should have received a copy of the GNU General Public License # along with EasyBuild. If not, see . ## -from easybuild.framework.application import Application -from easybuild.tools.filetools import run_cmd import os import shutil +from easybuild.framework.application import Application class SuiteSparse(Application): + """Support for building SuiteSparse.""" def configure(self): pass - def make(self): - cmd = 'make' - - run_cmd(cmd, log_all=True, simple=True) - def make_install(self): - """ - Just copy the contents of the builddir to the installdir + """Install by copying the contents of the builddir to the installdir - keep permissions with copy2 !! """ for x in os.listdir(self.getcfg('startfrom')): @@ -44,7 +38,7 @@ def make_install(self): try: if os.path.isdir(src): shutil.copytree(src, dst) - #symlink + # symlink # - dst/Lib to dst/lib # - dst/Include to dst/include for c in ['Lib', 'Include']: @@ -58,27 +52,23 @@ def make_install(self): self.log.exception("Copying src %s to dst %s failed" % (src, dst)) # Some extra symlinks are necessary for UMFPACK to work. - for f in ['AMD/include/amd.h', 'AMD/include/amd_internal.h', 'UFconfig/UFconfig.h']: - src = os.path.join(self.installdir, f) - dst = os.path.join(self.installdir, 'UMFPACK', 'include', f.split('/')[-1]) - if os.path.exists(src): - try: os.symlink(src, dst) - except Exception, err: - self.log.error("Failed to make symbolic link from %s to %s: %s" % (src, dst, err)) - - for f in ['AMD/lib/libamd.a']: - src = os.path.join(self.installdir, f) - dst = os.path.join(self.installdir, 'UMFPACK', 'lib', f.split('/')[-1]) + for p in ['AMD/include/amd.h', 'AMD/include/amd_internal.h', 'UFconfig/UFconfig.h', 'AMD/lib/libamd.a']: + src = os.path.join(self.installdir, p) + dn = p.split('/')[-2] + fn = p.split('/')[-1] + dst = os.path.join(self.installdir, 'UMFPACK', dn, fn) if os.path.exists(src): - try: os.symlink(src, dst) + try: + os.symlink(src, dst) except Exception, err: self.log.error("Failed to make symbolic link from %s to %s: %s" % (src, dst, err)) def sanitycheck(self): if not self.getcfg('sanityCheckPaths'): - self.setcfg('sanityCheckPaths', {'files':["%s/lib/lib%s.a" % (x, x.lower()) for x in ["AMD", "BTF", "CAMD", "CCOLAMD", "CHOLMOD", "COLAMD", - "CXSparse", "KLU", "LDL", "RBio", "SPQR", "UMFPACK"]] + + self.setcfg('sanityCheckPaths', {'files':["%s/lib/lib%s.a" % (x, x.lower()) for x in ["AMD", "BTF", "CAMD", "CCOLAMD", "CHOLMOD", + "COLAMD", "CXSparse", "KLU", "LDL", "RBio", + "SPQR", "UMFPACK"]] + ["CSparse3/lib/libcsparse.a"], 'dirs':[ "MATLAB_Tools"] }) From 0445d051bfa6000bc140402337cd0f464fc1ff34 Mon Sep 17 00:00:00 2001 From: Kenneth Hoste Date: Mon, 25 Jun 2012 17:15:45 +0200 Subject: [PATCH 424/798] cosmetic changes to comments, fix typo (parrents), add comment such that PyLint ignores undefined WindowsError in copytree --- easybuild/tools/filetools.py | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) diff --git a/easybuild/tools/filetools.py b/easybuild/tools/filetools.py index 372b7e77cd..c8c3afdd1e 100644 --- a/easybuild/tools/filetools.py +++ b/easybuild/tools/filetools.py @@ -702,11 +702,10 @@ def mkdir(directory, parrents=False): Directory is the path to make log is the logger to which to log debugging or error info. - When parents is True then no error if existing - and make parent directories as needed - (this is the mkdir -p behaviour) + When parents is True then no error if directory already exists + and make parent directories as needed (cfr. mkdir -p) """ - if parrents: + if parents: try: os.makedirs(directory) log.debug("Succesfully created directory %s and needed parents" % directory) @@ -759,7 +758,7 @@ def copytree(src, dst, symlinks=False, ignore=None): class Error(EnvironmentError): pass try: - WindowsError + WindowsError #@UndefinedVariable except NameError: WindowsError = None From fd58ff977ae9d60bb53cc4fc7822caa7c8c1d0da Mon Sep 17 00:00:00 2001 From: Kenneth Hoste Date: Mon, 25 Jun 2012 17:25:42 +0200 Subject: [PATCH 425/798] set MPI_LIB_STATIC and MPI_LIB_SHARED for MVAPICH2 --- easybuild/tools/toolkit.py | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) diff --git a/easybuild/tools/toolkit.py b/easybuild/tools/toolkit.py index 0951e9857e..b4e4359e3f 100644 --- a/easybuild/tools/toolkit.py +++ b/easybuild/tools/toolkit.py @@ -709,9 +709,8 @@ def prepareMVAPICH2(self): """ Prepare for MVAPICH2 MPI library """ - #TODO: - #self.vars['MPI_LIB_STATIC'] = ?? - #self.vars['MPI_LIB_SHARED'] = ?? + self.vars['MPI_LIB_STATIC'] = "%s/lib/libmpich.a" % os.getenv('SOFTROOTMVAPICH2') + self.vars['MPI_LIB_SHARED'] = "%s/lib/libmpich.so" % os.getenv('SOFTROOTMVAPICH2') self.prepareSimpleMPI() def prepareOpenMPI(self): @@ -719,8 +718,7 @@ def prepareOpenMPI(self): Prepare for OpenMPI MPI library """ - #TODO: - #self.vars['MPI_LIB_STATIC'] = ?? + # no static libmpi.a available to set MPI_LIB_STATIC self.vars['MPI_LIB_SHARED'] = "%s/lib/libmpi.so" % os.getenv('SOFTROOTOPENMPI') self.vars['MPI_INC'] = "%s/include" % os.getenv('SOFTROOTOPENMPI') self.prepareSimpleMPI() From 3b069edd46025d07e0a404725505722fc3939c9b Mon Sep 17 00:00:00 2001 From: Kenneth Hoste Date: Mon, 25 Jun 2012 17:57:52 +0200 Subject: [PATCH 426/798] clean up Armadillo example easyconfigs, and implement Armadillo easyblock --- easybuild/easyblocks/a/armadillo.py | 53 +++++++++++++++++++ ...-2.4.4-goalf-1.1.0-no-OFED-Python-2.7.3.eb | 28 ++++------ ...rmadillo-2.4.4-ictce-4.0.6-Python-2.7.3.eb | 28 ++++------ 3 files changed, 75 insertions(+), 34 deletions(-) create mode 100644 easybuild/easyblocks/a/armadillo.py diff --git a/easybuild/easyblocks/a/armadillo.py b/easybuild/easyblocks/a/armadillo.py new file mode 100644 index 0000000000..0d6a769a4a --- /dev/null +++ b/easybuild/easyblocks/a/armadillo.py @@ -0,0 +1,53 @@ +# Copyright 2012 Kenneth Hoste +# +# This file is part of EasyBuild, +# originally created by the HPC team of the University of Ghent (http://ugent.be/hpc). +# +# http://github.com/hpcugent/easybuild +# +# EasyBuild is free software: you can redistribute it and/or modify +# it under the terms of the GNU General Public License as published by +# the Free Software Foundation v2. +# +# EasyBuild is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with EasyBuild. If not, see . +## +import os +from easybuild.easyblocks.c.cmake import CMake +from easybuild.tools.modules import get_software_root + +class Armadillo(CMake): + """Support for building Armadillo.""" + + def configure(self): + """Set some extra environment variables before configuring.""" + + boost = get_software_root('Boost') + if not boost: + self.log.error("Dependency module Boost not loaded?") + + self.updatecfg('configopts', "-DBoost_DIR=%s" % boost) + self.updatecfg('configopts', "-DBOOST_INCLUDEDIR=%s/include" % boost) + self.updatecfg('configopts', "-DBoost_DEBUG=ON -DBOOST_ROOT=%s" % boost) + + self.updatecfg('configopts', '-DBLAS_LIBRARY:PATH="%s"' % os.getenv('LIBBLAS')) + self.updatecfg('configopts', '-DLAPACK_LIBRARY:PATH="%s"' % os.getenv('LIBLAPACK')) + + CMake.configure(self) + + def sanitycheck(self): + """Custom sanity check for Armadillo.""" + + if not self.getcfg('sanityCheckPaths'): + + self.setcfg('sanityCheckPaths', {'files':['lib/libarmadillo.so','include/armadillo'], + 'dirs':['include/armadillo_bits']}) + + self.log.info("Customized sanity check paths: %s" % self.getcfg('sanityCheckPaths')) + + CMake.sanitycheck(self) \ No newline at end of file diff --git a/easybuild/easyconfigs/a/Armadillo/Armadillo-2.4.4-goalf-1.1.0-no-OFED-Python-2.7.3.eb b/easybuild/easyconfigs/a/Armadillo/Armadillo-2.4.4-goalf-1.1.0-no-OFED-Python-2.7.3.eb index ca4ec65244..e1559b7ea9 100644 --- a/easybuild/easyconfigs/a/Armadillo/Armadillo-2.4.4-goalf-1.1.0-no-OFED-Python-2.7.3.eb +++ b/easybuild/easyconfigs/a/Armadillo/Armadillo-2.4.4-goalf-1.1.0-no-OFED-Python-2.7.3.eb @@ -1,27 +1,21 @@ +easyblock= "CMake" + name='Armadillo' version='2.4.4' -pythonversion='2.7.3' -easyblock= "CMake" homepage='http://arma.sourceforge.net/' -description="Armadillo is an open-source C++ linear algebra library (matrix maths) aiming towards a good balance between speed and ease of use. Integer, floating point and complex numbers are supported, as well as a subset of trigonometric and statistics functions." +description="""Armadillo is an open-source C++ linear algebra library (matrix maths) aiming towards +a good balance between speed and ease of use. Integer, floating point and complex numbers are supported, +as well as a subset of trigonometric and statistics functions.""" -sourceURLs=['http://sourceforge.net/projects/arma/files'] toolkit={'name':'goalf','version':'1.1.0-no-OFED'} -builddependencies = [ - ('CMake','2.8.4'), - ] -versionsuffix="-Python-%s" % pythonversion - -#manually add toolkit suffix here, plus True for letting the dependency use it's own toolkit and not the dummy one -dependencies=[ - ('Boost','1.49.0', versionsuffix), - ] sources=['%s-%s.tar.gz'%(name.lower(),version)] +sourceURLs=['http://sourceforge.net/projects/arma/files'] + +pythonversion='2.7.3' +versionsuffix="-Python-%s" % pythonversion -sanityCheckPaths = {'files': ['lib/libarmadillo.so','include/armadillo'], 'dirs':['include','include/armadillo_bits']} +dependencies=[('Boost','1.49.0', versionsuffix)] -#extra options for cmake -configopts=' -DBoost_DIR=$SOFTROOTBOOST -DBOOST_INCLUDEDIR=$SOFTROOTBOOST/include -DBoost_DEBUG=ON -DBOOST_ROOT=$SOFTROOTBOOST -DBLAS_LIBRARY:PATH="$LIBBLAS"' -configopts += ' -DLAPACK_LIBRARY:PATH="$LIBLAPACK"' +builddependencies = [('CMake','2.8.4') diff --git a/easybuild/easyconfigs/a/Armadillo/Armadillo-2.4.4-ictce-4.0.6-Python-2.7.3.eb b/easybuild/easyconfigs/a/Armadillo/Armadillo-2.4.4-ictce-4.0.6-Python-2.7.3.eb index 57841006d9..b049132fb5 100644 --- a/easybuild/easyconfigs/a/Armadillo/Armadillo-2.4.4-ictce-4.0.6-Python-2.7.3.eb +++ b/easybuild/easyconfigs/a/Armadillo/Armadillo-2.4.4-ictce-4.0.6-Python-2.7.3.eb @@ -1,27 +1,21 @@ +easyblock= "CMake" + name='Armadillo' version='2.4.4' -pythonversion='2.7.3' -easyblock= "CMake" homepage='http://arma.sourceforge.net/' -description="Armadillo is an open-source C++ linear algebra library (matrix maths) aiming towards a good balance between speed and ease of use. Integer, floating point and complex numbers are supported, as well as a subset of trigonometric and statistics functions." +description="""Armadillo is an open-source C++ linear algebra library (matrix maths) aiming towards +a good balance between speed and ease of use. Integer, floating point and complex numbers are supported, +as well as a subset of trigonometric and statistics functions.""" -sourceURLs=['http://sourceforge.net/projects/arma/files'] toolkit={'name':'ictce','version':'4.0.6'} -builddependencies = [ - ('CMake','2.8.4'), - ] -versionsuffix="-Python-%s" % pythonversion - -#manually add toolkit suffix here, plus True for letting the dependency use it's own toolkit and not the dummy one -dependencies=[ - ('Boost','1.49.0', versionsuffix), - ] sources=['%s-%s.tar.gz'%(name.lower(),version)] +sourceURLs=['http://sourceforge.net/projects/arma/files'] + +pythonversion='2.7.3' +versionsuffix="-Python-%s" % pythonversion -sanityCheckPaths = {'files': ['lib/libarmadillo.so','include/armadillo'], 'dirs':['include','include/armadillo_bits']} +dependencies=[('Boost','1.49.0', versionsuffix)] -#extra options for cmake -configopts=' -DBoost_DIR=$SOFTROOTBOOST -DBOOST_INCLUDEDIR=$SOFTROOTBOOST/include -DBoost_DEBUG=ON -DBOOST_ROOT=$SOFTROOTBOOST -DBLAS_LIBRARY:PATH="$LIBBLAS"' -configopts += ' -DLAPACK_LIBRARY:PATH="$LIBLAPACK"' +builddependencies = [('CMake','2.8.4') From 764b125ca2d4c040681870fe1dec993ca10b8cc9 Mon Sep 17 00:00:00 2001 From: Kenneth Hoste Date: Mon, 25 Jun 2012 17:58:19 +0200 Subject: [PATCH 427/798] add name to copright line, fix name used in class comment --- easybuild/easyblocks/c/cgal.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/easybuild/easyblocks/c/cgal.py b/easybuild/easyblocks/c/cgal.py index 4acae27319..a3101a5fd0 100644 --- a/easybuild/easyblocks/c/cgal.py +++ b/easybuild/easyblocks/c/cgal.py @@ -1,4 +1,4 @@ -# Copyright 2012 Jens Timmerman +# Copyright 2012 Jens Timmerman, Kenneth Hoste # # This file is part of EasyBuild, # originally created by the HPC team of the University of Ghent (http://ugent.be/hpc). @@ -22,7 +22,7 @@ from easybuild.tools.modules import get_software_root class CGAL(CMake): - """Support for building CGal.""" + """Support for building CGAL.""" def configure(self): """Set some extra environment variables before configuring.""" From 7c2b1d9ca2eaf7a5b6a315f51913005a68f4919e Mon Sep 17 00:00:00 2001 From: Kenneth Hoste Date: Mon, 25 Jun 2012 17:59:38 +0200 Subject: [PATCH 428/798] fix typo in example Armadillo easyconfigs --- .../Armadillo-2.4.4-goalf-1.1.0-no-OFED-Python-2.7.3.eb | 2 +- .../a/Armadillo/Armadillo-2.4.4-ictce-4.0.6-Python-2.7.3.eb | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/easybuild/easyconfigs/a/Armadillo/Armadillo-2.4.4-goalf-1.1.0-no-OFED-Python-2.7.3.eb b/easybuild/easyconfigs/a/Armadillo/Armadillo-2.4.4-goalf-1.1.0-no-OFED-Python-2.7.3.eb index e1559b7ea9..7fc9eb124a 100644 --- a/easybuild/easyconfigs/a/Armadillo/Armadillo-2.4.4-goalf-1.1.0-no-OFED-Python-2.7.3.eb +++ b/easybuild/easyconfigs/a/Armadillo/Armadillo-2.4.4-goalf-1.1.0-no-OFED-Python-2.7.3.eb @@ -18,4 +18,4 @@ versionsuffix="-Python-%s" % pythonversion dependencies=[('Boost','1.49.0', versionsuffix)] -builddependencies = [('CMake','2.8.4') +builddependencies = [('CMake','2.8.4')] \ No newline at end of file diff --git a/easybuild/easyconfigs/a/Armadillo/Armadillo-2.4.4-ictce-4.0.6-Python-2.7.3.eb b/easybuild/easyconfigs/a/Armadillo/Armadillo-2.4.4-ictce-4.0.6-Python-2.7.3.eb index b049132fb5..0a70d7e762 100644 --- a/easybuild/easyconfigs/a/Armadillo/Armadillo-2.4.4-ictce-4.0.6-Python-2.7.3.eb +++ b/easybuild/easyconfigs/a/Armadillo/Armadillo-2.4.4-ictce-4.0.6-Python-2.7.3.eb @@ -18,4 +18,4 @@ versionsuffix="-Python-%s" % pythonversion dependencies=[('Boost','1.49.0', versionsuffix)] -builddependencies = [('CMake','2.8.4') +builddependencies = [('CMake','2.8.4')] From c51080c1d3dfae9113f7afbed13ed4836a8a922b Mon Sep 17 00:00:00 2001 From: Kenneth Hoste Date: Mon, 25 Jun 2012 18:13:25 +0200 Subject: [PATCH 429/798] clean up Boost example easyconfigs, add sanity check wrt MPI functionality in Boost configure function --- easybuild/easyblocks/b/boost.py | 11 +++++++++- ...1.49.0-goalf-1.1.0-no-OFED-Python-2.7.3.eb | 19 ++++++----------- .../Boost-1.49.0-ictce-4.0.6-Python-2.7.3.eb | 21 +++++++------------ 3 files changed, 24 insertions(+), 27 deletions(-) diff --git a/easybuild/easyblocks/b/boost.py b/easybuild/easyblocks/b/boost.py index e88d90dd8b..f6f7b5865b 100644 --- a/easybuild/easyblocks/b/boost.py +++ b/easybuild/easyblocks/b/boost.py @@ -36,6 +36,10 @@ def __init__(self, *args, **kwargs): def configure(self): """Configure Boost build using custom tools""" + # mpi sanity check + if self.getcfg('boost_mpi') and self.tk.opts['usempi']: + self.log.error("When enabling building boost_mpi, also enable the 'usempi' toolkit option.") + # create build directory (Boost doesn't like being built in source dir) try: self.objdir = os.path.join(self.builddir, 'obj') @@ -114,7 +118,12 @@ def sanitycheck(self): if not self.getcfg('sanityCheckPaths'): - self.setcfg('sanityCheckPaths', {'files': ['lib/libboost_%s.so' % x for x in ['python', 'system']], + mpifs = [] + if self.getcfg('boost_mpi'): + mpifs = ['lib/libboost_mpi.so'] + + self.setcfg('sanityCheckPaths', {'files': mpifs + ['lib/libboost_%s.so' % x for x in ['python', + 'system']], 'dirs':['include/boost']}) self.log.info("Customized sanity check paths: %s" % self.getcfg('sanityCheckPaths')) diff --git a/easybuild/easyconfigs/b/Boost/Boost-1.49.0-goalf-1.1.0-no-OFED-Python-2.7.3.eb b/easybuild/easyconfigs/b/Boost/Boost-1.49.0-goalf-1.1.0-no-OFED-Python-2.7.3.eb index 90ec3d1cbd..4411dc9f35 100644 --- a/easybuild/easyconfigs/b/Boost/Boost-1.49.0-goalf-1.1.0-no-OFED-Python-2.7.3.eb +++ b/easybuild/easyconfigs/b/Boost/Boost-1.49.0-goalf-1.1.0-no-OFED-Python-2.7.3.eb @@ -5,23 +5,16 @@ homepage='http://www.boost.org/' description="Boost provides free peer-reviewed portable C++ source libraries." toolkit={'name':'goalf','version':'1.1.0-no-OFED'} -toolkitopts={'pic':True} +toolkitopts={'pic':True, 'usempi':True} + +sources=['%s_%s.tar.gz'%(name.lower(), '_'.join(version.split('.')))] +sourceURLs=[('http://sourceforge.net/projects/%(name)s/files/%(name)s/%(version)s' % \ + {'name':name.lower(), 'version':version}, 'download')] pythonversion='2.7.3' versionsuffix='-Python-%s'%pythonversion dependencies=[('Python',pythonversion)] -sources=['%s_%s.tar.gz'%(name.lower(), '_'.join(version.split('.')))] -sourceURLs=[('http://sourceforge.net/projects/%(name)s/files/%(name)s/%(version)s' % {'name':name.lower(), 'version':version}, 'download')] - -patches=['intellinuxjam_fPIC.patch'] - -sanityCheckPaths = {'files': ['lib/libboost_python.so','lib/libboost_system.so'], 'dirs':['include/boost']} - -#also build boost_mpi +# also build boost_mpi boost_mpi=True - -if boost_mpi: - toolkitopts['usempi'] =True - sanityCheckPaths['files'].append('lib/libboost_mpi.so') diff --git a/easybuild/easyconfigs/b/Boost/Boost-1.49.0-ictce-4.0.6-Python-2.7.3.eb b/easybuild/easyconfigs/b/Boost/Boost-1.49.0-ictce-4.0.6-Python-2.7.3.eb index 86afb05dab..10f7eb52d3 100644 --- a/easybuild/easyconfigs/b/Boost/Boost-1.49.0-ictce-4.0.6-Python-2.7.3.eb +++ b/easybuild/easyconfigs/b/Boost/Boost-1.49.0-ictce-4.0.6-Python-2.7.3.eb @@ -5,23 +5,18 @@ homepage='http://www.boost.org/' description="Boost provides free peer-reviewed portable C++ source libraries." toolkit={'name':'ictce','version':'4.0.6'} -toolkitopts={'pic':True} - -pythonversion='2.7.3' -versionsuffix='-Python-%s'%pythonversion - -dependencies=[('Python',pythonversion)] +toolkitopts={'pic':True, 'usempi':True} sources=['%s_%s.tar.gz'%(name.lower(), '_'.join(version.split('.')))] -sourceURLs=[('http://sourceforge.net/projects/%(name)s/files/%(name)s/%(version)s' % {'name':name.lower(), 'version':version}, 'download')] +sourceURLs=[('http://sourceforge.net/projects/%(name)s/files/%(name)s/%(version)s' % \ + {'name':name.lower(), 'version':version}, 'download')] patches=['intellinuxjam_fPIC.patch'] -sanityCheckPaths = {'files': ['lib/libboost_python.so','lib/libboost_system.so'], 'dirs':['include/boost']} +pythonversion='2.7.3' +versionsuffix='-Python-%s'%pythonversion -#also build boost_mpi -boost_mpi=True +dependencies=[('Python',pythonversion)] -if boost_mpi: - toolkitopts['usempi'] =True - sanityCheckPaths['files'].append('lib/libboost_mpi.so') +# also build boost_mpi +boost_mpi=True From fec9c4e3bb81be3e62f4fd6e9197cf0a89be6884 Mon Sep 17 00:00:00 2001 From: Kenneth Hoste Date: Mon, 25 Jun 2012 18:16:33 +0200 Subject: [PATCH 430/798] cleaned up CGAL example easyconfigs --- ...AL-4.0-goalf-1.1.0-no-OFED-Python-2.7.3.eb | 24 ++++++++----------- .../CGAL/CGAL-4.0-ictce-4.0.6-Python-2.7.3.eb | 22 ++++++++--------- 2 files changed, 20 insertions(+), 26 deletions(-) diff --git a/easybuild/easyconfigs/c/CGAL/CGAL-4.0-goalf-1.1.0-no-OFED-Python-2.7.3.eb b/easybuild/easyconfigs/c/CGAL/CGAL-4.0-goalf-1.1.0-no-OFED-Python-2.7.3.eb index 5fe11c6ef5..5df71db6fa 100644 --- a/easybuild/easyconfigs/c/CGAL/CGAL-4.0-goalf-1.1.0-no-OFED-Python-2.7.3.eb +++ b/easybuild/easyconfigs/c/CGAL/CGAL-4.0-goalf-1.1.0-no-OFED-Python-2.7.3.eb @@ -1,25 +1,21 @@ name='CGAL' version='4.0' -pythonversion='2.7.3' - - homepage='http://www.cgal.org/' description="""The goal of the CGAL Open Source Project is to provide easy access to efficient -and reliable geometric algorithms in the form of a C++ library. """ - +and reliable geometric algorithms in the form of a C++ library.""" toolkit={'name':'goalf','version':'1.1.0-no-OFED'} -versionsuffix="-Python-%s" % pythonversion - -dependencies=[ - ('CMake','2.8.4'), - ('GMP','5.0.5'), - ('Boost','1.49.0', versionsuffix), - ('MPFR','3.1.0'), - ] -sources=['%s-%s.tar.gz'%(name,version)] +sources = ['%s-%s.tar.gz' % (name, version)] sourceURLs = ['http://fenicsproject.org/pub/software/contrib/'] +pythonversion = '2.7.3' +versionsuffix = "-Python-%s" % pythonversion +dependencies = [ + ('CMake','2.8.4'), + ('GMP','5.0.5'), + ('Boost','1.49.0', versionsuffix), + ('MPFR','3.1.0'), + ] diff --git a/easybuild/easyconfigs/c/CGAL/CGAL-4.0-ictce-4.0.6-Python-2.7.3.eb b/easybuild/easyconfigs/c/CGAL/CGAL-4.0-ictce-4.0.6-Python-2.7.3.eb index 1946d65cb7..77e8889c13 100644 --- a/easybuild/easyconfigs/c/CGAL/CGAL-4.0-ictce-4.0.6-Python-2.7.3.eb +++ b/easybuild/easyconfigs/c/CGAL/CGAL-4.0-ictce-4.0.6-Python-2.7.3.eb @@ -1,23 +1,21 @@ name='CGAL' version='4.0' -pythonversion='2.7.3' homepage='http://www.cgal.org/' description="""The goal of the CGAL Open Source Project is to provide easy access to efficient -and reliable geometric algorithms in the form of a C++ library. """ - +and reliable geometric algorithms in the form of a C++ library.""" toolkit={'name':'ictce','version':'4.0.6'} -versionsuffix="-Python-%s" % pythonversion - -dependencies=[ - ('CMake','2.8.4'), - ('GMP','5.0.5'), - ('Boost','1.49.0', versionsuffix), - ('MPFR','3.1.0'), - ] -sources=['%s-%s.tar.gz'%(name,version)] +sources = ['%s-%s.tar.gz' % (name, version)] sourceURLs = ['http://fenicsproject.org/pub/software/contrib/'] +pythonversion = '2.7.3' +versionsuffix = "-Python-%s" % pythonversion +dependencies = [ + ('CMake','2.8.4'), + ('GMP','5.0.5'), + ('Boost','1.49.0', versionsuffix), + ('MPFR','3.1.0'), + ] From fba633667a66a8e09e1509b9ead71a24d3a9ca43 Mon Sep 17 00:00:00 2001 From: Kenneth Hoste Date: Mon, 25 Jun 2012 18:17:04 +0200 Subject: [PATCH 431/798] fix check wrt MPI functionality --- easybuild/easyblocks/b/boost.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/easybuild/easyblocks/b/boost.py b/easybuild/easyblocks/b/boost.py index f6f7b5865b..2db1fe0256 100644 --- a/easybuild/easyblocks/b/boost.py +++ b/easybuild/easyblocks/b/boost.py @@ -37,7 +37,7 @@ def configure(self): """Configure Boost build using custom tools""" # mpi sanity check - if self.getcfg('boost_mpi') and self.tk.opts['usempi']: + if self.getcfg('boost_mpi') and not self.tk.opts['usempi']: self.log.error("When enabling building boost_mpi, also enable the 'usempi' toolkit option.") # create build directory (Boost doesn't like being built in source dir) From 240262ceb4c51eb5e3a94252aa1ce9609ba05e91 Mon Sep 17 00:00:00 2001 From: Kenneth Hoste Date: Tue, 26 Jun 2012 09:17:24 +0200 Subject: [PATCH 432/798] implement bzip2 easyblock, and add example easyconfig for goalf and ictce toolkits --- easybuild/easyblocks/b/bzip2.py | 49 +++++++++++++++++++ .../bzip2/bzip2-1.0.6-goalf-1.1.0-no-OFED.eb | 13 +++++ .../b/bzip2/bzip2-1.0.6-ictce-4.0.6.eb | 13 +++++ 3 files changed, 75 insertions(+) create mode 100644 easybuild/easyblocks/b/bzip2.py create mode 100644 easybuild/easyconfigs/b/bzip2/bzip2-1.0.6-goalf-1.1.0-no-OFED.eb create mode 100644 easybuild/easyconfigs/b/bzip2/bzip2-1.0.6-ictce-4.0.6.eb diff --git a/easybuild/easyblocks/b/bzip2.py b/easybuild/easyblocks/b/bzip2.py new file mode 100644 index 0000000000..ce97c8a3dc --- /dev/null +++ b/easybuild/easyblocks/b/bzip2.py @@ -0,0 +1,49 @@ +# Copyright 2012 Jens Timmerman, Kenneth Hoste +# +# This file is part of EasyBuild +# originally created by the HPC team of the University of Ghent (http://ugent.be/hpc). +# +# http://github.com/hpcugent/easybuild +# +# EasyBuild is free software: you can redistribute it and/or modify +# it under the terms of the GNU General Public License as published by +# the Free Software Foundation v2. +# +# EasyBuild is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with EasyBuild. If not, see . +## +import os +from easybuild.framework.application import Application + +class Bzip2(Application): + """Support for building bzip2.""" + + # no configure script + def configure(self): + self.updatecfg('makeopts', "CFLAGS='-Wall -Winline %s -g $(BIGFILES)'" % os.getenv('CFLAGS')) + + def make_install(self): + """Install in non-standard path by passing PREFIX variable to make install.""" + self.updatecfg('installopts', "PREFIX=%s" % self.installdir) + + Application.make_install(self) + + def sanitycheck(self): + """Custom sanity check for bzip2.""" + + if not self.getcfg('sanityCheckPaths'): + + self.setcfg('sanityCheckPaths', {'files': ["bin/%s" % x for x in ["bunzip2", "bzcat", "bzdiff", + "bzgrep", "bzip2", + "bzip2recover", "bzmore"]] + + ['lib/libbz2.a', 'include/bzlib.h'], + 'dirs':[]}) + + self.log.info("Customized sanity check paths: %s" % self.getcfg('sanityCheckPaths')) + + Application.sanitycheck(self) \ No newline at end of file diff --git a/easybuild/easyconfigs/b/bzip2/bzip2-1.0.6-goalf-1.1.0-no-OFED.eb b/easybuild/easyconfigs/b/bzip2/bzip2-1.0.6-goalf-1.1.0-no-OFED.eb new file mode 100644 index 0000000000..df1be6dd51 --- /dev/null +++ b/easybuild/easyconfigs/b/bzip2/bzip2-1.0.6-goalf-1.1.0-no-OFED.eb @@ -0,0 +1,13 @@ +name='bzip2' +version='1.0.6' + +homepage='http://www.bzip.org/' +description="""bzip2 is a freely available, patent free, high-quality data compressor. It typically +compresses files to within 10% to 15% of the best available techniques (the PPM family of statistical +compressors), whilst being around twice as fast at compression and six times faster at decompression.""" + +toolkit={'name':'goalf','version':'1.1.0-no-OFED'} +toolkitopts={'pic':True} + +sources=['%s-%s.tar.gz'%(name, version)] +sourceURLs=['http://www.bzip.org/%s/' % version] \ No newline at end of file diff --git a/easybuild/easyconfigs/b/bzip2/bzip2-1.0.6-ictce-4.0.6.eb b/easybuild/easyconfigs/b/bzip2/bzip2-1.0.6-ictce-4.0.6.eb new file mode 100644 index 0000000000..c926f9394b --- /dev/null +++ b/easybuild/easyconfigs/b/bzip2/bzip2-1.0.6-ictce-4.0.6.eb @@ -0,0 +1,13 @@ +name='bzip2' +version='1.0.6' + +homepage='http://www.bzip.org/' +description="""bzip2 is a freely available, patent free, high-quality data compressor. It typically +compresses files to within 10% to 15% of the best available techniques (the PPM family of statistical +compressors), whilst being around twice as fast at compression and six times faster at decompression.""" + +toolkit={'name':'ictce','version':'4.0.6'} +toolkitopts={'pic':True} + +sources=['%s-%s.tar.gz'%(name, version)] +sourceURLs=['http://www.bzip.org/%s/' % version] \ No newline at end of file From 3b9ac626e9c4310bf6cad132a42beab30b33421e Mon Sep 17 00:00:00 2001 From: Kenneth Hoste Date: Tue, 26 Jun 2012 09:17:54 +0200 Subject: [PATCH 433/798] specify bzip2 paths to Boost, add bzip2 as Boost dependency --- easybuild/easyblocks/b/boost.py | 8 ++++++++ .../Boost-1.49.0-goalf-1.1.0-no-OFED-Python-2.7.3.eb | 3 ++- .../b/Boost/Boost-1.49.0-ictce-4.0.6-Python-2.7.3.eb | 3 ++- 3 files changed, 12 insertions(+), 2 deletions(-) diff --git a/easybuild/easyblocks/b/boost.py b/easybuild/easyblocks/b/boost.py index 2db1fe0256..9421de76cb 100644 --- a/easybuild/easyblocks/b/boost.py +++ b/easybuild/easyblocks/b/boost.py @@ -22,6 +22,7 @@ import shutil from easybuild.framework.application import Application from easybuild.tools.filetools import run_cmd +from easybuild.tools.modules import get_software_root class Boost(Application): """Support for building Boost.""" @@ -77,6 +78,13 @@ def make(self): bjamoptions = " --prefix=%s" % self.objdir + # specify path for bzip2 if module is loaded + bzip2 = get_software_root('bzip2') + if bzip2: + bjamoptions += " -sBZIP2_INCLUDE=%s/include" % bzip2 + bjamoptions += " -sBZIP2_LIBPATH=%s/lib" % bzip2 + + if self.getcfg('boost_mpi'): self.log.info("Building boost_mpi library") diff --git a/easybuild/easyconfigs/b/Boost/Boost-1.49.0-goalf-1.1.0-no-OFED-Python-2.7.3.eb b/easybuild/easyconfigs/b/Boost/Boost-1.49.0-goalf-1.1.0-no-OFED-Python-2.7.3.eb index 4411dc9f35..f58b0b0222 100644 --- a/easybuild/easyconfigs/b/Boost/Boost-1.49.0-goalf-1.1.0-no-OFED-Python-2.7.3.eb +++ b/easybuild/easyconfigs/b/Boost/Boost-1.49.0-goalf-1.1.0-no-OFED-Python-2.7.3.eb @@ -14,7 +14,8 @@ sourceURLs=[('http://sourceforge.net/projects/%(name)s/files/%(name)s/%(version) pythonversion='2.7.3' versionsuffix='-Python-%s'%pythonversion -dependencies=[('Python',pythonversion)] +dependencies=[('bzip2', '1.0.6'), + ('Python', pythonversion)] # also build boost_mpi boost_mpi=True diff --git a/easybuild/easyconfigs/b/Boost/Boost-1.49.0-ictce-4.0.6-Python-2.7.3.eb b/easybuild/easyconfigs/b/Boost/Boost-1.49.0-ictce-4.0.6-Python-2.7.3.eb index 10f7eb52d3..9aafc195c7 100644 --- a/easybuild/easyconfigs/b/Boost/Boost-1.49.0-ictce-4.0.6-Python-2.7.3.eb +++ b/easybuild/easyconfigs/b/Boost/Boost-1.49.0-ictce-4.0.6-Python-2.7.3.eb @@ -16,7 +16,8 @@ patches=['intellinuxjam_fPIC.patch'] pythonversion='2.7.3' versionsuffix='-Python-%s'%pythonversion -dependencies=[('Python',pythonversion)] +dependencies=[('bzip2', '1.0.6'), + ('Python', pythonversion)] # also build boost_mpi boost_mpi=True From 2f15baae38a329015e22145552e49760feb594d9 Mon Sep 17 00:00:00 2001 From: Kenneth Hoste Date: Tue, 26 Jun 2012 09:23:17 +0200 Subject: [PATCH 434/798] clean up CMake example easyconfig, make sure Application class is used to build CMake --- .../c/CMake/CMake-2.8.4-goalf-1.1.0-no-OFED.eb | 10 ++++++++-- easybuild/framework/application.py | 13 ++++++++++--- 2 files changed, 18 insertions(+), 5 deletions(-) diff --git a/easybuild/easyconfigs/c/CMake/CMake-2.8.4-goalf-1.1.0-no-OFED.eb b/easybuild/easyconfigs/c/CMake/CMake-2.8.4-goalf-1.1.0-no-OFED.eb index e721af6204..393cc081a2 100644 --- a/easybuild/easyconfigs/c/CMake/CMake-2.8.4-goalf-1.1.0-no-OFED.eb +++ b/easybuild/easyconfigs/c/CMake/CMake-2.8.4-goalf-1.1.0-no-OFED.eb @@ -1,15 +1,21 @@ +# we need to build with Application, not with CMake easyblock +easyblock="Application" + name='CMake' version='2.8.4' homepage='http://www.cmake.org' -description="""CMake, the cross-platform, open-source build system. CMake is a family of tools designed to build, test and package software. """ +description="""CMake, the cross-platform, open-source build system. +CMake is a family of tools designed to build, test and package software.""" toolkit={'name':'goalf','version':'1.1.0-no-OFED'} + sources=['%s-%s.tar.gz'%(name.lower(),version)] + majorversion = ".".join(version.split('.')[:-1]) sourceURLs = ['http://www.cmake.org/files/v%s' % majorversion] + sanityCheckPaths={ 'files':["bin/%s" % x for x in ['cmake','cpack','ctest']], 'dirs':[] } - diff --git a/easybuild/framework/application.py b/easybuild/framework/application.py index 41b3c491cd..e952a7ccd2 100644 --- a/easybuild/framework/application.py +++ b/easybuild/framework/application.py @@ -1700,7 +1700,10 @@ def get_instance(easyblock, log, name=None): """ Get instance for a particular application class (or Application) """ - #TODO: create proper factory for this, as explained here + + app_mod_class = ("easybuild.framework.application", "Application") + + #TODO: create proper factory for this, as explained here #http://stackoverflow.com/questions/456672/class-factory-in-python try: if not easyblock: @@ -1743,10 +1746,14 @@ def get_instance(easyblock, log, name=None): raise EasyBuildError(str(err)) else: - modulepath = "easybuild.framework.application" - class_name = "Application" + (modulepath, class_name) = app_mod_class log.debug("Easyblock path %s does not exist, so falling back to default %s class from %s" % (easyblock_path, class_name, modulepath)) + elif easyblock == "Application": + (modulepath, class_name) = app_mod_class + log.debug("Easyblock %s specified, so using default class %s from %s" % (easyblock, + class_name, + modulepath)) else: class_name = easyblock.split('.')[-1] # figure out if full path was specified or not From a1dfc269ba27e4671e4c30b8fe230f20c2e23041 Mon Sep 17 00:00:00 2001 From: Kenneth Hoste Date: Tue, 26 Jun 2012 09:35:43 +0200 Subject: [PATCH 435/798] fix easyblock being used for Armadillo in example easyconfigs --- .../Armadillo-2.4.4-goalf-1.1.0-no-OFED-Python-2.7.3.eb | 2 -- .../a/Armadillo/Armadillo-2.4.4-ictce-4.0.6-Python-2.7.3.eb | 2 -- 2 files changed, 4 deletions(-) diff --git a/easybuild/easyconfigs/a/Armadillo/Armadillo-2.4.4-goalf-1.1.0-no-OFED-Python-2.7.3.eb b/easybuild/easyconfigs/a/Armadillo/Armadillo-2.4.4-goalf-1.1.0-no-OFED-Python-2.7.3.eb index 7fc9eb124a..7fcb1e00f9 100644 --- a/easybuild/easyconfigs/a/Armadillo/Armadillo-2.4.4-goalf-1.1.0-no-OFED-Python-2.7.3.eb +++ b/easybuild/easyconfigs/a/Armadillo/Armadillo-2.4.4-goalf-1.1.0-no-OFED-Python-2.7.3.eb @@ -1,5 +1,3 @@ -easyblock= "CMake" - name='Armadillo' version='2.4.4' diff --git a/easybuild/easyconfigs/a/Armadillo/Armadillo-2.4.4-ictce-4.0.6-Python-2.7.3.eb b/easybuild/easyconfigs/a/Armadillo/Armadillo-2.4.4-ictce-4.0.6-Python-2.7.3.eb index 0a70d7e762..dea141d6f2 100644 --- a/easybuild/easyconfigs/a/Armadillo/Armadillo-2.4.4-ictce-4.0.6-Python-2.7.3.eb +++ b/easybuild/easyconfigs/a/Armadillo/Armadillo-2.4.4-ictce-4.0.6-Python-2.7.3.eb @@ -1,5 +1,3 @@ -easyblock= "CMake" - name='Armadillo' version='2.4.4' From 0dc8c0ee2f5033c1f826c065d373d877c6c75080 Mon Sep 17 00:00:00 2001 From: Kenneth Hoste Date: Tue, 26 Jun 2012 09:40:43 +0200 Subject: [PATCH 436/798] minor cleanup of DOLFIN example easyconfigs, fix class name (DOLFIN) --- easybuild/easyblocks/d/dolfin.py | 2 +- ...IN-1.0.0-goalf-1.1.0-no-OFED-Python-2.7.3.eb | 9 +++------ .../DOLFIN-1.0.0-ictce-4.0.6-Python-2.7.3.eb | 17 ++++++----------- 3 files changed, 10 insertions(+), 18 deletions(-) diff --git a/easybuild/easyblocks/d/dolfin.py b/easybuild/easyblocks/d/dolfin.py index 869b64b73d..21907da1b3 100644 --- a/easybuild/easyblocks/d/dolfin.py +++ b/easybuild/easyblocks/d/dolfin.py @@ -24,7 +24,7 @@ from easybuild.tools.modules import get_software_root from easybuild.tools.toolkit import get_openmp_flag -class Dolfin(CMakePythonPackage): +class DOLFIN(CMakePythonPackage): """Extension of the CMakePythonPackage for Dolfin. Dolfin needs some environment variables to be set at run time. diff --git a/easybuild/easyconfigs/d/DOLFIN/DOLFIN-1.0.0-goalf-1.1.0-no-OFED-Python-2.7.3.eb b/easybuild/easyconfigs/d/DOLFIN/DOLFIN-1.0.0-goalf-1.1.0-no-OFED-Python-2.7.3.eb index 1de350d060..364bc1d000 100644 --- a/easybuild/easyconfigs/d/DOLFIN/DOLFIN-1.0.0-goalf-1.1.0-no-OFED-Python-2.7.3.eb +++ b/easybuild/easyconfigs/d/DOLFIN/DOLFIN-1.0.0-goalf-1.1.0-no-OFED-Python-2.7.3.eb @@ -1,10 +1,9 @@ name='DOLFIN' version='1.0.0' -easyblock="Dolfin" - homepage='https://launchpad.net/dolfin' -description="DOLFIN is the C++/Python interface of FEniCS, providing a consistent PSE (Problem Solving Environment) for ordinary and partial differential equations." +description="""DOLFIN is the C++/Python interface of FEniCS, providing a consistent PSE +(Problem Solving Environment) for ordinary and partial differential equations.""" toolkit={'name':'goalf','version':'1.1.0-no-OFED'} toolkitopts={'usempi':True, 'packed-groups':False} @@ -25,13 +24,11 @@ builddependencies = [('CMake', '2.8.4')] python_version = '2.7.3' versionsuffix = '-Python-%s' % (python_version) -# some dependencies use dummy toolkit dependencies=[ ('Python', python_version), ('Boost', '1.49.0', versionsuffix ), ('UFC', '2.0.5', versionsuffix), - ('SWIG','2.0.4',versionsuffix),#we need 2.0.4 here, since there are regression in swig - # see https://bugs.launchpad.net/dolfin/+bug/996398 + ('SWIG','2.0.4',versionsuffix), ('FFC', '1.0.0', versionsuffix), ('FIAT', '1.0.0', versionsuffix), ('Instant', '1.0.0', versionsuffix), diff --git a/easybuild/easyconfigs/d/DOLFIN/DOLFIN-1.0.0-ictce-4.0.6-Python-2.7.3.eb b/easybuild/easyconfigs/d/DOLFIN/DOLFIN-1.0.0-ictce-4.0.6-Python-2.7.3.eb index c4f6a1810e..f7a286db93 100644 --- a/easybuild/easyconfigs/d/DOLFIN/DOLFIN-1.0.0-ictce-4.0.6-Python-2.7.3.eb +++ b/easybuild/easyconfigs/d/DOLFIN/DOLFIN-1.0.0-ictce-4.0.6-Python-2.7.3.eb @@ -1,15 +1,12 @@ name='DOLFIN' version='1.0.0' -python_version = '2.7.3' - -easyblock="Dolfin" - homepage='https://launchpad.net/dolfin' -description="DOLFIN is the C++/Python interface of FEniCS, providing a consistent PSE (Problem Solving Environment) for ordinary and partial differential equations." +description="""DOLFIN is the C++/Python interface of FEniCS, providing a consistent PSE +(Problem Solving Environment) for ordinary and partial differential equations.""" toolkit={'name':'ictce','version':'4.0.6'} -toolkitopts={'usempi':True, 'packed-groups':True} +toolkitopts={'usempi':True, 'packed-groups':False} majver = version.split('.') if majver[0] == '0': @@ -24,23 +21,21 @@ patches=['wl_pkg_linkflags.patch'] builddependencies = [('CMake', '2.8.4')] -#packages get installed inside python, so we need to know what python version to use. +python_version = '2.7.3' versionsuffix = '-Python-%s' % (python_version) -# some dependencies use dummy toolkit dependencies=[ ('Python', python_version), ('Boost', '1.49.0', versionsuffix ), ('UFC', '2.0.5', versionsuffix), - ('SWIG','2.0.4',versionsuffix),#we need 2.0.4 here, since there are regression in swig - # see https://bugs.launchpad.net/dolfin/+bug/996398 + ('SWIG','2.0.4',versionsuffix), ('FFC', '1.0.0', versionsuffix), ('FIAT', '1.0.0', versionsuffix), ('Instant', '1.0.0', versionsuffix), ('Viper', '1.0.0', versionsuffix), ('UFL', '1.0.0', versionsuffix), ('SCOTCH', '5.1.12b_esmumps'), - ('Armadillo', '2.4.4', versionsuffix), + ('Armadillo', '2.4.4'), ('ParMETIS', '4.0.2'), ('SuiteSparse', '3.7.0', '-withparmetis'), ('CGAL', '4.0', versionsuffix), From 3b1d29c597e6a45ee4df52ab42198b6e62320350 Mon Sep 17 00:00:00 2001 From: Kenneth Hoste Date: Tue, 26 Jun 2012 09:46:18 +0200 Subject: [PATCH 437/798] minor cosmetic changes to GMP example easyconfig, add example easyconfig for ictce as well --- .../g/GMP/GMP-5.0.5-goalf-1.1.0-no-OFED.eb | 8 ++++++-- .../easyconfigs/g/GMP/GMP-5.0.5-ictce-4.0.6.eb | 18 ++++++++++++++++++ 2 files changed, 24 insertions(+), 2 deletions(-) create mode 100644 easybuild/easyconfigs/g/GMP/GMP-5.0.5-ictce-4.0.6.eb diff --git a/easybuild/easyconfigs/g/GMP/GMP-5.0.5-goalf-1.1.0-no-OFED.eb b/easybuild/easyconfigs/g/GMP/GMP-5.0.5-goalf-1.1.0-no-OFED.eb index c33bf4c966..39d1aee4ba 100644 --- a/easybuild/easyconfigs/g/GMP/GMP-5.0.5-goalf-1.1.0-no-OFED.eb +++ b/easybuild/easyconfigs/g/GMP/GMP-5.0.5-goalf-1.1.0-no-OFED.eb @@ -5,10 +5,14 @@ homepage='http://gmplib.org/' description="""GMP is a free library for arbitrary precision arithmetic, operating on signed integers, rational numbers, and floating point numbers. """ - toolkit={'name':'goalf','version':'1.1.0-no-OFED'} + sources=['%s-%s.tar.bz2'%(name.lower(),version)] sourceURLs = ['http://ftp.gnu.org/gnu/gmp'] runtest='check' -sanityCheckPaths={'dirs':[],'files':['lib/libgmp.so','include/gmp.h']} + +sanityCheckPaths={ + 'files':['lib/libgmp.so','include/gmp.h'], + 'dirs':[] + } diff --git a/easybuild/easyconfigs/g/GMP/GMP-5.0.5-ictce-4.0.6.eb b/easybuild/easyconfigs/g/GMP/GMP-5.0.5-ictce-4.0.6.eb new file mode 100644 index 0000000000..9bafdcdcd4 --- /dev/null +++ b/easybuild/easyconfigs/g/GMP/GMP-5.0.5-ictce-4.0.6.eb @@ -0,0 +1,18 @@ +name='GMP' +version='5.0.5' + +homepage='http://gmplib.org/' +description="""GMP is a free library for arbitrary precision arithmetic, +operating on signed integers, rational numbers, and floating point numbers. """ + +toolkit={'name':'ictce','version':'4.0.6'} + +sources=['%s-%s.tar.bz2'%(name.lower(),version)] +sourceURLs = ['http://ftp.gnu.org/gnu/gmp'] + +runtest='check' + +sanityCheckPaths={ + 'files':['lib/libgmp.so','include/gmp.h'], + 'dirs':[] + } From 7cca19eceda35ddbcb01223541706c9f2109c0ce Mon Sep 17 00:00:00 2001 From: Kenneth Hoste Date: Tue, 26 Jun 2012 09:48:47 +0200 Subject: [PATCH 438/798] minor cosmetic cleanup of example MPFR easyconfig, add example easyconfig for ictce toolkit as well --- .../m/MPFR/MPFR-3.1.0-goalf-1.1.0-no-OFED.eb | 12 +++++++----- .../m/MPFR/MPFR-3.1.0-ictce-4.0.6.eb | 19 +++++++++++++++++++ 2 files changed, 26 insertions(+), 5 deletions(-) create mode 100644 easybuild/easyconfigs/m/MPFR/MPFR-3.1.0-ictce-4.0.6.eb diff --git a/easybuild/easyconfigs/m/MPFR/MPFR-3.1.0-goalf-1.1.0-no-OFED.eb b/easybuild/easyconfigs/m/MPFR/MPFR-3.1.0-goalf-1.1.0-no-OFED.eb index 7d7a3d0334..86f605d0b0 100644 --- a/easybuild/easyconfigs/m/MPFR/MPFR-3.1.0-goalf-1.1.0-no-OFED.eb +++ b/easybuild/easyconfigs/m/MPFR/MPFR-3.1.0-goalf-1.1.0-no-OFED.eb @@ -5,13 +5,15 @@ homepage='http://www.mpfr.org' description="""The MPFR library is a C library for multiple-precision floating-point computations with correct rounding.""" -dependencies=[ - ('GMP','5.0.5'), - ] - toolkit={'name':'goalf','version':'1.1.0-no-OFED'} + sources=['%s-%s.tar.bz2'%(name.lower(),version)] sourceURLs = ['http://www.mpfr.org/mpfr-current/'] +dependencies=[('GMP','5.0.5')] + runtest='check' -sanityCheckPaths={'dirs':[],'files':['lib/libmpfr.so','include/mpfr.h']} +sanityCheckPaths={ + 'files':['lib/libmpfr.so','include/mpfr.h'], + 'dirs':[] + } diff --git a/easybuild/easyconfigs/m/MPFR/MPFR-3.1.0-ictce-4.0.6.eb b/easybuild/easyconfigs/m/MPFR/MPFR-3.1.0-ictce-4.0.6.eb new file mode 100644 index 0000000000..8623b87265 --- /dev/null +++ b/easybuild/easyconfigs/m/MPFR/MPFR-3.1.0-ictce-4.0.6.eb @@ -0,0 +1,19 @@ +name='MPFR' +version='3.1.0' + +homepage='http://www.mpfr.org' +description="""The MPFR library is a C library for multiple-precision +floating-point computations with correct rounding.""" + +toolkit={'name':'ictce','version':'4.0.6'} + +sources=['%s-%s.tar.bz2'%(name.lower(),version)] +sourceURLs = ['http://www.mpfr.org/mpfr-current/'] + +dependencies=[('GMP','5.0.5')] + +runtest='check' +sanityCheckPaths={ + 'files':['lib/libmpfr.so','include/mpfr.h'], + 'dirs':[] + } From ef5f009d30d7f527855132922c70e37582495f9a Mon Sep 17 00:00:00 2001 From: Kenneth Hoste Date: Tue, 26 Jun 2012 10:03:00 +0200 Subject: [PATCH 439/798] minor cleanup of FIAT and ScientificPython example easyconfigs, add example easyconfigs for ictce toolkit --- ...-1.0.0-goalf-1.1.0-no-OFED-Python-2.7.3.eb | 29 +++++++++-------- .../FIAT-1.0.0-ictce-4.0.6-Python-2.7.3.eb | 31 +++++++++++++++++++ ...on-2.8-goalf-1.1.0-no-OFED-Python-2.7.3.eb | 27 ++++++++-------- ...ificPython-2.8-ictce-4.0.6-Python-2.7.3.eb | 27 ++++++++++++++++ 4 files changed, 88 insertions(+), 26 deletions(-) create mode 100644 easybuild/easyconfigs/f/FIAT/FIAT-1.0.0-ictce-4.0.6-Python-2.7.3.eb create mode 100644 easybuild/easyconfigs/s/ScientificPython/ScientificPython-2.8-ictce-4.0.6-Python-2.7.3.eb diff --git a/easybuild/easyconfigs/f/FIAT/FIAT-1.0.0-goalf-1.1.0-no-OFED-Python-2.7.3.eb b/easybuild/easyconfigs/f/FIAT/FIAT-1.0.0-goalf-1.1.0-no-OFED-Python-2.7.3.eb index ea8a5b747b..b69a3a98c0 100644 --- a/easybuild/easyconfigs/f/FIAT/FIAT-1.0.0-goalf-1.1.0-no-OFED-Python-2.7.3.eb +++ b/easybuild/easyconfigs/f/FIAT/FIAT-1.0.0-goalf-1.1.0-no-OFED-Python-2.7.3.eb @@ -1,28 +1,31 @@ +easyblock="PythonPackage" + name='FIAT' version='1.0.0' -easyblock="PythonPackage" homepage='https://launchpad.net/fiat' -description="The FInite element Automatic Tabulator FIAT supports generation of arbitrary order instances of the Lagrange elements on lines, triangles, and tetrahedra. It is also capable of generating arbitrary order instances of Jacobi-type quadrature rules on the same element shapes." +description="""The FInite element Automatic Tabulator FIAT supports generation of arbitrary order +instances of the Lagrange elements on lines, triangles, and tetrahedra. It is also capable of generating +arbitrary order instances of Jacobi-type quadrature rules on the same element shapes.""" -#dummy toolkit, but we want to load dependencies, so empty version toolkit={'name':'dummy','version':''} +toolkitsuffix = "-ictce-4.0.6" + +sources=['%s-%s.tar.gz'%(name.lower(),version)] +majorversion = "%s.x" % ".".join(version.split('.')[:-1]) +sourceURLs=['https://launchpad.net/FIAT/%s/%s/+download/' % (majorversion, version)] pythonversion = '2.7.3' pythonshortversion = ".".join(pythonversion.split(".")[:-1]) -toolkit={'name':'dummy','version':''} -toolkitsuffix = "-goalf-1.1.0-no-OFED" versionsuffix = "%s-Python-%s" % (toolkitsuffix, pythonversion) -#manually add toolkit suffix here, plus True for letting the dependency use it's own toolkit and not the dummy one dependencies=[ - ('Python', pythonversion, toolkitsuffix, True), - ('ScientificPython','2.8', versionsuffix, True), + ('Python', pythonversion, toolkitsuffix, True), + ('ScientificPython','2.8', versionsuffix, True), ] -sources=['%s-%s.tar.gz'%(name.lower(),version)] -majorversion = "%s.x" % ".".join(version.split('.')[:-1]) -sourceURLs=['https://launchpad.net/FIAT/%s/%s/+download/' % (majorversion, version)] - -sanityCheckPaths = {'files': [], 'dirs':['lib/python%s/site-packages/FIAT' % pythonshortversion]} +sanityCheckPaths = { + 'files': [], + 'dirs':['lib/python%s/site-packages/FIAT' % pythonshortversion] + } diff --git a/easybuild/easyconfigs/f/FIAT/FIAT-1.0.0-ictce-4.0.6-Python-2.7.3.eb b/easybuild/easyconfigs/f/FIAT/FIAT-1.0.0-ictce-4.0.6-Python-2.7.3.eb new file mode 100644 index 0000000000..ad690e2952 --- /dev/null +++ b/easybuild/easyconfigs/f/FIAT/FIAT-1.0.0-ictce-4.0.6-Python-2.7.3.eb @@ -0,0 +1,31 @@ +easyblock="PythonPackage" + +name='FIAT' +version='1.0.0' + +homepage='https://launchpad.net/fiat' +description="""The FInite element Automatic Tabulator FIAT supports generation of arbitrary order +instances of the Lagrange elements on lines, triangles, and tetrahedra. It is also capable of generating +arbitrary order instances of Jacobi-type quadrature rules on the same element shapes.""" + +toolkit={'name':'dummy','version':''} +toolkitsuffix = "-goalf-1.1.0-no-OFED" + +sources=['%s-%s.tar.gz'%(name.lower(),version)] +majorversion = "%s.x" % ".".join(version.split('.')[:-1]) +sourceURLs=['https://launchpad.net/FIAT/%s/%s/+download/' % (majorversion, version)] + +pythonversion = '2.7.3' +pythonshortversion = ".".join(pythonversion.split(".")[:-1]) + +versionsuffix = "%s-Python-%s" % (toolkitsuffix, pythonversion) + +dependencies=[ + ('Python', pythonversion, toolkitsuffix, True), + ('ScientificPython','2.8', versionsuffix, True), + ] + +sanityCheckPaths = { + 'files': [], + 'dirs':['lib/python%s/site-packages/FIAT' % pythonshortversion] + } diff --git a/easybuild/easyconfigs/s/ScientificPython/ScientificPython-2.8-goalf-1.1.0-no-OFED-Python-2.7.3.eb b/easybuild/easyconfigs/s/ScientificPython/ScientificPython-2.8-goalf-1.1.0-no-OFED-Python-2.7.3.eb index c00a592253..cc7ef5a6ea 100644 --- a/easybuild/easyconfigs/s/ScientificPython/ScientificPython-2.8-goalf-1.1.0-no-OFED-Python-2.7.3.eb +++ b/easybuild/easyconfigs/s/ScientificPython/ScientificPython-2.8-goalf-1.1.0-no-OFED-Python-2.7.3.eb @@ -1,26 +1,27 @@ +easyblock="PythonPackage" + name='ScientificPython' version='2.8' -easyblock="PythonPackage" - homepage='https://sourcesup.cru.fr/projects/scientific-py/' -description="ScientificPython is a collection of Python modules for scientific computing. It contains support for geometry, mathematical functions, statistics, physical units, IO, visualization, and parallelization." +description="""ScientificPython is a collection of Python modules for scientific computing. +It contains support for geometry, mathematical functions, statistics, physical units, IO, visualization, +and parallelization.""" -#dummy toolkit, but we want to load dependencies, so empty version toolkit={'name':'dummy','version':''} +toolkitsuffix = "-goalf-1.1.0-no-OFED" + +sources=['%s-%s.tar.gz'%(name,version)] +sourceURLs = ['https://sourcesup.renater.fr/frs/download.php/2309'] pythonversion = '2.7.3' pythonshortversion = ".".join(pythonversion.split(".")[:-1]) -toolkitsuffix = "-goalf-1.1.0-no-OFED" versionsuffix = "%s-Python-%s" % (toolkitsuffix, pythonversion) -#manually add toolkit suffix here, plus True for letting the dependency use it's own toolkit and not the dummy one -dependencies=[ - ('Python',pythonversion,toolkitsuffix,True), - ] - -sources=['%s-%s.tar.gz'%(name,version)] -sourceURLs = ['https://sourcesup.renater.fr/frs/download.php/2309'] +dependencies=[('Python',pythonversion,toolkitsuffix,True)] -sanityCheckPaths = {'files': [], 'dirs':['lib/python%s/site-packages/Scientific' % pythonshortversion]} +sanityCheckPaths = { + 'files': [], + 'dirs':['lib/python%s/site-packages/Scientific' % pythonshortversion] + } diff --git a/easybuild/easyconfigs/s/ScientificPython/ScientificPython-2.8-ictce-4.0.6-Python-2.7.3.eb b/easybuild/easyconfigs/s/ScientificPython/ScientificPython-2.8-ictce-4.0.6-Python-2.7.3.eb new file mode 100644 index 0000000000..dd7914dbec --- /dev/null +++ b/easybuild/easyconfigs/s/ScientificPython/ScientificPython-2.8-ictce-4.0.6-Python-2.7.3.eb @@ -0,0 +1,27 @@ +easyblock="PythonPackage" + +name='ScientificPython' +version='2.8' + +homepage='https://sourcesup.cru.fr/projects/scientific-py/' +description="""ScientificPython is a collection of Python modules for scientific computing. +It contains support for geometry, mathematical functions, statistics, physical units, IO, visualization, +and parallelization.""" + +toolkit={'name':'dummy','version':''} +toolkitsuffix = "-ictce-4.0.6" + +sources=['%s-%s.tar.gz'%(name,version)] +sourceURLs = ['https://sourcesup.renater.fr/frs/download.php/2309'] + +pythonversion = '2.7.3' +pythonshortversion = ".".join(pythonversion.split(".")[:-1]) + +versionsuffix = "%s-Python-%s" % (toolkitsuffix, pythonversion) + +dependencies=[('Python',pythonversion,toolkitsuffix,True)] + +sanityCheckPaths = { + 'files': [], + 'dirs':['lib/python%s/site-packages/Scientific' % pythonshortversion] + } From 5ceb5d2f29fe377b4c45424c1b6461dea80b565c Mon Sep 17 00:00:00 2001 From: Kenneth Hoste Date: Tue, 26 Jun 2012 12:13:30 +0200 Subject: [PATCH 440/798] clean up PCRE example easyconfig, add example easyconfig for ictce --- .../p/PCRE/PCRE-8.12-goalf-1.1.0-no-OFED.eb | 5 +---- .../easyconfigs/p/PCRE/PCRE-8.12-ictce-4.0.6.eb | 13 +++++++++++++ 2 files changed, 14 insertions(+), 4 deletions(-) create mode 100644 easybuild/easyconfigs/p/PCRE/PCRE-8.12-ictce-4.0.6.eb diff --git a/easybuild/easyconfigs/p/PCRE/PCRE-8.12-goalf-1.1.0-no-OFED.eb b/easybuild/easyconfigs/p/PCRE/PCRE-8.12-goalf-1.1.0-no-OFED.eb index 91b0f36617..41f40779db 100644 --- a/easybuild/easyconfigs/p/PCRE/PCRE-8.12-goalf-1.1.0-no-OFED.eb +++ b/easybuild/easyconfigs/p/PCRE/PCRE-8.12-goalf-1.1.0-no-OFED.eb @@ -5,12 +5,9 @@ homepage='http://www.pcre.org/' description="The PCRE library is a set of functions that implement regular expression pattern matching using the same syntax and semantics as Perl 5." toolkit={'name':'goalf','version':'1.1.0-no-OFED'} - -toolkitopts={'optarch':True} +toolkitopts={'optarch':True, 'pic':True} configopts="--with-pic --disable-cpp" sources=['%s-%s.tar.gz'%(name.lower(),version)] sourceURLs=['http://prdownloads.sourceforge.net/pcre'] - -moduleclass='lib' diff --git a/easybuild/easyconfigs/p/PCRE/PCRE-8.12-ictce-4.0.6.eb b/easybuild/easyconfigs/p/PCRE/PCRE-8.12-ictce-4.0.6.eb new file mode 100644 index 0000000000..4c94e1c08f --- /dev/null +++ b/easybuild/easyconfigs/p/PCRE/PCRE-8.12-ictce-4.0.6.eb @@ -0,0 +1,13 @@ +name='PCRE' +version='8.12' + +homepage='http://www.pcre.org/' +description="The PCRE library is a set of functions that implement regular expression pattern matching using the same syntax and semantics as Perl 5." + +toolkit={'name':'ictce','version':'4.0.6'} +toolkitopts={'optarch':True, 'pic':True} + +configopts="--with-pic --disable-cpp" + +sources=['%s-%s.tar.gz'%(name.lower(),version)] +sourceURLs=['http://prdownloads.sourceforge.net/pcre'] From 7ea2eda0b81f23af26f390c661fb02df68aabc8c Mon Sep 17 00:00:00 2001 From: Kenneth Hoste Date: Tue, 26 Jun 2012 13:17:11 +0200 Subject: [PATCH 441/798] implement easyblock for SWIG, clean up SWIG example easyconfig, add example easyconfig for ictce --- easybuild/easyblocks/s/swig.py | 55 +++++++++++++++++++ ...-2.0.4-goalf-1.1.0-no-OFED-Python-2.7.3.eb | 40 ++------------ .../SWIG-2.0.4-ictce-4.0.6-Python-2.7.3.eb | 20 +++++++ 3 files changed, 81 insertions(+), 34 deletions(-) create mode 100644 easybuild/easyblocks/s/swig.py create mode 100644 easybuild/easyconfigs/s/SWIG/SWIG-2.0.4-ictce-4.0.6-Python-2.7.3.eb diff --git a/easybuild/easyblocks/s/swig.py b/easybuild/easyblocks/s/swig.py new file mode 100644 index 0000000000..fa434fc46b --- /dev/null +++ b/easybuild/easyblocks/s/swig.py @@ -0,0 +1,55 @@ +# Copyright 2012 Kenneth Hoste +# +# This file is part of EasyBuild, +# originally created by the HPC team of the University of Ghent (http://ugent.be/hpc). +# +# http://github.com/hpcugent/easybuild +# +# EasyBuild is free software: you can redistribute it and/or modify +# it under the terms of the GNU General Public License as published by +# the Free Software Foundation v2. +# +# EasyBuild is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with EasyBuild. If not, see . +## +import os +from easybuild.framework.application import Application + +class SWIG(Application): + """Support for building SWIG.""" + + def configure(self): + """Set some extra environment variables before configuring.""" + + # disable everything by default + for x in ["r", "clisp", "allegrocl", "lua", "csharp", "chicken", "pike ", + "ocaml","php", "ruby", "mzscheme", "guile", "gcj", "java", + "octave", "perl5", "python3", "tcl"]: + self.updatecfg('configopts', "--without-%s" % x) + + python = os.getenv('SOFTROOTPYTHON') + if python: + self.updatecfg('configopts', "--with-python=%s/bin/python" % python) + else: + self.log.error("Python module not loaded?") + + Application.configure(self) + + def sanitycheck(self): + """Custom sanity check for SWIG.""" + + if not self.getcfg('sanityCheckPaths'): + + self.setcfg('sanityCheckPaths', { + 'files':["bin/ccache-swig","bin/swig"], + 'dirs':[] + }) + + self.log.info("Customized sanity check paths: %s" % self.getcfg('sanityCheckPaths')) + + Application.sanitycheck(self) \ No newline at end of file diff --git a/easybuild/easyconfigs/s/SWIG/SWIG-2.0.4-goalf-1.1.0-no-OFED-Python-2.7.3.eb b/easybuild/easyconfigs/s/SWIG/SWIG-2.0.4-goalf-1.1.0-no-OFED-Python-2.7.3.eb index f999cc2911..a7acde2db3 100644 --- a/easybuild/easyconfigs/s/SWIG/SWIG-2.0.4-goalf-1.1.0-no-OFED-Python-2.7.3.eb +++ b/easybuild/easyconfigs/s/SWIG/SWIG-2.0.4-goalf-1.1.0-no-OFED-Python-2.7.3.eb @@ -2,47 +2,19 @@ name='SWIG' version='2.0.4' homepage='http://www.swig.org/' -description="SWIG is a software development tool that connects programs written in C and C++ with a variety of high-level programming languages." +description="""SWIG is a software development tool that connects programs written in C and C++ with +a variety of high-level programming languages.""" toolkit={'name':'goalf','version':'1.1.0-no-OFED'} toolkitopts={'pic':True,'opt':True,'optarch':True} sources=['%s-%s.tar.gz'%(name.lower(),version)] sourceURLs = ['http://prdownloads.sourceforge.net/swig'] + pythonversion='2.7.3' versionsuffix='-Python-%s'%pythonversion + dependencies=[ - ('Python', pythonversion), - ('PCRE','8.12'), + ('Python', pythonversion), + ('PCRE','8.12'), ] - -configopts=" " - -## disable all -configopts+="--without-r " -configopts+="--without-clisp " -configopts+="--without-allegrocl " -configopts+="--without-lua " -configopts+="--without-csharp " -configopts+="--without-chicken " -configopts+="--without-pike " -configopts+="--without-ocaml " -configopts+="--without-php " -configopts+="--without-ruby " -configopts+="--without-mzscheme " -configopts+="--without-guile " -configopts+="--without-gcj " -configopts+="--without-java " -configopts+="--without-octave " -configopts+="--without-perl5 " -configopts+="--without-python3 " -configopts+="--without-tcl " - -configopts+="--with-python=$SOFTROOTPYTHON/bin/python " - -moduleclass='base' - -sanityCheckPaths={ - 'files':["bin/ccache-swig","bin/swig"], - 'dirs':[] - } diff --git a/easybuild/easyconfigs/s/SWIG/SWIG-2.0.4-ictce-4.0.6-Python-2.7.3.eb b/easybuild/easyconfigs/s/SWIG/SWIG-2.0.4-ictce-4.0.6-Python-2.7.3.eb new file mode 100644 index 0000000000..c946caa27c --- /dev/null +++ b/easybuild/easyconfigs/s/SWIG/SWIG-2.0.4-ictce-4.0.6-Python-2.7.3.eb @@ -0,0 +1,20 @@ +name='SWIG' +version='2.0.4' + +homepage='http://www.swig.org/' +description="""SWIG is a software development tool that connects programs written in C and C++ with +a variety of high-level programming languages.""" + +toolkit={'name':'ictce','version':'4.0.6'} +toolkitopts={'pic':True,'opt':True,'optarch':True} + +sources=['%s-%s.tar.gz'%(name.lower(),version)] +sourceURLs = ['http://prdownloads.sourceforge.net/swig'] + +pythonversion='2.7.3' +versionsuffix='-Python-%s'%pythonversion + +dependencies=[ + ('Python', pythonversion), + ('PCRE','8.12'), + ] From ad34b4af2bd66fabe66be23610f033ed68c22be7 Mon Sep 17 00:00:00 2001 From: Kenneth Hoste Date: Tue, 26 Jun 2012 13:17:55 +0200 Subject: [PATCH 442/798] clean up Instant example easyconfig, add example easyconfig for ictce --- ...-1.0.0-goalf-1.1.0-no-OFED-Python-2.7.3.eb | 28 ++++++++--------- .../Instant-1.0.0-ictce-4.0.6-Python-2.7.3.eb | 30 +++++++++++++++++++ 2 files changed, 44 insertions(+), 14 deletions(-) create mode 100644 easybuild/easyconfigs/i/Instant/Instant-1.0.0-ictce-4.0.6-Python-2.7.3.eb diff --git a/easybuild/easyconfigs/i/Instant/Instant-1.0.0-goalf-1.1.0-no-OFED-Python-2.7.3.eb b/easybuild/easyconfigs/i/Instant/Instant-1.0.0-goalf-1.1.0-no-OFED-Python-2.7.3.eb index 5680eabd61..2704d371f9 100644 --- a/easybuild/easyconfigs/i/Instant/Instant-1.0.0-goalf-1.1.0-no-OFED-Python-2.7.3.eb +++ b/easybuild/easyconfigs/i/Instant/Instant-1.0.0-goalf-1.1.0-no-OFED-Python-2.7.3.eb @@ -1,30 +1,30 @@ +easyblock="PythonPackage" + name='Instant' version='1.0.0' -easyblock="PythonPackage" - homepage='https://launchpad.net/instant' description="Instant is a Python module that allows for instant inlining of C and C++ code in Python. It is a small Python module built on top of SWIG and Distutils. It is part of the FEniCS Project (http://fenicsproject.org)." #dummy toolkit, but we want to load dependencies, so empty version toolkit={'name':'dummy','version':''} +toolkitversion = '-goalf-1.1.0-no-OFED' + +sources=['%s-%s.tar.gz'%(name.lower(),version)] +majorversion = "%s.x" % ".".join(version.split('.')[:-1]) +sourceURLs=['https://launchpad.net/instant/%s/%s/+download/' % (majorversion, version)] pythonversion = '2.7.3' pythonshortversion = ".".join(pythonversion.split(".")[:-1]) -toolkitversion = '-goalf-1.1.0-no-OFED' + versionsuffix = '%s-Python-%s' % (toolkitversion, pythonversion) -#manually add toolkit suffix here, plus True for letting the dependency use it's own toolkit and not the dummy one dependencies=[ - ('Python',pythonversion,toolkitversion,True), - ('SWIG','2.0.4',versionsuffix,True),#we need 2.0.4 here, since there are regression in swig - # see https://bugs.launchpad.net/dolfin/+bug/996398 - + ('Python',pythonversion,toolkitversion,True), + ('SWIG','2.0.4',versionsuffix,True), ] -sources=['%s-%s.tar.gz'%(name.lower(),version)] -majorversion = "%s.x" % ".".join(version.split('.')[:-1]) - -sourceURLs=['https://launchpad.net/instant/%s/%s/+download/' % (majorversion, version)] - -sanityCheckPaths = {'files': ['bin/'], 'dirs':['lib/python%s/site-packages/instant' % pythonshortversion]} +sanityCheckPaths = { + 'files': ['bin/'], + 'dirs':['lib/python%s/site-packages/instant' % pythonshortversion] + } diff --git a/easybuild/easyconfigs/i/Instant/Instant-1.0.0-ictce-4.0.6-Python-2.7.3.eb b/easybuild/easyconfigs/i/Instant/Instant-1.0.0-ictce-4.0.6-Python-2.7.3.eb new file mode 100644 index 0000000000..0592dbd935 --- /dev/null +++ b/easybuild/easyconfigs/i/Instant/Instant-1.0.0-ictce-4.0.6-Python-2.7.3.eb @@ -0,0 +1,30 @@ +easyblock="PythonPackage" + +name='Instant' +version='1.0.0' + +homepage='https://launchpad.net/instant' +description="Instant is a Python module that allows for instant inlining of C and C++ code in Python. It is a small Python module built on top of SWIG and Distutils. It is part of the FEniCS Project (http://fenicsproject.org)." + +#dummy toolkit, but we want to load dependencies, so empty version +toolkit={'name':'dummy','version':''} +toolkitversion = '-ictce-4.0.6' + +sources=['%s-%s.tar.gz'%(name.lower(),version)] +majorversion = "%s.x" % ".".join(version.split('.')[:-1]) +sourceURLs=['https://launchpad.net/instant/%s/%s/+download/' % (majorversion, version)] + +pythonversion = '2.7.3' +pythonshortversion = ".".join(pythonversion.split(".")[:-1]) + +versionsuffix = '%s-Python-%s' % (toolkitversion, pythonversion) + +dependencies=[ + ('Python',pythonversion,toolkitversion,True), + ('SWIG','2.0.4',versionsuffix,True), + ] + +sanityCheckPaths = { + 'files': ['bin/'], + 'dirs':['lib/python%s/site-packages/instant' % pythonshortversion] + } From f2d1ff88ce674585afc821f195087393c0030b55 Mon Sep 17 00:00:00 2001 From: Kenneth Hoste Date: Tue, 26 Jun 2012 13:18:48 +0200 Subject: [PATCH 443/798] implement UFC easyblock, clean up UFC example easyconfig, add example easyconfig for ictce --- easybuild/easyblocks/u/ufc.py | 74 +++++++++++++++++++ ...-2.0.5-goalf-1.1.0-no-OFED-Python-2.7.3.eb | 34 +++------ .../UFC/UFC-2.0.5-ictce-4.0.6-Python-2.7.3.eb | 25 +++++++ 3 files changed, 109 insertions(+), 24 deletions(-) create mode 100644 easybuild/easyblocks/u/ufc.py create mode 100644 easybuild/easyconfigs/u/UFC/UFC-2.0.5-ictce-4.0.6-Python-2.7.3.eb diff --git a/easybuild/easyblocks/u/ufc.py b/easybuild/easyblocks/u/ufc.py new file mode 100644 index 0000000000..d9b7f42c05 --- /dev/null +++ b/easybuild/easyblocks/u/ufc.py @@ -0,0 +1,74 @@ +# Copyright 2012 Kenneth Hoste +# +# This file is part of EasyBuild, +# originally created by the HPC team of the University of Ghent (http://ugent.be/hpc). +# +# http://github.com/hpcugent/easybuild +# +# EasyBuild is free software: you can redistribute it and/or modify +# it under the terms of the GNU General Public License as published by +# the Free Software Foundation v2. +# +# EasyBuild is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with EasyBuild. If not, see . +## +from distutils.version import LooseVersion +import os +from easybuild.easyblocks.c.cmakepythonpackage import CMakePythonPackage +from easybuild.tools.modules import get_software_root + +class UFC(CMakePythonPackage): + """Support for building UFC.""" + + def configure(self): + """Set some extra environment variables before configuring.""" + + # make sure that required dependencies are loaded + deps = ['Boost', 'Python', 'SWIG'] + depsdict = {} + for dep in deps: + deproot = get_software_root(dep) + if not deproot: + self.log.error("Dependency %s not available." % dep) + else: + depsdict.update({dep:deproot}) + + # SWIG version more recent than 2.0.4 have a regression + # which causes problems with DOLFIN if UFC was built with it + # fixed in 2.0.7? see https://bugs.launchpad.net/dolfin/+bug/996398 + if LooseVersion(os.environ['SOFTVERSIONSWIG']) > '2.0.4': + self.log.error("Using bad version of SWIG, expecting swig <= 2.0.4." \ + " See https://bugs.launchpad.net/dolfin/+bug/996398") + + self.pyver = ".".join(os.getenv('SOFTVERSIONPYTHON').split(".")[:-1]) + + self.updatecfg('configopts', "-DBoost_DIR=%s" % depsdict['Boost']) + self.updatecfg('configopts', "-DBOOST_INCLUDEDIR=%s/include" % depsdict['Boost']) + self.updatecfg('configopts', "-DBoost_DEBUG=ON -DBOOST_ROOT=%s" % depsdict['Boost']) + + self.updatecfg('configopts', '-DUFC_ENABLE_PYTHON:BOOL=ON -DSWIG_FOUND:BOOL=ON') + self.updatecfg('configopts', '-DPYTHON_LIBRARY=%s/lib/libpython%s.so' % (depsdict['Python'], + self.pyver)) + self.updatecfg('configopts', '-DPYTHON_INCLUDE_PATH=%s/include/python%s' % (depsdict['Python'], + self.pyver)) + + CMakePythonPackage.configure(self) + + def sanitycheck(self): + """Custom sanity check for UFC.""" + + if not self.getcfg('sanityCheckPaths'): + + self.setcfg('sanityCheckPaths', { + 'files': ['include/ufc.h'], + 'dirs':['lib/python%s/site-packages/ufc_utils/' % self.pyver] + }) + + self.log.info("Customized sanity check paths: %s" % self.getcfg('sanityCheckPaths')) + + CMakePythonPackage.sanitycheck(self) \ No newline at end of file diff --git a/easybuild/easyconfigs/u/UFC/UFC-2.0.5-goalf-1.1.0-no-OFED-Python-2.7.3.eb b/easybuild/easyconfigs/u/UFC/UFC-2.0.5-goalf-1.1.0-no-OFED-Python-2.7.3.eb index 8b44a8f699..a48c0cf2c0 100644 --- a/easybuild/easyconfigs/u/UFC/UFC-2.0.5-goalf-1.1.0-no-OFED-Python-2.7.3.eb +++ b/easybuild/easyconfigs/u/UFC/UFC-2.0.5-goalf-1.1.0-no-OFED-Python-2.7.3.eb @@ -1,39 +1,25 @@ name='UFC' version='2.0.5' -easyblock="CMakePythonPackage" +homepage='https://launchpad.net/ufc' +description="""UFC (Unified Form-assembly Code) is a unified framework for finite element assembly. +More precisely, it defines a fixed interface for communicating low level routines (functions) for +evaluating and assembling finite element variational forms.""" -majorversion = "%s.x" % ".".join(version.split('.')[:-1]) +toolkit={'name':'goalf','version':'1.1.0-no-OFED'} -homepage='https://launchpad.net/ufc' +sources=['%s-%s.tar.gz'%(name.lower(),version)] +majorversion = "%s.x" % ".".join(version.split('.')[:-1]) sourceURLs=['https://launchpad.net/ufc/%s/%s/+download/' % (majorversion, version) ] -description="UFC (Unified Form-assembly Code) is a unified framework for finite element assembly. More precisely, it defines a fixed interface for communicating low level routines (functions) for evaluating and assembling finite element variational forms." - -#dummy toolkit, but we want to load dependencies, so empty version -toolkit={'name':'goalf','version':'1.1.0-no-OFED'} -builddependencies = [ - ('CMake','2.8.4'), - ] pythonversion = '2.7.3' -pythonshortversion = ".".join(pythonversion.split(".")[:-1]) versionsuffix = "-Python-%s" % pythonversion -#manually add toolkit suffix here, plus True for letting the dependency use it's own toolkit and not the dummy one dependencies=[ - ('Python',versionsuffix), + ('Python',pythonversion), ('Boost','1.49.0',versionsuffix), ('Instant','1.0.0', versionsuffix), - ('SWIG','2.0.4',versionsuffix),#we need 2.0.4 here, since there are regression in swig - # see https://bugs.launchpad.net/dolfin/+bug/996398 + ('SWIG','2.0.4',versionsuffix), ] -sources=['%s-%s.tar.gz'%(name.lower(),version)] - -sanityCheckPaths = {'files': ['include/ufc.h'], 'dirs':['lib/python%s/site-packages/ufc_utils/' % pythonshortversion]} - -#extra options for cmake -configopts=" -DBoost_DIR=$SOFTROOTBOOST -DBOOST_INCLUDEDIR=$SOFTROOTBOOST/include -DBoost_DEBUG=ON -DBOOST_ROOT=$SOFTROOTBOOST" -configopts+=" -DUFC_ENABLE_PYTHON:BOOL=ON -DSWIG_FOUND:BOOL=ON -DPYTHON_LIBRARY=$SOFTROOTPYTHON/lib/libpython%s.so"%pythonshortversion -configopts+=" -DPYTHON_INCLUDE_PATH=$SOFTROOTPYTHON/include/python%s"%pythonshortversion - +builddependencies = [('CMake','2.8.4')] diff --git a/easybuild/easyconfigs/u/UFC/UFC-2.0.5-ictce-4.0.6-Python-2.7.3.eb b/easybuild/easyconfigs/u/UFC/UFC-2.0.5-ictce-4.0.6-Python-2.7.3.eb new file mode 100644 index 0000000000..f0a14ff34c --- /dev/null +++ b/easybuild/easyconfigs/u/UFC/UFC-2.0.5-ictce-4.0.6-Python-2.7.3.eb @@ -0,0 +1,25 @@ +name='UFC' +version='2.0.5' + +homepage='https://launchpad.net/ufc' +description="""UFC (Unified Form-assembly Code) is a unified framework for finite element assembly. +More precisely, it defines a fixed interface for communicating low level routines (functions) for +evaluating and assembling finite element variational forms.""" + +toolkit={'name':'ictce','version':'4.0.6'} + +sources=['%s-%s.tar.gz'%(name.lower(),version)] +majorversion = "%s.x" % ".".join(version.split('.')[:-1]) +sourceURLs=['https://launchpad.net/ufc/%s/%s/+download/' % (majorversion, version) ] + +pythonversion = '2.7.3' +versionsuffix = "-Python-%s" % pythonversion + +dependencies=[ + ('Python',pythonversion), + ('Boost','1.49.0',versionsuffix), + ('Instant','1.0.0', versionsuffix), + ('SWIG','2.0.4',versionsuffix), + ] + +builddependencies = [('CMake','2.8.4')] From 6346755480ee5fabfca1ee2401b501b094c24d7f Mon Sep 17 00:00:00 2001 From: Kenneth Hoste Date: Tue, 26 Jun 2012 13:19:03 +0200 Subject: [PATCH 444/798] fix sanity check for CGAL --- easybuild/easyblocks/c/cgal.py | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/easybuild/easyblocks/c/cgal.py b/easybuild/easyblocks/c/cgal.py index a3101a5fd0..74f6d1e32f 100644 --- a/easybuild/easyblocks/c/cgal.py +++ b/easybuild/easyblocks/c/cgal.py @@ -45,8 +45,10 @@ def sanitycheck(self): if not self.getcfg('sanityCheckPaths'): - self.setcfg('sanityCheckPaths', {'files': ['THIS_WILL_FAIL'], - 'dirs':['THIS_WILL_FAIL_TOO']}) + self.setcfg('sanityCheckPaths', {'files': ['bin/cgal_%s' % x for x in ["create_cmake_script", + "make_macosx_app"]] + + ['lib/libCGAL%s.so' % x for x in ["", "_Core"]], + 'dirs':['include/CGAL', 'lib/CGAL']}) self.log.info("Customized sanity check paths: %s" % self.getcfg('sanityCheckPaths')) From 0c0f0febb7170f0fba26ad23e5cbb3aac92d920f Mon Sep 17 00:00:00 2001 From: Kenneth Hoste Date: Tue, 26 Jun 2012 13:26:18 +0200 Subject: [PATCH 445/798] clean up Viper example easyconfig, add example easyconfig for ictce --- ...-1.0.0-goalf-1.1.0-no-OFED-Python-2.7.3.eb | 29 +++++++++---------- .../Viper-1.0.0-ictce-4.0.6-Python-2.7.3.eb | 27 +++++++++++++++++ 2 files changed, 41 insertions(+), 15 deletions(-) create mode 100644 easybuild/easyconfigs/v/Viper/Viper-1.0.0-ictce-4.0.6-Python-2.7.3.eb diff --git a/easybuild/easyconfigs/v/Viper/Viper-1.0.0-goalf-1.1.0-no-OFED-Python-2.7.3.eb b/easybuild/easyconfigs/v/Viper/Viper-1.0.0-goalf-1.1.0-no-OFED-Python-2.7.3.eb index 704dfbba9f..0827aa7a3c 100644 --- a/easybuild/easyconfigs/v/Viper/Viper-1.0.0-goalf-1.1.0-no-OFED-Python-2.7.3.eb +++ b/easybuild/easyconfigs/v/Viper/Viper-1.0.0-goalf-1.1.0-no-OFED-Python-2.7.3.eb @@ -1,28 +1,27 @@ +easyblock="PythonPackage" + name='Viper' version='1.0.0' -easyblock="PythonPackage" homepage='https://launchpad.net/fenics-viper' -description="Viper is a minimalistic scientific plotter and run-time visualization module. Viper has support for visualizing meshes and solutions in DOLFIN." +description="""Viper is a minimalistic scientific plotter and run-time visualization module. +Viper has support for visualizing meshes and solutions in DOLFIN.""" -#dummy toolkit, but we want to load dependencies, so empty version toolkit={'name':'dummy','version':''} - -pythonversion = '2.7.3' -pythonshortversion = ".".join(pythonversion.split(".")[:-1]) - toolkitsuffix = "-goalf-1.1.0-no-OFED" -versionsuffix = "%s-Python-%s" % (toolkitsuffix, pythonversion) - -#manually add toolkit suffix here, plus True for letting the dependency use it's own toolkit and not the dummy one -dependencies=[ - ('Python',pythonversion,toolkitsuffix,True), - ] sources=['%s-%s.tar.gz'%(name.lower(),version)] - majorversion = "%s.x" % ".".join(version.split('.')[:-1]) sourceURLs=['https://launchpad.net/fenics-viper/%s/%s/+download/' % (majorversion, version)] +pythonversion = '2.7.3' +pythonshortversion = ".".join(pythonversion.split(".")[:-1]) + +versionsuffix = "%s-Python-%s" % (toolkitsuffix, pythonversion) + +dependencies=[('Python',pythonversion,toolkitsuffix,True)] -sanityCheckPaths = {'files': ['bin/'], 'dirs':['lib/python%s/site-packages/viper' % pythonshortversion]} +sanityCheckPaths = { + 'files': ['bin/'], + 'dirs':['lib/python%s/site-packages/viper' % pythonshortversion] + } diff --git a/easybuild/easyconfigs/v/Viper/Viper-1.0.0-ictce-4.0.6-Python-2.7.3.eb b/easybuild/easyconfigs/v/Viper/Viper-1.0.0-ictce-4.0.6-Python-2.7.3.eb new file mode 100644 index 0000000000..a8716a7dcb --- /dev/null +++ b/easybuild/easyconfigs/v/Viper/Viper-1.0.0-ictce-4.0.6-Python-2.7.3.eb @@ -0,0 +1,27 @@ +easyblock="PythonPackage" + +name='Viper' +version='1.0.0' + +homepage='https://launchpad.net/fenics-viper' +description="""Viper is a minimalistic scientific plotter and run-time visualization module. +Viper has support for visualizing meshes and solutions in DOLFIN.""" + +toolkit={'name':'dummy','version':''} +toolkitsuffix = "-ictce-4.0.6" + +sources=['%s-%s.tar.gz'%(name.lower(),version)] +majorversion = "%s.x" % ".".join(version.split('.')[:-1]) +sourceURLs=['https://launchpad.net/fenics-viper/%s/%s/+download/' % (majorversion, version)] + +pythonversion = '2.7.3' +pythonshortversion = ".".join(pythonversion.split(".")[:-1]) + +versionsuffix = "%s-Python-%s" % (toolkitsuffix, pythonversion) + +dependencies=[('Python',pythonversion,toolkitsuffix,True)] + +sanityCheckPaths = { + 'files': ['bin/'], + 'dirs':['lib/python%s/site-packages/viper' % pythonshortversion] + } From 3a4f6993cc96e25c08900dbffcad5f3584da691d Mon Sep 17 00:00:00 2001 From: Kenneth Hoste Date: Tue, 26 Jun 2012 13:26:39 +0200 Subject: [PATCH 446/798] clean up UFL example easyconfig, add example easyconfig for ictce --- ...-1.0.0-goalf-1.1.0-no-OFED-Python-2.7.3.eb | 25 +++++++++++-------- .../UFL/UFL-1.0.0-ictce-4.0.6-Python-2.7.3.eb | 24 ++++++++++++++++++ 2 files changed, 38 insertions(+), 11 deletions(-) create mode 100644 easybuild/easyconfigs/u/UFL/UFL-1.0.0-ictce-4.0.6-Python-2.7.3.eb diff --git a/easybuild/easyconfigs/u/UFL/UFL-1.0.0-goalf-1.1.0-no-OFED-Python-2.7.3.eb b/easybuild/easyconfigs/u/UFL/UFL-1.0.0-goalf-1.1.0-no-OFED-Python-2.7.3.eb index 8dc7bf6547..eb3c1105c6 100644 --- a/easybuild/easyconfigs/u/UFL/UFL-1.0.0-goalf-1.1.0-no-OFED-Python-2.7.3.eb +++ b/easybuild/easyconfigs/u/UFL/UFL-1.0.0-goalf-1.1.0-no-OFED-Python-2.7.3.eb @@ -1,23 +1,26 @@ +easyblock="PythonPackage" + name='UFL' version='1.0.0' -easyblock="PythonPackage" homepage='https://launchpad.net/ufl' description="The Unified Form Language (UFL) is a domain specific language for declaration of finite element discretizations of variational forms. More precisely, it defines a flexible interface for choosing finite element spaces and defining expressions for weak forms in a notation close to mathematical notation." -#dummy toolkit, but we want to load dependencies, so empty version toolkit={'name':'dummy','version':''} -pythonversion = '2.7.3' toolkitsuffix = "-goalf-1.1.0-no-OFED" -versionsuffix = "%s-Python-%s" % (toolkitsuffix, pythonversion) - - - -#manually add toolkit suffix here, plus True for letting the dependency use it's own toolkit and not the dummy one -dependencies=[ - ('Python',pythonversion,toolkitsuffix,True), - ] sources=['%s-%s.tar.gz'%(name.lower(),version)] majorversion = "%s.x" % ".".join(version.split('.')[:-1]) sourceURLs=['https://launchpad.net/UFL/%s/%s/+download/' % (majorversion, version)] + +pythonversion = '2.7.3' +pythonshortversion = ".".join(pythonversion.split(".")[:-1]) + +versionsuffix = "%s-Python-%s" % (toolkitsuffix, pythonversion) + +dependencies=[('Python',pythonversion,toolkitsuffix,True)] + +sanityCheckPaths = { + 'files': ['bin/%s' % x for x in ["form2ufl","ufl2py","ufl-analyse","ufl-convert","ufl-version"]], + 'dirs':['lib/python%s/site-packages/ufl' % pythonshortversion] + } diff --git a/easybuild/easyconfigs/u/UFL/UFL-1.0.0-ictce-4.0.6-Python-2.7.3.eb b/easybuild/easyconfigs/u/UFL/UFL-1.0.0-ictce-4.0.6-Python-2.7.3.eb new file mode 100644 index 0000000000..097136fd81 --- /dev/null +++ b/easybuild/easyconfigs/u/UFL/UFL-1.0.0-ictce-4.0.6-Python-2.7.3.eb @@ -0,0 +1,24 @@ +easyblock="PythonPackage" + +name='UFL' +version='1.0.0' + +homepage='https://launchpad.net/ufl' +description="The Unified Form Language (UFL) is a domain specific language for declaration of finite element discretizations of variational forms. More precisely, it defines a flexible interface for choosing finite element spaces and defining expressions for weak forms in a notation close to mathematical notation." + +toolkit={'name':'dummy','version':''} +toolkitsuffix = "-ictce-4.0.6" + +sources=['%s-%s.tar.gz'%(name.lower(),version)] +majorversion = "%s.x" % ".".join(version.split('.')[:-1]) +sourceURLs=['https://launchpad.net/UFL/%s/%s/+download/' % (majorversion, version)] + +pythonversion = '2.7.3' +versionsuffix = "%s-Python-%s" % (toolkitsuffix, pythonversion) + +dependencies=[('Python',pythonversion,toolkitsuffix,True)] + +sanityCheckPaths = { + 'files': ['bin/%s' % x for x in ["form2ufl","ufl2py","ufl-analyse","ufl-convert","ufl-version"]], + 'dirs':['lib/python%s/site-packages/ufl' % pythonshortversion] + } From eeaa0a854007006643f032ae406bc5e33e5afd90 Mon Sep 17 00:00:00 2001 From: Kenneth Hoste Date: Tue, 26 Jun 2012 13:26:58 +0200 Subject: [PATCH 447/798] clean up FFC example easyconfig, add example easyconfig for ictce --- ...-1.0.0-goalf-1.1.0-no-OFED-Python-2.7.3.eb | 27 +++++++-------- .../FFC/FFC-1.0.0-ictce-4.0.6-Python-2.7.3.eb | 33 +++++++++++++++++++ 2 files changed, 47 insertions(+), 13 deletions(-) create mode 100644 easybuild/easyconfigs/f/FFC/FFC-1.0.0-ictce-4.0.6-Python-2.7.3.eb diff --git a/easybuild/easyconfigs/f/FFC/FFC-1.0.0-goalf-1.1.0-no-OFED-Python-2.7.3.eb b/easybuild/easyconfigs/f/FFC/FFC-1.0.0-goalf-1.1.0-no-OFED-Python-2.7.3.eb index ddcb7f8cab..fb1af9f6fe 100644 --- a/easybuild/easyconfigs/f/FFC/FFC-1.0.0-goalf-1.1.0-no-OFED-Python-2.7.3.eb +++ b/easybuild/easyconfigs/f/FFC/FFC-1.0.0-goalf-1.1.0-no-OFED-Python-2.7.3.eb @@ -1,22 +1,25 @@ +easyblock="PythonPackage" + name='FFC' version='1.0.0' -easyblock="PythonPackage" - homepage='https://launchpad.net/ffc' -description="FEniCS Form Compiler (FFC) works as a compiler for multilinear forms by generating code (C++) for the evaluation of a multilinear form given in mathematical notation." +description="""FEniCS Form Compiler (FFC) works as a compiler for multilinear forms by generating +code (C++) for the evaluation of a multilinear form given in mathematical notation.""" +toolkit={'name':'dummy','version':''} +toolkitsuffix = "-goalf-1.1.0-no-OFED" + +sources=['%s-%s.tar.gz'%(name.lower(),version)] +majorversion = "%s.x" % ".".join(version.split('.')[:-1]) +sourceURLs=['https://launchpad.net/FFC/%s/%s/+download/' % (majorversion, version)] pythonversion = '2.7.3' pythonshortversion = ".".join(pythonversion.split(".")[:-1]) -#dummy toolkit, but we want to load dependencies, so empty version -toolkit={'name':'dummy','version':''} -toolkitsuffix = "-goalf-1.1.0-no-OFED" pythonsuffix = "-Python-%s" % pythonversion versionsuffix = "%s%s" % (toolkitsuffix, pythonsuffix) -#manually add toolkit suffix here, plus True for letting the dependency use it's own toolkit and not the dummy one dependencies=[ ('Python', pythonversion, toolkitsuffix, True), ('UFL', '1.0.0', versionsuffix, True), @@ -25,9 +28,7 @@ dependencies=[ ('Viper', '1.0.0', versionsuffix, True), ] -sources=['%s-%s.tar.gz'%(name.lower(),version)] -majorversion = "%s.x" % ".".join(version.split('.')[:-1]) -sourceURLs=['https://launchpad.net/FFC/%s/%s/+download/' % (majorversion, version)] - - -sanityCheckPaths = {'files': ['bin/ffc'], 'dirs':['lib/python%s/site-packages/ffc' % pythonshortversion]} +sanityCheckPaths = { + 'files': ['bin/ffc'], + 'dirs':['lib/python%s/site-packages/ffc' % pythonshortversion] + } diff --git a/easybuild/easyconfigs/f/FFC/FFC-1.0.0-ictce-4.0.6-Python-2.7.3.eb b/easybuild/easyconfigs/f/FFC/FFC-1.0.0-ictce-4.0.6-Python-2.7.3.eb new file mode 100644 index 0000000000..8a697edd08 --- /dev/null +++ b/easybuild/easyconfigs/f/FFC/FFC-1.0.0-ictce-4.0.6-Python-2.7.3.eb @@ -0,0 +1,33 @@ +easyblock="PythonPackage" + +name='FFC' +version='1.0.0' + +homepage='https://launchpad.net/ffc' +description="FEniCS Form Compiler (FFC) works as a compiler for multilinear forms by generating code (C++) for the evaluation of a multilinear form given in mathematical notation." + +toolkit={'name':'dummy','version':''} +toolkitsuffix = "-goalf-1.1.0-no-OFED" + +sources=['%s-%s.tar.gz'%(name.lower(),version)] +majorversion = "%s.x" % ".".join(version.split('.')[:-1]) +sourceURLs=['https://launchpad.net/FFC/%s/%s/+download/' % (majorversion, version)] + +pythonversion = '2.7.3' +pythonshortversion = ".".join(pythonversion.split(".")[:-1]) + +pythonsuffix = "-Python-%s" % pythonversion +versionsuffix = "%s%s" % (toolkitsuffix, pythonsuffix) + +dependencies=[ + ('Python', pythonversion, toolkitsuffix, True), + ('UFL', '1.0.0', versionsuffix, True), + ('FIAT', '1.0.0', versionsuffix, True), + ('UFC', '2.0.5', versionsuffix, True), + ('Viper', '1.0.0', versionsuffix, True), + ] + +sanityCheckPaths = { + 'files': ['bin/ffc'], + 'dirs':['lib/python%s/site-packages/ffc' % pythonshortversion] + } From 34f9b9efc4f5029ef9e01db8ce574574c9389d21 Mon Sep 17 00:00:00 2001 From: Kenneth Hoste Date: Tue, 26 Jun 2012 18:04:32 +0200 Subject: [PATCH 448/798] moved SWIG version check to UFC, where it belongs --- easybuild/easyblocks/d/dolfin.py | 10 +--------- 1 file changed, 1 insertion(+), 9 deletions(-) diff --git a/easybuild/easyblocks/d/dolfin.py b/easybuild/easyblocks/d/dolfin.py index 21907da1b3..c0f749eccf 100644 --- a/easybuild/easyblocks/d/dolfin.py +++ b/easybuild/easyblocks/d/dolfin.py @@ -19,7 +19,6 @@ # along with EasyBuild. If not, see . ## import os -from distutils.version import LooseVersion from easybuild.easyblocks.c.cmakepythonpackage import CMakePythonPackage from easybuild.tools.modules import get_software_root from easybuild.tools.toolkit import get_openmp_flag @@ -34,7 +33,7 @@ def configure(self): """Configure Dolfin build.""" # make sure that required dependencies are loaded - deps = ['Armadillo', 'Boost', 'ParMETIS', 'Python', 'SCOTCH', 'SWIG', 'SuiteSparse', 'UFC'] + deps = ['Armadillo', 'Boost', 'ParMETIS', 'Python', 'SCOTCH', 'SuiteSparse', 'UFC'] depsdict = {} for dep in deps: deproot = get_software_root(dep) @@ -43,13 +42,6 @@ def configure(self): else: depsdict.update({dep:deproot}) - # dolfin does not work with swig 2.0.5 and 2.0.6 - # is this fixed in 2.0.7?? see https://bugs.launchpad.net/dolfin/+bug/996398 - # If so, change this check accordingly. - if LooseVersion(os.environ['SOFTVERSIONSWIG']) > '2.0.4': - self.log.error("Using bad version of SWIG, expecting swig <= 2.0.4." \ - " See https://bugs.launchpad.net/dolfin/+bug/996398") - # run cmake in debug mode self.updatecfg('configopts', ' -DCMAKE_BUILD_TYPE=Debug') From 13b540683619b51656891f3374daf62fc9727dfe Mon Sep 17 00:00:00 2001 From: Kenneth Hoste Date: Tue, 26 Jun 2012 18:06:23 +0200 Subject: [PATCH 449/798] changed ParMETIS to not derive from METIS but directly from Application, didn't make much sense; cleaned up example easyconfig for ParMETIS and added one for an older version of ParMETIS --- easybuild/easyblocks/p/parmetis.py | 74 +++++++++++++------ .../ParMETIS-3.1.1-goalf-1.1.0-no-OFED.eb | 18 +++++ .../ParMETIS-4.0.2-goalf-1.1.0-no-OFED.eb | 10 +-- 3 files changed, 72 insertions(+), 30 deletions(-) create mode 100644 easybuild/easyconfigs/p/ParMETIS/ParMETIS-3.1.1-goalf-1.1.0-no-OFED.eb diff --git a/easybuild/easyblocks/p/parmetis.py b/easybuild/easyblocks/p/parmetis.py index 3d98cb17f9..06d3e3934b 100644 --- a/easybuild/easyblocks/p/parmetis.py +++ b/easybuild/easyblocks/p/parmetis.py @@ -20,47 +20,73 @@ ## import os import shutil - from distutils.version import LooseVersion from easybuild.framework.application import Application -from easybuild.easyblocks.m.metis import METIS from easybuild.tools.filetools import run_cmd, mkdir +from easybuild.tools.toolkit import get_openmp_flag -class ParMETIS(METIS): +class ParMETIS(Application): """Support for building and installing ParMETIS.""" def configure(self): """Configure ParMETIS build. - For versions of ParMETIS < 4 configure METIS separately + For versions of ParMETIS < 4 , METIS is a seperate build New versions of ParMETIS include METIS Run 'cmake' in the build dir to get rid of a 'user friendly' help message that is displayed without this step. """ - if LooseVersion(self.version()) < LooseVersion("4"): - return METIS.configure(self)\ + if LooseVersion(self.version()) >= LooseVersion("4"): + # tested with 4.0.2, now actually requires cmake to be run first + # for both parmetis and metis + + self.updatecfg('configopts', '-DMETIS_PATH=../metis -DGKLIB_PATH=../metis/GKlib') + + self.updatecfg('configopts', '-DOPENMP="%s"' % get_openmp_flag(self.log)) - # tested with 4.0.2, now actually requires cmake to be run first - # for both parmetis and metis - self.parmetis_builddir = 'build' - cmd = 'cd %s && cmake .. %s -DCMAKE_INSTALL_PREFIX="%s" && cd %s' % \ - (self.parmetis_builddir, self.getcfg('configopts'), self.installdir, self.getcfg('startfrom')) - run_cmd(cmd, log_all=True, simple=True) + if self.tk.opts['usempi']: + self.updatecfg('configopts', '-DCMAKE_C_COMPILER="$MPICC"') + + if self.tk.opts['pic']: + self.updatecfg('configopts', '-DCMAKE_C_FLAGS="-fPIC"') + + self.parmetis_builddir = 'build' + try: + os.chdir(self.parmetis_builddir) + cmd = 'cmake .. %s -DCMAKE_INSTALL_PREFIX="%s"' % (self.getcfg('configopts'), + self.installdir) + run_cmd(cmd, log_all=True, simple=True) + os.chdir(self.getcfg('startfrom')) + except OSError, err: + self.log.error("Running cmake in %s failed: %s" % (self.parmetis_builddir, err)) def make(self, verbose=False): - """Build METIS and ParMETIS using make.""" + """Build ParMETIS (and METIS) using make.""" paracmd = '' if self.getcfg('parallel'): paracmd = "-j %s" % self.getcfg('parallel') + self.updatecfg('makeopts', 'LIBDIR=""') + + if self.tk.opts['usempi']: + if self.tk.opts['pic']: + self.updatecfg('makeopts', 'CC="$MPICC -fPIC"') + else: + self.updatecfg('makeopts', 'CC="$MPICC"') + cmd = "%s make %s %s" % (self.getcfg('premakeopts'), paracmd, self.getcfg('makeopts')) # run make in build dir as well for recent version if LooseVersion(self.version()) >= LooseVersion("4"): - cmd = "cd %s && %s && cd %s " % (self.parmetis_builddir, cmd, self.getcfg('startfrom')) - - run_cmd(cmd, log_all=True, simple=True, log_output=verbose) + try: + os.chdir(self.parmetis_builddir) + run_cmd(cmd, log_all=True, simple=True, log_output=verbose) + os.chdir(self.getcfg('startfrom')) + except OSError, err: + self.log.error("Running cmd '%s' in %s failed: %s" % (cmd, self.parmetis_builddir, err)) + else: + run_cmd(cmd, log_all=True, simple=True, log_output=verbose) def make_install(self): """Install by copying files over to the right places @@ -72,10 +98,13 @@ def make_install(self): if LooseVersion(self.version()) >= LooseVersion("4"): #i ncludedir etc changed in v4, use a normal makeinstall - cmd = "cd %s && make install %s && cd %s" % (self.parmetis_builddir, - self.getcfg('installopts'), - self.getcfg('startfrom')) - run_cmd(cmd, log_all=True, simple=True) + cmd = "make install %s" % self.getcfg('installopts') + try: + os.chdir(self.parmetis_builddir) + run_cmd(cmd, log_all=True, simple=True) + os.chdir(self.getcfg('startfrom')) + except OSError, err: + self.log.error("Running '%s' in %s failed: %s" % (cmd, self.parmetis_builddir, err)) # libraries try: @@ -134,8 +163,9 @@ def sanitycheck(self): if not self.getcfg('sanityCheckPaths'): - self.setcfg('sanityCheckPaths', {'files': ['THIS_WILL_FAIL'], - 'dirs':['THIS_WILL_FAIL_TOO']}) + self.setcfg('sanityCheckPaths', {'files': ['include/%smetis.h' % x for x in ["", "par"]] + + ['lib/lib%smetis.a' % x for x in ["", "par"]], + 'dirs':['Lib']}) self.log.info("Customized sanity check paths: %s" % self.getcfg('sanityCheckPaths')) diff --git a/easybuild/easyconfigs/p/ParMETIS/ParMETIS-3.1.1-goalf-1.1.0-no-OFED.eb b/easybuild/easyconfigs/p/ParMETIS/ParMETIS-3.1.1-goalf-1.1.0-no-OFED.eb new file mode 100644 index 0000000000..5525aa8a24 --- /dev/null +++ b/easybuild/easyconfigs/p/ParMETIS/ParMETIS-3.1.1-goalf-1.1.0-no-OFED.eb @@ -0,0 +1,18 @@ +name='ParMETIS' +version='3.1.1' + +homepage='http://glaros.dtc.umn.edu/gkhome/metis/parmetis/overview' +description="""ParMETIS is an MPI-based parallel library that implements a variety of algorithms for partitioning unstructured graphs, +meshes, and for computing fill-reducing orderings of sparse matrices. ParMETIS extends the functionality provided by METIS and includes +routines that are especially suited for parallel AMR computations and large scale numerical simulations. The algorithms implemented in +ParMETIS are based on the parallel multilevel k-way graph-partitioning, adaptive repartitioning, and parallel multi-constrained partitioning +schemes.""" + +toolkit={'name':'goalf','version':'1.1.0-no-OFED'} +toolkitopts={'optarch':True, 'usempi': True, 'pic':True} + +sources=['ParMetis-%s.tar.gz' % version] +sourceURLs = ['http://glaros.dtc.umn.edu/gkhome/fetch/sw/parmetis', + 'http://glaros.dtc.umn.edu/gkhome/fetch/sw/parmetis/OLD'] + +builddependencies = [('CMake','2.8.4')] diff --git a/easybuild/easyconfigs/p/ParMETIS/ParMETIS-4.0.2-goalf-1.1.0-no-OFED.eb b/easybuild/easyconfigs/p/ParMETIS/ParMETIS-4.0.2-goalf-1.1.0-no-OFED.eb index a04dc557aa..227b91459f 100644 --- a/easybuild/easyconfigs/p/ParMETIS/ParMETIS-4.0.2-goalf-1.1.0-no-OFED.eb +++ b/easybuild/easyconfigs/p/ParMETIS/ParMETIS-4.0.2-goalf-1.1.0-no-OFED.eb @@ -13,11 +13,5 @@ toolkit={'name':'goalf','version':'1.1.0-no-OFED'} toolkitopts={'optarch':True, 'usempi': True} sources=['%s-%s.tar.gz' % (name.lower(),version)] -sourceURLs = ['http://glaros.dtc.umn.edu/gkhome/fetch/sw/parmetis'] - -makeopts='CC="$MPICC -fPIC" LIBDIR=""' -configopts = '-DCMAKE_C_COMPILER="$MPICC" -DCMAKE_C_FLAGS="-fPIC" -DOPENMP="-openmp"' -configopts += ' -DMETIS_PATH=../metis' -configopts += ' -DGKLIB_PATH=../metis/GKlib' - -moduleclass='lib' +sourceURLs = ['http://glaros.dtc.umn.edu/gkhome/fetch/sw/parmetis', + 'http://glaros.dtc.umn.edu/gkhome/fetch/sw/parmetis/OLD'] From 2bd6216b872c36d20296a79aebed24ac62edbb4d Mon Sep 17 00:00:00 2001 From: Kenneth Hoste Date: Tue, 26 Jun 2012 18:08:03 +0200 Subject: [PATCH 450/798] add ParMETIS example easyconfigs for ictce toolkit --- .../p/ParMETIS/ParMETIS-3.1.1-ictce-4.0.6.eb | 18 ++++++++++++++++++ .../p/ParMETIS/ParMETIS-4.0.2-ictce-4.0.6.eb | 17 +++++++++++++++++ 2 files changed, 35 insertions(+) create mode 100644 easybuild/easyconfigs/p/ParMETIS/ParMETIS-3.1.1-ictce-4.0.6.eb create mode 100644 easybuild/easyconfigs/p/ParMETIS/ParMETIS-4.0.2-ictce-4.0.6.eb diff --git a/easybuild/easyconfigs/p/ParMETIS/ParMETIS-3.1.1-ictce-4.0.6.eb b/easybuild/easyconfigs/p/ParMETIS/ParMETIS-3.1.1-ictce-4.0.6.eb new file mode 100644 index 0000000000..327fdd3b03 --- /dev/null +++ b/easybuild/easyconfigs/p/ParMETIS/ParMETIS-3.1.1-ictce-4.0.6.eb @@ -0,0 +1,18 @@ +name='ParMETIS' +version='3.1.1' + +homepage='http://glaros.dtc.umn.edu/gkhome/metis/parmetis/overview' +description="""ParMETIS is an MPI-based parallel library that implements a variety of algorithms for partitioning unstructured graphs, +meshes, and for computing fill-reducing orderings of sparse matrices. ParMETIS extends the functionality provided by METIS and includes +routines that are especially suited for parallel AMR computations and large scale numerical simulations. The algorithms implemented in +ParMETIS are based on the parallel multilevel k-way graph-partitioning, adaptive repartitioning, and parallel multi-constrained partitioning +schemes.""" + +toolkit={'name':'ictce','version':'4.0.6'} +toolkitopts={'optarch':True, 'usempi': True, 'pic':True} + +sources=['ParMetis-%s.tar.gz' % version] +sourceURLs = ['http://glaros.dtc.umn.edu/gkhome/fetch/sw/parmetis', + 'http://glaros.dtc.umn.edu/gkhome/fetch/sw/parmetis/OLD'] + +builddependencies = [('CMake','2.8.4')] diff --git a/easybuild/easyconfigs/p/ParMETIS/ParMETIS-4.0.2-ictce-4.0.6.eb b/easybuild/easyconfigs/p/ParMETIS/ParMETIS-4.0.2-ictce-4.0.6.eb new file mode 100644 index 0000000000..1f937d6cc0 --- /dev/null +++ b/easybuild/easyconfigs/p/ParMETIS/ParMETIS-4.0.2-ictce-4.0.6.eb @@ -0,0 +1,17 @@ +easyblock="ParMETIS" + +name='ParMETIS' +version='4.0.2' + +homepage='http://glaros.dtc.umn.edu/gkhome/metis/parmetis/overview' +description="ParMETIS is an MPI-based parallel library that implements a variety of algorithms for partitioning unstructured graphs, meshes, and for computing fill-reducing orderings of sparse matrices. ParMETIS extends the functionality provided by METIS and includes routines that are especially suited for parallel AMR computations and large scale numerical simulations. The algorithms implemented in ParMETIS are based on the parallel multilevel k-way graph-partitioning, adaptive repartitioning, and parallel multi-constrained partitioning schemes." +builddependencies = [ + ('CMake','2.8.4'), + ] + +toolkit={'name':'ictce','version':'4.0.6'} +toolkitopts={'optarch':True, 'usempi': True} + +sources=['%s-%s.tar.gz' % (name.lower(),version)] +sourceURLs = ['http://glaros.dtc.umn.edu/gkhome/fetch/sw/parmetis', + 'http://glaros.dtc.umn.edu/gkhome/fetch/sw/parmetis/OLD'] From 049062fe0b9420a599010a08ff3b3fa639e0baa3 Mon Sep 17 00:00:00 2001 From: Kenneth Hoste Date: Tue, 26 Jun 2012 21:14:03 +0200 Subject: [PATCH 451/798] minor cleanup in ParMETIS easyblock --- easybuild/easyblocks/p/parmetis.py | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/easybuild/easyblocks/p/parmetis.py b/easybuild/easyblocks/p/parmetis.py index 06d3e3934b..04d58566ec 100644 --- a/easybuild/easyblocks/p/parmetis.py +++ b/easybuild/easyblocks/p/parmetis.py @@ -152,9 +152,8 @@ def make_install(self): try: llibdir = os.path.join(self.installdir, 'Lib') os.symlink(libdir, llibdir) - os.symlink(os.path.join(includedir, 'metis.h'), os.path.join(libdir, 'metis.h')) - os.symlink(os.path.join(includedir, 'parmetis.h'), - os.path.join(libdir, 'parmetis.h')) + for f in ['metis.h', 'parmetis.h']: + os.symlink(os.path.join(includedir, f), os.path.join(libdir, f)) except OSError, err: self.log.error("Something went wrong during symlink creation: %s" % err) From abb8b202ce278d0f56e52cf398955d93aef780e5 Mon Sep 17 00:00:00 2001 From: Kenneth Hoste Date: Wed, 27 Jun 2012 08:41:59 +0200 Subject: [PATCH 452/798] test (with v 5.0.2 and 4.0.1) and fix METIS easyblock, add example easyconfigs --- easybuild/easyblocks/m/metis.py | 113 ++++++++++++------ .../METIS/METIS-4.0.1-goalf-1.1.0-no-OFED.eb | 14 +++ .../m/METIS/METIS-4.0.1-ictce-4.0.6.eb | 14 +++ .../METIS/METIS-5.0.2-goalf-1.1.0-no-OFED.eb | 14 +++ .../m/METIS/METIS-5.0.2-ictce-4.0.6.eb | 14 +++ 5 files changed, 131 insertions(+), 38 deletions(-) create mode 100644 easybuild/easyconfigs/m/METIS/METIS-4.0.1-goalf-1.1.0-no-OFED.eb create mode 100644 easybuild/easyconfigs/m/METIS/METIS-4.0.1-ictce-4.0.6.eb create mode 100644 easybuild/easyconfigs/m/METIS/METIS-5.0.2-goalf-1.1.0-no-OFED.eb create mode 100644 easybuild/easyconfigs/m/METIS/METIS-5.0.2-ictce-4.0.6.eb diff --git a/easybuild/easyblocks/m/metis.py b/easybuild/easyblocks/m/metis.py index 9cd23fd26f..f2eb242672 100644 --- a/easybuild/easyblocks/m/metis.py +++ b/easybuild/easyblocks/m/metis.py @@ -19,63 +19,100 @@ # along with EasyBuild. If not, see . ## +from distutils.version import LooseVersion import os import shutil from easybuild.framework.application import Application -from easybuild.tools.filetools import mkdir +from easybuild.tools.filetools import run_cmd, mkdir class METIS(Application): """Support for building METIS.""" def configure(self, *args, **kwargs): - pass + """Configure build using 'make config' (only for recent versions).""" + + if LooseVersion(self.version()) >= LooseVersion("5"): + + cmd = "make config prefix=%s" % self.installdir + run_cmd(cmd, log_all=True, simple=True) + + def make(self): + """Add make options before building.""" + + self.updatecfg('makeopts', 'LIBDIR=""') + + if self.tk.opts['pic']: + self.updatecfg('makeopts', 'CC="$CC -fPIC"') + + Application.make(self) def make_install(self): - """Manually copy the required files to the right place. + """Install by manually copy files to install dir, for old versions, + or by running 'make install' for new versions. - And create symlinks where expected by other applications + Create symlinks where expected by other applications (in Lib instead of lib)""" - libdir = os.path.join(self.installdir, 'lib') - mkdir(libdir) - - includedir = os.path.join(self.installdir, 'include') - mkdir(includedir) - - # copy libraries - try: - src = os.path.join(self.getcfg('startfrom'), 'libmetis.a') - dst = os.path.join(libdir, 'libmetis.a') - shutil.copy2(src, dst) - except OSError, err: - self.log.error("Copying file libmetis.a to lib dir failed: %s" % err) - - # copy include files - try: - for f in ['defs.h', 'macros.h', 'metis.h', 'proto.h', 'rename.h', 'struct.h']: - src = os.path.join(self.getcfg('startfrom'), 'Lib', f) - dst = os.path.join(includedir, f) + + if LooseVersion(self.version()) < LooseVersion("5"): + + libdir = os.path.join(self.installdir, 'lib') + mkdir(libdir) + + includedir = os.path.join(self.installdir, 'include') + mkdir(includedir) + + # copy libraries + try: + src = os.path.join(self.getcfg('startfrom'), 'libmetis.a') + dst = os.path.join(libdir, 'libmetis.a') shutil.copy2(src, dst) - os.chmod(dst, 0755) - except OSError, err: - self.log.error("Copying file metis.h to include dir failed: %s" % err) - - # Other applications depending on ParMETIS (SuiteSparse for one) look for both ParMETIS libraries - # and header files in the Lib directory (capital L). The following symlinks are hence created. - try: - Libdir = os.path.join(self.installdir, 'Lib') - os.symlink(libdir, Libdir) - for f in ['defs.h', 'macros.h', 'metis.h', 'proto.h', 'rename.h', 'struct.h']: - os.symlink(os.path.join(includedir, file), os.path.join(libdir, f)) - except OSError, err: - self.log.error("Something went wrong during symlink creation: %s" % err) + except OSError, err: + self.log.error("Copying file libmetis.a to lib dir failed: %s" % err) + + # copy include files + try: + for f in ['defs.h', 'macros.h', 'metis.h', 'proto.h', 'rename.h', 'struct.h']: + src = os.path.join(self.getcfg('startfrom'), 'Lib', f) + dst = os.path.join(includedir, f) + shutil.copy2(src, dst) + os.chmod(dst, 0755) + except OSError, err: + self.log.error("Copying file metis.h to include dir failed: %s" % err) + + # Other applications depending on ParMETIS (SuiteSparse for one) look for both ParMETIS libraries + # and header files in the Lib directory (capital L). The following symlinks are hence created. + try: + Libdir = os.path.join(self.installdir, 'Lib') + os.symlink(libdir, Libdir) + for f in ['defs.h', 'macros.h', 'metis.h', 'proto.h', 'rename.h', 'struct.h']: + os.symlink(os.path.join(includedir, f), os.path.join(libdir, f)) + except OSError, err: + self.log.error("Something went wrong during symlink creation: %s" % err) + + else: + Application.make_install(self) def sanitycheck(self): """Custom sanity check for METIS.""" if not self.getcfg('sanityCheckPaths'): - self.setcfg('sanityCheckPaths', {'files': ['THIS_WILL_FAIL'], - 'dirs':['THIS_WILL_FAIL_TOO']}) + binfiles = [] + if LooseVersion(self.version()) > LooseVersion("5"): + binfiles += ["cmpfillin","gpmetis","graphchk","m2gmetis","mpmetis","ndmetis"] + + incfiles = ["metis.h"] + if LooseVersion(self.version()) < LooseVersion("5"): + incfiles += ["defs.h","macros.h","metis.h","proto.h","rename.h","struct.h"] + + dirs = [] + if LooseVersion(self.version()) < LooseVersion("5"): + dirs += ["Lib"] + + self.setcfg('sanityCheckPaths', {'files': ['bin/%s' % x for x in binfiles] + + ['include/%s' % x for x in incfiles] + + ['lib/libmetis.a'], + 'dirs' : dirs}) self.log.info("Customized sanity check paths: %s" % self.getcfg('sanityCheckPaths')) diff --git a/easybuild/easyconfigs/m/METIS/METIS-4.0.1-goalf-1.1.0-no-OFED.eb b/easybuild/easyconfigs/m/METIS/METIS-4.0.1-goalf-1.1.0-no-OFED.eb new file mode 100644 index 0000000000..add2e0f0d9 --- /dev/null +++ b/easybuild/easyconfigs/m/METIS/METIS-4.0.1-goalf-1.1.0-no-OFED.eb @@ -0,0 +1,14 @@ +name='METIS' +version='4.0.1' + +homepage='http://glaros.dtc.umn.edu/gkhome/metis/metis/overview' +description="METIS is a set of serial programs for partitioning graphs, partitioning finite element meshes, and producing fill reducing orderings for sparse matrices. The algorithms implemented in METIS are based on the multilevel recursive-bisection, multilevel k-way, and multi-constraint partitioning schemes." + +toolkit={'name':'goalf','version':'1.1.0-no-OFED'} +toolkitopts={'optarch':True, 'pic':True} + +sources=['%s-%s.tar.gz'%(name.lower(), version)] +sourceURLs=['http://glaros.dtc.umn.edu/gkhome/fetch/sw/metis', + 'http://glaros.dtc.umn.edu/gkhome/fetch/sw/metis/OLD'] + +patches=['renameh_log2.patch'] diff --git a/easybuild/easyconfigs/m/METIS/METIS-4.0.1-ictce-4.0.6.eb b/easybuild/easyconfigs/m/METIS/METIS-4.0.1-ictce-4.0.6.eb new file mode 100644 index 0000000000..bd831cf2cc --- /dev/null +++ b/easybuild/easyconfigs/m/METIS/METIS-4.0.1-ictce-4.0.6.eb @@ -0,0 +1,14 @@ +name='METIS' +version='4.0.1' + +homepage='http://glaros.dtc.umn.edu/gkhome/metis/metis/overview' +description="METIS is a set of serial programs for partitioning graphs, partitioning finite element meshes, and producing fill reducing orderings for sparse matrices. The algorithms implemented in METIS are based on the multilevel recursive-bisection, multilevel k-way, and multi-constraint partitioning schemes." + +toolkit={'name':'ictce','version':'4.0.6'} +toolkitopts={'optarch':True, 'pic':True} + +sources=['%s-%s.tar.gz'%(name.lower(), version)] +sourceURLs=['http://glaros.dtc.umn.edu/gkhome/fetch/sw/metis', + 'http://glaros.dtc.umn.edu/gkhome/fetch/sw/metis/OLD'] + +patches=['renameh_log2.patch'] diff --git a/easybuild/easyconfigs/m/METIS/METIS-5.0.2-goalf-1.1.0-no-OFED.eb b/easybuild/easyconfigs/m/METIS/METIS-5.0.2-goalf-1.1.0-no-OFED.eb new file mode 100644 index 0000000000..4355a0dad7 --- /dev/null +++ b/easybuild/easyconfigs/m/METIS/METIS-5.0.2-goalf-1.1.0-no-OFED.eb @@ -0,0 +1,14 @@ +name='METIS' +version='5.0.2' + +homepage='http://glaros.dtc.umn.edu/gkhome/metis/metis/overview' +description="METIS is a set of serial programs for partitioning graphs, partitioning finite element meshes, and producing fill reducing orderings for sparse matrices. The algorithms implemented in METIS are based on the multilevel recursive-bisection, multilevel k-way, and multi-constraint partitioning schemes." + +toolkit={'name':'goalf','version':'1.1.0-no-OFED'} +toolkitopts={'optarch':True, 'pic':True} + +sources=['%s-%s.tar.gz'%(name.lower(), version)] +sourceURLs=['http://glaros.dtc.umn.edu/gkhome/fetch/sw/metis', + 'http://glaros.dtc.umn.edu/gkhome/fetch/sw/metis/OLD'] + +dependencies=[('CMake','2.8.4')] \ No newline at end of file diff --git a/easybuild/easyconfigs/m/METIS/METIS-5.0.2-ictce-4.0.6.eb b/easybuild/easyconfigs/m/METIS/METIS-5.0.2-ictce-4.0.6.eb new file mode 100644 index 0000000000..ae3ee6c6a5 --- /dev/null +++ b/easybuild/easyconfigs/m/METIS/METIS-5.0.2-ictce-4.0.6.eb @@ -0,0 +1,14 @@ +name='METIS' +version='5.0.2' + +homepage='http://glaros.dtc.umn.edu/gkhome/metis/metis/overview' +description="METIS is a set of serial programs for partitioning graphs, partitioning finite element meshes, and producing fill reducing orderings for sparse matrices. The algorithms implemented in METIS are based on the multilevel recursive-bisection, multilevel k-way, and multi-constraint partitioning schemes." + +toolkit={'name':'ictce','version':'4.0.6'} +toolkitopts={'optarch':True, 'pic':True} + +sources=['%s-%s.tar.gz'%(name.lower(), version)] +sourceURLs=['http://glaros.dtc.umn.edu/gkhome/fetch/sw/metis', + 'http://glaros.dtc.umn.edu/gkhome/fetch/sw/metis/OLD'] + +dependencies=[('CMake','2.8.4')] \ No newline at end of file From 56c50faa22a515e854abc04c6fc101131102c0c7 Mon Sep 17 00:00:00 2001 From: Kenneth Hoste Date: Wed, 27 Jun 2012 08:42:21 +0200 Subject: [PATCH 453/798] add CMake example easyconfig for ictce --- .../c/CMake/CMake-2.8.4-ictce-4.0.6.eb | 21 +++++++++++++++++++ 1 file changed, 21 insertions(+) create mode 100644 easybuild/easyconfigs/c/CMake/CMake-2.8.4-ictce-4.0.6.eb diff --git a/easybuild/easyconfigs/c/CMake/CMake-2.8.4-ictce-4.0.6.eb b/easybuild/easyconfigs/c/CMake/CMake-2.8.4-ictce-4.0.6.eb new file mode 100644 index 0000000000..69bfffecf5 --- /dev/null +++ b/easybuild/easyconfigs/c/CMake/CMake-2.8.4-ictce-4.0.6.eb @@ -0,0 +1,21 @@ +# we need to build with Application, not with CMake easyblock +easyblock="Application" + +name='CMake' +version='2.8.4' + +homepage='http://www.cmake.org' +description="""CMake, the cross-platform, open-source build system. +CMake is a family of tools designed to build, test and package software.""" + +toolkit={'name':'ictce','version':'4.0.6'} + +sources=['%s-%s.tar.gz'%(name.lower(),version)] + +majorversion = ".".join(version.split('.')[:-1]) +sourceURLs = ['http://www.cmake.org/files/v%s' % majorversion] + +sanityCheckPaths={ + 'files':["bin/%s" % x for x in ['cmake','cpack','ctest']], + 'dirs':[] + } From b32782296acdd42dfebede36642a0858d2f022f0 Mon Sep 17 00:00:00 2001 From: Kenneth Hoste Date: Wed, 27 Jun 2012 08:42:36 +0200 Subject: [PATCH 454/798] fix FIAT example easyconfigs --- .../f/FIAT/FIAT-1.0.0-goalf-1.1.0-no-OFED-Python-2.7.3.eb | 2 +- .../easyconfigs/f/FIAT/FIAT-1.0.0-ictce-4.0.6-Python-2.7.3.eb | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/easybuild/easyconfigs/f/FIAT/FIAT-1.0.0-goalf-1.1.0-no-OFED-Python-2.7.3.eb b/easybuild/easyconfigs/f/FIAT/FIAT-1.0.0-goalf-1.1.0-no-OFED-Python-2.7.3.eb index b69a3a98c0..ad690e2952 100644 --- a/easybuild/easyconfigs/f/FIAT/FIAT-1.0.0-goalf-1.1.0-no-OFED-Python-2.7.3.eb +++ b/easybuild/easyconfigs/f/FIAT/FIAT-1.0.0-goalf-1.1.0-no-OFED-Python-2.7.3.eb @@ -9,7 +9,7 @@ instances of the Lagrange elements on lines, triangles, and tetrahedra. It is al arbitrary order instances of Jacobi-type quadrature rules on the same element shapes.""" toolkit={'name':'dummy','version':''} -toolkitsuffix = "-ictce-4.0.6" +toolkitsuffix = "-goalf-1.1.0-no-OFED" sources=['%s-%s.tar.gz'%(name.lower(),version)] majorversion = "%s.x" % ".".join(version.split('.')[:-1]) diff --git a/easybuild/easyconfigs/f/FIAT/FIAT-1.0.0-ictce-4.0.6-Python-2.7.3.eb b/easybuild/easyconfigs/f/FIAT/FIAT-1.0.0-ictce-4.0.6-Python-2.7.3.eb index ad690e2952..b69a3a98c0 100644 --- a/easybuild/easyconfigs/f/FIAT/FIAT-1.0.0-ictce-4.0.6-Python-2.7.3.eb +++ b/easybuild/easyconfigs/f/FIAT/FIAT-1.0.0-ictce-4.0.6-Python-2.7.3.eb @@ -9,7 +9,7 @@ instances of the Lagrange elements on lines, triangles, and tetrahedra. It is al arbitrary order instances of Jacobi-type quadrature rules on the same element shapes.""" toolkit={'name':'dummy','version':''} -toolkitsuffix = "-goalf-1.1.0-no-OFED" +toolkitsuffix = "-ictce-4.0.6" sources=['%s-%s.tar.gz'%(name.lower(),version)] majorversion = "%s.x" % ".".join(version.split('.')[:-1]) From 43db11b35bc194288e55e43d894297225a944d1c Mon Sep 17 00:00:00 2001 From: Kenneth Hoste Date: Wed, 27 Jun 2012 08:42:50 +0200 Subject: [PATCH 455/798] METIS patch file for v4 --- easybuild/easyconfigs/m/METIS/renameh_log2.patch | 11 +++++++++++ 1 file changed, 11 insertions(+) create mode 100644 easybuild/easyconfigs/m/METIS/renameh_log2.patch diff --git a/easybuild/easyconfigs/m/METIS/renameh_log2.patch b/easybuild/easyconfigs/m/METIS/renameh_log2.patch new file mode 100644 index 0000000000..140d64c12d --- /dev/null +++ b/easybuild/easyconfigs/m/METIS/renameh_log2.patch @@ -0,0 +1,11 @@ +--- Lib/rename.h.orig 2010-07-09 16:14:43.294350233 +0200 ++++ Lib/rename.h 2010-07-09 16:15:07.769376810 +0200 +@@ -410,7 +410,7 @@ + #define RandomPermute __RandomPermute + #define ispow2 __ispow2 + #define InitRandom __InitRandom +-#define log2 __log2 ++#define log2 __metis_log2 + + + From 65a1f40c7197e0eefc949c472acbdfd19f115f40 Mon Sep 17 00:00:00 2001 From: Kenneth Hoste Date: Wed, 27 Jun 2012 08:45:01 +0200 Subject: [PATCH 456/798] clean up example easyconfig for SuiteSparse, fix sanity check in easyblock --- easybuild/easyblocks/s/scotch.py | 26 +++++++++++++++++-- ...TCH-5.1.12b_esmumps-goalf-1.1.0-no-OFED.eb | 11 +++----- .../SCOTCH-5.1.12b_esmumps-ictce-4.0.6.eb | 12 +++++++++ 3 files changed, 39 insertions(+), 10 deletions(-) create mode 100644 easybuild/easyconfigs/s/SCOTCH/SCOTCH-5.1.12b_esmumps-ictce-4.0.6.eb diff --git a/easybuild/easyblocks/s/scotch.py b/easybuild/easyblocks/s/scotch.py index d304f664d2..28924c08ff 100644 --- a/easybuild/easyblocks/s/scotch.py +++ b/easybuild/easyblocks/s/scotch.py @@ -127,8 +127,30 @@ def sanitycheck(self): if not self.getcfg('sanityCheckPaths'): - self.setcfg('sanityCheckPaths', {'files': ['THIS_WILL_FAIL'], - 'dirs':['THIS_WILL_FAIL_TOO']}) + self.setcfg('sanityCheckPaths', {'files': ['bin/%s' % x for x in ["acpl","amk_fft2","amk_hy", + "amk_p2","dggath","dgord", + "dgscat","gbase","gmap", + "gmk_m2","gmk_msh","gmtst", + "gotst","gpart","gtst", + "mmk_m2","mord","amk_ccc", + "amk_grf","amk_m2","atst", + "dgmap","dgpart","dgtst", + "gcv","gmk_hy","gmk_m3", + "gmk_ub2","gord","gout", + "gscat","mcv","mmk_m3", + "mtst"]] + + ['include/%s.h' % x for x in ["esmumps","ptscotchf", + "ptscotch","scotchf", + "scotch"]] + + ['lib/lib%s.a' % x for x in ["esmumps","ptscotch", + "ptscotcherrexit", + "scotcherr", + "scotch_group", + "ptesmumps", + "ptscotcherr", + "scotch", + "scotcherrexit"]], + 'dirs':[]}) self.log.info("Customized sanity check paths: %s" % self.getcfg('sanityCheckPaths')) diff --git a/easybuild/easyconfigs/s/SCOTCH/SCOTCH-5.1.12b_esmumps-goalf-1.1.0-no-OFED.eb b/easybuild/easyconfigs/s/SCOTCH/SCOTCH-5.1.12b_esmumps-goalf-1.1.0-no-OFED.eb index 91a2bf7571..69ca2436a0 100644 --- a/easybuild/easyconfigs/s/SCOTCH/SCOTCH-5.1.12b_esmumps-goalf-1.1.0-no-OFED.eb +++ b/easybuild/easyconfigs/s/SCOTCH/SCOTCH-5.1.12b_esmumps-goalf-1.1.0-no-OFED.eb @@ -1,17 +1,12 @@ -# Built with 1.0-r4456a1ab03d75b8852074a58b6fd249b86e3a700 on 2012-03-26_10-26-04 -easyblock="SCOTCH" - name='SCOTCH' version='5.1.12b_esmumps' homepage='http://www.labri.fr/perso/pelegrin/scotch/' -description="Software package and libraries for sequential and parallel graph partitioning, static mapping, and sparse matrix block ordering, and sequential mesh and hypergraph partitioning" +description="""Software package and libraries for sequential and parallel graph partitioning, +static mapping, and sparse matrix block ordering, and sequential mesh and hypergraph partitioning.""" toolkit={'name':'goalf','version':'1.1.0-no-OFED'} +toolkitopts={'pic':True} sources=['%s_%s.tar.gz'%(name.lower(),version)] sourceURLs = ['https://gforge.inria.fr/frs/download.php/28978/'] - -toolkitopts={'pic':True} - -moduleclass='lib' diff --git a/easybuild/easyconfigs/s/SCOTCH/SCOTCH-5.1.12b_esmumps-ictce-4.0.6.eb b/easybuild/easyconfigs/s/SCOTCH/SCOTCH-5.1.12b_esmumps-ictce-4.0.6.eb new file mode 100644 index 0000000000..2222806b29 --- /dev/null +++ b/easybuild/easyconfigs/s/SCOTCH/SCOTCH-5.1.12b_esmumps-ictce-4.0.6.eb @@ -0,0 +1,12 @@ +name='SCOTCH' +version='5.1.12b_esmumps' + +homepage='http://www.labri.fr/perso/pelegrin/scotch/' +description="""Software package and libraries for sequential and parallel graph partitioning, +static mapping, and sparse matrix block ordering, and sequential mesh and hypergraph partitioning.""" + +toolkit={'name':'ictce','version':'4.0.6'} +toolkitopts={'pic':True} + +sources=['%s_%s.tar.gz'%(name.lower(),version)] +sourceURLs = ['https://gforge.inria.fr/frs/download.php/28978/'] From 2aee42919aa845e83aba8ea8910acef76c9eee4f Mon Sep 17 00:00:00 2001 From: Kenneth Hoste Date: Wed, 27 Jun 2012 08:46:35 +0200 Subject: [PATCH 457/798] clean up example goalf easyconfig for SuiteSparse, add example easyconfig for ictce, get rid of patch file and patch in easyblock using fileinput, fix creating of symlinks --- easybuild/easyblocks/s/suitesparse.py | 59 +++++++++++++++++-- ...kl_UseEnvCompiler_EnableParmetis-3.7.patch | 44 -------------- ...l_UseEnvCompiler_EnableParmetis-3.7.patch~ | 0 ...-3.7.0-goalf-1.1.0-no-OFED-withparmetis.eb | 14 +---- ...teSparse-3.7.0-ictce-4.0.6-withparmetis.eb | 14 +++++ 5 files changed, 71 insertions(+), 60 deletions(-) delete mode 100644 easybuild/easyconfigs/s/SuiteSparse/BlasLapackFromMkl_UseEnvCompiler_EnableParmetis-3.7.patch delete mode 100644 easybuild/easyconfigs/s/SuiteSparse/BlasLapackFromMkl_UseEnvCompiler_EnableParmetis-3.7.patch~ create mode 100644 easybuild/easyconfigs/s/SuiteSparse/SuiteSparse-3.7.0-ictce-4.0.6-withparmetis.eb diff --git a/easybuild/easyblocks/s/suitesparse.py b/easybuild/easyblocks/s/suitesparse.py index 02265e3571..4344482f94 100644 --- a/easybuild/easyblocks/s/suitesparse.py +++ b/easybuild/easyblocks/s/suitesparse.py @@ -18,15 +18,64 @@ # You should have received a copy of the GNU General Public License # along with EasyBuild. If not, see . ## +import fileinput +import re import os import shutil +import sys from easybuild.framework.application import Application +from easybuild.tools.filetools import mkdir class SuiteSparse(Application): """Support for building SuiteSparse.""" def configure(self): - pass + """Configure build by patching UFconfig.mk.""" + + metis = os.getenv('SOFTROOTMETIS') + parmetis = os.getenv('SOFTROOTPARMETIS') + if not metis and not parmetis: + self.log.error("Neither METIS or ParMETIS module loaded.") + + fp = os.path.join("UFconfig","UFconfig.mk") + + cfgvars = { + 'CC':os.getenv('MPICC'), + 'CFLAGS':os.getenv('CFLAGS'), + 'CXX':os.getenv('MPICXX'), + 'F77':os.getenv('MPIF77'), + 'F77FLAGS':os.getenv('F77FLAGS'), + 'BLAS':os.getenv('LIBBLAS_MT'), + 'LAPACK':os.getenv('LIBLAPACK_MT'), + } + + if parmetis: + cfgvars.update({ + 'METIS_PATH':parmetis, + 'METIS':"%(p)s/lib/libparmetis.a %(p)s/lib/metis.a" % {'p':parmetis} + }) + + # patch file + try: + for line in fileinput.input(fp, inplace=1, backup='.orig'): + for k,v in cfgvars.items(): + line = re.sub(r"^(%s\s*=\s*).*$" % k, r"\1 %s # patched by EasyBuild" % v, line) + if k in line: + cfgvars.pop(k) + sys.stdout.write(line) + except IOError, err: + self.log.error("Failed to patch %s in: %s" % (fp, err)) + + # add remaining entries at the end + if cfgvars: + try: + f = open(fp, "a") + f.write("# lines below added automatically by EasyBuild") + for k,v in cfgvars.items(): + f.write("%s = %s\n" % (k,v)) + f.close() + except IOError, err: + self.log.error("Failed to complete %s: %s" % (fp, err)) def make_install(self): """Install by copying the contents of the builddir to the installdir @@ -52,14 +101,16 @@ def make_install(self): self.log.exception("Copying src %s to dst %s failed" % (src, dst)) # Some extra symlinks are necessary for UMFPACK to work. - for p in ['AMD/include/amd.h', 'AMD/include/amd_internal.h', 'UFconfig/UFconfig.h', 'AMD/lib/libamd.a']: + for p in ['AMD/include/amd.h', 'AMD/include/amd_internal.h', + 'UFconfig/UFconfig.h', 'AMD/lib/libamd.a']: src = os.path.join(self.installdir, p) dn = p.split('/')[-2] fn = p.split('/')[-1] - dst = os.path.join(self.installdir, 'UMFPACK', dn, fn) + dstdir = os.path.join(self.installdir, 'UMFPACK', dn) + mkdir(dstdir) if os.path.exists(src): try: - os.symlink(src, dst) + os.symlink(src, os.path.join(dstdir, fn)) except Exception, err: self.log.error("Failed to make symbolic link from %s to %s: %s" % (src, dst, err)) diff --git a/easybuild/easyconfigs/s/SuiteSparse/BlasLapackFromMkl_UseEnvCompiler_EnableParmetis-3.7.patch b/easybuild/easyconfigs/s/SuiteSparse/BlasLapackFromMkl_UseEnvCompiler_EnableParmetis-3.7.patch deleted file mode 100644 index 6ff2945e12..0000000000 --- a/easybuild/easyconfigs/s/SuiteSparse/BlasLapackFromMkl_UseEnvCompiler_EnableParmetis-3.7.patch +++ /dev/null @@ -1,44 +0,0 @@ ---- ./UFconfig/UFconfig.mk 2011-12-08 20:19:48.000000000 +0100 -+++ ../SuiteSparse_patched/UFconfig/UFconfig.mk 2012-03-26 13:46:32.081278439 +0200 -@@ -53,7 +53,7 @@ - # default make environment. - - # C and C++ compiler flags. The first three are standard for *.c and *.cpp --CF = $(CFLAGS) $(CPPFLAGS) $(TARGET_ARCH) -O3 -fexceptions -fPIC -+CF = $(CFLAGS) $(CPPFLAGS) $(TARGET_ARCH) -fPIC #-O3 -fexceptions - - # ranlib, and ar, for generating libraries. If you don't need ranlib, - # just change it to RANLAB = echo -@@ -148,8 +148,9 @@ - # The path is relative to where it is used, in CHOLMOD/Lib, CHOLMOD/MATLAB, etc. - # You may wish to use an absolute path. METIS is optional. Compile - # CHOLMOD with -DNPARTITION if you do not wish to use METIS. --METIS_PATH = ../../metis-4.0 --METIS = ../../metis-4.0/libmetis.a -+METIS_PATH = $(SOFTROOTPARMETIS) -+METIS = $(SOFTROOTPARMETIS)/lib/libparmetis.a $(SOFTROOTPARMETIS)/lib/libmetis.a -+ - - #------------------------------------------------------------------------------ - # UMFPACK configuration: -@@ -251,9 +252,15 @@ - # Linux - #------------------------------------------------------------------------------ - --# Using default compilers: --# CC = gcc --# CFLAGS = -O3 -fexceptions -+# Using mpi compilers: -+CC = $(SOFTVARMPICC) -+CFLAGS = $(SOFTVARCFLAGS) -+CXX = $(SOFTVARMPICXX) -+F77 = $(SOFTVARMPIF77) -+F77FLAGS = $(SOFTVARFFLAGS) -+INTEL_LIB = $(MKLROOT)/lib/em64t -+BLAS = -L$(INTEL_LIB) -Bstatic -lmkl_em64t -Bdynamic -liomp5 -lguide -lpthread -+LAPACK = -L$(INTEL_LIB) -Bstatic -lmkl_lapack -lmkl_em64t -Bdynamic -liomp5 -lguide -lpthread - - # alternatives: - # CFLAGS = -g -fexceptions \ - - diff --git a/easybuild/easyconfigs/s/SuiteSparse/BlasLapackFromMkl_UseEnvCompiler_EnableParmetis-3.7.patch~ b/easybuild/easyconfigs/s/SuiteSparse/BlasLapackFromMkl_UseEnvCompiler_EnableParmetis-3.7.patch~ deleted file mode 100644 index e69de29bb2..0000000000 diff --git a/easybuild/easyconfigs/s/SuiteSparse/SuiteSparse-3.7.0-goalf-1.1.0-no-OFED-withparmetis.eb b/easybuild/easyconfigs/s/SuiteSparse/SuiteSparse-3.7.0-goalf-1.1.0-no-OFED-withparmetis.eb index 8fa40dff46..b6158f92ca 100644 --- a/easybuild/easyconfigs/s/SuiteSparse/SuiteSparse-3.7.0-goalf-1.1.0-no-OFED-withparmetis.eb +++ b/easybuild/easyconfigs/s/SuiteSparse/SuiteSparse-3.7.0-goalf-1.1.0-no-OFED-withparmetis.eb @@ -1,24 +1,14 @@ -easyblock='SuiteSparse' - name='SuiteSparse' version='3.7.0' +versionsuffix='-withparmetis' homepage='http://www.cise.ufl.edu/research/sparse/SuiteSparse/' description="SuiteSparse is a collection of libraries manipulate sparse matrices." toolkit={'name':'goalf','version':'1.1.0-no-OFED'} - -toolkitopts={'opt':True,'unroll':True,'pic':True,'intel-static':True} +toolkitopts={'opt':True, 'unroll':True, 'pic':True, 'intel-static':True} sources=['%s-%s.tar.gz'%(name,version)] sourceURLs = ['http://www.cise.ufl.edu/research/sparse/SuiteSparse'] dependencies=[('ParMETIS','4.0.2')] - -patches=['BlasLapackFromMkl_UseEnvCompiler_EnableParmetis-3.7.patch'] - -# SuiteSparse depends on the linear version of ParMETIS -versionsuffix='-withparmetis' - -moduleclass='lib' - diff --git a/easybuild/easyconfigs/s/SuiteSparse/SuiteSparse-3.7.0-ictce-4.0.6-withparmetis.eb b/easybuild/easyconfigs/s/SuiteSparse/SuiteSparse-3.7.0-ictce-4.0.6-withparmetis.eb new file mode 100644 index 0000000000..b6158f92ca --- /dev/null +++ b/easybuild/easyconfigs/s/SuiteSparse/SuiteSparse-3.7.0-ictce-4.0.6-withparmetis.eb @@ -0,0 +1,14 @@ +name='SuiteSparse' +version='3.7.0' +versionsuffix='-withparmetis' + +homepage='http://www.cise.ufl.edu/research/sparse/SuiteSparse/' +description="SuiteSparse is a collection of libraries manipulate sparse matrices." + +toolkit={'name':'goalf','version':'1.1.0-no-OFED'} +toolkitopts={'opt':True, 'unroll':True, 'pic':True, 'intel-static':True} + +sources=['%s-%s.tar.gz'%(name,version)] +sourceURLs = ['http://www.cise.ufl.edu/research/sparse/SuiteSparse'] + +dependencies=[('ParMETIS','4.0.2')] From 1bac9b278a27183f15945bff52de401d2235d089 Mon Sep 17 00:00:00 2001 From: Kenneth Hoste Date: Wed, 27 Jun 2012 08:50:00 +0200 Subject: [PATCH 458/798] add example easyconfig for libxml2, add libxml2 as dependency for DOLFIN --- ...OLFIN-1.0.0-goalf-1.1.0-no-OFED-Python-2.7.3.eb | 3 ++- .../DOLFIN-1.0.0-ictce-4.0.6-Python-2.7.3.eb | 3 ++- .../l/libxml2/libxml2-2.8.0-goalf-1.1.0-no-OFED.eb | 14 ++++++++++++++ .../l/libxml2/libxml2-2.8.0-ictce-4.0.6.eb | 14 ++++++++++++++ 4 files changed, 32 insertions(+), 2 deletions(-) create mode 100644 easybuild/easyconfigs/l/libxml2/libxml2-2.8.0-goalf-1.1.0-no-OFED.eb create mode 100644 easybuild/easyconfigs/l/libxml2/libxml2-2.8.0-ictce-4.0.6.eb diff --git a/easybuild/easyconfigs/d/DOLFIN/DOLFIN-1.0.0-goalf-1.1.0-no-OFED-Python-2.7.3.eb b/easybuild/easyconfigs/d/DOLFIN/DOLFIN-1.0.0-goalf-1.1.0-no-OFED-Python-2.7.3.eb index 364bc1d000..10468cd047 100644 --- a/easybuild/easyconfigs/d/DOLFIN/DOLFIN-1.0.0-goalf-1.1.0-no-OFED-Python-2.7.3.eb +++ b/easybuild/easyconfigs/d/DOLFIN/DOLFIN-1.0.0-goalf-1.1.0-no-OFED-Python-2.7.3.eb @@ -35,9 +35,10 @@ dependencies=[ ('Viper', '1.0.0', versionsuffix), ('UFL', '1.0.0', versionsuffix), ('SCOTCH', '5.1.12b_esmumps'), - ('Armadillo', '2.4.4'), + ('Armadillo', '2.4.4', versionsuffix), ('ParMETIS', '4.0.2'), ('SuiteSparse', '3.7.0', '-withparmetis'), ('CGAL', '4.0', versionsuffix), ('zlib', '1.2.7'), + ('libxml2', '2.8.0') ] diff --git a/easybuild/easyconfigs/d/DOLFIN/DOLFIN-1.0.0-ictce-4.0.6-Python-2.7.3.eb b/easybuild/easyconfigs/d/DOLFIN/DOLFIN-1.0.0-ictce-4.0.6-Python-2.7.3.eb index f7a286db93..df3300c33c 100644 --- a/easybuild/easyconfigs/d/DOLFIN/DOLFIN-1.0.0-ictce-4.0.6-Python-2.7.3.eb +++ b/easybuild/easyconfigs/d/DOLFIN/DOLFIN-1.0.0-ictce-4.0.6-Python-2.7.3.eb @@ -35,9 +35,10 @@ dependencies=[ ('Viper', '1.0.0', versionsuffix), ('UFL', '1.0.0', versionsuffix), ('SCOTCH', '5.1.12b_esmumps'), - ('Armadillo', '2.4.4'), + ('Armadillo', '2.4.4', versionsuffix), ('ParMETIS', '4.0.2'), ('SuiteSparse', '3.7.0', '-withparmetis'), ('CGAL', '4.0', versionsuffix), ('zlib', '1.2.7'), + ('libxml2', '2.8.0') ] diff --git a/easybuild/easyconfigs/l/libxml2/libxml2-2.8.0-goalf-1.1.0-no-OFED.eb b/easybuild/easyconfigs/l/libxml2/libxml2-2.8.0-goalf-1.1.0-no-OFED.eb new file mode 100644 index 0000000000..cf568f7cea --- /dev/null +++ b/easybuild/easyconfigs/l/libxml2/libxml2-2.8.0-goalf-1.1.0-no-OFED.eb @@ -0,0 +1,14 @@ +name='libxml2' +version='2.8.0' + +homepage='http://xmlsoft.org/' +description="""Libxml2 is the XML C parser and toolkit developed for the Gnome project (but usable +outside of the Gnome platform).""" + +toolkit={'name':'goalf','version':'1.1.0-no-OFED'} + +configopts="CC=$CC CXX=$CXX --with-pic" + +sources=['%s-%s.tar.gz'%(name.lower(),version)] +sourceURLs=['http://xmlsoft.org/sources/', + 'http://xmlsoft.org/sources/old/'] \ No newline at end of file diff --git a/easybuild/easyconfigs/l/libxml2/libxml2-2.8.0-ictce-4.0.6.eb b/easybuild/easyconfigs/l/libxml2/libxml2-2.8.0-ictce-4.0.6.eb new file mode 100644 index 0000000000..cf568f7cea --- /dev/null +++ b/easybuild/easyconfigs/l/libxml2/libxml2-2.8.0-ictce-4.0.6.eb @@ -0,0 +1,14 @@ +name='libxml2' +version='2.8.0' + +homepage='http://xmlsoft.org/' +description="""Libxml2 is the XML C parser and toolkit developed for the Gnome project (but usable +outside of the Gnome platform).""" + +toolkit={'name':'goalf','version':'1.1.0-no-OFED'} + +configopts="CC=$CC CXX=$CXX --with-pic" + +sources=['%s-%s.tar.gz'%(name.lower(),version)] +sourceURLs=['http://xmlsoft.org/sources/', + 'http://xmlsoft.org/sources/old/'] \ No newline at end of file From 65f3a5fb70bb0c77a2e011bd1cc7eb1c3d628de9 Mon Sep 17 00:00:00 2001 From: Jens Timmerman Date: Thu, 5 Jul 2012 17:53:05 +0200 Subject: [PATCH 459/798] added gimkl --- easybuild/easyconfigs/g/gimkl/gimkl-0.5.2.eb | 19 +++++++++++++++++++ 1 file changed, 19 insertions(+) create mode 100644 easybuild/easyconfigs/g/gimkl/gimkl-0.5.2.eb diff --git a/easybuild/easyconfigs/g/gimkl/gimkl-0.5.2.eb b/easybuild/easyconfigs/g/gimkl/gimkl-0.5.2.eb new file mode 100644 index 0000000000..439c4c7adc --- /dev/null +++ b/easybuild/easyconfigs/g/gimkl/gimkl-0.5.2.eb @@ -0,0 +1,19 @@ +easyblock="Toolkit" + +name='gimkl' +version='0.5.2' + +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, Intel MKL and Intel Trace Analyzer and Trace Collector""" + +toolkit={'name':'dummy','version':'dummy'} + +dependencies=[ + {'name':'GCC', 'version': '4.6.2'}, + {'name':'impi','version':'4.0.2.003'}, + {'name':'imkl','version':'10.3.6.233'}, + ] + +## compiler class +moduleclass='compiler' + From 0159b8e6f2d884e3efc8cb282b4a5eca6d126b5c Mon Sep 17 00:00:00 2001 From: Jens Timmerman Date: Thu, 5 Jul 2012 17:54:04 +0200 Subject: [PATCH 460/798] added gimkl versions of .eb files for dolfin and dependencies --- ...rmadillo-2.4.4-gimkl-0.5.2-Python-2.7.3.eb | 19 +++++++++++ .../Boost-1.49.0-gimkl-0.5.2-Python-2.7.3.eb | 21 ++++++++++++ .../CGAL/CGAL-4.0-gimkl-0.5.2-Python-2.7.3.eb | 21 ++++++++++++ .../FFC/FFC-1.0.0-gimkl-0.5.2-Python-2.7.3.eb | 34 +++++++++++++++++++ .../FIAT-1.0.0-gimkl-0.5.2-Python-2.7.3.eb | 31 +++++++++++++++++ .../Instant-1.0.0-gimkl-0.5.2-Python-2.7.3.eb | 30 ++++++++++++++++ .../p/ParMETIS/ParMETIS-4.0.2-gimkl-0.5.2.eb | 17 ++++++++++ .../SCOTCH-5.1.12b_esmumps-gimkl-0.5.2.eb | 12 +++++++ .../SWIG-2.0.4-gimkl-0.5.2-Python-2.7.3.eb | 20 +++++++++++ ...teSparse-3.7.0-gimkl-0.5.2-withparmetis.eb | 14 ++++++++ .../UFC/UFC-2.0.5-gimkl-0.5.2-Python-2.7.3.eb | 25 ++++++++++++++ .../UFL/UFL-1.0.0-gimkl-0.5.2-Python-2.7.3.eb | 26 ++++++++++++++ .../Viper-1.0.0-gimkl-0.5.2-Python-2.7.3.eb | 27 +++++++++++++++ .../z/zlib/zlib-1.2.7-gimkl-0.5.2.eb | 20 +++++++++++ 14 files changed, 317 insertions(+) create mode 100644 easybuild/easyconfigs/a/Armadillo/Armadillo-2.4.4-gimkl-0.5.2-Python-2.7.3.eb create mode 100644 easybuild/easyconfigs/b/Boost/Boost-1.49.0-gimkl-0.5.2-Python-2.7.3.eb create mode 100644 easybuild/easyconfigs/c/CGAL/CGAL-4.0-gimkl-0.5.2-Python-2.7.3.eb create mode 100644 easybuild/easyconfigs/f/FFC/FFC-1.0.0-gimkl-0.5.2-Python-2.7.3.eb create mode 100644 easybuild/easyconfigs/f/FIAT/FIAT-1.0.0-gimkl-0.5.2-Python-2.7.3.eb create mode 100644 easybuild/easyconfigs/i/Instant/Instant-1.0.0-gimkl-0.5.2-Python-2.7.3.eb create mode 100644 easybuild/easyconfigs/p/ParMETIS/ParMETIS-4.0.2-gimkl-0.5.2.eb create mode 100644 easybuild/easyconfigs/s/SCOTCH/SCOTCH-5.1.12b_esmumps-gimkl-0.5.2.eb create mode 100644 easybuild/easyconfigs/s/SWIG/SWIG-2.0.4-gimkl-0.5.2-Python-2.7.3.eb create mode 100644 easybuild/easyconfigs/s/SuiteSparse/SuiteSparse-3.7.0-gimkl-0.5.2-withparmetis.eb create mode 100644 easybuild/easyconfigs/u/UFC/UFC-2.0.5-gimkl-0.5.2-Python-2.7.3.eb create mode 100644 easybuild/easyconfigs/u/UFL/UFL-1.0.0-gimkl-0.5.2-Python-2.7.3.eb create mode 100644 easybuild/easyconfigs/v/Viper/Viper-1.0.0-gimkl-0.5.2-Python-2.7.3.eb create mode 100644 easybuild/easyconfigs/z/zlib/zlib-1.2.7-gimkl-0.5.2.eb diff --git a/easybuild/easyconfigs/a/Armadillo/Armadillo-2.4.4-gimkl-0.5.2-Python-2.7.3.eb b/easybuild/easyconfigs/a/Armadillo/Armadillo-2.4.4-gimkl-0.5.2-Python-2.7.3.eb new file mode 100644 index 0000000000..39d7ba5bbb --- /dev/null +++ b/easybuild/easyconfigs/a/Armadillo/Armadillo-2.4.4-gimkl-0.5.2-Python-2.7.3.eb @@ -0,0 +1,19 @@ +name='Armadillo' +version='2.4.4' + +homepage='http://arma.sourceforge.net/' +description="""Armadillo is an open-source C++ linear algebra library (matrix maths) aiming towards +a good balance between speed and ease of use. Integer, floating point and complex numbers are supported, +as well as a subset of trigonometric and statistics functions.""" + +toolkit={'name':'gimkl','version':'0.5.2'} + +sources=['%s-%s.tar.gz'%(name.lower(),version)] +sourceURLs=['http://sourceforge.net/projects/arma/files'] + +pythonversion='2.7.3' +versionsuffix="-Python-%s" % pythonversion + +dependencies=[('Boost','1.49.0', versionsuffix)] + +builddependencies = [('CMake','2.8.4')] \ No newline at end of file diff --git a/easybuild/easyconfigs/b/Boost/Boost-1.49.0-gimkl-0.5.2-Python-2.7.3.eb b/easybuild/easyconfigs/b/Boost/Boost-1.49.0-gimkl-0.5.2-Python-2.7.3.eb new file mode 100644 index 0000000000..e4bcd14c8f --- /dev/null +++ b/easybuild/easyconfigs/b/Boost/Boost-1.49.0-gimkl-0.5.2-Python-2.7.3.eb @@ -0,0 +1,21 @@ +name='Boost' +version='1.49.0' + +homepage='http://www.boost.org/' +description="Boost provides free peer-reviewed portable C++ source libraries." + +toolkit={'name':'gimkl','version':'0.5.2'} +toolkitopts={'pic':True, 'usempi':True} + +sources=['%s_%s.tar.gz'%(name.lower(), '_'.join(version.split('.')))] +sourceURLs=[('http://sourceforge.net/projects/%(name)s/files/%(name)s/%(version)s' % \ + {'name':name.lower(), 'version':version}, 'download')] + +pythonversion='2.7.3' +versionsuffix='-Python-%s'%pythonversion + +dependencies=[('bzip2', '1.0.6'), + ('Python', pythonversion)] + +# also build boost_mpi +boost_mpi=True diff --git a/easybuild/easyconfigs/c/CGAL/CGAL-4.0-gimkl-0.5.2-Python-2.7.3.eb b/easybuild/easyconfigs/c/CGAL/CGAL-4.0-gimkl-0.5.2-Python-2.7.3.eb new file mode 100644 index 0000000000..bae894f51d --- /dev/null +++ b/easybuild/easyconfigs/c/CGAL/CGAL-4.0-gimkl-0.5.2-Python-2.7.3.eb @@ -0,0 +1,21 @@ +name='CGAL' +version='4.0' + +homepage='http://www.cgal.org/' +description="""The goal of the CGAL Open Source Project is to provide easy access to efficient +and reliable geometric algorithms in the form of a C++ library.""" + +toolkit={'name':'gimkl','version':'0.5.2'} + +sources = ['%s-%s.tar.gz' % (name, version)] +sourceURLs = ['http://fenicsproject.org/pub/software/contrib/'] + +pythonversion = '2.7.3' +versionsuffix = "-Python-%s" % pythonversion + +dependencies = [ + ('CMake','2.8.4'), + ('GMP','5.0.5'), + ('Boost','1.49.0', versionsuffix), + ('MPFR','3.1.0'), + ] diff --git a/easybuild/easyconfigs/f/FFC/FFC-1.0.0-gimkl-0.5.2-Python-2.7.3.eb b/easybuild/easyconfigs/f/FFC/FFC-1.0.0-gimkl-0.5.2-Python-2.7.3.eb new file mode 100644 index 0000000000..3c6176a1b5 --- /dev/null +++ b/easybuild/easyconfigs/f/FFC/FFC-1.0.0-gimkl-0.5.2-Python-2.7.3.eb @@ -0,0 +1,34 @@ +easyblock="PythonPackage" + +name='FFC' +version='1.0.0' + +homepage='https://launchpad.net/ffc' +description="""FEniCS Form Compiler (FFC) works as a compiler for multilinear forms by generating +code (C++) for the evaluation of a multilinear form given in mathematical notation.""" + +toolkit={'name':'dummy','version':''} +toolkitsuffix = "-gimkl-0.5.2" + +sources=['%s-%s.tar.gz'%(name.lower(),version)] +majorversion = "%s.x" % ".".join(version.split('.')[:-1]) +sourceURLs=['https://launchpad.net/FFC/%s/%s/+download/' % (majorversion, version)] + +pythonversion = '2.7.3' +pythonshortversion = ".".join(pythonversion.split(".")[:-1]) + +pythonsuffix = "-Python-%s" % pythonversion +versionsuffix = "%s%s" % (toolkitsuffix, pythonsuffix) + +dependencies=[ + ('Python', pythonversion, toolkitsuffix, True), + ('UFL', '1.0.0', versionsuffix, True), + ('FIAT', '1.0.0', versionsuffix, True), + ('UFC', '2.0.5', versionsuffix, True), + ('Viper', '1.0.0', versionsuffix, True), + ] + +sanityCheckPaths = { + 'files': ['bin/ffc'], + 'dirs':['lib/python%s/site-packages/ffc' % pythonshortversion] + } diff --git a/easybuild/easyconfigs/f/FIAT/FIAT-1.0.0-gimkl-0.5.2-Python-2.7.3.eb b/easybuild/easyconfigs/f/FIAT/FIAT-1.0.0-gimkl-0.5.2-Python-2.7.3.eb new file mode 100644 index 0000000000..9f78e59916 --- /dev/null +++ b/easybuild/easyconfigs/f/FIAT/FIAT-1.0.0-gimkl-0.5.2-Python-2.7.3.eb @@ -0,0 +1,31 @@ +easyblock="PythonPackage" + +name='FIAT' +version='1.0.0' + +homepage='https://launchpad.net/fiat' +description="""The FInite element Automatic Tabulator FIAT supports generation of arbitrary order +instances of the Lagrange elements on lines, triangles, and tetrahedra. It is also capable of generating +arbitrary order instances of Jacobi-type quadrature rules on the same element shapes.""" + +toolkit={'name':'dummy','version':''} +toolkitsuffix = "-gimkl-0.5.2" + +sources=['%s-%s.tar.gz'%(name.lower(),version)] +majorversion = "%s.x" % ".".join(version.split('.')[:-1]) +sourceURLs=['https://launchpad.net/FIAT/%s/%s/+download/' % (majorversion, version)] + +pythonversion = '2.7.3' +pythonshortversion = ".".join(pythonversion.split(".")[:-1]) + +versionsuffix = "%s-Python-%s" % (toolkitsuffix, pythonversion) + +dependencies=[ + ('Python', pythonversion, toolkitsuffix, True), + ('ScientificPython','2.8', versionsuffix, True), + ] + +sanityCheckPaths = { + 'files': [], + 'dirs':['lib/python%s/site-packages/FIAT' % pythonshortversion] + } diff --git a/easybuild/easyconfigs/i/Instant/Instant-1.0.0-gimkl-0.5.2-Python-2.7.3.eb b/easybuild/easyconfigs/i/Instant/Instant-1.0.0-gimkl-0.5.2-Python-2.7.3.eb new file mode 100644 index 0000000000..63fe71a0c8 --- /dev/null +++ b/easybuild/easyconfigs/i/Instant/Instant-1.0.0-gimkl-0.5.2-Python-2.7.3.eb @@ -0,0 +1,30 @@ +easyblock="PythonPackage" + +name='Instant' +version='1.0.0' + +homepage='https://launchpad.net/instant' +description="Instant is a Python module that allows for instant inlining of C and C++ code in Python. It is a small Python module built on top of SWIG and Distutils. It is part of the FEniCS Project (http://fenicsproject.org)." + +#dummy toolkit, but we want to load dependencies, so empty version +toolkit={'name':'dummy','version':''} +toolkitversion = '-gimkl-0.5.2' + +sources=['%s-%s.tar.gz'%(name.lower(),version)] +majorversion = "%s.x" % ".".join(version.split('.')[:-1]) +sourceURLs=['https://launchpad.net/instant/%s/%s/+download/' % (majorversion, version)] + +pythonversion = '2.7.3' +pythonshortversion = ".".join(pythonversion.split(".")[:-1]) + +versionsuffix = '%s-Python-%s' % (toolkitversion, pythonversion) + +dependencies=[ + ('Python',pythonversion,toolkitversion,True), + ('SWIG','2.0.4',versionsuffix,True), + ] + +sanityCheckPaths = { + 'files': ['bin/'], + 'dirs':['lib/python%s/site-packages/instant' % pythonshortversion] + } diff --git a/easybuild/easyconfigs/p/ParMETIS/ParMETIS-4.0.2-gimkl-0.5.2.eb b/easybuild/easyconfigs/p/ParMETIS/ParMETIS-4.0.2-gimkl-0.5.2.eb new file mode 100644 index 0000000000..580d934ce9 --- /dev/null +++ b/easybuild/easyconfigs/p/ParMETIS/ParMETIS-4.0.2-gimkl-0.5.2.eb @@ -0,0 +1,17 @@ +easyblock="ParMETIS" + +name='ParMETIS' +version='4.0.2' + +homepage='http://glaros.dtc.umn.edu/gkhome/metis/parmetis/overview' +description="ParMETIS is an MPI-based parallel library that implements a variety of algorithms for partitioning unstructured graphs, meshes, and for computing fill-reducing orderings of sparse matrices. ParMETIS extends the functionality provided by METIS and includes routines that are especially suited for parallel AMR computations and large scale numerical simulations. The algorithms implemented in ParMETIS are based on the parallel multilevel k-way graph-partitioning, adaptive repartitioning, and parallel multi-constrained partitioning schemes." +builddependencies = [ + ('CMake','2.8.4'), + ] + +toolkit={'name':'gimkl','version':'0.5.2'} +toolkitopts={'optarch':True, 'usempi': True} + +sources=['%s-%s.tar.gz' % (name.lower(),version)] +sourceURLs = ['http://glaros.dtc.umn.edu/gkhome/fetch/sw/parmetis', + 'http://glaros.dtc.umn.edu/gkhome/fetch/sw/parmetis/OLD'] diff --git a/easybuild/easyconfigs/s/SCOTCH/SCOTCH-5.1.12b_esmumps-gimkl-0.5.2.eb b/easybuild/easyconfigs/s/SCOTCH/SCOTCH-5.1.12b_esmumps-gimkl-0.5.2.eb new file mode 100644 index 0000000000..5a692a61fc --- /dev/null +++ b/easybuild/easyconfigs/s/SCOTCH/SCOTCH-5.1.12b_esmumps-gimkl-0.5.2.eb @@ -0,0 +1,12 @@ +name='SCOTCH' +version='5.1.12b_esmumps' + +homepage='http://www.labri.fr/perso/pelegrin/scotch/' +description="""Software package and libraries for sequential and parallel graph partitioning, +static mapping, and sparse matrix block ordering, and sequential mesh and hypergraph partitioning.""" + +toolkit={'name':'gimkl','version':'0.5.2'} +toolkitopts={'pic':True} + +sources=['%s_%s.tar.gz'%(name.lower(),version)] +sourceURLs = ['https://gforge.inria.fr/frs/download.php/28978/'] diff --git a/easybuild/easyconfigs/s/SWIG/SWIG-2.0.4-gimkl-0.5.2-Python-2.7.3.eb b/easybuild/easyconfigs/s/SWIG/SWIG-2.0.4-gimkl-0.5.2-Python-2.7.3.eb new file mode 100644 index 0000000000..d1fe27a861 --- /dev/null +++ b/easybuild/easyconfigs/s/SWIG/SWIG-2.0.4-gimkl-0.5.2-Python-2.7.3.eb @@ -0,0 +1,20 @@ +name='SWIG' +version='2.0.4' + +homepage='http://www.swig.org/' +description="""SWIG is a software development tool that connects programs written in C and C++ with +a variety of high-level programming languages.""" + +toolkit={'name':'gimkl','version':'0.5.2'} +toolkitopts={'pic':True,'opt':True,'optarch':True} + +sources=['%s-%s.tar.gz'%(name.lower(),version)] +sourceURLs = ['http://prdownloads.sourceforge.net/swig'] + +pythonversion='2.7.3' +versionsuffix='-Python-%s'%pythonversion + +dependencies=[ + ('Python', pythonversion), + ('PCRE','8.12'), + ] diff --git a/easybuild/easyconfigs/s/SuiteSparse/SuiteSparse-3.7.0-gimkl-0.5.2-withparmetis.eb b/easybuild/easyconfigs/s/SuiteSparse/SuiteSparse-3.7.0-gimkl-0.5.2-withparmetis.eb new file mode 100644 index 0000000000..a4de30788f --- /dev/null +++ b/easybuild/easyconfigs/s/SuiteSparse/SuiteSparse-3.7.0-gimkl-0.5.2-withparmetis.eb @@ -0,0 +1,14 @@ +name='SuiteSparse' +version='3.7.0' +versionsuffix='-withparmetis' + +homepage='http://www.cise.ufl.edu/research/sparse/SuiteSparse/' +description="SuiteSparse is a collection of libraries manipulate sparse matrices." + +toolkit={'name':'gimkl','version':'0.5.2'} +toolkitopts={'opt':True, 'unroll':True, 'pic':True, 'intel-static':True} + +sources=['%s-%s.tar.gz'%(name,version)] +sourceURLs = ['http://www.cise.ufl.edu/research/sparse/SuiteSparse'] + +dependencies=[('ParMETIS','4.0.2')] diff --git a/easybuild/easyconfigs/u/UFC/UFC-2.0.5-gimkl-0.5.2-Python-2.7.3.eb b/easybuild/easyconfigs/u/UFC/UFC-2.0.5-gimkl-0.5.2-Python-2.7.3.eb new file mode 100644 index 0000000000..0052fcf4e0 --- /dev/null +++ b/easybuild/easyconfigs/u/UFC/UFC-2.0.5-gimkl-0.5.2-Python-2.7.3.eb @@ -0,0 +1,25 @@ +name='UFC' +version='2.0.5' + +homepage='https://launchpad.net/ufc' +description="""UFC (Unified Form-assembly Code) is a unified framework for finite element assembly. +More precisely, it defines a fixed interface for communicating low level routines (functions) for +evaluating and assembling finite element variational forms.""" + +toolkit={'name':'gimkl','version':'0.5.2'} + +sources=['%s-%s.tar.gz'%(name.lower(),version)] +majorversion = "%s.x" % ".".join(version.split('.')[:-1]) +sourceURLs=['https://launchpad.net/ufc/%s/%s/+download/' % (majorversion, version) ] + +pythonversion = '2.7.3' +versionsuffix = "-Python-%s" % pythonversion + +dependencies=[ + ('Python',pythonversion), + ('Boost','1.49.0',versionsuffix), + ('Instant','1.0.0', versionsuffix), + ('SWIG','2.0.4',versionsuffix), + ] + +builddependencies = [('CMake','2.8.4')] diff --git a/easybuild/easyconfigs/u/UFL/UFL-1.0.0-gimkl-0.5.2-Python-2.7.3.eb b/easybuild/easyconfigs/u/UFL/UFL-1.0.0-gimkl-0.5.2-Python-2.7.3.eb new file mode 100644 index 0000000000..d201d28068 --- /dev/null +++ b/easybuild/easyconfigs/u/UFL/UFL-1.0.0-gimkl-0.5.2-Python-2.7.3.eb @@ -0,0 +1,26 @@ +easyblock="PythonPackage" + +name='UFL' +version='1.0.0' + +homepage='https://launchpad.net/ufl' +description="The Unified Form Language (UFL) is a domain specific language for declaration of finite element discretizations of variational forms. More precisely, it defines a flexible interface for choosing finite element spaces and defining expressions for weak forms in a notation close to mathematical notation." + +toolkit={'name':'dummy','version':''} +toolkitsuffix = "-gimkl-0.5.2" + +sources=['%s-%s.tar.gz'%(name.lower(),version)] +majorversion = "%s.x" % ".".join(version.split('.')[:-1]) +sourceURLs=['https://launchpad.net/UFL/%s/%s/+download/' % (majorversion, version)] + +pythonversion = '2.7.3' +pythonshortversion = ".".join(pythonversion.split(".")[:-1]) + +versionsuffix = "%s-Python-%s" % (toolkitsuffix, pythonversion) + +dependencies=[('Python',pythonversion,toolkitsuffix,True)] + +sanityCheckPaths = { + 'files': ['bin/%s' % x for x in ["form2ufl","ufl2py","ufl-analyse","ufl-convert","ufl-version"]], + 'dirs':['lib/python%s/site-packages/ufl' % pythonshortversion] + } diff --git a/easybuild/easyconfigs/v/Viper/Viper-1.0.0-gimkl-0.5.2-Python-2.7.3.eb b/easybuild/easyconfigs/v/Viper/Viper-1.0.0-gimkl-0.5.2-Python-2.7.3.eb new file mode 100644 index 0000000000..9108b184dc --- /dev/null +++ b/easybuild/easyconfigs/v/Viper/Viper-1.0.0-gimkl-0.5.2-Python-2.7.3.eb @@ -0,0 +1,27 @@ +easyblock="PythonPackage" + +name='Viper' +version='1.0.0' + +homepage='https://launchpad.net/fenics-viper' +description="""Viper is a minimalistic scientific plotter and run-time visualization module. +Viper has support for visualizing meshes and solutions in DOLFIN.""" + +toolkit={'name':'dummy','version':''} +toolkitsuffix = "-gimkl-0.5.2" + +sources=['%s-%s.tar.gz'%(name.lower(),version)] +majorversion = "%s.x" % ".".join(version.split('.')[:-1]) +sourceURLs=['https://launchpad.net/fenics-viper/%s/%s/+download/' % (majorversion, version)] + +pythonversion = '2.7.3' +pythonshortversion = ".".join(pythonversion.split(".")[:-1]) + +versionsuffix = "%s-Python-%s" % (toolkitsuffix, pythonversion) + +dependencies=[('Python',pythonversion,toolkitsuffix,True)] + +sanityCheckPaths = { + 'files': ['bin/'], + 'dirs':['lib/python%s/site-packages/viper' % pythonshortversion] + } diff --git a/easybuild/easyconfigs/z/zlib/zlib-1.2.7-gimkl-0.5.2.eb b/easybuild/easyconfigs/z/zlib/zlib-1.2.7-gimkl-0.5.2.eb new file mode 100644 index 0000000000..eb916546c1 --- /dev/null +++ b/easybuild/easyconfigs/z/zlib/zlib-1.2.7-gimkl-0.5.2.eb @@ -0,0 +1,20 @@ +name='zlib' +version='1.2.7' + +homepage='http://www.zlib.net/' +description="""zlib is designed to be a free, general-purpose, legally unencumbered -- that is, +not covered by any patents -- lossless data-compression library for use on virtually any +computer hardware and operating system.""" + +toolkit={'name':'gimkl','version':'0.5.2'} +toolkitopts={'optarch':True, 'pic':True} + +sources=['%s-%s.tar.gz'%(name.lower(), version)] +sourceURLs=[('http://sourceforge.net/projects/libpng/files/zlib/%s' % version, 'download')] + +preconfigopts='LDSHARED="$CC -shared"' + +sanityCheckPaths={ + 'files':["include/zconf.h", "include/zlib.h", "lib/libz.a", "lib/libz.so"], + 'dirs':[] + } From 4aee735aa016aaa826444b684c6552fda191b28c Mon Sep 17 00:00:00 2001 From: Jens Timmerman Date: Thu, 5 Jul 2012 18:01:03 +0200 Subject: [PATCH 461/798] added gimkl .eb file for python --- .../p/Python/Python-2.7.3-gimkl-0.5.2.eb | 29 +++++++++++++++++++ 1 file changed, 29 insertions(+) create mode 100644 easybuild/easyconfigs/p/Python/Python-2.7.3-gimkl-0.5.2.eb diff --git a/easybuild/easyconfigs/p/Python/Python-2.7.3-gimkl-0.5.2.eb b/easybuild/easyconfigs/p/Python/Python-2.7.3-gimkl-0.5.2.eb new file mode 100644 index 0000000000..c3455b9db0 --- /dev/null +++ b/easybuild/easyconfigs/p/Python/Python-2.7.3-gimkl-0.5.2.eb @@ -0,0 +1,29 @@ +name='Python' +version='2.7.3' + +homepage='http://python.org/' +description="Python is a programming language that lets you work more quickly and integrate your systems more effectively." + +toolkit={'name':'gimkl','version':'0.5.2'} +toolkitopts={'pic':True,'opt':True,'optarch':True} + +numpyversion = '1.6.1' +scipyversion = '0.10.1' + +# order is important! +pkglist=[ + ('nose','1.1.2'), # used extends unit testing + ('numpy',numpyversion), + ('scipy',scipyversion), +] + +sources=['%s-%s.tgz'%(name,version)] +sourceURLs=[ + 'http://www.python.org/ftp/%s/%s/' % (name.lower(),version), # Python + 'http://pypi.python.org/packages/source/n/nose/', # nose + ('http://sourceforge.net/projects/numpy/files/NumPy/%s' % numpyversion, 'download'), # numpy + ('http://sourceforge.net/projects/scipy/files/scipy/%s' % scipyversion, 'download'), # scipy + +] + +configopts="--with-threads --enable-shared" From 279a8874c6365f273ad2f6647232f46fce1ba2bf Mon Sep 17 00:00:00 2001 From: Jens Timmerman Date: Thu, 5 Jul 2012 18:02:38 +0200 Subject: [PATCH 462/798] added gimkl .eb file for CMake --- .../c/CMake/CMake-2.8.4-gimkl-0.5.2.eb | 21 +++++++++++++++++++ 1 file changed, 21 insertions(+) create mode 100644 easybuild/easyconfigs/c/CMake/CMake-2.8.4-gimkl-0.5.2.eb diff --git a/easybuild/easyconfigs/c/CMake/CMake-2.8.4-gimkl-0.5.2.eb b/easybuild/easyconfigs/c/CMake/CMake-2.8.4-gimkl-0.5.2.eb new file mode 100644 index 0000000000..2bcc8c8bc3 --- /dev/null +++ b/easybuild/easyconfigs/c/CMake/CMake-2.8.4-gimkl-0.5.2.eb @@ -0,0 +1,21 @@ +# we need to build with Application, not with CMake easyblock +easyblock="Application" + +name='CMake' +version='2.8.4' + +homepage='http://www.cmake.org' +description="""CMake, the cross-platform, open-source build system. +CMake is a family of tools designed to build, test and package software.""" + +toolkit={'name':'gimkl','version':'0.5.2'} + +sources=['%s-%s.tar.gz'%(name.lower(),version)] + +majorversion = ".".join(version.split('.')[:-1]) +sourceURLs = ['http://www.cmake.org/files/v%s' % majorversion] + +sanityCheckPaths={ + 'files':["bin/%s" % x for x in ['cmake','cpack','ctest']], + 'dirs':[] + } From 1eaa7c5a497f985df34c9f7444fac7a443f5fab0 Mon Sep 17 00:00:00 2001 From: Jens Timmerman Date: Thu, 5 Jul 2012 18:04:48 +0200 Subject: [PATCH 463/798] added even more gimkl .eb files for dolfin dependencies --- .../b/bzip2/bzip2-1.0.6-gimkl-0.5.2.eb | 13 +++++++++ .../p/PCRE/PCRE-8.12-gimkl-0.5.2.eb | 13 +++++++++ ...ificPython-2.8-gimkl-0.5.2-Python-2.7.3.eb | 27 +++++++++++++++++++ 3 files changed, 53 insertions(+) create mode 100644 easybuild/easyconfigs/b/bzip2/bzip2-1.0.6-gimkl-0.5.2.eb create mode 100644 easybuild/easyconfigs/p/PCRE/PCRE-8.12-gimkl-0.5.2.eb create mode 100644 easybuild/easyconfigs/s/ScientificPython/ScientificPython-2.8-gimkl-0.5.2-Python-2.7.3.eb diff --git a/easybuild/easyconfigs/b/bzip2/bzip2-1.0.6-gimkl-0.5.2.eb b/easybuild/easyconfigs/b/bzip2/bzip2-1.0.6-gimkl-0.5.2.eb new file mode 100644 index 0000000000..d328ed7b99 --- /dev/null +++ b/easybuild/easyconfigs/b/bzip2/bzip2-1.0.6-gimkl-0.5.2.eb @@ -0,0 +1,13 @@ +name='bzip2' +version='1.0.6' + +homepage='http://www.bzip.org/' +description="""bzip2 is a freely available, patent free, high-quality data compressor. It typically +compresses files to within 10% to 15% of the best available techniques (the PPM family of statistical +compressors), whilst being around twice as fast at compression and six times faster at decompression.""" + +toolkit={'name':'gimkl','version':'0.5.2'} +toolkitopts={'pic':True} + +sources=['%s-%s.tar.gz'%(name, version)] +sourceURLs=['http://www.bzip.org/%s/' % version] \ No newline at end of file diff --git a/easybuild/easyconfigs/p/PCRE/PCRE-8.12-gimkl-0.5.2.eb b/easybuild/easyconfigs/p/PCRE/PCRE-8.12-gimkl-0.5.2.eb new file mode 100644 index 0000000000..1e83ae53ea --- /dev/null +++ b/easybuild/easyconfigs/p/PCRE/PCRE-8.12-gimkl-0.5.2.eb @@ -0,0 +1,13 @@ +name='PCRE' +version='8.12' + +homepage='http://www.pcre.org/' +description="The PCRE library is a set of functions that implement regular expression pattern matching using the same syntax and semantics as Perl 5." + +toolkit={'name':'gimkl','version':'0.5.2'} +toolkitopts={'optarch':True, 'pic':True} + +configopts="--with-pic --disable-cpp" + +sources=['%s-%s.tar.gz'%(name.lower(),version)] +sourceURLs=['http://prdownloads.sourceforge.net/pcre'] diff --git a/easybuild/easyconfigs/s/ScientificPython/ScientificPython-2.8-gimkl-0.5.2-Python-2.7.3.eb b/easybuild/easyconfigs/s/ScientificPython/ScientificPython-2.8-gimkl-0.5.2-Python-2.7.3.eb new file mode 100644 index 0000000000..6a831d11e4 --- /dev/null +++ b/easybuild/easyconfigs/s/ScientificPython/ScientificPython-2.8-gimkl-0.5.2-Python-2.7.3.eb @@ -0,0 +1,27 @@ +easyblock="PythonPackage" + +name='ScientificPython' +version='2.8' + +homepage='https://sourcesup.cru.fr/projects/scientific-py/' +description="""ScientificPython is a collection of Python modules for scientific computing. +It contains support for geometry, mathematical functions, statistics, physical units, IO, visualization, +and parallelization.""" + +toolkit={'name':'dummy','version':''} +toolkitsuffix = "-gimkl-0.5.2" + +sources=['%s-%s.tar.gz'%(name,version)] +sourceURLs = ['https://sourcesup.renater.fr/frs/download.php/2309'] + +pythonversion = '2.7.3' +pythonshortversion = ".".join(pythonversion.split(".")[:-1]) + +versionsuffix = "%s-Python-%s" % (toolkitsuffix, pythonversion) + +dependencies=[('Python',pythonversion,toolkitsuffix,True)] + +sanityCheckPaths = { + 'files': [], + 'dirs':['lib/python%s/site-packages/Scientific' % pythonshortversion] + } From 41653f779eb8246669999d30f055435ac3dfe38c Mon Sep 17 00:00:00 2001 From: Jens Timmerman Date: Thu, 5 Jul 2012 18:10:16 +0200 Subject: [PATCH 464/798] added gimkl .eb file for dolfin --- .../DOLFIN-1.0.0-gimkl-0.5.2-Python-2.7.3.eb | 44 +++++++++++++++++++ 1 file changed, 44 insertions(+) create mode 100644 easybuild/easyconfigs/d/DOLFIN/DOLFIN-1.0.0-gimkl-0.5.2-Python-2.7.3.eb diff --git a/easybuild/easyconfigs/d/DOLFIN/DOLFIN-1.0.0-gimkl-0.5.2-Python-2.7.3.eb b/easybuild/easyconfigs/d/DOLFIN/DOLFIN-1.0.0-gimkl-0.5.2-Python-2.7.3.eb new file mode 100644 index 0000000000..260cb2ef3f --- /dev/null +++ b/easybuild/easyconfigs/d/DOLFIN/DOLFIN-1.0.0-gimkl-0.5.2-Python-2.7.3.eb @@ -0,0 +1,44 @@ +name='DOLFIN' +version='1.0.0' + +homepage='https://launchpad.net/dolfin' +description="""DOLFIN is the C++/Python interface of FEniCS, providing a consistent PSE +(Problem Solving Environment) for ordinary and partial differential equations.""" + +toolkit={'name':'gimkl','version':'0.5.2'} +toolkitopts={'usempi':True, 'packed-groups':False} + +majver = version.split('.') +if majver[0] == '0': + majver = majver[0] +else: + majver = '.'.join(majver[0:2]) + +sources=['%s-%s.tar.gz'%(name.lower(),version)] +sourceURLs=['https://launchpad.net/%s/%s.x/%s/+download' % (name.lower(), majver, version)] + +patches=['wl_pkg_linkflags.patch'] + +builddependencies = [('CMake', '2.8.4')] + +python_version = '2.7.3' +versionsuffix = '-Python-%s' % (python_version) + +dependencies=[ + ('Python', python_version), + ('Boost', '1.49.0', versionsuffix ), + ('UFC', '2.0.5', versionsuffix), + ('SWIG','2.0.4',versionsuffix), + ('FFC', '1.0.0', versionsuffix), + ('FIAT', '1.0.0', versionsuffix), + ('Instant', '1.0.0', versionsuffix), + ('Viper', '1.0.0', versionsuffix), + ('UFL', '1.0.0', versionsuffix), + ('SCOTCH', '5.1.12b_esmumps'), + ('Armadillo', '2.4.4', versionsuffix), + ('ParMETIS', '4.0.2'), + ('SuiteSparse', '3.7.0', '-withparmetis'), + ('CGAL', '4.0', versionsuffix), + ('zlib', '1.2.7'), + ('libxml2', '2.8.0') + ] From f719a5d596175d9e3103bf1420a42c387e612ef8 Mon Sep 17 00:00:00 2001 From: Jens Timmerman Date: Thu, 5 Jul 2012 18:11:56 +0200 Subject: [PATCH 465/798] added gimkl .eb file for mpfr, libxml2 and gmp --- .../g/GMP/GMP-5.0.5-gimkl-0.5.2.eb | 18 ++++++++++++++++++ .../l/libxml2/libxml2-2.8.0-gimkl-0.5.2.eb | 14 ++++++++++++++ .../m/MPFR/MPFR-3.1.0-gimkl-0.5.2.eb | 19 +++++++++++++++++++ 3 files changed, 51 insertions(+) create mode 100644 easybuild/easyconfigs/g/GMP/GMP-5.0.5-gimkl-0.5.2.eb create mode 100644 easybuild/easyconfigs/l/libxml2/libxml2-2.8.0-gimkl-0.5.2.eb create mode 100644 easybuild/easyconfigs/m/MPFR/MPFR-3.1.0-gimkl-0.5.2.eb diff --git a/easybuild/easyconfigs/g/GMP/GMP-5.0.5-gimkl-0.5.2.eb b/easybuild/easyconfigs/g/GMP/GMP-5.0.5-gimkl-0.5.2.eb new file mode 100644 index 0000000000..595efd199b --- /dev/null +++ b/easybuild/easyconfigs/g/GMP/GMP-5.0.5-gimkl-0.5.2.eb @@ -0,0 +1,18 @@ +name='GMP' +version='5.0.5' + +homepage='http://gmplib.org/' +description="""GMP is a free library for arbitrary precision arithmetic, +operating on signed integers, rational numbers, and floating point numbers. """ + +toolkit={'name':'gimkl','version':'0.5.2'} + +sources=['%s-%s.tar.bz2'%(name.lower(),version)] +sourceURLs = ['http://ftp.gnu.org/gnu/gmp'] + +runtest='check' + +sanityCheckPaths={ + 'files':['lib/libgmp.so','include/gmp.h'], + 'dirs':[] + } diff --git a/easybuild/easyconfigs/l/libxml2/libxml2-2.8.0-gimkl-0.5.2.eb b/easybuild/easyconfigs/l/libxml2/libxml2-2.8.0-gimkl-0.5.2.eb new file mode 100644 index 0000000000..1f48bb84d2 --- /dev/null +++ b/easybuild/easyconfigs/l/libxml2/libxml2-2.8.0-gimkl-0.5.2.eb @@ -0,0 +1,14 @@ +name='libxml2' +version='2.8.0' + +homepage='http://xmlsoft.org/' +description="""Libxml2 is the XML C parser and toolkit developed for the Gnome project (but usable +outside of the Gnome platform).""" + +toolkit={'name':'gimkl','version':'0.5.2'} + +configopts="CC=$CC CXX=$CXX --with-pic" + +sources=['%s-%s.tar.gz'%(name.lower(),version)] +sourceURLs=['http://xmlsoft.org/sources/', + 'http://xmlsoft.org/sources/old/'] \ No newline at end of file diff --git a/easybuild/easyconfigs/m/MPFR/MPFR-3.1.0-gimkl-0.5.2.eb b/easybuild/easyconfigs/m/MPFR/MPFR-3.1.0-gimkl-0.5.2.eb new file mode 100644 index 0000000000..ee7056b524 --- /dev/null +++ b/easybuild/easyconfigs/m/MPFR/MPFR-3.1.0-gimkl-0.5.2.eb @@ -0,0 +1,19 @@ +name='MPFR' +version='3.1.0' + +homepage='http://www.mpfr.org' +description="""The MPFR library is a C library for multiple-precision +floating-point computations with correct rounding.""" + +toolkit={'name':'gimkl','version':'0.5.2'} + +sources=['%s-%s.tar.bz2'%(name.lower(),version)] +sourceURLs = ['http://www.mpfr.org/mpfr-current/'] + +dependencies=[('GMP','5.0.5')] + +runtest='check' +sanityCheckPaths={ + 'files':['lib/libmpfr.so','include/mpfr.h'], + 'dirs':[] + } From 6b3a424dddc229a97f43e6120b18bdb0719d0f1f Mon Sep 17 00:00:00 2001 From: Jens Timmerman Date: Fri, 6 Jul 2012 11:01:34 +0200 Subject: [PATCH 466/798] gimkl should not load icc anywhere, fixed this with imkl-GCC and bumped version of gimkl everywhere --- ...madillo-2.4.4-gimkl-0.5.3-Python-2.7.3.eb} | 2 +- ... Boost-1.49.0-gimkl-0.5.3-Python-2.7.3.eb} | 2 +- ...kl-0.5.2.eb => bzip2-1.0.6-gimkl-0.5.3.eb} | 2 +- ...b => CGAL-4.0-gimkl-0.5.3-Python-2.7.3.eb} | 2 +- ...kl-0.5.2.eb => CMake-2.8.4-gimkl-0.5.3.eb} | 2 +- ... DOLFIN-1.0.0-gimkl-0.5.3-Python-2.7.3.eb} | 2 +- ... => FFC-1.0.0-gimkl-0.5.3-Python-2.7.3.eb} | 2 +- ...=> FIAT-1.0.0-gimkl-0.5.3-Python-2.7.3.eb} | 2 +- ...imkl-0.5.2.eb => GMP-5.0.5-gimkl-0.5.3.eb} | 2 +- .../gimkl/{gimkl-0.5.2.eb => gimkl-0.5.3.eb} | 4 ++-- ...Instant-1.0.0-gimkl-0.5.3-Python-2.7.3.eb} | 2 +- .../easyconfigs/i/imkl/imkl-10.3.6.233-GCC.eb | 23 +++++++++++++++++++ ...-0.5.2.eb => libxml2-2.8.0-gimkl-0.5.3.eb} | 2 +- ...mkl-0.5.2.eb => MPFR-3.1.0-gimkl-0.5.3.eb} | 2 +- ...imkl-0.5.2.eb => PCRE-8.12-gimkl-0.5.3.eb} | 2 +- ...0.5.2.eb => ParMETIS-4.0.2-gimkl-0.5.3.eb} | 2 +- ...l-0.5.2.eb => Python-2.7.3-gimkl-0.5.3.eb} | 2 +- ... => SCOTCH-5.1.12b_esmumps-gimkl-0.5.3.eb} | 2 +- ...=> SWIG-2.0.4-gimkl-0.5.3-Python-2.7.3.eb} | 2 +- ...ficPython-2.8-gimkl-0.5.3-Python-2.7.3.eb} | 2 +- ...eSparse-3.7.0-gimkl-0.5.3-withparmetis.eb} | 2 +- ... => UFC-2.0.5-gimkl-0.5.3-Python-2.7.3.eb} | 2 +- ... => UFL-1.0.0-gimkl-0.5.3-Python-2.7.3.eb} | 2 +- ...> Viper-1.0.0-gimkl-0.5.3-Python-2.7.3.eb} | 2 +- ...mkl-0.5.2.eb => zlib-1.2.7-gimkl-0.5.3.eb} | 2 +- 25 files changed, 48 insertions(+), 25 deletions(-) rename easybuild/easyconfigs/a/Armadillo/{Armadillo-2.4.4-gimkl-0.5.2-Python-2.7.3.eb => Armadillo-2.4.4-gimkl-0.5.3-Python-2.7.3.eb} (93%) rename easybuild/easyconfigs/b/Boost/{Boost-1.49.0-gimkl-0.5.2-Python-2.7.3.eb => Boost-1.49.0-gimkl-0.5.3-Python-2.7.3.eb} (93%) rename easybuild/easyconfigs/b/bzip2/{bzip2-1.0.6-gimkl-0.5.2.eb => bzip2-1.0.6-gimkl-0.5.3.eb} (91%) rename easybuild/easyconfigs/c/CGAL/{CGAL-4.0-gimkl-0.5.2-Python-2.7.3.eb => CGAL-4.0-gimkl-0.5.3-Python-2.7.3.eb} (93%) rename easybuild/easyconfigs/c/CMake/{CMake-2.8.4-gimkl-0.5.2.eb => CMake-2.8.4-gimkl-0.5.3.eb} (93%) rename easybuild/easyconfigs/d/DOLFIN/{DOLFIN-1.0.0-gimkl-0.5.2-Python-2.7.3.eb => DOLFIN-1.0.0-gimkl-0.5.3-Python-2.7.3.eb} (97%) rename easybuild/easyconfigs/f/FFC/{FFC-1.0.0-gimkl-0.5.2-Python-2.7.3.eb => FFC-1.0.0-gimkl-0.5.3-Python-2.7.3.eb} (97%) rename easybuild/easyconfigs/f/FIAT/{FIAT-1.0.0-gimkl-0.5.2-Python-2.7.3.eb => FIAT-1.0.0-gimkl-0.5.3-Python-2.7.3.eb} (97%) rename easybuild/easyconfigs/g/GMP/{GMP-5.0.5-gimkl-0.5.2.eb => GMP-5.0.5-gimkl-0.5.3.eb} (91%) rename easybuild/easyconfigs/g/gimkl/{gimkl-0.5.2.eb => gimkl-0.5.3.eb} (88%) rename easybuild/easyconfigs/i/Instant/{Instant-1.0.0-gimkl-0.5.2-Python-2.7.3.eb => Instant-1.0.0-gimkl-0.5.3-Python-2.7.3.eb} (97%) create mode 100644 easybuild/easyconfigs/i/imkl/imkl-10.3.6.233-GCC.eb rename easybuild/easyconfigs/l/libxml2/{libxml2-2.8.0-gimkl-0.5.2.eb => libxml2-2.8.0-gimkl-0.5.3.eb} (89%) rename easybuild/easyconfigs/m/MPFR/{MPFR-3.1.0-gimkl-0.5.2.eb => MPFR-3.1.0-gimkl-0.5.3.eb} (91%) rename easybuild/easyconfigs/p/PCRE/{PCRE-8.12-gimkl-0.5.2.eb => PCRE-8.12-gimkl-0.5.3.eb} (90%) rename easybuild/easyconfigs/p/ParMETIS/{ParMETIS-4.0.2-gimkl-0.5.2.eb => ParMETIS-4.0.2-gimkl-0.5.3.eb} (95%) rename easybuild/easyconfigs/p/Python/{Python-2.7.3-gimkl-0.5.2.eb => Python-2.7.3-gimkl-0.5.3.eb} (95%) rename easybuild/easyconfigs/s/SCOTCH/{SCOTCH-5.1.12b_esmumps-gimkl-0.5.2.eb => SCOTCH-5.1.12b_esmumps-gimkl-0.5.3.eb} (90%) rename easybuild/easyconfigs/s/SWIG/{SWIG-2.0.4-gimkl-0.5.2-Python-2.7.3.eb => SWIG-2.0.4-gimkl-0.5.3-Python-2.7.3.eb} (92%) rename easybuild/easyconfigs/s/ScientificPython/{ScientificPython-2.8-gimkl-0.5.2-Python-2.7.3.eb => ScientificPython-2.8-gimkl-0.5.3-Python-2.7.3.eb} (96%) rename easybuild/easyconfigs/s/SuiteSparse/{SuiteSparse-3.7.0-gimkl-0.5.2-withparmetis.eb => SuiteSparse-3.7.0-gimkl-0.5.3-withparmetis.eb} (90%) rename easybuild/easyconfigs/u/UFC/{UFC-2.0.5-gimkl-0.5.2-Python-2.7.3.eb => UFC-2.0.5-gimkl-0.5.3-Python-2.7.3.eb} (95%) rename easybuild/easyconfigs/u/UFL/{UFL-1.0.0-gimkl-0.5.2-Python-2.7.3.eb => UFL-1.0.0-gimkl-0.5.3-Python-2.7.3.eb} (97%) rename easybuild/easyconfigs/v/Viper/{Viper-1.0.0-gimkl-0.5.2-Python-2.7.3.eb => Viper-1.0.0-gimkl-0.5.3-Python-2.7.3.eb} (96%) rename easybuild/easyconfigs/z/zlib/{zlib-1.2.7-gimkl-0.5.2.eb => zlib-1.2.7-gimkl-0.5.3.eb} (94%) diff --git a/easybuild/easyconfigs/a/Armadillo/Armadillo-2.4.4-gimkl-0.5.2-Python-2.7.3.eb b/easybuild/easyconfigs/a/Armadillo/Armadillo-2.4.4-gimkl-0.5.3-Python-2.7.3.eb similarity index 93% rename from easybuild/easyconfigs/a/Armadillo/Armadillo-2.4.4-gimkl-0.5.2-Python-2.7.3.eb rename to easybuild/easyconfigs/a/Armadillo/Armadillo-2.4.4-gimkl-0.5.3-Python-2.7.3.eb index 39d7ba5bbb..2cdaea8986 100644 --- a/easybuild/easyconfigs/a/Armadillo/Armadillo-2.4.4-gimkl-0.5.2-Python-2.7.3.eb +++ b/easybuild/easyconfigs/a/Armadillo/Armadillo-2.4.4-gimkl-0.5.3-Python-2.7.3.eb @@ -6,7 +6,7 @@ description="""Armadillo is an open-source C++ linear algebra library (matrix ma a good balance between speed and ease of use. Integer, floating point and complex numbers are supported, as well as a subset of trigonometric and statistics functions.""" -toolkit={'name':'gimkl','version':'0.5.2'} +toolkit={'name':'gimkl','version':'0.5.3'} sources=['%s-%s.tar.gz'%(name.lower(),version)] sourceURLs=['http://sourceforge.net/projects/arma/files'] diff --git a/easybuild/easyconfigs/b/Boost/Boost-1.49.0-gimkl-0.5.2-Python-2.7.3.eb b/easybuild/easyconfigs/b/Boost/Boost-1.49.0-gimkl-0.5.3-Python-2.7.3.eb similarity index 93% rename from easybuild/easyconfigs/b/Boost/Boost-1.49.0-gimkl-0.5.2-Python-2.7.3.eb rename to easybuild/easyconfigs/b/Boost/Boost-1.49.0-gimkl-0.5.3-Python-2.7.3.eb index e4bcd14c8f..96912f77da 100644 --- a/easybuild/easyconfigs/b/Boost/Boost-1.49.0-gimkl-0.5.2-Python-2.7.3.eb +++ b/easybuild/easyconfigs/b/Boost/Boost-1.49.0-gimkl-0.5.3-Python-2.7.3.eb @@ -4,7 +4,7 @@ version='1.49.0' homepage='http://www.boost.org/' description="Boost provides free peer-reviewed portable C++ source libraries." -toolkit={'name':'gimkl','version':'0.5.2'} +toolkit={'name':'gimkl','version':'0.5.3'} toolkitopts={'pic':True, 'usempi':True} sources=['%s_%s.tar.gz'%(name.lower(), '_'.join(version.split('.')))] diff --git a/easybuild/easyconfigs/b/bzip2/bzip2-1.0.6-gimkl-0.5.2.eb b/easybuild/easyconfigs/b/bzip2/bzip2-1.0.6-gimkl-0.5.3.eb similarity index 91% rename from easybuild/easyconfigs/b/bzip2/bzip2-1.0.6-gimkl-0.5.2.eb rename to easybuild/easyconfigs/b/bzip2/bzip2-1.0.6-gimkl-0.5.3.eb index d328ed7b99..34cc55c578 100644 --- a/easybuild/easyconfigs/b/bzip2/bzip2-1.0.6-gimkl-0.5.2.eb +++ b/easybuild/easyconfigs/b/bzip2/bzip2-1.0.6-gimkl-0.5.3.eb @@ -6,7 +6,7 @@ description="""bzip2 is a freely available, patent free, high-quality data compr compresses files to within 10% to 15% of the best available techniques (the PPM family of statistical compressors), whilst being around twice as fast at compression and six times faster at decompression.""" -toolkit={'name':'gimkl','version':'0.5.2'} +toolkit={'name':'gimkl','version':'0.5.3'} toolkitopts={'pic':True} sources=['%s-%s.tar.gz'%(name, version)] diff --git a/easybuild/easyconfigs/c/CGAL/CGAL-4.0-gimkl-0.5.2-Python-2.7.3.eb b/easybuild/easyconfigs/c/CGAL/CGAL-4.0-gimkl-0.5.3-Python-2.7.3.eb similarity index 93% rename from easybuild/easyconfigs/c/CGAL/CGAL-4.0-gimkl-0.5.2-Python-2.7.3.eb rename to easybuild/easyconfigs/c/CGAL/CGAL-4.0-gimkl-0.5.3-Python-2.7.3.eb index bae894f51d..2db704cdd5 100644 --- a/easybuild/easyconfigs/c/CGAL/CGAL-4.0-gimkl-0.5.2-Python-2.7.3.eb +++ b/easybuild/easyconfigs/c/CGAL/CGAL-4.0-gimkl-0.5.3-Python-2.7.3.eb @@ -5,7 +5,7 @@ homepage='http://www.cgal.org/' description="""The goal of the CGAL Open Source Project is to provide easy access to efficient and reliable geometric algorithms in the form of a C++ library.""" -toolkit={'name':'gimkl','version':'0.5.2'} +toolkit={'name':'gimkl','version':'0.5.3'} sources = ['%s-%s.tar.gz' % (name, version)] sourceURLs = ['http://fenicsproject.org/pub/software/contrib/'] diff --git a/easybuild/easyconfigs/c/CMake/CMake-2.8.4-gimkl-0.5.2.eb b/easybuild/easyconfigs/c/CMake/CMake-2.8.4-gimkl-0.5.3.eb similarity index 93% rename from easybuild/easyconfigs/c/CMake/CMake-2.8.4-gimkl-0.5.2.eb rename to easybuild/easyconfigs/c/CMake/CMake-2.8.4-gimkl-0.5.3.eb index 2bcc8c8bc3..42f5f2bc12 100644 --- a/easybuild/easyconfigs/c/CMake/CMake-2.8.4-gimkl-0.5.2.eb +++ b/easybuild/easyconfigs/c/CMake/CMake-2.8.4-gimkl-0.5.3.eb @@ -8,7 +8,7 @@ homepage='http://www.cmake.org' description="""CMake, the cross-platform, open-source build system. CMake is a family of tools designed to build, test and package software.""" -toolkit={'name':'gimkl','version':'0.5.2'} +toolkit={'name':'gimkl','version':'0.5.3'} sources=['%s-%s.tar.gz'%(name.lower(),version)] diff --git a/easybuild/easyconfigs/d/DOLFIN/DOLFIN-1.0.0-gimkl-0.5.2-Python-2.7.3.eb b/easybuild/easyconfigs/d/DOLFIN/DOLFIN-1.0.0-gimkl-0.5.3-Python-2.7.3.eb similarity index 97% rename from easybuild/easyconfigs/d/DOLFIN/DOLFIN-1.0.0-gimkl-0.5.2-Python-2.7.3.eb rename to easybuild/easyconfigs/d/DOLFIN/DOLFIN-1.0.0-gimkl-0.5.3-Python-2.7.3.eb index 260cb2ef3f..7f0ec48fba 100644 --- a/easybuild/easyconfigs/d/DOLFIN/DOLFIN-1.0.0-gimkl-0.5.2-Python-2.7.3.eb +++ b/easybuild/easyconfigs/d/DOLFIN/DOLFIN-1.0.0-gimkl-0.5.3-Python-2.7.3.eb @@ -5,7 +5,7 @@ homepage='https://launchpad.net/dolfin' description="""DOLFIN is the C++/Python interface of FEniCS, providing a consistent PSE (Problem Solving Environment) for ordinary and partial differential equations.""" -toolkit={'name':'gimkl','version':'0.5.2'} +toolkit={'name':'gimkl','version':'0.5.3'} toolkitopts={'usempi':True, 'packed-groups':False} majver = version.split('.') diff --git a/easybuild/easyconfigs/f/FFC/FFC-1.0.0-gimkl-0.5.2-Python-2.7.3.eb b/easybuild/easyconfigs/f/FFC/FFC-1.0.0-gimkl-0.5.3-Python-2.7.3.eb similarity index 97% rename from easybuild/easyconfigs/f/FFC/FFC-1.0.0-gimkl-0.5.2-Python-2.7.3.eb rename to easybuild/easyconfigs/f/FFC/FFC-1.0.0-gimkl-0.5.3-Python-2.7.3.eb index 3c6176a1b5..cb92e76a34 100644 --- a/easybuild/easyconfigs/f/FFC/FFC-1.0.0-gimkl-0.5.2-Python-2.7.3.eb +++ b/easybuild/easyconfigs/f/FFC/FFC-1.0.0-gimkl-0.5.3-Python-2.7.3.eb @@ -8,7 +8,7 @@ description="""FEniCS Form Compiler (FFC) works as a compiler for multilinear fo code (C++) for the evaluation of a multilinear form given in mathematical notation.""" toolkit={'name':'dummy','version':''} -toolkitsuffix = "-gimkl-0.5.2" +toolkitsuffix = "-gimkl-0.5.3" sources=['%s-%s.tar.gz'%(name.lower(),version)] majorversion = "%s.x" % ".".join(version.split('.')[:-1]) diff --git a/easybuild/easyconfigs/f/FIAT/FIAT-1.0.0-gimkl-0.5.2-Python-2.7.3.eb b/easybuild/easyconfigs/f/FIAT/FIAT-1.0.0-gimkl-0.5.3-Python-2.7.3.eb similarity index 97% rename from easybuild/easyconfigs/f/FIAT/FIAT-1.0.0-gimkl-0.5.2-Python-2.7.3.eb rename to easybuild/easyconfigs/f/FIAT/FIAT-1.0.0-gimkl-0.5.3-Python-2.7.3.eb index 9f78e59916..56a7c001ec 100644 --- a/easybuild/easyconfigs/f/FIAT/FIAT-1.0.0-gimkl-0.5.2-Python-2.7.3.eb +++ b/easybuild/easyconfigs/f/FIAT/FIAT-1.0.0-gimkl-0.5.3-Python-2.7.3.eb @@ -9,7 +9,7 @@ instances of the Lagrange elements on lines, triangles, and tetrahedra. It is al arbitrary order instances of Jacobi-type quadrature rules on the same element shapes.""" toolkit={'name':'dummy','version':''} -toolkitsuffix = "-gimkl-0.5.2" +toolkitsuffix = "-gimkl-0.5.3" sources=['%s-%s.tar.gz'%(name.lower(),version)] majorversion = "%s.x" % ".".join(version.split('.')[:-1]) diff --git a/easybuild/easyconfigs/g/GMP/GMP-5.0.5-gimkl-0.5.2.eb b/easybuild/easyconfigs/g/GMP/GMP-5.0.5-gimkl-0.5.3.eb similarity index 91% rename from easybuild/easyconfigs/g/GMP/GMP-5.0.5-gimkl-0.5.2.eb rename to easybuild/easyconfigs/g/GMP/GMP-5.0.5-gimkl-0.5.3.eb index 595efd199b..52fc500408 100644 --- a/easybuild/easyconfigs/g/GMP/GMP-5.0.5-gimkl-0.5.2.eb +++ b/easybuild/easyconfigs/g/GMP/GMP-5.0.5-gimkl-0.5.3.eb @@ -5,7 +5,7 @@ homepage='http://gmplib.org/' description="""GMP is a free library for arbitrary precision arithmetic, operating on signed integers, rational numbers, and floating point numbers. """ -toolkit={'name':'gimkl','version':'0.5.2'} +toolkit={'name':'gimkl','version':'0.5.3'} sources=['%s-%s.tar.bz2'%(name.lower(),version)] sourceURLs = ['http://ftp.gnu.org/gnu/gmp'] diff --git a/easybuild/easyconfigs/g/gimkl/gimkl-0.5.2.eb b/easybuild/easyconfigs/g/gimkl/gimkl-0.5.3.eb similarity index 88% rename from easybuild/easyconfigs/g/gimkl/gimkl-0.5.2.eb rename to easybuild/easyconfigs/g/gimkl/gimkl-0.5.3.eb index 439c4c7adc..94ec4ee2fc 100644 --- a/easybuild/easyconfigs/g/gimkl/gimkl-0.5.2.eb +++ b/easybuild/easyconfigs/g/gimkl/gimkl-0.5.3.eb @@ -1,7 +1,7 @@ easyblock="Toolkit" name='gimkl' -version='0.5.2' +version='0.5.3' 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, Intel MKL and Intel Trace Analyzer and Trace Collector""" @@ -11,7 +11,7 @@ toolkit={'name':'dummy','version':'dummy'} dependencies=[ {'name':'GCC', 'version': '4.6.2'}, {'name':'impi','version':'4.0.2.003'}, - {'name':'imkl','version':'10.3.6.233'}, + {'name':'imkl','version':'10.3.6.233-GCC'}, ] ## compiler class diff --git a/easybuild/easyconfigs/i/Instant/Instant-1.0.0-gimkl-0.5.2-Python-2.7.3.eb b/easybuild/easyconfigs/i/Instant/Instant-1.0.0-gimkl-0.5.3-Python-2.7.3.eb similarity index 97% rename from easybuild/easyconfigs/i/Instant/Instant-1.0.0-gimkl-0.5.2-Python-2.7.3.eb rename to easybuild/easyconfigs/i/Instant/Instant-1.0.0-gimkl-0.5.3-Python-2.7.3.eb index 63fe71a0c8..4e2f7b0200 100644 --- a/easybuild/easyconfigs/i/Instant/Instant-1.0.0-gimkl-0.5.2-Python-2.7.3.eb +++ b/easybuild/easyconfigs/i/Instant/Instant-1.0.0-gimkl-0.5.3-Python-2.7.3.eb @@ -8,7 +8,7 @@ description="Instant is a Python module that allows for instant inlining of C an #dummy toolkit, but we want to load dependencies, so empty version toolkit={'name':'dummy','version':''} -toolkitversion = '-gimkl-0.5.2' +toolkitversion = '-gimkl-0.5.3' sources=['%s-%s.tar.gz'%(name.lower(),version)] majorversion = "%s.x" % ".".join(version.split('.')[:-1]) diff --git a/easybuild/easyconfigs/i/imkl/imkl-10.3.6.233-GCC.eb b/easybuild/easyconfigs/i/imkl/imkl-10.3.6.233-GCC.eb new file mode 100644 index 0000000000..ea223294d0 --- /dev/null +++ b/easybuild/easyconfigs/i/imkl/imkl-10.3.6.233-GCC.eb @@ -0,0 +1,23 @@ +name='imkl' +version='10.3.6.233' + +homepage='http://software.intel.com/en-us/intel-mkl/' +description="""Intel Math Kernel Library is a library of highly optimized, extensively threaded math routines for science, engineering, and financial applications that require maximum performance. Core math functions include BLAS, LAPACK, ScaLAPACK, Sparse Solvers, Fast Fourier Transforms, Vector Math, and more.""" + +toolkit={'name':'dummy','version':'dummy'} + +sources=['l_mkl_%s_intel64.tgz'%version] + +## deps for interface build +dependencies=[{'name':'GCC',},{'name':'ifort','version':'2011.6.233'},{'name':'impi','version':'4.0.2.003'}] + +## compiler class +moduleclass='lib' + +dontcreateinstalldir='True' + +## licensepath +import os +license=os.path.join(os.getenv('HOME'),"licenses","intel","license.lic") + +interfaces=True diff --git a/easybuild/easyconfigs/l/libxml2/libxml2-2.8.0-gimkl-0.5.2.eb b/easybuild/easyconfigs/l/libxml2/libxml2-2.8.0-gimkl-0.5.3.eb similarity index 89% rename from easybuild/easyconfigs/l/libxml2/libxml2-2.8.0-gimkl-0.5.2.eb rename to easybuild/easyconfigs/l/libxml2/libxml2-2.8.0-gimkl-0.5.3.eb index 1f48bb84d2..9b94d127ba 100644 --- a/easybuild/easyconfigs/l/libxml2/libxml2-2.8.0-gimkl-0.5.2.eb +++ b/easybuild/easyconfigs/l/libxml2/libxml2-2.8.0-gimkl-0.5.3.eb @@ -5,7 +5,7 @@ homepage='http://xmlsoft.org/' description="""Libxml2 is the XML C parser and toolkit developed for the Gnome project (but usable outside of the Gnome platform).""" -toolkit={'name':'gimkl','version':'0.5.2'} +toolkit={'name':'gimkl','version':'0.5.3'} configopts="CC=$CC CXX=$CXX --with-pic" diff --git a/easybuild/easyconfigs/m/MPFR/MPFR-3.1.0-gimkl-0.5.2.eb b/easybuild/easyconfigs/m/MPFR/MPFR-3.1.0-gimkl-0.5.3.eb similarity index 91% rename from easybuild/easyconfigs/m/MPFR/MPFR-3.1.0-gimkl-0.5.2.eb rename to easybuild/easyconfigs/m/MPFR/MPFR-3.1.0-gimkl-0.5.3.eb index ee7056b524..824952e0fb 100644 --- a/easybuild/easyconfigs/m/MPFR/MPFR-3.1.0-gimkl-0.5.2.eb +++ b/easybuild/easyconfigs/m/MPFR/MPFR-3.1.0-gimkl-0.5.3.eb @@ -5,7 +5,7 @@ homepage='http://www.mpfr.org' description="""The MPFR library is a C library for multiple-precision floating-point computations with correct rounding.""" -toolkit={'name':'gimkl','version':'0.5.2'} +toolkit={'name':'gimkl','version':'0.5.3'} sources=['%s-%s.tar.bz2'%(name.lower(),version)] sourceURLs = ['http://www.mpfr.org/mpfr-current/'] diff --git a/easybuild/easyconfigs/p/PCRE/PCRE-8.12-gimkl-0.5.2.eb b/easybuild/easyconfigs/p/PCRE/PCRE-8.12-gimkl-0.5.3.eb similarity index 90% rename from easybuild/easyconfigs/p/PCRE/PCRE-8.12-gimkl-0.5.2.eb rename to easybuild/easyconfigs/p/PCRE/PCRE-8.12-gimkl-0.5.3.eb index 1e83ae53ea..16676226e1 100644 --- a/easybuild/easyconfigs/p/PCRE/PCRE-8.12-gimkl-0.5.2.eb +++ b/easybuild/easyconfigs/p/PCRE/PCRE-8.12-gimkl-0.5.3.eb @@ -4,7 +4,7 @@ version='8.12' homepage='http://www.pcre.org/' description="The PCRE library is a set of functions that implement regular expression pattern matching using the same syntax and semantics as Perl 5." -toolkit={'name':'gimkl','version':'0.5.2'} +toolkit={'name':'gimkl','version':'0.5.3'} toolkitopts={'optarch':True, 'pic':True} configopts="--with-pic --disable-cpp" diff --git a/easybuild/easyconfigs/p/ParMETIS/ParMETIS-4.0.2-gimkl-0.5.2.eb b/easybuild/easyconfigs/p/ParMETIS/ParMETIS-4.0.2-gimkl-0.5.3.eb similarity index 95% rename from easybuild/easyconfigs/p/ParMETIS/ParMETIS-4.0.2-gimkl-0.5.2.eb rename to easybuild/easyconfigs/p/ParMETIS/ParMETIS-4.0.2-gimkl-0.5.3.eb index 580d934ce9..2e636230c7 100644 --- a/easybuild/easyconfigs/p/ParMETIS/ParMETIS-4.0.2-gimkl-0.5.2.eb +++ b/easybuild/easyconfigs/p/ParMETIS/ParMETIS-4.0.2-gimkl-0.5.3.eb @@ -9,7 +9,7 @@ builddependencies = [ ('CMake','2.8.4'), ] -toolkit={'name':'gimkl','version':'0.5.2'} +toolkit={'name':'gimkl','version':'0.5.3'} toolkitopts={'optarch':True, 'usempi': True} sources=['%s-%s.tar.gz' % (name.lower(),version)] diff --git a/easybuild/easyconfigs/p/Python/Python-2.7.3-gimkl-0.5.2.eb b/easybuild/easyconfigs/p/Python/Python-2.7.3-gimkl-0.5.3.eb similarity index 95% rename from easybuild/easyconfigs/p/Python/Python-2.7.3-gimkl-0.5.2.eb rename to easybuild/easyconfigs/p/Python/Python-2.7.3-gimkl-0.5.3.eb index c3455b9db0..ee2e7d58ed 100644 --- a/easybuild/easyconfigs/p/Python/Python-2.7.3-gimkl-0.5.2.eb +++ b/easybuild/easyconfigs/p/Python/Python-2.7.3-gimkl-0.5.3.eb @@ -4,7 +4,7 @@ version='2.7.3' homepage='http://python.org/' description="Python is a programming language that lets you work more quickly and integrate your systems more effectively." -toolkit={'name':'gimkl','version':'0.5.2'} +toolkit={'name':'gimkl','version':'0.5.3'} toolkitopts={'pic':True,'opt':True,'optarch':True} numpyversion = '1.6.1' diff --git a/easybuild/easyconfigs/s/SCOTCH/SCOTCH-5.1.12b_esmumps-gimkl-0.5.2.eb b/easybuild/easyconfigs/s/SCOTCH/SCOTCH-5.1.12b_esmumps-gimkl-0.5.3.eb similarity index 90% rename from easybuild/easyconfigs/s/SCOTCH/SCOTCH-5.1.12b_esmumps-gimkl-0.5.2.eb rename to easybuild/easyconfigs/s/SCOTCH/SCOTCH-5.1.12b_esmumps-gimkl-0.5.3.eb index 5a692a61fc..8ffa6d2067 100644 --- a/easybuild/easyconfigs/s/SCOTCH/SCOTCH-5.1.12b_esmumps-gimkl-0.5.2.eb +++ b/easybuild/easyconfigs/s/SCOTCH/SCOTCH-5.1.12b_esmumps-gimkl-0.5.3.eb @@ -5,7 +5,7 @@ homepage='http://www.labri.fr/perso/pelegrin/scotch/' description="""Software package and libraries for sequential and parallel graph partitioning, static mapping, and sparse matrix block ordering, and sequential mesh and hypergraph partitioning.""" -toolkit={'name':'gimkl','version':'0.5.2'} +toolkit={'name':'gimkl','version':'0.5.3'} toolkitopts={'pic':True} sources=['%s_%s.tar.gz'%(name.lower(),version)] diff --git a/easybuild/easyconfigs/s/SWIG/SWIG-2.0.4-gimkl-0.5.2-Python-2.7.3.eb b/easybuild/easyconfigs/s/SWIG/SWIG-2.0.4-gimkl-0.5.3-Python-2.7.3.eb similarity index 92% rename from easybuild/easyconfigs/s/SWIG/SWIG-2.0.4-gimkl-0.5.2-Python-2.7.3.eb rename to easybuild/easyconfigs/s/SWIG/SWIG-2.0.4-gimkl-0.5.3-Python-2.7.3.eb index d1fe27a861..23f12c4121 100644 --- a/easybuild/easyconfigs/s/SWIG/SWIG-2.0.4-gimkl-0.5.2-Python-2.7.3.eb +++ b/easybuild/easyconfigs/s/SWIG/SWIG-2.0.4-gimkl-0.5.3-Python-2.7.3.eb @@ -5,7 +5,7 @@ homepage='http://www.swig.org/' description="""SWIG is a software development tool that connects programs written in C and C++ with a variety of high-level programming languages.""" -toolkit={'name':'gimkl','version':'0.5.2'} +toolkit={'name':'gimkl','version':'0.5.3'} toolkitopts={'pic':True,'opt':True,'optarch':True} sources=['%s-%s.tar.gz'%(name.lower(),version)] diff --git a/easybuild/easyconfigs/s/ScientificPython/ScientificPython-2.8-gimkl-0.5.2-Python-2.7.3.eb b/easybuild/easyconfigs/s/ScientificPython/ScientificPython-2.8-gimkl-0.5.3-Python-2.7.3.eb similarity index 96% rename from easybuild/easyconfigs/s/ScientificPython/ScientificPython-2.8-gimkl-0.5.2-Python-2.7.3.eb rename to easybuild/easyconfigs/s/ScientificPython/ScientificPython-2.8-gimkl-0.5.3-Python-2.7.3.eb index 6a831d11e4..ed4c1779b1 100644 --- a/easybuild/easyconfigs/s/ScientificPython/ScientificPython-2.8-gimkl-0.5.2-Python-2.7.3.eb +++ b/easybuild/easyconfigs/s/ScientificPython/ScientificPython-2.8-gimkl-0.5.3-Python-2.7.3.eb @@ -9,7 +9,7 @@ It contains support for geometry, mathematical functions, statistics, physical u and parallelization.""" toolkit={'name':'dummy','version':''} -toolkitsuffix = "-gimkl-0.5.2" +toolkitsuffix = "-gimkl-0.5.3" sources=['%s-%s.tar.gz'%(name,version)] sourceURLs = ['https://sourcesup.renater.fr/frs/download.php/2309'] diff --git a/easybuild/easyconfigs/s/SuiteSparse/SuiteSparse-3.7.0-gimkl-0.5.2-withparmetis.eb b/easybuild/easyconfigs/s/SuiteSparse/SuiteSparse-3.7.0-gimkl-0.5.3-withparmetis.eb similarity index 90% rename from easybuild/easyconfigs/s/SuiteSparse/SuiteSparse-3.7.0-gimkl-0.5.2-withparmetis.eb rename to easybuild/easyconfigs/s/SuiteSparse/SuiteSparse-3.7.0-gimkl-0.5.3-withparmetis.eb index a4de30788f..58b3980338 100644 --- a/easybuild/easyconfigs/s/SuiteSparse/SuiteSparse-3.7.0-gimkl-0.5.2-withparmetis.eb +++ b/easybuild/easyconfigs/s/SuiteSparse/SuiteSparse-3.7.0-gimkl-0.5.3-withparmetis.eb @@ -5,7 +5,7 @@ versionsuffix='-withparmetis' homepage='http://www.cise.ufl.edu/research/sparse/SuiteSparse/' description="SuiteSparse is a collection of libraries manipulate sparse matrices." -toolkit={'name':'gimkl','version':'0.5.2'} +toolkit={'name':'gimkl','version':'0.5.3'} toolkitopts={'opt':True, 'unroll':True, 'pic':True, 'intel-static':True} sources=['%s-%s.tar.gz'%(name,version)] diff --git a/easybuild/easyconfigs/u/UFC/UFC-2.0.5-gimkl-0.5.2-Python-2.7.3.eb b/easybuild/easyconfigs/u/UFC/UFC-2.0.5-gimkl-0.5.3-Python-2.7.3.eb similarity index 95% rename from easybuild/easyconfigs/u/UFC/UFC-2.0.5-gimkl-0.5.2-Python-2.7.3.eb rename to easybuild/easyconfigs/u/UFC/UFC-2.0.5-gimkl-0.5.3-Python-2.7.3.eb index 0052fcf4e0..f861225d2e 100644 --- a/easybuild/easyconfigs/u/UFC/UFC-2.0.5-gimkl-0.5.2-Python-2.7.3.eb +++ b/easybuild/easyconfigs/u/UFC/UFC-2.0.5-gimkl-0.5.3-Python-2.7.3.eb @@ -6,7 +6,7 @@ description="""UFC (Unified Form-assembly Code) is a unified framework for finit More precisely, it defines a fixed interface for communicating low level routines (functions) for evaluating and assembling finite element variational forms.""" -toolkit={'name':'gimkl','version':'0.5.2'} +toolkit={'name':'gimkl','version':'0.5.3'} sources=['%s-%s.tar.gz'%(name.lower(),version)] majorversion = "%s.x" % ".".join(version.split('.')[:-1]) diff --git a/easybuild/easyconfigs/u/UFL/UFL-1.0.0-gimkl-0.5.2-Python-2.7.3.eb b/easybuild/easyconfigs/u/UFL/UFL-1.0.0-gimkl-0.5.3-Python-2.7.3.eb similarity index 97% rename from easybuild/easyconfigs/u/UFL/UFL-1.0.0-gimkl-0.5.2-Python-2.7.3.eb rename to easybuild/easyconfigs/u/UFL/UFL-1.0.0-gimkl-0.5.3-Python-2.7.3.eb index d201d28068..43d046004d 100644 --- a/easybuild/easyconfigs/u/UFL/UFL-1.0.0-gimkl-0.5.2-Python-2.7.3.eb +++ b/easybuild/easyconfigs/u/UFL/UFL-1.0.0-gimkl-0.5.3-Python-2.7.3.eb @@ -7,7 +7,7 @@ homepage='https://launchpad.net/ufl' description="The Unified Form Language (UFL) is a domain specific language for declaration of finite element discretizations of variational forms. More precisely, it defines a flexible interface for choosing finite element spaces and defining expressions for weak forms in a notation close to mathematical notation." toolkit={'name':'dummy','version':''} -toolkitsuffix = "-gimkl-0.5.2" +toolkitsuffix = "-gimkl-0.5.3" sources=['%s-%s.tar.gz'%(name.lower(),version)] majorversion = "%s.x" % ".".join(version.split('.')[:-1]) diff --git a/easybuild/easyconfigs/v/Viper/Viper-1.0.0-gimkl-0.5.2-Python-2.7.3.eb b/easybuild/easyconfigs/v/Viper/Viper-1.0.0-gimkl-0.5.3-Python-2.7.3.eb similarity index 96% rename from easybuild/easyconfigs/v/Viper/Viper-1.0.0-gimkl-0.5.2-Python-2.7.3.eb rename to easybuild/easyconfigs/v/Viper/Viper-1.0.0-gimkl-0.5.3-Python-2.7.3.eb index 9108b184dc..5c4dec98aa 100644 --- a/easybuild/easyconfigs/v/Viper/Viper-1.0.0-gimkl-0.5.2-Python-2.7.3.eb +++ b/easybuild/easyconfigs/v/Viper/Viper-1.0.0-gimkl-0.5.3-Python-2.7.3.eb @@ -8,7 +8,7 @@ description="""Viper is a minimalistic scientific plotter and run-time visualiza Viper has support for visualizing meshes and solutions in DOLFIN.""" toolkit={'name':'dummy','version':''} -toolkitsuffix = "-gimkl-0.5.2" +toolkitsuffix = "-gimkl-0.5.3" sources=['%s-%s.tar.gz'%(name.lower(),version)] majorversion = "%s.x" % ".".join(version.split('.')[:-1]) diff --git a/easybuild/easyconfigs/z/zlib/zlib-1.2.7-gimkl-0.5.2.eb b/easybuild/easyconfigs/z/zlib/zlib-1.2.7-gimkl-0.5.3.eb similarity index 94% rename from easybuild/easyconfigs/z/zlib/zlib-1.2.7-gimkl-0.5.2.eb rename to easybuild/easyconfigs/z/zlib/zlib-1.2.7-gimkl-0.5.3.eb index eb916546c1..9d7dc3650e 100644 --- a/easybuild/easyconfigs/z/zlib/zlib-1.2.7-gimkl-0.5.2.eb +++ b/easybuild/easyconfigs/z/zlib/zlib-1.2.7-gimkl-0.5.3.eb @@ -6,7 +6,7 @@ description="""zlib is designed to be a free, general-purpose, legally unencumbe not covered by any patents -- lossless data-compression library for use on virtually any computer hardware and operating system.""" -toolkit={'name':'gimkl','version':'0.5.2'} +toolkit={'name':'gimkl','version':'0.5.3'} toolkitopts={'optarch':True, 'pic':True} sources=['%s-%s.tar.gz'%(name.lower(), version)] From 8d48b395baeff311416e19ba00354e4ee84ad4c9 Mon Sep 17 00:00:00 2001 From: Jens Timmerman Date: Fri, 6 Jul 2012 11:04:18 +0200 Subject: [PATCH 467/798] added versionsuffix to imkl --- easybuild/easyconfigs/i/imkl/imkl-10.3.6.233-GCC.eb | 1 + 1 file changed, 1 insertion(+) diff --git a/easybuild/easyconfigs/i/imkl/imkl-10.3.6.233-GCC.eb b/easybuild/easyconfigs/i/imkl/imkl-10.3.6.233-GCC.eb index ea223294d0..1c1bb0b70b 100644 --- a/easybuild/easyconfigs/i/imkl/imkl-10.3.6.233-GCC.eb +++ b/easybuild/easyconfigs/i/imkl/imkl-10.3.6.233-GCC.eb @@ -1,5 +1,6 @@ name='imkl' version='10.3.6.233' +versionsuffix='-GCC' homepage='http://software.intel.com/en-us/intel-mkl/' description="""Intel Math Kernel Library is a library of highly optimized, extensively threaded math routines for science, engineering, and financial applications that require maximum performance. Core math functions include BLAS, LAPACK, ScaLAPACK, Sparse Solvers, Fast Fourier Transforms, Vector Math, and more.""" From 22569ab5f72e23ef098a951f4783dba869ba5600 Mon Sep 17 00:00:00 2001 From: Jens Timmerman Date: Fri, 6 Jul 2012 12:19:39 +0200 Subject: [PATCH 468/798] add compiler=gnu to gcc version of imkl, and ifort is no dependency since we have gfortran --- easybuild/easyconfigs/i/imkl/imkl-10.3.6.233-GCC.eb | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/easybuild/easyconfigs/i/imkl/imkl-10.3.6.233-GCC.eb b/easybuild/easyconfigs/i/imkl/imkl-10.3.6.233-GCC.eb index 1c1bb0b70b..b3a2afcd35 100644 --- a/easybuild/easyconfigs/i/imkl/imkl-10.3.6.233-GCC.eb +++ b/easybuild/easyconfigs/i/imkl/imkl-10.3.6.233-GCC.eb @@ -10,13 +10,19 @@ toolkit={'name':'dummy','version':'dummy'} sources=['l_mkl_%s_intel64.tgz'%version] ## deps for interface build -dependencies=[{'name':'GCC',},{'name':'ifort','version':'2011.6.233'},{'name':'impi','version':'4.0.2.003'}] +dependencies=[ + {'name':'GCC', 'version': '4.6.2'}, + {'name':'impi','version':'4.0.2.003'}, + ] ## compiler class moduleclass='lib' dontcreateinstalldir='True' +## make opts for gcc +makeopts='compiler=gnu' + ## licensepath import os license=os.path.join(os.getenv('HOME'),"licenses","intel","license.lic") From 2dcbea3b1f575ef7a261f5ae1e1a2580b5e272c3 Mon Sep 17 00:00:00 2001 From: Jens Timmerman Date: Fri, 6 Jul 2012 12:27:54 +0200 Subject: [PATCH 469/798] check for gcc in imkl, if present, use it instead of icc --- easybuild/easyblocks/i/imkl.py | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/easybuild/easyblocks/i/imkl.py b/easybuild/easyblocks/i/imkl.py index 52e884ca7a..83abcde964 100644 --- a/easybuild/easyblocks/i/imkl.py +++ b/easybuild/easyblocks/i/imkl.py @@ -159,6 +159,11 @@ def postproc(self): except: self.log.exception("Can't change to interfaces directory %s" % (interfacedir)) + # compiler defaults to icc, but we could be using gcc to create gimkl. + makeopts = '' + if os.getenv('SOFTROOTGCC'): + makeopts += 'compiler=gnu ' + for i in lis1 + lis2 + lis3: if i in lis1: # use INSTALL_DIR and CFLAGS and COPTS @@ -170,9 +175,10 @@ def postproc(self): # use INSTALL_DIR and SPEC_OPT extramakeopts = '' if os.getenv('SOFTROOTMPICH2'): - extramakeopts = 'mpi=mpich2' - cmd = "make -f makefile libintel64 %s" % extramakeopts + extramakeopts += 'mpi=mpich2' + ## Use INSTALL_DIR and CFLAGS and COPTS + cmd = "make -f makefile libintel64 %s %s" % (makeopts, extramakeopts) for opt in ['', '-fPIC']: try: From 9af88ff6ee050b6bb80f19cc43324071c667ca23 Mon Sep 17 00:00:00 2001 From: Jens Timmerman Date: Tue, 10 Jul 2012 15:41:42 +0200 Subject: [PATCH 470/798] fixed parmetis's use of get_openmp_flag, added patches to Python .eb file --- easybuild/easyblocks/p/parmetis.py | 5 ++--- .../easyconfigs/p/Python/Python-2.7.3-goalf-1.1.0-no-OFED.eb | 5 +++++ 2 files changed, 7 insertions(+), 3 deletions(-) diff --git a/easybuild/easyblocks/p/parmetis.py b/easybuild/easyblocks/p/parmetis.py index 04d58566ec..5cbb131ea6 100644 --- a/easybuild/easyblocks/p/parmetis.py +++ b/easybuild/easyblocks/p/parmetis.py @@ -23,7 +23,6 @@ from distutils.version import LooseVersion from easybuild.framework.application import Application from easybuild.tools.filetools import run_cmd, mkdir -from easybuild.tools.toolkit import get_openmp_flag class ParMETIS(Application): """Support for building and installing ParMETIS.""" @@ -42,7 +41,7 @@ def configure(self): self.updatecfg('configopts', '-DMETIS_PATH=../metis -DGKLIB_PATH=../metis/GKlib') - self.updatecfg('configopts', '-DOPENMP="%s"' % get_openmp_flag(self.log)) + self.updatecfg('configopts', '-DOPENMP="%s"' % self.tk.get_openmp_flag()) if self.tk.opts['usempi']: self.updatecfg('configopts', '-DCMAKE_C_COMPILER="$MPICC"') @@ -168,4 +167,4 @@ def sanitycheck(self): self.log.info("Customized sanity check paths: %s" % self.getcfg('sanityCheckPaths')) - Application.sanitycheck(self) \ No newline at end of file + Application.sanitycheck(self) diff --git a/easybuild/easyconfigs/p/Python/Python-2.7.3-goalf-1.1.0-no-OFED.eb b/easybuild/easyconfigs/p/Python/Python-2.7.3-goalf-1.1.0-no-OFED.eb index 9033cca060..711090fd87 100644 --- a/easybuild/easyconfigs/p/Python/Python-2.7.3-goalf-1.1.0-no-OFED.eb +++ b/easybuild/easyconfigs/p/Python/Python-2.7.3-goalf-1.1.0-no-OFED.eb @@ -26,4 +26,9 @@ sourceURLs=[ ] +patches=['python_libffi_int128_icc.patch'] + +pkgpatches=[('numpy', ['numpy-1.6.1_distutils_multiple-lib-dirs.patch'])] + + configopts="--with-threads --enable-shared" From b4b7afef3c784281d2adf1f11083ac1ca1586c26 Mon Sep 17 00:00:00 2001 From: Jens Timmerman Date: Tue, 10 Jul 2012 16:43:18 +0200 Subject: [PATCH 471/798] use get_openmp_flag properly in dolfin --- easybuild/easyblocks/d/dolfin.py | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/easybuild/easyblocks/d/dolfin.py b/easybuild/easyblocks/d/dolfin.py index c0f749eccf..713806e39f 100644 --- a/easybuild/easyblocks/d/dolfin.py +++ b/easybuild/easyblocks/d/dolfin.py @@ -21,7 +21,6 @@ import os from easybuild.easyblocks.c.cmakepythonpackage import CMakePythonPackage from easybuild.tools.modules import get_software_root -from easybuild.tools.toolkit import get_openmp_flag class DOLFIN(CMakePythonPackage): """Extension of the CMakePythonPackage for Dolfin. @@ -96,7 +95,7 @@ def configure(self): self.updatecfg('configopts', ' -DCGAL_DIR:PATH="$SOFTROOTCGAL"') # set correct openmp options - openmp = get_openmp_flag(self.log) + openmp = self.tk.get_openmp_flag() self.updatecfg('configopts', ' -DOpenMP_CXX_FLAGS="%s"' % openmp) self.updatecfg('configopts', ' -DOpenMP_C_FLAGS="%s"' % openmp) From 4340c9d209b37fc8b38a7a775140f96e233e2036 Mon Sep 17 00:00:00 2001 From: Kenneth Hoste Date: Fri, 3 Aug 2012 23:29:28 +0200 Subject: [PATCH 472/798] two empty lines before class --- easybuild/easyblocks/c/cmake.py | 1 + easybuild/easyblocks/d/dolfin.py | 1 + 2 files changed, 2 insertions(+) diff --git a/easybuild/easyblocks/c/cmake.py b/easybuild/easyblocks/c/cmake.py index e682c4fe86..0e94cf931c 100644 --- a/easybuild/easyblocks/c/cmake.py +++ b/easybuild/easyblocks/c/cmake.py @@ -22,6 +22,7 @@ from easybuild.framework.application import Application from easybuild.tools.filetools import run_cmd + class CMake(Application): """Support for configuring build with CMake instead of traditional configure script""" diff --git a/easybuild/easyblocks/d/dolfin.py b/easybuild/easyblocks/d/dolfin.py index 713806e39f..5c2820f0c5 100644 --- a/easybuild/easyblocks/d/dolfin.py +++ b/easybuild/easyblocks/d/dolfin.py @@ -22,6 +22,7 @@ from easybuild.easyblocks.c.cmakepythonpackage import CMakePythonPackage from easybuild.tools.modules import get_software_root + class DOLFIN(CMakePythonPackage): """Extension of the CMakePythonPackage for Dolfin. From 5cb79bf69caa83f7866905d6d9b40ce6b9f020da Mon Sep 17 00:00:00 2001 From: Kenneth Hoste Date: Fri, 3 Aug 2012 23:49:43 +0200 Subject: [PATCH 473/798] specify UMFPACK and CHOLMOD include directories explicitly, with UFconfig dir included (required to find UFconfig.h during UMFPACK/CHOLDMOD tests) --- easybuild/easyblocks/d/dolfin.py | 18 ++++++++++-------- 1 file changed, 10 insertions(+), 8 deletions(-) diff --git a/easybuild/easyblocks/d/dolfin.py b/easybuild/easyblocks/d/dolfin.py index 5c2820f0c5..a05ba483d6 100644 --- a/easybuild/easyblocks/d/dolfin.py +++ b/easybuild/easyblocks/d/dolfin.py @@ -75,14 +75,16 @@ def configure(self): # SuiteSparse config params suitesparse = depsdict['SuiteSparse'] - umfpack_params = ' -DUMFPACK_DIR="%s/UMFPACK"' % suitesparse - umfpack_params += ' -DAMD_DIR="%s/UMFPACK"' % suitesparse - umfpack_params += ' -DCHOLMOD_DIR="%s/CHOLMOD"' % suitesparse - umfpack_params += ' -DUFCONFIG_DIR="%s/UFconfig"' % suitesparse - umfpack_params += ' -DCAMD_LIBRARY:PATH="%s/CAMD/lib/libcamd.a"' % suitesparse - umfpack_params += ' -DCCOLAMD_LIBRARY:PATH="%s/CCOLAMD/lib/libccolamd.a"' % suitesparse - umfpack_params += ' -DCOLAMD_LIBRARY:PATH="%s/COLAMD/lib/libcolamd.a"' % suitesparse - self.updatecfg('configopts', umfpack_params) + umfpack_params = ' -DUMFPACK_DIR="%(sp)s/UMFPACK"' + umfpack_params += ' -DUMFPACK_INCLUDE_DIRS="%(sp)s/UMFPACK/include;%(sp)s/UFconfig"' + umfpack_params += ' -DAMD_DIR="%(sp)s/UMFPACK"' + umfpack_params += ' -DCHOLMOD_DIR="%(sp)s/CHOLMOD"' + umfpack_params += ' -DCHOLMOD_INCLUDE_DIRS="%(sp)s/CHOLMOD/include;%(sp)s/UFconfig"' + umfpack_params += ' -DUFCONFIG_DIR="%(sp)s/UFconfig"' + umfpack_params += ' -DCAMD_LIBRARY:PATH="%(sp)s/CAMD/lib/libcamd.a"' + umfpack_params += ' -DCCOLAMD_LIBRARY:PATH="%(sp)s/CCOLAMD/lib/libccolamd.a"' + umfpack_params += ' -DCOLAMD_LIBRARY:PATH="%(sp)s/COLAMD/lib/libcolamd.a"' + self.updatecfg('configopts', umfpack_params % {'sp':suitesparse}) # ParMETIS and SCOTCH self.updatecfg('configopts', ' -DPARMETIS_DIR="%s"' % depsdict['ParMETIS']) From eae42d755ba29cbc13f9ed6c613299c138db2a5e Mon Sep 17 00:00:00 2001 From: Kenneth Hoste Date: Tue, 7 Aug 2012 08:58:34 +0200 Subject: [PATCH 474/798] fix addEasyconfig in GItRepository (why was it commented out?) --- easybuild/tools/repository.py | 9 ++------- 1 file changed, 2 insertions(+), 7 deletions(-) diff --git a/easybuild/tools/repository.py b/easybuild/tools/repository.py index c799859584..b2c12d7c72 100644 --- a/easybuild/tools/repository.py +++ b/easybuild/tools/repository.py @@ -222,19 +222,14 @@ def createWorkingCopy(self): def addEasyconfig(self, cfg, name, version, stats, append): """ Add easyconfig to git repository. - log.debug("Adding cfg: %s with name %s" % (cfg, name)) - if name.startswith(self.wc): - name = name.replace(self.wc, "", 1) #remove self.wc again - name = os.path.join(self.wc, self.path, name) #create proper name, with path inside repo in it - dest = Repository.addEasyconfig(self, cfg, name, version, stats, append) + """ + dest = FileRepository.addEasyconfig(self, cfg, name, version, stats, append) ## add it to version control if dest: try: self.client.add(dest) except GitCommandError, err: log.warning("adding %s to git failed: %s" % (dest, err)) - """ - pass def commit(self, msg=None): """ From 60f1cdbe32055b645cc0fad611286e492267abbc Mon Sep 17 00:00:00 2001 From: Toon Willems Date: Tue, 7 Aug 2012 09:17:29 +0200 Subject: [PATCH 475/798] cleanup easyblock --- easybuild/framework/easyblock.py | 23 +++++++++++++---------- 1 file changed, 13 insertions(+), 10 deletions(-) diff --git a/easybuild/framework/easyblock.py b/easybuild/framework/easyblock.py index 6ebf141b6c..ca16825fef 100644 --- a/easybuild/framework/easyblock.py +++ b/easybuild/framework/easyblock.py @@ -110,7 +110,7 @@ def __init__(self, path, extra_options={}, validate=True): self.log = getLog("EasyBlock") # store toolkit - self._tk = None + self._toolkit = None if not os.path.isfile(path): self.log.error("EasyBlock __init__ expected a valid path") @@ -174,7 +174,7 @@ def validate(self): def validate_os_deps(self): """ validate presence of OS dependencies - osdependencies should be a single list (do not rely on documentation found in application.py! + osdependencies should be a single list """ not_found = [] for dep in self['osdependencies']: @@ -217,16 +217,16 @@ def toolkit(self): """ returns the Toolkit used """ - if self._tk: - return self._tk + if self._toolkit: + return self._toolkit tk = self['toolkit'] tk = Toolkit(tk['name'], tk['version']) if self['toolkitopts']: tk.setOptions(self['toolkitopts']) - self._tk = tk - return self._tk + self._toolkit = tk + return self._toolkit def installversion(self): """ @@ -248,6 +248,7 @@ def name(self): """ return self['name'] + # private method def _validate(self, attr, values): """ validation helper method. attr is the attribute it will check, values are the possible values. @@ -256,7 +257,7 @@ def _validate(self, attr, values): if self[attr] and self[attr] not in values: self.log.error("%s provided %s is not valid: %s" % (attr, self[attr], values)) - + # private method def _os_dependency_check(self, dep): """ Check if package is available from OS. @@ -269,7 +270,7 @@ def _os_dependency_check(self, dep): elif run_cmd('which dpkg', simple=True, log_ok=False): cmd = "dpkg -s %s" % dep else: - # fallback for when os-Dependency is a binary + # fallback for when os-dependency is a binary cmd = "which %s" % dep try: @@ -277,11 +278,11 @@ def _os_dependency_check(self, dep): except: return False - + # private method def _parse_dependency(self, dep): """ parses the dependency into a usable dict with a common format - dep can be a dict a tuple or a list. + dep can be a dict, a tuple or a list. if it is a tuple or a list the attributes are expected to be in the following order: ['name', 'version', 'suffix', 'dummy'] of these attributes, 'name' and 'version' are mandatory @@ -289,6 +290,8 @@ def _parse_dependency(self, dep): output dict contains these attributes: ['name', 'version', 'suffix', 'dummy', 'tk'] """ + self.log.debug("Parsing %s as a dependency" % dep) + attr = ['name', 'version', 'suffix', 'dummy'] dependency = {'name': '', 'version': '', 'suffix': '', 'dummy': False} if isinstance(dep, dict): From 7f87613b02fa0f4c0f8cf22f4b5bbd728d89c2a9 Mon Sep 17 00:00:00 2001 From: Toon Willems Date: Tue, 7 Aug 2012 09:18:42 +0200 Subject: [PATCH 476/798] small cleanup of test/build --- easybuild/test/build.py | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/easybuild/test/build.py b/easybuild/test/build.py index fde18bc42e..b0d07945b4 100644 --- a/easybuild/test/build.py +++ b/easybuild/test/build.py @@ -159,7 +159,7 @@ def setUp(self): def submit_jobs(self, files): """ - Build the given files in parallel using (for now) PBS + Build the given files in parallel by submitting jobs """ # change to current os.chdir(self.cur_dir) @@ -188,8 +188,6 @@ def submit_jobs(self, files): except EasyBuildError, err: self.log.warn("Failed to submit job for easyconfig: %s, error: %s" % (easyconfig, err)) - - def performStep(self, fase, obj, method): """ Perform method on object if it can be build From e96cc2c3bbcb9e7ed660ca6ac67a91c881580524 Mon Sep 17 00:00:00 2001 From: Toon Willems Date: Tue, 7 Aug 2012 10:50:28 +0200 Subject: [PATCH 477/798] initial stab at implementing a True Parallel Builder --- easybuild/build.py | 3 + easybuild/test/build.py | 523 ++++++++++++++++++++-------------------- 2 files changed, 261 insertions(+), 265 deletions(-) diff --git a/easybuild/build.py b/easybuild/build.py index 14512ce2cf..792dfe0446 100644 --- a/easybuild/build.py +++ b/easybuild/build.py @@ -339,6 +339,9 @@ def processEasyconfig(path, log, onlyBlocks=None, regtest_online=False): del eb + # this is used by the parallel builder + package['unresolvedDependencies'] = copy.copy(package['dependencies']) + packages.append(package) return packages diff --git a/easybuild/test/build.py b/easybuild/test/build.py index b0d07945b4..70a8fe13b0 100644 --- a/easybuild/test/build.py +++ b/easybuild/test/build.py @@ -18,6 +18,33 @@ # You should have received a copy of the GNU General Public License # along with EasyBuild. If not, see . ## +""" +regtest script which will build (in parallel) the given easyconfigs. +reports errors afterwards (in log and in junit-compatible xml file) + +There are several possibilities why some applications fail to build, +this test will distinguish between the different phases in the build: + * eb-file parsing + * initialization + * preparation + * pre-build verification + * generate installdir name + * make builddir + * unpacking + * patching + * prepare toolkit + * setup startfrom + * configure + * make + * test + * create installdir + * make install + * packages + * postproc + * sanity check + * cleanup + +""" import copy import logging import platform @@ -25,11 +52,9 @@ import re import sys import time -import unittest import xml.dom.minidom as xml from datetime import datetime from optparse import OptionParser -from unittest import TestCase import easybuild import easybuild.tools.config as config @@ -41,269 +66,239 @@ from easybuild.tools.filetools import modifyEnv from easybuild.tools.pbs_job import PbsJob +# some variables used by different functions +log = getLog("ParallelBuild") +test_results = [] +build_stopped = {} + + +def main(): + """ main entry point """ + logFile, log, hn = initLogger(filename=None, debug=True, typ=None) + + # assume default config path + config.init('easybuild/easybuild_config.py') + cur_dir = os.getcwd() + + # Option parsing + parser = OptionParser() + parser.add_option("--no-parallel", action="store_false", dest="parallel", default=True + help="submit jobs to build in parallel") + parser.add_option("--output-dir", dest="directory", help="set output directory for test-run") + parser.add_option("-r", "--robot", help="specify robot directory") + + (opts, args) = parser.parse_args() + + # Create base directory inside the current directory. This will be used to place + # all log files and the test output as xml + basename = "easybuild-test-%s" % datetime.now().strftime("%d-%m-%Y-%H:%M:%S") + if opts.directory: + output_dir = opts.directory + elif "EASYBUILDTESTOUTPUT" in os.environ: + output_dir = os.path.abspath(os.environ['EASYBUILDTESTOUTPUT'] + else: + # Use default: Current dir + easybuil-test-timestamp + output_dir = os.path.join(cur_dir, basename) + + if not os.path.isdir(output_dir): + os.makedirs(output_dir) + + # find all easyconfigs (either in specified paths or in 'easybuild/easyblocks') + files = [] + if args: + for path in args: + files += findEasyconfigs(path, log) + else: + # Default path + path = "easybuild/easyconfigs/" + files = findEasyconfigs(path, log) + + # process all the found easyconfig files + packages = [] + for file in files: + try: + packages.extend(processEasyconfig(file, log, None)) + except EasyBuildError, err: + test_results.append((file, 'eb-file error', err)) + + if opts.parallel: + resolved = resolveDependencies(packages, opts.robot, log) + build_packages_in_parallel(resolved, output_dir) + else: + build_packages(packages, output_dir) -class BuildTest(TestCase): + +def perform_step(fase, obj, method): + """ + Perform method on object if it can be build + """ + if obj not in build_stopped: + try: + method(obj) + except EasyBuildError, err: + # we cannot continue building it + test_results.append((obj, fase, err)) + # keep a dict of so we can check in O(1) if objects can still be build + build_stopped[obj] = fase + +def build_packages(packages, output_dir): + """ + build the packages """ - This class will build everything in the path given to it. - There are several possibilities why some applications fail to build, - this test will distinguish between the different phases in the build: - * eb-file parsing - * initialization - * preparation - * pre-build verification - * generate installdir name - * make builddir - * unpacking - * patching - * prepare toolkit - * setup startfrom - * configure - * make - * test - * create installdir - * make install - * packages - * postproc - * sanity check - * cleanup - - At the end of its run, this test will report which easyblocks failed (the fase and the error are included) - via the log to stdout + apps = [] + for pkg in packages: + spec = pkg['spec'] + name = pkg['module'][0] + try: + # handle easyconfigs with custom easyblocks + easyblock = None + reg = re.compile(r"^\s*easyblock\s*=(.*)$") + for line in open(spec).readlines(): + match = reg.search(line) + if match: + easyblock = eval(match.group(1)) + break + + app_class = get_class(easyblock, self.log, name=name) + apps.append(app_class(spec, debug=True)) + except EasyBuildError, err: + test_results.append((spec, 'initialization', err)) + + + base_dir = os.getcwd() + base_env = copy.deepcopy(os.environ) + succes = [] + + for app in apps: + start_time = time.time() + # start with a clean slate + os.chdir(base_dir) + modifyEnv(os.environ, base_env) + + # create a handler per app so we can capture debug output per application + handler = logging.FileHandler(os.path.join(output_dir, "%s-%s.log" % (app.name(), app.installversion()))) + handler.setFormatter(build_log.formatter) + + app.log.addHandler(handler) + + # take manual control over the building + perform_step("preparation", app, lambda x: x.prepare_build()) + perform_step("pre-build verification", app, lambda x: x.ready2build()) + perform_step("generate installdir name", app, lambda x: x.gen_installdir()) + perform_step("make builddir", app, lambda x: x.make_builddir()) + perform_step("unpacking", app, lambda x: x.unpack_src()) + perform_step("patching", app, lambda x: x.apply_patch()) + perform_step("prepare toolkit", app, lambda x: x.toolkit().prepare(x.getcfg('onlytkmod'))) + perform_step("setup startfrom", app, lambda x: x.startfrom()) + perform_step('configure', app, lambda x: x.configure()) + perform_step('make', app, lambda x: x.make()) + perform_step('test', app, lambda x: x.test()) + perform_step('create installdir', app, lambda x: x.make_installdir()) + perform_step('make install', app, lambda x: x.make_install()) + perform_step('packages', app, lambda x: x.packages()) + perform_step('postproc', app, lambda x: x.postproc()) + perform_step('sanity check', app, lambda x: x.sanitycheck()) + perform_step('cleanup', app, lambda x: x.cleanup()) + perform_step('make module', app, lambda x: x.make_module()) + + # remove handler + app.log.removeHandler(handler) + + if app not in build_stopped: + # gather build stats + build_time = round(time.time() - start_time, 2) + + buildstats = { + 'build_time': build_time, + 'platform': platform.platform(), + 'core_count': systemtools.get_core_count(), + 'cpu_model': systemtools.get_cpu_model(), + 'install_size': app.installsize(), + 'timestamp': int(time.time()), + 'host': os.uname()[1], + } + succes.append((app, buildstats)) + + for result in test_results: + log.info("%s crashed with an error during fase: %s, error: %s" % result) + + failed = len(build_stopped) + total = len(apps) + + log.info("%s from %s packages failed to build!" % (failed, total)) + + output_file = os.path.join(output_dir, "easybuild-test.xml") + log.debug("writing xml output to %s" % output_file) + write_to_xml(succes, test_results, output_file) + + +def build_packages_in_parallel(packages, output_dir): + """ + list is a list of packages which can be build! (e.g. they have no unresolved dependencies) + this function will build them in parallel by submitting jobs """ + # first find those without dependencies + no_dependencies = [pkg for pkg in packages if len(pkg['unresolvedDependencies']) == 0] + with_dependencies = list(set(packages) - set(no_dependencies)) + + # we submit all the jobs which can be trivially build. + jobs = [submit_job(pkg, output_dir) for pkg in no_dependencies] + + while len(jobs) > 0: + # sleep 5 minutes + time.sleep(5 * 60) + + done_jobs = [job for job in jobs if job.state() == 'finished'] + # filter the done_jobs + jobs = [job for job in jobs if job not in done_jobs] + + log.info("%s jobs finished completion: %s" % (len(done_jobs), [job.name for job in done_jobs])) + + # remove from unresolvedDependencies in with_dependencies array + for job in done_jobs: + name, version = job.name.split('-', maxsplit=1) + for pkg in with_dependencies: + try: + pkg['unresolvedDependencies'].remove((name, version)) + except: + pass + + # find other jobs without dependencies and extend the jobs array! + no_dependencies = [pkg for pkg in with_dependencies if len(pkg['unresolvedDependencies']) == 0] + with_dependencies = list(set(with_dependencies) - set(no_dependencies)) + + jobs.extend([submit_job(pkg, output_dir) for pkg in no_dependencies]) + +def submit_job(package, output_dir): + """ + submits a job, to build a *single* package + returns the job + """ + # command is pyton script/regtest.py file_name --single + command = "python %s %s --no-parallel" % (sys.argv[0], package['spec']) + + # capture PYTHONPATH, MODULEPATH and all variables starting with EASYBUILD + easybuild_vars = {} + for name in os.environ: + if name.startswith("EASYBUILD"): + easybuild_vars[name] = os.environ[name] + + others = ["PYTHONPATH", "MODULEPATH"] + + for env_var in others: + if env_var in os.environ: + easybuild_vars[env_var] = os.environ[env_var] + + # create unique name based on module name + name = "%s-%s" % package['module'] + + easybuild_vars['EASYBUILDTESTOUTPUT'] = os.path.join(os.path.abspath(output_dir), name) + + job = PbsJob(command, name, easybuild_vars) + job.submit() + + return job - def setUp(self): - """ fetch application instances, report eb-file errors """ - logFile, log, hn = initLogger(filename=None, debug=True, typ=None) - - config.init('easybuild/easybuild_config.py') - self.test_results = [] - self.build_stopped = {} - self.succes = [] - self.cur_dir = os.getcwd() - - self.log = getLog("BuildTest") - self.build_ok = True - self.parallel = False - self.jobs = [] - - parser = OptionParser() - parser.add_option("--job", action="store_true", dest="parallel", - help="submit jobs to build in parallel") - parser.add_option("--output-file", dest="filename", help="submit jobs to build in parallel") - - (opts, args) = parser.parse_args() - self.parallel = opts.parallel - - # Create base directory inside the current directory. This will be used to place - # all log files and the test output as xml - basename = "easybuild-test-%s" % datetime.now().strftime("%d-%m-%Y-%H:%M:%S") - if opts.filename: - filename = os.path.abspath(opts.filename) - elif "EASYBUILDTESTOUTPUT" in os.environ: - filename = os.environ["EASYBUILDTESTOUTPUT"] - else: - filename = os.path.join(self.cur_dir, basename, "easybuild-test.xml") - - self.output_file = filename - self.output_dir = os.path.dirname(self.output_file) - - if not os.path.isdir(self.output_dir): - os.makedirs(self.output_dir) - - # find all easyconfigs (either in specified paths or in 'easybuild/easyblocks') - files = [] - if args: - for path in args: - files += findEasyconfigs(path, log) - else: - # Default path - path = "easybuild/easyconfigs/" - files = findEasyconfigs(path, log) - - # if we want to build with jobs, we should do it now, since we have very little time on the login node - if self.parallel: - # this method will submit the jobs, in runTest we will handle the aggregation of the results - self.submit_jobs(files) - return - - # process all the found easyconfig files - packages = [] - for file in files: - try: - packages.extend(processEasyconfig(file, self.log, None)) - except EasyBuildError, err: - self.build_ok = False - self.test_results.append((file, 'eb-file error', err)) - - - # Since build-order doesn't matter we don't have to use the resolveDependencies method - self.apps = [] - for pkg in packages: - spec = pkg['spec'] - name = pkg['module'][0] - try: - # handle easyconfigs with custom easyblocks - easyblock = None - reg = re.compile(r"^\s*easyblock\s*=(.*)$") - for line in open(spec).readlines(): - match = reg.search(line) - if match: - easyblock = eval(match.group(1)) - break - - app_class = get_class(easyblock, self.log, name=name) - self.apps.append(app_class(spec, debug=True)) - except EasyBuildError, err: - self.build_ok = False - self.test_results.append((spec, 'initialization', err)) - - def submit_jobs(self, files): - """ - Build the given files in parallel by submitting jobs - """ - # change to current - os.chdir(self.cur_dir) - # capture PYTHONPATH and all variables starting with EASYBUILD - easybuild_vars = {} - for name in os.environ: - if name.startswith("EASYBUILD"): - easybuild_vars[name] = os.environ[name] - - others = ["PYTHONPATH", "MODULEPATH"] - - for env_var in others: - if env_var in os.environ: - easybuild_vars[env_var] = os.environ[env_var] - - for easyconfig in files: - easybuild_vars['EASYBUILDTESTOUTPUT'] = os.path.join(self.output_dir, "%s.xml" % - os.path.basename(easyconfig)) - command = "cd %s && python %s %s" % (self.cur_dir, sys.argv[0], easyconfig) - self.log.debug("submitting: %s" % command) - self.log.debug("env vars set: %s" % easybuild_vars) - job = PbsJob(command, easyconfig, easybuild_vars) - try: - job.submit() - self.jobs.append(job) - except EasyBuildError, err: - self.log.warn("Failed to submit job for easyconfig: %s, error: %s" % (easyconfig, err)) - - def performStep(self, fase, obj, method): - """ - Perform method on object if it can be build - """ - if obj not in self.build_stopped: - try: - method(obj) - except EasyBuildError, err: - # we cannot continue building it - self.build_ok = False - self.test_results.append((obj, fase, err)) - # keep a dict of so we can check in O(1) if objects can still be build - self.build_stopped[obj] = fase - - def runTest(self): - """ - Actual test, loop over all the different steps in a build - """ - # handle parallel build - if self.parallel: - # ugly while loop to check if some jobs are stilling running (minimizing job.info() calls) - done = False - while not done: - # we can afford to sleep 5 minutes since we don't expect fast completion - time.sleep(5 * 60) - done = True - for job in self.jobs: - if job.info(): - done = False - break - - # all build jobs have finished -> aggregate results - dom = xml.getDOMImplementation() - root = dom.createDocument(None, "testsuite", None) - for job in self.jobs: - # we set this earlier on (cannot be changed inside job) - xml_output = job.env_vars['EASYBUILDTESTOUTPUT'] - dom = xml.parse(xml_output) - children = dom.documentElement.getElementsByTagName("testcase") - for child in children: - root.firstChild.appendChild(child) - - output_file = open(os.path.join(self.cur_dir, "parallel-test.xml"), "w") - root.writexml(output_file, addindent="\t", newl="\n") - output_file.close() - return - - - self.log.info("Continuing building other packages") - base_dir = os.getcwd() - base_env = copy.deepcopy(os.environ) - - for app in self.apps: - start_time = time.time() - # start with a clean slate - os.chdir(base_dir) - modifyEnv(os.environ, base_env) - - # create a handler per app so we can capture debug output per application - handler = logging.FileHandler(os.path.join(self.output_dir, "%s-%s.log" % (app.name(), app.installversion()))) - handler.setFormatter(build_log.formatter) - - app.log.addHandler(handler) - - # take manual control over the building - self.performStep("preparation", app, lambda x: x.prepare_build()) - self.performStep("pre-build verification", app, lambda x: x.ready2build()) - self.performStep("generate installdir name", app, lambda x: x.gen_installdir()) - self.performStep("make builddir", app, lambda x: x.make_builddir()) - self.performStep("unpacking", app, lambda x: x.unpack_src()) - self.performStep("patching", app, lambda x: x.apply_patch()) - self.performStep("prepare toolkit", app, lambda x: x.toolkit().prepare(x.getcfg('onlytkmod'))) - self.performStep("setup startfrom", app, lambda x: x.startfrom()) - self.performStep('configure', app, lambda x: x.configure()) - self.performStep('make', app, lambda x: x.make()) - self.performStep('test', app, lambda x: x.test()) - self.performStep('create installdir', app, lambda x: x.make_installdir()) - self.performStep('make install', app, lambda x: x.make_install()) - self.performStep('packages', app, lambda x: x.packages()) - self.performStep('postproc', app, lambda x: x.postproc()) - self.performStep('sanity check', app, lambda x: x.sanitycheck()) - self.performStep('cleanup', app, lambda x: x.cleanup()) - - # remove handler - app.log.removeHandler(handler) - - if app not in self.build_stopped: - # gather build stats - build_time = round(time.time() - start_time, 2) - - buildstats = { - 'build_time': build_time, - 'platform': platform.platform(), - 'core_count': systemtools.get_core_count(), - 'cpu_model': systemtools.get_cpu_model(), - 'install_size': app.installsize(), - 'timestamp': int(time.time()), - 'host': os.uname()[1], - } - self.succes.append((app, buildstats)) - - for result in self.test_results: - self.log.info("%s crashed with an error during fase: %s, error: %s" % result) - - failed = len(self.build_stopped) - total = len(self.apps) - - - self.log.info("%s from %s packages failed to build!" % (failed, total)) - - self.log.debug("writing xml output to %s" % self.output_file) - write_to_xml(self.succes, self.test_results, self.output_file) - - # exit with non-zero exit-code when not build_ok - if not self.build_ok: - sys.exit(1) def write_to_xml(succes, failed, filename): """ @@ -368,7 +363,5 @@ def create_succes(name, stats): root.writexml(output_file, addindent="\t", newl="\n") output_file.close() - -# do not use unittest.main() as it will annoyingly parse command line arguments -suite = unittest.TestLoader().loadTestsFromTestCase(BuildTest) -unittest.TextTestRunner(verbosity=2).run(suite) +if __name__ == "__main__": + main() From 769ae776497211126a007ed8693cb7f2a2fca846 Mon Sep 17 00:00:00 2001 From: Toon Willems Date: Tue, 7 Aug 2012 10:55:37 +0200 Subject: [PATCH 478/798] fix obvious syntax errors --- easybuild/test/build.py | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) diff --git a/easybuild/test/build.py b/easybuild/test/build.py index 70a8fe13b0..c8d5638946 100644 --- a/easybuild/test/build.py +++ b/easybuild/test/build.py @@ -67,6 +67,7 @@ from easybuild.tools.pbs_job import PbsJob # some variables used by different functions +initLogger(filename=None, debug=True, typ=None) log = getLog("ParallelBuild") test_results = [] build_stopped = {} @@ -74,15 +75,13 @@ def main(): """ main entry point """ - logFile, log, hn = initLogger(filename=None, debug=True, typ=None) - # assume default config path config.init('easybuild/easybuild_config.py') cur_dir = os.getcwd() # Option parsing parser = OptionParser() - parser.add_option("--no-parallel", action="store_false", dest="parallel", default=True + parser.add_option("--no-parallel", action="store_false", dest="parallel", default=True, help="submit jobs to build in parallel") parser.add_option("--output-dir", dest="directory", help="set output directory for test-run") parser.add_option("-r", "--robot", help="specify robot directory") @@ -95,7 +94,7 @@ def main(): if opts.directory: output_dir = opts.directory elif "EASYBUILDTESTOUTPUT" in os.environ: - output_dir = os.path.abspath(os.environ['EASYBUILDTESTOUTPUT'] + output_dir = os.path.abspath(os.environ['EASYBUILDTESTOUTPUT']) else: # Use default: Current dir + easybuil-test-timestamp output_dir = os.path.join(cur_dir, basename) @@ -159,7 +158,7 @@ def build_packages(packages, output_dir): easyblock = eval(match.group(1)) break - app_class = get_class(easyblock, self.log, name=name) + app_class = get_class(easyblock, log, name=name) apps.append(app_class(spec, debug=True)) except EasyBuildError, err: test_results.append((spec, 'initialization', err)) From 78b6c4268c1c7d7f4d8f505d13e476d66b313f4e Mon Sep 17 00:00:00 2001 From: Toon Willems Date: Tue, 7 Aug 2012 11:05:48 +0200 Subject: [PATCH 479/798] fix debug printing --- easybuild/framework/easyblock.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/easybuild/framework/easyblock.py b/easybuild/framework/easyblock.py index ca16825fef..a8e3358249 100644 --- a/easybuild/framework/easyblock.py +++ b/easybuild/framework/easyblock.py @@ -290,7 +290,7 @@ def _parse_dependency(self, dep): output dict contains these attributes: ['name', 'version', 'suffix', 'dummy', 'tk'] """ - self.log.debug("Parsing %s as a dependency" % dep) + self.log.debug("Parsing %s as a dependency" % (dep,) ) attr = ['name', 'version', 'suffix', 'dummy'] dependency = {'name': '', 'version': '', 'suffix': '', 'dummy': False} From 5c48594d840bb6ac73d65e40f184d23e5ba597a5 Mon Sep 17 00:00:00 2001 From: Toon Willems Date: Tue, 7 Aug 2012 11:08:42 +0200 Subject: [PATCH 480/798] use something simpler for now --- easybuild/test/build.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/easybuild/test/build.py b/easybuild/test/build.py index c8d5638946..f24b4338c4 100644 --- a/easybuild/test/build.py +++ b/easybuild/test/build.py @@ -238,7 +238,7 @@ def build_packages_in_parallel(packages, output_dir): """ # first find those without dependencies no_dependencies = [pkg for pkg in packages if len(pkg['unresolvedDependencies']) == 0] - with_dependencies = list(set(packages) - set(no_dependencies)) + with_dependencies = [pkg for pkg in packages if pkg not in no_dependencies] # we submit all the jobs which can be trivially build. jobs = [submit_job(pkg, output_dir) for pkg in no_dependencies] @@ -264,7 +264,7 @@ def build_packages_in_parallel(packages, output_dir): # find other jobs without dependencies and extend the jobs array! no_dependencies = [pkg for pkg in with_dependencies if len(pkg['unresolvedDependencies']) == 0] - with_dependencies = list(set(with_dependencies) - set(no_dependencies)) + with_dependencies = [pkg for pkg in with_dependencies if pkg not in no_dependencies] jobs.extend([submit_job(pkg, output_dir) for pkg in no_dependencies]) From 51ee2a2f46b8224aadfc50e36f088d05911d9661 Mon Sep 17 00:00:00 2001 From: Toon Willems Date: Tue, 7 Aug 2012 11:19:13 +0200 Subject: [PATCH 481/798] some minor tweaks --- easybuild/test/build.py | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/easybuild/test/build.py b/easybuild/test/build.py index f24b4338c4..672ec07e3b 100644 --- a/easybuild/test/build.py +++ b/easybuild/test/build.py @@ -122,7 +122,7 @@ def main(): if opts.parallel: resolved = resolveDependencies(packages, opts.robot, log) - build_packages_in_parallel(resolved, output_dir) + build_packages_in_parallel(resolved, output_dir, cur_dir) else: build_packages(packages, output_dir) @@ -231,7 +231,7 @@ def build_packages(packages, output_dir): write_to_xml(succes, test_results, output_file) -def build_packages_in_parallel(packages, output_dir): +def build_packages_in_parallel(packages, output_dir, script_dir): """ list is a list of packages which can be build! (e.g. they have no unresolved dependencies) this function will build them in parallel by submitting jobs @@ -241,7 +241,7 @@ def build_packages_in_parallel(packages, output_dir): with_dependencies = [pkg for pkg in packages if pkg not in no_dependencies] # we submit all the jobs which can be trivially build. - jobs = [submit_job(pkg, output_dir) for pkg in no_dependencies] + jobs = [submit_job(pkg, output_dir, script_dir) for pkg in no_dependencies] while len(jobs) > 0: # sleep 5 minutes @@ -255,7 +255,7 @@ def build_packages_in_parallel(packages, output_dir): # remove from unresolvedDependencies in with_dependencies array for job in done_jobs: - name, version = job.name.split('-', maxsplit=1) + name, version = job.name.split('-', 1) for pkg in with_dependencies: try: pkg['unresolvedDependencies'].remove((name, version)) @@ -266,15 +266,15 @@ def build_packages_in_parallel(packages, output_dir): no_dependencies = [pkg for pkg in with_dependencies if len(pkg['unresolvedDependencies']) == 0] with_dependencies = [pkg for pkg in with_dependencies if pkg not in no_dependencies] - jobs.extend([submit_job(pkg, output_dir) for pkg in no_dependencies]) + jobs.extend([submit_job(pkg, output_dir, script_dir) for pkg in no_dependencies]) -def submit_job(package, output_dir): +def submit_job(package, output_dir, script_dir): """ submits a job, to build a *single* package returns the job """ # command is pyton script/regtest.py file_name --single - command = "python %s %s --no-parallel" % (sys.argv[0], package['spec']) + command = "cd %s && python %s %s --no-parallel" % (script_dir, sys.argv[0], package['spec']) # capture PYTHONPATH, MODULEPATH and all variables starting with EASYBUILD easybuild_vars = {} From 26cc8aeacc58bd3b8c4a16568772cc52499cb9d7 Mon Sep 17 00:00:00 2001 From: Toon Willems Date: Tue, 7 Aug 2012 11:24:49 +0200 Subject: [PATCH 482/798] add some log output --- easybuild/test/build.py | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/easybuild/test/build.py b/easybuild/test/build.py index 672ec07e3b..44d5dbc752 100644 --- a/easybuild/test/build.py +++ b/easybuild/test/build.py @@ -243,10 +243,16 @@ def build_packages_in_parallel(packages, output_dir, script_dir): # we submit all the jobs which can be trivially build. jobs = [submit_job(pkg, output_dir, script_dir) for pkg in no_dependencies] + log.info("Submitted %s jobs" % len(jobs)) + log.info("Still %s left to be submitted" % len(with_dependencies)) + while len(jobs) > 0: # sleep 5 minutes time.sleep(5 * 60) + log.info("%s jobs are being run" % len(jobs)) + log.info("%s packages still need to be build" % len(with_dependencies)) + done_jobs = [job for job in jobs if job.state() == 'finished'] # filter the done_jobs jobs = [job for job in jobs if job not in done_jobs] From 5e653ebb264a8a5b9cdf11ab4afe0ff112390eb1 Mon Sep 17 00:00:00 2001 From: Toon Willems Date: Tue, 7 Aug 2012 13:26:25 +0200 Subject: [PATCH 483/798] converting to string before printing (better, since it's more explicit) --- easybuild/framework/easyblock.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/easybuild/framework/easyblock.py b/easybuild/framework/easyblock.py index a8e3358249..7249888808 100644 --- a/easybuild/framework/easyblock.py +++ b/easybuild/framework/easyblock.py @@ -290,7 +290,8 @@ def _parse_dependency(self, dep): output dict contains these attributes: ['name', 'version', 'suffix', 'dummy', 'tk'] """ - self.log.debug("Parsing %s as a dependency" % (dep,) ) + # convert tuple to string otherwise python might complain about the formatting + self.log.debug("Parsing %s as a dependency" % str(dep)) attr = ['name', 'version', 'suffix', 'dummy'] dependency = {'name': '', 'version': '', 'suffix': '', 'dummy': False} From a603a076d7cfbf3cc1cbcfdabfef12e5d1524d02 Mon Sep 17 00:00:00 2001 From: Toon Willems Date: Tue, 7 Aug 2012 13:37:49 +0200 Subject: [PATCH 484/798] fix syntax error as well --- easybuild/easyblocks/i/itac.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/easybuild/easyblocks/i/itac.py b/easybuild/easyblocks/i/itac.py index d94d124b50..c28422ea97 100644 --- a/easybuild/easyblocks/i/itac.py +++ b/easybuild/easyblocks/i/itac.py @@ -90,8 +90,8 @@ def make_module_req_guess(self): guesses = { 'MANPATH': ['man'], 'CLASSPATH': ['itac/lib_%s' % preferredmpi], - 'VT_LIB_DIR': ['itac/lib_%s' % preferredmpi)], - 'VT_SLIB_DIR': ['itac/lib_s%s' % preferredmpi)] + 'VT_LIB_DIR': ['itac/lib_%s' % preferredmpi], + 'VT_SLIB_DIR': ['itac/lib_s%s' % preferredmpi] } if self.getcfg('m32'): From 40346443fb6ae5b006f43b0fdae2ff515669dee5 Mon Sep 17 00:00:00 2001 From: Toon Willems Date: Tue, 7 Aug 2012 13:41:06 +0200 Subject: [PATCH 485/798] because we might be building in parallel, we should not crash when we can't remove it --- easybuild/easyblocks/i/intelbase.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/easybuild/easyblocks/i/intelbase.py b/easybuild/easyblocks/i/intelbase.py index dd70276b7f..70466eec4f 100644 --- a/easybuild/easyblocks/i/intelbase.py +++ b/easybuild/easyblocks/i/intelbase.py @@ -70,7 +70,7 @@ def clean_homedir(self): shutil.rmtree(intelhome) self.log.info("Cleaning up intel dir %s" % intelhome) except OSError, err: - self.log.exception("Cleaning up intel dir %s failed: %s" % (intelhome, err)) + self.log.warning("Cleaning up intel dir %s failed: %s" % (intelhome, err)) def configure(self): """Configure: handle license file and clean home dir.""" From 05c7bbf6e88db516520a94864f6c5c45b1a5e593 Mon Sep 17 00:00:00 2001 From: Kenneth Hoste Date: Tue, 7 Aug 2012 13:56:15 +0200 Subject: [PATCH 486/798] set (BLAS|LAPACK)(_MT)_LIBS variables for ATLAS, LAPACK and IMKL, fix use of self.log, cleanup --- easybuild/tools/toolkit.py | 138 +++++++++++++++++++++++-------------- 1 file changed, 86 insertions(+), 52 deletions(-) diff --git a/easybuild/tools/toolkit.py b/easybuild/tools/toolkit.py index b4e4359e3f..8ff215f45e 100644 --- a/easybuild/tools/toolkit.py +++ b/easybuild/tools/toolkit.py @@ -324,19 +324,19 @@ def prepareACML(self): self._addDependencyVariables(['ACML']) + acml = os.environ['SOFTROOTACML'] + if self.toolkit_comp_family() == GCC: compiler = 'gfortran' elif self.toolkit_comp_family() == INTEL: compiler = 'ifort' else: self.log.error("Don't know which compiler-specific subdir for ACML to use.") - self.vars['LDFLAGS'] += " -L%(acml)s/%(comp)s64/lib/ " % { - # "%(acml)s/%(comp)s64/lib/libacml.a -lpthread" % { - 'comp':compiler, - 'acml':os.environ['SOFTROOTACML'] - } - self.vars['LIBBLAS'] = " -lacml_mv -lacml " #-lpthread" + self.vars['LDFLAGS'] += " -L%s/%s64/lib/ " % (acml, compiler) + # "%s/%s64/lib/libacml.a -lpthread" % (acml, compiler) + + self.vars['LIBBLAS'] = " -lacml_mv -lacml " #-lpthread" self.vars['LIBBLAS_MT'] = self.vars['LIBBLAS'] self.vars['LIBLAPACK'] = self.vars['LIBBLAS'] @@ -347,8 +347,16 @@ def prepareATLAS(self): Prepare for ATLAS BLAS/LAPACK library """ + atlas = os.environ['SOFTROOTATLAS'] + self.vars['LIBBLAS'] = "-lcblas -lf77blas -latlas -lgfortran" self.vars['LIBBLAS_MT'] = "-lptcblas -lptf77blas -latlas -lgfortran -lpthread" + self.vars['BLAS_STATIC_LIBS'] = ["%s/lib/lib%s.a" % (atlas, x) for x in ["cblas", + "f77blas", + "atlas"]] + self.vars['BLAS_MT_STATIC_LIBS'] = ["%s/lib/lib%s.a" % (atlas, x) for x in ["ptcblas", + "ptf77blas", + "atlas"]] self._addDependencyVariables(['ATLAS']) @@ -521,11 +529,25 @@ def prepareIMKL(self): Prepare toolkit for IMKL: Intel Math Kernel Library """ - mklRoot = os.getenv('MKLROOT') - if not mklRoot: + mklroot = os.getenv('MKLROOT') + if not mklroot: self.log.error("MKLROOT not found in environment") - # For more inspiration: see http://software.intel.com/en-us/articles/intel-mkl-link-line-advisor/ + # exact paths/linking statements depend on imkl version + if LooseVersion(os.environ['SOFTVERSIONIMKL']) < LooseVersion('10.3'): + if self.opts['32bit']: + mklld = ['lib/32'] + else: + mklld = ['lib/em64t'] + mklcpp = ['include', 'include/fftw'] + else: + if self.opts['32bit']: + self.log.error("32-bit libraries not supported yet for IMKL v%s (> v10.3)" % os.environ("SOFTROOTIMKL")) + + mklld = ['lib/intel64', 'mkl/lib/intel64'] + mklcpp = ['mkl/include', 'mkl/include/fftw'] + + # for more inspiration: see http://software.intel.com/en-us/articles/intel-mkl-link-line-advisor/ libsfx = "_lp64" libsfxsl = "_lp64" @@ -533,59 +555,68 @@ def prepareIMKL(self): libsfx = "" libsfxsl = "_core" - self.vars['LIBLAPACK'] = "-Wl:-Bstatic -Wl,--start-group -lmkl_intel%s -lmkl_sequential " \ - "-lmkl_core -Wl,--end-group -Wl:-Bdynamic" % libsfx - self.vars['LIBBLAS'] = self.vars['LIBLAPACK'] + # MKL libraries for BLAS, LAPACK, ScaLAPACK routines + blas_libs = ["intel%s" % libsfx, "sequential", "core"] + blas_mt_libs = ["intel%s" % libsfx, "intel_thread", "core"] + scalapack_libs = blas_libs + ["blacs_intelmpi%s" % libsfx] - self.vars['LIBLAPACK_MT'] = "-Wl:-Bstatic -Wl,--start-group -lmkl_intel%s -lmkl_intel_thread " \ - "-lmkl_core -Wl,--end-group -Wl:-Bdynamic -liomp5 -lpthread" % libsfx - self.vars['LIBBLAS_MT'] = self.vars['LIBLAPACK_MT'] + # adjust lib subdir if GCC is used + if self.toolkit_comp_family() == GCC: + for libs in [blas_libs, blas_mt_libs, scalapack_libs]: + libs.replace('mkl_intel_lp64', 'mkl_gf_lp64') - self.vars['LIBSCALAPACK'] = "-Wl:-Bstatic -lmkl_scalapack%(libsfxsl)s " \ - "-lmkl_solver%(libsfx)s_sequential " \ - "-Wl,--start-group -lmkl_intel%(libsfx)s " \ - "-lmkl_sequential -lmkl_core -lmkl_blacs_intelmpi%(libsfx)s " \ - "-Wl,--end-group -Wl:-Bdynamic" % { - 'libsfx':libsfx, - 'libsfxsl':libsfxsl - } + # sequential BLAS and LAPACK + prefix = "-Wl:-Bstatic -Wl,--start-group" + suffix = "-Wl,--end-group -Wl:-Bdynamic" + self.vars['LIBBLAS'] = ' '.join(prefix, ' '.join(["-lmkl_%s" % x for x in blas_libs]), suffix) + self.vars['LIBLAPACK'] = self.vars['LIBBLAS'] - fftwsuff = "" - if self.opts['pic']: - fftwsuff = "_pic" + # multi-threaded BLAS and LAPACK + suffix += " -liomp5 -lpthread" + self.vars['LIBBLAS_MT'] = ' '.join(prefix, ' '.join(["-lmkl_%s" % x for x in blas_mt_libs]), suffix) + self.vars['LIBLAPACK_MT'] = self.vars['LIBBLAS_MT'] - self.vars['LIBFFT'] = "-Wl:-Bstatic -lfftw3xc_intel%s -Wl:-Bdynamic" % fftwsuff + # construct library lists + def construct_lib_list(l, libs): + """Construct a list of existing libraries.""" + for path in ["%s/%s/libmkl_%s.a" % (mklroot, x, y) for x in mklld for y in libs ]: + if os.path.isfile(path): + l.append(path) + + self.vars['BLAS_STATIC_LIBS'] = [] + self.vars['BLAS_MT_STATIC_LIBS'] = [] + construct_lib_list(self.vars['BLAS_STATIC_LIBS'], blas_libs) + construct_lib_list(self.vars['BLAS_MT_STATIC_LIBS'], blas_mt_libs) - if self.opts['packed-groups']: #we pack groups toghether, since some tools like pkg-utils don't work well with them - for i in ['LIBLAPACK', 'LIBBLAS', 'LIBLAPACK_MT', 'LIBSCALAPACK' ]: - self.vars[i] = self.vars[i].replace(" ", ",").replace("-Wl,--end-group", "--end-group") + self.vars['LAPACK_STATIC_LIBS'] = self.vars['BLAS_STATIC_LIBS'] + self.vars['LAPACK_MT_STATIC_LIBS'] = self.vars['BLAS_MT_STATIC_LIBS'] + # sequential ScaLAPACK + prefix = "-Wl:-Bstatic -lmkl_scalapack%s -lmkl_solver%s_sequential -Wl,--start-group" % (libsfxsl, libsfx) + suffix = "-Wl,--end-group -Wl:-Bdynamic" + self.vars['LIBSCALAPACK'] = ' '.join((prefix, ' '.join(scalapack_libs), suffix)) + + # multi-threaded ScaLAPACK lib = self.vars['LIBSCALAPACK'] lib = lib.replace('mkl_solver%s_sequential' % libsfx, 'mkl_solver') lib = lib.replace('mkl_sequential', 'mkl_intel_thread') + ' -liomp5 -lpthread' self.vars['LIBSCALAPACK_MT'] = lib - # Exact paths/linking statements depend on imkl version - if LooseVersion(os.environ['SOFTVERSIONIMKL']) < LooseVersion('10.3'): - if self.opts['32bit']: - mklld = ['lib/32'] - else: - mklld = ['lib/em64t'] - mklcpp = ['include', 'include/fftw'] - else: - if self.opts['32bit']: - self.log.error("32-bit libraries not supported yet for IMKL v%s (> v10.3)" % os.environ("SOFTROOTIMKL")) - - mklld = ['lib/intel64', 'mkl/lib/intel64'] - mklcpp = ['mkl/include', 'mkl/include/fftw'] + # FFT library + fftwsuff = "" + if self.opts['pic']: + fftwsuff = "_pic" + self.vars['LIBFFT'] = "-Wl:-Bstatic -lfftw3xc_intel%s -Wl:-Bdynamic" % fftwsuff - # Linker flags - self._flagsForSubdirs(mklRoot, mklld, flag="-L%s", varskey="LDFLAGS") - self._flagsForSubdirs(mklRoot, mklcpp, flag="-I%s", varskey="CPPFLAGS") + # some tools (like pkg-utils) don't handle groups well, so pack them if required + if self.opts['packed-groups']: + for x in ['LIBBLAS', 'LIBLAPACK', 'LIBSCALAPACK']: + for var in [x, "%s_MT" % x]: + self.vars[var] = self.vars[var].replace(" ", ",").replace("-Wl,--end-group", "--end-group") - if self.toolkit_comp_family() == GCC: - for var in ['LIBLAPACK', 'LIBLAPACK_MT', 'LIBSCALAPACK', 'LIBSCALAPACK_MT']: - self.vars[var] = self.vars[var].replace('mkl_intel_lp64', 'mkl_gf_lp64') + # linker flags + self._flagsForSubdirs(mklroot, mklld, flag="-L%s", varskey="LDFLAGS") + self._flagsForSubdirs(mklroot, mklcpp, flag="-I%s", varskey="CPPFLAGS") def prepareIMPI(self): """ @@ -620,11 +651,11 @@ def prepareIMPI(self): impiroot = os.getenv('SOFTROOTIMPI') if self.opts['32bit']: - log.error("Don't know how to set IMPI paths for 32-bit.") + self.log.error("Don't know how to set IMPI paths for 32-bit.") else: if LooseVersion(os.getenv('SOFTVERSIONIMPI')) < LooseVersion("3.2.1.009"): - #this could have been different in older versions, we only checked for 3.2.1.009 and up (to 4.0.2.003) - log.error("Don't know how to set IMPI paths for old versions.") + # this could have been different in older versions, we only checked for 3.2.1.009 and up (to 4.0.2.003) + self.log.error("Don't know how to set IMPI paths for old versions.") else: mpi_lib = os.path.join(impiroot, 'lib64', 'libmpi') self.vars['MPI_INC'] = os.path.join(impiroot, 'include64') @@ -661,6 +692,9 @@ def prepareLAPACK(self): self.vars['LIBLAPACK'] = "-llapack %s" % self.vars['LIBBLAS'] self.vars['LIBLAPACK_MT'] = "-llapack %s -lpthread" % self.vars['LIBBLAS_MT'] + self.vars['LAPACK_LIBS'] = ["%s/lib/lapack.a" % os.getenv('SOFTROOTLAPACK')] + self.vars['LAPACK_MT_LIBS'] = self.vars['LAPACK_LIBS'] + self._addDependencyVariables(['LAPACK']) def prepareMPICH2(self): From 6d20252bb369bf0ca4865269ae267ec39bef5941 Mon Sep 17 00:00:00 2001 From: Toon Willems Date: Tue, 7 Aug 2012 13:59:15 +0200 Subject: [PATCH 487/798] put logs just before sleep --- easybuild/test/build.py | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) diff --git a/easybuild/test/build.py b/easybuild/test/build.py index 44d5dbc752..0f1dffbce3 100644 --- a/easybuild/test/build.py +++ b/easybuild/test/build.py @@ -250,15 +250,10 @@ def build_packages_in_parallel(packages, output_dir, script_dir): # sleep 5 minutes time.sleep(5 * 60) - log.info("%s jobs are being run" % len(jobs)) - log.info("%s packages still need to be build" % len(with_dependencies)) - done_jobs = [job for job in jobs if job.state() == 'finished'] # filter the done_jobs jobs = [job for job in jobs if job not in done_jobs] - log.info("%s jobs finished completion: %s" % (len(done_jobs), [job.name for job in done_jobs])) - # remove from unresolvedDependencies in with_dependencies array for job in done_jobs: name, version = job.name.split('-', 1) @@ -274,6 +269,10 @@ def build_packages_in_parallel(packages, output_dir, script_dir): jobs.extend([submit_job(pkg, output_dir, script_dir) for pkg in no_dependencies]) + log.info("%s jobs finished completion: %s" % (len(done_jobs), [job.name for job in done_jobs])) + log.info("%s jobs are being run" % len(jobs)) + log.info("%s packages still need to be build" % len(with_dependencies)) + def submit_job(package, output_dir, script_dir): """ submits a job, to build a *single* package From 3f8aef3817491a2bb0e0f777c258209cb5617ebb Mon Sep 17 00:00:00 2001 From: Toon Willems Date: Tue, 7 Aug 2012 14:12:02 +0200 Subject: [PATCH 488/798] more logging --- easybuild/test/build.py | 1 + 1 file changed, 1 insertion(+) diff --git a/easybuild/test/build.py b/easybuild/test/build.py index 0f1dffbce3..af03d79f47 100644 --- a/easybuild/test/build.py +++ b/easybuild/test/build.py @@ -270,6 +270,7 @@ def build_packages_in_parallel(packages, output_dir, script_dir): jobs.extend([submit_job(pkg, output_dir, script_dir) for pkg in no_dependencies]) log.info("%s jobs finished completion: %s" % (len(done_jobs), [job.name for job in done_jobs])) + log.info("%s jobs have been submitted" % len(no_dependencies)) log.info("%s jobs are being run" % len(jobs)) log.info("%s packages still need to be build" % len(with_dependencies)) From 3c0758deebd517cba1d55cdfad223143ace3287e Mon Sep 17 00:00:00 2001 From: Kenneth Hoste Date: Tue, 7 Aug 2012 14:50:35 +0200 Subject: [PATCH 489/798] split overly long line --- easybuild/framework/application.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/easybuild/framework/application.py b/easybuild/framework/application.py index e952a7ccd2..3ffc5ed852 100644 --- a/easybuild/framework/application.py +++ b/easybuild/framework/application.py @@ -575,7 +575,8 @@ def ready2build(self): if self.getcfg('skip'): if Modules().exists(self.name(), self.installversion): self.skip = True - self.log.info("Current version (name: %s, version: %s) found. Going to skip actually main build and potential exitsing packages. Expert only." % (self.name(), self.installversion)) + self.log.info("Current version (name: %s, version: %s) found." % (self.name(), self.installversion)) + self.log.info("Going to skip actually main build and potential exitsing packages. Expert only.") else: self.log.info("No current version (name: %s, version: %s) found. Not skipping anything." % (self.name(), self.installversion)) From 2ccf4a15bd90b89364ae9724756b82595e0c0042 Mon Sep 17 00:00:00 2001 From: Kenneth Hoste Date: Tue, 7 Aug 2012 15:16:43 +0200 Subject: [PATCH 490/798] LIBS variables should be assigned strings, not lists --- easybuild/tools/toolkit.py | 24 ++++++++++++------------ 1 file changed, 12 insertions(+), 12 deletions(-) diff --git a/easybuild/tools/toolkit.py b/easybuild/tools/toolkit.py index 8ff215f45e..c3803bcf72 100644 --- a/easybuild/tools/toolkit.py +++ b/easybuild/tools/toolkit.py @@ -351,12 +351,12 @@ def prepareATLAS(self): self.vars['LIBBLAS'] = "-lcblas -lf77blas -latlas -lgfortran" self.vars['LIBBLAS_MT'] = "-lptcblas -lptf77blas -latlas -lgfortran -lpthread" - self.vars['BLAS_STATIC_LIBS'] = ["%s/lib/lib%s.a" % (atlas, x) for x in ["cblas", - "f77blas", - "atlas"]] - self.vars['BLAS_MT_STATIC_LIBS'] = ["%s/lib/lib%s.a" % (atlas, x) for x in ["ptcblas", - "ptf77blas", - "atlas"]] + self.vars['BLAS_STATIC_LIBS'] = ','.join(["%s/lib/lib%s.a" % (atlas, x) for x in ["cblas", + "f77blas", + "atlas"]]) + self.vars['BLAS_MT_STATIC_LIBS'] = ','.join(["%s/lib/lib%s.a" % (atlas, x) for x in ["ptcblas", + "ptf77blas", + "atlas"]]) self._addDependencyVariables(['ATLAS']) @@ -577,16 +577,16 @@ def prepareIMKL(self): self.vars['LIBLAPACK_MT'] = self.vars['LIBBLAS_MT'] # construct library lists - def construct_lib_list(l, libs): + def construct_lib_list(libs): """Construct a list of existing libraries.""" + l = [] for path in ["%s/%s/libmkl_%s.a" % (mklroot, x, y) for x in mklld for y in libs ]: if os.path.isfile(path): l.append(path) + return ','.join(l) - self.vars['BLAS_STATIC_LIBS'] = [] - self.vars['BLAS_MT_STATIC_LIBS'] = [] - construct_lib_list(self.vars['BLAS_STATIC_LIBS'], blas_libs) - construct_lib_list(self.vars['BLAS_MT_STATIC_LIBS'], blas_mt_libs) + self.vars['BLAS_STATIC_LIBS'] = construct_lib_list(blas_libs) + self.vars['BLAS_MT_STATIC_LIBS'] = construct_lib_list(blas_mt_libs) self.vars['LAPACK_STATIC_LIBS'] = self.vars['BLAS_STATIC_LIBS'] self.vars['LAPACK_MT_STATIC_LIBS'] = self.vars['BLAS_MT_STATIC_LIBS'] @@ -692,7 +692,7 @@ def prepareLAPACK(self): self.vars['LIBLAPACK'] = "-llapack %s" % self.vars['LIBBLAS'] self.vars['LIBLAPACK_MT'] = "-llapack %s -lpthread" % self.vars['LIBBLAS_MT'] - self.vars['LAPACK_LIBS'] = ["%s/lib/lapack.a" % os.getenv('SOFTROOTLAPACK')] + self.vars['LAPACK_LIBS'] = "%s/lib/lapack.a" % os.getenv('SOFTROOTLAPACK') self.vars['LAPACK_MT_LIBS'] = self.vars['LAPACK_LIBS'] self._addDependencyVariables(['LAPACK']) From faccb989e6d2ef59b98601c0087cc0163b7329c9 Mon Sep 17 00:00:00 2001 From: Toon Willems Date: Tue, 7 Aug 2012 15:39:47 +0200 Subject: [PATCH 491/798] get a new connection for a state() request --- easybuild/tools/pbs_job.py | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/easybuild/tools/pbs_job.py b/easybuild/tools/pbs_job.py index 1710533883..91f8fdea84 100644 --- a/easybuild/tools/pbs_job.py +++ b/easybuild/tools/pbs_job.py @@ -177,6 +177,10 @@ def info(self, types=None): for idx, attr in enumerate(types): jobattr[idx].name = attr + + # get a new connection (otherwise this seems to fail) + pbs.pbs_disconnect(self.pbsconn) + self.pbsconn = pbs.connect(self.pbs_server) jobs = pbs.pbs_statjob(self.pbsconn, self.jobid, jobattr, 'NULL') if len(jobs) == 0: # no job found, return None info From ddc6574f549030363dabe13fc056db089fff62f8 Mon Sep 17 00:00:00 2001 From: Toon Willems Date: Tue, 7 Aug 2012 15:50:29 +0200 Subject: [PATCH 492/798] use pbs_connect --- easybuild/tools/pbs_job.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/easybuild/tools/pbs_job.py b/easybuild/tools/pbs_job.py index 91f8fdea84..0bb05ada82 100644 --- a/easybuild/tools/pbs_job.py +++ b/easybuild/tools/pbs_job.py @@ -180,7 +180,7 @@ def info(self, types=None): # get a new connection (otherwise this seems to fail) pbs.pbs_disconnect(self.pbsconn) - self.pbsconn = pbs.connect(self.pbs_server) + self.pbsconn = pbs.pbs_connect(self.pbs_server) jobs = pbs.pbs_statjob(self.pbsconn, self.jobid, jobattr, 'NULL') if len(jobs) == 0: # no job found, return None info From 7e2ff8a96cef9fc3669fe5736f48aa9c6fd13673 Mon Sep 17 00:00:00 2001 From: Kenneth Hoste Date: Tue, 7 Aug 2012 17:33:18 +0200 Subject: [PATCH 493/798] replace self.tk with self.toolkit() --- easybuild/easyblocks/b/boost.py | 4 ++-- easybuild/easyblocks/c/cp2k.py | 2 +- easybuild/easyblocks/d/dolfin.py | 2 +- easybuild/easyblocks/m/metis.py | 2 +- easybuild/easyblocks/o/openfoam.py | 4 ++-- easybuild/easyblocks/p/parmetis.py | 10 +++++----- easybuild/easyblocks/p/pasha.py | 2 +- easybuild/easyblocks/s/scotch.py | 2 +- easybuild/scripts/port_easyblock.py | 1 + 9 files changed, 15 insertions(+), 14 deletions(-) diff --git a/easybuild/easyblocks/b/boost.py b/easybuild/easyblocks/b/boost.py index 9421de76cb..3c8c1a9eea 100644 --- a/easybuild/easyblocks/b/boost.py +++ b/easybuild/easyblocks/b/boost.py @@ -38,7 +38,7 @@ def configure(self): """Configure Boost build using custom tools""" # mpi sanity check - if self.getcfg('boost_mpi') and not self.tk.opts['usempi']: + if self.getcfg('boost_mpi') and not self.toolkit().opts['usempi']: self.log.error("When enabling building boost_mpi, also enable the 'usempi' toolkit option.") # create build directory (Boost doesn't like being built in source dir) @@ -64,7 +64,7 @@ def configure(self): if self.getcfg('boost_mpi'): - self.tk.opts['usempi'] = True + self.toolkit().opts['usempi'] = True # configure the boost mpi module # http://www.boost.org/doc/libs/1_47_0/doc/html/mpi/getting_started.html # let Boost.Build know to look here for the config file diff --git a/easybuild/easyblocks/c/cp2k.py b/easybuild/easyblocks/c/cp2k.py index 2c3fa4be82..6ea0e1d3b2 100644 --- a/easybuild/easyblocks/c/cp2k.py +++ b/easybuild/easyblocks/c/cp2k.py @@ -100,7 +100,7 @@ def configure(self): # set compilers options according to toolkit config # full debug: -g -traceback -check all -fp-stack-check # -g links to mpi debug libs - if self.tk.opts['debug']: + if self.toolkit().opts['debug']: self.debug = '-g' self.log.info("Debug build") if self.toolkit().opts['pic']: diff --git a/easybuild/easyblocks/d/dolfin.py b/easybuild/easyblocks/d/dolfin.py index a05ba483d6..e5598f4edc 100644 --- a/easybuild/easyblocks/d/dolfin.py +++ b/easybuild/easyblocks/d/dolfin.py @@ -98,7 +98,7 @@ def configure(self): self.updatecfg('configopts', ' -DCGAL_DIR:PATH="$SOFTROOTCGAL"') # set correct openmp options - openmp = self.tk.get_openmp_flag() + openmp = self.toolkit().get_openmp_flag() self.updatecfg('configopts', ' -DOpenMP_CXX_FLAGS="%s"' % openmp) self.updatecfg('configopts', ' -DOpenMP_C_FLAGS="%s"' % openmp) diff --git a/easybuild/easyblocks/m/metis.py b/easybuild/easyblocks/m/metis.py index f2eb242672..40e8a2cb1e 100644 --- a/easybuild/easyblocks/m/metis.py +++ b/easybuild/easyblocks/m/metis.py @@ -41,7 +41,7 @@ def make(self): self.updatecfg('makeopts', 'LIBDIR=""') - if self.tk.opts['pic']: + if self.toolkit().opts['pic']: self.updatecfg('makeopts', 'CC="$CC -fPIC"') Application.make(self) diff --git a/easybuild/easyblocks/o/openfoam.py b/easybuild/easyblocks/o/openfoam.py index ffa0fc42ae..94e4153860 100644 --- a/easybuild/easyblocks/o/openfoam.py +++ b/easybuild/easyblocks/o/openfoam.py @@ -62,7 +62,7 @@ def configure(self): env.set("WM_THIRD_PARTY_DIR", os.path.join(self.installdir, self.thrdpartydir)) # compiler - comp_fam = self.tk.toolkit_comp_family() + comp_fam = self.toolkit().toolkit_comp_family() if comp_fam == toolkit.GCC: self.wm_compiler="Gcc" @@ -79,7 +79,7 @@ def configure(self): env.set("WM_COMPILER",self.wm_compiler) # type of MPI - mpi_type = self.tk.toolkit_mpi_type() + mpi_type = self.toolkit().toolkit_mpi_type() if mpi_type == toolkit.INTEL: self.mpipath = os.path.join(os.environ['SOFTROOTIMPI'],'intel64') diff --git a/easybuild/easyblocks/p/parmetis.py b/easybuild/easyblocks/p/parmetis.py index 5cbb131ea6..33695ef483 100644 --- a/easybuild/easyblocks/p/parmetis.py +++ b/easybuild/easyblocks/p/parmetis.py @@ -41,12 +41,12 @@ def configure(self): self.updatecfg('configopts', '-DMETIS_PATH=../metis -DGKLIB_PATH=../metis/GKlib') - self.updatecfg('configopts', '-DOPENMP="%s"' % self.tk.get_openmp_flag()) + self.updatecfg('configopts', '-DOPENMP="%s"' % self.toolkit().get_openmp_flag()) - if self.tk.opts['usempi']: + if self.toolkit().opts['usempi']: self.updatecfg('configopts', '-DCMAKE_C_COMPILER="$MPICC"') - if self.tk.opts['pic']: + if self.toolkit().opts['pic']: self.updatecfg('configopts', '-DCMAKE_C_FLAGS="-fPIC"') self.parmetis_builddir = 'build' @@ -68,8 +68,8 @@ def make(self, verbose=False): self.updatecfg('makeopts', 'LIBDIR=""') - if self.tk.opts['usempi']: - if self.tk.opts['pic']: + if self.toolkit().opts['usempi']: + if self.toolkit().opts['pic']: self.updatecfg('makeopts', 'CC="$MPICC -fPIC"') else: self.updatecfg('makeopts', 'CC="$MPICC"') diff --git a/easybuild/easyblocks/p/pasha.py b/easybuild/easyblocks/p/pasha.py index 858fde4397..fbf76673dd 100644 --- a/easybuild/easyblocks/p/pasha.py +++ b/easybuild/easyblocks/p/pasha.py @@ -38,7 +38,7 @@ def configure(self): self.log.error("TBB module not loaded.") self.updatecfg('makeopts', "TBB_DIR=%s/tbb MPI_DIR='' MPI_INC=''") - self.updatecfg('makeopts', "MPI_CXX=$MPICXX OPM_FLAG=%s" % (tbb, self.tk.get_openmp_flag())) + self.updatecfg('makeopts', "MPI_CXX=$MPICXX OPM_FLAG=%s" % (tbb, self.toolkit().get_openmp_flag())) self.updatecfg('makeopts', "MPI_LIB='' MY_CXX=$CXX MPICH_IGNORE_CXX_SEEK=1") def make_install(self): diff --git a/easybuild/easyblocks/s/scotch.py b/easybuild/easyblocks/s/scotch.py index 28924c08ff..336b83d3bf 100644 --- a/easybuild/easyblocks/s/scotch.py +++ b/easybuild/easyblocks/s/scotch.py @@ -38,7 +38,7 @@ def configure(self): elif "SOFTROOTGCC" in os.environ: makefilename = 'Makefile.inc.x86-64_pc_linux2' else: - self.log.error("Don't know how to handle toolkit %s." % self.tk.name) + self.log.error("Don't know how to handle toolkit %s." % self.toolkit().name) # create Makefile.inc try: diff --git a/easybuild/scripts/port_easyblock.py b/easybuild/scripts/port_easyblock.py index 942c632496..d15aa9559e 100755 --- a/easybuild/scripts/port_easyblock.py +++ b/easybuild/scripts/port_easyblock.py @@ -133,6 +133,7 @@ def refactor(txt): 'packagesFindSource': 'find_package_sources', 'postProc': 'postproc', 'sanityCheck': 'sanitycheck', + 'self.tk': 'self.toolkit()', 'setCfg': 'setcfg', 'setLogger': 'setlogger', 'setNameVersion': 'set_name_version', From 4deecb5caa32a9897fcad5fa1b971695e454090c Mon Sep 17 00:00:00 2001 From: Kenneth Hoste Date: Tue, 7 Aug 2012 17:34:11 +0200 Subject: [PATCH 494/798] fix typo --- easybuild/tools/filetools.py | 2 +- easybuild/tools/toolkit.py | 60 ++++++++++++++++++++++-------------- 2 files changed, 38 insertions(+), 24 deletions(-) diff --git a/easybuild/tools/filetools.py b/easybuild/tools/filetools.py index 068a5f8b9b..6fee9d9688 100644 --- a/easybuild/tools/filetools.py +++ b/easybuild/tools/filetools.py @@ -720,7 +720,7 @@ def patch_perl_script_autoflush(path): except IOError, err: log.error("Failed to patch Perl configure script: %s" % err) -def mkdir(directory, parrents=False): +def mkdir(directory, parents=False): """ Create a directory Directory is the path to make diff --git a/easybuild/tools/toolkit.py b/easybuild/tools/toolkit.py index 28d2ef934e..6cd90ddec6 100644 --- a/easybuild/tools/toolkit.py +++ b/easybuild/tools/toolkit.py @@ -346,17 +346,22 @@ def prepareATLAS(self): """ Prepare for ATLAS BLAS/LAPACK library """ + blas_libs = ["cblas", "f77blas", "atlas"] + blas_mt_libs = ["ptcblas", "ptf77blas", "atlas"] - atlas = os.environ['SOFTROOTATLAS'] + self.vars['LIBBLAS'] = ' '.join(["-l%s" % x for x in blas_libs] + ["-lgfortran"]) + self.vars['LIBBLAS_MT'] = ' '.join(["-l%s" % x for x in blas_mt_libs] + ["-lgfortran", "-lpthread"]) + self.vars['BLAS_LIB_DIR'] = os.path.join(os.environ['SOFTROOTATLAS'], "lib") + self.vars['BLAS_STATIC_LIBS'] = ','.join(["lib%s.a" % x for x in blas_libs]) + self.vars['BLAS_MT_STATIC_LIBS'] = ','.join(["lib%s.a" % x for x in blas_mt_libs]) - self.vars['LIBBLAS'] = "-lcblas -lf77blas -latlas -lgfortran" - self.vars['LIBBLAS_MT'] = "-lptcblas -lptf77blas -latlas -lgfortran -lpthread" - self.vars['BLAS_STATIC_LIBS'] = ','.join(["%s/lib/lib%s.a" % (atlas, x) for x in ["cblas", - "f77blas", - "atlas"]]) - self.vars['BLAS_MT_STATIC_LIBS'] = ','.join(["%s/lib/lib%s.a" % (atlas, x) for x in ["ptcblas", - "ptf77blas", - "atlas"]]) + self.vars['LAPACK_LIB_DIR'] = self.vars['BLAS_LIB_DIR'] + self.vars['LAPACK_STATIC_LIBS'] = "liblapack.a," + self.vars['BLAS_STATIC_LIBS'] + self.vars['LAPACK_MT_STATIC_LIBS'] = "liblapack.a," + self.vars['BLAS_MT_STATIC_LIBS'] + + self.vars['BLAS_LAPACK_DIR'] = self.vars['LAPACK_LIB_DIR'] + self.vars['BLAS_LAPACK_STATIC_LIBS'] = self.vars['LAPACK_STATIC_LIBS'] + self.vars['BLAS_LAPACK_MT_STATIC_LIBS'] = self.vars['LAPACK_MT_STATIC_LIBS'] self._addDependencyVariables(['ATLAS']) @@ -576,21 +581,29 @@ def prepareIMKL(self): self.vars['LIBBLAS_MT'] = ' '.join(prefix, ' '.join(["-lmkl_%s" % x for x in blas_mt_libs]), suffix) self.vars['LIBLAPACK_MT'] = self.vars['LIBBLAS_MT'] - # construct library lists - def construct_lib_list(libs): - """Construct a list of existing libraries.""" - l = [] - for path in ["%s/%s/libmkl_%s.a" % (mklroot, x, y) for x in mklld for y in libs ]: - if os.path.isfile(path): - l.append(path) - return ','.join(l) + # determine BLAS/LAPACK library dir + bl_libdir = None + for ld in mklld: + fld = os.path.join(mklroot, ld) + if os.path.isdir(fld): + bl_libdir = fld + if not bl_libdir: + self.log.error("") + else: + self.vars['BLAS_LIB_DIR'] = bl_libdir + self.vars['LAPACK_LIB_DIR'] = bl_libdir + self.vars['BLAS_LAPACK_LIB_DIR'] = bl_libdir - self.vars['BLAS_STATIC_LIBS'] = construct_lib_list(blas_libs) - self.vars['BLAS_MT_STATIC_LIBS'] = construct_lib_list(blas_mt_libs) + # list of libraries for BLAS/LAPACK + self.vars['BLAS_STATIC_LIBS'] = ','.join(blas_libs) + self.vars['BLAS_MT_STATIC_LIBS'] = ','.join(blas_mt_libs) self.vars['LAPACK_STATIC_LIBS'] = self.vars['BLAS_STATIC_LIBS'] self.vars['LAPACK_MT_STATIC_LIBS'] = self.vars['BLAS_MT_STATIC_LIBS'] + self.vars['BLAS_LAPACK_STATIC_LIBS'] = self.vars['LAPACK_STATIC_LIBS'] + self.vars['BLAS_LAPACK_MT_STATIC_LIBS'] = self.vars['LAPACK_MT_STATIC_LIBS'] + # sequential ScaLAPACK prefix = "-Wl:-Bstatic -lmkl_scalapack%s -lmkl_solver%s_sequential -Wl,--start-group" % (libsfxsl, libsfx) suffix = "-Wl,--end-group -Wl:-Bdynamic" @@ -682,7 +695,7 @@ def prepareQLogicMPI(self): self.vars[i] = self.vars["MPI%s" % i] self.vars['MPI_INC'] = "%s/include" % os.getenv('SOFTROOTQLOGICMPI') - self.vars['MPI_LIB_SHARED'] = "%s/lib/libmpich.so" % os.getenv('SOFTROOTMPICH2') + self.vars['MPI_LIB_SHARED'] = "%s/lib64/libmpich.so" % os.getenv('SOFTROOTQLOGICMPI') def prepareLAPACK(self): """ @@ -692,8 +705,9 @@ def prepareLAPACK(self): self.vars['LIBLAPACK'] = "-llapack %s" % self.vars['LIBBLAS'] self.vars['LIBLAPACK_MT'] = "-llapack %s -lpthread" % self.vars['LIBBLAS_MT'] - self.vars['LAPACK_LIBS'] = "%s/lib/lapack.a" % os.getenv('SOFTROOTLAPACK') - self.vars['LAPACK_MT_LIBS'] = self.vars['LAPACK_LIBS'] + self.vars['LAPACK_LIB_DIR'] = os.path.join(os.getenv('SOFTROOTLAPACK'), "lib") + self.vars['LAPACK_STATIC_LIBS'] = "liblapack.a" + self.vars['LAPACK_MT_STATIC_LIBS'] = self.vars['LAPACK_STATIC_LIBS'] self._addDependencyVariables(['LAPACK']) @@ -752,7 +766,7 @@ def prepareOpenMPI(self): Prepare for OpenMPI MPI library """ - # no static libmpi.a available to set MPI_LIB_STATIC + self.vars['MPI_LIB_STATIC'] = "%s/lib/libmpi.a" % os.getenv('SOFTROOTOPENMPI') self.vars['MPI_LIB_SHARED'] = "%s/lib/libmpi.so" % os.getenv('SOFTROOTOPENMPI') self.vars['MPI_INC'] = "%s/include" % os.getenv('SOFTROOTOPENMPI') self.prepareSimpleMPI() From e6bd38bb7d0e605a1bdf172d763357870083bfad Mon Sep 17 00:00:00 2001 From: Kenneth Hoste Date: Tue, 7 Aug 2012 17:37:31 +0200 Subject: [PATCH 495/798] fix typo --- easybuild/tools/toolkit.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/easybuild/tools/toolkit.py b/easybuild/tools/toolkit.py index 6cd90ddec6..6878684aeb 100644 --- a/easybuild/tools/toolkit.py +++ b/easybuild/tools/toolkit.py @@ -359,7 +359,7 @@ def prepareATLAS(self): self.vars['LAPACK_STATIC_LIBS'] = "liblapack.a," + self.vars['BLAS_STATIC_LIBS'] self.vars['LAPACK_MT_STATIC_LIBS'] = "liblapack.a," + self.vars['BLAS_MT_STATIC_LIBS'] - self.vars['BLAS_LAPACK_DIR'] = self.vars['LAPACK_LIB_DIR'] + self.vars['BLAS_LAPACK_LIB_DIR'] = self.vars['LAPACK_LIB_DIR'] self.vars['BLAS_LAPACK_STATIC_LIBS'] = self.vars['LAPACK_STATIC_LIBS'] self.vars['BLAS_LAPACK_MT_STATIC_LIBS'] = self.vars['LAPACK_MT_STATIC_LIBS'] From 22342efd4ad84a9f7083dc93e679bdac31e1a595 Mon Sep 17 00:00:00 2001 From: Toon Willems Date: Wed, 8 Aug 2012 08:45:04 +0200 Subject: [PATCH 496/798] add some more detailed logging --- easybuild/test/build.py | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/easybuild/test/build.py b/easybuild/test/build.py index af03d79f47..66e6c4fd81 100644 --- a/easybuild/test/build.py +++ b/easybuild/test/build.py @@ -267,11 +267,13 @@ def build_packages_in_parallel(packages, output_dir, script_dir): no_dependencies = [pkg for pkg in with_dependencies if len(pkg['unresolvedDependencies']) == 0] with_dependencies = [pkg for pkg in with_dependencies if pkg not in no_dependencies] - jobs.extend([submit_job(pkg, output_dir, script_dir) for pkg in no_dependencies]) + new_jobs = [submit_job(pkg, output_dir, script_dir) for pkg in no_dependencies] + jobs.extend(new_jobs) + # Add some logging log.info("%s jobs finished completion: %s" % (len(done_jobs), [job.name for job in done_jobs])) - log.info("%s jobs have been submitted" % len(no_dependencies)) - log.info("%s jobs are being run" % len(jobs)) + log.info("%s jobs have been submitted: %s" % (len(new_jobs), [job.name for job in new_jobs])) + log.info("%s jobs are being run: %s" % (len(jobs), [job.name for job in jobs])) log.info("%s packages still need to be build" % len(with_dependencies)) def submit_job(package, output_dir, script_dir): From 638103022683ca115af4249b7fb9d4f3a563fb13 Mon Sep 17 00:00:00 2001 From: Toon Willems Date: Wed, 8 Aug 2012 09:10:53 +0200 Subject: [PATCH 497/798] add aggregation of xml results --- easybuild/test/build.py | 37 +++++++++++++++++++++++++++++++++++++ 1 file changed, 37 insertions(+) diff --git a/easybuild/test/build.py b/easybuild/test/build.py index 66e6c4fd81..2441fa12ee 100644 --- a/easybuild/test/build.py +++ b/easybuild/test/build.py @@ -246,6 +246,8 @@ def build_packages_in_parallel(packages, output_dir, script_dir): log.info("Submitted %s jobs" % len(jobs)) log.info("Still %s left to be submitted" % len(with_dependencies)) + output_paths = [] + while len(jobs) > 0: # sleep 5 minutes time.sleep(5 * 60) @@ -256,6 +258,7 @@ def build_packages_in_parallel(packages, output_dir, script_dir): # remove from unresolvedDependencies in with_dependencies array for job in done_jobs: + output_paths.append(job.env_vars['EASYBUILDTESTOUTPUT']) name, version = job.name.split('-', 1) for pkg in with_dependencies: try: @@ -276,6 +279,40 @@ def build_packages_in_parallel(packages, output_dir, script_dir): log.info("%s jobs are being run: %s" % (len(jobs), [job.name for job in jobs])) log.info("%s packages still need to be build" % len(with_dependencies)) + if len(with_dependencies) > 0: + log.error("For some reason, you still have unresolved dependencies: %s" % with_dependencies) + + + # capture xml output and generate a single one + # TODO: move into proper function (used 2 times) + dom = xml.getDOMImplementation() + root = dom.createDocument(None, "testsuite", None) + properties = root.createElement("properties") + version = root.createElement("property") + version.setAttribute("name", "easybuild-version") + version.setAttribute("value", str(easybuild.VERBOSE_VERSION)) + properties.appendChild(version) + + time = root.createElement("property") + time.setAttribute("name", "timestamp") + time.setAttribute("value", str(datetime.now())) + properties.appendChild(time) + + root.firstChild.appendChild(properties) + + for dir in output_paths: + # take the first one (should be only one present) + xml_file = glob.glob(os.path.join(dir, "*.xml"))[0] + dom = xml.parse(xml_file) + # only one should be present, we are just discarding the rest + testcase = dom.getElementsByTagName("testcase")[0] + root.firstChild.appendChild(testcase) + + output_file = open(os.path.join(output_dir, "easybuild-parallel-results.xml"), "w") + root.writexml(output_file, addindent="\t", newl="\n") + output_file.close() + + def submit_job(package, output_dir, script_dir): """ submits a job, to build a *single* package From e7c1ee66afe1af15e7f1a1d68d615ee3465f03b8 Mon Sep 17 00:00:00 2001 From: Toon Willems Date: Wed, 8 Aug 2012 09:36:05 +0200 Subject: [PATCH 498/798] cannot name variable time --- easybuild/test/build.py | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/easybuild/test/build.py b/easybuild/test/build.py index 2441fa12ee..850850aeea 100644 --- a/easybuild/test/build.py +++ b/easybuild/test/build.py @@ -293,10 +293,10 @@ def build_packages_in_parallel(packages, output_dir, script_dir): version.setAttribute("value", str(easybuild.VERBOSE_VERSION)) properties.appendChild(version) - time = root.createElement("property") - time.setAttribute("name", "timestamp") - time.setAttribute("value", str(datetime.now())) - properties.appendChild(time) + time_el = root.createElement("property") + time_el.setAttribute("name", "timestamp") + time_el.setAttribute("value", str(datetime.now())) + properties.appendChild(time_el) root.firstChild.appendChild(properties) From 3efbbb762d4a7bc304702146824a4d128b322793 Mon Sep 17 00:00:00 2001 From: Toon Willems Date: Wed, 8 Aug 2012 10:02:05 +0200 Subject: [PATCH 499/798] file_locate doesn't handle parallel accessing of files very well --- easybuild/framework/application.py | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/easybuild/framework/application.py b/easybuild/framework/application.py index 15811038d2..02777f585b 100644 --- a/easybuild/framework/application.py +++ b/easybuild/framework/application.py @@ -482,6 +482,16 @@ def download(filename, url, path): for fp in fullpaths: if os.path.isfile(fp): self.log.info("Found file %s at %s" % (filename, fp)) + self.log.debug("If it is not being written to in 3 seconds, i'll assume it's safe") + + diff = 1 + while diff > 0.001: + time1 = os.stat(fp).st_mtime + time.sleep(3) + time2 = os.stat(fp).st_mtime + diff = time2 - time1 + self.log.debug("%s diff in m_time" % diff) + foundfile = fp break # no need to try further else: From 0ab31fd0ebd21e4af5d6c46cc5e1fc85e4dabf41 Mon Sep 17 00:00:00 2001 From: Toon Willems Date: Wed, 8 Aug 2012 10:56:37 +0200 Subject: [PATCH 500/798] try using atime --- easybuild/framework/application.py | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/easybuild/framework/application.py b/easybuild/framework/application.py index 02777f585b..2b0cf914d1 100644 --- a/easybuild/framework/application.py +++ b/easybuild/framework/application.py @@ -482,15 +482,15 @@ def download(filename, url, path): for fp in fullpaths: if os.path.isfile(fp): self.log.info("Found file %s at %s" % (filename, fp)) - self.log.debug("If it is not being written to in 3 seconds, i'll assume it's safe") + self.log.debug("If it is not being accessed in 3 seconds, i'll assume it's safe") diff = 1 while diff > 0.001: - time1 = os.stat(fp).st_mtime + time1 = os.path.getatime(fp) time.sleep(3) - time2 = os.stat(fp).st_mtime + time2 = os.path.getatime(fp) diff = time2 - time1 - self.log.debug("%s diff in m_time" % diff) + self.log.debug("%s diff in atime" % diff) foundfile = fp break # no need to try further From 2d2740fb3162bebb8337286a8626850f04bcf69a Mon Sep 17 00:00:00 2001 From: Toon Willems Date: Wed, 8 Aug 2012 11:05:04 +0200 Subject: [PATCH 501/798] update imkl easyblock with new way of getting dependencies --- easybuild/easyblocks/i/imkl.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/easybuild/easyblocks/i/imkl.py b/easybuild/easyblocks/i/imkl.py index 902a49ac09..e40881937e 100644 --- a/easybuild/easyblocks/i/imkl.py +++ b/easybuild/easyblocks/i/imkl.py @@ -141,7 +141,7 @@ def postproc(self): # build the mkl interfaces (pic and no-pic) # load the dependencies m = Modules() - m.addModule(self.dep) + m.addModule(self.cfg.dependencies()) m.load() if not self.getcfg('interfaces'): @@ -265,7 +265,7 @@ def postproc(self): # load the dependencies m = Modules() - m.addModule(self.dep) + m.addModule(self.cfg.dependencies()) m.load() if not self.getcfg('interfaces'): From cd7c38b717938fc6bf0b32a2dd8b7c914e76a16e Mon Sep 17 00:00:00 2001 From: Toon Willems Date: Wed, 8 Aug 2012 11:08:25 +0200 Subject: [PATCH 502/798] report filesize --- easybuild/framework/application.py | 2 ++ 1 file changed, 2 insertions(+) diff --git a/easybuild/framework/application.py b/easybuild/framework/application.py index 2b0cf914d1..d91e5d0b2d 100644 --- a/easybuild/framework/application.py +++ b/easybuild/framework/application.py @@ -484,6 +484,8 @@ def download(filename, url, path): self.log.info("Found file %s at %s" % (filename, fp)) self.log.debug("If it is not being accessed in 3 seconds, i'll assume it's safe") + self.log.debug("filesize: %s" % os.path.getsize(fp)) + diff = 1 while diff > 0.001: time1 = os.path.getatime(fp) From 939bbb0bb28bf51d9e0821b26765a8a3adc2827b Mon Sep 17 00:00:00 2001 From: Toon Willems Date: Wed, 8 Aug 2012 11:13:51 +0200 Subject: [PATCH 503/798] fix the LAPACK sanitycheck --- easybuild/easyblocks/l/lapack.py | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/easybuild/easyblocks/l/lapack.py b/easybuild/easyblocks/l/lapack.py index d71efaf53b..4720427107 100644 --- a/easybuild/easyblocks/l/lapack.py +++ b/easybuild/easyblocks/l/lapack.py @@ -206,9 +206,8 @@ def make_module(self, fake=False): """ if self.getcfg('test_only'): pass - else: - Application.make_module(self, fake) + return Application.make_module(self, fake) def sanitycheck(self): """ From 1cf080efbdef4da4ec778ba684fea4c79401342e Mon Sep 17 00:00:00 2001 From: Toon Willems Date: Wed, 8 Aug 2012 11:24:55 +0200 Subject: [PATCH 504/798] use filesize as indicator of changes --- easybuild/framework/application.py | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-) diff --git a/easybuild/framework/application.py b/easybuild/framework/application.py index d91e5d0b2d..4884a27554 100644 --- a/easybuild/framework/application.py +++ b/easybuild/framework/application.py @@ -1,4 +1,4 @@ -## +ta# # Copyright 2009-2012 Stijn De Weirdt # Copyright 2010 Dries Verdegem # Copyright 2010-2012 Kenneth Hoste @@ -482,17 +482,17 @@ def download(filename, url, path): for fp in fullpaths: if os.path.isfile(fp): self.log.info("Found file %s at %s" % (filename, fp)) - self.log.debug("If it is not being accessed in 3 seconds, i'll assume it's safe") + self.log.debug("If the size of the file stays the same for 5 seconds, assume it's good") self.log.debug("filesize: %s" % os.path.getsize(fp)) - diff = 1 - while diff > 0.001: - time1 = os.path.getatime(fp) - time.sleep(3) - time2 = os.path.getatime(fp) - diff = time2 - time1 - self.log.debug("%s diff in atime" % diff) + size1 = 0 + size2 = 1 + while size1 != size2: + size1 = os.path.getsize(fp) + time.sleep(5) + size2 = os.path.getsize(fp) + self.log.debug("size change: %s" % (size2 - size1)) foundfile = fp break # no need to try further From 94af5b8cee27d7e22c004cc3d754616b48ab7f81 Mon Sep 17 00:00:00 2001 From: Toon Willems Date: Wed, 8 Aug 2012 12:15:30 +0200 Subject: [PATCH 505/798] download sources before submitting them --- easybuild/test/build.py | 49 ++++++++++++++++++++++++++++++----------- 1 file changed, 36 insertions(+), 13 deletions(-) diff --git a/easybuild/test/build.py b/easybuild/test/build.py index 850850aeea..b77f61b595 100644 --- a/easybuild/test/build.py +++ b/easybuild/test/build.py @@ -140,26 +140,34 @@ def perform_step(fase, obj, method): # keep a dict of so we can check in O(1) if objects can still be build build_stopped[obj] = fase + +def get_instance(package): + """ get an instance for this package """ + spec = package['spec'] + name = package['module'][0] + + # handle easyconfigs with custom easyblocks + easyblock = None + reg = re.compile(r"^\s*easyblock\s*=(.*)$") + for line in open(spec).readlines(): + match = reg.search(line) + if match: + easyblock = eval(match.group(1)) + break + + app_class = get_class(easyblock, log, name=name) + return app_class(spec, debug=True) + + def build_packages(packages, output_dir): """ build the packages """ apps = [] for pkg in packages: - spec = pkg['spec'] - name = pkg['module'][0] try: - # handle easyconfigs with custom easyblocks - easyblock = None - reg = re.compile(r"^\s*easyblock\s*=(.*)$") - for line in open(spec).readlines(): - match = reg.search(line) - if match: - easyblock = eval(match.group(1)) - break - - app_class = get_class(easyblock, log, name=name) - apps.append(app_class(spec, debug=True)) + instance = get_instance(pkg) + apps.append(instance) except EasyBuildError, err: test_results.append((spec, 'initialization', err)) @@ -240,6 +248,10 @@ def build_packages_in_parallel(packages, output_dir, script_dir): no_dependencies = [pkg for pkg in packages if len(pkg['unresolvedDependencies']) == 0] with_dependencies = [pkg for pkg in packages if pkg not in no_dependencies] + log.info("preparing packages: %s" % no_dependencies) + for pkg in no_dependencies: + prepare_package(pkg) + # we submit all the jobs which can be trivially build. jobs = [submit_job(pkg, output_dir, script_dir) for pkg in no_dependencies] @@ -270,6 +282,10 @@ def build_packages_in_parallel(packages, output_dir, script_dir): no_dependencies = [pkg for pkg in with_dependencies if len(pkg['unresolvedDependencies']) == 0] with_dependencies = [pkg for pkg in with_dependencies if pkg not in no_dependencies] + log.info("preparing packages: %s" % no_dependencies) + for pkg in no_dependencies: + prepare_package(pkg) + new_jobs = [submit_job(pkg, output_dir, script_dir) for pkg in no_dependencies] jobs.extend(new_jobs) @@ -312,6 +328,13 @@ def build_packages_in_parallel(packages, output_dir, script_dir): root.writexml(output_file, addindent="\t", newl="\n") output_file.close() +def prepare_package(pkg): + """ prepare for building """ + try: + instance = get_instance(pkg) + instance.prepare_build() + except EasyBuildError, err: + log.warn("%s failed to prepare. Submitting anyway, for proper error resolution" % pkg['name']) def submit_job(package, output_dir, script_dir): """ From dafd1b791f64a5dc48e5b682cc521a11d91419b5 Mon Sep 17 00:00:00 2001 From: Toon Willems Date: Wed, 8 Aug 2012 12:18:32 +0200 Subject: [PATCH 506/798] revert ugly hack --- easybuild/framework/application.py | 12 ------------ 1 file changed, 12 deletions(-) diff --git a/easybuild/framework/application.py b/easybuild/framework/application.py index 4884a27554..42eaa0cbe0 100644 --- a/easybuild/framework/application.py +++ b/easybuild/framework/application.py @@ -482,18 +482,6 @@ def download(filename, url, path): for fp in fullpaths: if os.path.isfile(fp): self.log.info("Found file %s at %s" % (filename, fp)) - self.log.debug("If the size of the file stays the same for 5 seconds, assume it's good") - - self.log.debug("filesize: %s" % os.path.getsize(fp)) - - size1 = 0 - size2 = 1 - while size1 != size2: - size1 = os.path.getsize(fp) - time.sleep(5) - size2 = os.path.getsize(fp) - self.log.debug("size change: %s" % (size2 - size1)) - foundfile = fp break # no need to try further else: From be06aac938033283f5448f3f8f51f8b7bd88e93a Mon Sep 17 00:00:00 2001 From: Toon Willems Date: Wed, 8 Aug 2012 12:28:43 +0200 Subject: [PATCH 507/798] fix strange characters in my files --- easybuild/framework/application.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/easybuild/framework/application.py b/easybuild/framework/application.py index 42eaa0cbe0..fc54874631 100644 --- a/easybuild/framework/application.py +++ b/easybuild/framework/application.py @@ -1,4 +1,4 @@ -ta# +# # Copyright 2009-2012 Stijn De Weirdt # Copyright 2010 Dries Verdegem # Copyright 2010-2012 Kenneth Hoste From cbdf09453d84fbd8cca88de9ef7c7e4621a72c16 Mon Sep 17 00:00:00 2001 From: Toon Willems Date: Wed, 8 Aug 2012 12:37:09 +0200 Subject: [PATCH 508/798] fix warning --- easybuild/test/build.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/easybuild/test/build.py b/easybuild/test/build.py index b77f61b595..9c31dfbb16 100644 --- a/easybuild/test/build.py +++ b/easybuild/test/build.py @@ -334,7 +334,7 @@ def prepare_package(pkg): instance = get_instance(pkg) instance.prepare_build() except EasyBuildError, err: - log.warn("%s failed to prepare. Submitting anyway, for proper error resolution" % pkg['name']) + log.warn("%s failed to prepare. Submitting anyway, for proper error resolution" % str(pkg['module'])) def submit_job(package, output_dir, script_dir): """ From 55f0f6c970b93eadcb7931a0793bce0c39b500b9 Mon Sep 17 00:00:00 2001 From: Toon Willems Date: Wed, 8 Aug 2012 12:49:13 +0200 Subject: [PATCH 509/798] improve optionparser --- easybuild/test/build.py | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/easybuild/test/build.py b/easybuild/test/build.py index 9c31dfbb16..e64b524c98 100644 --- a/easybuild/test/build.py +++ b/easybuild/test/build.py @@ -82,9 +82,10 @@ def main(): # Option parsing parser = OptionParser() parser.add_option("--no-parallel", action="store_false", dest="parallel", default=True, - help="submit jobs to build in parallel") + help="specify this option if you want to prevent parallel build") parser.add_option("--output-dir", dest="directory", help="set output directory for test-run") - parser.add_option("-r", "--robot", help="specify robot directory") + parser.add_option("-r", "--robot", default="easybuild/easyconfigs", + help="specify robot directory (default: %default)") (opts, args) = parser.parse_args() @@ -248,6 +249,9 @@ def build_packages_in_parallel(packages, output_dir, script_dir): no_dependencies = [pkg for pkg in packages if len(pkg['unresolvedDependencies']) == 0] with_dependencies = [pkg for pkg in packages if pkg not in no_dependencies] + # This is very important, otherwise we might have race conditions + # e.g. GCC-4.5.3 finds cloog.tar.gz but it was incorrectly downloaded by GCC-4.6.3 + # running this step here, prevents this log.info("preparing packages: %s" % no_dependencies) for pkg in no_dependencies: prepare_package(pkg) From 55cf09243306aa3e11b6ab7214e069d543ef469c Mon Sep 17 00:00:00 2001 From: Kenneth Hoste Date: Wed, 8 Aug 2012 12:56:11 +0200 Subject: [PATCH 510/798] use get_software_root everywhere, add extra constant to toolkit.py for MPI libs --- easybuild/easyblocks/a/atlas.py | 6 +- easybuild/easyblocks/b/blacs.py | 26 +++--- easybuild/easyblocks/c/cp2k.py | 47 ++++++----- easybuild/easyblocks/g/g2clib.py | 8 +- easybuild/easyblocks/g/g2lib.py | 8 +- easybuild/easyblocks/g/gcc.py | 4 +- easybuild/easyblocks/h/hdf5.py | 6 +- easybuild/easyblocks/i/imkl.py | 10 ++- easybuild/easyblocks/l/lapack.py | 11 +-- easybuild/easyblocks/l/libsmm.py | 7 +- easybuild/easyblocks/m/mrbayes.py | 8 +- easybuild/easyblocks/n/ncl.py | 21 ++--- easybuild/easyblocks/n/netcdf.py | 7 +- easybuild/easyblocks/o/openfoam.py | 7 +- easybuild/easyblocks/p/pasha.py | 4 +- easybuild/easyblocks/p/python.py | 16 ++-- easybuild/easyblocks/s/scalapack.py | 34 ++++---- easybuild/easyblocks/w/wps.py | 13 +-- easybuild/easyblocks/w/wrf.py | 5 +- easybuild/tools/modules.py | 6 ++ easybuild/tools/toolkit.py | 120 +++++++++++++++++++++------- 21 files changed, 237 insertions(+), 137 deletions(-) diff --git a/easybuild/easyblocks/a/atlas.py b/easybuild/easyblocks/a/atlas.py index 0db22b8374..0cab053802 100644 --- a/easybuild/easyblocks/a/atlas.py +++ b/easybuild/easyblocks/a/atlas.py @@ -31,6 +31,7 @@ from easybuild.framework.application import Application from easybuild.tools.filetools import run_cmd +from easybuild.tools.modules import get_software_root class ATLAS(Application): @@ -66,8 +67,9 @@ def configure(self): # if LAPACK is found, instruct ATLAS to provide a full LAPACK library # ATLAS only provides a few LAPACK routines natively if self.getcfg('full_lapack'): - if os.getenv('SOFTROOTLAPACK'): - self.updatecfg('configopts', ' --with-netlib-lapack=%s/lib/liblapack.a' % os.getenv('SOFTROOTLAPACK')) + lapack = get_software_root('LAPACK') + if lapack: + self.updatecfg('configopts', ' --with-netlib-lapack=%s/lib/liblapack.a' % lapack) else: self.log.error("netlib's LAPACK library not available,"\ " required to build ATLAS with a full LAPACK library.") diff --git a/easybuild/easyblocks/b/blacs.py b/easybuild/easyblocks/b/blacs.py index 4898050c21..008b9126f1 100644 --- a/easybuild/easyblocks/b/blacs.py +++ b/easybuild/easyblocks/b/blacs.py @@ -33,6 +33,7 @@ from easybuild.framework.application import Application from easybuild.tools.filetools import run_cmd +from easybuild.tools.modules import get_software_root def det_interface(log, path): @@ -73,15 +74,22 @@ def configure(self): def make(self): - # determine MPI base dir - if os.getenv('SOFTROOTOPENMPI'): - base = os.getenv('SOFTROOTOPENMPI') - mpilib = '-L$(MPILIBdir) -lmpi_f77' - elif os.getenv('SOFTROOTMVAPICH2'): - base = os.getenv('SOFTROOTMVAPICH2') - mpilib = '$(MPILIBdir)/libmpich.a $(MPILIBdir)/libfmpich.a $(MPILIBdir)/libmpl.a -lpthread' - else: - self.log.error("Don't know how to set MPI base dir, unknown MPI library used.") + # determine MPI base dir and lib + known_mpi_libs = { + 'OpenMPI': "-L$(MPILIBdir) -lmpi_f77", + 'MVAPICH2': "$(MPILIBdir)/libmpich.a $(MPILIBdir)/libfmpich.a " + \ + "$(MPILIBdir)/libmpl.a -lpthread" + } + + base, mpilib = None, None + for key, val in known_mpi_libs.items(): + root = get_software_root(key) + if root: + base = root + mpilib = val + + if base and mpilib: + self.log.error("Unknown MPI library used (known MPI libs: %s)" % known_mpi_libs.keys()) # common settings (for now) mpicc = 'mpicc' diff --git a/easybuild/easyblocks/c/cp2k.py b/easybuild/easyblocks/c/cp2k.py index 2c3fa4be82..7dda29a15b 100644 --- a/easybuild/easyblocks/c/cp2k.py +++ b/easybuild/easyblocks/c/cp2k.py @@ -37,6 +37,7 @@ import easybuild.tools.toolkit as toolkit from easybuild.framework.application import Application from easybuild.tools.filetools import run_cmd +from easybuild.tools.modules import get_software_root class CP2K(Application): @@ -114,9 +115,11 @@ def configure(self): self.log.info("Using extra CFLAGS: %s" % self.getcfg('extradflags')) # libsmm support - if os.environ.has_key('SOFTROOTLIBSMM'): - libsmms = glob.glob(os.path.join(os.environ['SOFTROOTLIBSMM'], 'lib') + '/libsmm_*nn.a') - moredflags = ' ' + ' '.join([os.path.basename(os.path.splitext(x)[0]).replace('lib', '-D__HAS_') for x in libsmms]) + libsmm = get_software_root('libsmm') + if libsmm: + libsmms = glob.glob(os.path.join(libsmm, 'lib') + '/libsmm_*nn.a') + dfs = [os.path.basename(os.path.splitext(x)[0]).replace('lib', '-D__HAS_') for x in libsmms] + moredflags = ' ' + ' '.join(dfs) self.updatecfg('extradflags', moredflags) self.libsmm = ' '.join(libsmms) self.log.debug('Using libsmm %s (extradflags %s)' % (self.libsmm, moredflags)) @@ -140,20 +143,20 @@ def configure(self): else: self.log.error("Don't know how to tweak configuration for compiler used.") - if os.getenv('SOFTROOTIMKL'): + if get_software_root('IMKL'): options = self.configureMKL(options) - elif os.getenv('SOFTROOTACML'): + elif get_software_root('ACML'): options = self.configureACML(options) - elif os.getenv('SOFTROOTATLAS'): + elif get_software_root('ATLAS'): options = self.configureATLAS(options) - if os.getenv('SOFTROOTFFTW'): + if get_software_root('FFTW'): options = self.configureFFTW(options) - if os.getenv('SOFTROOTLAPACK'): + if get_software_root('LAPACK'): options = self.configureLAPACK(options) - if os.getenv('SOFTROOTSCALAPACK'): + if get_software_root('ScaLAPACK'): options = self.configureScaLAPACK(options) # avoid group nesting @@ -178,9 +181,9 @@ def prepmodinc(self): self.log.debug("Preparing module files") - softrootimkl = os.getenv('SOFTROOTIMKL') + imkl = get_software_root('IMKL') - if softrootimkl: + if imkl: # prepare modinc target path modincpath = os.path.join(self.builddir, 'modinc') @@ -192,7 +195,7 @@ def prepmodinc(self): self.log.error("Failed to create directory for module include files: %s" % err) # get list of modinc source files - modincdir = os.path.join(softrootimkl, self.getcfg("modincprefix"), 'include') + modincdir = os.path.join(imkl, self.getcfg("modincprefix"), 'include') if type(self.getcfg("modinc")) == list: modfiles = [os.path.join(modincdir, x) for x in self.getcfg("modinc")] @@ -244,7 +247,7 @@ def configureCommon(self): mpi2libs = ['impi', 'MVAPICH2', 'OpenMPI'] mpi2 = False for mpi2lib in mpi2libs: - if os.getenv('SOFTROOT%s' % mpi2lib.upper()): + if get_software_root(mpi2lib): mpi2 = True else: self.log.debug("MPI-2 supporting MPI library %s not loaded.") @@ -280,8 +283,8 @@ def configureCommon(self): if self.getcfg('libint'): - softrootlibint = os.getenv('SOFTROOTLIBINT') - if not softrootlibint: + libint = get_software_root('LibInt') + if not libint: self.log.error("LibInt module not loaded.") options['DFLAGS'] += ' -D__LIBINT' @@ -307,7 +310,7 @@ def configureCommon(self): self.log.error("No libinttools dir found") # build libint wrapper - cmd = "%s -c libint_cpp_wrapper.cpp -I%s/include" % (libintcompiler, softrootlibint) + cmd = "%s -c libint_cpp_wrapper.cpp -I%s/include" % (libintcompiler, libint) if not run_cmd(cmd, log_all=True, simple=True): self.log.error("Building the libint wrapper failed") libint_wrapper = '%s/libint_cpp_wrapper.o' % libinttools_path @@ -322,7 +325,7 @@ def configureCommon(self): self.log.error("Don't know how to handle libint version %s" % libint_maj_ver) self.log.info("Using LibInt version %s" % (libint_maj_ver)) - options['LIBINTLIB'] = '%s/lib' % softrootlibint + options['LIBINTLIB'] = '%s/lib' % libint options['LIBS'] += ' -lstdc++ %s %s' % (libint_libs, libint_wrapper) return options @@ -393,7 +396,7 @@ def configureACML(self, options): if self.openmp: openmp_suffix = '_mp' - options['ACML_INC'] = '%s/gfortran64%s/include' % (os.getenv('SOFTROOTACML'), openmp_suffix) + options['ACML_INC'] = '%s/gfortran64%s/include' % (get_software_root('ACML'), openmp_suffix) options['CFLAGS'] += ' -I$(ACML_INC) -I$(FFTW_INC)' options['DFLAGS'] += ' -D__FFTACML' @@ -432,12 +435,12 @@ def configureMKL(self, options): def configureFFTW(self, options): """Configure for Fastest Fourier Transform in the West (FFTW)""" - softroot = os.getenv('SOFTROOTFFTW') + fftw = get_software_root('FFTW') options.update({ - 'FFTW_INC': '%s/include' % softroot, # GCC - 'FFTW3INC': '%s/include' % softroot, # Intel - 'FFTW3LIB': '%s/lib' % softroot, # Intel + 'FFTW_INC': '%s/include' % fftw, # GCC + 'FFTW3INC': '%s/include' % fftw, # Intel + 'FFTW3LIB': '%s/lib' % fftw, # Intel }) options['DFLAGS'] += ' -D__FFTW3' diff --git a/easybuild/easyblocks/g/g2clib.py b/easybuild/easyblocks/g/g2clib.py index 30a9149786..a0879f27bb 100644 --- a/easybuild/easyblocks/g/g2clib.py +++ b/easybuild/easyblocks/g/g2clib.py @@ -31,6 +31,7 @@ import shutil from easybuild.framework.application import Application +from easybuild.tools.modules import get_software_root class G2clib(Application): @@ -43,13 +44,12 @@ def configure(self): def make(self): """Build by supplying required make options, and running make.""" - if not os.getenv('SOFTROOTJASPER'): + jasper = get_software_root('JASPER') + if not jasper: self.log.error("JasPer module not loaded?") # beware: g2clib uses INC, while g2lib uses INCDIR ! - makeopts = 'CC="%s" FC="%s" INC="-I%s/include"' % (os.getenv('CC'), - os.getenv('F90'), - os.getenv('SOFTROOTJASPER')) + makeopts = 'CC="%s" FC="%s" INC="-I%s/include"' % (os.getenv('CC'), os.getenv('F90'), jasper) self.updatecfg('makeopts', makeopts) Application.make(self) diff --git a/easybuild/easyblocks/g/g2lib.py b/easybuild/easyblocks/g/g2lib.py index e62e1fb58c..b9887e581a 100644 --- a/easybuild/easyblocks/g/g2lib.py +++ b/easybuild/easyblocks/g/g2lib.py @@ -30,6 +30,7 @@ import shutil from easybuild.framework.application import Application +from easybuild.tools.modules import get_software_root class G2lib(Application): @@ -42,12 +43,11 @@ def configure(self): def make(self): """Build by supplying required make options, and running make.""" - if not os.getenv('SOFTROOTJASPER'): + jasper = get_software_root('JASPER') + if not jasper: self.log.error("JasPer module not loaded?") - makeopts = 'CC="%s" FC="%s" INCDIR="-I%s/include"' % (os.getenv('CC'), - os.getenv('F90'), - os.getenv('SOFTROOTJASPER')) + makeopts = 'CC="%s" FC="%s" INCDIR="-I%s/include"' % (os.getenv('CC'), os.getenv('F90'), jasper) self.updatecfg('makeopts', makeopts) Application.make(self) diff --git a/easybuild/easyblocks/g/gcc.py b/easybuild/easyblocks/g/gcc.py index 2f835bf747..8d5ca95441 100644 --- a/easybuild/easyblocks/g/gcc.py +++ b/easybuild/easyblocks/g/gcc.py @@ -37,7 +37,7 @@ from easybuild.framework.application import Application from easybuild.tools.filetools import run_cmd from easybuild.tools.systemtools import get_kernel_name, get_shared_lib_ext, get_platform_name - +from easybuild.tools.modules import get_software_root class GCC(Application): @@ -99,7 +99,7 @@ def prep_extra_src_dirs(self, stage, target_prefix=None): # see if modules are loaded # if module is available, just use the --with-X GCC configure option for extra in copy(extra_src_dirs): - envvar = os.getenv('SOFTROOT%s' % extra.upper()) + envvar = get_software_root(extra) if envvar: configopts += " --with-%s=%s" % (extra, envvar) extra_src_dirs.remove(extra) diff --git a/easybuild/easyblocks/h/hdf5.py b/easybuild/easyblocks/h/hdf5.py index 8ebcb9e130..463ccc1a64 100644 --- a/easybuild/easyblocks/h/hdf5.py +++ b/easybuild/easyblocks/h/hdf5.py @@ -29,6 +29,7 @@ import os from easybuild.framework.application import Application +from easybuild.tools.modules import get_software_root class HDF5(Application): @@ -40,8 +41,9 @@ def configure(self): # configure options deps = ["Szip", "zlib"] for dep in deps: - if os.getenv('SOFTROOT%s' % dep.upper()): - self.updatecfg('configopts', '--with-%s=$SOFTROOT%s' % (dep.lower(), dep.upper())) + root = get_software_root(dep) + if root: + self.updatecfg('configopts', '--with-%s=%s' % (dep.lower(), root)) else: self.log.error("Dependency module %s not loaded." % dep) diff --git a/easybuild/easyblocks/i/imkl.py b/easybuild/easyblocks/i/imkl.py index 902a49ac09..af977b5211 100644 --- a/easybuild/easyblocks/i/imkl.py +++ b/easybuild/easyblocks/i/imkl.py @@ -32,6 +32,7 @@ from distutils.version import LooseVersion import easybuild.tools.environment as env +import easybuild.tools.toolkit as toolkit from easybuild.easyblocks.i.intelbase import IntelBase from easybuild.tools.filetools import run_cmd from easybuild.tools.modules import Modules @@ -163,6 +164,11 @@ def postproc(self): except: self.log.exception("Can't change to interfaces directory %s" % interfacedir) + # compiler defaults to icc, but we could be using gcc to create gimkl. + makeopts = '' + if self.toolkit().toolkit_comp_family() == toolkit.GCC: + makeopts += 'compiler=gnu ' + for i in lis1 + lis2 + lis3: if i in lis1: # use INSTALL_DIR and CFLAGS and COPTS @@ -173,8 +179,8 @@ def postproc(self): if i in lis3: # use INSTALL_DIR and SPEC_OPT extramakeopts = '' - if os.getenv('SOFTROOTMPICH2'): - extramakeopts = 'mpi=mpich2' + if self.toolkit().toolkit_mpi_type() == toolkit.MPICH2: + extramakeopts += 'mpi=mpich2' cmd = "make -f makefile libintel64 %s" % extramakeopts diff --git a/easybuild/easyblocks/l/lapack.py b/easybuild/easyblocks/l/lapack.py index d71efaf53b..7fafab9ae5 100644 --- a/easybuild/easyblocks/l/lapack.py +++ b/easybuild/easyblocks/l/lapack.py @@ -32,6 +32,7 @@ from easybuild.framework.application import Application from easybuild.tools.filetools import run_cmd +from easybuild.tools.modules import get_software_root # also used for e.g. ScaLAPACK @@ -45,13 +46,13 @@ def get_blas_lib(log): 'ATLAS': '-L%s -lf77blas -latlas' } for (key,val) in known_blas_libs.items(): - softroot = 'SOFTROOT%s' % key.upper() - if os.getenv(softroot): - blaslib = val % os.path.join(os.getenv(softroot), 'lib') - log.debug("Found %s, so using %s as BLAS lib" % (softroot, key)) + root = get_software_root(key) + if root: + blaslib = val % os.path.join(root, 'lib') + log.debug("Using %s as BLAS lib" % root) break else: - log.debug("%s not defined, so %s not loaded" % (softroot, key)) + log.debug("%s module not loaded" % key) if not blaslib: log.error("No or unknown BLAS lib loaded; known BLAS libs: %s" % known_blas_libs.keys()) diff --git a/easybuild/easyblocks/l/libsmm.py b/easybuild/easyblocks/l/libsmm.py index e941732473..7a93281223 100644 --- a/easybuild/easyblocks/l/libsmm.py +++ b/easybuild/easyblocks/l/libsmm.py @@ -31,9 +31,10 @@ from distutils.version import LooseVersion import easybuild # required for VERBOSE_VERSION +import easybuild.tools.toolkit as toolkit from easybuild.framework.application import Application from easybuild.tools.filetools import run_cmd -from easybuild.tools.modules import get_software_root +from easybuild.tools.modules import get_software_root, get_software_version class Libsmm(Application): @@ -140,7 +141,7 @@ def make(self): """ # only GCC is supported for now - if os.getenv('SOFTROOTGCC'): + if self.toolkit().toolkit_comp_family() == toolkit.GCC: hostcompile = os.getenv('F90') # optimizations @@ -148,7 +149,7 @@ def make(self): # Depending on the version, we need extra options extra = '' - gccVersion = LooseVersion(os.getenv('SOFTVERSIONGCC')) + gccVersion = LooseVersion(get_software_version('GCC')) if gccVersion >= LooseVersion('4.6'): extra = "-flto" diff --git a/easybuild/easyblocks/m/mrbayes.py b/easybuild/easyblocks/m/mrbayes.py index e3a1e67a81..624b5d84ab 100644 --- a/easybuild/easyblocks/m/mrbayes.py +++ b/easybuild/easyblocks/m/mrbayes.py @@ -33,6 +33,7 @@ from easybuild.framework.application import Application from easybuild.tools.filetools import run_cmd +from easybuild.tools.modules import get_software_root class MrBayes(Application): @@ -51,15 +52,16 @@ def configure(self): try: os.chdir(self.getcfg('startfrom')) except OSError, err: - self.log.error("Failed to change to correct source dir %s: %s" % (self.getcfg('startfrom'), err)) + self.log.error("Failed to change to correct source dir %s: %s" % (self.getcfg('startfrom'), err)) # run autoconf to generate configure script cmd = "autoconf" run_cmd(cmd) # set config opts - if os.getenv('SOFTROOTBEAGLE'): - self.updatecfg('configopts', '--with-beagle=%s' % os.getenv('SOFTROOTBEAGLE')) + beagle = get_software_root('BEAGLE') + if beagle: + self.updatecfg('configopts', '--with-beagle=%s' % beagle) else: self.log.error("BEAGLE module not loaded?") diff --git a/easybuild/easyblocks/n/ncl.py b/easybuild/easyblocks/n/ncl.py index 220b82039d..f8516735b6 100644 --- a/easybuild/easyblocks/n/ncl.py +++ b/easybuild/easyblocks/n/ncl.py @@ -34,7 +34,7 @@ from easybuild.framework.application import Application from easybuild.tools.filetools import run_cmd -from easybuild.tools.modules import get_software_root +from easybuild.tools.modules import get_software_root, get_software_version class NCL(Application): @@ -69,12 +69,13 @@ def configure(self): # adjust config file as needed ctof_libs = '' - if os.getenv('SOFTROOTIFORT'): - if LooseVersion(os.getenv('SOFTVERSIONIFORT')) < LooseVersion('2011.4'): - ctof_libs = '-lm -L${SOFTROOTIFORT}/lib/intel64 -lifcore -lifport' + ifort = get_software_root('ifort') + if ifort: + if LooseVersion(get_software_version('ifort')) < LooseVersion('2011.4'): + ctof_libs = '-lm -L%s/lib/intel64 -lifcore -lifport' % ifort else: - ctof_libs = '-lm -L${SOFTROOTIFORT}/compiler/lib/intel64 -lifcore -lifport' - elif os.getenv('SOFTROOTGCC'): + ctof_libs = '-lm -L%s/compiler/lib/intel64 -lifcore -lifport' % ifort + elif get_software_root('GCC'): ctof_libs = '-lgfortran -lm' macrodict = { 'CCompiler': os.getenv('CC'), @@ -123,11 +124,11 @@ def configure(self): libs = '' includes = '' for dep in deps: - softroot = get_software_root(dep) - if not softroot: + root = get_software_root(dep) + if not root: self.log.error('%s not available' % dep) - libs += ' -L%s/lib ' % softroot - includes += ' -I%s/include ' % softroot + libs += ' -L%s/lib ' % root + includes += ' -I%s/include ' % root cfgtxt="""#ifdef FirstSite #endif /* FirstSite */ diff --git a/easybuild/easyblocks/n/netcdf.py b/easybuild/easyblocks/n/netcdf.py index d9731545e5..e519914066 100644 --- a/easybuild/easyblocks/n/netcdf.py +++ b/easybuild/easyblocks/n/netcdf.py @@ -32,6 +32,7 @@ import easybuild.tools.environment as env import easybuild.tools.toolkit as toolkit from easybuild.framework.application import Application +from easybuild.tools.modules import get_software_root, get_software_version class NetCDF(Application): @@ -87,14 +88,14 @@ def sanitycheck(self): def set_netcdf_env_vars(log): """Set netCDF environment variables used by other software.""" - netcdf = os.getenv('SOFTROOTNETCDF') + netcdf = get_software_root('netCDF') if not netcdf: log.error("netCDF module not loaded?") else: env.set('NETCDF', netcdf) log.debug("Set NETCDF to %s" % netcdf) - netcdff = os.getenv('SOFTROOTNETCDFMINFORTRAN') - netcdf_ver = os.getenv('SOFTVERSIONNETCDF') + netcdff = get_software_root('netCDF-Fortran') + netcdf_ver = get_software_version('netCDF') if not netcdff: if LooseVersion(netcdf_ver) >= LooseVersion("4.2"): log.error("netCDF v4.2 no longer supplies Fortran library, also need netCDF-Fortran") diff --git a/easybuild/easyblocks/o/openfoam.py b/easybuild/easyblocks/o/openfoam.py index ffa0fc42ae..e71df18804 100644 --- a/easybuild/easyblocks/o/openfoam.py +++ b/easybuild/easyblocks/o/openfoam.py @@ -33,6 +33,7 @@ import easybuild.tools.toolkit as toolkit from easybuild.framework.application import Application from easybuild.tools.filetools import run_cmd, adjust_permissions +from easybuild.tools.modules import get_software_root class OpenFOAM(Application): @@ -82,15 +83,15 @@ def configure(self): mpi_type = self.tk.toolkit_mpi_type() if mpi_type == toolkit.INTEL: - self.mpipath = os.path.join(os.environ['SOFTROOTIMPI'],'intel64') + self.mpipath = os.path.join(get_software_root('IMPI'),'intel64') self.wm_mplib = "IMPI" elif mpi_type == toolkit.QLOGIC: - self.mpipath = os.environ['SOFTROOTQLOGICMPI'] + self.mpipath = get_software_root('QLogicMPI') self.wm_mplib = "MPICH" elif mpi_type == toolkit.OPENMPI: - self.mpipath = os.environ['SOFTROOTOPENMPI'] + self.mpipath = get_software_root('OpenMPI') self.wm_mplib = "MPI-MVAPICH2" else: diff --git a/easybuild/easyblocks/p/pasha.py b/easybuild/easyblocks/p/pasha.py index 858fde4397..e127cb9678 100644 --- a/easybuild/easyblocks/p/pasha.py +++ b/easybuild/easyblocks/p/pasha.py @@ -24,7 +24,9 @@ import shutil import os + from easybuild.framework.application import Application +from easybuild.tools.modules import get_software_root class Pasha(Application): @@ -33,7 +35,7 @@ class Pasha(Application): def configure(self): """Configure Pasha by setting make options.""" - tbb = os.getenv('SOFTROOTTBB') + tbb = get_software_root('TBB') if not tbb: self.log.error("TBB module not loaded.") diff --git a/easybuild/easyblocks/p/python.py b/easybuild/easyblocks/p/python.py index 311f3abb3c..ea0eba8673 100644 --- a/easybuild/easyblocks/p/python.py +++ b/easybuild/easyblocks/p/python.py @@ -32,6 +32,7 @@ import easybuild.tools.toolkit as toolkit from easybuild.framework.application import ApplicationPackage, Application from easybuild.tools.filetools import unpack, patch, run_cmd +from easybuild.tools.modules import get_software_root class Python(Application): @@ -89,6 +90,8 @@ def __init__(self, mself, pkg, pkginstalldeps): self.pkgdir = "%s/%s" % (self.builddir, self.name) self.unpack_options = '' + self.python = get_software_root('Python') + def configure(self): """Configure Python package build """ @@ -125,7 +128,7 @@ def make(self): def make_install(self): """Install built Python package""" - cmd = "python setup.py install --prefix=%s %s" % (os.environ['SOFTROOTPYTHON'], self.installopts) + cmd = "python setup.py install --prefix=%s %s" % (self.python, self.installopts) run_cmd(cmd, log_all=True, simple=True) def test(self): @@ -163,9 +166,6 @@ def test(self): def run(self): """Perform the actual package build/installation procedure""" - # a Python module should be loaded - if not os.environ.has_key('SOFTROOTPYTHON'): - self.log.error("Couldn't find SOFTROOTPYTHON variable") # unpack if not self.src: @@ -250,13 +250,13 @@ def __init__(self, mself, pkg, pkginstalldeps): """ - if "SOFTROOTIMKL" in os.environ: + if get_software_root("IMKL"): #use mkl extrasiteconfig = """[mkl] lapack_libs = %(lapack)s mkl_libs = %(blas)s """ - elif "SOFTROOTATLAS" in os.environ and "SOFTROOTLAPACK" in os.environ: + elif get_software_root("ATLAS") and get_software_root("LAPACK"): extrasiteconfig = """ [blas_opt] libraries = %(blas)s @@ -266,7 +266,7 @@ def __init__(self, mself, pkg, pkginstalldeps): else: self.log.error("Could not detect math kernel (mkl, atlas)") - if "SOFTROOTIMKL" in os.environ or "SOFTROOTFFTW" in os.environ: + if get_software_root("IMKL") or get_software_root("FFTW"): extrasiteconfig += """ [fftw] libraries = %s @@ -276,7 +276,7 @@ def __init__(self, mself, pkg, pkginstalldeps): lapack_libs = os.getenv("LIBLAPACK_MT").split(" -l") blas_libs = os.getenv("LIBBLAS_MT").split(" -l") - if os.getenv('SOFTROOTIMKL'): + if get_software_root("IMKL"): # with IMKL, get rid of all spaces and use '-Wl:' lapack_libs.remove("pthread") lapack = ','.join(lapack_libs).replace(' ', ',').replace('Wl,','Wl:') diff --git a/easybuild/easyblocks/s/scalapack.py b/easybuild/easyblocks/s/scalapack.py index ab9c94f998..459e3be38c 100644 --- a/easybuild/easyblocks/s/scalapack.py +++ b/easybuild/easyblocks/s/scalapack.py @@ -30,9 +30,11 @@ import shutil from distutils.version import LooseVersion +import easybuild.tools.toolkit as toolkit from easybuild.framework.application import Application from easybuild.easyblocks.b.blacs import det_interface from easybuild.easyblocks.l.lapack import get_blas_lib +from easybuild.tools.modules import get_software_root class ScaLAPACK(Application): @@ -63,7 +65,7 @@ def configure(self): if self.loosever < LooseVersion("2.0.0"): deps.append("BLACS") for dep in deps: - if not os.getenv('SOFTROOT%s' % dep.upper()): + if not get_software_root(dep): self.log.error("Dependency %s not available/loaded." % dep) def make(self): @@ -73,7 +75,7 @@ def make(self): mpicc = os.getenv('MPICC') mpif77 = os.getenv('MPIF77') mpif90 = os.getenv('MPIF90') - elif os.getenv('SOFTROOTOPENMPI') or os.getenv('SOFTROOTMVAPICH'): + elif self.toolkit().toolkit_mpi_type() in [toolkit.OPENMPI, toolkit.MVAPICH2]: mpicc = 'mpicc' mpif77 = 'mpif77' mpif90 = 'mpif90' @@ -81,27 +83,25 @@ def make(self): self.log.error("Don't know which compiler commands to use.") # set BLAS and LAPACK libs - extra_makeopts = 'BLASLIB="%s -lpthread" LAPACKLIB=%s/lib/liblapack.a ' % ( - get_blas_lib(self.log), - os.getenv('SOFTROOTLAPACK') - ) + extra_makeopts = 'BLASLIB="%s -lpthread"' % get_blas_lib(self.log) + extra_makeopts += ' LAPACKLIB=%s/lib/liblapack.a ' % get_software_root('LAPACK') # build procedure changed in v2.0.0 if self.loosever < LooseVersion("2.0.0"): - # determine interface - interface = det_interface(self.log, os.path.join(os.getenv('SOFTROOTBLACS'), 'bin')) + blacs = get_software_root('BLACS') - blacsroot = os.getenv('SOFTROOTBLACS') + # determine interface + interface = det_interface(self.log, os.path.join(blacs, 'bin')) # set build and BLACS dir correctly - extra_makeopts += 'home=%s BLACSdir=%s ' % (self.getcfg('startfrom'), blacsroot) + extra_makeopts += 'home=%s BLACSdir=%s ' % (self.getcfg('startfrom'), blacs) # set BLACS libs correctly for (var, lib) in [('BLACSFINIT', "F77init"), ('BLACSCINIT', "Cinit"), ('BLACSLIB', "")]: - extra_makeopts += '%s=%s/lib/libblacs%s.a ' % (var, blacsroot, lib) + extra_makeopts += '%s=%s/lib/libblacs%s.a ' % (var, blacs, lib) # set compilers and options noopt = '' @@ -109,18 +109,18 @@ def make(self): noopt += " -O0" if self.toolkit().opts['pic']: noopt += " -fPIC" - extra_makeopts += 'F77="%(f77)s" CC="%(cc)s" NOOPT="%(noopt)s" CCFLAGS="-O3" ' % { - 'f77': mpif77, - 'cc': mpicc, - 'noopt': noopt - } + extra_makeopts += 'F77="%(f77)s"' % mpif77 + extra_makeopts += ' CC="%(cc)s"' % mpicc + extra_makeopts += ' NOOPT="%(noopt)s"' % noopt + extra_makeopts += ' CCFLAGS="-O3" ' + # set interface extra_makeopts += "CDEFS='-D%s -DNO_IEEE $(USEMPI)' " % interface else: # determine interface - if os.getenv('SOFTROOTOPENMPI') or os.getenv('SOFTROOTMVAPICH2'): + if self.toolkit().toolkit_mpi_type() in [toolkit.OPENMPI, toolkit.MVAPICH2]: interface = 'Add_' else: self.log.error("Don't know which interface to pick for the MPI library being used.") diff --git a/easybuild/easyblocks/w/wps.py b/easybuild/easyblocks/w/wps.py index fce8e5aad1..9711129037 100644 --- a/easybuild/easyblocks/w/wps.py +++ b/easybuild/easyblocks/w/wps.py @@ -38,6 +38,7 @@ import easybuild.tools.toolkit as toolkit from easybuild.framework.application import Application from easybuild.tools.filetools import patch_perl_script_autoflush, run_cmd, run_cmd_qa, unpack +from easybuild.tools.modules import get_software_root from easybuild.easyblocks.n.netcdf import set_netcdf_env_vars, get_netcdf_module_set_cmds @@ -79,10 +80,10 @@ def configure(self): set_netcdf_env_vars(self.log) # WRF dependency check - softrootwrf = os.getenv('SOFTROOTWRF') - if softrootwrf: - majver = os.getenv('SOFTVERSIONWRF').split('.')[0] - self.wrfdir = os.path.join(softrootwrf, "WRFV%s" % majver) + wrf = get_software_root('WRF') + if wrf: + majver = get_software_version('WRF').split('.')[0] + self.wrfdir = os.path.join(wrf, "WRFV%s" % majver) else: self.log.error("WRF module not loaded?") @@ -96,14 +97,14 @@ def configure(self): self.log.error("Failed to patch %s script: %s" % (self.compile_script, err)) # libpng dependency check - libpng = os.getenv('SOFTROOTLIBPNG') + libpng = get_software_root('libpng') libpnginc = "%s/include" % libpng libpnglibdir = "%s/lib" % libpng if not libpng: self.log.error("libpng module not loaded?") # JasPer dependency check + setting env vars - jasper = os.getenv('SOFTROOTJASPER') + jasper = get_software_root('JasPer') jasperlibdir = os.path.join(jasper, "lib") if jasper: env.set('JASPERINC', os.path.join(jasper, "include")) diff --git a/easybuild/easyblocks/w/wrf.py b/easybuild/easyblocks/w/wrf.py index b4e97281d3..6a2b8489b2 100644 --- a/easybuild/easyblocks/w/wrf.py +++ b/easybuild/easyblocks/w/wrf.py @@ -35,6 +35,7 @@ import easybuild.tools.toolkit as toolkit from easybuild.framework.application import Application from easybuild.tools.filetools import patch_perl_script_autoflush, run_cmd, run_cmd_qa +from easybuild.tools.modules import get_software_root from easybuild.easyblocks.n.netcdf import set_netcdf_env_vars, get_netcdf_module_set_cmds @@ -69,7 +70,7 @@ def configure(self): set_netcdf_env_vars(self.log) # HDF5 (optional) dependency - hdf5 = os.getenv('SOFTROOTHDF5') + hdf5 = get_software_root('HDF5') if hdf5: # check if this is parallel HDF5 phdf5_bins = ['h5pcc','ph5diff'] @@ -86,7 +87,7 @@ def configure(self): self.log.info("HDF5 module not loaded, assuming that's OK...") # JasPer dependency check + setting env vars - jasper = os.getenv('SOFTROOTJASPER') + jasper = get_software_root('JasPer') jasperlibdir = os.path.join(jasper, "lib") if jasper: env.set('JASPERINC', os.path.join(jasper, "include")) diff --git a/easybuild/tools/modules.py b/easybuild/tools/modules.py index abcc508b1e..43419c291a 100644 --- a/easybuild/tools/modules.py +++ b/easybuild/tools/modules.py @@ -308,3 +308,9 @@ def get_software_root(name): environmentKey = "SOFTROOT%s" % convertName(name, upper=True) return os.getenv(environmentKey) +def get_software_version(name): + """ + Return the software version set for a particular package. + """ + environmentKey = "SOFTVERSION%s" % convertName(name, upper=True) + return os.getenv(environmentKey) diff --git a/easybuild/tools/toolkit.py b/easybuild/tools/toolkit.py index 69a7f68c96..e987f5c115 100644 --- a/easybuild/tools/toolkit.py +++ b/easybuild/tools/toolkit.py @@ -27,16 +27,17 @@ import copy import os +import easybuild.tools.environment as env from easybuild.tools.build_log import getLog -from easybuild.tools.modules import Modules, get_software_root +from easybuild.tools.modules import Modules, get_software_root, get_software_version from easybuild.tools import systemtools -import easybuild.tools.environment as env - # constants used for recognizing compilers, MPI libraries, ... GCC = "GCC" INTEL = "Intel" +MPICH2 = "MPICH2" +MVAPICH2 = "MVAPICH2" OPENMPI = "OpenMPI" QLOGIC = "QLogic" @@ -324,6 +325,8 @@ def prepareACML(self): self._addDependencyVariables(['ACML']) + acml = get_software_root('ACML') + if self.toolkit_comp_family() == GCC: compiler = 'gfortran' elif self.toolkit_comp_family() == INTEL: @@ -345,9 +348,20 @@ def prepareATLAS(self): """ Prepare for ATLAS BLAS/LAPACK library """ + blas_libs = ["cblas", "f77blas", "atlas"] + blas_mt_libs = ["ptcblas", "ptf77blas", "atlas"] + + atlas = get_software_root("ATLAS") + + self.vars['LIBBLAS'] = ' '.join(["-l%s" % x for x in blas_libs] + ["-lgfortran"]) + self.vars['LIBBLAS_MT'] = ' '.join(["-l%s" % x for x in blas_mt_libs] + ["-lgfortran", "-lpthread"]) + self.vars['BLAS_LIB_DIR'] = os.path.join(atlas, "lib") + self.vars['BLAS_STATIC_LIBS'] = ','.join(["lib%s.a" % x for x in blas_libs]) + self.vars['BLAS_MT_STATIC_LIBS'] = ','.join(["lib%s.a" % x for x in blas_mt_libs]) - self.vars['LIBBLAS'] = " -lcblas -lf77blas -latlas -lgfortran" - self.vars['LIBBLAS_MT'] = " -lptcblas -lptf77blas -latlas -lgfortran -lpthread" + self.vars['LAPACK_LIB_DIR'] = self.vars['BLAS_LIB_DIR'] + self.vars['LAPACK_STATIC_LIBS'] = "liblapack.a," + self.vars['BLAS_STATIC_LIBS'] + self.vars['LAPACK_MT_STATIC_LIBS'] = "liblapack.a," + self.vars['BLAS_MT_STATIC_LIBS'] self._addDependencyVariables(['ATLAS']) @@ -356,6 +370,11 @@ def prepareBLACS(self): Prepare for BLACS library """ + blacs = get_software_root("BLACS") + + self.vars['BLACS_INC'] = + self.vars['BLACS_LIB'] = + self.vars['LIBSCALAPACK'] = " -lblacsF77init -lblacs " self.vars['LIBSCALAPACK_MT'] = self.vars['LIBSCALAPACK'] @@ -377,7 +396,7 @@ def prepareFFTW(self): """ suffix = '' - if os.getenv('SOFTVERSIONFFTW').startswith('3.'): + if get_software_version('FFTW').startswith('3.'): suffix = '3' self.vars['LIBFFT'] = " -lfftw%s " % suffix if self.opts['usempi']: @@ -446,8 +465,8 @@ def prepareGotoBLAS(self): def prepareIntelCompiler(self, name): - version = os.getenv('SOFTVERSION%s' % name.upper()) - root = os.getenv('SOFTROOT%s' % name.upper()) + root = get_software_root(name) + version = get_software_version(name) if "liomp5" not in self.vars['LIBS']: if LooseVersion(version) < LooseVersion('2011'): @@ -524,7 +543,22 @@ def prepareIMKL(self): if not mklRoot: self.log.error("MKLROOT not found in environment") - # For more inspiration: see http://software.intel.com/en-us/articles/intel-mkl-link-line-advisor/ + # exact paths/linking statements depend on imkl version + if LooseVersion(get_software_version('IMKL']) < LooseVersion('10.3'): + if self.opts['32bit']: + mklld = ['lib/32'] + else: + mklld = ['lib/em64t'] + mklcpp = ['include', 'include/fftw'] + else: + if self.opts['32bit']: + root = get_software_root("IMKL")) + self.log.error("32-bit libraries not supported yet for IMKL v%s (> v10.3)" % root + + mklld = ['lib/intel64', 'mkl/lib/intel64'] + mklcpp = ['mkl/include', 'mkl/include/fftw'] + + # for more inspiration: see http://software.intel.com/en-us/articles/intel-mkl-link-line-advisor/ libsfx = "_lp64" libsfxsl = "_lp64" @@ -568,20 +602,6 @@ def prepareIMKL(self): lib = lib.replace('mkl_sequential', 'mkl_intel_thread') + ' -liomp5 -lpthread' self.vars['LIBSCALAPACK_MT'] = lib - # Exact paths/linking statements depend on imkl version - if LooseVersion(os.environ['SOFTVERSIONIMKL']) < LooseVersion('10.3'): - if self.opts['32bit']: - mklld = ['lib/32'] - else: - mklld = ['lib/em64t'] - mklcpp = ['include', 'include/fftw'] - else: - if self.opts['32bit']: - self.log.error("32-bit libraries not supported yet for IMKL v%s (> v10.3)" % os.environ("SOFTROOTIMKL")) - - mklld = ['lib/intel64', 'mkl/lib/intel64'] - mklcpp = ['mkl/include', 'mkl/include/fftw'] - # Linker flags self._flagsForSubdirs(mklRoot, mklld, flag="-L%s", varskey="LDFLAGS") self._flagsForSubdirs(mklRoot, mklcpp, flag="-I%s", varskey="CPPFLAGS") @@ -621,6 +641,20 @@ def prepareIMPI(self): self.vars['MPIF77'] = 'mpif77 -fc=%s %s ' % (self.vars['F77'], self.m32flag) self.vars['MPIF90'] = 'mpif90 -fc=%s %s ' % (self.vars['F90'], self.m32flag) + impiroot = get_software_root('IMPI') + if self.opts['32bit']: + self.log.error("Don't know how to set IMPI paths for 32-bit.") + else: + if LooseVersion(get_software_version('IMPI')) < LooseVersion("3.2.1.009"): + # this could have been different in older versions, we only checked for 3.2.1.009 and up (to 4.0.2.003) + self.log.error("Don't know how to set IMPI paths for old versions.") + else: + mpi_lib = os.path.join(impiroot, 'lib64', 'libmpi') + self.vars['MPI_INC'] = os.path.join(impiroot, 'include64') + + self.vars['MPI_LIB_SHARED'] = "%s.so" % mpi_lib + self.vars['MPI_LIB_STATIC'] = "%s.a" % mpi_lib + def prepareItac(self): """ Prepare for Intel Trace Collector library @@ -639,21 +673,31 @@ def prepareQLogicMPI(self): for i in ['CC', 'CXX', 'F77', 'F90']: self.vars[i] = self.vars["MPI%s" % i] + qlogic = get_software_root('QLogicMPI') + self.vars['MPI_INC'] = "%s/include" % qlogic + self.vars['MPI_LIB_SHARED'] = "%s/lib64/libmpich.so" % qlogic + def prepareLAPACK(self): """ Prepare for LAPACK library """ + lapack = get_software_root("LAPACK") + self.vars['LIBLAPACK'] = "-llapack %s" % self.vars['LIBBLAS'] self.vars['LIBLAPACK_MT'] = "-llapack %s -lpthread" % self.vars['LIBBLAS_MT'] + self.vars['LAPACK_LIB_DIR'] = os.path.join(lapack, "lib") + self.vars['LAPACK_STATIC_LIBS'] = "liblapack.a" + self.vars['LAPACK_MT_STATIC_LIBS'] = self.vars['LAPACK_STATIC_LIBS'] + self._addDependencyVariables(['LAPACK']) def prepareMPICH2(self): """ Prepare for MPICH2 MPI library (e.g. ScaleMP's version) """ - if "vSMP" in os.getenv('SOFTVERSIONMPICH2'): + if "vSMP" in get_software_version('MPICH2'): # ScaleMP MPICH specific self.vars['MPICC'] = 'mpicc -cc="%s %s"' % (self.vars['CC'], self.m32flag) self.vars['MPICXX'] = 'mpicxx -CC="%s %s"' % (self.vars['CXX'], self.m32flag) @@ -666,6 +710,11 @@ def prepareMPICH2(self): if self.opts['usempi']: for i in ['CC', 'CXX', 'F77', 'F90']: self.vars[i] = self.vars["MPI%s" % i] + + mpich2 = get_software_root('MPICH2') + self.vars['MPI_INC'] = "%s/include" % mpich2 + self.vars['MPI_LIB_SHARED'] = "%s/lib/libmpich.so" % mpich2 + self.vars['MPI_LIB_STATIC'] = "%s/lib/libmpich.a" % mpich2 else: self.log.error("Don't know how to prepare for a non-ScaleMP MPICH2 library.") @@ -690,12 +739,23 @@ def prepareMVAPICH2(self): """ Prepare for MVAPICH2 MPI library """ + + mvapich2 = get_software_root('MVAPICH2') + + self.vars['MPI_LIB_STATIC'] = "%s/lib/libmpich.a" % mvapich2 + self.vars['MPI_LIB_SHARED'] = "%s/lib/libmpich.so" % mvapich2 self.prepareSimpleMPI() def prepareOpenMPI(self): """ Prepare for OpenMPI MPI library """ + + openmpi = get_software_root('OpenMPI') + + self.vars['MPI_LIB_STATIC'] = "%s/lib/libmpi.a" % openmpi + self.vars['MPI_LIB_SHARED'] = "%s/lib/libmpi.so" % openmpi + self.vars['MPI_INC'] = "%s/include" % openmpi self.prepareSimpleMPI() def prepareScaLAPACK(self): @@ -777,8 +837,8 @@ def toolkit_comp_family(self): """Determine compiler family based on toolkit dependencies.""" comp_families = { # always use tuples as keys! - ('icc', 'ifort'): INTEL, # Intel toolkit has both icc and ifort - ('GCC', ): GCC # GCC toolkit uses GCC as compiler suite + ('icc', 'ifort'): INTEL, + ('GCC', ): GCC } return self.det_toolkit_type("compiler family", comp_families) @@ -797,9 +857,11 @@ def toolkit_mpi_type(self): """Determine type of MPI library based on toolkit dependencies.""" mpi_types = { # always use tuples as keys! - ('impi', ):INTEL, # Intel MPI - ('OpenMPI', ):OPENMPI, # OpenMPI - ('QLogicMPI', ):QLOGIC # QLogic MPI + ('impi', ):INTEL, + ('MPICH2', ):MPICH2, + ('MVAPICH2', ):MVAPICH2, + ('OpenMPI', ):OPENMPI, + ('QLogicMPI', ):QLOGIC } return self.det_toolkit_type("type of mpi library", mpi_types) From 642ebb782be116bbff38c65bdf05ac9c996b2e5b Mon Sep 17 00:00:00 2001 From: Kenneth Hoste Date: Wed, 8 Aug 2012 13:06:11 +0200 Subject: [PATCH 511/798] use get_software_version everywhere, fix typos and incompletenesses in toolkit.py --- easybuild/easyblocks/c/cp2k.py | 8 ++++---- easybuild/tools/toolkit.py | 14 ++++++++------ 2 files changed, 12 insertions(+), 10 deletions(-) diff --git a/easybuild/easyblocks/c/cp2k.py b/easybuild/easyblocks/c/cp2k.py index 7dda29a15b..4b689e05dc 100644 --- a/easybuild/easyblocks/c/cp2k.py +++ b/easybuild/easyblocks/c/cp2k.py @@ -37,7 +37,7 @@ import easybuild.tools.toolkit as toolkit from easybuild.framework.application import Application from easybuild.tools.filetools import run_cmd -from easybuild.tools.modules import get_software_root +from easybuild.tools.modules import get_software_root, get_software_version class CP2K(Application): @@ -316,7 +316,7 @@ def configureCommon(self): libint_wrapper = '%s/libint_cpp_wrapper.o' % libinttools_path # determine LibInt libraries based on major version number - libint_maj_ver = os.getenv('SOFTVERSIONLIBINT').split('.')[0] + libint_maj_ver = get_software_version('LibInt').split('.')[0] if libint_maj_ver == '1': libint_libs = "$(LIBINTLIB)/libderiv.a $(LIBINTLIB)/libint.a $(LIBINTLIB)/libr12.a" elif libint_maj_ver == '2': @@ -360,11 +360,11 @@ def configureIntelBased(self): # see http://software.intel.com/en-us/articles/build-cp2k-using-intel-fortran-compiler-professional-edition/ self.make_instructions += "qs_vxc_atom.o: qs_vxc_atom.F\n\t$(FC) -c $(FCFLAGS2) $<\n" - if LooseVersion(os.getenv('SOFTVERSIONIFORT')) >= LooseVersion("2011.8"): + if LooseVersion(get_software_version('ifort')) >= LooseVersion("2011.8"): self.make_instructions += "et_coupling.o: et_coupling.F\n\t$(FC) -c $(FCFLAGS2) $<\n" self.make_instructions += "qs_vxc_atom.o: qs_vxc_atom.F\n\t$(FC) -c $(FCFLAGS2) $<\n" - elif LooseVersion(os.getenv('SOFTVERSIONIFORT')) >= LooseVersion("2011"): + elif LooseVersion(get_software_version('ifort')) >= LooseVersion("2011"): self.log.error("CP2K won't build correctly with the Intel v12 compilers before version 2011.8.") return options diff --git a/easybuild/tools/toolkit.py b/easybuild/tools/toolkit.py index e987f5c115..7c3d4f403b 100644 --- a/easybuild/tools/toolkit.py +++ b/easybuild/tools/toolkit.py @@ -371,11 +371,13 @@ def prepareBLACS(self): """ blacs = get_software_root("BLACS") + blacs_libs = ["blacs", "blacsCinit", "blacsF77init"] - self.vars['BLACS_INC'] = - self.vars['BLACS_LIB'] = + self.vars['BLACS_INC'] = os.path.join(blacs, "include") + self.vars['BLACS_LIB_DIR'] = os.path.join(blacs, "lib") + self.vars['BLACS_STATIC_LIBS'] = ','.join(["lib%s.a" % x for x in blacs_libs]) - self.vars['LIBSCALAPACK'] = " -lblacsF77init -lblacs " + self.vars['LIBSCALAPACK'] = ' '.join(["-l%s" % x for x in blacs_libs]) self.vars['LIBSCALAPACK_MT'] = self.vars['LIBSCALAPACK'] self._addDependencyVariables(['BLACS']) @@ -544,7 +546,7 @@ def prepareIMKL(self): self.log.error("MKLROOT not found in environment") # exact paths/linking statements depend on imkl version - if LooseVersion(get_software_version('IMKL']) < LooseVersion('10.3'): + if LooseVersion(get_software_version('IMKL')) < LooseVersion('10.3'): if self.opts['32bit']: mklld = ['lib/32'] else: @@ -552,8 +554,8 @@ def prepareIMKL(self): mklcpp = ['include', 'include/fftw'] else: if self.opts['32bit']: - root = get_software_root("IMKL")) - self.log.error("32-bit libraries not supported yet for IMKL v%s (> v10.3)" % root + root = get_software_root("IMKL") + self.log.error("32-bit libraries not supported yet for IMKL v%s (> v10.3)" % root) mklld = ['lib/intel64', 'mkl/lib/intel64'] mklcpp = ['mkl/include', 'mkl/include/fftw'] From 024833d78b5307257b0d4a4e22f72ee03f2e3022 Mon Sep 17 00:00:00 2001 From: Kenneth Hoste Date: Wed, 8 Aug 2012 13:06:11 +0200 Subject: [PATCH 512/798] use get_software_version everywhere, fix typos and incompletenesses in toolkit.py --- easybuild/easyblocks/c/cp2k.py | 8 ++++---- easybuild/tools/toolkit.py | 14 ++++++++------ 2 files changed, 12 insertions(+), 10 deletions(-) diff --git a/easybuild/easyblocks/c/cp2k.py b/easybuild/easyblocks/c/cp2k.py index 7dda29a15b..4b689e05dc 100644 --- a/easybuild/easyblocks/c/cp2k.py +++ b/easybuild/easyblocks/c/cp2k.py @@ -37,7 +37,7 @@ import easybuild.tools.toolkit as toolkit from easybuild.framework.application import Application from easybuild.tools.filetools import run_cmd -from easybuild.tools.modules import get_software_root +from easybuild.tools.modules import get_software_root, get_software_version class CP2K(Application): @@ -316,7 +316,7 @@ def configureCommon(self): libint_wrapper = '%s/libint_cpp_wrapper.o' % libinttools_path # determine LibInt libraries based on major version number - libint_maj_ver = os.getenv('SOFTVERSIONLIBINT').split('.')[0] + libint_maj_ver = get_software_version('LibInt').split('.')[0] if libint_maj_ver == '1': libint_libs = "$(LIBINTLIB)/libderiv.a $(LIBINTLIB)/libint.a $(LIBINTLIB)/libr12.a" elif libint_maj_ver == '2': @@ -360,11 +360,11 @@ def configureIntelBased(self): # see http://software.intel.com/en-us/articles/build-cp2k-using-intel-fortran-compiler-professional-edition/ self.make_instructions += "qs_vxc_atom.o: qs_vxc_atom.F\n\t$(FC) -c $(FCFLAGS2) $<\n" - if LooseVersion(os.getenv('SOFTVERSIONIFORT')) >= LooseVersion("2011.8"): + if LooseVersion(get_software_version('ifort')) >= LooseVersion("2011.8"): self.make_instructions += "et_coupling.o: et_coupling.F\n\t$(FC) -c $(FCFLAGS2) $<\n" self.make_instructions += "qs_vxc_atom.o: qs_vxc_atom.F\n\t$(FC) -c $(FCFLAGS2) $<\n" - elif LooseVersion(os.getenv('SOFTVERSIONIFORT')) >= LooseVersion("2011"): + elif LooseVersion(get_software_version('ifort')) >= LooseVersion("2011"): self.log.error("CP2K won't build correctly with the Intel v12 compilers before version 2011.8.") return options diff --git a/easybuild/tools/toolkit.py b/easybuild/tools/toolkit.py index e987f5c115..7c3d4f403b 100644 --- a/easybuild/tools/toolkit.py +++ b/easybuild/tools/toolkit.py @@ -371,11 +371,13 @@ def prepareBLACS(self): """ blacs = get_software_root("BLACS") + blacs_libs = ["blacs", "blacsCinit", "blacsF77init"] - self.vars['BLACS_INC'] = - self.vars['BLACS_LIB'] = + self.vars['BLACS_INC'] = os.path.join(blacs, "include") + self.vars['BLACS_LIB_DIR'] = os.path.join(blacs, "lib") + self.vars['BLACS_STATIC_LIBS'] = ','.join(["lib%s.a" % x for x in blacs_libs]) - self.vars['LIBSCALAPACK'] = " -lblacsF77init -lblacs " + self.vars['LIBSCALAPACK'] = ' '.join(["-l%s" % x for x in blacs_libs]) self.vars['LIBSCALAPACK_MT'] = self.vars['LIBSCALAPACK'] self._addDependencyVariables(['BLACS']) @@ -544,7 +546,7 @@ def prepareIMKL(self): self.log.error("MKLROOT not found in environment") # exact paths/linking statements depend on imkl version - if LooseVersion(get_software_version('IMKL']) < LooseVersion('10.3'): + if LooseVersion(get_software_version('IMKL')) < LooseVersion('10.3'): if self.opts['32bit']: mklld = ['lib/32'] else: @@ -552,8 +554,8 @@ def prepareIMKL(self): mklcpp = ['include', 'include/fftw'] else: if self.opts['32bit']: - root = get_software_root("IMKL")) - self.log.error("32-bit libraries not supported yet for IMKL v%s (> v10.3)" % root + root = get_software_root("IMKL") + self.log.error("32-bit libraries not supported yet for IMKL v%s (> v10.3)" % root) mklld = ['lib/intel64', 'mkl/lib/intel64'] mklcpp = ['mkl/include', 'mkl/include/fftw'] From 2dd678fecb3ca68204250ca883191a33a5f39023 Mon Sep 17 00:00:00 2001 From: Kenneth Hoste Date: Wed, 8 Aug 2012 14:22:58 +0200 Subject: [PATCH 513/798] get rid of use of SOFTROOT and SOFTVERSION, clean unused imports in application.py and easyblock.py, fixed small bugs --- easybuild/easyblocks/b/boost.py | 8 +++++--- easybuild/easyblocks/d/dolfin.py | 9 +++++---- easybuild/easyblocks/l/lapack.py | 7 ++++--- easybuild/easyblocks/p/pythonpackage.py | 5 ++++- easybuild/easyblocks/s/scotch.py | 16 ++++++++-------- easybuild/easyblocks/s/suitesparse.py | 7 +++++-- easybuild/easyblocks/s/swig.py | 5 +++-- easybuild/easyblocks/u/ufc.py | 10 ++++++---- easybuild/framework/application.py | 11 ++++------- easybuild/framework/easyblock.py | 1 - easybuild/tools/modules.py | 12 +++++++++--- 11 files changed, 53 insertions(+), 38 deletions(-) diff --git a/easybuild/easyblocks/b/boost.py b/easybuild/easyblocks/b/boost.py index 3c8c1a9eea..f19ac39cd0 100644 --- a/easybuild/easyblocks/b/boost.py +++ b/easybuild/easyblocks/b/boost.py @@ -20,10 +20,13 @@ ## import os import shutil + +import easybuild.tools.toolkit as toolkit from easybuild.framework.application import Application from easybuild.tools.filetools import run_cmd from easybuild.tools.modules import get_software_root + class Boost(Application): """Support for building Boost.""" @@ -50,11 +53,10 @@ def configure(self): self.log.error("Failed to create directory %s: %s" % (self.objdir, err)) # generate config depending on compiler used - # FIXME: use toolkit_comp_family for this toolset = None - if os.getenv('SOFTROOTICC'): + if self.toolkit().toolkit_comp_family() == toolkit.INTEL: toolset = 'intel-linux' - elif os.getenv('SOFTROOTGCC'): + elif self.toolkit().toolkit_comp_family() == toolkit.GCC: toolset = 'gcc' else: self.log.error("Unknown compiler used, aborting.") diff --git a/easybuild/easyblocks/d/dolfin.py b/easybuild/easyblocks/d/dolfin.py index e5598f4edc..01668f52b5 100644 --- a/easybuild/easyblocks/d/dolfin.py +++ b/easybuild/easyblocks/d/dolfin.py @@ -19,8 +19,9 @@ # along with EasyBuild. If not, see . ## import os + from easybuild.easyblocks.c.cmakepythonpackage import CMakePythonPackage -from easybuild.tools.modules import get_software_root +from easybuild.tools.modules import get_software_root, get_software_version class DOLFIN(CMakePythonPackage): @@ -33,7 +34,7 @@ def configure(self): """Configure Dolfin build.""" # make sure that required dependencies are loaded - deps = ['Armadillo', 'Boost', 'ParMETIS', 'Python', 'SCOTCH', 'SuiteSparse', 'UFC'] + deps = ['Armadillo', 'Boost', 'CGAL', 'ParMETIS', 'Python', 'SCOTCH', 'SuiteSparse', 'UFC'] depsdict = {} for dep in deps: deproot = get_software_root(dep) @@ -67,7 +68,7 @@ def configure(self): self.log.error('MPI_LIB_SHARED or MPI_INC not set, could not determine MPI-related paths.') # specify Python paths - python_short_ver = ".".join(os.getenv('SOFTVERSIONPYTHON').split(".")[0:2]) + python_short_ver = ".".join(get_software_version('Python').split(".")[0:2]) self.updatecfg('configopts', " -DPYTHON_INCLUDE_PATH=%s/include/python%s" % (depsdict['Python'], python_short_ver)) self.updatecfg('configopts', " -DPYTHON_LIBRARY=%s/lib/libpython%s.so" % (depsdict['Python'], @@ -95,7 +96,7 @@ def configure(self): self.updatecfg('configopts', ' -DLAPACK_LIBRARIES:PATH="$LIBLAPACK"') # CGAL - self.updatecfg('configopts', ' -DCGAL_DIR:PATH="$SOFTROOTCGAL"') + self.updatecfg('configopts', ' -DCGAL_DIR:PATH="%s"' % depsdict['CGAL']) # set correct openmp options openmp = self.toolkit().get_openmp_flag() diff --git a/easybuild/easyblocks/l/lapack.py b/easybuild/easyblocks/l/lapack.py index 7fafab9ae5..799a1e62a7 100644 --- a/easybuild/easyblocks/l/lapack.py +++ b/easybuild/easyblocks/l/lapack.py @@ -30,6 +30,7 @@ import os import shutil +import easybuild.tools.toolkit as toolkit from easybuild.framework.application import Application from easybuild.tools.filetools import run_cmd from easybuild.tools.modules import get_software_root @@ -84,9 +85,9 @@ def configure(self): """ # copy make.inc file from examples - if os.getenv('SOFTROOTGCC'): + if self.toolkit().toolkit_comp_family() == toolkit.GCC: makeinc = 'gfortran' - elif os.getenv('SOFTROOTIFORT'): + elif self.toolkit().toolkit_comp_family() == toolkit.INTEL: makeinc = 'ifort' else: self.log.error("Don't know which make.inc file to pick, unknown compiler being used...") @@ -185,7 +186,7 @@ def test(self): """ if self.getcfg('test_only'): - if not os.getenv('SOFTROOTLAPACK'): + if not get_software_root('LAPACK'): self.log.error("You need to make sure that the LAPACK module is loaded to perform testing.") blaslib = get_blas_lib(self.log) diff --git a/easybuild/easyblocks/p/pythonpackage.py b/easybuild/easyblocks/p/pythonpackage.py index 2be39043ca..f5ac1a4082 100644 --- a/easybuild/easyblocks/p/pythonpackage.py +++ b/easybuild/easyblocks/p/pythonpackage.py @@ -19,8 +19,11 @@ # along with EasyBuild. If not, see . ## import os + from easybuild.framework.application import Application from easybuild.tools.filetools import run_cmd +from easybuild.tools.modules import get_software_version + class PythonPackage(Application): """Builds and installs a Python package, and provides a dedicated module file""" @@ -36,7 +39,7 @@ def configure(self): self.log.debug("PythonPackage: configuring") - python_version = os.getenv('SOFTVERSIONPYTHON') + python_version = get_software_version('Python') if not python_version: self.log.error('Python module not loaded.') diff --git a/easybuild/easyblocks/s/scotch.py b/easybuild/easyblocks/s/scotch.py index 336b83d3bf..205e29a367 100644 --- a/easybuild/easyblocks/s/scotch.py +++ b/easybuild/easyblocks/s/scotch.py @@ -23,6 +23,8 @@ import re import sys import shutil + +import easybuild.tools.toolkit as toolkit from easybuild.framework.application import Application from easybuild.tools.filetools import run_cmd, copytree @@ -32,10 +34,9 @@ class SCOTCH(Application): def configure(self): """Configure SCOTCH build: locate the correct makefile, and copy this to a general Makefile.inc""" - # FIXME: use toolkit_comp_family for this - if "SOFTROOTICC" in os.environ: + if self.toolkit().toolkit_comp_family() == toolkit.INTEL: makefilename = 'Makefile.inc.x86-64_pc_linux2.icc' - elif "SOFTROOTGCC" in os.environ: + elif self.toolkit().toolkit_comp_family() == toolkit.GCC: makefilename = 'Makefile.inc.x86-64_pc_linux2' else: self.log.error("Don't know how to handle toolkit %s." % self.toolkit().name) @@ -77,13 +78,12 @@ def make(self): ccs = os.environ['CC'] ccp = os.environ['MPICC'] ccd = os.environ['MPICC'] - cflags = "" - # FIXME: use toolkit_comp_family for this - if not "SOFTROOTGCC" in os.environ: - cflags = "-fPIC -O3 -DCOMMON_FILE_COMPRESS_GZ -DCOMMON_PTHREAD -DCOMMON_RANDOM_FIXED_SEED -DSCOTCH_RENAME -DSCOTCH_PTHREAD -restrict -DIDXSIZE64" + cflags = "-fPIC -O3 -DCOMMON_FILE_COMPRESS_GZ -DCOMMON_PTHREAD -DCOMMON_RANDOM_FIXED_SEED -DSCOTCH_RENAME -DSCOTCH_PTHREAD" + if self.toolkit().toolkit_comp_family() == toolkit.GCC: + cflags += " -Drestrict=__restrict" else: - cflags = "-fPIC -O3 -DCOMMON_FILE_COMPRESS_GZ -DCOMMON_PTHREAD -DCOMMON_RANDOM_FIXED_SEED -DSCOTCH_RENAME -DSCOTCH_PTHREAD -Drestrict=__restrict" + cflags = " -restrict -DIDXSIZE64" # actually build for app in ["scotch", "ptscotch"]: diff --git a/easybuild/easyblocks/s/suitesparse.py b/easybuild/easyblocks/s/suitesparse.py index 4344482f94..acf6edbc7d 100644 --- a/easybuild/easyblocks/s/suitesparse.py +++ b/easybuild/easyblocks/s/suitesparse.py @@ -23,8 +23,11 @@ import os import shutil import sys + from easybuild.framework.application import Application from easybuild.tools.filetools import mkdir +from easybuild.tools.modules import get_software_root + class SuiteSparse(Application): """Support for building SuiteSparse.""" @@ -32,8 +35,8 @@ class SuiteSparse(Application): def configure(self): """Configure build by patching UFconfig.mk.""" - metis = os.getenv('SOFTROOTMETIS') - parmetis = os.getenv('SOFTROOTPARMETIS') + metis = get_software_root('METIS') + parmetis = get_software_root('ParMETIS') if not metis and not parmetis: self.log.error("Neither METIS or ParMETIS module loaded.") diff --git a/easybuild/easyblocks/s/swig.py b/easybuild/easyblocks/s/swig.py index fa434fc46b..8781795285 100644 --- a/easybuild/easyblocks/s/swig.py +++ b/easybuild/easyblocks/s/swig.py @@ -17,8 +17,9 @@ # You should have received a copy of the GNU General Public License # along with EasyBuild. If not, see . ## -import os from easybuild.framework.application import Application +from easybuild.tools.modules import get_software_root + class SWIG(Application): """Support for building SWIG.""" @@ -32,7 +33,7 @@ def configure(self): "octave", "perl5", "python3", "tcl"]: self.updatecfg('configopts', "--without-%s" % x) - python = os.getenv('SOFTROOTPYTHON') + python = get_software_root('Python') if python: self.updatecfg('configopts', "--with-python=%s/bin/python" % python) else: diff --git a/easybuild/easyblocks/u/ufc.py b/easybuild/easyblocks/u/ufc.py index d9b7f42c05..e19fb59b25 100644 --- a/easybuild/easyblocks/u/ufc.py +++ b/easybuild/easyblocks/u/ufc.py @@ -17,10 +17,12 @@ # You should have received a copy of the GNU General Public License # along with EasyBuild. If not, see . ## -from distutils.version import LooseVersion import os +from distutils.version import LooseVersion + from easybuild.easyblocks.c.cmakepythonpackage import CMakePythonPackage -from easybuild.tools.modules import get_software_root +from easybuild.tools.modules import get_software_root, get_software_version + class UFC(CMakePythonPackage): """Support for building UFC.""" @@ -41,11 +43,11 @@ def configure(self): # SWIG version more recent than 2.0.4 have a regression # which causes problems with DOLFIN if UFC was built with it # fixed in 2.0.7? see https://bugs.launchpad.net/dolfin/+bug/996398 - if LooseVersion(os.environ['SOFTVERSIONSWIG']) > '2.0.4': + if LooseVersion(get_software_version('SWIG')) > '2.0.4': self.log.error("Using bad version of SWIG, expecting swig <= 2.0.4." \ " See https://bugs.launchpad.net/dolfin/+bug/996398") - self.pyver = ".".join(os.getenv('SOFTVERSIONPYTHON').split(".")[:-1]) + self.pyver = ".".join(get_software_version('Python').split(".")[:-1]) self.updatecfg('configopts', "-DBoost_DIR=%s" % depsdict['Boost']) self.updatecfg('configopts', "-DBOOST_INCLUDEDIR=%s/include" % depsdict['Boost']) diff --git a/easybuild/framework/application.py b/easybuild/framework/application.py index adf448affc..145f82234b 100644 --- a/easybuild/framework/application.py +++ b/easybuild/framework/application.py @@ -36,7 +36,6 @@ import shutil import time import urllib -from difflib import get_close_matches from distutils.version import LooseVersion import easybuild @@ -47,8 +46,7 @@ from easybuild.tools.config import source_path, buildPath, installPath from easybuild.tools.filetools import unpack, patch, run_cmd, convertName from easybuild.tools.module_generator import ModuleGenerator -from easybuild.tools.modules import Modules -from easybuild.tools.toolkit import Toolkit +from easybuild.tools.modules import Modules, get_software_root, sofware_env_var_name from easybuild.tools.systemtools import get_core_count @@ -334,9 +332,8 @@ def ready2build(self): self.log.error('Not all dependencies have a matching toolkit version') # Check if the application is not loaded at the moment - envName = "SOFTROOT%s" % convertName(self.name(), upper=True) - if envName in os.environ: - self.log.error("Module is already loaded (%s is set), installation cannot continue." % envName) + if get_software_root(self.name()): + self.log.error("Module is already loaded (%s is set), installation cannot continue." % sofware_env_var_name('root', self.name())) # Check if main install needs to be skipped # - if a current module can be found, skip is ok @@ -1184,7 +1181,7 @@ def installsize(self): if os.path.exists(fullpath): installsize += os.path.getsize(fullpath) except OSError, err: - self.log.warn("could not determine installsize") + self.log.warn("Could not determine install size: %s" % err) return installsize diff --git a/easybuild/framework/easyblock.py b/easybuild/framework/easyblock.py index 7249888808..814b9d8152 100644 --- a/easybuild/framework/easyblock.py +++ b/easybuild/framework/easyblock.py @@ -24,7 +24,6 @@ import difflib import os -from easybuild.tools.build_log import getLog, EasyBuildError from easybuild.tools.toolkit import Toolkit from easybuild.tools.systemtools import get_shared_lib_ext from easybuild.tools.filetools import run_cmd diff --git a/easybuild/tools/modules.py b/easybuild/tools/modules.py index 27258a5598..c28e12d0bf 100644 --- a/easybuild/tools/modules.py +++ b/easybuild/tools/modules.py @@ -30,7 +30,7 @@ import subprocess import sys -from easybuild.tools.build_log import getLog, initLogger, EasyBuildError +from easybuild.tools.build_log import getLog, EasyBuildError from easybuild.tools.filetools import convertName, run_cmd @@ -301,16 +301,22 @@ def searchModule(path, query): except ValueError: pass +def sofware_env_var_name(infix, name): + """ + Return environment variable name for this software, with a given infix. + """ + return "SOFT%s%s" % (infix.upper(), convertName(name, upper=True)) + def get_software_root(name): """ Return the software root set for a particular package. """ - environmentKey = "SOFTROOT%s" % convertName(name, upper=True) + environmentKey = sofware_env_var_name("root", name) return os.getenv(environmentKey) def get_software_version(name): """ Return the software version set for a particular package. """ - environmentKey = "SOFTVERSION%s" % convertName(name, upper=True) + environmentKey = sofware_env_var_name("version", name) return os.getenv(environmentKey) From 41a32331589327fa761874fd1ddb374c0d28e75b Mon Sep 17 00:00:00 2001 From: Kenneth Hoste Date: Wed, 8 Aug 2012 14:29:57 +0200 Subject: [PATCH 514/798] rename toolkit.toolkit_compiler_family to toolkit.compiler_family and toolkit.toolkit_mpi_type to toolkit.mpi_type --- easybuild/easyblocks/c/cp2k.py | 2 +- easybuild/easyblocks/i/imkl.py | 4 ++-- easybuild/easyblocks/l/libsmm.py | 2 +- easybuild/easyblocks/n/netcdf.py | 2 +- easybuild/easyblocks/n/netcdf_fortran.py | 2 +- easybuild/easyblocks/o/openfoam.py | 4 ++-- easybuild/easyblocks/p/python.py | 2 +- easybuild/easyblocks/s/scalapack.py | 4 ++-- easybuild/easyblocks/w/wps.py | 2 +- easybuild/easyblocks/w/wrf.py | 2 +- easybuild/tools/toolkit.py | 24 ++++++++++++------------ 11 files changed, 25 insertions(+), 25 deletions(-) diff --git a/easybuild/easyblocks/c/cp2k.py b/easybuild/easyblocks/c/cp2k.py index 4b689e05dc..acb0286682 100644 --- a/easybuild/easyblocks/c/cp2k.py +++ b/easybuild/easyblocks/c/cp2k.py @@ -135,7 +135,7 @@ def configure(self): self.make_instructions = "graphcon.o: graphcon.F\n\t$(FC) -c $(FCFLAGS2) $<\n" # compiler toolkit specific configuration - comp_fam = self.toolkit().toolkit_comp_family() + comp_fam = self.toolkit().comp_family() if comp_fam == toolkit.INTEL: options = self.configureIntelBased() elif comp_fam == toolkit.GCC: diff --git a/easybuild/easyblocks/i/imkl.py b/easybuild/easyblocks/i/imkl.py index af977b5211..d8d0924455 100644 --- a/easybuild/easyblocks/i/imkl.py +++ b/easybuild/easyblocks/i/imkl.py @@ -166,7 +166,7 @@ def postproc(self): # compiler defaults to icc, but we could be using gcc to create gimkl. makeopts = '' - if self.toolkit().toolkit_comp_family() == toolkit.GCC: + if self.toolkit().comp_family() == toolkit.GCC: makeopts += 'compiler=gnu ' for i in lis1 + lis2 + lis3: @@ -179,7 +179,7 @@ def postproc(self): if i in lis3: # use INSTALL_DIR and SPEC_OPT extramakeopts = '' - if self.toolkit().toolkit_mpi_type() == toolkit.MPICH2: + if self.toolkit().mpi_type() == toolkit.MPICH2: extramakeopts += 'mpi=mpich2' cmd = "make -f makefile libintel64 %s" % extramakeopts diff --git a/easybuild/easyblocks/l/libsmm.py b/easybuild/easyblocks/l/libsmm.py index 7a93281223..e3ce6e2a73 100644 --- a/easybuild/easyblocks/l/libsmm.py +++ b/easybuild/easyblocks/l/libsmm.py @@ -141,7 +141,7 @@ def make(self): """ # only GCC is supported for now - if self.toolkit().toolkit_comp_family() == toolkit.GCC: + if self.toolkit().comp_family() == toolkit.GCC: hostcompile = os.getenv('F90') # optimizations diff --git a/easybuild/easyblocks/n/netcdf.py b/easybuild/easyblocks/n/netcdf.py index e519914066..ed2babf71d 100644 --- a/easybuild/easyblocks/n/netcdf.py +++ b/easybuild/easyblocks/n/netcdf.py @@ -52,7 +52,7 @@ def configure(self): )) # add -DgFortran to CPPFLAGS when building with GCC - if self.toolkit().toolkit_comp_family() == toolkit.GCC: + if self.toolkit().comp_family() == toolkit.GCC: env.set('CPPFLAGS', "%s -DgFortran" % os.getenv('CPPFLAGS')) Application.configure(self) diff --git a/easybuild/easyblocks/n/netcdf_fortran.py b/easybuild/easyblocks/n/netcdf_fortran.py index 2ec321bfeb..c69bd64061 100644 --- a/easybuild/easyblocks/n/netcdf_fortran.py +++ b/easybuild/easyblocks/n/netcdf_fortran.py @@ -45,7 +45,7 @@ def configure(self): self.updatecfg('configopts', 'FCFLAGS="%s" FC="%s"' % (os.getenv('FFLAGS'), os.getenv('F90'))) # add -DgFortran to CPPFLAGS when building with GCC - if self.toolkit().toolkit_comp_family() == toolkit.GCC: + if self.toolkit().comp_family() == toolkit.GCC: env.set('CPPFLAGS', "%s -DgFortran" % os.getenv('CPPFLAGS')) Application.configure(self) diff --git a/easybuild/easyblocks/o/openfoam.py b/easybuild/easyblocks/o/openfoam.py index e71df18804..8b91154bb0 100644 --- a/easybuild/easyblocks/o/openfoam.py +++ b/easybuild/easyblocks/o/openfoam.py @@ -63,7 +63,7 @@ def configure(self): env.set("WM_THIRD_PARTY_DIR", os.path.join(self.installdir, self.thrdpartydir)) # compiler - comp_fam = self.tk.toolkit_comp_family() + comp_fam = self.tk.comp_family() if comp_fam == toolkit.GCC: self.wm_compiler="Gcc" @@ -80,7 +80,7 @@ def configure(self): env.set("WM_COMPILER",self.wm_compiler) # type of MPI - mpi_type = self.tk.toolkit_mpi_type() + mpi_type = self.tk.mpi_type() if mpi_type == toolkit.INTEL: self.mpipath = os.path.join(get_software_root('IMPI'),'intel64') diff --git a/easybuild/easyblocks/p/python.py b/easybuild/easyblocks/p/python.py index ea0eba8673..e25d7f4c13 100644 --- a/easybuild/easyblocks/p/python.py +++ b/easybuild/easyblocks/p/python.py @@ -204,7 +204,7 @@ class FortranPythonPackage(DefaultPythonPackage): """Extends DefaultPythonPackage to add a Fortran compiler to the make call""" def make(self): - comp_fam = self.toolkit().toolkit_comp_family() + comp_fam = self.toolkit().comp_family() if comp_fam == toolkit.INTEL: cmd = "python setup.py build --compiler=intel --fcompiler=intelem" diff --git a/easybuild/easyblocks/s/scalapack.py b/easybuild/easyblocks/s/scalapack.py index 459e3be38c..005c69014c 100644 --- a/easybuild/easyblocks/s/scalapack.py +++ b/easybuild/easyblocks/s/scalapack.py @@ -75,7 +75,7 @@ def make(self): mpicc = os.getenv('MPICC') mpif77 = os.getenv('MPIF77') mpif90 = os.getenv('MPIF90') - elif self.toolkit().toolkit_mpi_type() in [toolkit.OPENMPI, toolkit.MVAPICH2]: + elif self.toolkit().mpi_type() in [toolkit.OPENMPI, toolkit.MVAPICH2]: mpicc = 'mpicc' mpif77 = 'mpif77' mpif90 = 'mpif90' @@ -120,7 +120,7 @@ def make(self): else: # determine interface - if self.toolkit().toolkit_mpi_type() in [toolkit.OPENMPI, toolkit.MVAPICH2]: + if self.toolkit().mpi_type() in [toolkit.OPENMPI, toolkit.MVAPICH2]: interface = 'Add_' else: self.log.error("Don't know which interface to pick for the MPI library being used.") diff --git a/easybuild/easyblocks/w/wps.py b/easybuild/easyblocks/w/wps.py index 9711129037..bd6ffc4597 100644 --- a/easybuild/easyblocks/w/wps.py +++ b/easybuild/easyblocks/w/wps.py @@ -129,7 +129,7 @@ def configure(self): # configure # determine build type option to look for - self.comp_fam = self.toolkit().toolkit_comp_family() + self.comp_fam = self.toolkit().comp_family() build_type_option = None if LooseVersion(self.version()) >= LooseVersion("3.4"): diff --git a/easybuild/easyblocks/w/wrf.py b/easybuild/easyblocks/w/wrf.py index 6a2b8489b2..d1597b8431 100644 --- a/easybuild/easyblocks/w/wrf.py +++ b/easybuild/easyblocks/w/wrf.py @@ -107,7 +107,7 @@ def configure(self): # determine build type option to look for build_type_option = None - self.comp_fam = self.toolkit().toolkit_comp_family() + self.comp_fam = self.toolkit().comp_family() if self.comp_fam == toolkit.INTEL: build_type_option = "Linux x86_64 i486 i586 i686, ifort compiler with icc" diff --git a/easybuild/tools/toolkit.py b/easybuild/tools/toolkit.py index 7c3d4f403b..1fab46146f 100644 --- a/easybuild/tools/toolkit.py +++ b/easybuild/tools/toolkit.py @@ -327,9 +327,9 @@ def prepareACML(self): acml = get_software_root('ACML') - if self.toolkit_comp_family() == GCC: + if self.comp_family() == GCC: compiler = 'gfortran' - elif self.toolkit_comp_family() == INTEL: + elif self.comp_family() == INTEL: compiler = 'ifort' else: self.log.error("Don't know which compiler-specific subdir for ACML to use.") @@ -608,7 +608,7 @@ def prepareIMKL(self): self._flagsForSubdirs(mklRoot, mklld, flag="-L%s", varskey="LDFLAGS") self._flagsForSubdirs(mklRoot, mklcpp, flag="-I%s", varskey="CPPFLAGS") - if self.toolkit_comp_family() == GCC: + if self.comp_family() == GCC: for var in ['LIBLAPACK', 'LIBLAPACK_MT', 'LIBSCALAPACK', 'LIBSCALAPACK_MT']: self.vars[var] = self.vars[var].replace('mkl_intel_lp64', 'mkl_gf_lp64') @@ -617,7 +617,7 @@ def prepareIMPI(self): Prepare for Intel MPI library """ - if self.toolkit_comp_family() == INTEL: + if self.comp_family() == INTEL: # Intel-based toolkit self.vars['MPICC'] = 'mpiicc %s' % self.m32flag @@ -820,7 +820,7 @@ def _flagsForSubdirs(self, base, subdirs, flag="-L%s", varskey=None): self.vars[varskey] = '' self.vars[varskey] += ' ' + ' '.join(flags) - def det_toolkit_type(self, name, type_map): + def get_type(self, name, type_map): """Determine type of toolkit based on toolkit dependencies.""" toolkit_dep_names = [dep['name'] for dep in self.toolkit_deps] @@ -835,7 +835,7 @@ def det_toolkit_type(self, name, type_map): self.log.error("Failed to determine %s based on toolkit dependencies." % name) - def toolkit_comp_family(self): + def comp_family(self): """Determine compiler family based on toolkit dependencies.""" comp_families = { # always use tuples as keys! @@ -843,19 +843,19 @@ def toolkit_comp_family(self): ('GCC', ): GCC } - return self.det_toolkit_type("compiler family", comp_families) + return self.get_type("compiler family", comp_families) def get_openmp_flag(self): """Determine compiler flag for OpenMP""" - if self.toolkit_comp_family() == INTEL: + if self.comp_family() == INTEL: return "-openmp" - elif self.toolkit_comp_family() == GCC: + elif self.comp_family() == GCC: return "-fopenmp" else: self.log.error("Can't determine compiler flag for OpenMP.") - def toolkit_mpi_type(self): + def mpi_type(self): """Determine type of MPI library based on toolkit dependencies.""" mpi_types = { # always use tuples as keys! @@ -866,7 +866,7 @@ def toolkit_mpi_type(self): ('QLogicMPI', ):QLOGIC } - return self.det_toolkit_type("type of mpi library", mpi_types) + return self.get_type("type of mpi library", mpi_types) def mpi_cmd_for(self, cmd, nr_ranks): """Construct an MPI command for the given command and number of ranks.""" @@ -880,7 +880,7 @@ def mpi_cmd_for(self, cmd, nr_ranks): INTEL:"mpirun %(mpdbootfile)s %(nodesfile)s -np %(nr_ranks)d %(cmd)s", } - mpi_type = self.toolkit_mpi_type() + mpi_type = self.mpi_type() # Intel MPI mpirun needs more work if mpi_type == INTEL: From 7afd3c521a2f49d0514acd3e381f7a0f8e493e6d Mon Sep 17 00:00:00 2001 From: Kenneth Hoste Date: Wed, 8 Aug 2012 15:14:48 +0200 Subject: [PATCH 515/798] fix import deletion in easyblock.py (+ cleanup) --- easybuild/framework/easyblock.py | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/easybuild/framework/easyblock.py b/easybuild/framework/easyblock.py index 814b9d8152..51f67cbfa7 100644 --- a/easybuild/framework/easyblock.py +++ b/easybuild/framework/easyblock.py @@ -24,6 +24,7 @@ import difflib import os +from easybuild.tools.build_log import getLog from easybuild.tools.toolkit import Toolkit from easybuild.tools.systemtools import get_shared_lib_ext from easybuild.tools.filetools import run_cmd @@ -133,9 +134,9 @@ def parse(self, path): try: execfile(path, global_vars, local_vars) except IOError, err: - self.log.exception("Unexpected IOError during execfile()") + self.log.exception("Unexpected IOError during execfile(): %s" % err) except SyntaxError, err: - self.log.exception("SyntaxError in easyblock %s" % path) + self.log.exception("SyntaxError in easyblock %s: %s" % (path, err)) # validate mandatory keys for key in self.mandatory: From 4933075ba01db4849e6f3cf6b079abc20fb57bed Mon Sep 17 00:00:00 2001 From: Toon Willems Date: Wed, 8 Aug 2012 15:20:32 +0200 Subject: [PATCH 516/798] change easybuildlog -> easybuild --- easybuild/easybuild_config.py | 2 +- easybuild/tools/filetools.py | 5 +++-- 2 files changed, 4 insertions(+), 3 deletions(-) diff --git a/easybuild/easybuild_config.py b/easybuild/easybuild_config.py index ba9a1f8c8f..1a870ea58d 100644 --- a/easybuild/easybuild_config.py +++ b/easybuild/easybuild_config.py @@ -72,7 +72,7 @@ # log format: (dir, filename template) # supported in template: name, version, data, time -logFormat = ("easybuildlog", "easybuild-%(name)s-%(version)s-%(date)s.%(time)s.log") +logFormat = ("easybuild", "easybuild-%(name)s-%(version)s-%(date)s.%(time)s.log") # general cleanliness del os, getLog, config, log, prefix, buildDir, installDir, sourceDir diff --git a/easybuild/tools/filetools.py b/easybuild/tools/filetools.py index cffd396a99..6e4198e2a6 100644 --- a/easybuild/tools/filetools.py +++ b/easybuild/tools/filetools.py @@ -38,6 +38,7 @@ import easybuild.tools.environment as env from easybuild.tools.asyncprocess import Popen, PIPE, STDOUT, send_all, recv_some from easybuild.tools.build_log import getLog +from easybuild.tools.config import logPath log = getLog('fileTools') @@ -91,8 +92,8 @@ def findBaseDir(): expect only the first one to give the correct path """ def getLocalDirsPurged(): - ## e.g. always purge the easybuildlog directory - ignoreDirs = ['easybuildlog'] + ## e.g. always purge the log directory + ignoreDirs = [logPath()] lst = os.listdir(os.getcwd()) for ignDir in ignoreDirs: From 27495d541063dbbefa89fddc406f92a492f96864 Mon Sep 17 00:00:00 2001 From: Kenneth Hoste Date: Wed, 8 Aug 2012 15:24:31 +0200 Subject: [PATCH 517/798] define BLACS and SCALAPACK env vars --- easybuild/tools/toolkit.py | 35 ++++++++++++++++++++++++++--------- 1 file changed, 26 insertions(+), 9 deletions(-) diff --git a/easybuild/tools/toolkit.py b/easybuild/tools/toolkit.py index 4a69cb2e1e..e2b60950e0 100644 --- a/easybuild/tools/toolkit.py +++ b/easybuild/tools/toolkit.py @@ -571,10 +571,12 @@ def prepareIMKL(self): libsfx = "" libsfxsl = "_core" - # MKL libraries for BLAS, LAPACK, ScaLAPACK routines + # MKL libraries for BLACS, BLAS, LAPACK, ScaLAPACK routines + blacs_libs = ["blacs%s" % libsfx] blas_libs = ["intel%s" % libsfx, "sequential", "core"] blas_mt_libs = ["intel%s" % libsfx, "intel_thread", "core"] - scalapack_libs = blas_libs + ["blacs_intelmpi%s" % libsfx] + scalapack_libs = ["scalapack%s" % libsfxsl, "solver%s_sequential" % libsfx] + blas_libs + ["blacs_intelmpi%s" % libsfx] + scalapack_mt_libs = ["scalapack%s" % libsfxsl, "solver" % libsfx] + blas_mt_libs + ["blacs_intelmpi%s" % libsfx] # adjust lib subdir if GCC is used if self.toolkit_comp_family() == GCC: @@ -605,7 +607,7 @@ def prepareIMKL(self): self.vars['LAPACK_LIB_DIR'] = bl_libdir self.vars['BLAS_LAPACK_LIB_DIR'] = bl_libdir - # list of libraries for BLAS/LAPACK + # BLAS/LAPACK library self.vars['BLAS_STATIC_LIBS'] = ','.join(blas_libs) self.vars['BLAS_MT_STATIC_LIBS'] = ','.join(blas_mt_libs) @@ -615,16 +617,24 @@ def prepareIMKL(self): self.vars['BLAS_LAPACK_STATIC_LIBS'] = self.vars['LAPACK_STATIC_LIBS'] self.vars['BLAS_LAPACK_MT_STATIC_LIBS'] = self.vars['LAPACK_MT_STATIC_LIBS'] + # BLACS library + self.vars['BLACS_INC'] = os.path.join(mklroot, "mkl", "include") + self.vars['BLACS_LIB_DIR'] = bl_libdir + self.vars['BLACS_STATIC_LIBS'] = ','.join(["libmkl_%s.a" % x for x in blacs_libs]) + self.vars['BLACS_MT_STATIC_LIBS'] = self.vars['BLACS_STATIC_LIBS'] + # sequential ScaLAPACK - prefix = "-Wl:-Bstatic -lmkl_scalapack%s -lmkl_solver%s_sequential -Wl,--start-group" % (libsfxsl, libsfx) + self.vars['SCALAPACK_INC'] = os.path.join(mklroot, "mkl", "include") + self.vars['SCALAPACK_LIB_DIR'] = bl_libdir + suffix = "-Wl,--end-group -Wl:-Bdynamic" - self.vars['LIBSCALAPACK'] = ' '.join((prefix, ' '.join(scalapack_libs), suffix)) + self.vars['LIBSCALAPACK'] = ' '.join((prefix, ' '.join(["-lmkl_%s" % x for x in scalapack_libs]), suffix)) + self.vars['SCALAPACK_STATIC_LIBS'] = ','.join(["libmkl_%s.a" % x for x in scalapack_libs]) # multi-threaded ScaLAPACK - lib = self.vars['LIBSCALAPACK'] - lib = lib.replace('mkl_solver%s_sequential' % libsfx, 'mkl_solver') - lib = lib.replace('mkl_sequential', 'mkl_intel_thread') + ' -liomp5 -lpthread' - self.vars['LIBSCALAPACK_MT'] = lib + suffix += ' -liomp5 -lpthread' + self.vars['LIBSCALAPACK_MT'] = ' '.join((prefix, ' '.join(["-lmkl_%s" % x for x in scalapack_mt_libs]), suffix)) + self.vars['SCALAPACK_MT_STATIC_LIBS'] = ','.join(["libmkl_%s.a" % x for x in scalapack_mt_libs]) # FFT library fftwsuff = "" @@ -796,11 +806,18 @@ def prepareScaLAPACK(self): Prepare for ScaLAPACK library """ + scalapack = get_software_root("ScaLAPACK") + # we need to be careful here, LIBSCALAPACK(_MT) may be set by prepareBLACS, or not self.vars['LIBSCALAPACK'] = "%s -lscalapack" % self.vars.get('LIBSCALAPACK', '') self.vars['LIBSCALAPACK_MT'] = "%s %s -lpthread" % (self.vars['LIBSCALAPACK'], self.vars.get('LIBSCALAPACK_MT', '')) + self.vars['SCALAPACK_INC'] = os.path.join(scalapack, "include") + self.vars['SCALAPACK_LIB_DIR'] = os.path.join(scalapack, "include") + self.vars['SCALAPACK_STATIC_LIBS'] = "libscalapack.a" + self.vars['SCALAPACK_MT_STATIC_LIBS'] = self.vars['SCALAPACK_STATIC_LIBS'] + self._addDependencyVariables(['ScaLAPACK']) def _getOptimizationLevel(self): From 591701f9a3719e655804055cca30518229555c0f Mon Sep 17 00:00:00 2001 From: Kenneth Hoste Date: Wed, 8 Aug 2012 15:56:36 +0200 Subject: [PATCH 518/798] include current MODULEPATH when checking for built modules --- easybuild/build.py | 6 +++--- easybuild/tools/modules.py | 12 ++++++++++++ 2 files changed, 15 insertions(+), 3 deletions(-) diff --git a/easybuild/build.py b/easybuild/build.py index 14512ce2cf..79941ee1b0 100644 --- a/easybuild/build.py +++ b/easybuild/build.py @@ -42,12 +42,12 @@ import easybuild # required for VERBOSE_VERSION import easybuild.tools.config as config import easybuild.tools.filetools as filetools -from easybuild.framework.application import Application, get_class +from easybuild.framework.application import get_class from easybuild.framework.easyblock import EasyBlock from easybuild.tools.build_log import EasyBuildError, initLogger, \ removeLogHandler, print_msg from easybuild.tools.class_dumper import dumpClasses -from easybuild.tools.modules import Modules, searchModule +from easybuild.tools.modules import Modules, searchModule, curr_module_paths, mk_module_path from easybuild.tools.config import getRepository from easybuild.tools import systemtools from easybuild.tools.pbs_job import PbsJob @@ -226,7 +226,7 @@ def main(): for package in checkPackages: module = package['module'] mod = "%s (version %s)" % (module[0], module[1]) - modspath = os.path.join(config.installPath("mod"), 'all') + modspath = mk_module_path(curr_module_paths() + [os.path.join(config.installPath("mod"), 'all')]) if m.exists(module[0], module[1], modspath): msg = "%s is already installed (module found in %s), skipping " % (mod, modspath) print_msg(msg, log) diff --git a/easybuild/tools/modules.py b/easybuild/tools/modules.py index c28e12d0bf..32afbfb993 100644 --- a/easybuild/tools/modules.py +++ b/easybuild/tools/modules.py @@ -320,3 +320,15 @@ def get_software_version(name): """ environmentKey = sofware_env_var_name("version", name) return os.getenv(environmentKey) + +def curr_module_paths(): + """ + Return a list of current module paths. + """ + return os.environ['MODULEPATH'].split(':') + +def mk_module_path(paths): + """ + Create a string representing the list of module paths. + """ + return ':'.join(paths) \ No newline at end of file From 36639c8d9d1c72e3e40ee8410a1df87a7080b821 Mon Sep 17 00:00:00 2001 From: Kenneth Hoste Date: Wed, 8 Aug 2012 15:57:37 +0200 Subject: [PATCH 519/798] make output of configure/make/test/make install available to caller --- easybuild/framework/application.py | 23 +++++++++++++++++++---- 1 file changed, 19 insertions(+), 4 deletions(-) diff --git a/easybuild/framework/application.py b/easybuild/framework/application.py index 145f82234b..67fa928965 100644 --- a/easybuild/framework/application.py +++ b/easybuild/framework/application.py @@ -918,31 +918,42 @@ def configure(self, cmd_prefix=''): Configure step - typically ./configure --prefix=/install/path style """ + cmd = "%s %s./configure --prefix=%s %s" % (self.getcfg('preconfigopts'), cmd_prefix, self.installdir, self.getcfg('configopts')) - run_cmd(cmd, log_all=True, simple=True) + + (out, _) = run_cmd(cmd, log_all=True, simple=False) + + return out def make(self, verbose=False): """ Start the actual build - typical: make -j X """ + paracmd = '' if self.getcfg('parallel'): paracmd = "-j %s" % self.getcfg('parallel') cmd = "%s make %s %s" % (self.getcfg('premakeopts'), paracmd, self.getcfg('makeopts')) - run_cmd(cmd, log_all=True, simple=True, log_output=verbose) + (out, _) = run_cmd(cmd, log_all=True, simple=False, log_output=verbose) + + return out def test(self): """ Test the compilation - default: None """ + if self.getcfg('runtest'): cmd = "make %s" % (self.getcfg('runtest')) - run_cmd(cmd, log_all=True, simple=True) + (out, _) = run_cmd(cmd, log_all=True, simple=False) + + return out + def toolkit(self): """ The toolkit used to build this Application @@ -954,8 +965,12 @@ def make_install(self): Create the installation in correct location - typical: make install """ + cmd = "make install %s" % (self.getcfg('installopts')) - run_cmd(cmd, log_all=True, simple=True) + + (out, _) = run_cmd(cmd, log_all=True, simple=False) + + return out def make_builddir(self): """ From 5937774bac0dc11e8b8e46a144843fdfff2a87ef Mon Sep 17 00:00:00 2001 From: Kenneth Hoste Date: Wed, 8 Aug 2012 16:34:37 +0200 Subject: [PATCH 520/798] fix docstrings, fix bug in MPI lib check, also copy include files to install directory --- easybuild/easyblocks/b/blacs.py | 50 +++++++++++++++++++++++---------- 1 file changed, 35 insertions(+), 15 deletions(-) diff --git a/easybuild/easyblocks/b/blacs.py b/easybuild/easyblocks/b/blacs.py index 008b9126f1..3fb3d3944d 100644 --- a/easybuild/easyblocks/b/blacs.py +++ b/easybuild/easyblocks/b/blacs.py @@ -36,8 +36,9 @@ from easybuild.tools.modules import get_software_root +# also used by ScaLAPACK def det_interface(log, path): - """Determine interface through xintface""" + """Determine interface through 'xintface' heuristic tool""" (out, _) = run_cmd(os.path.join(path,"xintface"), log_all=True, simple=False) @@ -57,6 +58,7 @@ class BLACS(Application): """ def configure(self): + """Configure BLACS build by copying Bmake.inc file.""" src = os.path.join(self.getcfg('startfrom'), 'BMAKES', 'Bmake.MPI-LINUX') dest = os.path.join(self.getcfg('startfrom'), 'Bmake.inc') @@ -73,6 +75,7 @@ def configure(self): self.log.error("Copying %s to % failed: %s" % (src, dest, err)) def make(self): + """Build BLACS using make, after figuring out the make options based on the heuristic tools available.""" # determine MPI base dir and lib known_mpi_libs = { @@ -87,8 +90,9 @@ def make(self): if root: base = root mpilib = val + break - if base and mpilib: + if not base or not mpilib: self.log.error("Unknown MPI library used (known MPI libs: %s)" % known_mpi_libs.keys()) # common settings (for now) @@ -176,26 +180,41 @@ def make(self): Application.make(self) def make_install(self): + """Install by copying files to install dir.""" + + # include files src = os.path.join(self.getcfg('startfrom'), 'LIB') - dest = os.path.join(self.installdir, 'lib') - try: - os.makedirs(dest) - os.chdir(src) + # include files and libraries + for (srcdir, destdir, ext) in [ + (os.path.join("SRC", "MPI"), "include", ".h"), # include files + ("LIB", "lib", ".a"), # libraries + ]: - for lib in glob.glob('*.a'): + src = os.path.join(self.getcfg('startfrom'), srcdir) + dest = os.path.join(self.installdir, destdir) - # copy file - shutil.copy2(os.path.join(src, lib), dest) + try: + os.makedirs(dest) + os.chdir(src) - # create symlink with more standard name - symlink_name = "lib%s.a" % lib.split('_')[0] - os.symlink(os.path.join(dest, lib), os.path.join(dest, symlink_name)) - self.log.debug("Copied %s to %s and symlinked it to %s" % (lib, dest, symlink_name)) + for lib in glob.glob('*%s' % ext): - except OSError, err: - self.log.error("Copying %s/*.a to installation dir %s failed: %s"%(src, dest, err)) + # copy file + shutil.copy2(os.path.join(src, lib), dest) + + self.log.debug("Copied %s to %s" % (lib, dest)) + + if destdir == 'lib': + # create symlink with more standard name for libraries + symlink_name = "lib%s.a" % lib.split('_')[0] + os.symlink(os.path.join(dest, lib), os.path.join(dest, symlink_name)) + self.log.debug("Symlinked %s/%s to %s" % (dest, lib, symlink_name)) + + except OSError, err: + self.log.error("Copying %s/*.%s to installation dir %s failed: %s"%(src, ext, dest, err)) + # utilities src = os.path.join(self.getcfg('startfrom'), 'INSTALL', 'EXE', 'xintface') dest = os.path.join(self.installdir, 'bin') @@ -210,6 +229,7 @@ def make_install(self): self.log.error("Copying %s to installation dir %s failed: %s" % (src, dest, err)) def sanitycheck(self): + """Custom sanity check for BLACS.""" if not self.getcfg('sanityCheckPaths'): self.setcfg('sanityCheckPaths',{ From 5bc54c856de055efe8c1e6b789e8ba0bb8c91b7e Mon Sep 17 00:00:00 2001 From: Kenneth Hoste Date: Wed, 8 Aug 2012 16:34:37 +0200 Subject: [PATCH 521/798] fix docstrings, fix bug in MPI lib check, also copy include files to install directory --- easybuild/easyblocks/b/blacs.py | 50 +++++++++++++++++++++++---------- 1 file changed, 35 insertions(+), 15 deletions(-) diff --git a/easybuild/easyblocks/b/blacs.py b/easybuild/easyblocks/b/blacs.py index 008b9126f1..3fb3d3944d 100644 --- a/easybuild/easyblocks/b/blacs.py +++ b/easybuild/easyblocks/b/blacs.py @@ -36,8 +36,9 @@ from easybuild.tools.modules import get_software_root +# also used by ScaLAPACK def det_interface(log, path): - """Determine interface through xintface""" + """Determine interface through 'xintface' heuristic tool""" (out, _) = run_cmd(os.path.join(path,"xintface"), log_all=True, simple=False) @@ -57,6 +58,7 @@ class BLACS(Application): """ def configure(self): + """Configure BLACS build by copying Bmake.inc file.""" src = os.path.join(self.getcfg('startfrom'), 'BMAKES', 'Bmake.MPI-LINUX') dest = os.path.join(self.getcfg('startfrom'), 'Bmake.inc') @@ -73,6 +75,7 @@ def configure(self): self.log.error("Copying %s to % failed: %s" % (src, dest, err)) def make(self): + """Build BLACS using make, after figuring out the make options based on the heuristic tools available.""" # determine MPI base dir and lib known_mpi_libs = { @@ -87,8 +90,9 @@ def make(self): if root: base = root mpilib = val + break - if base and mpilib: + if not base or not mpilib: self.log.error("Unknown MPI library used (known MPI libs: %s)" % known_mpi_libs.keys()) # common settings (for now) @@ -176,26 +180,41 @@ def make(self): Application.make(self) def make_install(self): + """Install by copying files to install dir.""" + + # include files src = os.path.join(self.getcfg('startfrom'), 'LIB') - dest = os.path.join(self.installdir, 'lib') - try: - os.makedirs(dest) - os.chdir(src) + # include files and libraries + for (srcdir, destdir, ext) in [ + (os.path.join("SRC", "MPI"), "include", ".h"), # include files + ("LIB", "lib", ".a"), # libraries + ]: - for lib in glob.glob('*.a'): + src = os.path.join(self.getcfg('startfrom'), srcdir) + dest = os.path.join(self.installdir, destdir) - # copy file - shutil.copy2(os.path.join(src, lib), dest) + try: + os.makedirs(dest) + os.chdir(src) - # create symlink with more standard name - symlink_name = "lib%s.a" % lib.split('_')[0] - os.symlink(os.path.join(dest, lib), os.path.join(dest, symlink_name)) - self.log.debug("Copied %s to %s and symlinked it to %s" % (lib, dest, symlink_name)) + for lib in glob.glob('*%s' % ext): - except OSError, err: - self.log.error("Copying %s/*.a to installation dir %s failed: %s"%(src, dest, err)) + # copy file + shutil.copy2(os.path.join(src, lib), dest) + + self.log.debug("Copied %s to %s" % (lib, dest)) + + if destdir == 'lib': + # create symlink with more standard name for libraries + symlink_name = "lib%s.a" % lib.split('_')[0] + os.symlink(os.path.join(dest, lib), os.path.join(dest, symlink_name)) + self.log.debug("Symlinked %s/%s to %s" % (dest, lib, symlink_name)) + + except OSError, err: + self.log.error("Copying %s/*.%s to installation dir %s failed: %s"%(src, ext, dest, err)) + # utilities src = os.path.join(self.getcfg('startfrom'), 'INSTALL', 'EXE', 'xintface') dest = os.path.join(self.installdir, 'bin') @@ -210,6 +229,7 @@ def make_install(self): self.log.error("Copying %s to installation dir %s failed: %s" % (src, dest, err)) def sanitycheck(self): + """Custom sanity check for BLACS.""" if not self.getcfg('sanityCheckPaths'): self.setcfg('sanityCheckPaths',{ From 7374a6492a0b0c49cfbfa4766fa7c1946caed872 Mon Sep 17 00:00:00 2001 From: Kenneth Hoste Date: Wed, 8 Aug 2012 16:43:33 +0200 Subject: [PATCH 522/798] consistent style for "for (x,y) in" --- easybuild/easyblocks/n/ncl.py | 4 ++-- easybuild/easyblocks/s/suitesparse.py | 4 ++-- easybuild/easyblocks/w/wps.py | 2 +- easybuild/easyblocks/w/wrf.py | 2 +- easybuild/framework/application.py | 6 +++--- 5 files changed, 9 insertions(+), 9 deletions(-) diff --git a/easybuild/easyblocks/n/ncl.py b/easybuild/easyblocks/n/ncl.py index f8516735b6..26f196d4b4 100644 --- a/easybuild/easyblocks/n/ncl.py +++ b/easybuild/easyblocks/n/ncl.py @@ -90,7 +90,7 @@ def configure(self): # replace config entries that are already there for line in fileinput.input(cfg_filename, inplace=1, backup='%s.orig' % cfg_filename): - for key,val in macrodict.items(): + for (key, val) in macrodict.items(): regexp = re.compile("(#define %s\s*).*" % key) match = regexp.search(line) if match: @@ -100,7 +100,7 @@ def configure(self): # add remaining config entries f = open(cfg_filename, "a") - for key,val in macrodict.items(): + for (key, val) in macrodict.items(): f.write("#define %s %s\n" % (key, val)) f.close() diff --git a/easybuild/easyblocks/s/suitesparse.py b/easybuild/easyblocks/s/suitesparse.py index acf6edbc7d..ccaa53664f 100644 --- a/easybuild/easyblocks/s/suitesparse.py +++ b/easybuild/easyblocks/s/suitesparse.py @@ -61,7 +61,7 @@ def configure(self): # patch file try: for line in fileinput.input(fp, inplace=1, backup='.orig'): - for k,v in cfgvars.items(): + for (k, v) in cfgvars.items(): line = re.sub(r"^(%s\s*=\s*).*$" % k, r"\1 %s # patched by EasyBuild" % v, line) if k in line: cfgvars.pop(k) @@ -74,7 +74,7 @@ def configure(self): try: f = open(fp, "a") f.write("# lines below added automatically by EasyBuild") - for k,v in cfgvars.items(): + for (k, v) in cfgvars.items(): f.write("%s = %s\n" % (k,v)) f.close() except IOError, err: diff --git a/easybuild/easyblocks/w/wps.py b/easybuild/easyblocks/w/wps.py index bd6ffc4597..d32dbd56f3 100644 --- a/easybuild/easyblocks/w/wps.py +++ b/easybuild/easyblocks/w/wps.py @@ -195,7 +195,7 @@ def configure(self): } fn = 'configure.wps' for line in fileinput.input(fn, inplace=1,backup='.orig.comps'): - for k,v in comps.items(): + for (k,v) in comps.items(): line = re.sub(r"^(%s\s*=\s*).*$" % k, r"\1 %s" % v, line) sys.stdout.write(line) diff --git a/easybuild/easyblocks/w/wrf.py b/easybuild/easyblocks/w/wrf.py index d1597b8431..2bf6c67436 100644 --- a/easybuild/easyblocks/w/wrf.py +++ b/easybuild/easyblocks/w/wrf.py @@ -154,7 +154,7 @@ def configure(self): 'DM_CC': "%s -DMPI2_SUPPORT" % os.getenv('MPICC'), } for line in fileinput.input(cfgfile, inplace=1, backup='.orig.comps'): - for k,v in comps.items(): + for (k, v) in comps.items(): line = re.sub(r"^(%s\s*=\s*).*$" % k, r"\1 %s" % v, line) sys.stdout.write(line) diff --git a/easybuild/framework/application.py b/easybuild/framework/application.py index 67fa928965..3275eb861b 100644 --- a/easybuild/framework/application.py +++ b/easybuild/framework/application.py @@ -741,7 +741,7 @@ def postproc(self): gid = grp.getgrnam(self.getcfg('group'))[2] chngsuccess = [] chngfailure = [] - for root, _, files in os.walk(self.installdir): + for (root, _, files) in os.walk(self.installdir): try: os.chown(root, -1, gid) os.chmod(root, 0750) @@ -1167,7 +1167,7 @@ def make_module_extra(self): txt += self.moduleGenerator.setEnvironment("SOFTVERSION" + environmentName, self.version()) txt += "\n" - for key, value in self.getcfg('modextravars').items(): + for (key, value) in self.getcfg('modextravars').items(): txt += self.moduleGenerator.setEnvironment(key, value) self.log.debug("make_module_extra added this: %s" % txt) @@ -1190,7 +1190,7 @@ def installsize(self): os.chdir(os.getenv('HOME')) # walk install dir to determine total size - for dirpath, _, filenames in os.walk(self.installdir): + for (dirpath, _, filenames) in os.walk(self.installdir): for filename in filenames: fullpath = os.path.join(dirpath, filename) if os.path.exists(fullpath): From 318703d5495d41768dce9621abc2f104af178e5e Mon Sep 17 00:00:00 2001 From: Kenneth Hoste Date: Wed, 8 Aug 2012 16:43:33 +0200 Subject: [PATCH 523/798] consistent style for "for (x,y) in" Conflicts: easybuild/easyblocks/s/suitesparse.py --- easybuild/easyblocks/n/ncl.py | 4 ++-- easybuild/easyblocks/w/wps.py | 2 +- easybuild/easyblocks/w/wrf.py | 2 +- easybuild/framework/application.py | 6 +++--- 4 files changed, 7 insertions(+), 7 deletions(-) diff --git a/easybuild/easyblocks/n/ncl.py b/easybuild/easyblocks/n/ncl.py index f8516735b6..26f196d4b4 100644 --- a/easybuild/easyblocks/n/ncl.py +++ b/easybuild/easyblocks/n/ncl.py @@ -90,7 +90,7 @@ def configure(self): # replace config entries that are already there for line in fileinput.input(cfg_filename, inplace=1, backup='%s.orig' % cfg_filename): - for key,val in macrodict.items(): + for (key, val) in macrodict.items(): regexp = re.compile("(#define %s\s*).*" % key) match = regexp.search(line) if match: @@ -100,7 +100,7 @@ def configure(self): # add remaining config entries f = open(cfg_filename, "a") - for key,val in macrodict.items(): + for (key, val) in macrodict.items(): f.write("#define %s %s\n" % (key, val)) f.close() diff --git a/easybuild/easyblocks/w/wps.py b/easybuild/easyblocks/w/wps.py index bd6ffc4597..d32dbd56f3 100644 --- a/easybuild/easyblocks/w/wps.py +++ b/easybuild/easyblocks/w/wps.py @@ -195,7 +195,7 @@ def configure(self): } fn = 'configure.wps' for line in fileinput.input(fn, inplace=1,backup='.orig.comps'): - for k,v in comps.items(): + for (k,v) in comps.items(): line = re.sub(r"^(%s\s*=\s*).*$" % k, r"\1 %s" % v, line) sys.stdout.write(line) diff --git a/easybuild/easyblocks/w/wrf.py b/easybuild/easyblocks/w/wrf.py index d1597b8431..2bf6c67436 100644 --- a/easybuild/easyblocks/w/wrf.py +++ b/easybuild/easyblocks/w/wrf.py @@ -154,7 +154,7 @@ def configure(self): 'DM_CC': "%s -DMPI2_SUPPORT" % os.getenv('MPICC'), } for line in fileinput.input(cfgfile, inplace=1, backup='.orig.comps'): - for k,v in comps.items(): + for (k, v) in comps.items(): line = re.sub(r"^(%s\s*=\s*).*$" % k, r"\1 %s" % v, line) sys.stdout.write(line) diff --git a/easybuild/framework/application.py b/easybuild/framework/application.py index 15811038d2..d349f9029a 100644 --- a/easybuild/framework/application.py +++ b/easybuild/framework/application.py @@ -744,7 +744,7 @@ def postproc(self): gid = grp.getgrnam(self.getcfg('group'))[2] chngsuccess = [] chngfailure = [] - for root, _, files in os.walk(self.installdir): + for (root, _, files) in os.walk(self.installdir): try: os.chown(root, -1, gid) os.chmod(root, 0750) @@ -1155,7 +1155,7 @@ def make_module_extra(self): txt += self.moduleGenerator.setEnvironment("SOFTVERSION" + environmentName, self.version()) txt += "\n" - for key, value in self.getcfg('modextravars').items(): + for (key, value) in self.getcfg('modextravars').items(): txt += self.moduleGenerator.setEnvironment(key, value) self.log.debug("make_module_extra added this: %s" % txt) @@ -1178,7 +1178,7 @@ def installsize(self): os.chdir(os.getenv('HOME')) # walk install dir to determine total size - for dirpath, _, filenames in os.walk(self.installdir): + for (dirpath, _, filenames) in os.walk(self.installdir): for filename in filenames: fullpath = os.path.join(dirpath, filename) if os.path.exists(fullpath): From 043045116a0362cfa6ddc328435ea8c5f3880466 Mon Sep 17 00:00:00 2001 From: Toon Willems Date: Wed, 8 Aug 2012 16:47:39 +0200 Subject: [PATCH 524/798] create devel module --- easybuild/framework/application.py | 46 ++++++++++++++++++++++++------ easybuild/tools/modules.py | 3 ++ 2 files changed, 41 insertions(+), 8 deletions(-) diff --git a/easybuild/framework/application.py b/easybuild/framework/application.py index 15811038d2..e97d2447a6 100644 --- a/easybuild/framework/application.py +++ b/easybuild/framework/application.py @@ -678,13 +678,6 @@ def build(self): finally: self.runstep('cleanup', [self.cleanup]) - # write changes to the environment to logdir - logdir = os.path.join(self.installdir, config.logPath()) - if not os.path.isdir(logdir): - os.makedirs(logdir) - - env.write_changes(os.path.join(logdir, "easybuild-env-vars.sh")) - except StopException: pass @@ -1083,8 +1076,42 @@ def make_module(self, fake=False): self.log.info("Added modulefile: %s" % (self.moduleGenerator.filename)) + if not fake: + self.make_devel_module() + return modpath + def make_devel_module(self): + self.log.debug("loaded modules: %s" % Modules().loaded_modules()) + mod_gen = ModuleGenerator(self) + + header = "#%Module\n" + + env_txt = "" + for (key, val) in env.changes.items(): + if val: + env_txt += mod_gen.setEnvironment(key, val) + + load_txt = "" + # capture all the SOFTDEVEL vars + # these should be all the dependencies and we should load them + for key in os.environ: + if key.startswith("SOFTDEVEL"): + path = os.environ[key] + if os.path.isfile(path): + name, version = path.rsplit('/', 1) + load_txt += mod_gen.loadModule(name, version) + + output_dir = os.path.join(self.installdir, config.logPath()) + if not os.path.exists(output_dir): + os.makedirs(output_dir) + + devel_module = open(os.path.join(output_dir, "%s-%s-easybuild-devel" % (self.name(), self.installversion())), "w") + devel_module.write(header) + devel_module.write(load_txt) + devel_module.write(env_txt) + devel_module.close() + def make_module_description(self): """ Create the module description. @@ -1149,10 +1176,13 @@ def make_module_extra(self): """ txt = "\n" - ## SOFTROOT + SOFTVERSION + ## SOFTROOT + SOFTVERSION + SOFTDEVEL environmentName = convertName(self.name(), upper=True) txt += self.moduleGenerator.setEnvironment("SOFTROOT" + environmentName, "$root") txt += self.moduleGenerator.setEnvironment("SOFTVERSION" + environmentName, self.version()) + devel_path = os.path.join("$root", config.logPath(), "%s-%s-easybuild-devel" % (self.name(), + self.installversion())) + txt += self.moduleGenerator.setEnvironment("SOFTDEVEL" + environmentName, devel_path) txt += "\n" for key, value in self.getcfg('modextravars').items(): diff --git a/easybuild/tools/modules.py b/easybuild/tools/modules.py index abcc508b1e..9d1ac0d849 100644 --- a/easybuild/tools/modules.py +++ b/easybuild/tools/modules.py @@ -230,6 +230,9 @@ def loaded_modules(self): else: log.debug("No environment variable found to determine loaded modules, assuming no modules are loaded.") + + # filter devel modules, since they cannot be split like this + mods = [mod for mod in mods if not mod.endswith("easybuild-devel")] for mod in mods: (mod_name, mod_version) = mod.split('/') loaded_modules.append({ From c94c27c17c58fc6acd6a932d5bd43910f14490a5 Mon Sep 17 00:00:00 2001 From: Kenneth Hoste Date: Wed, 8 Aug 2012 16:53:27 +0200 Subject: [PATCH 525/798] processed remarks in pull request --- easybuild/easyblocks/m/mrbayes.py | 2 +- easybuild/easyblocks/s/scalapack.py | 2 +- easybuild/easyblocks/w/wps.py | 4 ++-- easybuild/easyblocks/w/wrf.py | 2 +- easybuild/tools/toolkit.py | 4 ++-- 5 files changed, 7 insertions(+), 7 deletions(-) diff --git a/easybuild/easyblocks/m/mrbayes.py b/easybuild/easyblocks/m/mrbayes.py index 624b5d84ab..3eabb898e3 100644 --- a/easybuild/easyblocks/m/mrbayes.py +++ b/easybuild/easyblocks/m/mrbayes.py @@ -50,7 +50,7 @@ def configure(self): # set correct startfrom dir, and change into it self.setcfg('startfrom', os.path.join(self.getcfg('startfrom'),'src')) try: - os.chdir(self.getcfg('startfrom')) + os.chdir(self.getcfg('startfrom')) except OSError, err: self.log.error("Failed to change to correct source dir %s: %s" % (self.getcfg('startfrom'), err)) diff --git a/easybuild/easyblocks/s/scalapack.py b/easybuild/easyblocks/s/scalapack.py index 005c69014c..54b154f008 100644 --- a/easybuild/easyblocks/s/scalapack.py +++ b/easybuild/easyblocks/s/scalapack.py @@ -31,9 +31,9 @@ from distutils.version import LooseVersion import easybuild.tools.toolkit as toolkit -from easybuild.framework.application import Application from easybuild.easyblocks.b.blacs import det_interface from easybuild.easyblocks.l.lapack import get_blas_lib +from easybuild.framework.application import Application from easybuild.tools.modules import get_software_root diff --git a/easybuild/easyblocks/w/wps.py b/easybuild/easyblocks/w/wps.py index d32dbd56f3..31bf05c7dc 100644 --- a/easybuild/easyblocks/w/wps.py +++ b/easybuild/easyblocks/w/wps.py @@ -36,10 +36,10 @@ import easybuild.tools.environment as env import easybuild.tools.toolkit as toolkit +from easybuild.easyblocks.n.netcdf import set_netcdf_env_vars, get_netcdf_module_set_cmds from easybuild.framework.application import Application from easybuild.tools.filetools import patch_perl_script_autoflush, run_cmd, run_cmd_qa, unpack -from easybuild.tools.modules import get_software_root -from easybuild.easyblocks.n.netcdf import set_netcdf_env_vars, get_netcdf_module_set_cmds +from easybuild.tools.modules import get_software_root, get_software_version class WPS(Application): diff --git a/easybuild/easyblocks/w/wrf.py b/easybuild/easyblocks/w/wrf.py index 2bf6c67436..1d827f3a1d 100644 --- a/easybuild/easyblocks/w/wrf.py +++ b/easybuild/easyblocks/w/wrf.py @@ -33,10 +33,10 @@ import easybuild.tools.environment as env import easybuild.tools.toolkit as toolkit +from easybuild.easyblocks.n.netcdf import set_netcdf_env_vars, get_netcdf_module_set_cmds from easybuild.framework.application import Application from easybuild.tools.filetools import patch_perl_script_autoflush, run_cmd, run_cmd_qa from easybuild.tools.modules import get_software_root -from easybuild.easyblocks.n.netcdf import set_netcdf_env_vars, get_netcdf_module_set_cmds class WRF(Application): diff --git a/easybuild/tools/toolkit.py b/easybuild/tools/toolkit.py index 1fab46146f..9ca0aca609 100644 --- a/easybuild/tools/toolkit.py +++ b/easybuild/tools/toolkit.py @@ -23,14 +23,14 @@ # You should have received a copy of the GNU General Public License # along with EasyBuild. If not, see . ## -from distutils.version import LooseVersion import copy import os +from distutils.version import LooseVersion import easybuild.tools.environment as env +from easybuild.tools import systemtools from easybuild.tools.build_log import getLog from easybuild.tools.modules import Modules, get_software_root, get_software_version -from easybuild.tools import systemtools # constants used for recognizing compilers, MPI libraries, ... From c04448a9072edc8b03c8101bc78ea5a81c34303a Mon Sep 17 00:00:00 2001 From: Kenneth Hoste Date: Wed, 8 Aug 2012 16:57:15 +0200 Subject: [PATCH 526/798] remove unrequired imports --- easybuild/build.py | 2 +- easybuild/tools/modules.py | 2 +- easybuild/tools/toolkit.py | 5 +---- 3 files changed, 3 insertions(+), 6 deletions(-) diff --git a/easybuild/build.py b/easybuild/build.py index 14512ce2cf..2d53ad5991 100644 --- a/easybuild/build.py +++ b/easybuild/build.py @@ -42,7 +42,7 @@ import easybuild # required for VERBOSE_VERSION import easybuild.tools.config as config import easybuild.tools.filetools as filetools -from easybuild.framework.application import Application, get_class +from easybuild.framework.application import get_class from easybuild.framework.easyblock import EasyBlock from easybuild.tools.build_log import EasyBuildError, initLogger, \ removeLogHandler, print_msg diff --git a/easybuild/tools/modules.py b/easybuild/tools/modules.py index 43419c291a..ad7c629fed 100644 --- a/easybuild/tools/modules.py +++ b/easybuild/tools/modules.py @@ -30,7 +30,7 @@ import subprocess import sys -from easybuild.tools.build_log import getLog, initLogger, EasyBuildError +from easybuild.tools.build_log import getLog, EasyBuildError from easybuild.tools.filetools import convertName, run_cmd diff --git a/easybuild/tools/toolkit.py b/easybuild/tools/toolkit.py index 9ca0aca609..6ecbaeb792 100644 --- a/easybuild/tools/toolkit.py +++ b/easybuild/tools/toolkit.py @@ -333,10 +333,7 @@ def prepareACML(self): compiler = 'ifort' else: self.log.error("Don't know which compiler-specific subdir for ACML to use.") - self.vars['LDFLAGS'] += " -L%(acml)s/%(comp)s64/lib/ " % { - 'comp':compiler, - 'acml':os.environ['SOFTROOTACML'] - } + self.vars['LDFLAGS'] += " -L%s/%s64/lib/ " % (acml, compiler) self.vars['LIBBLAS'] = " -lacml_mv -lacml " self.vars['LIBBLAS_MT'] = self.vars['LIBBLAS'] From c35102bcfd48afc898915799479dc0a2bdb90565 Mon Sep 17 00:00:00 2001 From: Kenneth Hoste Date: Wed, 8 Aug 2012 17:06:04 +0200 Subject: [PATCH 527/798] fix comments in pull request, fix docstrings for ScaLAPACK --- easybuild/easyblocks/c/cp2k.py | 6 +++--- easybuild/easyblocks/g/gcc.py | 2 +- easybuild/easyblocks/s/scalapack.py | 7 ++++++- 3 files changed, 10 insertions(+), 5 deletions(-) diff --git a/easybuild/easyblocks/c/cp2k.py b/easybuild/easyblocks/c/cp2k.py index acb0286682..ecf52bf3e3 100644 --- a/easybuild/easyblocks/c/cp2k.py +++ b/easybuild/easyblocks/c/cp2k.py @@ -438,9 +438,9 @@ def configureFFTW(self, options): fftw = get_software_root('FFTW') options.update({ - 'FFTW_INC': '%s/include' % fftw, # GCC - 'FFTW3INC': '%s/include' % fftw, # Intel - 'FFTW3LIB': '%s/lib' % fftw, # Intel + 'FFTW_INC': '%s/include' % fftw, # GCC + 'FFTW3INC': '%s/include' % fftw, # Intel + 'FFTW3LIB': '%s/lib' % fftw, # Intel }) options['DFLAGS'] += ' -D__FFTW3' diff --git a/easybuild/easyblocks/g/gcc.py b/easybuild/easyblocks/g/gcc.py index 8d5ca95441..8c8aa6f8f4 100644 --- a/easybuild/easyblocks/g/gcc.py +++ b/easybuild/easyblocks/g/gcc.py @@ -36,8 +36,8 @@ import easybuild.tools.environment as env from easybuild.framework.application import Application from easybuild.tools.filetools import run_cmd -from easybuild.tools.systemtools import get_kernel_name, get_shared_lib_ext, get_platform_name from easybuild.tools.modules import get_software_root +from easybuild.tools.systemtools import get_kernel_name, get_shared_lib_ext, get_platform_name class GCC(Application): diff --git a/easybuild/easyblocks/s/scalapack.py b/easybuild/easyblocks/s/scalapack.py index 54b154f008..f275980fbd 100644 --- a/easybuild/easyblocks/s/scalapack.py +++ b/easybuild/easyblocks/s/scalapack.py @@ -40,9 +40,11 @@ class ScaLAPACK(Application): """ Support for building and installing ScaLAPACK, both versions 1.x and 2.x - - configure: copy SLmake.inc.example to SLmake.inc """ + def configure(self): + """Configure ScaLAPACK build by copying SLmake.inc.example to SLmake.inc and checking dependencies.""" + src = os.path.join(self.getcfg('startfrom'), 'SLmake.inc.example') dest = os.path.join(self.getcfg('startfrom'), 'SLmake.inc') @@ -69,6 +71,7 @@ def configure(self): self.log.error("Dependency %s not available/loaded." % dep) def make(self): + """Build ScaLAPACK using make after setting make options.""" # MPI compiler commands if os.getenv('MPICC') and os.getenv('MPIF77') and os.getenv('MPIF90'): @@ -140,6 +143,7 @@ def make(self): Application.make(self) def make_install(self): + """Install by copying files to install dir.""" src = os.path.join(self.getcfg('startfrom'), 'libscalapack.a') dest = os.path.join(self.installdir, 'lib') @@ -151,6 +155,7 @@ def make_install(self): self.log.error("Copying %s to installation dir %s failed: %s" % (src, dest, err)) def sanitycheck(self): + """Custom sanity check for ScaLAPACK.""" if not self.getcfg('sanityCheckPaths'): self.setcfg('sanityCheckPaths',{ From ffba5c5ae6a886db32813108cfd8a0dc83a3f6b8 Mon Sep 17 00:00:00 2001 From: Kenneth Hoste Date: Wed, 8 Aug 2012 17:06:54 +0200 Subject: [PATCH 528/798] use os.path.join like one should --- easybuild/easyblocks/c/cp2k.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/easybuild/easyblocks/c/cp2k.py b/easybuild/easyblocks/c/cp2k.py index ecf52bf3e3..469666a9db 100644 --- a/easybuild/easyblocks/c/cp2k.py +++ b/easybuild/easyblocks/c/cp2k.py @@ -117,7 +117,7 @@ def configure(self): # libsmm support libsmm = get_software_root('libsmm') if libsmm: - libsmms = glob.glob(os.path.join(libsmm, 'lib') + '/libsmm_*nn.a') + libsmms = glob.glob(os.path.join(libsmm, 'lib', 'libsmm_*nn.a')) dfs = [os.path.basename(os.path.splitext(x)[0]).replace('lib', '-D__HAS_') for x in libsmms] moredflags = ' ' + ' '.join(dfs) self.updatecfg('extradflags', moredflags) From d950139daa1972c188b6dc05ad56faa11055ac0c Mon Sep 17 00:00:00 2001 From: Kenneth Hoste Date: Wed, 8 Aug 2012 17:06:04 +0200 Subject: [PATCH 529/798] fix comments in pull request, fix docstrings for ScaLAPACK --- easybuild/easyblocks/c/cp2k.py | 6 +++--- easybuild/easyblocks/g/gcc.py | 2 +- easybuild/easyblocks/s/scalapack.py | 7 ++++++- 3 files changed, 10 insertions(+), 5 deletions(-) diff --git a/easybuild/easyblocks/c/cp2k.py b/easybuild/easyblocks/c/cp2k.py index b83687d3ed..970a6e5d2e 100644 --- a/easybuild/easyblocks/c/cp2k.py +++ b/easybuild/easyblocks/c/cp2k.py @@ -438,9 +438,9 @@ def configureFFTW(self, options): fftw = get_software_root('FFTW') options.update({ - 'FFTW_INC': '%s/include' % fftw, # GCC - 'FFTW3INC': '%s/include' % fftw, # Intel - 'FFTW3LIB': '%s/lib' % fftw, # Intel + 'FFTW_INC': '%s/include' % fftw, # GCC + 'FFTW3INC': '%s/include' % fftw, # Intel + 'FFTW3LIB': '%s/lib' % fftw, # Intel }) options['DFLAGS'] += ' -D__FFTW3' diff --git a/easybuild/easyblocks/g/gcc.py b/easybuild/easyblocks/g/gcc.py index 8d5ca95441..8c8aa6f8f4 100644 --- a/easybuild/easyblocks/g/gcc.py +++ b/easybuild/easyblocks/g/gcc.py @@ -36,8 +36,8 @@ import easybuild.tools.environment as env from easybuild.framework.application import Application from easybuild.tools.filetools import run_cmd -from easybuild.tools.systemtools import get_kernel_name, get_shared_lib_ext, get_platform_name from easybuild.tools.modules import get_software_root +from easybuild.tools.systemtools import get_kernel_name, get_shared_lib_ext, get_platform_name class GCC(Application): diff --git a/easybuild/easyblocks/s/scalapack.py b/easybuild/easyblocks/s/scalapack.py index 005c69014c..7c8580ac10 100644 --- a/easybuild/easyblocks/s/scalapack.py +++ b/easybuild/easyblocks/s/scalapack.py @@ -40,9 +40,11 @@ class ScaLAPACK(Application): """ Support for building and installing ScaLAPACK, both versions 1.x and 2.x - - configure: copy SLmake.inc.example to SLmake.inc """ + def configure(self): + """Configure ScaLAPACK build by copying SLmake.inc.example to SLmake.inc and checking dependencies.""" + src = os.path.join(self.getcfg('startfrom'), 'SLmake.inc.example') dest = os.path.join(self.getcfg('startfrom'), 'SLmake.inc') @@ -69,6 +71,7 @@ def configure(self): self.log.error("Dependency %s not available/loaded." % dep) def make(self): + """Build ScaLAPACK using make after setting make options.""" # MPI compiler commands if os.getenv('MPICC') and os.getenv('MPIF77') and os.getenv('MPIF90'): @@ -140,6 +143,7 @@ def make(self): Application.make(self) def make_install(self): + """Install by copying files to install dir.""" src = os.path.join(self.getcfg('startfrom'), 'libscalapack.a') dest = os.path.join(self.installdir, 'lib') @@ -151,6 +155,7 @@ def make_install(self): self.log.error("Copying %s to installation dir %s failed: %s" % (src, dest, err)) def sanitycheck(self): + """Custom sanity check for ScaLAPACK.""" if not self.getcfg('sanityCheckPaths'): self.setcfg('sanityCheckPaths',{ From 1a367077bf0856b511820639cb2fde1ab220bda4 Mon Sep 17 00:00:00 2001 From: Kenneth Hoste Date: Wed, 8 Aug 2012 17:06:54 +0200 Subject: [PATCH 530/798] use os.path.join like one should --- easybuild/easyblocks/c/cp2k.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/easybuild/easyblocks/c/cp2k.py b/easybuild/easyblocks/c/cp2k.py index 970a6e5d2e..78a4d71d25 100644 --- a/easybuild/easyblocks/c/cp2k.py +++ b/easybuild/easyblocks/c/cp2k.py @@ -117,7 +117,7 @@ def configure(self): # libsmm support libsmm = get_software_root('libsmm') if libsmm: - libsmms = glob.glob(os.path.join(libsmm, 'lib') + '/libsmm_*nn.a') + libsmms = glob.glob(os.path.join(libsmm, 'lib', 'libsmm_*nn.a')) dfs = [os.path.basename(os.path.splitext(x)[0]).replace('lib', '-D__HAS_') for x in libsmms] moredflags = ' ' + ' '.join(dfs) self.updatecfg('extradflags', moredflags) From 69ec8ed3364ac1e028400011caeb0a635c709734 Mon Sep 17 00:00:00 2001 From: Toon Willems Date: Wed, 8 Aug 2012 17:26:15 +0200 Subject: [PATCH 531/798] check for contentless string --- easybuild/framework/application.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/easybuild/framework/application.py b/easybuild/framework/application.py index e97d2447a6..84a982e423 100644 --- a/easybuild/framework/application.py +++ b/easybuild/framework/application.py @@ -1089,7 +1089,9 @@ def make_devel_module(self): env_txt = "" for (key, val) in env.changes.items(): - if val: + # check if non-empty string + # TODO: add unset for empty vars? + if val.strip(): env_txt += mod_gen.setEnvironment(key, val) load_txt = "" From 50f96098977ae4fd3e218cdd3d48a0af5c13f363 Mon Sep 17 00:00:00 2001 From: Kenneth Hoste Date: Wed, 8 Aug 2012 21:26:55 +0200 Subject: [PATCH 532/798] fix initializing logger in build.py, name is required to avoid getting root logger back --- easybuild/build.py | 2 +- easybuild/tools/build_log.py | 3 +++ 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/easybuild/build.py b/easybuild/build.py index 79941ee1b0..1fe2ce197c 100644 --- a/easybuild/build.py +++ b/easybuild/build.py @@ -149,7 +149,7 @@ def main(): blocks = None ## Initialize logger - logFile, log, hn = initLogger(filename=logFile, debug=options.debug, typ=None) + logFile, log, hn = initLogger(filename=logFile, debug=options.debug, typ="build") ## Show version if options.version: diff --git a/easybuild/tools/build_log.py b/easybuild/tools/build_log.py index 70a04c7f53..61dd4c7f1a 100644 --- a/easybuild/tools/build_log.py +++ b/easybuild/tools/build_log.py @@ -117,6 +117,8 @@ def initLogger(name=None, version=None, debug=False, filename=None, typ='UNKNOWN - does not append - sets log handlers """ + + # obtain root logger log = logging.getLogger() # set log level @@ -135,6 +137,7 @@ def initLogger(name=None, version=None, debug=False, filename=None, typ='UNKNOWN hand.setFormatter(formatter) log.addHandler(hand) + # initialize our logger log = logging.getLogger(typ) log.setLevel(defaultLogLevel) From 6dd2872a6c9e5f3cc1dc425b61012904d660cbe2 Mon Sep 17 00:00:00 2001 From: Kenneth Hoste Date: Wed, 8 Aug 2012 21:26:55 +0200 Subject: [PATCH 533/798] fix initializing logger in build.py, name is required to avoid getting root logger back --- easybuild/build.py | 2 +- easybuild/tools/build_log.py | 3 +++ 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/easybuild/build.py b/easybuild/build.py index 2d53ad5991..7fe3878921 100644 --- a/easybuild/build.py +++ b/easybuild/build.py @@ -149,7 +149,7 @@ def main(): blocks = None ## Initialize logger - logFile, log, hn = initLogger(filename=logFile, debug=options.debug, typ=None) + logFile, log, hn = initLogger(filename=logFile, debug=options.debug, typ="build") ## Show version if options.version: diff --git a/easybuild/tools/build_log.py b/easybuild/tools/build_log.py index 70a04c7f53..61dd4c7f1a 100644 --- a/easybuild/tools/build_log.py +++ b/easybuild/tools/build_log.py @@ -117,6 +117,8 @@ def initLogger(name=None, version=None, debug=False, filename=None, typ='UNKNOWN - does not append - sets log handlers """ + + # obtain root logger log = logging.getLogger() # set log level @@ -135,6 +137,7 @@ def initLogger(name=None, version=None, debug=False, filename=None, typ='UNKNOWN hand.setFormatter(formatter) log.addHandler(hand) + # initialize our logger log = logging.getLogger(typ) log.setLevel(defaultLogLevel) From 038fd0876382afd7eb2379dcf4c26a46c3aa1ce2 Mon Sep 17 00:00:00 2001 From: Kenneth Hoste Date: Thu, 9 Aug 2012 08:18:39 +0200 Subject: [PATCH 534/798] fix string formatting for make opts --- easybuild/easyblocks/s/scalapack.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/easybuild/easyblocks/s/scalapack.py b/easybuild/easyblocks/s/scalapack.py index f275980fbd..5a68b7fc2b 100644 --- a/easybuild/easyblocks/s/scalapack.py +++ b/easybuild/easyblocks/s/scalapack.py @@ -112,9 +112,9 @@ def make(self): noopt += " -O0" if self.toolkit().opts['pic']: noopt += " -fPIC" - extra_makeopts += 'F77="%(f77)s"' % mpif77 - extra_makeopts += ' CC="%(cc)s"' % mpicc - extra_makeopts += ' NOOPT="%(noopt)s"' % noopt + extra_makeopts += 'F77="%s"' % mpif77 + extra_makeopts += ' CC="%s"' % mpicc + extra_makeopts += ' NOOPT="%s"' % noopt extra_makeopts += ' CCFLAGS="-O3" ' # set interface From 93fd34a8dadcc1b303fd814d8d00317622b63442 Mon Sep 17 00:00:00 2001 From: Kenneth Hoste Date: Thu, 9 Aug 2012 08:20:46 +0200 Subject: [PATCH 535/798] rename toolkit_comp_family() to comp_family() --- easybuild/easyblocks/b/boost.py | 4 ++-- easybuild/easyblocks/l/lapack.py | 7 ++++--- easybuild/easyblocks/s/scotch.py | 6 +++--- easybuild/tools/toolkit.py | 2 +- 4 files changed, 10 insertions(+), 9 deletions(-) diff --git a/easybuild/easyblocks/b/boost.py b/easybuild/easyblocks/b/boost.py index f19ac39cd0..c82fe8747c 100644 --- a/easybuild/easyblocks/b/boost.py +++ b/easybuild/easyblocks/b/boost.py @@ -54,9 +54,9 @@ def configure(self): # generate config depending on compiler used toolset = None - if self.toolkit().toolkit_comp_family() == toolkit.INTEL: + if self.toolkit().comp_family() == toolkit.INTEL: toolset = 'intel-linux' - elif self.toolkit().toolkit_comp_family() == toolkit.GCC: + elif self.toolkit().comp_family() == toolkit.GCC: toolset = 'gcc' else: self.log.error("Unknown compiler used, aborting.") diff --git a/easybuild/easyblocks/l/lapack.py b/easybuild/easyblocks/l/lapack.py index c2bae1fc1d..d0d9dde8e2 100644 --- a/easybuild/easyblocks/l/lapack.py +++ b/easybuild/easyblocks/l/lapack.py @@ -85,9 +85,9 @@ def configure(self): """ # copy make.inc file from examples - if self.toolkit().toolkit_comp_family() == toolkit.GCC: + if self.toolkit().comp_family() == toolkit.GCC: makeinc = 'gfortran' - elif self.toolkit().toolkit_comp_family() == toolkit.INTEL: + elif self.toolkit().comp_family() == toolkit.INTEL: makeinc = 'ifort' else: self.log.error("Don't know which make.inc file to pick, unknown compiler being used...") @@ -218,7 +218,8 @@ def sanitycheck(self): if not self.getcfg('test_only'): if not self.getcfg('sanityCheckPaths'): self.setcfg('sanityCheckPaths',{ - 'files': ["lib/%s" % x for x in ["liblapack.a", "libtmglib.a"]], + 'files': ["lib/%s" % x for x in ["liblapack.a", + "libtmglib.a"]], 'dirs': [] }) diff --git a/easybuild/easyblocks/s/scotch.py b/easybuild/easyblocks/s/scotch.py index 205e29a367..398dc09cca 100644 --- a/easybuild/easyblocks/s/scotch.py +++ b/easybuild/easyblocks/s/scotch.py @@ -34,9 +34,9 @@ class SCOTCH(Application): def configure(self): """Configure SCOTCH build: locate the correct makefile, and copy this to a general Makefile.inc""" - if self.toolkit().toolkit_comp_family() == toolkit.INTEL: + if self.toolkit().comp_family() == toolkit.INTEL: makefilename = 'Makefile.inc.x86-64_pc_linux2.icc' - elif self.toolkit().toolkit_comp_family() == toolkit.GCC: + elif self.toolkit().comp_family() == toolkit.GCC: makefilename = 'Makefile.inc.x86-64_pc_linux2' else: self.log.error("Don't know how to handle toolkit %s." % self.toolkit().name) @@ -80,7 +80,7 @@ def make(self): ccd = os.environ['MPICC'] cflags = "-fPIC -O3 -DCOMMON_FILE_COMPRESS_GZ -DCOMMON_PTHREAD -DCOMMON_RANDOM_FIXED_SEED -DSCOTCH_RENAME -DSCOTCH_PTHREAD" - if self.toolkit().toolkit_comp_family() == toolkit.GCC: + if self.toolkit().comp_family() == toolkit.GCC: cflags += " -Drestrict=__restrict" else: cflags = " -restrict -DIDXSIZE64" diff --git a/easybuild/tools/toolkit.py b/easybuild/tools/toolkit.py index b0a917071a..a44168f4f8 100644 --- a/easybuild/tools/toolkit.py +++ b/easybuild/tools/toolkit.py @@ -579,7 +579,7 @@ def prepareIMKL(self): scalapack_mt_libs = ["scalapack%s" % libsfxsl, "solver" % libsfx] + blas_mt_libs + ["blacs_intelmpi%s" % libsfx] # adjust lib subdir if GCC is used - if self.toolkit_comp_family() == GCC: + if self.comp_family() == GCC: for libs in [blas_libs, blas_mt_libs, scalapack_libs]: libs.replace('mkl_intel_lp64', 'mkl_gf_lp64') From 054cecde2f620bf77ee514e10df37a31f0b05b93 Mon Sep 17 00:00:00 2001 From: Kenneth Hoste Date: Thu, 9 Aug 2012 08:21:39 +0200 Subject: [PATCH 536/798] use toolkit constants and toolkit.mpi_type() for determining used MPI lib --- easybuild/easyblocks/b/blacs.py | 26 +++++++++++++------------- 1 file changed, 13 insertions(+), 13 deletions(-) diff --git a/easybuild/easyblocks/b/blacs.py b/easybuild/easyblocks/b/blacs.py index 3fb3d3944d..ffe3cb4e19 100644 --- a/easybuild/easyblocks/b/blacs.py +++ b/easybuild/easyblocks/b/blacs.py @@ -31,6 +31,7 @@ import os import shutil +import easybuild.tools.toolkit as toolkit from easybuild.framework.application import Application from easybuild.tools.filetools import run_cmd from easybuild.tools.modules import get_software_root @@ -78,22 +79,21 @@ def make(self): """Build BLACS using make, after figuring out the make options based on the heuristic tools available.""" # determine MPI base dir and lib - known_mpi_libs = { - 'OpenMPI': "-L$(MPILIBdir) -lmpi_f77", - 'MVAPICH2': "$(MPILIBdir)/libmpich.a $(MPILIBdir)/libfmpich.a " + \ - "$(MPILIBdir)/libmpl.a -lpthread" + known_mpis = { + toolkit.OPENMPI: "-L$(MPILIBdir) -lmpi_f77", + toolkit.MVAPICH2: "$(MPILIBdir)/libmpich.a $(MPILIBdir)/libfmpich.a " + \ + "$(MPILIBdir)/libmpl.a -lpthread" } + mpi_type = self.toolkit().mpi_type() + base, mpilib = None, None - for key, val in known_mpi_libs.items(): - root = get_software_root(key) - if root: - base = root - mpilib = val - break - - if not base or not mpilib: - self.log.error("Unknown MPI library used (known MPI libs: %s)" % known_mpi_libs.keys()) + if mpi_type in known_mpis.keys(): + base = get_software_root(mpi_type) + mpilib = known_mpis[mpi_type] + + else: + self.log.error("Unknown MPI lib %s used (known MPI libs: %s)" % (mpi_type, known_mpis.keys())) # common settings (for now) mpicc = 'mpicc' From f130ab25375f7b48d1941b5ebe9d18debb7ddb3e Mon Sep 17 00:00:00 2001 From: Kenneth Hoste Date: Thu, 9 Aug 2012 08:22:13 +0200 Subject: [PATCH 537/798] add newline at end of module file (EasyBuild version comment) --- easybuild/framework/application.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/easybuild/framework/application.py b/easybuild/framework/application.py index 3275eb861b..716289df8f 100644 --- a/easybuild/framework/application.py +++ b/easybuild/framework/application.py @@ -1084,7 +1084,7 @@ def make_module(self, fake=False): txt += self.make_module_extra() if self.getcfg('pkglist'): txt += self.make_module_extra_packages() - txt += '\n# built with EasyBuild version %s' % easybuild.VERBOSE_VERSION + txt += '# built with EasyBuild version %s\n' % easybuild.VERBOSE_VERSION try: f = open(self.moduleGenerator.filename, 'w') From c4adf1db833787bee78678e6c30ce43d6a7b062f Mon Sep 17 00:00:00 2001 From: Kenneth Hoste Date: Thu, 9 Aug 2012 08:22:30 +0200 Subject: [PATCH 538/798] drop superfluous import --- easybuild/tools/asyncprocess.py | 1 - 1 file changed, 1 deletion(-) diff --git a/easybuild/tools/asyncprocess.py b/easybuild/tools/asyncprocess.py index 327fe61f1f..960ebab698 100644 --- a/easybuild/tools/asyncprocess.py +++ b/easybuild/tools/asyncprocess.py @@ -57,7 +57,6 @@ import errno import os import subprocess -import sys import time PIPE = subprocess.PIPE From 8de6572e4b8a0202ac2538da7894ec953b302769 Mon Sep 17 00:00:00 2001 From: Toon Willems Date: Thu, 9 Aug 2012 09:32:55 +0200 Subject: [PATCH 539/798] add docstring with some more explanation --- easybuild/framework/application.py | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/easybuild/framework/application.py b/easybuild/framework/application.py index 84a982e423..f1efc1f2e1 100644 --- a/easybuild/framework/application.py +++ b/easybuild/framework/application.py @@ -1082,6 +1082,14 @@ def make_module(self, fake=False): return modpath def make_devel_module(self): + """ + Create a develop module file which sets environment based on the build + Usage: module load name, which loads the module you want to use. $SOFTDEVELNAME should then be the full path + to the devel module file. So now you can module load $SOFTDEVELNAME. + + WARNING: you cannot unload using $SOFTDEVELNAME (for now: use module unload `basename $SOFTDEVELNAME`) + + """ self.log.debug("loaded modules: %s" % Modules().loaded_modules()) mod_gen = ModuleGenerator(self) From 8b76d0806f1ce6a00cb12ead8fab744ba46c2d61 Mon Sep 17 00:00:00 2001 From: Toon Willems Date: Thu, 9 Aug 2012 09:40:10 +0200 Subject: [PATCH 540/798] fix filetools test --- easybuild/test/filetools.py | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/easybuild/test/filetools.py b/easybuild/test/filetools.py index 6aabffb953..10951c76f0 100644 --- a/easybuild/test/filetools.py +++ b/easybuild/test/filetools.py @@ -22,12 +22,15 @@ import re from unittest import TestCase, TestSuite - +import easybuild.tools.config as config import easybuild.tools.filetools as ft class FileToolsTest(TestCase): """ Testcase for filetools module """ + def setUp(self): + config.init('easybuild/easybuild_config.py') + def runTest(self): """ verify all the possible extract commands From 0ade98f773c48aeee66b1e3c4d60d92d3ce7df66 Mon Sep 17 00:00:00 2001 From: Toon Willems Date: Thu, 9 Aug 2012 10:07:11 +0200 Subject: [PATCH 541/798] function to aggregate results --- easybuild/test/build.py | 17 ++++++++++++----- 1 file changed, 12 insertions(+), 5 deletions(-) diff --git a/easybuild/test/build.py b/easybuild/test/build.py index e64b524c98..222cab6868 100644 --- a/easybuild/test/build.py +++ b/easybuild/test/build.py @@ -46,6 +46,7 @@ """ import copy +import glob import logging import platform import os @@ -170,7 +171,7 @@ def build_packages(packages, output_dir): instance = get_instance(pkg) apps.append(instance) except EasyBuildError, err: - test_results.append((spec, 'initialization', err)) + test_results.append((pkg['spec'], 'initialization', err)) base_dir = os.getcwd() @@ -302,9 +303,14 @@ def build_packages_in_parallel(packages, output_dir, script_dir): if len(with_dependencies) > 0: log.error("For some reason, you still have unresolved dependencies: %s" % with_dependencies) + output_file = os.path.join(output_dir, "easybuild-parallel-results.xml") + aggregate_xml_in_dirs(output_paths, output_file) - # capture xml output and generate a single one - # TODO: move into proper function (used 2 times) +def aggregate_xml_in_dirs(dirs, output_filename): + """ + finds all the xml files in the dirs and takes the testcase attribute out of them. + These are then put in a single output file + """ dom = xml.getDOMImplementation() root = dom.createDocument(None, "testsuite", None) properties = root.createElement("properties") @@ -320,7 +326,7 @@ def build_packages_in_parallel(packages, output_dir, script_dir): root.firstChild.appendChild(properties) - for dir in output_paths: + for dir in dirs: # take the first one (should be only one present) xml_file = glob.glob(os.path.join(dir, "*.xml"))[0] dom = xml.parse(xml_file) @@ -328,10 +334,11 @@ def build_packages_in_parallel(packages, output_dir, script_dir): testcase = dom.getElementsByTagName("testcase")[0] root.firstChild.appendChild(testcase) - output_file = open(os.path.join(output_dir, "easybuild-parallel-results.xml"), "w") + output_file = open(output_filename) root.writexml(output_file, addindent="\t", newl="\n") output_file.close() + def prepare_package(pkg): """ prepare for building """ try: From 0cdaf72fbdf3fbde6598e1a1b9e6271e3cc5c91b Mon Sep 17 00:00:00 2001 From: Toon Willems Date: Thu, 9 Aug 2012 10:15:19 +0200 Subject: [PATCH 542/798] remove empty lines + cleanup --- easybuild/framework/application.py | 3 +-- easybuild/tools/modules.py | 1 - 2 files changed, 1 insertion(+), 3 deletions(-) diff --git a/easybuild/framework/application.py b/easybuild/framework/application.py index f1efc1f2e1..c0a7499bae 100644 --- a/easybuild/framework/application.py +++ b/easybuild/framework/application.py @@ -1088,7 +1088,6 @@ def make_devel_module(self): to the devel module file. So now you can module load $SOFTDEVELNAME. WARNING: you cannot unload using $SOFTDEVELNAME (for now: use module unload `basename $SOFTDEVELNAME`) - """ self.log.debug("loaded modules: %s" % Modules().loaded_modules()) mod_gen = ModuleGenerator(self) @@ -1186,7 +1185,7 @@ def make_module_extra(self): """ txt = "\n" - ## SOFTROOT + SOFTVERSION + SOFTDEVEL + # SOFTROOT + SOFTVERSION + SOFTDEVEL environmentName = convertName(self.name(), upper=True) txt += self.moduleGenerator.setEnvironment("SOFTROOT" + environmentName, "$root") txt += self.moduleGenerator.setEnvironment("SOFTVERSION" + environmentName, self.version()) diff --git a/easybuild/tools/modules.py b/easybuild/tools/modules.py index 9d1ac0d849..1d8bb65edd 100644 --- a/easybuild/tools/modules.py +++ b/easybuild/tools/modules.py @@ -230,7 +230,6 @@ def loaded_modules(self): else: log.debug("No environment variable found to determine loaded modules, assuming no modules are loaded.") - # filter devel modules, since they cannot be split like this mods = [mod for mod in mods if not mod.endswith("easybuild-devel")] for mod in mods: From b76a137f6777134a82463a2fdc35d1e2c8809dad Mon Sep 17 00:00:00 2001 From: Toon Willems Date: Thu, 9 Aug 2012 10:21:35 +0200 Subject: [PATCH 543/798] convert name from camelCase to good_case --- easybuild/framework/application.py | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/easybuild/framework/application.py b/easybuild/framework/application.py index c0a7499bae..c0faa7bbd7 100644 --- a/easybuild/framework/application.py +++ b/easybuild/framework/application.py @@ -1186,12 +1186,12 @@ def make_module_extra(self): txt = "\n" # SOFTROOT + SOFTVERSION + SOFTDEVEL - environmentName = convertName(self.name(), upper=True) - txt += self.moduleGenerator.setEnvironment("SOFTROOT" + environmentName, "$root") - txt += self.moduleGenerator.setEnvironment("SOFTVERSION" + environmentName, self.version()) + environment_name = convertName(self.name(), upper=True) + txt += self.moduleGenerator.setEnvironment("SOFTROOT" + environment_name, "$root") + txt += self.moduleGenerator.setEnvironment("SOFTVERSION" + environment_name, self.version()) devel_path = os.path.join("$root", config.logPath(), "%s-%s-easybuild-devel" % (self.name(), self.installversion())) - txt += self.moduleGenerator.setEnvironment("SOFTDEVEL" + environmentName, devel_path) + txt += self.moduleGenerator.setEnvironment("SOFTDEVEL" + environment_name, devel_path) txt += "\n" for key, value in self.getcfg('modextravars').items(): From 298263523a201cdecfd065f453e38be7192125b7 Mon Sep 17 00:00:00 2001 From: Toon Willems Date: Thu, 9 Aug 2012 10:28:45 +0200 Subject: [PATCH 544/798] forgot one tk inside cp2k easyblock --- easybuild/easyblocks/c/cp2k.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/easybuild/easyblocks/c/cp2k.py b/easybuild/easyblocks/c/cp2k.py index 469666a9db..78a4d71d25 100644 --- a/easybuild/easyblocks/c/cp2k.py +++ b/easybuild/easyblocks/c/cp2k.py @@ -101,7 +101,7 @@ def configure(self): # set compilers options according to toolkit config # full debug: -g -traceback -check all -fp-stack-check # -g links to mpi debug libs - if self.tk.opts['debug']: + if self.toolkit().opts['debug']: self.debug = '-g' self.log.info("Debug build") if self.toolkit().opts['pic']: From 6c49506247cfb670093941f91b497016497c459f Mon Sep 17 00:00:00 2001 From: Toon Willems Date: Thu, 9 Aug 2012 10:31:55 +0200 Subject: [PATCH 545/798] self.tk no longer exists --- easybuild/easyblocks/p/pasha.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/easybuild/easyblocks/p/pasha.py b/easybuild/easyblocks/p/pasha.py index e127cb9678..e9406bef8f 100644 --- a/easybuild/easyblocks/p/pasha.py +++ b/easybuild/easyblocks/p/pasha.py @@ -40,7 +40,7 @@ def configure(self): self.log.error("TBB module not loaded.") self.updatecfg('makeopts', "TBB_DIR=%s/tbb MPI_DIR='' MPI_INC=''") - self.updatecfg('makeopts', "MPI_CXX=$MPICXX OPM_FLAG=%s" % (tbb, self.tk.get_openmp_flag())) + self.updatecfg('makeopts', "MPI_CXX=$MPICXX OPM_FLAG=%s" % (tbb, self.toolkit().get_openmp_flag())) self.updatecfg('makeopts', "MPI_LIB='' MY_CXX=$CXX MPICH_IGNORE_CXX_SEEK=1") def make_install(self): From 87c44dc6311160cdb851fac3d3082fb7818277fe Mon Sep 17 00:00:00 2001 From: Kenneth Hoste Date: Thu, 9 Aug 2012 11:00:35 +0200 Subject: [PATCH 546/798] change default log config to log to stderr instead of /dev/null fix logging issues by setting default log level for root logger as well rename some functions in toolkit.py (consistency) introduce toolkit_name() and toolkit_version() functions and use them --- easybuild/build.py | 4 ++-- easybuild/framework/application.py | 38 ++++++++++++++++++++++++------ easybuild/framework/easyblock.py | 23 +++++++++++++----- easybuild/test/toolkit.py | 16 ++++++------- easybuild/tools/build_log.py | 9 ++++--- easybuild/tools/toolkit.py | 8 +++---- 6 files changed, 68 insertions(+), 30 deletions(-) diff --git a/easybuild/build.py b/easybuild/build.py index 1fe2ce197c..e195080a3b 100644 --- a/easybuild/build.py +++ b/easybuild/build.py @@ -332,8 +332,8 @@ def processEasyconfig(path, log, onlyBlocks=None, regtest_online=False): log.debug("Adding dependency %s for app %s." % (dep, name)) package['dependencies'].append(dep) - if eb.toolkit().name != 'dummy': - dep = (eb.toolkit().name, eb.toolkit().version) + if eb.toolkit_name() != 'dummy': + dep = (eb.toolkit_name(), eb.toolkit_version()) log.debug("Adding toolkit %s as dependency for app %s." % (dep, name)) package['dependencies'].append(dep) diff --git a/easybuild/framework/application.py b/easybuild/framework/application.py index 716289df8f..602b791c3b 100644 --- a/easybuild/framework/application.py +++ b/easybuild/framework/application.py @@ -325,7 +325,7 @@ def ready2build(self): self.log.warning("Loaded modules detected: %s" % loadedmods) # Do all dependencies have a toolkit version - self.toolkit().addDependencies(self.cfg.dependencies()) + self.toolkit().add_dependencies(self.cfg.dependencies()) if not len(self.cfg.dependencies()) == len(self.toolkit().dependencies): self.log.debug("dep %s (%s)" % (len(self.cfg.dependencies()), self.cfg.dependencies())) self.log.debug("tk.dep %s (%s)" % (len(self.toolkit().dependencies), self.toolkit().dependencies)) @@ -956,10 +956,22 @@ def test(self): def toolkit(self): """ - The toolkit used to build this Application + Toolkit used to build this Application """ return self.cfg.toolkit() + def toolkit_name(self): + """ + Name of toolkit used to build this Application + """ + return self.cfg.toolkit_name() + + def toolkit_version(self): + """ + Version of toolkit used to build this Application + """ + return self.cfg.toolkit_version() + def make_install(self): """ Create the installation in correct location @@ -979,11 +991,11 @@ def make_builddir(self): if not self.build_in_installdir: # make a unique build dir ## if a tookitversion starts with a -, remove the - so prevent a -- in the path name - tkversion = self.toolkit().version + tkversion = self.toolkit_version() if tkversion.startswith('-'): tkversion = tkversion[1:] - extra = "%s%s-%s%s" % (self.getcfg('versionprefix'), self.toolkit().name, tkversion, self.getcfg('versionsuffix')) + extra = "%s%s-%s%s" % (self.getcfg('versionprefix'), self.toolkit_name(), tkversion, self.getcfg('versionsuffix')) localdir = os.path.join(buildPath(), self.name(), self.version(), extra) ald = os.path.abspath(localdir) @@ -1110,9 +1122,9 @@ def make_module_dep(self): load = unload = '' # Load toolkit - if self.toolkit().name != 'dummy': - load += self.moduleGenerator.loadModule(self.toolkit().name, self.toolkit().version) - unload += self.moduleGenerator.unloadModule(self.toolkit().name, self.toolkit().version) + if self.toolkit_name() != 'dummy': + load += self.moduleGenerator.loadModule(self.toolkit_name(), self.toolkit_version()) + unload += self.moduleGenerator.unloadModule(self.toolkit_name(), self.toolkit_version()) # Load dependencies builddeps = self.cfg.builddependencies() @@ -1615,6 +1627,18 @@ def toolkit(self): """ return self.master.toolkit() + def toolkit_name(self): + """ + Name of toolkit used to build this package + """ + return self.master.toolkit_name() + + def toolkit_version(self): + """ + Version of toolkit used to build this package + """ + return self.master.toolkit_version() + def sanitycheck(self): """ sanity check to run after installing diff --git a/easybuild/framework/easyblock.py b/easybuild/framework/easyblock.py index 51f67cbfa7..49f24f55bb 100644 --- a/easybuild/framework/easyblock.py +++ b/easybuild/framework/easyblock.py @@ -213,6 +213,18 @@ def builddependencies(self): return deps + def toolkit_name(self): + """ + Returns toolkit name. + """ + return self['toolkit']['name'] + + def toolkit_version(self): + """ + Returns toolkit name. + """ + return self['toolkit']['version'] + def toolkit(self): """ returns the Toolkit used @@ -220,10 +232,9 @@ def toolkit(self): if self._toolkit: return self._toolkit - tk = self['toolkit'] - tk = Toolkit(tk['name'], tk['version']) + tk = Toolkit(self.toolkit_name(), self.toolkit_version()) if self['toolkitopts']: - tk.setOptions(self['toolkitopts']) + tk.set_options(self['toolkitopts']) self._toolkit = tk return self._toolkit @@ -234,10 +245,10 @@ def installversion(self): """ prefix, suffix = self['versionprefix'], self['versionsuffix'] - if self.toolkit().name == 'dummy': + if self.toolkit_name() == 'dummy': name = "%s%s%s" % (prefix, self['version'], suffix) else: - extra = "%s-%s" % (self.toolkit().name, self.toolkit().version) + extra = "%s-%s" % (self.toolkit_name(), self.toolkit_version()) name = "%s%s-%s%s" % (prefix, self['version'], extra, suffix) return name @@ -312,7 +323,7 @@ def _parse_dependency(self, dep): self.log.error('Dependency without version.') if not 'tk' in dependency: - dependency['tk'] = self.toolkit().getDependencyVersion(dependency) + dependency['tk'] = self.toolkit().get_dependency_version(dependency) return dependency diff --git a/easybuild/test/toolkit.py b/easybuild/test/toolkit.py index c1f0575be3..563c35887d 100644 --- a/easybuild/test/toolkit.py +++ b/easybuild/test/toolkit.py @@ -86,26 +86,26 @@ def runTest(self): self.assertEqual(self.tk_64bit._toolkitExists(), False) - # Test getDependencyVersion + # Test get_dependency_version dep = {"name": "depname", "version":"1.0"} dep2 = {"name": "gzip", "dummy":"dummy"} - self.assertEqual("1.0-icc-4.0.3-32bit", self.tk_32bit.getDependencyVersion(dep)) - self.assertEqual('1.4', self.dummy_tk.getDependencyVersion(dep2)) + self.assertEqual("1.0-icc-4.0.3-32bit", self.tk_32bit.get_dependency_version(dep)) + self.assertEqual('1.4', self.dummy_tk.get_dependency_version(dep2)) - # test setOptions - self.dummy_tk.setOptions({'static':True, 'non-existing':False}) + # test set_options + self.dummy_tk.set_options({'static':True, 'non-existing':False}) self.assertEqual(self.dummy_tk.opts['static'], True) self.assertRaises(KeyError, lambda: self.dummy_tk.opts['non-existing']) - # test addDependencies + # test add_dependencies dep = {"name": 'gzip'} - self.tk_32bit.addDependencies([dep]) + self.tk_32bit.add_dependencies([dep]) self.assertEqual(len(self.tk_32bit.dependencies), 1) - self.assertRaises(EasyBuildError, self.tk_32bit.addDependencies, [{"name":"bzip"}]) + self.assertRaises(EasyBuildError, self.tk_32bit.add_dependencies, [{"name":"bzip"}]) # Test prepare self.assertRaises(EasyBuildError, self.tk_64bit.prepare) diff --git a/easybuild/tools/build_log.py b/easybuild/tools/build_log.py index 61dd4c7f1a..9f8e1bd30e 100644 --- a/easybuild/tools/build_log.py +++ b/easybuild/tools/build_log.py @@ -91,8 +91,8 @@ def exception(self, msg, *args): loggingFormat = EB_MSG_PREFIX + ' %(asctime)s %(name)s %(levelname)s %(message)s' formatter = logging.Formatter(loggingFormat) -# redirect standard handler of root logger to /dev/null -logging.basicConfig(level=logging.ERROR, format=loggingFormat, filename='/dev/null') +# redirect standard handler of root logger to stderr +logging.basicConfig(level=logging.ERROR, format=loggingFormat, stream=sys.stderr) logging.setLoggerClass(EasyBuildLog) @@ -121,12 +121,15 @@ def initLogger(name=None, version=None, debug=False, filename=None, typ='UNKNOWN # obtain root logger log = logging.getLogger() - # set log level + # determine log level if debug: defaultLogLevel = logging.DEBUG else: defaultLogLevel = logging.INFO + # set log level for root logger + log.setLevel(defaultLogLevel) + if (name and version) or filename: if not filename: filename = logFilename(name, version) diff --git a/easybuild/tools/toolkit.py b/easybuild/tools/toolkit.py index a44168f4f8..f3232425b9 100644 --- a/easybuild/tools/toolkit.py +++ b/easybuild/tools/toolkit.py @@ -91,7 +91,7 @@ def _toolkitExists(self, name=None, version=None): return Modules().exists(name, version) - def setOptions(self, options): + def set_options(self, options): """ Process toolkit options """ for opt in options.keys(): ## Only process supported opts @@ -100,7 +100,7 @@ def setOptions(self, options): else: self.log.warning("Undefined toolkit option %s specified." % opt) - def getDependencyVersion(self, dependency): + def get_dependency_version(self, dependency): """ Generate a version string for a dependency on a module using this toolkit """ # Add toolkit to version string toolkit = '' @@ -126,13 +126,13 @@ def getDependencyVersion(self, dependency): self.log.error('No toolkit version for dependency name %s (suffix %s) found' % (dependency['name'], "%s%s" % (toolkit, suffix))) - def addDependencies(self, dependencies): + def add_dependencies(self, dependencies): """ Verify if the given dependencies exist and add them """ mod = Modules() self.log.debug("Adding toolkit dependencies") for dep in dependencies: if not 'tk' in dep: - dep['tk'] = self.getDependencyVersion(dep) + dep['tk'] = self.get_dependency_version(dep) if not mod.exists(dep['name'], dep['tk']): self.log.error('No module found for dependency %s/%s' % (dep['name'], dep['tk'])) From 3c880b6de3863cd948503eeae5e30041e2f81a05 Mon Sep 17 00:00:00 2001 From: Kenneth Hoste Date: Thu, 9 Aug 2012 11:00:35 +0200 Subject: [PATCH 547/798] change default log config to log to stderr instead of /dev/null fix logging issues by setting default log level for root logger as well rename some functions in toolkit.py (consistency) introduce toolkit_name() and toolkit_version() functions and use them --- easybuild/build.py | 4 ++-- easybuild/framework/application.py | 38 ++++++++++++++++++++++++------ easybuild/framework/easyblock.py | 23 +++++++++++++----- easybuild/test/toolkit.py | 16 ++++++------- easybuild/tools/build_log.py | 9 ++++--- easybuild/tools/toolkit.py | 8 +++---- 6 files changed, 68 insertions(+), 30 deletions(-) diff --git a/easybuild/build.py b/easybuild/build.py index 7fe3878921..fc4fe93290 100644 --- a/easybuild/build.py +++ b/easybuild/build.py @@ -332,8 +332,8 @@ def processEasyconfig(path, log, onlyBlocks=None, regtest_online=False): log.debug("Adding dependency %s for app %s." % (dep, name)) package['dependencies'].append(dep) - if eb.toolkit().name != 'dummy': - dep = (eb.toolkit().name, eb.toolkit().version) + if eb.toolkit_name() != 'dummy': + dep = (eb.toolkit_name(), eb.toolkit_version()) log.debug("Adding toolkit %s as dependency for app %s." % (dep, name)) package['dependencies'].append(dep) diff --git a/easybuild/framework/application.py b/easybuild/framework/application.py index d349f9029a..df6bb2f94a 100644 --- a/easybuild/framework/application.py +++ b/easybuild/framework/application.py @@ -327,7 +327,7 @@ def ready2build(self): self.log.warning("Loaded modules detected: %s" % loadedmods) # Do all dependencies have a toolkit version - self.toolkit().addDependencies(self.cfg.dependencies()) + self.toolkit().add_dependencies(self.cfg.dependencies()) if not len(self.cfg.dependencies()) == len(self.toolkit().dependencies): self.log.debug("dep %s (%s)" % (len(self.cfg.dependencies()), self.cfg.dependencies())) self.log.debug("tk.dep %s (%s)" % (len(self.toolkit().dependencies), self.toolkit().dependencies)) @@ -948,10 +948,22 @@ def test(self): run_cmd(cmd, log_all=True, simple=True) def toolkit(self): """ - The toolkit used to build this Application + Toolkit used to build this Application """ return self.cfg.toolkit() + def toolkit_name(self): + """ + Name of toolkit used to build this Application + """ + return self.cfg.toolkit_name() + + def toolkit_version(self): + """ + Version of toolkit used to build this Application + """ + return self.cfg.toolkit_version() + def make_install(self): """ Create the installation in correct location @@ -967,11 +979,11 @@ def make_builddir(self): if not self.build_in_installdir: # make a unique build dir ## if a tookitversion starts with a -, remove the - so prevent a -- in the path name - tkversion = self.toolkit().version + tkversion = self.toolkit_version() if tkversion.startswith('-'): tkversion = tkversion[1:] - extra = "%s%s-%s%s" % (self.getcfg('versionprefix'), self.toolkit().name, tkversion, self.getcfg('versionsuffix')) + extra = "%s%s-%s%s" % (self.getcfg('versionprefix'), self.toolkit_name(), tkversion, self.getcfg('versionsuffix')) localdir = os.path.join(buildPath(), self.name(), self.version(), extra) ald = os.path.abspath(localdir) @@ -1098,9 +1110,9 @@ def make_module_dep(self): load = unload = '' # Load toolkit - if self.toolkit().name != 'dummy': - load += self.moduleGenerator.loadModule(self.toolkit().name, self.toolkit().version) - unload += self.moduleGenerator.unloadModule(self.toolkit().name, self.toolkit().version) + if self.toolkit_name() != 'dummy': + load += self.moduleGenerator.loadModule(self.toolkit_name(), self.toolkit_version()) + unload += self.moduleGenerator.unloadModule(self.toolkit_name(), self.toolkit_version()) # Load dependencies builddeps = self.cfg.builddependencies() @@ -1596,6 +1608,18 @@ def toolkit(self): """ return self.master.toolkit() + def toolkit_name(self): + """ + Name of toolkit used to build this package + """ + return self.master.toolkit_name() + + def toolkit_version(self): + """ + Version of toolkit used to build this package + """ + return self.master.toolkit_version() + def sanitycheck(self): """ sanity check to run after installing diff --git a/easybuild/framework/easyblock.py b/easybuild/framework/easyblock.py index 7249888808..3937176ea2 100644 --- a/easybuild/framework/easyblock.py +++ b/easybuild/framework/easyblock.py @@ -213,6 +213,18 @@ def builddependencies(self): return deps + def toolkit_name(self): + """ + Returns toolkit name. + """ + return self['toolkit']['name'] + + def toolkit_version(self): + """ + Returns toolkit name. + """ + return self['toolkit']['version'] + def toolkit(self): """ returns the Toolkit used @@ -220,10 +232,9 @@ def toolkit(self): if self._toolkit: return self._toolkit - tk = self['toolkit'] - tk = Toolkit(tk['name'], tk['version']) + tk = Toolkit(self.toolkit_name(), self.toolkit_version()) if self['toolkitopts']: - tk.setOptions(self['toolkitopts']) + tk.set_options(self['toolkitopts']) self._toolkit = tk return self._toolkit @@ -234,10 +245,10 @@ def installversion(self): """ prefix, suffix = self['versionprefix'], self['versionsuffix'] - if self.toolkit().name == 'dummy': + if self.toolkit_name() == 'dummy': name = "%s%s%s" % (prefix, self['version'], suffix) else: - extra = "%s-%s" % (self.toolkit().name, self.toolkit().version) + extra = "%s-%s" % (self.toolkit_name(), self.toolkit_version()) name = "%s%s-%s%s" % (prefix, self['version'], extra, suffix) return name @@ -312,7 +323,7 @@ def _parse_dependency(self, dep): self.log.error('Dependency without version.') if not 'tk' in dependency: - dependency['tk'] = self.toolkit().getDependencyVersion(dependency) + dependency['tk'] = self.toolkit().get_dependency_version(dependency) return dependency diff --git a/easybuild/test/toolkit.py b/easybuild/test/toolkit.py index c1f0575be3..563c35887d 100644 --- a/easybuild/test/toolkit.py +++ b/easybuild/test/toolkit.py @@ -86,26 +86,26 @@ def runTest(self): self.assertEqual(self.tk_64bit._toolkitExists(), False) - # Test getDependencyVersion + # Test get_dependency_version dep = {"name": "depname", "version":"1.0"} dep2 = {"name": "gzip", "dummy":"dummy"} - self.assertEqual("1.0-icc-4.0.3-32bit", self.tk_32bit.getDependencyVersion(dep)) - self.assertEqual('1.4', self.dummy_tk.getDependencyVersion(dep2)) + self.assertEqual("1.0-icc-4.0.3-32bit", self.tk_32bit.get_dependency_version(dep)) + self.assertEqual('1.4', self.dummy_tk.get_dependency_version(dep2)) - # test setOptions - self.dummy_tk.setOptions({'static':True, 'non-existing':False}) + # test set_options + self.dummy_tk.set_options({'static':True, 'non-existing':False}) self.assertEqual(self.dummy_tk.opts['static'], True) self.assertRaises(KeyError, lambda: self.dummy_tk.opts['non-existing']) - # test addDependencies + # test add_dependencies dep = {"name": 'gzip'} - self.tk_32bit.addDependencies([dep]) + self.tk_32bit.add_dependencies([dep]) self.assertEqual(len(self.tk_32bit.dependencies), 1) - self.assertRaises(EasyBuildError, self.tk_32bit.addDependencies, [{"name":"bzip"}]) + self.assertRaises(EasyBuildError, self.tk_32bit.add_dependencies, [{"name":"bzip"}]) # Test prepare self.assertRaises(EasyBuildError, self.tk_64bit.prepare) diff --git a/easybuild/tools/build_log.py b/easybuild/tools/build_log.py index 61dd4c7f1a..9f8e1bd30e 100644 --- a/easybuild/tools/build_log.py +++ b/easybuild/tools/build_log.py @@ -91,8 +91,8 @@ def exception(self, msg, *args): loggingFormat = EB_MSG_PREFIX + ' %(asctime)s %(name)s %(levelname)s %(message)s' formatter = logging.Formatter(loggingFormat) -# redirect standard handler of root logger to /dev/null -logging.basicConfig(level=logging.ERROR, format=loggingFormat, filename='/dev/null') +# redirect standard handler of root logger to stderr +logging.basicConfig(level=logging.ERROR, format=loggingFormat, stream=sys.stderr) logging.setLoggerClass(EasyBuildLog) @@ -121,12 +121,15 @@ def initLogger(name=None, version=None, debug=False, filename=None, typ='UNKNOWN # obtain root logger log = logging.getLogger() - # set log level + # determine log level if debug: defaultLogLevel = logging.DEBUG else: defaultLogLevel = logging.INFO + # set log level for root logger + log.setLevel(defaultLogLevel) + if (name and version) or filename: if not filename: filename = logFilename(name, version) diff --git a/easybuild/tools/toolkit.py b/easybuild/tools/toolkit.py index 6ecbaeb792..29e39a5266 100644 --- a/easybuild/tools/toolkit.py +++ b/easybuild/tools/toolkit.py @@ -91,7 +91,7 @@ def _toolkitExists(self, name=None, version=None): return Modules().exists(name, version) - def setOptions(self, options): + def set_options(self, options): """ Process toolkit options """ for opt in options.keys(): ## Only process supported opts @@ -100,7 +100,7 @@ def setOptions(self, options): else: self.log.warning("Undefined toolkit option %s specified." % opt) - def getDependencyVersion(self, dependency): + def get_dependency_version(self, dependency): """ Generate a version string for a dependency on a module using this toolkit """ # Add toolkit to version string toolkit = '' @@ -126,13 +126,13 @@ def getDependencyVersion(self, dependency): self.log.error('No toolkit version for dependency name %s (suffix %s) found' % (dependency['name'], "%s%s" % (toolkit, suffix))) - def addDependencies(self, dependencies): + def add_dependencies(self, dependencies): """ Verify if the given dependencies exist and add them """ mod = Modules() self.log.debug("Adding toolkit dependencies") for dep in dependencies: if not 'tk' in dep: - dep['tk'] = self.getDependencyVersion(dep) + dep['tk'] = self.get_dependency_version(dep) if not mod.exists(dep['name'], dep['tk']): self.log.error('No module found for dependency %s/%s' % (dep['name'], dep['tk'])) From 6c71d5a85914719bce38ca70d224623f5187db7c Mon Sep 17 00:00:00 2001 From: Kenneth Hoste Date: Thu, 9 Aug 2012 11:10:39 +0200 Subject: [PATCH 548/798] fix depth parameter when determining direct toolkit deps --- easybuild/tools/toolkit.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/easybuild/tools/toolkit.py b/easybuild/tools/toolkit.py index f3232425b9..d62b020984 100644 --- a/easybuild/tools/toolkit.py +++ b/easybuild/tools/toolkit.py @@ -170,7 +170,7 @@ def prepare(self, onlymod=None): modules.load() ## Determine direct toolkit dependencies, so we can prepare for them - self.toolkit_deps = modules.dependencies_for(self.name, self.version, depth=1) + self.toolkit_deps = modules.dependencies_for(self.name, self.version, depth=0) self.log.debug('List of direct toolkit dependencies: %s' % self.toolkit_deps) ## Generate the variables to be set From 1a76394f30b2a1af8a7f3c7b8b1625bab367e6ff Mon Sep 17 00:00:00 2001 From: Kenneth Hoste Date: Thu, 9 Aug 2012 11:10:39 +0200 Subject: [PATCH 549/798] fix depth parameter when determining direct toolkit deps --- easybuild/tools/toolkit.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/easybuild/tools/toolkit.py b/easybuild/tools/toolkit.py index 29e39a5266..eb5bc0d9e5 100644 --- a/easybuild/tools/toolkit.py +++ b/easybuild/tools/toolkit.py @@ -170,7 +170,7 @@ def prepare(self, onlymod=None): modules.load() ## Determine direct toolkit dependencies, so we can prepare for them - self.toolkit_deps = modules.dependencies_for(self.name, self.version, depth=1) + self.toolkit_deps = modules.dependencies_for(self.name, self.version, depth=0) self.log.debug('List of direct toolkit dependencies: %s' % self.toolkit_deps) ## Generate the variables to be set From b79570e8813d4e22b0f2d75f34800fd5dcaa547c Mon Sep 17 00:00:00 2001 From: Kenneth Hoste Date: Thu, 9 Aug 2012 11:13:19 +0200 Subject: [PATCH 550/798] rename loggingFormat to logging_format --- easybuild/tools/build_log.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/easybuild/tools/build_log.py b/easybuild/tools/build_log.py index 9f8e1bd30e..fbcc51ee3e 100644 --- a/easybuild/tools/build_log.py +++ b/easybuild/tools/build_log.py @@ -88,11 +88,11 @@ def exception(self, msg, *args): # set format for logger -loggingFormat = EB_MSG_PREFIX + ' %(asctime)s %(name)s %(levelname)s %(message)s' -formatter = logging.Formatter(loggingFormat) +logging_format = EB_MSG_PREFIX + ' %(asctime)s %(name)s %(levelname)s %(message)s' +formatter = logging.Formatter(logging_format) # redirect standard handler of root logger to stderr -logging.basicConfig(level=logging.ERROR, format=loggingFormat, stream=sys.stderr) +logging.basicConfig(level=logging.ERROR, format=logging_format, stream=sys.stderr) logging.setLoggerClass(EasyBuildLog) From 74e77e20b51c251fdee7b6eddb2aa208c824db54 Mon Sep 17 00:00:00 2001 From: Kenneth Hoste Date: Thu, 9 Aug 2012 11:13:19 +0200 Subject: [PATCH 551/798] rename loggingFormat to logging_format --- easybuild/tools/build_log.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/easybuild/tools/build_log.py b/easybuild/tools/build_log.py index 9f8e1bd30e..fbcc51ee3e 100644 --- a/easybuild/tools/build_log.py +++ b/easybuild/tools/build_log.py @@ -88,11 +88,11 @@ def exception(self, msg, *args): # set format for logger -loggingFormat = EB_MSG_PREFIX + ' %(asctime)s %(name)s %(levelname)s %(message)s' -formatter = logging.Formatter(loggingFormat) +logging_format = EB_MSG_PREFIX + ' %(asctime)s %(name)s %(levelname)s %(message)s' +formatter = logging.Formatter(logging_format) # redirect standard handler of root logger to stderr -logging.basicConfig(level=logging.ERROR, format=loggingFormat, stream=sys.stderr) +logging.basicConfig(level=logging.ERROR, format=logging_format, stream=sys.stderr) logging.setLoggerClass(EasyBuildLog) From 2eabc719f4b114fa20c21381f0ff680a06b73691 Mon Sep 17 00:00:00 2001 From: Kenneth Hoste Date: Thu, 9 Aug 2012 11:28:51 +0200 Subject: [PATCH 552/798] get rid of self.toolkit().name, not really needed --- easybuild/easyblocks/s/scotch.py | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/easybuild/easyblocks/s/scotch.py b/easybuild/easyblocks/s/scotch.py index 398dc09cca..08e57725c8 100644 --- a/easybuild/easyblocks/s/scotch.py +++ b/easybuild/easyblocks/s/scotch.py @@ -34,12 +34,13 @@ class SCOTCH(Application): def configure(self): """Configure SCOTCH build: locate the correct makefile, and copy this to a general Makefile.inc""" - if self.toolkit().comp_family() == toolkit.INTEL: + comp_fam = self.toolkit().comp_family() + if comp_fam == toolkit.INTEL: makefilename = 'Makefile.inc.x86-64_pc_linux2.icc' - elif self.toolkit().comp_family() == toolkit.GCC: + elif comp_fam == toolkit.GCC: makefilename = 'Makefile.inc.x86-64_pc_linux2' else: - self.log.error("Don't know how to handle toolkit %s." % self.toolkit().name) + self.log.error("Unknown compiler family used: %s" % comp_fam) # create Makefile.inc try: From d7e7ff54738300f4fdb7bc6e884784671f41ead3 Mon Sep 17 00:00:00 2001 From: Kenneth Hoste Date: Thu, 9 Aug 2012 11:36:18 +0200 Subject: [PATCH 553/798] fix BLACS and ScaLAPACK build: introduce gompi toolkit so that OpenMPI is a direct toolkit dependency, and adjust ATLAS, BLACS, FFTW, LAPACK, ScaLAPACK and goalf toolkit easyconfigs accordingly --- .../ATLAS-3.8.4-GCC-4.6.3-LAPACK-3.4.0.eb | 35 --------------- .../ATLAS-3.8.4-GCC-4.6.3-with-shared-libs.eb | 32 ------------- .../a/ATLAS/ATLAS-3.8.4-GCC-4.6.3.eb | 26 ----------- ...-3.8.4-gompi-1.1.0-no-OFED-LAPACK-3.4.0.eb | 35 +++++++++++++++ ....4-gompi-1.1.0-no-OFED-with-shared-libs.eb | 32 +++++++++++++ .../ATLAS/ATLAS-3.8.4-gompi-1.1.0-no-OFED.eb | 26 +++++++++++ .../BLACS/BLACS-1.1-GCC-4.6.3-MVAPICH-1.7.eb | 24 ---------- ...ACS-1.1-GCC-4.6.3-OpenMPI-1.4.5-no-OFED.eb | 25 ----------- .../b/BLACS/BLACS-1.1-gmvapich2-1.1.0.eb | 19 ++++++++ .../b/BLACS/BLACS-1.1-gompi-1.1.0-no-OFED.eb | 19 ++++++++ ...W-3.3.1-GCC-4.6.3-OpenMPI-1.4.5-no-OFED.eb | 26 ----------- .../f/FFTW/FFTW-3.3.1-gompi-1.1.0-no-OFED.eb | 19 ++++++++ .../f/FFTW/FFTW-3.3.1-ictce-4.0.6.eb | 25 ++++++----- .../g/gmvapich2/gmvapich2-1.1.0.eb | 25 +++++++++++ .../g/goalf/goalf-1.1.0-no-OFED.eb | 37 ++++++++------- .../g/gompi/gompi-1.1.0-no-OFED.eb | 27 +++++++++++ ...ACK-3.4.0-GCC-4.6.3-ATLAS-3.8.4-testing.eb | 31 ------------- .../LAPACK-3.4.0-GCC-4.6.3-ATLAS-3.8.4.eb | 24 ---------- .../l/LAPACK/LAPACK-3.4.0-GCC-4.6.3.eb | 13 ------ ...gompi-1.1.0-no-OFED-ATLAS-3.8.4-testing.eb | 33 ++++++++++++++ .../LAPACK-3.4.0-gompi-1.1.0-no-OFED.eb | 15 +++++++ ...K-3.4.0-gompi-no-OFED-1.1.0-ATLAS-3.8.4.eb | 26 +++++++++++ ...OFED-ATLAS-3.8.4-LAPACK-3.4.0-BLACS-1.1.eb | 45 ------------------- ...OFED-ATLAS-3.8.4-LAPACK-3.4.0-BLACS-1.1.eb | 37 +++++++++++++++ ...-1.4.5-no-OFED-ATLAS-3.8.4-LAPACK-3.4.0.eb | 40 ----------------- ...-1.1.0-no-OFED-ATLAS-3.8.4-LAPACK-3.4.0.eb | 32 +++++++++++++ 26 files changed, 378 insertions(+), 350 deletions(-) delete mode 100644 easybuild/easyconfigs/a/ATLAS/ATLAS-3.8.4-GCC-4.6.3-LAPACK-3.4.0.eb delete mode 100644 easybuild/easyconfigs/a/ATLAS/ATLAS-3.8.4-GCC-4.6.3-with-shared-libs.eb delete mode 100644 easybuild/easyconfigs/a/ATLAS/ATLAS-3.8.4-GCC-4.6.3.eb create mode 100644 easybuild/easyconfigs/a/ATLAS/ATLAS-3.8.4-gompi-1.1.0-no-OFED-LAPACK-3.4.0.eb create mode 100644 easybuild/easyconfigs/a/ATLAS/ATLAS-3.8.4-gompi-1.1.0-no-OFED-with-shared-libs.eb create mode 100644 easybuild/easyconfigs/a/ATLAS/ATLAS-3.8.4-gompi-1.1.0-no-OFED.eb delete mode 100644 easybuild/easyconfigs/b/BLACS/BLACS-1.1-GCC-4.6.3-MVAPICH-1.7.eb delete mode 100644 easybuild/easyconfigs/b/BLACS/BLACS-1.1-GCC-4.6.3-OpenMPI-1.4.5-no-OFED.eb create mode 100644 easybuild/easyconfigs/b/BLACS/BLACS-1.1-gmvapich2-1.1.0.eb create mode 100644 easybuild/easyconfigs/b/BLACS/BLACS-1.1-gompi-1.1.0-no-OFED.eb delete mode 100644 easybuild/easyconfigs/f/FFTW/FFTW-3.3.1-GCC-4.6.3-OpenMPI-1.4.5-no-OFED.eb create mode 100644 easybuild/easyconfigs/f/FFTW/FFTW-3.3.1-gompi-1.1.0-no-OFED.eb create mode 100644 easybuild/easyconfigs/g/gmvapich2/gmvapich2-1.1.0.eb create mode 100644 easybuild/easyconfigs/g/gompi/gompi-1.1.0-no-OFED.eb delete mode 100644 easybuild/easyconfigs/l/LAPACK/LAPACK-3.4.0-GCC-4.6.3-ATLAS-3.8.4-testing.eb delete mode 100644 easybuild/easyconfigs/l/LAPACK/LAPACK-3.4.0-GCC-4.6.3-ATLAS-3.8.4.eb delete mode 100644 easybuild/easyconfigs/l/LAPACK/LAPACK-3.4.0-GCC-4.6.3.eb create mode 100644 easybuild/easyconfigs/l/LAPACK/LAPACK-3.4.0-gompi-1.1.0-no-OFED-ATLAS-3.8.4-testing.eb create mode 100644 easybuild/easyconfigs/l/LAPACK/LAPACK-3.4.0-gompi-1.1.0-no-OFED.eb create mode 100644 easybuild/easyconfigs/l/LAPACK/LAPACK-3.4.0-gompi-no-OFED-1.1.0-ATLAS-3.8.4.eb delete mode 100644 easybuild/easyconfigs/s/ScaLAPACK/ScaLAPACK-1.8.0-GCC-4.6.3-OpenMPI-1.4.5-no-OFED-ATLAS-3.8.4-LAPACK-3.4.0-BLACS-1.1.eb create mode 100644 easybuild/easyconfigs/s/ScaLAPACK/ScaLAPACK-1.8.0-gompi-1.1.0-no-OFED-ATLAS-3.8.4-LAPACK-3.4.0-BLACS-1.1.eb delete mode 100644 easybuild/easyconfigs/s/ScaLAPACK/ScaLAPACK-2.0.1-GCC-4.6.3-OpenMPI-1.4.5-no-OFED-ATLAS-3.8.4-LAPACK-3.4.0.eb create mode 100644 easybuild/easyconfigs/s/ScaLAPACK/ScaLAPACK-2.0.1-gompi-1.1.0-no-OFED-ATLAS-3.8.4-LAPACK-3.4.0.eb diff --git a/easybuild/easyconfigs/a/ATLAS/ATLAS-3.8.4-GCC-4.6.3-LAPACK-3.4.0.eb b/easybuild/easyconfigs/a/ATLAS/ATLAS-3.8.4-GCC-4.6.3-LAPACK-3.4.0.eb deleted file mode 100644 index 69df07a7db..0000000000 --- a/easybuild/easyconfigs/a/ATLAS/ATLAS-3.8.4-GCC-4.6.3-LAPACK-3.4.0.eb +++ /dev/null @@ -1,35 +0,0 @@ -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' diff --git a/easybuild/easyconfigs/a/ATLAS/ATLAS-3.8.4-GCC-4.6.3-with-shared-libs.eb b/easybuild/easyconfigs/a/ATLAS/ATLAS-3.8.4-GCC-4.6.3-with-shared-libs.eb deleted file mode 100644 index f822eb551a..0000000000 --- a/easybuild/easyconfigs/a/ATLAS/ATLAS-3.8.4-GCC-4.6.3-with-shared-libs.eb +++ /dev/null @@ -1,32 +0,0 @@ -name='ATLAS' -version='3.8.4' -versionsuffix='-with-shared-libs' - -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')] - -patches=['ATLAS-3.8.4_illegal-instruction-fix.patch', - 'ATLAS-3.8.4_make-install-shared.patch' - ] - -## 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 - -## build shared libs -sharedlibs=True - -moduleclass='lib' diff --git a/easybuild/easyconfigs/a/ATLAS/ATLAS-3.8.4-GCC-4.6.3.eb b/easybuild/easyconfigs/a/ATLAS/ATLAS-3.8.4-GCC-4.6.3.eb deleted file mode 100644 index 7f0bb24b1e..0000000000 --- a/easybuild/easyconfigs/a/ATLAS/ATLAS-3.8.4-GCC-4.6.3.eb +++ /dev/null @@ -1,26 +0,0 @@ -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')] - -patches=['ATLAS-3.8.4_illegal-instruction-fix.patch'] - -## 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' diff --git a/easybuild/easyconfigs/a/ATLAS/ATLAS-3.8.4-gompi-1.1.0-no-OFED-LAPACK-3.4.0.eb b/easybuild/easyconfigs/a/ATLAS/ATLAS-3.8.4-gompi-1.1.0-no-OFED-LAPACK-3.4.0.eb new file mode 100644 index 0000000000..1cab1769c5 --- /dev/null +++ b/easybuild/easyconfigs/a/ATLAS/ATLAS-3.8.4-gompi-1.1.0-no-OFED-LAPACK-3.4.0.eb @@ -0,0 +1,35 @@ +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': 'gompi', 'version': '1.1.0-no-OFED'} +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' diff --git a/easybuild/easyconfigs/a/ATLAS/ATLAS-3.8.4-gompi-1.1.0-no-OFED-with-shared-libs.eb b/easybuild/easyconfigs/a/ATLAS/ATLAS-3.8.4-gompi-1.1.0-no-OFED-with-shared-libs.eb new file mode 100644 index 0000000000..a3b46af949 --- /dev/null +++ b/easybuild/easyconfigs/a/ATLAS/ATLAS-3.8.4-gompi-1.1.0-no-OFED-with-shared-libs.eb @@ -0,0 +1,32 @@ +name = 'ATLAS' +version = '3.8.4' +versionsuffix = '-with-shared-libs' + +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': 'gompi', 'version': '1.1.0-no-OFED'} +toolkitopts = {'pic': True} + +sources = ['%s%s.tar.bz2' % (name.lower(), version)] +sourceURLs = [('http://sourceforge.net/projects/math-atlas/files/Stable/%s' % version,'download')] + +patches = ['ATLAS-3.8.4_illegal-instruction-fix.patch', + 'ATLAS-3.8.4_make-install-shared.patch' + ] + +# 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 + +# build shared libs +sharedlibs = True + +moduleclass = 'lib' diff --git a/easybuild/easyconfigs/a/ATLAS/ATLAS-3.8.4-gompi-1.1.0-no-OFED.eb b/easybuild/easyconfigs/a/ATLAS/ATLAS-3.8.4-gompi-1.1.0-no-OFED.eb new file mode 100644 index 0000000000..6e3d75f281 --- /dev/null +++ b/easybuild/easyconfigs/a/ATLAS/ATLAS-3.8.4-gompi-1.1.0-no-OFED.eb @@ -0,0 +1,26 @@ +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': 'gompi', 'version': '1.1.0-no-OFED'} +toolkitopts = {'pic': True} + +sources = ['%s%s.tar.bz2' % (name.lower(), version)] +sourceURLs = [('http://sourceforge.net/projects/math-atlas/files/Stable/%s' % version, 'download')] + +patches = ['ATLAS-3.8.4_illegal-instruction-fix.patch'] + +# 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' diff --git a/easybuild/easyconfigs/b/BLACS/BLACS-1.1-GCC-4.6.3-MVAPICH-1.7.eb b/easybuild/easyconfigs/b/BLACS/BLACS-1.1-GCC-4.6.3-MVAPICH-1.7.eb deleted file mode 100644 index e1b59eb898..0000000000 --- a/easybuild/easyconfigs/b/BLACS/BLACS-1.1-GCC-4.6.3-MVAPICH-1.7.eb +++ /dev/null @@ -1,24 +0,0 @@ -name='BLACS' -version='1.1' - -homepage='http://www.netlib.org/blacs/' -description="""The BLACS (Basic Linear Algebra Communication Subprograms) project is an ongoing investigation whose purpose is to create a linear algebra oriented message passing interface that may be implemented efficiently and uniformly across a large range of distributed memory platforms.""" - -toolkit={'name':'GCC','version':'4.6.3'} - -mpilib='MVAPICH2' -mpilibver='1.7' -versionsuffix='-%s-%s'%(mpilib, mpilibver) - -sources=['mpiblacs.tgz', - 'mpiblacs-patch03.tgz'] -sourceURLs=[homepage] - -dependencies=[(mpilib, mpilibver)] - -patches=['bmake.mpi.patch'] - -## parallel build tends to fail -#parallel=1 - -moduleclass='lib' diff --git a/easybuild/easyconfigs/b/BLACS/BLACS-1.1-GCC-4.6.3-OpenMPI-1.4.5-no-OFED.eb b/easybuild/easyconfigs/b/BLACS/BLACS-1.1-GCC-4.6.3-OpenMPI-1.4.5-no-OFED.eb deleted file mode 100644 index 7267938bb6..0000000000 --- a/easybuild/easyconfigs/b/BLACS/BLACS-1.1-GCC-4.6.3-OpenMPI-1.4.5-no-OFED.eb +++ /dev/null @@ -1,25 +0,0 @@ -name='BLACS' -version='1.1' - -homepage='http://www.netlib.org/blacs/' -description="""The BLACS (Basic Linear Algebra Communication Subprograms) project is an ongoing investigation whose purpose is to create a linear algebra oriented message passing interface that may be implemented efficiently and uniformly across a large range of distributed memory platforms.""" - -toolkit={'name':'GCC','version':'4.6.3'} - -mpilib='OpenMPI' -mpilibver='1.4.5' -mpilibsfx='-no-OFED' -versionsuffix='-%s-%s%s'%(mpilib, mpilibver, mpilibsfx) - -sources=['mpiblacs.tgz', - 'mpiblacs-patch03.tgz'] -sourceURLs=[homepage] - -dependencies=[(mpilib, mpilibver, mpilibsfx)] - -patches=['bmake.mpi.patch'] - -## parallel build tends to fail -#parallel=1 - -moduleclass='lib' diff --git a/easybuild/easyconfigs/b/BLACS/BLACS-1.1-gmvapich2-1.1.0.eb b/easybuild/easyconfigs/b/BLACS/BLACS-1.1-gmvapich2-1.1.0.eb new file mode 100644 index 0000000000..7ebeda5bc6 --- /dev/null +++ b/easybuild/easyconfigs/b/BLACS/BLACS-1.1-gmvapich2-1.1.0.eb @@ -0,0 +1,19 @@ +name = 'BLACS' +version = '1.1' + +homepage = 'http://www.netlib.org/blacs/' +description = """The BLACS (Basic Linear Algebra Communication Subprograms) project is +an ongoing investigation whose purpose is to create a linear algebra oriented message passing interface +that may be implemented efficiently and uniformly across a large range of distributed memory platforms.""" + +toolkit = {'name': 'gmvapich2', 'version': '1.1.0'} + +sources = [ + 'mpiblacs.tgz', + 'mpiblacs-patch03.tgz' + ] +sourceURLs = [homepage] + +patches = ['bmake.mpi.patch'] + +moduleclass = 'lib' \ No newline at end of file diff --git a/easybuild/easyconfigs/b/BLACS/BLACS-1.1-gompi-1.1.0-no-OFED.eb b/easybuild/easyconfigs/b/BLACS/BLACS-1.1-gompi-1.1.0-no-OFED.eb new file mode 100644 index 0000000000..3200807b5e --- /dev/null +++ b/easybuild/easyconfigs/b/BLACS/BLACS-1.1-gompi-1.1.0-no-OFED.eb @@ -0,0 +1,19 @@ +name = 'BLACS' +version = '1.1' + +homepage = 'http://www.netlib.org/blacs/' +description = """The BLACS (Basic Linear Algebra Communication Subprograms) project is +an ongoing investigation whose purpose is to create a linear algebra oriented message passing interface +that may be implemented efficiently and uniformly across a large range of distributed memory platforms.""" + +toolkit = {'name': 'gompi', 'version': '1.1.0-no-OFED'} + +sources = [ + 'mpiblacs.tgz', + 'mpiblacs-patch03.tgz' + ] +sourceURLs = [homepage] + +patches = ['bmake.mpi.patch'] + +moduleclass = 'lib' diff --git a/easybuild/easyconfigs/f/FFTW/FFTW-3.3.1-GCC-4.6.3-OpenMPI-1.4.5-no-OFED.eb b/easybuild/easyconfigs/f/FFTW/FFTW-3.3.1-GCC-4.6.3-OpenMPI-1.4.5-no-OFED.eb deleted file mode 100644 index b96ee2d643..0000000000 --- a/easybuild/easyconfigs/f/FFTW/FFTW-3.3.1-GCC-4.6.3-OpenMPI-1.4.5-no-OFED.eb +++ /dev/null @@ -1,26 +0,0 @@ -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' diff --git a/easybuild/easyconfigs/f/FFTW/FFTW-3.3.1-gompi-1.1.0-no-OFED.eb b/easybuild/easyconfigs/f/FFTW/FFTW-3.3.1-gompi-1.1.0-no-OFED.eb new file mode 100644 index 0000000000..be142ef35b --- /dev/null +++ b/easybuild/easyconfigs/f/FFTW/FFTW-3.3.1-gompi-1.1.0-no-OFED.eb @@ -0,0 +1,19 @@ +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': 'gompi', 'version': '1.1.0-no-OFED'} +toolkitopts = {'optarch': True, 'pic': True} + +sources = ['%s-%s.tar.gz' % (name.lower(), version)] +sourceURLs = [homepage] + +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' diff --git a/easybuild/easyconfigs/f/FFTW/FFTW-3.3.1-ictce-4.0.6.eb b/easybuild/easyconfigs/f/FFTW/FFTW-3.3.1-ictce-4.0.6.eb index c97e4cece0..abff57710d 100644 --- a/easybuild/easyconfigs/f/FFTW/FFTW-3.3.1-ictce-4.0.6.eb +++ b/easybuild/easyconfigs/f/FFTW/FFTW-3.3.1-ictce-4.0.6.eb @@ -1,18 +1,19 @@ -name='FFTW' -version='3.3.1' +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" +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':'ictce','version':'4.0.6'} -toolkitopts={'optarch':True, 'pic':True} +toolkit = {'name': 'ictce', 'version': '4.0.6'} +toolkitopts = {'optarch': True, 'pic': True} -sources=['%s-%s.tar.gz'%(name.lower(),version)] -sourceURLs=[homepage] +sources = ['%s-%s.tar.gz' % (name.lower(), version)] +sourceURLs = [homepage] -configopts="--enable-sse2 " +configopts = "--enable-sse2" -## the MPI opts from FFTW2 are valid options but unused until FFTW3.3 -configopts+="--with-openmp --with-pic --enable-mpi " +# the MPI opts from FFTW2 are valid options but unused until FFTW3.3 +configopts += " --with-openmp --with-pic --enable-mpi" -moduleclass='lib' +moduleclass = 'lib' diff --git a/easybuild/easyconfigs/g/gmvapich2/gmvapich2-1.1.0.eb b/easybuild/easyconfigs/g/gmvapich2/gmvapich2-1.1.0.eb new file mode 100644 index 0000000000..87075c37b4 --- /dev/null +++ b/easybuild/easyconfigs/g/gmvapich2/gmvapich2-1.1.0.eb @@ -0,0 +1,25 @@ +easyblock = "Toolkit" + +name = 'gmvapich2' +version = '1.1.0' + +homepage = '(none)' +description = """GNU Compiler Collection (GCC) based compiler toolkit, +including MVAPICH2 for MPI support.""" + +toolkit = {'name':'dummy', 'version':'dummy'} + +compname = 'GCC' +compver = '4.6.3' +comp = '%s-%s' % (compname, compver) + +mpilib = 'MVAPICH2' +mpiver = '1.7' + +# compiler toolkit depencies +dependencies = [ + (compname, compver), + (mpilib, mpiver, '-%s' % comp) + ] + +moduleclass = 'compiler' diff --git a/easybuild/easyconfigs/g/goalf/goalf-1.1.0-no-OFED.eb b/easybuild/easyconfigs/g/goalf/goalf-1.1.0-no-OFED.eb index b67541e2ec..f7b85b0bb1 100644 --- a/easybuild/easyconfigs/g/goalf/goalf-1.1.0-no-OFED.eb +++ b/easybuild/easyconfigs/g/goalf/goalf-1.1.0-no-OFED.eb @@ -8,16 +8,11 @@ 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'} +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' -mpi = '%s-%s%s' % (mpilib, mpiver, mpisuff) +comp_name = 'GCC' +comp_version = '4.6.3' +comp = "%s-%s" % (comp_name, comp_version) blaslib = 'ATLAS' blasver = '3.8.4' @@ -29,14 +24,22 @@ lapack = '%s-%s' % (lapacklib, lapackver) blacsver = '1.1' -## compiler toolkit depencies -dependencies = [(compname, compver), - (mpilib, mpiver, '-%s%s' % (comp, mpisuff)), - (blaslib, blasver, '-%s-%s' % (comp, lapack)), - (lapacklib, lapackver, '-%s' % comp), - ('FFTW', '3.3.1', '-%s-%s' % (comp, mpi)), - ('BLACS', blacsver, '-%s-%s' % (comp, mpi)), - ('ScaLAPACK','1.8.0', '-%s-%s-%s-%s-BLACS-%s' % (comp, mpi, blas, lapack, blacsver)) +# toolkit used to build goalf dependencies +comp_mpi_tk_name = 'gompi' +comp_mpi_tk_ver = "%s%s" % (version, versionsuffix) +comp_mpi_tk = "%s-%s" % (comp_mpi_tk_name, comp_mpi_tk_ver) + +# compiler toolkit depencies +# we need GCC and OpenMPI as explicit dependencies instead of gompi toolkit +# because of toolkit preperation functions +dependencies = [ + ('GCC', '4.6.3'), # part of gompi-1.1.0 + ('OpenMPI', '1.4.5-%s%s' % (comp, versionsuffix)), # part of gompi-1.1.0 + (blaslib, blasver, '-%s-%s' % (comp_mpi_tk, lapack)), + (lapacklib, lapackver, "-%s" % comp_mpi_tk), + ('FFTW', '3.3.1', "-%s" % comp_mpi_tk), + ('BLACS', blacsver, "-%s" % comp_mpi_tk), + ('ScaLAPACK','1.8.0', '-%s-%s-%s-BLACS-%s' % (comp_mpi_tk, blas, lapack, blacsver)) ] moduleclass = 'compiler' diff --git a/easybuild/easyconfigs/g/gompi/gompi-1.1.0-no-OFED.eb b/easybuild/easyconfigs/g/gompi/gompi-1.1.0-no-OFED.eb new file mode 100644 index 0000000000..57d2733ac6 --- /dev/null +++ b/easybuild/easyconfigs/g/gompi/gompi-1.1.0-no-OFED.eb @@ -0,0 +1,27 @@ +easyblock = "Toolkit" + +name = 'gompi' +version = '1.1.0' +versionsuffix = '-no-OFED' + +homepage = '(none)' +description = """GNU Compiler Collection (GCC) based compiler toolkit, +including OpenMPI for MPI support.""" + +toolkit = {'name':'dummy', 'version':'dummy'} + +compname = 'GCC' +compver = '4.6.3' +comp = '%s-%s' % (compname, compver) + +mpilib = 'OpenMPI' +mpiver = '1.4.5' +mpisuff = versionsuffix + +# compiler toolkit depencies +dependencies = [ + (compname, compver), + (mpilib, mpiver, '-%s%s' % (comp, mpisuff)) + ] + +moduleclass = 'compiler' diff --git a/easybuild/easyconfigs/l/LAPACK/LAPACK-3.4.0-GCC-4.6.3-ATLAS-3.8.4-testing.eb b/easybuild/easyconfigs/l/LAPACK/LAPACK-3.4.0-GCC-4.6.3-ATLAS-3.8.4-testing.eb deleted file mode 100644 index 18aa4a3681..0000000000 --- a/easybuild/easyconfigs/l/LAPACK/LAPACK-3.4.0-GCC-4.6.3-ATLAS-3.8.4-testing.eb +++ /dev/null @@ -1,31 +0,0 @@ -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] - -blaslib='ATLAS' -blasver='3.8.4' -suff = '-%s-%s' % (name, version) - -dependencies=[(blaslib, blasver, suff)] -versionsuffix='-%s-%s' % (blaslib, blasver) - -## set extra versionsuffix just to enforce testing -## otherwise, EasyBuild will do nothing (unless forced), -## because the module should be already there -dependencies+=[(name, version)] -versionsuffix+='-testing' - -test_only=True - -## disable parallel build, otherwise tests will run in parallel and not complete -parallel=1 - -moduleclass='lib' diff --git a/easybuild/easyconfigs/l/LAPACK/LAPACK-3.4.0-GCC-4.6.3-ATLAS-3.8.4.eb b/easybuild/easyconfigs/l/LAPACK/LAPACK-3.4.0-GCC-4.6.3-ATLAS-3.8.4.eb deleted file mode 100644 index 08bb583c23..0000000000 --- a/easybuild/easyconfigs/l/LAPACK/LAPACK-3.4.0-GCC-4.6.3-ATLAS-3.8.4.eb +++ /dev/null @@ -1,24 +0,0 @@ -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] - -blaslib='ATLAS' -blasver='3.8.4' - -dependencies=[(blaslib, blasver)] -versionsuffix='-%s-%s' % (blaslib, blasver) - -supply_blas=True - -## disable parallel build, otherwise tests will run in parallel and not complete -parallel=1 - -moduleclass='lib' diff --git a/easybuild/easyconfigs/l/LAPACK/LAPACK-3.4.0-GCC-4.6.3.eb b/easybuild/easyconfigs/l/LAPACK/LAPACK-3.4.0-GCC-4.6.3.eb deleted file mode 100644 index bbef275f6d..0000000000 --- a/easybuild/easyconfigs/l/LAPACK/LAPACK-3.4.0-GCC-4.6.3.eb +++ /dev/null @@ -1,13 +0,0 @@ -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' diff --git a/easybuild/easyconfigs/l/LAPACK/LAPACK-3.4.0-gompi-1.1.0-no-OFED-ATLAS-3.8.4-testing.eb b/easybuild/easyconfigs/l/LAPACK/LAPACK-3.4.0-gompi-1.1.0-no-OFED-ATLAS-3.8.4-testing.eb new file mode 100644 index 0000000000..b7a186cd4e --- /dev/null +++ b/easybuild/easyconfigs/l/LAPACK/LAPACK-3.4.0-gompi-1.1.0-no-OFED-ATLAS-3.8.4-testing.eb @@ -0,0 +1,33 @@ +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': 'gompi', 'version': '1.1.0-no-OFED'} +toolkitopts = {'pic': True} + +sources = ['%s-%s.tgz' % (name.lower(), version)] +sourceURLs = [homepage] + +blaslib = 'ATLAS' +blasver = '3.8.4' +suff = '-%s-%s' % (name, version) + +dependencies = [(blaslib, blasver, suff)] +versionsuffix = '-%s-%s' % (blaslib, blasver) + +# set extra versionsuffix just to enforce testing +# otherwise, EasyBuild will do nothing (unless forced), +# because the module should be already there +dependencies += [(name, version)] +versionsuffix += '-testing' + +test_only = True + +# disable parallel build, otherwise tests will run in parallel and not complete +parallel = 1 + +moduleclass = 'lib' diff --git a/easybuild/easyconfigs/l/LAPACK/LAPACK-3.4.0-gompi-1.1.0-no-OFED.eb b/easybuild/easyconfigs/l/LAPACK/LAPACK-3.4.0-gompi-1.1.0-no-OFED.eb new file mode 100644 index 0000000000..a335e1e4b6 --- /dev/null +++ b/easybuild/easyconfigs/l/LAPACK/LAPACK-3.4.0-gompi-1.1.0-no-OFED.eb @@ -0,0 +1,15 @@ +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': 'gompi', 'version': '1.1.0-no-OFED'} +toolkitopts = {'pic': True} + +sources = ['%s-%s.tgz' % (name.lower(), version)] +sourceURLs = [homepage] + +moduleclass = 'lib' diff --git a/easybuild/easyconfigs/l/LAPACK/LAPACK-3.4.0-gompi-no-OFED-1.1.0-ATLAS-3.8.4.eb b/easybuild/easyconfigs/l/LAPACK/LAPACK-3.4.0-gompi-no-OFED-1.1.0-ATLAS-3.8.4.eb new file mode 100644 index 0000000000..38a7af10a6 --- /dev/null +++ b/easybuild/easyconfigs/l/LAPACK/LAPACK-3.4.0-gompi-no-OFED-1.1.0-ATLAS-3.8.4.eb @@ -0,0 +1,26 @@ +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': 'gompi', 'version': '1.1.0-no-OFED'} +toolkitopts = {'pic': True} + +sources = ['%s-%s.tgz' % (name.lower(), version)] +sourceURLs = [homepage] + +blaslib = 'ATLAS' +blasver = '3.8.4' + +dependencies = [(blaslib, blasver)] +versionsuffix = '-%s-%s' % (blaslib, blasver) + +supply_blas = True + +# disable parallel build, otherwise tests will run in parallel and not complete +parallel = 1 + +moduleclass = 'lib' diff --git a/easybuild/easyconfigs/s/ScaLAPACK/ScaLAPACK-1.8.0-GCC-4.6.3-OpenMPI-1.4.5-no-OFED-ATLAS-3.8.4-LAPACK-3.4.0-BLACS-1.1.eb b/easybuild/easyconfigs/s/ScaLAPACK/ScaLAPACK-1.8.0-GCC-4.6.3-OpenMPI-1.4.5-no-OFED-ATLAS-3.8.4-LAPACK-3.4.0-BLACS-1.1.eb deleted file mode 100644 index 01f65a142a..0000000000 --- a/easybuild/easyconfigs/s/ScaLAPACK/ScaLAPACK-1.8.0-GCC-4.6.3-OpenMPI-1.4.5-no-OFED-ATLAS-3.8.4-LAPACK-3.4.0-BLACS-1.1.eb +++ /dev/null @@ -1,45 +0,0 @@ -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' -mpi="-%s-%s%s"%(mpilib, mpiver, mpisuff) - -blaslib='ATLAS' -blasver='3.8.4' -blas="-%s-%s"%(blaslib, blasver) - -lapacklib='LAPACK' -lapackver='3.4.0' -lapack="-%s-%s"%(lapacklib, lapackver) - -blacslib='BLACS' -blacsver='1.1' -blacs="-%s-%s"%(blacslib, blacsver) - -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' diff --git a/easybuild/easyconfigs/s/ScaLAPACK/ScaLAPACK-1.8.0-gompi-1.1.0-no-OFED-ATLAS-3.8.4-LAPACK-3.4.0-BLACS-1.1.eb b/easybuild/easyconfigs/s/ScaLAPACK/ScaLAPACK-1.8.0-gompi-1.1.0-no-OFED-ATLAS-3.8.4-LAPACK-3.4.0-BLACS-1.1.eb new file mode 100644 index 0000000000..5ed8f371f1 --- /dev/null +++ b/easybuild/easyconfigs/s/ScaLAPACK/ScaLAPACK-1.8.0-gompi-1.1.0-no-OFED-ATLAS-3.8.4-LAPACK-3.4.0-BLACS-1.1.eb @@ -0,0 +1,37 @@ +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.""" + +toolkit = {'name': 'gompi', 'version': '1.1.0-no-OFED'} +toolkitopts = {'pic': True} + +sources = ['%s-%s.tgz' % (name.lower(), version)] +sourceURLs = [homepage] + +blaslib = 'ATLAS' +blasver = '3.8.4' +blas = "-%s-%s" % (blaslib, blasver) + +lapacklib = 'LAPACK' +lapackver = '3.4.0' +lapack = "-%s-%s" % (lapacklib, lapackver) + +blacslib = 'BLACS' +blacsver = '1.1' +blacs = "-%s-%s" % (blacslib, blacsver) + +versionsuffix = "%s%s%s" % (blas, lapack, blacs) + +dependencies = [ + (blaslib, blasver, lapack), + (lapacklib, lapackver), + (blacslib, blacsver) + ] + +## parallel build tends to fail, so disabling it +parallel = 1 + +moduleclass = 'lib' diff --git a/easybuild/easyconfigs/s/ScaLAPACK/ScaLAPACK-2.0.1-GCC-4.6.3-OpenMPI-1.4.5-no-OFED-ATLAS-3.8.4-LAPACK-3.4.0.eb b/easybuild/easyconfigs/s/ScaLAPACK/ScaLAPACK-2.0.1-GCC-4.6.3-OpenMPI-1.4.5-no-OFED-ATLAS-3.8.4-LAPACK-3.4.0.eb deleted file mode 100644 index 6b522a6810..0000000000 --- a/easybuild/easyconfigs/s/ScaLAPACK/ScaLAPACK-2.0.1-GCC-4.6.3-OpenMPI-1.4.5-no-OFED-ATLAS-3.8.4-LAPACK-3.4.0.eb +++ /dev/null @@ -1,40 +0,0 @@ -name='ScaLAPACK' -version='2.0.1' - -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' -mpi="-%s-%s%s"%(mpilib, mpiver, mpisuff) - -blaslib='ATLAS' -blasver='3.8.4' -blas="-%s-%s"%(blaslib, blasver) - -lapacklib='LAPACK' -lapackver='3.4.0' -lapack="-%s-%s"%(lapacklib, lapackver) - -versionsuffix="%s%s%s"%(mpi, blas, lapack) - -dependencies=[(mpilib, mpiver, mpisuff), - (blaslib, blasver, lapack), - (lapacklib, lapackver) - ] - -## parallel build tends to fail, so disabling it -parallel=1 - -moduleclass='lib' diff --git a/easybuild/easyconfigs/s/ScaLAPACK/ScaLAPACK-2.0.1-gompi-1.1.0-no-OFED-ATLAS-3.8.4-LAPACK-3.4.0.eb b/easybuild/easyconfigs/s/ScaLAPACK/ScaLAPACK-2.0.1-gompi-1.1.0-no-OFED-ATLAS-3.8.4-LAPACK-3.4.0.eb new file mode 100644 index 0000000000..bdd59cc38b --- /dev/null +++ b/easybuild/easyconfigs/s/ScaLAPACK/ScaLAPACK-2.0.1-gompi-1.1.0-no-OFED-ATLAS-3.8.4-LAPACK-3.4.0.eb @@ -0,0 +1,32 @@ +name = 'ScaLAPACK' +version = '2.0.1' + +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.""" + +toolkit = {'name': 'gompi', 'version': '1.1.0-no-OFED'} +toolkitopts = {'pic': True} + +sources = ['%s-%s.tgz' % (name.lower(), version)] +sourceURLs = [homepage] + +blaslib = 'ATLAS' +blasver = '3.8.4' +blas = "-%s-%s" % (blaslib, blasver) + +lapacklib = 'LAPACK' +lapackver = '3.4.0' +lapack = "-%s-%s" % (lapacklib, lapackver) + +versionsuffix = "%s%s" % (blas, lapack) + +dependencies = [ + (blaslib, blasver, lapack), + (lapacklib, lapackver) + ] + +## parallel build tends to fail, so disabling it +parallel = 1 + +moduleclass = 'lib' From 25decce1bea5ac320d87e436096c4e0403d4d567 Mon Sep 17 00:00:00 2001 From: Kenneth Hoste Date: Thu, 9 Aug 2012 11:36:18 +0200 Subject: [PATCH 554/798] fix BLACS and ScaLAPACK build: introduce gompi toolkit so that OpenMPI is a direct toolkit dependency, and adjust ATLAS, BLACS, FFTW, LAPACK, ScaLAPACK and goalf toolkit easyconfigs accordingly --- .../ATLAS-3.8.4-GCC-4.6.3-LAPACK-3.4.0.eb | 35 --------------- .../ATLAS-3.8.4-GCC-4.6.3-with-shared-libs.eb | 32 ------------- .../a/ATLAS/ATLAS-3.8.4-GCC-4.6.3.eb | 26 ----------- ...-3.8.4-gompi-1.1.0-no-OFED-LAPACK-3.4.0.eb | 35 +++++++++++++++ ....4-gompi-1.1.0-no-OFED-with-shared-libs.eb | 32 +++++++++++++ .../ATLAS/ATLAS-3.8.4-gompi-1.1.0-no-OFED.eb | 26 +++++++++++ .../BLACS/BLACS-1.1-GCC-4.6.3-MVAPICH-1.7.eb | 24 ---------- ...ACS-1.1-GCC-4.6.3-OpenMPI-1.4.5-no-OFED.eb | 25 ----------- .../b/BLACS/BLACS-1.1-gmvapich2-1.1.0.eb | 19 ++++++++ .../b/BLACS/BLACS-1.1-gompi-1.1.0-no-OFED.eb | 19 ++++++++ ...W-3.3.1-GCC-4.6.3-OpenMPI-1.4.5-no-OFED.eb | 26 ----------- .../f/FFTW/FFTW-3.3.1-gompi-1.1.0-no-OFED.eb | 19 ++++++++ .../f/FFTW/FFTW-3.3.1-ictce-4.0.6.eb | 25 ++++++----- .../g/gmvapich2/gmvapich2-1.1.0.eb | 25 +++++++++++ .../g/goalf/goalf-1.1.0-no-OFED.eb | 37 ++++++++------- .../g/gompi/gompi-1.1.0-no-OFED.eb | 27 +++++++++++ ...ACK-3.4.0-GCC-4.6.3-ATLAS-3.8.4-testing.eb | 31 ------------- .../LAPACK-3.4.0-GCC-4.6.3-ATLAS-3.8.4.eb | 24 ---------- .../l/LAPACK/LAPACK-3.4.0-GCC-4.6.3.eb | 13 ------ ...gompi-1.1.0-no-OFED-ATLAS-3.8.4-testing.eb | 33 ++++++++++++++ .../LAPACK-3.4.0-gompi-1.1.0-no-OFED.eb | 15 +++++++ ...K-3.4.0-gompi-no-OFED-1.1.0-ATLAS-3.8.4.eb | 26 +++++++++++ ...OFED-ATLAS-3.8.4-LAPACK-3.4.0-BLACS-1.1.eb | 45 ------------------- ...OFED-ATLAS-3.8.4-LAPACK-3.4.0-BLACS-1.1.eb | 37 +++++++++++++++ ...-1.4.5-no-OFED-ATLAS-3.8.4-LAPACK-3.4.0.eb | 40 ----------------- ...-1.1.0-no-OFED-ATLAS-3.8.4-LAPACK-3.4.0.eb | 32 +++++++++++++ 26 files changed, 378 insertions(+), 350 deletions(-) delete mode 100644 easybuild/easyconfigs/a/ATLAS/ATLAS-3.8.4-GCC-4.6.3-LAPACK-3.4.0.eb delete mode 100644 easybuild/easyconfigs/a/ATLAS/ATLAS-3.8.4-GCC-4.6.3-with-shared-libs.eb delete mode 100644 easybuild/easyconfigs/a/ATLAS/ATLAS-3.8.4-GCC-4.6.3.eb create mode 100644 easybuild/easyconfigs/a/ATLAS/ATLAS-3.8.4-gompi-1.1.0-no-OFED-LAPACK-3.4.0.eb create mode 100644 easybuild/easyconfigs/a/ATLAS/ATLAS-3.8.4-gompi-1.1.0-no-OFED-with-shared-libs.eb create mode 100644 easybuild/easyconfigs/a/ATLAS/ATLAS-3.8.4-gompi-1.1.0-no-OFED.eb delete mode 100644 easybuild/easyconfigs/b/BLACS/BLACS-1.1-GCC-4.6.3-MVAPICH-1.7.eb delete mode 100644 easybuild/easyconfigs/b/BLACS/BLACS-1.1-GCC-4.6.3-OpenMPI-1.4.5-no-OFED.eb create mode 100644 easybuild/easyconfigs/b/BLACS/BLACS-1.1-gmvapich2-1.1.0.eb create mode 100644 easybuild/easyconfigs/b/BLACS/BLACS-1.1-gompi-1.1.0-no-OFED.eb delete mode 100644 easybuild/easyconfigs/f/FFTW/FFTW-3.3.1-GCC-4.6.3-OpenMPI-1.4.5-no-OFED.eb create mode 100644 easybuild/easyconfigs/f/FFTW/FFTW-3.3.1-gompi-1.1.0-no-OFED.eb create mode 100644 easybuild/easyconfigs/g/gmvapich2/gmvapich2-1.1.0.eb create mode 100644 easybuild/easyconfigs/g/gompi/gompi-1.1.0-no-OFED.eb delete mode 100644 easybuild/easyconfigs/l/LAPACK/LAPACK-3.4.0-GCC-4.6.3-ATLAS-3.8.4-testing.eb delete mode 100644 easybuild/easyconfigs/l/LAPACK/LAPACK-3.4.0-GCC-4.6.3-ATLAS-3.8.4.eb delete mode 100644 easybuild/easyconfigs/l/LAPACK/LAPACK-3.4.0-GCC-4.6.3.eb create mode 100644 easybuild/easyconfigs/l/LAPACK/LAPACK-3.4.0-gompi-1.1.0-no-OFED-ATLAS-3.8.4-testing.eb create mode 100644 easybuild/easyconfigs/l/LAPACK/LAPACK-3.4.0-gompi-1.1.0-no-OFED.eb create mode 100644 easybuild/easyconfigs/l/LAPACK/LAPACK-3.4.0-gompi-no-OFED-1.1.0-ATLAS-3.8.4.eb delete mode 100644 easybuild/easyconfigs/s/ScaLAPACK/ScaLAPACK-1.8.0-GCC-4.6.3-OpenMPI-1.4.5-no-OFED-ATLAS-3.8.4-LAPACK-3.4.0-BLACS-1.1.eb create mode 100644 easybuild/easyconfigs/s/ScaLAPACK/ScaLAPACK-1.8.0-gompi-1.1.0-no-OFED-ATLAS-3.8.4-LAPACK-3.4.0-BLACS-1.1.eb delete mode 100644 easybuild/easyconfigs/s/ScaLAPACK/ScaLAPACK-2.0.1-GCC-4.6.3-OpenMPI-1.4.5-no-OFED-ATLAS-3.8.4-LAPACK-3.4.0.eb create mode 100644 easybuild/easyconfigs/s/ScaLAPACK/ScaLAPACK-2.0.1-gompi-1.1.0-no-OFED-ATLAS-3.8.4-LAPACK-3.4.0.eb diff --git a/easybuild/easyconfigs/a/ATLAS/ATLAS-3.8.4-GCC-4.6.3-LAPACK-3.4.0.eb b/easybuild/easyconfigs/a/ATLAS/ATLAS-3.8.4-GCC-4.6.3-LAPACK-3.4.0.eb deleted file mode 100644 index 69df07a7db..0000000000 --- a/easybuild/easyconfigs/a/ATLAS/ATLAS-3.8.4-GCC-4.6.3-LAPACK-3.4.0.eb +++ /dev/null @@ -1,35 +0,0 @@ -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' diff --git a/easybuild/easyconfigs/a/ATLAS/ATLAS-3.8.4-GCC-4.6.3-with-shared-libs.eb b/easybuild/easyconfigs/a/ATLAS/ATLAS-3.8.4-GCC-4.6.3-with-shared-libs.eb deleted file mode 100644 index f822eb551a..0000000000 --- a/easybuild/easyconfigs/a/ATLAS/ATLAS-3.8.4-GCC-4.6.3-with-shared-libs.eb +++ /dev/null @@ -1,32 +0,0 @@ -name='ATLAS' -version='3.8.4' -versionsuffix='-with-shared-libs' - -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')] - -patches=['ATLAS-3.8.4_illegal-instruction-fix.patch', - 'ATLAS-3.8.4_make-install-shared.patch' - ] - -## 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 - -## build shared libs -sharedlibs=True - -moduleclass='lib' diff --git a/easybuild/easyconfigs/a/ATLAS/ATLAS-3.8.4-GCC-4.6.3.eb b/easybuild/easyconfigs/a/ATLAS/ATLAS-3.8.4-GCC-4.6.3.eb deleted file mode 100644 index 7f0bb24b1e..0000000000 --- a/easybuild/easyconfigs/a/ATLAS/ATLAS-3.8.4-GCC-4.6.3.eb +++ /dev/null @@ -1,26 +0,0 @@ -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')] - -patches=['ATLAS-3.8.4_illegal-instruction-fix.patch'] - -## 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' diff --git a/easybuild/easyconfigs/a/ATLAS/ATLAS-3.8.4-gompi-1.1.0-no-OFED-LAPACK-3.4.0.eb b/easybuild/easyconfigs/a/ATLAS/ATLAS-3.8.4-gompi-1.1.0-no-OFED-LAPACK-3.4.0.eb new file mode 100644 index 0000000000..1cab1769c5 --- /dev/null +++ b/easybuild/easyconfigs/a/ATLAS/ATLAS-3.8.4-gompi-1.1.0-no-OFED-LAPACK-3.4.0.eb @@ -0,0 +1,35 @@ +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': 'gompi', 'version': '1.1.0-no-OFED'} +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' diff --git a/easybuild/easyconfigs/a/ATLAS/ATLAS-3.8.4-gompi-1.1.0-no-OFED-with-shared-libs.eb b/easybuild/easyconfigs/a/ATLAS/ATLAS-3.8.4-gompi-1.1.0-no-OFED-with-shared-libs.eb new file mode 100644 index 0000000000..a3b46af949 --- /dev/null +++ b/easybuild/easyconfigs/a/ATLAS/ATLAS-3.8.4-gompi-1.1.0-no-OFED-with-shared-libs.eb @@ -0,0 +1,32 @@ +name = 'ATLAS' +version = '3.8.4' +versionsuffix = '-with-shared-libs' + +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': 'gompi', 'version': '1.1.0-no-OFED'} +toolkitopts = {'pic': True} + +sources = ['%s%s.tar.bz2' % (name.lower(), version)] +sourceURLs = [('http://sourceforge.net/projects/math-atlas/files/Stable/%s' % version,'download')] + +patches = ['ATLAS-3.8.4_illegal-instruction-fix.patch', + 'ATLAS-3.8.4_make-install-shared.patch' + ] + +# 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 + +# build shared libs +sharedlibs = True + +moduleclass = 'lib' diff --git a/easybuild/easyconfigs/a/ATLAS/ATLAS-3.8.4-gompi-1.1.0-no-OFED.eb b/easybuild/easyconfigs/a/ATLAS/ATLAS-3.8.4-gompi-1.1.0-no-OFED.eb new file mode 100644 index 0000000000..6e3d75f281 --- /dev/null +++ b/easybuild/easyconfigs/a/ATLAS/ATLAS-3.8.4-gompi-1.1.0-no-OFED.eb @@ -0,0 +1,26 @@ +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': 'gompi', 'version': '1.1.0-no-OFED'} +toolkitopts = {'pic': True} + +sources = ['%s%s.tar.bz2' % (name.lower(), version)] +sourceURLs = [('http://sourceforge.net/projects/math-atlas/files/Stable/%s' % version, 'download')] + +patches = ['ATLAS-3.8.4_illegal-instruction-fix.patch'] + +# 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' diff --git a/easybuild/easyconfigs/b/BLACS/BLACS-1.1-GCC-4.6.3-MVAPICH-1.7.eb b/easybuild/easyconfigs/b/BLACS/BLACS-1.1-GCC-4.6.3-MVAPICH-1.7.eb deleted file mode 100644 index e1b59eb898..0000000000 --- a/easybuild/easyconfigs/b/BLACS/BLACS-1.1-GCC-4.6.3-MVAPICH-1.7.eb +++ /dev/null @@ -1,24 +0,0 @@ -name='BLACS' -version='1.1' - -homepage='http://www.netlib.org/blacs/' -description="""The BLACS (Basic Linear Algebra Communication Subprograms) project is an ongoing investigation whose purpose is to create a linear algebra oriented message passing interface that may be implemented efficiently and uniformly across a large range of distributed memory platforms.""" - -toolkit={'name':'GCC','version':'4.6.3'} - -mpilib='MVAPICH2' -mpilibver='1.7' -versionsuffix='-%s-%s'%(mpilib, mpilibver) - -sources=['mpiblacs.tgz', - 'mpiblacs-patch03.tgz'] -sourceURLs=[homepage] - -dependencies=[(mpilib, mpilibver)] - -patches=['bmake.mpi.patch'] - -## parallel build tends to fail -#parallel=1 - -moduleclass='lib' diff --git a/easybuild/easyconfigs/b/BLACS/BLACS-1.1-GCC-4.6.3-OpenMPI-1.4.5-no-OFED.eb b/easybuild/easyconfigs/b/BLACS/BLACS-1.1-GCC-4.6.3-OpenMPI-1.4.5-no-OFED.eb deleted file mode 100644 index 7267938bb6..0000000000 --- a/easybuild/easyconfigs/b/BLACS/BLACS-1.1-GCC-4.6.3-OpenMPI-1.4.5-no-OFED.eb +++ /dev/null @@ -1,25 +0,0 @@ -name='BLACS' -version='1.1' - -homepage='http://www.netlib.org/blacs/' -description="""The BLACS (Basic Linear Algebra Communication Subprograms) project is an ongoing investigation whose purpose is to create a linear algebra oriented message passing interface that may be implemented efficiently and uniformly across a large range of distributed memory platforms.""" - -toolkit={'name':'GCC','version':'4.6.3'} - -mpilib='OpenMPI' -mpilibver='1.4.5' -mpilibsfx='-no-OFED' -versionsuffix='-%s-%s%s'%(mpilib, mpilibver, mpilibsfx) - -sources=['mpiblacs.tgz', - 'mpiblacs-patch03.tgz'] -sourceURLs=[homepage] - -dependencies=[(mpilib, mpilibver, mpilibsfx)] - -patches=['bmake.mpi.patch'] - -## parallel build tends to fail -#parallel=1 - -moduleclass='lib' diff --git a/easybuild/easyconfigs/b/BLACS/BLACS-1.1-gmvapich2-1.1.0.eb b/easybuild/easyconfigs/b/BLACS/BLACS-1.1-gmvapich2-1.1.0.eb new file mode 100644 index 0000000000..7ebeda5bc6 --- /dev/null +++ b/easybuild/easyconfigs/b/BLACS/BLACS-1.1-gmvapich2-1.1.0.eb @@ -0,0 +1,19 @@ +name = 'BLACS' +version = '1.1' + +homepage = 'http://www.netlib.org/blacs/' +description = """The BLACS (Basic Linear Algebra Communication Subprograms) project is +an ongoing investigation whose purpose is to create a linear algebra oriented message passing interface +that may be implemented efficiently and uniformly across a large range of distributed memory platforms.""" + +toolkit = {'name': 'gmvapich2', 'version': '1.1.0'} + +sources = [ + 'mpiblacs.tgz', + 'mpiblacs-patch03.tgz' + ] +sourceURLs = [homepage] + +patches = ['bmake.mpi.patch'] + +moduleclass = 'lib' \ No newline at end of file diff --git a/easybuild/easyconfigs/b/BLACS/BLACS-1.1-gompi-1.1.0-no-OFED.eb b/easybuild/easyconfigs/b/BLACS/BLACS-1.1-gompi-1.1.0-no-OFED.eb new file mode 100644 index 0000000000..3200807b5e --- /dev/null +++ b/easybuild/easyconfigs/b/BLACS/BLACS-1.1-gompi-1.1.0-no-OFED.eb @@ -0,0 +1,19 @@ +name = 'BLACS' +version = '1.1' + +homepage = 'http://www.netlib.org/blacs/' +description = """The BLACS (Basic Linear Algebra Communication Subprograms) project is +an ongoing investigation whose purpose is to create a linear algebra oriented message passing interface +that may be implemented efficiently and uniformly across a large range of distributed memory platforms.""" + +toolkit = {'name': 'gompi', 'version': '1.1.0-no-OFED'} + +sources = [ + 'mpiblacs.tgz', + 'mpiblacs-patch03.tgz' + ] +sourceURLs = [homepage] + +patches = ['bmake.mpi.patch'] + +moduleclass = 'lib' diff --git a/easybuild/easyconfigs/f/FFTW/FFTW-3.3.1-GCC-4.6.3-OpenMPI-1.4.5-no-OFED.eb b/easybuild/easyconfigs/f/FFTW/FFTW-3.3.1-GCC-4.6.3-OpenMPI-1.4.5-no-OFED.eb deleted file mode 100644 index b96ee2d643..0000000000 --- a/easybuild/easyconfigs/f/FFTW/FFTW-3.3.1-GCC-4.6.3-OpenMPI-1.4.5-no-OFED.eb +++ /dev/null @@ -1,26 +0,0 @@ -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' diff --git a/easybuild/easyconfigs/f/FFTW/FFTW-3.3.1-gompi-1.1.0-no-OFED.eb b/easybuild/easyconfigs/f/FFTW/FFTW-3.3.1-gompi-1.1.0-no-OFED.eb new file mode 100644 index 0000000000..be142ef35b --- /dev/null +++ b/easybuild/easyconfigs/f/FFTW/FFTW-3.3.1-gompi-1.1.0-no-OFED.eb @@ -0,0 +1,19 @@ +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': 'gompi', 'version': '1.1.0-no-OFED'} +toolkitopts = {'optarch': True, 'pic': True} + +sources = ['%s-%s.tar.gz' % (name.lower(), version)] +sourceURLs = [homepage] + +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' diff --git a/easybuild/easyconfigs/f/FFTW/FFTW-3.3.1-ictce-4.0.6.eb b/easybuild/easyconfigs/f/FFTW/FFTW-3.3.1-ictce-4.0.6.eb index c97e4cece0..abff57710d 100644 --- a/easybuild/easyconfigs/f/FFTW/FFTW-3.3.1-ictce-4.0.6.eb +++ b/easybuild/easyconfigs/f/FFTW/FFTW-3.3.1-ictce-4.0.6.eb @@ -1,18 +1,19 @@ -name='FFTW' -version='3.3.1' +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" +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':'ictce','version':'4.0.6'} -toolkitopts={'optarch':True, 'pic':True} +toolkit = {'name': 'ictce', 'version': '4.0.6'} +toolkitopts = {'optarch': True, 'pic': True} -sources=['%s-%s.tar.gz'%(name.lower(),version)] -sourceURLs=[homepage] +sources = ['%s-%s.tar.gz' % (name.lower(), version)] +sourceURLs = [homepage] -configopts="--enable-sse2 " +configopts = "--enable-sse2" -## the MPI opts from FFTW2 are valid options but unused until FFTW3.3 -configopts+="--with-openmp --with-pic --enable-mpi " +# the MPI opts from FFTW2 are valid options but unused until FFTW3.3 +configopts += " --with-openmp --with-pic --enable-mpi" -moduleclass='lib' +moduleclass = 'lib' diff --git a/easybuild/easyconfigs/g/gmvapich2/gmvapich2-1.1.0.eb b/easybuild/easyconfigs/g/gmvapich2/gmvapich2-1.1.0.eb new file mode 100644 index 0000000000..87075c37b4 --- /dev/null +++ b/easybuild/easyconfigs/g/gmvapich2/gmvapich2-1.1.0.eb @@ -0,0 +1,25 @@ +easyblock = "Toolkit" + +name = 'gmvapich2' +version = '1.1.0' + +homepage = '(none)' +description = """GNU Compiler Collection (GCC) based compiler toolkit, +including MVAPICH2 for MPI support.""" + +toolkit = {'name':'dummy', 'version':'dummy'} + +compname = 'GCC' +compver = '4.6.3' +comp = '%s-%s' % (compname, compver) + +mpilib = 'MVAPICH2' +mpiver = '1.7' + +# compiler toolkit depencies +dependencies = [ + (compname, compver), + (mpilib, mpiver, '-%s' % comp) + ] + +moduleclass = 'compiler' diff --git a/easybuild/easyconfigs/g/goalf/goalf-1.1.0-no-OFED.eb b/easybuild/easyconfigs/g/goalf/goalf-1.1.0-no-OFED.eb index b67541e2ec..f7b85b0bb1 100644 --- a/easybuild/easyconfigs/g/goalf/goalf-1.1.0-no-OFED.eb +++ b/easybuild/easyconfigs/g/goalf/goalf-1.1.0-no-OFED.eb @@ -8,16 +8,11 @@ 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'} +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' -mpi = '%s-%s%s' % (mpilib, mpiver, mpisuff) +comp_name = 'GCC' +comp_version = '4.6.3' +comp = "%s-%s" % (comp_name, comp_version) blaslib = 'ATLAS' blasver = '3.8.4' @@ -29,14 +24,22 @@ lapack = '%s-%s' % (lapacklib, lapackver) blacsver = '1.1' -## compiler toolkit depencies -dependencies = [(compname, compver), - (mpilib, mpiver, '-%s%s' % (comp, mpisuff)), - (blaslib, blasver, '-%s-%s' % (comp, lapack)), - (lapacklib, lapackver, '-%s' % comp), - ('FFTW', '3.3.1', '-%s-%s' % (comp, mpi)), - ('BLACS', blacsver, '-%s-%s' % (comp, mpi)), - ('ScaLAPACK','1.8.0', '-%s-%s-%s-%s-BLACS-%s' % (comp, mpi, blas, lapack, blacsver)) +# toolkit used to build goalf dependencies +comp_mpi_tk_name = 'gompi' +comp_mpi_tk_ver = "%s%s" % (version, versionsuffix) +comp_mpi_tk = "%s-%s" % (comp_mpi_tk_name, comp_mpi_tk_ver) + +# compiler toolkit depencies +# we need GCC and OpenMPI as explicit dependencies instead of gompi toolkit +# because of toolkit preperation functions +dependencies = [ + ('GCC', '4.6.3'), # part of gompi-1.1.0 + ('OpenMPI', '1.4.5-%s%s' % (comp, versionsuffix)), # part of gompi-1.1.0 + (blaslib, blasver, '-%s-%s' % (comp_mpi_tk, lapack)), + (lapacklib, lapackver, "-%s" % comp_mpi_tk), + ('FFTW', '3.3.1', "-%s" % comp_mpi_tk), + ('BLACS', blacsver, "-%s" % comp_mpi_tk), + ('ScaLAPACK','1.8.0', '-%s-%s-%s-BLACS-%s' % (comp_mpi_tk, blas, lapack, blacsver)) ] moduleclass = 'compiler' diff --git a/easybuild/easyconfigs/g/gompi/gompi-1.1.0-no-OFED.eb b/easybuild/easyconfigs/g/gompi/gompi-1.1.0-no-OFED.eb new file mode 100644 index 0000000000..57d2733ac6 --- /dev/null +++ b/easybuild/easyconfigs/g/gompi/gompi-1.1.0-no-OFED.eb @@ -0,0 +1,27 @@ +easyblock = "Toolkit" + +name = 'gompi' +version = '1.1.0' +versionsuffix = '-no-OFED' + +homepage = '(none)' +description = """GNU Compiler Collection (GCC) based compiler toolkit, +including OpenMPI for MPI support.""" + +toolkit = {'name':'dummy', 'version':'dummy'} + +compname = 'GCC' +compver = '4.6.3' +comp = '%s-%s' % (compname, compver) + +mpilib = 'OpenMPI' +mpiver = '1.4.5' +mpisuff = versionsuffix + +# compiler toolkit depencies +dependencies = [ + (compname, compver), + (mpilib, mpiver, '-%s%s' % (comp, mpisuff)) + ] + +moduleclass = 'compiler' diff --git a/easybuild/easyconfigs/l/LAPACK/LAPACK-3.4.0-GCC-4.6.3-ATLAS-3.8.4-testing.eb b/easybuild/easyconfigs/l/LAPACK/LAPACK-3.4.0-GCC-4.6.3-ATLAS-3.8.4-testing.eb deleted file mode 100644 index 18aa4a3681..0000000000 --- a/easybuild/easyconfigs/l/LAPACK/LAPACK-3.4.0-GCC-4.6.3-ATLAS-3.8.4-testing.eb +++ /dev/null @@ -1,31 +0,0 @@ -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] - -blaslib='ATLAS' -blasver='3.8.4' -suff = '-%s-%s' % (name, version) - -dependencies=[(blaslib, blasver, suff)] -versionsuffix='-%s-%s' % (blaslib, blasver) - -## set extra versionsuffix just to enforce testing -## otherwise, EasyBuild will do nothing (unless forced), -## because the module should be already there -dependencies+=[(name, version)] -versionsuffix+='-testing' - -test_only=True - -## disable parallel build, otherwise tests will run in parallel and not complete -parallel=1 - -moduleclass='lib' diff --git a/easybuild/easyconfigs/l/LAPACK/LAPACK-3.4.0-GCC-4.6.3-ATLAS-3.8.4.eb b/easybuild/easyconfigs/l/LAPACK/LAPACK-3.4.0-GCC-4.6.3-ATLAS-3.8.4.eb deleted file mode 100644 index 08bb583c23..0000000000 --- a/easybuild/easyconfigs/l/LAPACK/LAPACK-3.4.0-GCC-4.6.3-ATLAS-3.8.4.eb +++ /dev/null @@ -1,24 +0,0 @@ -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] - -blaslib='ATLAS' -blasver='3.8.4' - -dependencies=[(blaslib, blasver)] -versionsuffix='-%s-%s' % (blaslib, blasver) - -supply_blas=True - -## disable parallel build, otherwise tests will run in parallel and not complete -parallel=1 - -moduleclass='lib' diff --git a/easybuild/easyconfigs/l/LAPACK/LAPACK-3.4.0-GCC-4.6.3.eb b/easybuild/easyconfigs/l/LAPACK/LAPACK-3.4.0-GCC-4.6.3.eb deleted file mode 100644 index bbef275f6d..0000000000 --- a/easybuild/easyconfigs/l/LAPACK/LAPACK-3.4.0-GCC-4.6.3.eb +++ /dev/null @@ -1,13 +0,0 @@ -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' diff --git a/easybuild/easyconfigs/l/LAPACK/LAPACK-3.4.0-gompi-1.1.0-no-OFED-ATLAS-3.8.4-testing.eb b/easybuild/easyconfigs/l/LAPACK/LAPACK-3.4.0-gompi-1.1.0-no-OFED-ATLAS-3.8.4-testing.eb new file mode 100644 index 0000000000..b7a186cd4e --- /dev/null +++ b/easybuild/easyconfigs/l/LAPACK/LAPACK-3.4.0-gompi-1.1.0-no-OFED-ATLAS-3.8.4-testing.eb @@ -0,0 +1,33 @@ +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': 'gompi', 'version': '1.1.0-no-OFED'} +toolkitopts = {'pic': True} + +sources = ['%s-%s.tgz' % (name.lower(), version)] +sourceURLs = [homepage] + +blaslib = 'ATLAS' +blasver = '3.8.4' +suff = '-%s-%s' % (name, version) + +dependencies = [(blaslib, blasver, suff)] +versionsuffix = '-%s-%s' % (blaslib, blasver) + +# set extra versionsuffix just to enforce testing +# otherwise, EasyBuild will do nothing (unless forced), +# because the module should be already there +dependencies += [(name, version)] +versionsuffix += '-testing' + +test_only = True + +# disable parallel build, otherwise tests will run in parallel and not complete +parallel = 1 + +moduleclass = 'lib' diff --git a/easybuild/easyconfigs/l/LAPACK/LAPACK-3.4.0-gompi-1.1.0-no-OFED.eb b/easybuild/easyconfigs/l/LAPACK/LAPACK-3.4.0-gompi-1.1.0-no-OFED.eb new file mode 100644 index 0000000000..a335e1e4b6 --- /dev/null +++ b/easybuild/easyconfigs/l/LAPACK/LAPACK-3.4.0-gompi-1.1.0-no-OFED.eb @@ -0,0 +1,15 @@ +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': 'gompi', 'version': '1.1.0-no-OFED'} +toolkitopts = {'pic': True} + +sources = ['%s-%s.tgz' % (name.lower(), version)] +sourceURLs = [homepage] + +moduleclass = 'lib' diff --git a/easybuild/easyconfigs/l/LAPACK/LAPACK-3.4.0-gompi-no-OFED-1.1.0-ATLAS-3.8.4.eb b/easybuild/easyconfigs/l/LAPACK/LAPACK-3.4.0-gompi-no-OFED-1.1.0-ATLAS-3.8.4.eb new file mode 100644 index 0000000000..38a7af10a6 --- /dev/null +++ b/easybuild/easyconfigs/l/LAPACK/LAPACK-3.4.0-gompi-no-OFED-1.1.0-ATLAS-3.8.4.eb @@ -0,0 +1,26 @@ +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': 'gompi', 'version': '1.1.0-no-OFED'} +toolkitopts = {'pic': True} + +sources = ['%s-%s.tgz' % (name.lower(), version)] +sourceURLs = [homepage] + +blaslib = 'ATLAS' +blasver = '3.8.4' + +dependencies = [(blaslib, blasver)] +versionsuffix = '-%s-%s' % (blaslib, blasver) + +supply_blas = True + +# disable parallel build, otherwise tests will run in parallel and not complete +parallel = 1 + +moduleclass = 'lib' diff --git a/easybuild/easyconfigs/s/ScaLAPACK/ScaLAPACK-1.8.0-GCC-4.6.3-OpenMPI-1.4.5-no-OFED-ATLAS-3.8.4-LAPACK-3.4.0-BLACS-1.1.eb b/easybuild/easyconfigs/s/ScaLAPACK/ScaLAPACK-1.8.0-GCC-4.6.3-OpenMPI-1.4.5-no-OFED-ATLAS-3.8.4-LAPACK-3.4.0-BLACS-1.1.eb deleted file mode 100644 index 01f65a142a..0000000000 --- a/easybuild/easyconfigs/s/ScaLAPACK/ScaLAPACK-1.8.0-GCC-4.6.3-OpenMPI-1.4.5-no-OFED-ATLAS-3.8.4-LAPACK-3.4.0-BLACS-1.1.eb +++ /dev/null @@ -1,45 +0,0 @@ -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' -mpi="-%s-%s%s"%(mpilib, mpiver, mpisuff) - -blaslib='ATLAS' -blasver='3.8.4' -blas="-%s-%s"%(blaslib, blasver) - -lapacklib='LAPACK' -lapackver='3.4.0' -lapack="-%s-%s"%(lapacklib, lapackver) - -blacslib='BLACS' -blacsver='1.1' -blacs="-%s-%s"%(blacslib, blacsver) - -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' diff --git a/easybuild/easyconfigs/s/ScaLAPACK/ScaLAPACK-1.8.0-gompi-1.1.0-no-OFED-ATLAS-3.8.4-LAPACK-3.4.0-BLACS-1.1.eb b/easybuild/easyconfigs/s/ScaLAPACK/ScaLAPACK-1.8.0-gompi-1.1.0-no-OFED-ATLAS-3.8.4-LAPACK-3.4.0-BLACS-1.1.eb new file mode 100644 index 0000000000..5ed8f371f1 --- /dev/null +++ b/easybuild/easyconfigs/s/ScaLAPACK/ScaLAPACK-1.8.0-gompi-1.1.0-no-OFED-ATLAS-3.8.4-LAPACK-3.4.0-BLACS-1.1.eb @@ -0,0 +1,37 @@ +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.""" + +toolkit = {'name': 'gompi', 'version': '1.1.0-no-OFED'} +toolkitopts = {'pic': True} + +sources = ['%s-%s.tgz' % (name.lower(), version)] +sourceURLs = [homepage] + +blaslib = 'ATLAS' +blasver = '3.8.4' +blas = "-%s-%s" % (blaslib, blasver) + +lapacklib = 'LAPACK' +lapackver = '3.4.0' +lapack = "-%s-%s" % (lapacklib, lapackver) + +blacslib = 'BLACS' +blacsver = '1.1' +blacs = "-%s-%s" % (blacslib, blacsver) + +versionsuffix = "%s%s%s" % (blas, lapack, blacs) + +dependencies = [ + (blaslib, blasver, lapack), + (lapacklib, lapackver), + (blacslib, blacsver) + ] + +## parallel build tends to fail, so disabling it +parallel = 1 + +moduleclass = 'lib' diff --git a/easybuild/easyconfigs/s/ScaLAPACK/ScaLAPACK-2.0.1-GCC-4.6.3-OpenMPI-1.4.5-no-OFED-ATLAS-3.8.4-LAPACK-3.4.0.eb b/easybuild/easyconfigs/s/ScaLAPACK/ScaLAPACK-2.0.1-GCC-4.6.3-OpenMPI-1.4.5-no-OFED-ATLAS-3.8.4-LAPACK-3.4.0.eb deleted file mode 100644 index 6b522a6810..0000000000 --- a/easybuild/easyconfigs/s/ScaLAPACK/ScaLAPACK-2.0.1-GCC-4.6.3-OpenMPI-1.4.5-no-OFED-ATLAS-3.8.4-LAPACK-3.4.0.eb +++ /dev/null @@ -1,40 +0,0 @@ -name='ScaLAPACK' -version='2.0.1' - -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' -mpi="-%s-%s%s"%(mpilib, mpiver, mpisuff) - -blaslib='ATLAS' -blasver='3.8.4' -blas="-%s-%s"%(blaslib, blasver) - -lapacklib='LAPACK' -lapackver='3.4.0' -lapack="-%s-%s"%(lapacklib, lapackver) - -versionsuffix="%s%s%s"%(mpi, blas, lapack) - -dependencies=[(mpilib, mpiver, mpisuff), - (blaslib, blasver, lapack), - (lapacklib, lapackver) - ] - -## parallel build tends to fail, so disabling it -parallel=1 - -moduleclass='lib' diff --git a/easybuild/easyconfigs/s/ScaLAPACK/ScaLAPACK-2.0.1-gompi-1.1.0-no-OFED-ATLAS-3.8.4-LAPACK-3.4.0.eb b/easybuild/easyconfigs/s/ScaLAPACK/ScaLAPACK-2.0.1-gompi-1.1.0-no-OFED-ATLAS-3.8.4-LAPACK-3.4.0.eb new file mode 100644 index 0000000000..bdd59cc38b --- /dev/null +++ b/easybuild/easyconfigs/s/ScaLAPACK/ScaLAPACK-2.0.1-gompi-1.1.0-no-OFED-ATLAS-3.8.4-LAPACK-3.4.0.eb @@ -0,0 +1,32 @@ +name = 'ScaLAPACK' +version = '2.0.1' + +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.""" + +toolkit = {'name': 'gompi', 'version': '1.1.0-no-OFED'} +toolkitopts = {'pic': True} + +sources = ['%s-%s.tgz' % (name.lower(), version)] +sourceURLs = [homepage] + +blaslib = 'ATLAS' +blasver = '3.8.4' +blas = "-%s-%s" % (blaslib, blasver) + +lapacklib = 'LAPACK' +lapackver = '3.4.0' +lapack = "-%s-%s" % (lapacklib, lapackver) + +versionsuffix = "%s%s" % (blas, lapack) + +dependencies = [ + (blaslib, blasver, lapack), + (lapacklib, lapackver) + ] + +## parallel build tends to fail, so disabling it +parallel = 1 + +moduleclass = 'lib' From 3337c44d0031df4f3dc0b55cc0280544ffd3d8fb Mon Sep 17 00:00:00 2001 From: Toon Willems Date: Thu, 9 Aug 2012 11:46:08 +0200 Subject: [PATCH 555/798] rename easyconfig files according to standard --- easybuild/build.py | 6 ++++++ ...3-MVAPICH-1.7.eb => BLACS-1.1-GCC-4.6.3-MVAPICH2-1.7.eb} | 0 ...ibsmm.eb => CP2K-20111205-goalf-1.1.0-no-OFED-libsmm.eb} | 0 ...ED-psmp.eb => CP2K-20111205-goalf-1.1.0-no-OFED-psmp.eb} | 0 ....1.0-no-OFED.eb => CP2K-20111205-goalf-1.1.0-no-OFED.eb} | 0 ...05-ictce-3.2.2.u3.eb => CP2K-20111205-ictce-3.2.2.u3.eb} | 0 easybuild/easyconfigs/e/ECore/ecore-1.5.2.eb | 2 +- ...PL-2.0-goalf-1.1.0.eb => HPL-2.0-goalf-1.1.0-no-OFED.eb} | 0 ...goalf-1.1.0.eb => OpenFOAM-2.1.1-goalf-1.1.0-no-OFED.eb} | 0 9 files changed, 7 insertions(+), 1 deletion(-) rename easybuild/easyconfigs/b/BLACS/{BLACS-1.1-GCC-4.6.3-MVAPICH-1.7.eb => BLACS-1.1-GCC-4.6.3-MVAPICH2-1.7.eb} (100%) rename easybuild/easyconfigs/c/CP2K/{CP2K_20111205-goalf-1.1.0-no-OFED-libsmm.eb => CP2K-20111205-goalf-1.1.0-no-OFED-libsmm.eb} (100%) rename easybuild/easyconfigs/c/CP2K/{CP2K_20111205-goalf-1.1.0-no-OFED-psmp.eb => CP2K-20111205-goalf-1.1.0-no-OFED-psmp.eb} (100%) rename easybuild/easyconfigs/c/CP2K/{CP2K_20111205-goalf-1.1.0-no-OFED.eb => CP2K-20111205-goalf-1.1.0-no-OFED.eb} (100%) rename easybuild/easyconfigs/c/CP2K/{CP2K_20111205-ictce-3.2.2.u3.eb => CP2K-20111205-ictce-3.2.2.u3.eb} (100%) rename easybuild/easyconfigs/h/HPL/{HPL-2.0-goalf-1.1.0.eb => HPL-2.0-goalf-1.1.0-no-OFED.eb} (100%) rename easybuild/easyconfigs/o/OpenFOAM/{OpenFOAM-2.1.1-goalf-1.1.0.eb => OpenFOAM-2.1.1-goalf-1.1.0-no-OFED.eb} (100%) diff --git a/easybuild/build.py b/easybuild/build.py index 7fe3878921..c11d1e34c3 100644 --- a/easybuild/build.py +++ b/easybuild/build.py @@ -339,6 +339,12 @@ def processEasyconfig(path, log, onlyBlocks=None, regtest_online=False): del eb + # ensure the pathname is equal to the module + base_name, ext = os.path.splitext(os.path.basename(spec)) + module_name = "-".join(package['module']) + if base_name.lower() != module_name.lower(): + log.error("easyconfig file: %s does not contain module %s" % (spec, module_name)) + packages.append(package) return packages diff --git a/easybuild/easyconfigs/b/BLACS/BLACS-1.1-GCC-4.6.3-MVAPICH-1.7.eb b/easybuild/easyconfigs/b/BLACS/BLACS-1.1-GCC-4.6.3-MVAPICH2-1.7.eb similarity index 100% rename from easybuild/easyconfigs/b/BLACS/BLACS-1.1-GCC-4.6.3-MVAPICH-1.7.eb rename to easybuild/easyconfigs/b/BLACS/BLACS-1.1-GCC-4.6.3-MVAPICH2-1.7.eb diff --git a/easybuild/easyconfigs/c/CP2K/CP2K_20111205-goalf-1.1.0-no-OFED-libsmm.eb b/easybuild/easyconfigs/c/CP2K/CP2K-20111205-goalf-1.1.0-no-OFED-libsmm.eb similarity index 100% rename from easybuild/easyconfigs/c/CP2K/CP2K_20111205-goalf-1.1.0-no-OFED-libsmm.eb rename to easybuild/easyconfigs/c/CP2K/CP2K-20111205-goalf-1.1.0-no-OFED-libsmm.eb diff --git a/easybuild/easyconfigs/c/CP2K/CP2K_20111205-goalf-1.1.0-no-OFED-psmp.eb b/easybuild/easyconfigs/c/CP2K/CP2K-20111205-goalf-1.1.0-no-OFED-psmp.eb similarity index 100% rename from easybuild/easyconfigs/c/CP2K/CP2K_20111205-goalf-1.1.0-no-OFED-psmp.eb rename to easybuild/easyconfigs/c/CP2K/CP2K-20111205-goalf-1.1.0-no-OFED-psmp.eb diff --git a/easybuild/easyconfigs/c/CP2K/CP2K_20111205-goalf-1.1.0-no-OFED.eb b/easybuild/easyconfigs/c/CP2K/CP2K-20111205-goalf-1.1.0-no-OFED.eb similarity index 100% rename from easybuild/easyconfigs/c/CP2K/CP2K_20111205-goalf-1.1.0-no-OFED.eb rename to easybuild/easyconfigs/c/CP2K/CP2K-20111205-goalf-1.1.0-no-OFED.eb diff --git a/easybuild/easyconfigs/c/CP2K/CP2K_20111205-ictce-3.2.2.u3.eb b/easybuild/easyconfigs/c/CP2K/CP2K-20111205-ictce-3.2.2.u3.eb similarity index 100% rename from easybuild/easyconfigs/c/CP2K/CP2K_20111205-ictce-3.2.2.u3.eb rename to easybuild/easyconfigs/c/CP2K/CP2K-20111205-ictce-3.2.2.u3.eb diff --git a/easybuild/easyconfigs/e/ECore/ecore-1.5.2.eb b/easybuild/easyconfigs/e/ECore/ecore-1.5.2.eb index 14ffde3b21..5c2a61ef29 100644 --- a/easybuild/easyconfigs/e/ECore/ecore-1.5.2.eb +++ b/easybuild/easyconfigs/e/ECore/ecore-1.5.2.eb @@ -13,7 +13,7 @@ sources=['%s-%s.tgz'%(name.lower(),version)] patches=['ecore-license-var.patch'] sanityCheckPaths = { - 'files':["ecore.sh",'noarch/launch.sh'] + ['arch/linux-rh5-x86_64/bin/%s' % name for name in ['ismodeller', 'ecore', 'packer', 'PorenetworkExtraction', 'Poresim', 'unpacker' ]], + 'files':["ecore.sh",'noarch/launch.sh'] + ['arch/linux-rh5-x86_64/bin/%s' % bin for bin in ['ismodeller', 'ecore', 'packer', 'PorenetworkExtraction', 'Poresim', 'unpacker' ]], 'dirs':[] } diff --git a/easybuild/easyconfigs/h/HPL/HPL-2.0-goalf-1.1.0.eb b/easybuild/easyconfigs/h/HPL/HPL-2.0-goalf-1.1.0-no-OFED.eb similarity index 100% rename from easybuild/easyconfigs/h/HPL/HPL-2.0-goalf-1.1.0.eb rename to easybuild/easyconfigs/h/HPL/HPL-2.0-goalf-1.1.0-no-OFED.eb diff --git a/easybuild/easyconfigs/o/OpenFOAM/OpenFOAM-2.1.1-goalf-1.1.0.eb b/easybuild/easyconfigs/o/OpenFOAM/OpenFOAM-2.1.1-goalf-1.1.0-no-OFED.eb similarity index 100% rename from easybuild/easyconfigs/o/OpenFOAM/OpenFOAM-2.1.1-goalf-1.1.0.eb rename to easybuild/easyconfigs/o/OpenFOAM/OpenFOAM-2.1.1-goalf-1.1.0-no-OFED.eb From 04d31326b5e2bddd1252e5d930cf463af984fd32 Mon Sep 17 00:00:00 2001 From: Toon Willems Date: Thu, 9 Aug 2012 11:54:25 +0200 Subject: [PATCH 556/798] set module correctly instead of splitting --- easybuild/test/build.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/easybuild/test/build.py b/easybuild/test/build.py index 222cab6868..f422264a5a 100644 --- a/easybuild/test/build.py +++ b/easybuild/test/build.py @@ -276,7 +276,7 @@ def build_packages_in_parallel(packages, output_dir, script_dir): # remove from unresolvedDependencies in with_dependencies array for job in done_jobs: output_paths.append(job.env_vars['EASYBUILDTESTOUTPUT']) - name, version = job.name.split('-', 1) + name, version = job.module for pkg in with_dependencies: try: pkg['unresolvedDependencies'].remove((name, version)) @@ -373,6 +373,7 @@ def submit_job(package, output_dir, script_dir): easybuild_vars['EASYBUILDTESTOUTPUT'] = os.path.join(os.path.abspath(output_dir), name) job = PbsJob(command, name, easybuild_vars) + job.module = package['module'] job.submit() return job From 38b739bfed09bdc862cc3270fbab4c0fc4cdc2f4 Mon Sep 17 00:00:00 2001 From: Toon Willems Date: Thu, 9 Aug 2012 11:58:47 +0200 Subject: [PATCH 557/798] self.tk doesn't exist --- easybuild/easyblocks/o/openfoam.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/easybuild/easyblocks/o/openfoam.py b/easybuild/easyblocks/o/openfoam.py index 8b91154bb0..555bef8ff2 100644 --- a/easybuild/easyblocks/o/openfoam.py +++ b/easybuild/easyblocks/o/openfoam.py @@ -63,7 +63,7 @@ def configure(self): env.set("WM_THIRD_PARTY_DIR", os.path.join(self.installdir, self.thrdpartydir)) # compiler - comp_fam = self.tk.comp_family() + comp_fam = self.toolkit().comp_family() if comp_fam == toolkit.GCC: self.wm_compiler="Gcc" @@ -80,7 +80,7 @@ def configure(self): env.set("WM_COMPILER",self.wm_compiler) # type of MPI - mpi_type = self.tk.mpi_type() + mpi_type = self.toolkit().mpi_type() if mpi_type == toolkit.INTEL: self.mpipath = os.path.join(get_software_root('IMPI'),'intel64') From c5413715f95cec48a394dfab5c4c9c033d0738fc Mon Sep 17 00:00:00 2001 From: Kenneth Hoste Date: Thu, 9 Aug 2012 12:47:38 +0200 Subject: [PATCH 558/798] avoid double logging by sending output of root logger to /dev/null --- easybuild/tools/build_log.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/easybuild/tools/build_log.py b/easybuild/tools/build_log.py index fbcc51ee3e..7a2eca7945 100644 --- a/easybuild/tools/build_log.py +++ b/easybuild/tools/build_log.py @@ -92,7 +92,7 @@ def exception(self, msg, *args): formatter = logging.Formatter(logging_format) # redirect standard handler of root logger to stderr -logging.basicConfig(level=logging.ERROR, format=logging_format, stream=sys.stderr) +logging.basicConfig(level=logging.ERROR, format=logging_format, filename='/dev/null') logging.setLoggerClass(EasyBuildLog) From 102d1e79cef28f868246e55b5e994612890bfb65 Mon Sep 17 00:00:00 2001 From: Kenneth Hoste Date: Thu, 9 Aug 2012 13:42:50 +0200 Subject: [PATCH 559/798] clarify changing standard handler of root logger with comment --- easybuild/tools/build_log.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/easybuild/tools/build_log.py b/easybuild/tools/build_log.py index 7a2eca7945..4d454ec5c2 100644 --- a/easybuild/tools/build_log.py +++ b/easybuild/tools/build_log.py @@ -91,7 +91,8 @@ def exception(self, msg, *args): logging_format = EB_MSG_PREFIX + ' %(asctime)s %(name)s %(levelname)s %(message)s' formatter = logging.Formatter(logging_format) -# redirect standard handler of root logger to stderr +# redirect standard handler of root logger to /dev/null +# without this, everything is logged twice (one by root logger, once by descendant logger) logging.basicConfig(level=logging.ERROR, format=logging_format, filename='/dev/null') logging.setLoggerClass(EasyBuildLog) From d9c7f6d015d88e31e7dcdade31a470197dccfc5a Mon Sep 17 00:00:00 2001 From: Kenneth Hoste Date: Thu, 9 Aug 2012 13:57:49 +0200 Subject: [PATCH 560/798] fix broken scalapack --- easybuild/easyblocks/s/scalapack.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/easybuild/easyblocks/s/scalapack.py b/easybuild/easyblocks/s/scalapack.py index f275980fbd..5a68b7fc2b 100644 --- a/easybuild/easyblocks/s/scalapack.py +++ b/easybuild/easyblocks/s/scalapack.py @@ -112,9 +112,9 @@ def make(self): noopt += " -O0" if self.toolkit().opts['pic']: noopt += " -fPIC" - extra_makeopts += 'F77="%(f77)s"' % mpif77 - extra_makeopts += ' CC="%(cc)s"' % mpicc - extra_makeopts += ' NOOPT="%(noopt)s"' % noopt + extra_makeopts += 'F77="%s"' % mpif77 + extra_makeopts += ' CC="%s"' % mpicc + extra_makeopts += ' NOOPT="%s"' % noopt extra_makeopts += ' CCFLAGS="-O3" ' # set interface From 5b47673bcda8b3b1423ff6c9f6b1fe97b10ae459 Mon Sep 17 00:00:00 2001 From: Toon Willems Date: Thu, 9 Aug 2012 13:58:39 +0200 Subject: [PATCH 561/798] add option to specify dependencies --- easybuild/tools/pbs_job.py | 13 +++++++++++++ 1 file changed, 13 insertions(+) diff --git a/easybuild/tools/pbs_job.py b/easybuild/tools/pbs_job.py index 0bb05ada82..d32d32bd39 100644 --- a/easybuild/tools/pbs_job.py +++ b/easybuild/tools/pbs_job.py @@ -57,6 +57,12 @@ def __init__(self, script, name, env_vars=None): self.log.error("Could not connect to the default pbs server, is this correctly configured?") self.jobid = None + self.deps = [] + + def add_dependencies(self, job_ids): + """ add dependencies to this job. """ + self.deps.extend(job_ids) + def submit(self): """Submit the jobscript txt, set self.jobid""" @@ -81,6 +87,13 @@ def submit(self): idx += 1 pbs_attributes.extend(resourse_attributes) + # add job dependencies to attributes + if self.deps: + deps_attributes = pbs.new_attropl(1) + deps_attributes[0].name = pbs.ATTR_depend + deps_attributes[0].value = "depend=%s" % ",".join(["afterok:%s" % dep for dep in self.deps]) + pbs_attributes.extend(deps_attributes) + ## add a bunch of variables (added by qsub) ## also set PBS_O_WORKDIR to os.getcwd() os.environ.setdefault('WORKDIR', os.getcwd()) From b950913e80a9e356b1e9447d44f8785408198a25 Mon Sep 17 00:00:00 2001 From: Kenneth Hoste Date: Thu, 9 Aug 2012 14:15:10 +0200 Subject: [PATCH 562/798] fix remarks w.r.t. composing extra make options --- easybuild/easyblocks/s/scalapack.py | 40 +++++++++++++++++------------ 1 file changed, 23 insertions(+), 17 deletions(-) diff --git a/easybuild/easyblocks/s/scalapack.py b/easybuild/easyblocks/s/scalapack.py index 5a68b7fc2b..2a48212901 100644 --- a/easybuild/easyblocks/s/scalapack.py +++ b/easybuild/easyblocks/s/scalapack.py @@ -86,8 +86,10 @@ def make(self): self.log.error("Don't know which compiler commands to use.") # set BLAS and LAPACK libs - extra_makeopts = 'BLASLIB="%s -lpthread"' % get_blas_lib(self.log) - extra_makeopts += ' LAPACKLIB=%s/lib/liblapack.a ' % get_software_root('LAPACK') + extra_makeopts = [ + 'BLASLIB="%s -lpthread"' % get_blas_lib(self.log), + 'LAPACKLIB=%s/lib/liblapack.a' % get_software_root('LAPACK') + ] # build procedure changed in v2.0.0 if self.loosever < LooseVersion("2.0.0"): @@ -98,13 +100,15 @@ def make(self): interface = det_interface(self.log, os.path.join(blacs, 'bin')) # set build and BLACS dir correctly - extra_makeopts += 'home=%s BLACSdir=%s ' % (self.getcfg('startfrom'), blacs) + extra_makeopts.append('home=%s BLACSdir=%s' % (self.getcfg('startfrom'), blacs)) # set BLACS libs correctly - for (var, lib) in [('BLACSFINIT', "F77init"), + for (var, lib) in [ + ('BLACSFINIT', "F77init"), ('BLACSCINIT', "Cinit"), - ('BLACSLIB', "")]: - extra_makeopts += '%s=%s/lib/libblacs%s.a ' % (var, blacs, lib) + ('BLACSLIB', "") + ]: + extra_makeopts.append('%s=%s/lib/libblacs%s.a' % (var, blacs, lib)) # set compilers and options noopt = '' @@ -112,13 +116,15 @@ def make(self): noopt += " -O0" if self.toolkit().opts['pic']: noopt += " -fPIC" - extra_makeopts += 'F77="%s"' % mpif77 - extra_makeopts += ' CC="%s"' % mpicc - extra_makeopts += ' NOOPT="%s"' % noopt - extra_makeopts += ' CCFLAGS="-O3" ' + extra_makeopts += [ + 'F77="%s"' % mpif77, + 'CC="%s"' % mpicc, + 'NOOPT="%s"' % noopt, + 'CCFLAGS="-O3"' + ] # set interface - extra_makeopts += "CDEFS='-D%s -DNO_IEEE $(USEMPI)' " % interface + extra_makeopts.append("CDEFS='-D%s -DNO_IEEE $(USEMPI)'" % interface) else: @@ -129,16 +135,16 @@ def make(self): self.log.error("Don't know which interface to pick for the MPI library being used.") # set compilers and options - extra_makeopts += 'FC="%(fc)s" CC="%(cc)s" ' % { - 'fc': mpif90, - 'cc': mpicc, - } + extra_makeopts += [ + 'FC="%s"' % mpif90, + 'CC="%s"' % mpicc + ] # set interface - extra_makeopts += 'CDEFS="-D%s" ' % interface + extra_makeopts.append('CDEFS="-D%s"' % interface) # update make opts, and make - self.updatecfg('makeopts', extra_makeopts) + self.updatecfg('makeopts', ' '.join(extra_makeopts)) Application.make(self) From 7c2037652c6024dce7b188c97354e387c9cc2b96 Mon Sep 17 00:00:00 2001 From: Toon Willems Date: Thu, 9 Aug 2012 14:21:06 +0200 Subject: [PATCH 563/798] fix dependency insertion --- easybuild/tools/pbs_job.py | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/easybuild/tools/pbs_job.py b/easybuild/tools/pbs_job.py index d32d32bd39..b0a25f752c 100644 --- a/easybuild/tools/pbs_job.py +++ b/easybuild/tools/pbs_job.py @@ -61,8 +61,10 @@ def __init__(self, script, name, env_vars=None): def add_dependencies(self, job_ids): """ add dependencies to this job. """ - self.deps.extend(job_ids) + if isinstance(job_ids, str): + job_ids = list(job_ids) + self.deps.extend(job_ids) def submit(self): """Submit the jobscript txt, set self.jobid""" @@ -91,7 +93,7 @@ def submit(self): if self.deps: deps_attributes = pbs.new_attropl(1) deps_attributes[0].name = pbs.ATTR_depend - deps_attributes[0].value = "depend=%s" % ",".join(["afterok:%s" % dep for dep in self.deps]) + deps_attributes[0].value = ",".join(["afterok:%s" % dep for dep in self.deps]) pbs_attributes.extend(deps_attributes) ## add a bunch of variables (added by qsub) From aff0e8c81979ef5ee737f67cf7b0c10ae2c71047 Mon Sep 17 00:00:00 2001 From: Toon Willems Date: Thu, 9 Aug 2012 14:41:14 +0200 Subject: [PATCH 564/798] cleanup, this looks trivial now --- easybuild/test/build.py | 65 +++++++++++++---------------------------- 1 file changed, 20 insertions(+), 45 deletions(-) diff --git a/easybuild/test/build.py b/easybuild/test/build.py index f422264a5a..70f98c9cc5 100644 --- a/easybuild/test/build.py +++ b/easybuild/test/build.py @@ -258,53 +258,29 @@ def build_packages_in_parallel(packages, output_dir, script_dir): prepare_package(pkg) # we submit all the jobs which can be trivially build. - jobs = [submit_job(pkg, output_dir, script_dir) for pkg in no_dependencies] + jobs = [create_job(pkg, output_dir, script_dir) for pkg in no_dependencies] + job_module_dict = {} + + # submit in different loop (otherwise we'd have an array of None) + for job in jobs: + job.submit() + job_module_dict[job.module] = job.jobid log.info("Submitted %s jobs" % len(jobs)) log.info("Still %s left to be submitted" % len(with_dependencies)) - output_paths = [] - - while len(jobs) > 0: - # sleep 5 minutes - time.sleep(5 * 60) - - done_jobs = [job for job in jobs if job.state() == 'finished'] - # filter the done_jobs - jobs = [job for job in jobs if job not in done_jobs] - - # remove from unresolvedDependencies in with_dependencies array - for job in done_jobs: - output_paths.append(job.env_vars['EASYBUILDTESTOUTPUT']) - name, version = job.module - for pkg in with_dependencies: - try: - pkg['unresolvedDependencies'].remove((name, version)) - except: - pass - - # find other jobs without dependencies and extend the jobs array! - no_dependencies = [pkg for pkg in with_dependencies if len(pkg['unresolvedDependencies']) == 0] - with_dependencies = [pkg for pkg in with_dependencies if pkg not in no_dependencies] - - log.info("preparing packages: %s" % no_dependencies) - for pkg in no_dependencies: - prepare_package(pkg) - - new_jobs = [submit_job(pkg, output_dir, script_dir) for pkg in no_dependencies] - jobs.extend(new_jobs) - - # Add some logging - log.info("%s jobs finished completion: %s" % (len(done_jobs), [job.name for job in done_jobs])) - log.info("%s jobs have been submitted: %s" % (len(new_jobs), [job.name for job in new_jobs])) - log.info("%s jobs are being run: %s" % (len(jobs), [job.name for job in jobs])) - log.info("%s packages still need to be build" % len(with_dependencies)) - - if len(with_dependencies) > 0: - log.error("For some reason, you still have unresolved dependencies: %s" % with_dependencies) + # dependencies have already been resolved this means i can linearly walk over the list and use previous job id's + for pkg in with_dependencies: + # don't forgot to prepare each package + prepare_package(pkg) - output_file = os.path.join(output_dir, "easybuild-parallel-results.xml") - aggregate_xml_in_dirs(output_paths, output_file) + # the new job will only depend on already submitted jobs + new_job = create_job(pkg, output_dir, script_dir) + job_deps = [job_module_dict[dep] for dep in pkg['unresolvedDependencies']] + new_job.add_dependencies(job_deps) + new_job.submit() + # update dictionary + job_module_dict[new_job.module] = new_job.jobid def aggregate_xml_in_dirs(dirs, output_filename): """ @@ -347,9 +323,9 @@ def prepare_package(pkg): except EasyBuildError, err: log.warn("%s failed to prepare. Submitting anyway, for proper error resolution" % str(pkg['module'])) -def submit_job(package, output_dir, script_dir): +def create_job(package, output_dir, script_dir): """ - submits a job, to build a *single* package + creates a job, to build a *single* package returns the job """ # command is pyton script/regtest.py file_name --single @@ -374,7 +350,6 @@ def submit_job(package, output_dir, script_dir): job = PbsJob(command, name, easybuild_vars) job.module = package['module'] - job.submit() return job From 6b7bba9c53d196e56ac2ecd81915b17146d0fd21 Mon Sep 17 00:00:00 2001 From: Toon Willems Date: Thu, 9 Aug 2012 15:37:30 +0200 Subject: [PATCH 565/798] add aggregate option --- easybuild/test/build.py | 29 ++++++++++++++++++++--------- 1 file changed, 20 insertions(+), 9 deletions(-) diff --git a/easybuild/test/build.py b/easybuild/test/build.py index 70f98c9cc5..27ee8fa0d0 100644 --- a/easybuild/test/build.py +++ b/easybuild/test/build.py @@ -87,9 +87,16 @@ def main(): parser.add_option("--output-dir", dest="directory", help="set output directory for test-run") parser.add_option("-r", "--robot", default="easybuild/easyconfigs", help="specify robot directory (default: %default)") + parser.add_option("-a", "--aggregate", help="collect all the xmls inside the given directory and generate a single file") (opts, args) = parser.parse_args() + if opts.aggregate: + output_file = os.path.join(opts.aggregate, "easybuild-aggregate.xml") + aggregate_xml_in_dirs(opts.aggregate, output_file) + log.info("aggregated xml files inside %s, output written to: %s" % (opts.aggregate, output_file)) + sys.exit(0) + # Create base directory inside the current directory. This will be used to place # all log files and the test output as xml basename = "easybuild-test-%s" % datetime.now().strftime("%d-%m-%Y-%H:%M:%S") @@ -282,7 +289,7 @@ def build_packages_in_parallel(packages, output_dir, script_dir): # update dictionary job_module_dict[new_job.module] = new_job.jobid -def aggregate_xml_in_dirs(dirs, output_filename): +def aggregate_xml_in_dirs(base_dir, output_filename): """ finds all the xml files in the dirs and takes the testcase attribute out of them. These are then put in a single output file @@ -302,15 +309,19 @@ def aggregate_xml_in_dirs(dirs, output_filename): root.firstChild.appendChild(properties) + dirs = filter(os.path.isdir, [os.path.join(base_dir, dir) for dir in os.listdir(base_dir)]) + for dir in dirs: - # take the first one (should be only one present) - xml_file = glob.glob(os.path.join(dir, "*.xml"))[0] - dom = xml.parse(xml_file) - # only one should be present, we are just discarding the rest - testcase = dom.getElementsByTagName("testcase")[0] - root.firstChild.appendChild(testcase) - - output_file = open(output_filename) + xml_file = glob.glob(os.path.join(dir, "*.xml")) + if xml_file: + # take the first one (should be only one present) + xml_file = xml_file[0] + dom = xml.parse(xml_file) + # only one should be present, we are just discarding the rest + testcase = dom.getElementsByTagName("testcase")[0] + root.firstChild.appendChild(testcase) + + output_file = open(output_filename, "w") root.writexml(output_file, addindent="\t", newl="\n") output_file.close() From 5b66b3a7671d4a656f66a44797ac13e6daeacf51 Mon Sep 17 00:00:00 2001 From: Toon Willems Date: Thu, 9 Aug 2012 15:46:29 +0200 Subject: [PATCH 566/798] remove pretty printing --- easybuild/test/build.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/easybuild/test/build.py b/easybuild/test/build.py index 27ee8fa0d0..f65c9b607e 100644 --- a/easybuild/test/build.py +++ b/easybuild/test/build.py @@ -322,7 +322,7 @@ def aggregate_xml_in_dirs(base_dir, output_filename): root.firstChild.appendChild(testcase) output_file = open(output_filename, "w") - root.writexml(output_file, addindent="\t", newl="\n") + root.writexml(output_file) output_file.close() From ccf689fa32d607d4ad480e38df5f334985707b40 Mon Sep 17 00:00:00 2001 From: Kenneth Hoste Date: Thu, 9 Aug 2012 15:55:09 +0200 Subject: [PATCH 567/798] remove superfluous code from blacs.py's make_install --- easybuild/easyblocks/b/blacs.py | 3 --- 1 file changed, 3 deletions(-) diff --git a/easybuild/easyblocks/b/blacs.py b/easybuild/easyblocks/b/blacs.py index ffe3cb4e19..ab6ceaf924 100644 --- a/easybuild/easyblocks/b/blacs.py +++ b/easybuild/easyblocks/b/blacs.py @@ -182,9 +182,6 @@ def make(self): def make_install(self): """Install by copying files to install dir.""" - # include files - src = os.path.join(self.getcfg('startfrom'), 'LIB') - # include files and libraries for (srcdir, destdir, ext) in [ (os.path.join("SRC", "MPI"), "include", ".h"), # include files From ce7c3633239c51e1a40bf39a2077f830cdc1c0c6 Mon Sep 17 00:00:00 2001 From: Toon Willems Date: Thu, 9 Aug 2012 15:55:37 +0200 Subject: [PATCH 568/798] add comment on top, pretty print only final xml --- easybuild/test/build.py | 13 +++++++++++-- 1 file changed, 11 insertions(+), 2 deletions(-) diff --git a/easybuild/test/build.py b/easybuild/test/build.py index f65c9b607e..f8af8787d5 100644 --- a/easybuild/test/build.py +++ b/easybuild/test/build.py @@ -311,6 +311,9 @@ def aggregate_xml_in_dirs(base_dir, output_filename): dirs = filter(os.path.isdir, [os.path.join(base_dir, dir) for dir in os.listdir(base_dir)]) + succes = 0 + total = 0 + for dir in dirs: xml_file = glob.glob(os.path.join(dir, "*.xml")) if xml_file: @@ -320,9 +323,15 @@ def aggregate_xml_in_dirs(base_dir, output_filename): # only one should be present, we are just discarding the rest testcase = dom.getElementsByTagName("testcase")[0] root.firstChild.appendChild(testcase) + total += 1 + if not testcase.getElementsByTagName("failure"): + succes += 1 + + comment = root.createComment("%s out of %s builds succeeded" % (succes, total)) + root.firstChild.insertBefore(comment, properties) output_file = open(output_filename, "w") - root.writexml(output_file) + root.writexml(output_file, addindent="\t", newl="\n") output_file.close() @@ -425,7 +434,7 @@ def create_succes(name, stats): root.firstChild.appendChild(el) output_file = open(filename, "w") - root.writexml(output_file, addindent="\t", newl="\n") + root.writexml(output_file) output_file.close() if __name__ == "__main__": From d567ae0fee5d7ab27884274308988f2625251b3b Mon Sep 17 00:00:00 2001 From: Toon Willems Date: Thu, 9 Aug 2012 16:41:21 +0200 Subject: [PATCH 569/798] move into seperate files --- .../{test/build.py => scripts/regtest.py} | 0 easybuild/tools/parallelbuild.py | 88 +++++++++++++++++++ 2 files changed, 88 insertions(+) rename easybuild/{test/build.py => scripts/regtest.py} (100%) mode change 100644 => 100755 create mode 100644 easybuild/tools/parallelbuild.py diff --git a/easybuild/test/build.py b/easybuild/scripts/regtest.py old mode 100644 new mode 100755 similarity index 100% rename from easybuild/test/build.py rename to easybuild/scripts/regtest.py diff --git a/easybuild/tools/parallelbuild.py b/easybuild/tools/parallelbuild.py new file mode 100644 index 0000000000..ca760374fe --- /dev/null +++ b/easybuild/tools/parallelbuild.py @@ -0,0 +1,88 @@ +## +# Copyright 2012 Toon Willems +# +# This file is part of EasyBuild, +# originally created by the HPC team of the University of Ghent (http://ugent.be/hpc). +# +# http://github.com/hpcugent/easybuild +# +# EasyBuild is free software: you can redistribute it and/or modify +# it under the terms of the GNU General Public License as published by +# the Free Software Foundation v2. +# +# EasyBuild is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with EasyBuild. If not, see . +## +def build_packages_in_parallel(build_command, packages, output_dir): + """ + list is a list of packages which can be build! (e.g. they have no unresolved dependencies) + this function will build them in parallel by submitting jobs + """ + job_module_dict = {} + # dependencies have already been resolved this means i can linearly walk over the list and use previous job id's + for pkg in packages: + # This is very important, otherwise we might have race conditions + # e.g. GCC-4.5.3 finds cloog.tar.gz but it was incorrectly downloaded by GCC-4.6.3 + # running this step here, prevents this + prepare_package(pkg) + + # the new job will only depend on already submitted jobs + new_job = create_job(build_command, pkg, output_dir) + job_deps = [job_module_dict[dep] for dep in pkg['unresolvedDependencies']] + new_job.add_dependencies(job_deps) + new_job.submit() + # update dictionary + job_module_dict[new_job.module] = new_job.jobid + + +def create_job(build_command, package, output_dir): + """ + creates a job, to build a *single* package + returns the job + """ + # create command based on build_command template + command = build_command % package['spec'] + + # capture PYTHONPATH, MODULEPATH and all variables starting with EASYBUILD + easybuild_vars = {} + for name in os.environ: + if name.startswith("EASYBUILD"): + easybuild_vars[name] = os.environ[name] + + others = ["PYTHONPATH", "MODULEPATH"] + + for env_var in others: + if env_var in os.environ: + easybuild_vars[env_var] = os.environ[env_var] + + # create unique name based on module name + name = "%s-%s" % package['module'] + + easybuild_vars['EASYBUILDTESTOUTPUT'] = os.path.join(os.path.abspath(output_dir), name) + + job = PbsJob(command, name, easybuild_vars) + job.module = package['module'] + + return job + +def get_instance(package): + """ get an instance for this package """ + spec = package['spec'] + name = package['module'][0] + + # handle easyconfigs with custom easyblocks + easyblock = None + reg = re.compile(r"^\s*easyblock\s*=(.*)$") + for line in open(spec).readlines(): + match = reg.search(line) + if match: + easyblock = eval(match.group(1)) + break + + app_class = get_class(easyblock, log, name=name) + return app_class(spec, debug=True) From 7474d8c422711fb50f524372b09f1c9e0b398401 Mon Sep 17 00:00:00 2001 From: Toon Willems Date: Thu, 9 Aug 2012 16:55:33 +0200 Subject: [PATCH 570/798] cleanup into different modules --- easybuild/scripts/regtest.py | 111 ++----------------------------- easybuild/tools/parallelbuild.py | 22 ++++++ 2 files changed, 28 insertions(+), 105 deletions(-) diff --git a/easybuild/scripts/regtest.py b/easybuild/scripts/regtest.py index f8af8787d5..f4a5153712 100755 --- a/easybuild/scripts/regtest.py +++ b/easybuild/scripts/regtest.py @@ -58,14 +58,13 @@ from optparse import OptionParser import easybuild +import easybuild.tools.build_log as build_log import easybuild.tools.config as config +import easybuild.tools.parallelbuild as parbuild import easybuild.tools.systemtools as systemtools -import easybuild.tools.build_log as build_log from easybuild.tools.build_log import getLog, EasyBuildError, initLogger -from easybuild.framework.application import get_class, Application from easybuild.build import findEasyconfigs, processEasyconfig, resolveDependencies from easybuild.tools.filetools import modifyEnv -from easybuild.tools.pbs_job import PbsJob # some variables used by different functions initLogger(filename=None, debug=True, typ=None) @@ -73,7 +72,6 @@ test_results = [] build_stopped = {} - def main(): """ main entry point """ # assume default config path @@ -131,7 +129,9 @@ def main(): if opts.parallel: resolved = resolveDependencies(packages, opts.robot, log) - build_packages_in_parallel(resolved, output_dir, cur_dir) + # use %%s so i can later replace it + command = "cd %s && python %s %%s --no-parallel" % (cur_dir, sys.argv[0]) + parbuild.build_packages_in_parallel(command, resolved, output_dir) else: build_packages(packages, output_dir) @@ -149,25 +149,6 @@ def perform_step(fase, obj, method): # keep a dict of so we can check in O(1) if objects can still be build build_stopped[obj] = fase - -def get_instance(package): - """ get an instance for this package """ - spec = package['spec'] - name = package['module'][0] - - # handle easyconfigs with custom easyblocks - easyblock = None - reg = re.compile(r"^\s*easyblock\s*=(.*)$") - for line in open(spec).readlines(): - match = reg.search(line) - if match: - easyblock = eval(match.group(1)) - break - - app_class = get_class(easyblock, log, name=name) - return app_class(spec, debug=True) - - def build_packages(packages, output_dir): """ build the packages @@ -175,7 +156,7 @@ def build_packages(packages, output_dir): apps = [] for pkg in packages: try: - instance = get_instance(pkg) + instance = parbuild.get_instance(pkg) apps.append(instance) except EasyBuildError, err: test_results.append((pkg['spec'], 'initialization', err)) @@ -248,47 +229,6 @@ def build_packages(packages, output_dir): write_to_xml(succes, test_results, output_file) -def build_packages_in_parallel(packages, output_dir, script_dir): - """ - list is a list of packages which can be build! (e.g. they have no unresolved dependencies) - this function will build them in parallel by submitting jobs - """ - # first find those without dependencies - no_dependencies = [pkg for pkg in packages if len(pkg['unresolvedDependencies']) == 0] - with_dependencies = [pkg for pkg in packages if pkg not in no_dependencies] - - # This is very important, otherwise we might have race conditions - # e.g. GCC-4.5.3 finds cloog.tar.gz but it was incorrectly downloaded by GCC-4.6.3 - # running this step here, prevents this - log.info("preparing packages: %s" % no_dependencies) - for pkg in no_dependencies: - prepare_package(pkg) - - # we submit all the jobs which can be trivially build. - jobs = [create_job(pkg, output_dir, script_dir) for pkg in no_dependencies] - job_module_dict = {} - - # submit in different loop (otherwise we'd have an array of None) - for job in jobs: - job.submit() - job_module_dict[job.module] = job.jobid - - log.info("Submitted %s jobs" % len(jobs)) - log.info("Still %s left to be submitted" % len(with_dependencies)) - - # dependencies have already been resolved this means i can linearly walk over the list and use previous job id's - for pkg in with_dependencies: - # don't forgot to prepare each package - prepare_package(pkg) - - # the new job will only depend on already submitted jobs - new_job = create_job(pkg, output_dir, script_dir) - job_deps = [job_module_dict[dep] for dep in pkg['unresolvedDependencies']] - new_job.add_dependencies(job_deps) - new_job.submit() - # update dictionary - job_module_dict[new_job.module] = new_job.jobid - def aggregate_xml_in_dirs(base_dir, output_filename): """ finds all the xml files in the dirs and takes the testcase attribute out of them. @@ -335,45 +275,6 @@ def aggregate_xml_in_dirs(base_dir, output_filename): output_file.close() -def prepare_package(pkg): - """ prepare for building """ - try: - instance = get_instance(pkg) - instance.prepare_build() - except EasyBuildError, err: - log.warn("%s failed to prepare. Submitting anyway, for proper error resolution" % str(pkg['module'])) - -def create_job(package, output_dir, script_dir): - """ - creates a job, to build a *single* package - returns the job - """ - # command is pyton script/regtest.py file_name --single - command = "cd %s && python %s %s --no-parallel" % (script_dir, sys.argv[0], package['spec']) - - # capture PYTHONPATH, MODULEPATH and all variables starting with EASYBUILD - easybuild_vars = {} - for name in os.environ: - if name.startswith("EASYBUILD"): - easybuild_vars[name] = os.environ[name] - - others = ["PYTHONPATH", "MODULEPATH"] - - for env_var in others: - if env_var in os.environ: - easybuild_vars[env_var] = os.environ[env_var] - - # create unique name based on module name - name = "%s-%s" % package['module'] - - easybuild_vars['EASYBUILDTESTOUTPUT'] = os.path.join(os.path.abspath(output_dir), name) - - job = PbsJob(command, name, easybuild_vars) - job.module = package['module'] - - return job - - def write_to_xml(succes, failed, filename): """ Create xml output, using minimal output required according to diff --git a/easybuild/tools/parallelbuild.py b/easybuild/tools/parallelbuild.py index ca760374fe..136ea05ad0 100644 --- a/easybuild/tools/parallelbuild.py +++ b/easybuild/tools/parallelbuild.py @@ -18,6 +18,18 @@ # You should have received a copy of the GNU General Public License # along with EasyBuild. If not, see . ## +""" +module for doing parallel builds +""" +import os +import re + +from easybuild.framework.application import get_class +from easybuild.tools.build_log import getLog +from easybuild.tools.pbs_job import PbsJob + +log = getLog("ParallelBuild") + def build_packages_in_parallel(build_command, packages, output_dir): """ list is a list of packages which can be build! (e.g. they have no unresolved dependencies) @@ -70,6 +82,7 @@ def create_job(build_command, package, output_dir): return job + def get_instance(package): """ get an instance for this package """ spec = package['spec'] @@ -86,3 +99,12 @@ def get_instance(package): app_class = get_class(easyblock, log, name=name) return app_class(spec, debug=True) + + +def prepare_package(pkg): + """ prepare for building """ + try: + instance = get_instance(pkg) + instance.prepare_build() + except: + pass From cd43d1c209aaaea8b52e18a0f9f02966c3bd997c Mon Sep 17 00:00:00 2001 From: Toon Willems Date: Fri, 10 Aug 2012 08:39:34 +0200 Subject: [PATCH 571/798] fix KeyError crash --- easybuild/tools/parallelbuild.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/easybuild/tools/parallelbuild.py b/easybuild/tools/parallelbuild.py index 136ea05ad0..40805e797c 100644 --- a/easybuild/tools/parallelbuild.py +++ b/easybuild/tools/parallelbuild.py @@ -45,7 +45,8 @@ def build_packages_in_parallel(build_command, packages, output_dir): # the new job will only depend on already submitted jobs new_job = create_job(build_command, pkg, output_dir) - job_deps = [job_module_dict[dep] for dep in pkg['unresolvedDependencies']] + # Sometimes unresolvedDependencies will contain things, not needed to be build. + job_deps = [job_module_dict[dep] for dep in pkg['unresolvedDependencies'] if dep in job_module_dict] new_job.add_dependencies(job_deps) new_job.submit() # update dictionary From 37590818791a6eb9b05fb5ab071a90265da9895f Mon Sep 17 00:00:00 2001 From: Toon Willems Date: Fri, 10 Aug 2012 09:13:25 +0200 Subject: [PATCH 572/798] use parallelbuild in build.py --- easybuild/build.py | 33 ++++++++------------------------- 1 file changed, 8 insertions(+), 25 deletions(-) diff --git a/easybuild/build.py b/easybuild/build.py index 74cf3a1f0c..eb3328b9cf 100644 --- a/easybuild/build.py +++ b/easybuild/build.py @@ -42,6 +42,7 @@ import easybuild # required for VERBOSE_VERSION import easybuild.tools.config as config import easybuild.tools.filetools as filetools +import easybuild.tools.parallelbuild as parbuild from easybuild.framework.application import get_class from easybuild.framework.easyblock import EasyBlock from easybuild.tools.build_log import EasyBuildError, initLogger, \ @@ -50,7 +51,6 @@ from easybuild.tools.modules import Modules, searchModule from easybuild.tools.config import getRepository from easybuild.tools import systemtools -from easybuild.tools.pbs_job import PbsJob # applications use their own logger, we need to tell them to debug or not @@ -98,7 +98,6 @@ def add_build_options(parser): strictness_options = ['ignore', 'warn', 'error'] parser.add_option("--strict", type="choice", choices=strictness_options, help="set strictness \ level (possible levels: %s" % ', '.join(strictness_options)) - # only allow --job so we can filter it afterwards parser.add_option("--job", action="store_true", help="will submit the build as a job") @@ -193,11 +192,6 @@ def main(): if options.strict: filetools.strictness = options.strict - if options.job: - submit_build_job(log) - log.info("submitted job, exiting now") - sys.exit(0) - ## Read easyconfig files packages = [] if len(paths) == 0: @@ -242,6 +236,13 @@ def main(): print_msg("No packages left to be built.", log) orderedSpecs = [] + if options.job: + curdir = os.getcwd() + command = "cd %s && python %s %%s -d" + parbuild.build_packages_in_parallel(command, packages, "easybuild-build") + log.info("Submitted parallel build jobs, exiting now") + sys.exit(0) + ## Build software, will exit when errors occurs (except when regtesting) correct_built_cnt = 0 all_built_cnt = 0 @@ -708,24 +709,6 @@ def build(module, options, log, origEnviron, exitOnFailure=True): return (True, applicationLog) -def submit_build_job(log): - """ - will submit the current command (sys.argv) without the --job paramater as a job - any environment variable that is been set that starts with EASYBUILD will be passed on the job - """ - command = " ".join([arg for arg in sys.argv if arg != '--job']) - - easybuild_vars = {} - for name in os.environ: - if name.startswith("EASYBUILD"): - easybuild_vars[name] = os.environ[name] - - name = "easybuild-%s" % datetime.now().strftime("%m-%d-%Y-%H:%M:%S") - job = PbsJob(command, name, easybuild_vars) - job.submit() - log.info("job submitted. info: %s", job.info()) - - if __name__ == "__main__": try: main() From 943f360cedec4412416ae25f9dab69413186e6c9 Mon Sep 17 00:00:00 2001 From: Toon Willems Date: Fri, 10 Aug 2012 09:33:57 +0200 Subject: [PATCH 573/798] add retrieval of buildstats to repository --- easybuild/tools/repository.py | 26 +++++++++++++++++++++++++- 1 file changed, 25 insertions(+), 1 deletion(-) diff --git a/easybuild/tools/repository.py b/easybuild/tools/repository.py index b2c12d7c72..7205f0dcb0 100644 --- a/easybuild/tools/repository.py +++ b/easybuild/tools/repository.py @@ -36,6 +36,7 @@ import time import easybuild +from easybuild.framework.easyblock import EasyBlock from easybuild.tools.build_log import getLog @@ -103,7 +104,13 @@ def cleanup(self): """ Clean up working copy. """ - return + pass + + def get_buildstats(self, name, version): + """ + Get the build statististics for module with name and version + """ + pass class FileRepository(Repository): @@ -165,6 +172,23 @@ def addEasyconfig(self, cfg, name, version, stats, previous): return dest + def get_buildstats(self, name, version): + """ + return the build statistics + """ + full_path = os.path.join(self.wc, self.subdir, name) + if not os.path.isdir(full_path): + log.debug("module (%s) has not been found in the repo" % name) + return [] + + dest = os.path.join(full_path, "%s.eb" % version) + if not os.path.isfile(dest): + log.debug("version (%s) of module (%s) has not been found in the repo" % (version, name)) + return [] + + eb = EasyBlock(dest) + return eb['buildstats'] + class GitRepository(FileRepository): """ From 842870f4f21315fcfb399a3c787503b92ecc532e Mon Sep 17 00:00:00 2001 From: Toon Willems Date: Fri, 10 Aug 2012 09:47:39 +0200 Subject: [PATCH 574/798] rewrite so I don't have to deal with dependencies --- easybuild/tools/filetools.py | 3 +-- easybuild/tools/repository.py | 2 +- 2 files changed, 2 insertions(+), 3 deletions(-) diff --git a/easybuild/tools/filetools.py b/easybuild/tools/filetools.py index 6e4198e2a6..0ee01a0d04 100644 --- a/easybuild/tools/filetools.py +++ b/easybuild/tools/filetools.py @@ -38,7 +38,6 @@ import easybuild.tools.environment as env from easybuild.tools.asyncprocess import Popen, PIPE, STDOUT, send_all, recv_some from easybuild.tools.build_log import getLog -from easybuild.tools.config import logPath log = getLog('fileTools') @@ -93,7 +92,7 @@ def findBaseDir(): """ def getLocalDirsPurged(): ## e.g. always purge the log directory - ignoreDirs = [logPath()] + ignoreDirs = ["easybuild"] lst = os.listdir(os.getcwd()) for ignDir in ignoreDirs: diff --git a/easybuild/tools/repository.py b/easybuild/tools/repository.py index 7205f0dcb0..cfa93ca945 100644 --- a/easybuild/tools/repository.py +++ b/easybuild/tools/repository.py @@ -160,7 +160,7 @@ def addEasyconfig(self, cfg, name, version, stats, previous): # append a line to the eb file so we don't have git merge conflicts if not previous: - statstemplate = "\n#Build statistics\nbuildstats=[%s]t\n" + statstemplate = "\n#Build statistics\nbuildstats=[%s]\n" else: statstemplate = "\nbuildstats.append(%s)\n" From ce0b5fb60721d3441c35ac8be6ad617d4b9d51a2 Mon Sep 17 00:00:00 2001 From: Toon Willems Date: Fri, 10 Aug 2012 10:18:33 +0200 Subject: [PATCH 575/798] fix build command --- easybuild/build.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/easybuild/build.py b/easybuild/build.py index eb3328b9cf..12691f9ff5 100644 --- a/easybuild/build.py +++ b/easybuild/build.py @@ -238,7 +238,7 @@ def main(): if options.job: curdir = os.getcwd() - command = "cd %s && python %s %%s -d" + command = "cd %s && python %s %%s -d" % (curdir, sys.argv[0]) parbuild.build_packages_in_parallel(command, packages, "easybuild-build") log.info("Submitted parallel build jobs, exiting now") sys.exit(0) From a04ab002e048f596d0b0706b512fd6433eef9354 Mon Sep 17 00:00:00 2001 From: Toon Willems Date: Fri, 10 Aug 2012 10:20:56 +0200 Subject: [PATCH 576/798] add log output to parallelbuild --- easybuild/tools/parallelbuild.py | 2 ++ 1 file changed, 2 insertions(+) diff --git a/easybuild/tools/parallelbuild.py b/easybuild/tools/parallelbuild.py index 40805e797c..fb46984f12 100644 --- a/easybuild/tools/parallelbuild.py +++ b/easybuild/tools/parallelbuild.py @@ -44,11 +44,13 @@ def build_packages_in_parallel(build_command, packages, output_dir): prepare_package(pkg) # the new job will only depend on already submitted jobs + log.info("creating job for pkg: %s" % str(pkg)) new_job = create_job(build_command, pkg, output_dir) # Sometimes unresolvedDependencies will contain things, not needed to be build. job_deps = [job_module_dict[dep] for dep in pkg['unresolvedDependencies'] if dep in job_module_dict] new_job.add_dependencies(job_deps) new_job.submit() + log.info("job for module %s has been submitted (job id: %s)" % (job.module, job.jobid)) # update dictionary job_module_dict[new_job.module] = new_job.jobid From 13e4dc0fc5b81b8a99c4ba2b0f2ebe8a7ccd189f Mon Sep 17 00:00:00 2001 From: Toon Willems Date: Fri, 10 Aug 2012 10:24:22 +0200 Subject: [PATCH 577/798] explicit log argument --- easybuild/build.py | 2 +- easybuild/scripts/regtest.py | 2 +- easybuild/tools/parallelbuild.py | 6 ++---- 3 files changed, 4 insertions(+), 6 deletions(-) diff --git a/easybuild/build.py b/easybuild/build.py index 12691f9ff5..2c7960033b 100644 --- a/easybuild/build.py +++ b/easybuild/build.py @@ -239,7 +239,7 @@ def main(): if options.job: curdir = os.getcwd() command = "cd %s && python %s %%s -d" % (curdir, sys.argv[0]) - parbuild.build_packages_in_parallel(command, packages, "easybuild-build") + parbuild.build_packages_in_parallel(command, packages, "easybuild-build", log) log.info("Submitted parallel build jobs, exiting now") sys.exit(0) diff --git a/easybuild/scripts/regtest.py b/easybuild/scripts/regtest.py index f4a5153712..41890897e3 100755 --- a/easybuild/scripts/regtest.py +++ b/easybuild/scripts/regtest.py @@ -131,7 +131,7 @@ def main(): resolved = resolveDependencies(packages, opts.robot, log) # use %%s so i can later replace it command = "cd %s && python %s %%s --no-parallel" % (cur_dir, sys.argv[0]) - parbuild.build_packages_in_parallel(command, resolved, output_dir) + parbuild.build_packages_in_parallel(command, resolved, output_dir, log) else: build_packages(packages, output_dir) diff --git a/easybuild/tools/parallelbuild.py b/easybuild/tools/parallelbuild.py index fb46984f12..c3d23fe4d1 100644 --- a/easybuild/tools/parallelbuild.py +++ b/easybuild/tools/parallelbuild.py @@ -28,9 +28,7 @@ from easybuild.tools.build_log import getLog from easybuild.tools.pbs_job import PbsJob -log = getLog("ParallelBuild") - -def build_packages_in_parallel(build_command, packages, output_dir): +def build_packages_in_parallel(build_command, packages, output_dir, log): """ list is a list of packages which can be build! (e.g. they have no unresolved dependencies) this function will build them in parallel by submitting jobs @@ -86,7 +84,7 @@ def create_job(build_command, package, output_dir): return job -def get_instance(package): +def get_instance(package, log): """ get an instance for this package """ spec = package['spec'] name = package['module'][0] From 2a55507e211507678412c591960b8a7a49bc1a91 Mon Sep 17 00:00:00 2001 From: Toon Willems Date: Fri, 10 Aug 2012 10:26:34 +0200 Subject: [PATCH 578/798] more log output --- easybuild/tools/parallelbuild.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/easybuild/tools/parallelbuild.py b/easybuild/tools/parallelbuild.py index c3d23fe4d1..f8d5c5232a 100644 --- a/easybuild/tools/parallelbuild.py +++ b/easybuild/tools/parallelbuild.py @@ -25,7 +25,6 @@ import re from easybuild.framework.application import get_class -from easybuild.tools.build_log import getLog from easybuild.tools.pbs_job import PbsJob def build_packages_in_parallel(build_command, packages, output_dir, log): @@ -33,6 +32,7 @@ def build_packages_in_parallel(build_command, packages, output_dir, log): list is a list of packages which can be build! (e.g. they have no unresolved dependencies) this function will build them in parallel by submitting jobs """ + log.info("going to build these packages in parallel: %s", packages) job_module_dict = {} # dependencies have already been resolved this means i can linearly walk over the list and use previous job id's for pkg in packages: From e2cff59ba7c0ddf3be71c0c258e1e2e77cb6aec6 Mon Sep 17 00:00:00 2001 From: Toon Willems Date: Fri, 10 Aug 2012 10:27:29 +0200 Subject: [PATCH 579/798] i feel dumb now --- easybuild/build.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/easybuild/build.py b/easybuild/build.py index 2c7960033b..36f2660b9b 100644 --- a/easybuild/build.py +++ b/easybuild/build.py @@ -239,7 +239,7 @@ def main(): if options.job: curdir = os.getcwd() command = "cd %s && python %s %%s -d" % (curdir, sys.argv[0]) - parbuild.build_packages_in_parallel(command, packages, "easybuild-build", log) + parbuild.build_packages_in_parallel(command, orderedSpecs, "easybuild-build", log) log.info("Submitted parallel build jobs, exiting now") sys.exit(0) From 0f7cdd5b6e7410849869b86d8c4b70b8d0caee89 Mon Sep 17 00:00:00 2001 From: Toon Willems Date: Fri, 10 Aug 2012 10:29:49 +0200 Subject: [PATCH 580/798] of course, I had to screw that up as well --- easybuild/tools/parallelbuild.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/easybuild/tools/parallelbuild.py b/easybuild/tools/parallelbuild.py index f8d5c5232a..5012fcd5e2 100644 --- a/easybuild/tools/parallelbuild.py +++ b/easybuild/tools/parallelbuild.py @@ -48,7 +48,7 @@ def build_packages_in_parallel(build_command, packages, output_dir, log): job_deps = [job_module_dict[dep] for dep in pkg['unresolvedDependencies'] if dep in job_module_dict] new_job.add_dependencies(job_deps) new_job.submit() - log.info("job for module %s has been submitted (job id: %s)" % (job.module, job.jobid)) + log.info("job for module %s has been submitted (job id: %s)" % (new_job.module, new_job.jobid)) # update dictionary job_module_dict[new_job.module] = new_job.jobid From 4ae1c0710d0b53aec749704c5e211d6e31acfc2d Mon Sep 17 00:00:00 2001 From: Toon Willems Date: Fri, 10 Aug 2012 11:07:43 +0200 Subject: [PATCH 581/798] add check for SOFTROOT keys in environ --- easybuild/build.py | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/easybuild/build.py b/easybuild/build.py index fc4fe93290..0575193abe 100644 --- a/easybuild/build.py +++ b/easybuild/build.py @@ -193,6 +193,11 @@ def main(): if options.strict: filetools.strictness = options.strict + bad_keys = ["$%s" % key for key in os.environ if key.startswith("SOFTROOT")] + if bad_keys: + log.error("You have some easybuild modules loaded: %s are set in your environment" % bad_keys) + + if options.job: submit_build_job(log) log.info("submitted job, exiting now") From 9ddefcd770128db28bb6244bda4d116d188ef6bd Mon Sep 17 00:00:00 2001 From: Toon Willems Date: Fri, 10 Aug 2012 11:18:12 +0200 Subject: [PATCH 582/798] remove empty line --- easybuild/build.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/easybuild/build.py b/easybuild/build.py index 0575193abe..faac78efca 100644 --- a/easybuild/build.py +++ b/easybuild/build.py @@ -193,11 +193,11 @@ def main(): if options.strict: filetools.strictness = options.strict + # Check if any modules are loaded which could influence the build process bad_keys = ["$%s" % key for key in os.environ if key.startswith("SOFTROOT")] if bad_keys: log.error("You have some easybuild modules loaded: %s are set in your environment" % bad_keys) - if options.job: submit_build_job(log) log.info("submitted job, exiting now") From abd8a8bccecfbfad4cee45112cfa2132415afa9a Mon Sep 17 00:00:00 2001 From: Toon Willems Date: Fri, 10 Aug 2012 11:32:29 +0200 Subject: [PATCH 583/798] fix header in application --- easybuild/framework/application.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/easybuild/framework/application.py b/easybuild/framework/application.py index 35f38ded14..ff1f6b87c3 100644 --- a/easybuild/framework/application.py +++ b/easybuild/framework/application.py @@ -1,4 +1,4 @@ -# +## # Copyright 2009-2012 Stijn De Weirdt # Copyright 2010 Dries Verdegem # Copyright 2010-2012 Kenneth Hoste From 0ec32e4d2d25e78b2bec946e3cdc13e20b20ecf9 Mon Sep 17 00:00:00 2001 From: Toon Willems Date: Fri, 10 Aug 2012 13:50:10 +0200 Subject: [PATCH 584/798] add creating of fake module (so 's are set) --- easybuild/framework/application.py | 16 ++++++++++++++-- 1 file changed, 14 insertions(+), 2 deletions(-) diff --git a/easybuild/framework/application.py b/easybuild/framework/application.py index c0faa7bbd7..410d6e6864 100644 --- a/easybuild/framework/application.py +++ b/easybuild/framework/application.py @@ -1089,8 +1089,20 @@ def make_devel_module(self): WARNING: you cannot unload using $SOFTDEVELNAME (for now: use module unload `basename $SOFTDEVELNAME`) """ - self.log.debug("loaded modules: %s" % Modules().loaded_modules()) - mod_gen = ModuleGenerator(self) + # first try loading the fake module (might have happened during sanity check, doesn't matter anyway + # make fake module + mod_path = [self.make_module(True)] + + # load the module + mod_path.extend(Modules().modulePath) + m = Modules(mod_path) + self.log.debug("created module instance") + m.addModule([[self.name(), self.installversion()]]) + try: + m.load() + except EasyBuildError, err: + self.log.debug("Loading module failed: %s" % err) + self.log.debug("loaded modules: %s" % Modules().loaded_modules()) header = "#%Module\n" From 50d6f28a8ddb1badc00f329321b72983e92620e1 Mon Sep 17 00:00:00 2001 From: Toon Willems Date: Fri, 10 Aug 2012 13:56:07 +0200 Subject: [PATCH 585/798] empty line added --- easybuild/scripts/regtest.py | 1 + 1 file changed, 1 insertion(+) diff --git a/easybuild/scripts/regtest.py b/easybuild/scripts/regtest.py index 41890897e3..33e28f24e4 100755 --- a/easybuild/scripts/regtest.py +++ b/easybuild/scripts/regtest.py @@ -72,6 +72,7 @@ test_results = [] build_stopped = {} + def main(): """ main entry point """ # assume default config path From ac180a299cad41848b916c1759ec9e34dd85e7b9 Mon Sep 17 00:00:00 2001 From: Kenneth Hoste Date: Fri, 10 Aug 2012 14:02:37 +0200 Subject: [PATCH 586/798] add support for building PETSc and SLEPc, as dependencies of DOLFIN; copy include files for ScaLAPACK; define env vars for ScaLAPACK and FFTW add UFconfig dir to CPATH in SuiteSparse add patch file for outdated PETSc/SLEPc stuff in DOLFIN --- easybuild/easyblocks/d/dolfin.py | 22 +- easybuild/easyblocks/p/petsc.py | 262 ++++++++++++++++++ easybuild/easyblocks/s/scalapack.py | 29 +- easybuild/easyblocks/s/slepc.py | 117 ++++++++ easybuild/easyblocks/s/suitesparse.py | 10 +- ...-1.0.0-goalf-1.1.0-no-OFED-Python-2.7.3.eb | 5 +- .../d/DOLFIN/petsc-slepc-libs.patch | 59 ++++ ...3.3-p2-goalf-1.1.0-no-OFED-Python-2.7.3.eb | 30 ++ easybuild/easyconfigs/p/PETSc/fix.patch | 12 + ...3.3-p1-goalf-1.1.0-no-OFED-Python-2.7.3.eb | 17 ++ easybuild/tools/toolkit.py | 45 ++- 11 files changed, 579 insertions(+), 29 deletions(-) create mode 100644 easybuild/easyblocks/p/petsc.py create mode 100644 easybuild/easyblocks/s/slepc.py create mode 100644 easybuild/easyconfigs/d/DOLFIN/petsc-slepc-libs.patch create mode 100644 easybuild/easyconfigs/p/PETSc/PETSc-3.3-p2-goalf-1.1.0-no-OFED-Python-2.7.3.eb create mode 100644 easybuild/easyconfigs/p/PETSc/fix.patch create mode 100644 easybuild/easyconfigs/s/SLEPc/SLEPc-3.3-p1-goalf-1.1.0-no-OFED-Python-2.7.3.eb diff --git a/easybuild/easyblocks/d/dolfin.py b/easybuild/easyblocks/d/dolfin.py index 01668f52b5..8231f9c6ce 100644 --- a/easybuild/easyblocks/d/dolfin.py +++ b/easybuild/easyblocks/d/dolfin.py @@ -34,7 +34,8 @@ def configure(self): """Configure Dolfin build.""" # make sure that required dependencies are loaded - deps = ['Armadillo', 'Boost', 'CGAL', 'ParMETIS', 'Python', 'SCOTCH', 'SuiteSparse', 'UFC'] + deps = ['Armadillo', 'Boost', 'CGAL', 'ParMETIS', 'PETSc', 'Python', 'SCOTCH', + 'SLEPc', 'SuiteSparse', 'UFC'] depsdict = {} for dep in deps: deproot = get_software_root(dep) @@ -88,15 +89,24 @@ def configure(self): self.updatecfg('configopts', umfpack_params % {'sp':suitesparse}) # ParMETIS and SCOTCH - self.updatecfg('configopts', ' -DPARMETIS_DIR="%s"' % depsdict['ParMETIS']) - self.updatecfg('configopts', ' -DSCOTCH_DIR="%s" -DSCOTCH_DEBUG:BOOL=ON' % depsdict['SCOTCH']) + self.updatecfg('configopts', '-DPARMETIS_DIR="%s"' % depsdict['ParMETIS']) + self.updatecfg('configopts', '-DSCOTCH_DIR="%s" -DSCOTCH_DEBUG:BOOL=ON' % depsdict['SCOTCH']) # BLACS and LAPACK - self.updatecfg('configopts', ' -DBLAS_LIBRARIES:PATH="$LIBBLAS"') - self.updatecfg('configopts', ' -DLAPACK_LIBRARIES:PATH="$LIBLAPACK"') + self.updatecfg('configopts', '-DBLAS_LIBRARIES:PATH="%s"' % os.getenv('LIBBLAS')) + self.updatecfg('configopts', '-DLAPACK_LIBRARIES:PATH="%s"' % os.getenv('LIBLAPACK')) # CGAL - self.updatecfg('configopts', ' -DCGAL_DIR:PATH="%s"' % depsdict['CGAL']) + self.updatecfg('configopts', '-DCGAL_DIR:PATH="%s"' % depsdict['CGAL']) + + # PETSc + # need to specify PETSC_ARCH explicitely (env var alone is not sufficient) + for env_var in ["PETSC_DIR", "PETSC_ARCH"]: + val = os.getenv(env_var) + if val: + self.updatecfg('configopts', '-D%s=%s' % (env_var, val)) + else: + self.log.error("Environment variable %s not set?!?" % env_var) # set correct openmp options openmp = self.toolkit().get_openmp_flag() diff --git a/easybuild/easyblocks/p/petsc.py b/easybuild/easyblocks/p/petsc.py new file mode 100644 index 0000000000..7fa03fbeae --- /dev/null +++ b/easybuild/easyblocks/p/petsc.py @@ -0,0 +1,262 @@ +## +# Copyright 2012 Kenneth Hoste +# +# This file is part of EasyBuild, +# originally created by the HPC team of the University of Ghent (http://ugent.be/hpc). +# +# http://github.com/hpcugent/easybuild +# +# EasyBuild is free software: you can redistribute it and/or modify +# it under the terms of the GNU General Public License as published by +# the Free Software Foundation v2. +# +# EasyBuild is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with EasyBuild. If not, see . +## +""" +EasyBuild support for building and installing PETSc, implemented as an easyblock +""" + +import os +import re +from distutils.version import LooseVersion + +import easybuild.tools.environment as env +import easybuild.tools.toolkit as toolkit +from easybuild.framework.application import Application +from easybuild.tools.filetools import run_cmd +from easybuild.tools.modules import get_software_root +from easybuild.tools.systemtools import get_shared_lib_ext + + +class PETSc(Application): + """Support for building and installing PETSc""" + + def __init__(self, *args, **kwargs): + """Initialize PETSc specific variables, specify build in install dir.""" + Application.__init__(self, *args, **kwargs) + + self.build_in_installdir = True + + self.petsc_arch = None + self.petsc_arch_dir = "" + + def extra_options(self): + """Add extra config options specific to PETSc.""" + extra_vars = { + 'source-install': [False, "Indicates whether a source installation should be performed (default: False)"], + 'shared_libs': [False, "Build shared libraries (default: False)"], + 'with_papi': [False, "Enable PAPI support (default: False)"], + 'papi_inc': ['/usr/include', "Path for PAPI include files (default: /usr/include)"], + 'papi_lib': ['/usr/lib64/libpapi.so', "Path for PAPI library (default: '/usr/lib64/libpapi.so')"], + 'runtest': ['test', "Make target to test build (default: test)"] + } + return Application.extra_options(self, extra_vars) + + def configure(self): + """Configure PETSc by setting configure options and running configure script.""" + + if LooseVersion(self.version()) >= LooseVersion("3"): + + # compilers + self.updatecfg('configopts', '--with-cc=%s' % os.getenv('CC')) + self.updatecfg('configopts', '--with-cxx=%s --with-c++-support' % os.getenv('CXX')) + self.updatecfg('configopts', '--with-fc=%s' % os.getenv('F90')) + + # compiler flags + self.updatecfg('configopts', '--with-cflags=%s' % os.getenv('CFLAGS')) + self.updatecfg('configopts', '--with-cxxflags=%s' % os.getenv('CXXFLAGS')) + self.updatecfg('configopts', '--with-fcflags=%s' % os.getenv('F90FLAGS')) + + if not self.toolkit().comp_family() == toolkit.GCC: + self.updatecfg('configopts', '--with-gnu-compilers=0') + + # MPI + if self.toolkit().opts['usempi']: + self.updatecfg('configopts', '--with-mpi=1') + + # build options + self.updatecfg('configopts', '--with-make-np=%s' % self.getcfg('parallel')) + self.updatecfg('configopts', '--with-shared-libraries=%d' % self.getcfg('shared_libs')) + self.updatecfg('configopts', '--with-debugging=%d' % self.toolkit().opts['debug']) + self.updatecfg('configopts', '--with-pic=%d' % self.toolkit().opts['pic']) + self.updatecfg('configopts', '--with-x=0 --with-windows-graphics=0') + + # PAPI support + if self.getcfg('with_papi'): + papi_inc = self.getcfg('papi_inc') + papi_inc_file = os.path.join(papi_inc, "papi.h") + papi_lib = self.getcfg('papi_lib') + if os.path.isfile(papi_inc_file) and os.path.isfile(papi_lib): + self.updatecfg('configopts', '--with-papi=1') + self.updatecfg('configopts', '--with-papi-include=%s' % papi_inc) + self.updatecfg('configopts', '--with-papi-lib=%s' % papi_lib) + else: + self.log.error("PAPI header (%s) and/or lib (%s) not found, " % (papi_inc_file, + papi_lib) + \ + "can not enable PAPI support?") + + # Python packages + if get_software_root('Python'): + self.updatecfg('configopts', '--with-numpy=1') + if self.getcfg('shared_libs'): + self.updatecfg('configopts', '--with-mpi4py=1') + + # BLACS, FFTW, ScaLAPACK + for dep in ["BLACS", "FFTW", "ScaLAPACK"]: + inc = os.getenv('%s_INC' % dep.upper()) + libdir = os.getenv('%s_LIB_DIR' % dep.upper()) + libs = os.getenv('%s_STATIC_LIBS' % dep.upper()) + if inc and libdir and libs: + with_arg = "--with-%s" % dep.lower() + self.updatecfg('configopts', '%s=1' % with_arg) + self.updatecfg('configopts', '%s-include=%s' % (with_arg, inc)) + self.updatecfg('configopts', '%s-lib=[%s/%s]' % (with_arg, libdir, libs)) + else: + self.log.info("Missing inc/lib info, so not enabling %s support." % dep) + + # BLAS, LAPACK libraries + bl_libdir = os.getenv('BLAS_LAPACK_LIB_DIR') + bl_libs = os.getenv('BLAS_LAPACK_STATIC_LIBS') + if bl_libdir and bl_libs: + self.updatecfg('configopts', '--with-blas-lapack-lib=[%s/%s]' % (bl_libdir, bl_libs)) + else: + self.log.error("One or more environment variables for BLAS/LAPACK not defined?") + + # additional dependencies + for dep in ["Boost", "FFC", "FIAT", "HDF5", "METIS", "netCDF", "ParMETIS", + "ScientificPython", ("SCOTCH", "ptscotch")]: + if type(dep) == str: + dep = (dep, dep) + deproot = get_software_root(dep[0]) + if deproot: + withdep = "--with-%s" % dep[1].lower() + self.updatecfg('configopts', '%s=1 %s-dir=%s' % (withdep, withdep, deproot)) + + # CHOLMOD and UMFPACK are part of SuiteSparse + suitesparse = get_software_root('SuiteSparse') + if suitesparse: + withdep = "--with-umfpack" + # specified order of libs matters! + umfpack_libs = [os.path.join(suitesparse, l, "Lib", "lib%s.a" % l.lower()) for l in ["UMFPACK", + "CHOLMOD", + "COLAMD", + "AMD"]] + + self.updatecfg('configopts', ' '.join([(withdep+x) for x in ["=1", + "-include=%s" % os.path.join(suitesparse, "UMFPACK", "Include"), + "-lib=[%s]" % ','.join(umfpack_libs) + ]])) + + # set PETSC_DIR for configure (env) and make + env.set('PETSC_DIR', self.getcfg('startfrom')) + self.updatecfg('makeopts', 'PETSC_DIR=%s' % self.getcfg('startfrom')) + + # run configure without --prefix (required) + cmd = "%s ./configure %s" % (self.getcfg('preconfigopts'), self.getcfg('configopts')) + (out, _) = run_cmd(cmd, log_all=True, simple=False) + + # check for errors in configure + error_regexp = re.compile("ERROR") + if error_regexp.search(out): + self.log.error("Error(s) detected in configure output!") + + # configure should set PETSC_ARCH + petsc_arch_regex = re.compile("^\s*PETSC_ARCH:\s*(\S+)$", re.M) + res = petsc_arch_regex.search(out) + if res: + self.petsc_arch = res.group(1) + self.updatecfg('makeopts', 'PETSC_ARCH=%s' % self.petsc_arch) + else: + self.log.error("Failed to determine PETSC_ARCH setting.") + + self.petsc_arch_dir = os.path.join('%s-%s' % (self.name().lower(), + self.version()), + self.petsc_arch) + + else: # old versions (< 3.x) + + self.updatecfg('configopts', '--prefix=%s' % self.installdir) + self.updatecfg('configopts', '--with-shared=1') + + # additional dependencies + for dep in ["SCOTCH"]: + deproot = get_software_root(dep) + if deproot: + withdep = "--with-%s" % dep.lower() + self.updatecfg('configopts', '%s=1 %s-dir=%s' % (withdep, withdep, deproot)) + + cmd = "./config/configure.py %s" % self.get_cfg('configopts') + run_cmd(cmd, log_all=True, simple=True) + + # default make should be fine + + def make_install(self): + + if LooseVersion(self.version()) >= LooseVersion("3"): + pass + + else: # old versions (< 3.x) + + try: + for f in ['petscconf.h', 'petscconfiginfo.h', 'petscfix.h', 'petscmachineinfo.h']: + includedir = os.path.join(self.installdir, 'include') + bmakedir = os.path.join(self.installdir, 'bmake', 'linux-gnu-c-opt') + os.symlink(os.path.join(bmakedir, f), os.path.join(includedir, f)) + except Exception, err: + self.log.error("Something went wrong during symlink creation of file %s: %s" % (f, err)) + + def make_module_req_guess(self): + """Specify correct LD_LIBRARY_PATH and CPATH for PETSc installation.""" + + guesses = Application.make_module_req_guess(self) + + subdir = '%s-%s' % (self.name().lower(), self.version()) + + guesses.update({ + 'PATH': [os.path.join(subdir, "bin")], + 'CPATH': [os.path.join(subdir, self.petsc_arch, "include"), + os.path.join(subdir, "include")], + 'LD_LIBRARY_PATH': [os.path.join(subdir, self.petsc_arch, "lib")] + }) + + return guesses + + def make_module_extra(self): + """Set PETSc specific environment variables (PETSC_DIR, PETSC_ARCH).""" + txt = Application.make_module_extra(self) + + txt += self.moduleGenerator.setEnvironment('PETSC_DIR', '$root/%s-%s' % (self.name().lower(), + self.version())) + txt += self.moduleGenerator.setEnvironment('PETSC_ARCH', self.petsc_arch) + + return txt + + def sanitycheck(self): + """Custom sanity check for PETSc""" + + if not self.getcfg('sanityCheckPaths'): + + if self.getcfg('shared_libs'): + libext = get_shared_lib_ext() + else: + libext = "a" + + self.setcfg('sanityCheckPaths', {'files': [os.path.join(self.petsc_arch_dir, + "lib", + "libpetsc.%s" % libext) + ], + 'dirs': [os.path.join(self.petsc_arch_dir, x) for x in ["../bin", + "conf", + "include" + ]] + }) + + self.log.info("Customized sanity check paths: %s" % self.getcfg('sanityCheckPaths')) + + Application.sanitycheck(self) diff --git a/easybuild/easyblocks/s/scalapack.py b/easybuild/easyblocks/s/scalapack.py index 2a48212901..0f331271c1 100644 --- a/easybuild/easyblocks/s/scalapack.py +++ b/easybuild/easyblocks/s/scalapack.py @@ -26,6 +26,7 @@ EasyBuild support for building and installing ScaLAPACK, implemented as an easyblock """ +import glob import os import shutil from distutils.version import LooseVersion @@ -151,14 +152,28 @@ def make(self): def make_install(self): """Install by copying files to install dir.""" - src = os.path.join(self.getcfg('startfrom'), 'libscalapack.a') - dest = os.path.join(self.installdir, 'lib') + # include files and libraries + for (srcdir, destdir, ext) in [ + ("SRC", "include", ".h"), # include files + ("", "lib", ".a"), # libraries + ]: - try: - os.makedirs(dest) - shutil.copy2(src,dest) - except OSError, err: - self.log.error("Copying %s to installation dir %s failed: %s" % (src, dest, err)) + src = os.path.join(self.getcfg('startfrom'), srcdir) + dest = os.path.join(self.installdir, destdir) + + try: + os.makedirs(dest) + os.chdir(src) + + for lib in glob.glob('*%s' % ext): + + # copy file + shutil.copy2(os.path.join(src, lib), dest) + + self.log.debug("Copied %s to %s" % (lib, dest)) + + except OSError, err: + self.log.error("Copying %s/*.%s to installation dir %s failed: %s"%(src, ext, dest, err)) def sanitycheck(self): """Custom sanity check for ScaLAPACK.""" diff --git a/easybuild/easyblocks/s/slepc.py b/easybuild/easyblocks/s/slepc.py new file mode 100644 index 0000000000..097bcf46ad --- /dev/null +++ b/easybuild/easyblocks/s/slepc.py @@ -0,0 +1,117 @@ +## +# Copyright 2012 Kenneth Hoste +# +# This file is part of EasyBuild, +# originally created by the HPC team of the University of Ghent (http://ugent.be/hpc). +# +# http://github.com/hpcugent/easybuild +# +# EasyBuild is free software: you can redistribute it and/or modify +# it under the terms of the GNU General Public License as published by +# the Free Software Foundation v2. +# +# EasyBuild is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with EasyBuild. If not, see . +## +""" +EasyBuild support for building and installing SLEPc, implemented as an easyblock +""" + +import os +import re + +import easybuild.tools.environment as env +from easybuild.framework.application import Application +from easybuild.tools.filetools import run_cmd +from easybuild.tools.modules import get_software_root + + +class SLEPc(Application): + """Support for building and installing SLEPc""" + + def __init__(self, *args, **kwargs): + """Specify that SLEPc should be built in install dir.""" + Application.__init__(self, *args, **kwargs) + + self.build_in_installdir = True + + self.slepc_arch_dir = None + + def extra_options(self): + """Add extra config options specific to SLEPc.""" + extra_vars = { + 'source-install': [False, "Indicates whether a source installation should be performed (default: False)"], + 'runtest': ['test', "Make target to test build (default: test)"] + } + return Application.extra_options(self, extra_vars) + + def configure(self): + """Configure SLEPc by setting configure options and running configure script.""" + + # check PETSc dependency + if not get_software_root("PETSc"): + self.log.error("PETSc module not loaded?") + + # set SLEPC_DIR environment variable + env.set('SLEPC_DIR', self.getcfg('startfrom')) + self.log.debug('SLEPC_DIR: %s' % os.getenv('SLEPC_DIR')) + + # optional dependencies + for dep in ["ARPACK", "BLZPACK", "PRIMME", "TRLAN"]: + deproot = get_software_root(dep) + if deproot: + withdep = "--with-%s" % dep.lower() + self.updatecfg('configopts', '%s=1 %s-dir=%s' % (withdep, withdep, deproot)) + + # run configure without --prefix (required) + cmd = "%s ./configure %s" % (self.getcfg('preconfigopts'), self.getcfg('configopts')) + (out, _) = run_cmd(cmd, log_all=True, simple=False) + + # check for errors in configure + error_regexp = re.compile("ERROR") + if error_regexp.search(out): + self.log.error("Error(s) detected in configure output!") + + self.slepc_arch_dir = os.path.join('%s-%s' % (self.name().lower(), + self.version()), + os.getenv('PETSC_ARCH')) + + def make_module_req_guess(self): + """Specify correct LD_LIBRARY_PATH and CPATH for SLEPc installation.""" + + guesses = Application.make_module_req_guess(self) + + guesses.update({ + 'CPATH': [os.path.join(self.slepc_arch_dir, "include")], + 'LD_LIBRARY_PATH': [os.path.join(self.slepc_arch_dir, "lib")] + }) + + return guesses + + def make_module_extra(self): + """Set SLEPc specific environment variables (SLEPC_DIR).""" + txt = Application.make_module_extra(self) + + txt += self.moduleGenerator.setEnvironment('SLEPC_DIR', '$root/%s-%s' % (self.name().lower(), + self.version())) + + return txt + + def sanitycheck(self): + """Custom sanity check for SLEPc""" + if not self.getcfg('sanityCheckPaths'): + + self.setcfg('sanityCheckPaths', {'files': [], + 'dirs': [os.path.join(self.slepc_arch_dir, x) for x in ["conf", + "include", + "lib"]] + }) + + self.log.info("Customized sanity check paths: %s" % self.getcfg('sanityCheckPaths')) + + Application.sanitycheck(self) diff --git a/easybuild/easyblocks/s/suitesparse.py b/easybuild/easyblocks/s/suitesparse.py index ccaa53664f..a34be17ae1 100644 --- a/easybuild/easyblocks/s/suitesparse.py +++ b/easybuild/easyblocks/s/suitesparse.py @@ -117,6 +117,14 @@ def make_install(self): except Exception, err: self.log.error("Failed to make symbolic link from %s to %s: %s" % (src, dst, err)) + def make_module_req_guess(self): + """Add UFconfig dir to CPATH so UFconfig include file is found.""" + + guesses = Application.make_module_req_guess(self) + guesses.update({'CPATH': ["UFconfig"]}) + + return guesses + def sanitycheck(self): if not self.getcfg('sanityCheckPaths'): @@ -124,7 +132,7 @@ def sanitycheck(self): "COLAMD", "CXSparse", "KLU", "LDL", "RBio", "SPQR", "UMFPACK"]] + ["CSparse3/lib/libcsparse.a"], - 'dirs':[ "MATLAB_Tools"] + 'dirs':["MATLAB_Tools"] }) self.log.info("Customized sanity check paths: %s" % self.getcfg('sanityCheckPaths')) diff --git a/easybuild/easyconfigs/d/DOLFIN/DOLFIN-1.0.0-goalf-1.1.0-no-OFED-Python-2.7.3.eb b/easybuild/easyconfigs/d/DOLFIN/DOLFIN-1.0.0-goalf-1.1.0-no-OFED-Python-2.7.3.eb index 10468cd047..470c2ca8f9 100644 --- a/easybuild/easyconfigs/d/DOLFIN/DOLFIN-1.0.0-goalf-1.1.0-no-OFED-Python-2.7.3.eb +++ b/easybuild/easyconfigs/d/DOLFIN/DOLFIN-1.0.0-goalf-1.1.0-no-OFED-Python-2.7.3.eb @@ -17,7 +17,8 @@ else: sources=['%s-%s.tar.gz'%(name.lower(),version)] sourceURLs=['https://launchpad.net/%s/%s.x/%s/+download' % (name.lower(), majver, version)] -patches=['wl_pkg_linkflags.patch'] +patches=['wl_pkg_linkflags.patch', + 'petsc-slepc-libs.patch'] builddependencies = [('CMake', '2.8.4')] @@ -39,6 +40,8 @@ dependencies=[ ('ParMETIS', '4.0.2'), ('SuiteSparse', '3.7.0', '-withparmetis'), ('CGAL', '4.0', versionsuffix), + ('PETSc', '3.3-p2', versionsuffix), + ('SLEPc', '3.3-p1', versionsuffix), ('zlib', '1.2.7'), ('libxml2', '2.8.0') ] diff --git a/easybuild/easyconfigs/d/DOLFIN/petsc-slepc-libs.patch b/easybuild/easyconfigs/d/DOLFIN/petsc-slepc-libs.patch new file mode 100644 index 0000000000..27c2a30fc8 --- /dev/null +++ b/easybuild/easyconfigs/d/DOLFIN/petsc-slepc-libs.patch @@ -0,0 +1,59 @@ +diff -ru dolfin-1.0.0.orig/cmake/modules/FindPETSc.cmake dolfin-1.0.0/cmake/modules/FindPETSc.cmake +--- dolfin-1.0.0.orig/cmake/modules/FindPETSc.cmake 2011-12-07 22:21:22.000000000 +0100 ++++ dolfin-1.0.0/cmake/modules/FindPETSc.cmake 2012-08-10 13:02:21.032955197 +0200 +@@ -114,9 +114,10 @@ + petsc_get_variable(PETSC_INCLUDE PETSC_INCLUDE) # 3.1 + petsc_get_variable(PETSC_CC_INCLUDES PETSC_CC_INCLUDES) # dev + set(PETSC_INCLUDE ${PETSC_INCLUDE} ${PETSC_CC_INCLUDES}) +- petsc_get_variable(PETSC_LIB_BASIC PETSC_LIB_BASIC) ++ petsc_get_variable(PETSC_WITH_EXTERNAL_LIB PETSC_WITH_EXTERNAL_LIB) + petsc_get_variable(PETSC_LIB_DIR PETSC_LIB_DIR) +- set(PETSC_LIB "-L${PETSC_LIB_DIR} ${PETSC_LIB_BASIC}") ++ set(PETSC_LIB "-L${PETSC_LIB_DIR} ${PETSC_WITH_EXTERNAL_LIB}") ++ message(STATUS "PETSC_LIB ${PETSC_LIB}") + + # Remove temporary Makefile + file(REMOVE ${petsc_config_makefile}) +@@ -125,6 +126,7 @@ + include(ResolveCompilerPaths) + resolve_includes(PETSC_INCLUDE_DIRS "${PETSC_INCLUDE}") + resolve_libraries(PETSC_LIBRARIES "${PETSC_LIB}") ++ message(STATUS "PETSC_LIBRARIES ${PETSC_LIBRARIES}") + + # Add X11 includes and libraries on Mac + if (APPLE) +--- dolfin-1.0.0.orig/cmake/modules/FindSLEPc.cmake 2011-12-07 22:21:22.000000000 +0100 ++++ dolfin-1.0.0/cmake/modules/FindSLEPc.cmake 2012-08-10 13:16:30.115870158 +0200 +@@ -53,7 +53,7 @@ + + find_library(SLEPC_LIBRARY + NAMES slepc +- HINTS ${SLEPC_DIR}/lib $ENV{SLEPC_DIR}/lib ++ HINTS ${SLEPC_DIR}/lib ${SLEPC_DIR}/${PETSC_ARCH}/lib $ENV{SLEPC_DIR}/lib + DOC "The SLEPc library" + ) + mark_as_advanced(SLEPC_LIBRARY) +--- dolfin-1.0.0.orig/dolfin/la/PETScUserPreconditioner.cpp 2011-12-07 22:21:22.000000000 +0100 ++++ dolfin-1.0.0/dolfin/la/PETScUserPreconditioner.cpp 2012-08-10 13:27:57.024055423 +0200 +@@ -24,7 +24,7 @@ + #ifdef HAS_PETSC + + #include +-#include ++#include + #include + #include "PETScVector.h" + #include "PETScUserPreconditioner.h" +--- dolfin-1.0.0.orig/dolfin/la/PETScMatrix.cpp 2011-12-07 22:21:22.000000000 +0100 ++++ dolfin-1.0.0/dolfin/la/PETScMatrix.cpp 2012-08-10 13:38:47.188024814 +0200 +@@ -110,8 +110,8 @@ + // and number of off-diagonal non-zeroes (50 in this case). + // Note that guessing too high leads to excessive memory usage. + // In order to not waste any memory one would need to specify d_nnz and o_nnz. +- MatCreateMPIAIJ(PETSC_COMM_WORLD, PETSC_DECIDE, PETSC_DECIDE, M, N, +- 50, PETSC_NULL, 50, PETSC_NULL, A.get()); ++ MatCreateAIJ(PETSC_COMM_WORLD, PETSC_DECIDE, PETSC_DECIDE, M, N, ++ 50, PETSC_NULL, 50, PETSC_NULL, A.get()); + } + else + { diff --git a/easybuild/easyconfigs/p/PETSc/PETSc-3.3-p2-goalf-1.1.0-no-OFED-Python-2.7.3.eb b/easybuild/easyconfigs/p/PETSc/PETSc-3.3-p2-goalf-1.1.0-no-OFED-Python-2.7.3.eb new file mode 100644 index 0000000000..fa599fc279 --- /dev/null +++ b/easybuild/easyconfigs/p/PETSc/PETSc-3.3-p2-goalf-1.1.0-no-OFED-Python-2.7.3.eb @@ -0,0 +1,30 @@ +name = "PETSc" +version = "3.3-p2" + +homepage = 'http://www.mcs.anl.gov/petsc' +description = """PETSc, pronounced PET-see (the S is silent), is a suite of data structures and routines for the scalable (parallel) solution +of scientific applications modeled by partial differential equations.""" + +toolkit = {'name':'goalf', 'version':'1.1.0-no-OFED'} +toolkitopts = {'usempi': True, 'pic': True} + +sourceURLs=['http://ftp.mcs.anl.gov/pub/petsc/release-snapshots'] +sources=['%s-%s.tar.gz' % (name.lower(), version)] + +python_version = '2.7.3' +versionsuffix = '-Python-%s' % (python_version) + +dependencies = [ + ('Boost', '1.49.0', versionsuffix), + ('FIAT', '1.0.0', versionsuffix), + ('METIS', '5.0.2'), + ('ParMETIS', '4.0.2'), + ('Python', python_version), + ('ScientificPython', '2.8', versionsuffix), + ('SCOTCH', '5.1.12b_esmumps'), + ('SuiteSparse', '3.7.0', '-withparmetis'), # for CHOLMOD, UMFPACK + ] + +patches = ['fix.patch'] # ignore failed ranlib check on use of '-c' argument + +#shared_libs = True \ No newline at end of file diff --git a/easybuild/easyconfigs/p/PETSc/fix.patch b/easybuild/easyconfigs/p/PETSc/fix.patch new file mode 100644 index 0000000000..60447bba53 --- /dev/null +++ b/easybuild/easyconfigs/p/PETSc/fix.patch @@ -0,0 +1,12 @@ +diff -ru petsc-3.3-p2.orig/config/BuildSystem/config/setCompilers.py petsc-3.3-p2/config/BuildSystem/config/setCompilers.py +--- petsc-3.3-p2.orig/config/BuildSystem/config/setCompilers.py 2012-05-15 18:44:53.000000000 +0200 ++++ petsc-3.3-p2/config/BuildSystem/config/setCompilers.py 2012-08-08 08:49:28.439031948 +0200 +@@ -1060,7 +1060,7 @@ + yield ('win32fe tlib',self.getArchiverFlags('win32fe tlib'),envRanlib) + yield ('win32fe lib',self.getArchiverFlags('win32fe lib'),envRanlib) + raise RuntimeError('You set -RANLIB="'+envRanlib+'" (perhaps in your environment), but '+defaultRanlib+' cannot be used\n') +- yield ('ar',self.getArchiverFlags('ar'),'ranlib -c') ++ #yield ('ar',self.getArchiverFlags('ar'),'ranlib -c') + yield ('ar',self.getArchiverFlags('ar'),'ranlib') + yield ('ar',self.getArchiverFlags('ar'),'true') + # IBM with 64 bit pointers diff --git a/easybuild/easyconfigs/s/SLEPc/SLEPc-3.3-p1-goalf-1.1.0-no-OFED-Python-2.7.3.eb b/easybuild/easyconfigs/s/SLEPc/SLEPc-3.3-p1-goalf-1.1.0-no-OFED-Python-2.7.3.eb new file mode 100644 index 0000000000..82b21308b9 --- /dev/null +++ b/easybuild/easyconfigs/s/SLEPc/SLEPc-3.3-p1-goalf-1.1.0-no-OFED-Python-2.7.3.eb @@ -0,0 +1,17 @@ +name = "SLEPc" +version = "3.3-p1" +versionsuffix = '-Python-2.7.3' + +homepage = 'http://www.grycap.upv.es/slepc/' +description = """SLEPc (Scalable Library for Eigenvalue Problem Computations) is a software library for the solution of +large scale sparse eigenvalue problems on parallel computers. It is an extension of PETSc and can be used for either standard or +generalized eigenproblems, with real or complex arithmetic. It can also be used for computing a partial SVD of a large, sparse, +rectangular matrix, and to solve quadratic eigenvalue problems.""" + +toolkit = {'name':'goalf', 'version':'1.1.0-no-OFED'} +toolkitopts = {'usempi': True} + +sourceURLs = ['http://www.grycap.upv.es/slepc/download/download.php?filename='] +sources = ['%s-%s.tar.gz' % (name.lower(), version)] + +dependencies = [('PETSc', '3.3-p2', versionsuffix)] diff --git a/easybuild/tools/toolkit.py b/easybuild/tools/toolkit.py index d62b020984..3e40c5af7b 100644 --- a/easybuild/tools/toolkit.py +++ b/easybuild/tools/toolkit.py @@ -374,7 +374,8 @@ def prepareBLACS(self): """ blacs = get_software_root("BLACS") - blacs_libs = ["blacs", "blacsCinit", "blacsF77init"] + # order matters! + blacs_libs = ["blacsCinit", "blacsF77init", "blacs"] self.vars['BLACS_INC'] = os.path.join(blacs, "include") self.vars['BLACS_LIB_DIR'] = os.path.join(blacs, "lib") @@ -400,12 +401,22 @@ def prepareFFTW(self): Prepare for FFTW library """ + fftw = get_software_root('FFTW') + suffix = '' if get_software_version('FFTW').startswith('3.'): suffix = '3' - self.vars['LIBFFT'] = " -lfftw%s " % suffix + # order matters! + fftw_libs = [] if self.opts['usempi']: - self.vars['LIBFFT'] += " -lfftw%s_mpi " % suffix + fftw_libs.append("fftw%s_mpi" % suffix) + fftw_libs.append("fftw%s" % suffix) + + self.vars['LIBFFT'] = ','.join(["-l%s" % x for x in fftw_libs]) + + self.vars['FFTW_INC'] = os.path.join(fftw, "include") + self.vars['FFTW_LIB_DIR'] = os.path.join(fftw, "lib") + self.vars['FFTW_STATIC_LIBS'] = ','.join(["lib%s.a" % x for x in fftw_libs]) self._addDependencyVariables(['FFTW']) @@ -594,18 +605,18 @@ def prepareIMKL(self): self.vars['LIBBLAS_MT'] = ' '.join(prefix, ' '.join(["-lmkl_%s" % x for x in blas_mt_libs]), suffix) self.vars['LIBLAPACK_MT'] = self.vars['LIBBLAS_MT'] - # determine BLAS/LAPACK library dir - bl_libdir = None + # determine BLACS/BLAS/LAPACK/FFTW library dir + libs_dir = None for ld in mklld: fld = os.path.join(mklroot, ld) if os.path.isdir(fld): - bl_libdir = fld - if not bl_libdir: + libs_dir = fld + if not libs_dir: self.log.error("") else: - self.vars['BLAS_LIB_DIR'] = bl_libdir - self.vars['LAPACK_LIB_DIR'] = bl_libdir - self.vars['BLAS_LAPACK_LIB_DIR'] = bl_libdir + self.vars['BLAS_LIB_DIR'] = libs_dir + self.vars['LAPACK_LIB_DIR'] = libs_dir + self.vars['BLAS_LAPACK_LIB_DIR'] = libs_dir # BLAS/LAPACK library self.vars['BLAS_STATIC_LIBS'] = ','.join(blas_libs) @@ -619,13 +630,13 @@ def prepareIMKL(self): # BLACS library self.vars['BLACS_INC'] = os.path.join(mklroot, "mkl", "include") - self.vars['BLACS_LIB_DIR'] = bl_libdir + self.vars['BLACS_LIB_DIR'] = libs_dir self.vars['BLACS_STATIC_LIBS'] = ','.join(["libmkl_%s.a" % x for x in blacs_libs]) self.vars['BLACS_MT_STATIC_LIBS'] = self.vars['BLACS_STATIC_LIBS'] # sequential ScaLAPACK self.vars['SCALAPACK_INC'] = os.path.join(mklroot, "mkl", "include") - self.vars['SCALAPACK_LIB_DIR'] = bl_libdir + self.vars['SCALAPACK_LIB_DIR'] = libs_dir suffix = "-Wl,--end-group -Wl:-Bdynamic" self.vars['LIBSCALAPACK'] = ' '.join((prefix, ' '.join(["-lmkl_%s" % x for x in scalapack_libs]), suffix)) @@ -640,7 +651,13 @@ def prepareIMKL(self): fftwsuff = "" if self.opts['pic']: fftwsuff = "_pic" - self.vars['LIBFFT'] = "-Wl:-Bstatic -lfftw3xc_intel%s -Wl:-Bdynamic" % fftwsuff + fftw_libs = ["fftw3xc_intel%s" % fftwsuff] + self.vars['LIBFFT'] = ' '.join("-Wl:-Bstatic", + ' '.join(["-%s" % x for x in fftw_libs]), + "-Wl:-Bdynamic") + self.vars['FFTW_INC'] = os.path.join(mklroot, "mkl", "include", "fftw") + self.vars['FFTW_LIB_DIR'] = libs_dir + self.vars['FFTW_STATIC_LIBS'] = ','.join(["libmkl_%s.a" % x for x in fftw_libs]) # some tools (like pkg-utils) don't handle groups well, so pack them if required if self.opts['packed-groups']: @@ -814,7 +831,7 @@ def prepareScaLAPACK(self): self.vars.get('LIBSCALAPACK_MT', '')) self.vars['SCALAPACK_INC'] = os.path.join(scalapack, "include") - self.vars['SCALAPACK_LIB_DIR'] = os.path.join(scalapack, "include") + self.vars['SCALAPACK_LIB_DIR'] = os.path.join(scalapack, "lib") self.vars['SCALAPACK_STATIC_LIBS'] = "libscalapack.a" self.vars['SCALAPACK_MT_STATIC_LIBS'] = self.vars['SCALAPACK_STATIC_LIBS'] From e96d89742eca696852cdc4500cdfd0f2038c5d2f Mon Sep 17 00:00:00 2001 From: Toon Willems Date: Fri, 10 Aug 2012 14:13:43 +0200 Subject: [PATCH 587/798] forgot to pass log parameter --- easybuild/scripts/regtest.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/easybuild/scripts/regtest.py b/easybuild/scripts/regtest.py index 33e28f24e4..a2d5e5cca9 100755 --- a/easybuild/scripts/regtest.py +++ b/easybuild/scripts/regtest.py @@ -157,7 +157,7 @@ def build_packages(packages, output_dir): apps = [] for pkg in packages: try: - instance = parbuild.get_instance(pkg) + instance = parbuild.get_instance(pkg, log) apps.append(instance) except EasyBuildError, err: test_results.append((pkg['spec'], 'initialization', err)) From 49bbcc02e4deb6dd62619b612c73c634d7d2486a Mon Sep 17 00:00:00 2001 From: Toon Willems Date: Fri, 10 Aug 2012 14:16:16 +0200 Subject: [PATCH 588/798] add empty line --- easybuild/tools/parallelbuild.py | 1 + 1 file changed, 1 insertion(+) diff --git a/easybuild/tools/parallelbuild.py b/easybuild/tools/parallelbuild.py index 5012fcd5e2..23c0f07068 100644 --- a/easybuild/tools/parallelbuild.py +++ b/easybuild/tools/parallelbuild.py @@ -27,6 +27,7 @@ from easybuild.framework.application import get_class from easybuild.tools.pbs_job import PbsJob + def build_packages_in_parallel(build_command, packages, output_dir, log): """ list is a list of packages which can be build! (e.g. they have no unresolved dependencies) From 84b3828d5044c0501977dfd3fd59e1215f097849 Mon Sep 17 00:00:00 2001 From: Toon Willems Date: Fri, 10 Aug 2012 14:44:50 +0200 Subject: [PATCH 589/798] forgot one very important line --- easybuild/framework/application.py | 1 + 1 file changed, 1 insertion(+) diff --git a/easybuild/framework/application.py b/easybuild/framework/application.py index 410d6e6864..e9355dfc05 100644 --- a/easybuild/framework/application.py +++ b/easybuild/framework/application.py @@ -1104,6 +1104,7 @@ def make_devel_module(self): self.log.debug("Loading module failed: %s" % err) self.log.debug("loaded modules: %s" % Modules().loaded_modules()) + mod_gen = ModuleGenerator(self) header = "#%Module\n" env_txt = "" From ef1bf09dcaa36248d088bfa11db8e901fb014a4f Mon Sep 17 00:00:00 2001 From: Toon Willems Date: Fri, 10 Aug 2012 14:55:50 +0200 Subject: [PATCH 590/798] update docstrings --- easybuild/scripts/regtest.py | 7 ++++--- easybuild/tools/parallelbuild.py | 24 ++++++++++++++++++------ easybuild/tools/pbs_job.py | 6 +++++- 3 files changed, 27 insertions(+), 10 deletions(-) diff --git a/easybuild/scripts/regtest.py b/easybuild/scripts/regtest.py index a2d5e5cca9..3f84d2fa90 100755 --- a/easybuild/scripts/regtest.py +++ b/easybuild/scripts/regtest.py @@ -98,7 +98,7 @@ def main(): # Create base directory inside the current directory. This will be used to place # all log files and the test output as xml - basename = "easybuild-test-%s" % datetime.now().strftime("%d-%m-%Y-%H:%M:%S") + basename = "easybuild-test-%s" % datetime.now().strftime("%Y%m%d%H%M%S") if opts.directory: output_dir = opts.directory elif "EASYBUILDTESTOUTPUT" in os.environ: @@ -232,8 +232,8 @@ def build_packages(packages, output_dir): def aggregate_xml_in_dirs(base_dir, output_filename): """ - finds all the xml files in the dirs and takes the testcase attribute out of them. - These are then put in a single output file + Finds all the xml files in the dirs and takes the testcase attribute out of them. + These are then put in a single output file. """ dom = xml.getDOMImplementation() root = dom.createDocument(None, "testsuite", None) @@ -264,6 +264,7 @@ def aggregate_xml_in_dirs(base_dir, output_filename): # only one should be present, we are just discarding the rest testcase = dom.getElementsByTagName("testcase")[0] root.firstChild.appendChild(testcase) + total += 1 if not testcase.getElementsByTagName("failure"): succes += 1 diff --git a/easybuild/tools/parallelbuild.py b/easybuild/tools/parallelbuild.py index 23c0f07068..d7ebd42800 100644 --- a/easybuild/tools/parallelbuild.py +++ b/easybuild/tools/parallelbuild.py @@ -19,7 +19,10 @@ # along with EasyBuild. If not, see . ## """ -module for doing parallel builds +module for doing parallel builds. This uses a PBS like cluster. You should be able to submit jobs (which can have +dependencies) + +Support for PBS is provided via the PbsJob class. If you want you could create other job classes and use them here. """ import os import re @@ -30,12 +33,12 @@ def build_packages_in_parallel(build_command, packages, output_dir, log): """ - list is a list of packages which can be build! (e.g. they have no unresolved dependencies) + packages is a list of packages which can be build! (e.g. they have no unresolved dependencies) this function will build them in parallel by submitting jobs """ log.info("going to build these packages in parallel: %s", packages) job_module_dict = {} - # dependencies have already been resolved this means i can linearly walk over the list and use previous job id's + # dependencies have already been resolved this means I can linearly walk over the list and use previous job id's for pkg in packages: # This is very important, otherwise we might have race conditions # e.g. GCC-4.5.3 finds cloog.tar.gz but it was incorrectly downloaded by GCC-4.6.3 @@ -54,9 +57,12 @@ def build_packages_in_parallel(build_command, packages, output_dir, log): job_module_dict[new_job.module] = new_job.jobid -def create_job(build_command, package, output_dir): +def create_job(build_command, package, output_dir=""): """ - creates a job, to build a *single* package + Creates a job, to build a *single* package + build_command is a format string in which a full path to an eb file will be substituted + package should be in the format as processEasyConfig returns them + output_dir is an optional path. EASYBUILDTESTOUTPUT will be set inside the job with this variable returns the job """ # create command based on build_command template @@ -86,7 +92,13 @@ def create_job(build_command, package, output_dir): def get_instance(package, log): - """ get an instance for this package """ + """ + Get an instance for this package + package is in the format provided by processEasyConfig + log is a logger object + + returns an instance of Application (or subclass thereof) + """ spec = package['spec'] name = package['module'][0] diff --git a/easybuild/tools/pbs_job.py b/easybuild/tools/pbs_job.py index b0a25f752c..7e960e8dc6 100644 --- a/easybuild/tools/pbs_job.py +++ b/easybuild/tools/pbs_job.py @@ -60,7 +60,11 @@ def __init__(self, script, name, env_vars=None): self.deps = [] def add_dependencies(self, job_ids): - """ add dependencies to this job. """ + """ + Add dependencies to this job. + job_ids is an array of job ids (e.g.: 8453.master2.gengar....) + if only one job_id is provided this function will also work + """ if isinstance(job_ids, str): job_ids = list(job_ids) From b2d441bd2552feb226d5ebd36e9f6eb1a14b3402 Mon Sep 17 00:00:00 2001 From: Toon Willems Date: Fri, 10 Aug 2012 15:17:28 +0200 Subject: [PATCH 591/798] remove error log about wrong module --- easybuild/build.py | 6 ------ 1 file changed, 6 deletions(-) diff --git a/easybuild/build.py b/easybuild/build.py index c11d1e34c3..b77081bf3e 100644 --- a/easybuild/build.py +++ b/easybuild/build.py @@ -406,12 +406,6 @@ def resolveDependencies(unprocessed, robot, log): log.info("Robot: resolving dependency %s with %s" % (candidates[0], path)) processedSpecs = processEasyconfig(path, log) - mods = [spec['module'] for spec in processedSpecs] - if not candidates[0] in mods: - msg = "Expected easyconfig %s to resolve dependency for %s, but it does not" % (path, candidates[0]) - msg += " (list of obtained modules after processing easyconfig: %s)" % mods - log.error(msg) - unprocessed.extend(processedSpecs) robotAddedDependency = True break From 5e332950e1d7c6433af9a8a9eddc8ab675a2f271 Mon Sep 17 00:00:00 2001 From: Kenneth Hoste Date: Fri, 10 Aug 2012 17:15:05 +0200 Subject: [PATCH 592/798] use list of dependencies to determine which '--with-' options to specify, remove Python as direct dependency for PETSc --- easybuild/easyblocks/p/petsc.py | 13 +++++++------ ...PETSc-3.3-p2-goalf-1.1.0-no-OFED-Python-2.7.3.eb | 7 +------ 2 files changed, 8 insertions(+), 12 deletions(-) diff --git a/easybuild/easyblocks/p/petsc.py b/easybuild/easyblocks/p/petsc.py index 7fa03fbeae..b576597880 100644 --- a/easybuild/easyblocks/p/petsc.py +++ b/easybuild/easyblocks/p/petsc.py @@ -129,8 +129,11 @@ def configure(self): self.log.error("One or more environment variables for BLAS/LAPACK not defined?") # additional dependencies - for dep in ["Boost", "FFC", "FIAT", "HDF5", "METIS", "netCDF", "ParMETIS", - "ScientificPython", ("SCOTCH", "ptscotch")]: + # filter out deps handled seperately + depfilter = self.cfg.builddependencies() + ["BLACS", "BLAS", "FFTW", "LAPACK", "numpy", + "mpi4py", "papi", "ScaLAPACK", "SuiteSparse"] + deps = [dep['name'] for dep in self.cfg.dependencies() if not dep['name'] in depfilter] + for dep in deps: if type(dep) == str: dep = (dep, dep) deproot = get_software_root(dep[0]) @@ -143,10 +146,8 @@ def configure(self): if suitesparse: withdep = "--with-umfpack" # specified order of libs matters! - umfpack_libs = [os.path.join(suitesparse, l, "Lib", "lib%s.a" % l.lower()) for l in ["UMFPACK", - "CHOLMOD", - "COLAMD", - "AMD"]] + umfpack_libs = [os.path.join(suitesparse, l, "Lib", "lib%s.a" % l.lower()) + for l in ["UMFPACK", "CHOLMOD", "COLAMD", "AMD"]] self.updatecfg('configopts', ' '.join([(withdep+x) for x in ["=1", "-include=%s" % os.path.join(suitesparse, "UMFPACK", "Include"), diff --git a/easybuild/easyconfigs/p/PETSc/PETSc-3.3-p2-goalf-1.1.0-no-OFED-Python-2.7.3.eb b/easybuild/easyconfigs/p/PETSc/PETSc-3.3-p2-goalf-1.1.0-no-OFED-Python-2.7.3.eb index fa599fc279..5c94f70446 100644 --- a/easybuild/easyconfigs/p/PETSc/PETSc-3.3-p2-goalf-1.1.0-no-OFED-Python-2.7.3.eb +++ b/easybuild/easyconfigs/p/PETSc/PETSc-3.3-p2-goalf-1.1.0-no-OFED-Python-2.7.3.eb @@ -1,5 +1,6 @@ name = "PETSc" version = "3.3-p2" +versionsuffix = '-Python-2.7.3' homepage = 'http://www.mcs.anl.gov/petsc' description = """PETSc, pronounced PET-see (the S is silent), is a suite of data structures and routines for the scalable (parallel) solution @@ -11,20 +12,14 @@ toolkitopts = {'usempi': True, 'pic': True} sourceURLs=['http://ftp.mcs.anl.gov/pub/petsc/release-snapshots'] sources=['%s-%s.tar.gz' % (name.lower(), version)] -python_version = '2.7.3' -versionsuffix = '-Python-%s' % (python_version) - dependencies = [ ('Boost', '1.49.0', versionsuffix), ('FIAT', '1.0.0', versionsuffix), ('METIS', '5.0.2'), ('ParMETIS', '4.0.2'), - ('Python', python_version), ('ScientificPython', '2.8', versionsuffix), ('SCOTCH', '5.1.12b_esmumps'), ('SuiteSparse', '3.7.0', '-withparmetis'), # for CHOLMOD, UMFPACK ] patches = ['fix.patch'] # ignore failed ranlib check on use of '-c' argument - -#shared_libs = True \ No newline at end of file From e8d7ddba8e7106cf9b304a9c7049f4146efcc547 Mon Sep 17 00:00:00 2001 From: Kenneth Hoste Date: Fri, 10 Aug 2012 22:41:26 +0200 Subject: [PATCH 593/798] also support non-source installation of PETSc and SLEPc (also tested these builds as DOLFIN deps) --- easybuild/easyblocks/d/dolfin.py | 6 ++- easybuild/easyblocks/p/petsc.py | 90 ++++++++++++++++++++------------ easybuild/easyblocks/s/slepc.py | 50 ++++++++++++------ 3 files changed, 94 insertions(+), 52 deletions(-) diff --git a/easybuild/easyblocks/d/dolfin.py b/easybuild/easyblocks/d/dolfin.py index 8231f9c6ce..52be64c4d4 100644 --- a/easybuild/easyblocks/d/dolfin.py +++ b/easybuild/easyblocks/d/dolfin.py @@ -105,8 +105,6 @@ def configure(self): val = os.getenv(env_var) if val: self.updatecfg('configopts', '-D%s=%s' % (env_var, val)) - else: - self.log.error("Environment variable %s not set?!?" % env_var) # set correct openmp options openmp = self.toolkit().get_openmp_flag() @@ -116,6 +114,10 @@ def configure(self): # configure CMakePythonPackage.configure(self) + #### FIXME ##### + # implement check for optional packages that could not be found + # need to know exact output when all optional packages are found + def make_module_extra(self): """Set extra environment variables for Dolfin.""" diff --git a/easybuild/easyblocks/p/petsc.py b/easybuild/easyblocks/p/petsc.py index b576597880..edf348c32d 100644 --- a/easybuild/easyblocks/p/petsc.py +++ b/easybuild/easyblocks/p/petsc.py @@ -38,18 +38,16 @@ class PETSc(Application): """Support for building and installing PETSc""" def __init__(self, *args, **kwargs): - """Initialize PETSc specific variables, specify build in install dir.""" + """Initialize PETSc specific variables.""" Application.__init__(self, *args, **kwargs) - self.build_in_installdir = True - - self.petsc_arch = None - self.petsc_arch_dir = "" + self.petsc_arch = "" + self.petsc_subdir = "" def extra_options(self): """Add extra config options specific to PETSc.""" extra_vars = { - 'source-install': [False, "Indicates whether a source installation should be performed (default: False)"], + 'sourceinstall': [False, "Indicates whether a source installation should be performed (default: False)"], 'shared_libs': [False, "Build shared libraries (default: False)"], 'with_papi': [False, "Enable PAPI support (default: False)"], 'papi_inc': ['/usr/include', "Path for PAPI include files (default: /usr/include)"], @@ -58,6 +56,14 @@ def extra_options(self): } return Application.extra_options(self, extra_vars) + def make_builddir(self): + """Decide whether or not to build in install dir before creating build dir.""" + + if self.getcfg('sourceinstall'): + self.build_in_installdir = True + + Application.make_builddir(self) + def configure(self): """Configure PETSc by setting configure options and running configure script.""" @@ -158,27 +164,29 @@ def configure(self): env.set('PETSC_DIR', self.getcfg('startfrom')) self.updatecfg('makeopts', 'PETSC_DIR=%s' % self.getcfg('startfrom')) - # run configure without --prefix (required) - cmd = "%s ./configure %s" % (self.getcfg('preconfigopts'), self.getcfg('configopts')) - (out, _) = run_cmd(cmd, log_all=True, simple=False) + if self.getcfg('sourceinstall'): + # run configure without --prefix (required) + cmd = "%s ./configure %s" % (self.getcfg('preconfigopts'), self.getcfg('configopts')) + (out, _) = run_cmd(cmd, log_all=True, simple=False) + else: + out = Application.configure(self) # check for errors in configure error_regexp = re.compile("ERROR") if error_regexp.search(out): self.log.error("Error(s) detected in configure output!") - # configure should set PETSC_ARCH - petsc_arch_regex = re.compile("^\s*PETSC_ARCH:\s*(\S+)$", re.M) - res = petsc_arch_regex.search(out) - if res: - self.petsc_arch = res.group(1) - self.updatecfg('makeopts', 'PETSC_ARCH=%s' % self.petsc_arch) - else: - self.log.error("Failed to determine PETSC_ARCH setting.") + if self.getcfg('sourceinstall'): + # figure out PETSC_ARCH setting + petsc_arch_regex = re.compile("^\s*PETSC_ARCH:\s*(\S+)$", re.M) + res = petsc_arch_regex.search(out) + if res: + self.petsc_arch = res.group(1) + self.updatecfg('makeopts', 'PETSC_ARCH=%s' % self.petsc_arch) + else: + self.log.error("Failed to determine PETSC_ARCH setting.") - self.petsc_arch_dir = os.path.join('%s-%s' % (self.name().lower(), - self.version()), - self.petsc_arch) + self.petsc_subdir = '%s-%s' % (self.name().lower(), self.version()) else: # old versions (< 3.x) @@ -200,7 +208,8 @@ def configure(self): def make_install(self): if LooseVersion(self.version()) >= LooseVersion("3"): - pass + if not self.getcfg('sourceinstall'): + Application.make_install(self) else: # old versions (< 3.x) @@ -217,13 +226,17 @@ def make_module_req_guess(self): guesses = Application.make_module_req_guess(self) - subdir = '%s-%s' % (self.name().lower(), self.version()) + prefix1 = "" + prefix2 = "" + if self.getcfg('sourceinstall'): + prefix1 = self.petsc_subdir + prefix2 = os.path.join(self.petsc_subdir, self.petsc_arch) guesses.update({ - 'PATH': [os.path.join(subdir, "bin")], - 'CPATH': [os.path.join(subdir, self.petsc_arch, "include"), - os.path.join(subdir, "include")], - 'LD_LIBRARY_PATH': [os.path.join(subdir, self.petsc_arch, "lib")] + 'PATH': [os.path.join(prefix1, "bin")], + 'CPATH': [os.path.join(prefix2, "include"), + os.path.join(prefix1, "include")], + 'LD_LIBRARY_PATH': [os.path.join(prefix2, "lib")] }) return guesses @@ -232,9 +245,12 @@ def make_module_extra(self): """Set PETSc specific environment variables (PETSC_DIR, PETSC_ARCH).""" txt = Application.make_module_extra(self) - txt += self.moduleGenerator.setEnvironment('PETSC_DIR', '$root/%s-%s' % (self.name().lower(), - self.version())) - txt += self.moduleGenerator.setEnvironment('PETSC_ARCH', self.petsc_arch) + if self.getcfg('sourceinstall'): + txt += self.moduleGenerator.setEnvironment('PETSC_DIR', '$root/%s' % self.petsc_subdir) + txt += self.moduleGenerator.setEnvironment('PETSC_ARCH', self.petsc_arch) + + else: + txt += self.moduleGenerator.setEnvironment('PETSC_DIR', '$root') return txt @@ -243,19 +259,25 @@ def sanitycheck(self): if not self.getcfg('sanityCheckPaths'): + prefix1 = "" + prefix2 = "" + if self.getcfg('sourceinstall'): + prefix1 = self.petsc_subdir + prefix2 = os.path.join(self.petsc_subdir, self.petsc_arch) + if self.getcfg('shared_libs'): libext = get_shared_lib_ext() else: libext = "a" - self.setcfg('sanityCheckPaths', {'files': [os.path.join(self.petsc_arch_dir, + self.setcfg('sanityCheckPaths', {'files': [os.path.join(prefix2, "lib", "libpetsc.%s" % libext) ], - 'dirs': [os.path.join(self.petsc_arch_dir, x) for x in ["../bin", - "conf", - "include" - ]] + 'dirs': [os.path.join(prefix1, "bin"), + os.path.join(prefix2, "conf"), + os.path.join(prefix1, "include"), + os.path.join(prefix2, "include")] }) self.log.info("Customized sanity check paths: %s" % self.getcfg('sanityCheckPaths')) diff --git a/easybuild/easyblocks/s/slepc.py b/easybuild/easyblocks/s/slepc.py index 097bcf46ad..8d011c1cbe 100644 --- a/easybuild/easyblocks/s/slepc.py +++ b/easybuild/easyblocks/s/slepc.py @@ -38,18 +38,24 @@ def __init__(self, *args, **kwargs): """Specify that SLEPc should be built in install dir.""" Application.__init__(self, *args, **kwargs) - self.build_in_installdir = True - self.slepc_arch_dir = None def extra_options(self): """Add extra config options specific to SLEPc.""" extra_vars = { - 'source-install': [False, "Indicates whether a source installation should be performed (default: False)"], + 'sourceinstall': [False, "Indicates whether a source installation should be performed (default: False)"], 'runtest': ['test', "Make target to test build (default: test)"] } return Application.extra_options(self, extra_vars) + def make_builddir(self): + """Decide whether or not to build in install dir before creating build dir.""" + + if self.getcfg('sourceinstall'): + self.build_in_installdir = True + + Application.make_builddir(self) + def configure(self): """Configure SLEPc by setting configure options and running configure script.""" @@ -68,18 +74,26 @@ def configure(self): withdep = "--with-%s" % dep.lower() self.updatecfg('configopts', '%s=1 %s-dir=%s' % (withdep, withdep, deproot)) - # run configure without --prefix (required) - cmd = "%s ./configure %s" % (self.getcfg('preconfigopts'), self.getcfg('configopts')) - (out, _) = run_cmd(cmd, log_all=True, simple=False) + if self.getcfg('sourceinstall'): + # run configure without --prefix (required) + cmd = "%s ./configure %s" % (self.getcfg('preconfigopts'), self.getcfg('configopts')) + (out, _) = run_cmd(cmd, log_all=True, simple=False) + else: + out = Application.configure(self) # check for errors in configure error_regexp = re.compile("ERROR") if error_regexp.search(out): self.log.error("Error(s) detected in configure output!") - self.slepc_arch_dir = os.path.join('%s-%s' % (self.name().lower(), - self.version()), - os.getenv('PETSC_ARCH')) + # set default PETSC_ARCH if required + if not os.getenv('PETSC_ARCH'): + env.set('PETSC_ARCH' , 'arch-installed-petsc') + + self.slepc_subdir = '' + if self.getcfg('sourceinstall'): + self.slepc_subdir = os.path.join('%s-%s' % (self.name().lower(), self.version()), + os.getenv('PETSC_ARCH')) def make_module_req_guess(self): """Specify correct LD_LIBRARY_PATH and CPATH for SLEPc installation.""" @@ -87,8 +101,8 @@ def make_module_req_guess(self): guesses = Application.make_module_req_guess(self) guesses.update({ - 'CPATH': [os.path.join(self.slepc_arch_dir, "include")], - 'LD_LIBRARY_PATH': [os.path.join(self.slepc_arch_dir, "lib")] + 'CPATH': [os.path.join(self.slepc_subdir, "include")], + 'LD_LIBRARY_PATH': [os.path.join(self.slepc_subdir, "lib")] }) return guesses @@ -97,8 +111,12 @@ def make_module_extra(self): """Set SLEPc specific environment variables (SLEPC_DIR).""" txt = Application.make_module_extra(self) - txt += self.moduleGenerator.setEnvironment('SLEPC_DIR', '$root/%s-%s' % (self.name().lower(), - self.version())) + if self.getcfg('sourceinstall'): + txt += self.moduleGenerator.setEnvironment('SLEPC_DIR', '$root/%s-%s' % (self.name().lower(), + self.version())) + + else: + txt += self.moduleGenerator.setEnvironment('SLEPC_DIR', '$root') return txt @@ -107,9 +125,9 @@ def sanitycheck(self): if not self.getcfg('sanityCheckPaths'): self.setcfg('sanityCheckPaths', {'files': [], - 'dirs': [os.path.join(self.slepc_arch_dir, x) for x in ["conf", - "include", - "lib"]] + 'dirs': [os.path.join(self.slepc_subdir, x) for x in ["conf", + "include", + "lib"]] }) self.log.info("Customized sanity check paths: %s" % self.getcfg('sanityCheckPaths')) From 2e314d447479930f62d392ae7d27f3d5afd6ba34 Mon Sep 17 00:00:00 2001 From: Kenneth Hoste Date: Sun, 12 Aug 2012 20:05:30 +0200 Subject: [PATCH 594/798] implemented support for installing MTL4, and tested it as DOLFIN dependency --- easybuild/easyblocks/m/mtl4.py | 60 +++++++++++++++++++ easybuild/easyconfigs/m/MTL4/MTL4-4.0.8878.eb | 13 ++++ 2 files changed, 73 insertions(+) create mode 100644 easybuild/easyblocks/m/mtl4.py create mode 100644 easybuild/easyconfigs/m/MTL4/MTL4-4.0.8878.eb diff --git a/easybuild/easyblocks/m/mtl4.py b/easybuild/easyblocks/m/mtl4.py new file mode 100644 index 0000000000..a09de59ed0 --- /dev/null +++ b/easybuild/easyblocks/m/mtl4.py @@ -0,0 +1,60 @@ +# Copyright 2012 Kenneth Hoste +# +# This file is part of EasyBuild, +# originally created by the HPC team of the University of Ghent (http://ugent.be/hpc). +# +# http://github.com/hpcugent/easybuild +# +# EasyBuild is free software: you can redistribute it and/or modify +# it under the terms of the GNU General Public License as published by +# the Free Software Foundation v2. +# +# EasyBuild is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with EasyBuild. If not, see . +## + +import os + +from easybuild.easyblocks.t.tarball import Tarball +from easybuild.tools.modules import get_software_root + + +class MTL4(Tarball): + """Support for installing MTL4.""" + + def configure(self): + """Check for dependencies (Boost).""" + + if not get_software_root("Boost"): + self.log.error("Boost module not loaded?") + + def sanitycheck(self): + """Custom sanity check for MTL4.""" + + if not self.getcfg('sanityCheckPaths'): + + incpref = os.path.join('include','boost', 'numeric') + + self.setcfg('sanityCheckPaths', {'files':[], + 'dirs':[os.path.join(incpref, x) for x in ["itl", + "linear_algebra", + "meta_math", + "mtl"]] + }) + + self.log.info("Customized sanity check paths: %s" % self.getcfg('sanityCheckPaths')) + + Tarball.sanitycheck(self) + + def make_module_req_guess(self): + """Adjust CPATH for MTL4.""" + + guesses = Tarball.make_module_req_guess(self) + guesses.update({'CPATH': 'include'}) + + return guesses \ No newline at end of file diff --git a/easybuild/easyconfigs/m/MTL4/MTL4-4.0.8878.eb b/easybuild/easyconfigs/m/MTL4/MTL4-4.0.8878.eb new file mode 100644 index 0000000000..03ddfa00fd --- /dev/null +++ b/easybuild/easyconfigs/m/MTL4/MTL4-4.0.8878.eb @@ -0,0 +1,13 @@ +name = "MTL4" +version = "4.0.8878" + +homepage = "http://www.simunova.com/mtl4" +description = """The Matrix Template Library 4 incorporates the most modern programming techniques +to provide an easy and intuitive interface to users while enabling optimal performance. The natural +mathematical notation in MTL4 empowers all engineers and scientists to implement their algorithms and +models in minimal time. All technical aspects are encapsulated in the library.""" + +toolkit = {'name': "dummy", 'version': "dummy"} + +sourceURLs = ['http://www.simunova.com/downloads/mtl4'] +sources = ["MTL-all-%s-Linux.tar.gz" % version] From a08a1622e6e4dc8a2f519df8f2c8827466679fb1 Mon Sep 17 00:00:00 2001 From: Kenneth Hoste Date: Sun, 12 Aug 2012 20:06:26 +0200 Subject: [PATCH 595/798] add example easyconfig for Sphinx (DOLFIN dependency), along for its dependencies Docutils, Jinja2 and setuptools --- easybuild/easyblocks/p/pythonpackage.py | 12 +++++++- ...-0.9.1-goalf-1.1.0-no-OFED-Python-2.7.3.eb | 29 +++++++++++++++++++ ...a2-2.6-goalf-1.1.0-no-OFED-Python-2.7.3.eb | 29 +++++++++++++++++++ ...-1.1.3-goalf-1.1.0-no-OFED-Python.2.7.3.eb | 26 +++++++++++++++++ ...0.6c11-goalf-1.1.0-no-OFED-Python-2.7.3.eb | 27 +++++++++++++++++ 5 files changed, 122 insertions(+), 1 deletion(-) create mode 100644 easybuild/easyconfigs/d/Docutils/Docutils-0.9.1-goalf-1.1.0-no-OFED-Python-2.7.3.eb create mode 100644 easybuild/easyconfigs/j/Jinja2/Jinja2-2.6-goalf-1.1.0-no-OFED-Python-2.7.3.eb create mode 100644 easybuild/easyconfigs/s/Sphinx/Sphinx-1.1.3-goalf-1.1.0-no-OFED-Python.2.7.3.eb create mode 100644 easybuild/easyconfigs/s/setuptools/setuptools-0.6c11-goalf-1.1.0-no-OFED-Python-2.7.3.eb diff --git a/easybuild/easyblocks/p/pythonpackage.py b/easybuild/easyblocks/p/pythonpackage.py index f5ac1a4082..3490818247 100644 --- a/easybuild/easyblocks/p/pythonpackage.py +++ b/easybuild/easyblocks/p/pythonpackage.py @@ -20,8 +20,9 @@ ## import os +import easybuild.tools.environment as env from easybuild.framework.application import Application -from easybuild.tools.filetools import run_cmd +from easybuild.tools.filetools import run_cmd, mkdir from easybuild.tools.modules import get_software_version @@ -58,9 +59,18 @@ def make(self): def make_install(self): """Install Python package to a custom path using setup.py""" + abs_pylibdir = os.path.join(self.installdir, self.pylibdir) + + mkdir(abs_pylibdir, parents=True) + + pythonpath = os.getenv('PYTHONPATH') + env.set('PYTHONPATH', "%s:%s" % (abs_pylibdir, pythonpath)) + cmd = "python setup.py install --prefix=%s %s" % (self.installdir, self.getcfg('installopts')) run_cmd(cmd, log_all=True, simple=True) + env.set('PYTHONPATH', pythonpath) + def make_module_extra(self): """Add install path to PYTHONPATH""" diff --git a/easybuild/easyconfigs/d/Docutils/Docutils-0.9.1-goalf-1.1.0-no-OFED-Python-2.7.3.eb b/easybuild/easyconfigs/d/Docutils/Docutils-0.9.1-goalf-1.1.0-no-OFED-Python-2.7.3.eb new file mode 100644 index 0000000000..e1a537cb27 --- /dev/null +++ b/easybuild/easyconfigs/d/Docutils/Docutils-0.9.1-goalf-1.1.0-no-OFED-Python-2.7.3.eb @@ -0,0 +1,29 @@ +easyblock = "PythonPackage" + +name = "Docutils" +version = "0.9.1" + +homepage = "http://docutils.sourceforge.net/" +description = """Docutils is an open-source text processing system for processing plaintext +documentation into useful formats, such as HTML, LaTeX, man-pages, open-document or XML. +It includes reStructuredText, the easy to read, easy to use, what-you-see-is-what-you-get +plaintext markup language.""" + +toolkit = {'name':'goalf','version':'1.1.0-no-OFED'} + +sourceURLs = [('http://sourceforge.net/projects/docutils/files/docutils/%s/' % version, 'download')] +sources = ["%s-%s.tar.gz" % (name.lower(), version)] + +python = "Python" +pythonversion = "2.7.3" + +versionsuffix = "-%s-%s" % (python, pythonversion) + +dependencies = [(python, pythonversion)] + +pylibdir = "lib/python%s/site-packages/%s" % (".".join(pythonversion.split(".")[0:2]), name.lower()) + +sanityCheckPaths = { + 'files': [], + 'dirs': ["bin", pylibdir] + } \ No newline at end of file diff --git a/easybuild/easyconfigs/j/Jinja2/Jinja2-2.6-goalf-1.1.0-no-OFED-Python-2.7.3.eb b/easybuild/easyconfigs/j/Jinja2/Jinja2-2.6-goalf-1.1.0-no-OFED-Python-2.7.3.eb new file mode 100644 index 0000000000..df0a674280 --- /dev/null +++ b/easybuild/easyconfigs/j/Jinja2/Jinja2-2.6-goalf-1.1.0-no-OFED-Python-2.7.3.eb @@ -0,0 +1,29 @@ +easyblock = "PythonPackage" + +name = "Jinja2" +version = "2.6" + +homepage = "http://pypi.python.org/pypi/Jinja2" +description = """Jinja2 is a template engine written in pure Python. It provides a Django inspired +non-XML syntax but supports inline expressions and an optional sandboxed environment.""" + +toolkit = {'name':'goalf','version':'1.1.0-no-OFED'} + +sourceURLs = ['http://pypi.python.org/packages/source/J/%s/' % name] +sources = ["%s-%s.tar.gz" % (name, version)] + +python = "Python" +pythonversion = "2.7.3" + +versionsuffix = "-%s-%s" % (python, pythonversion) + +dependencies = [(python, pythonversion), + ('setuptools', '0.6c11', versionsuffix)] + +py_short_ver = ".".join(pythonversion.split(".")[0:2]) +pylibdir = "lib/python%s/site-packages/%s" % (py_short_ver, name) + +sanityCheckPaths = { + 'files': [], + 'dirs': ["%s-%s-py%s.egg" % (pylibdir, version, py_short_ver)] + } \ No newline at end of file diff --git a/easybuild/easyconfigs/s/Sphinx/Sphinx-1.1.3-goalf-1.1.0-no-OFED-Python.2.7.3.eb b/easybuild/easyconfigs/s/Sphinx/Sphinx-1.1.3-goalf-1.1.0-no-OFED-Python.2.7.3.eb new file mode 100644 index 0000000000..38c742c6cf --- /dev/null +++ b/easybuild/easyconfigs/s/Sphinx/Sphinx-1.1.3-goalf-1.1.0-no-OFED-Python.2.7.3.eb @@ -0,0 +1,26 @@ +easyblock = "PythonPackage" + +name = "Sphinx" +version = "1.1.3" + +homepage = "http://sphinx.pocoo.org/" +description = """Sphinx is a tool that makes it easy to create intelligent and beautiful documentation. +It was originally created for the new Python documentation, and it has excellent facilities for the +documentation of Python projects, but C/C++ is already supported as well, and it is planned to add +special support for other languages as well.""" + +toolkit = {'name': "goalf", 'version': "1.1.0-no-OFED"} + +sourceURLs = ["http://pypi.python.org/packages/source/S/Sphinx/"] +sources = ["%s-%s.tar.gz" % (name.capitalize(), version)] + +python = "Python" +python_ver = "2.7.3" + +versionsuffix = "-%s-%s" % (python, python_ver) + +dependencies = [(python, python_ver), + ('Docutils', '0.9.1', versionsuffix), + ('Jinja2', '2.6', versionsuffix)] + +runtest = "test" \ No newline at end of file diff --git a/easybuild/easyconfigs/s/setuptools/setuptools-0.6c11-goalf-1.1.0-no-OFED-Python-2.7.3.eb b/easybuild/easyconfigs/s/setuptools/setuptools-0.6c11-goalf-1.1.0-no-OFED-Python-2.7.3.eb new file mode 100644 index 0000000000..aea2ad9352 --- /dev/null +++ b/easybuild/easyconfigs/s/setuptools/setuptools-0.6c11-goalf-1.1.0-no-OFED-Python-2.7.3.eb @@ -0,0 +1,27 @@ +easyblock = "PythonPackage" + +name = "setuptools" +version = "0.6c11" + +homepage = "http://pypi.python.org/pypi/setuptools/" +description = """Download, build, install, upgrade, and uninstall Python packages -- easily!""" + +toolkit = {'name':'goalf','version':'1.1.0-no-OFED'} + +sourceURLs = ['http://pypi.python.org/packages/source/s/%s/' % name] +sources = ["%s-%s.tar.gz" % (name, version)] + +python = "Python" +pythonversion = "2.7.3" + +versionsuffix = "-%s-%s" % (python, pythonversion) + +dependencies = [(python, pythonversion)] + +py_short_ver = ".".join(pythonversion.split(".")[0:2]) +pylibdir = "lib/python%s/site-packages/%s" % (py_short_ver, name) + +sanityCheckPaths = { + 'files': ["bin/easy_install", "%s-%s-py%s.egg" % (pylibdir, version, py_short_ver)], + 'dirs': [] + } \ No newline at end of file From e0fb137383b505968a6fb36128dac1804ee1e9a1 Mon Sep 17 00:00:00 2001 From: Kenneth Hoste Date: Mon, 13 Aug 2012 08:43:53 +0200 Subject: [PATCH 596/798] style cleanup for Armadillo --- easybuild/easyblocks/a/armadillo.py | 7 ++++++- ...rmadillo-2.4.4-gimkl-0.5.3-Python-2.7.3.eb | 19 ----------------- ...-2.4.4-goalf-1.1.0-no-OFED-Python-2.7.3.eb | 21 +++++++++---------- ...rmadillo-2.4.4-ictce-4.0.6-Python-2.7.3.eb | 21 +++++++++---------- 4 files changed, 26 insertions(+), 42 deletions(-) delete mode 100644 easybuild/easyconfigs/a/Armadillo/Armadillo-2.4.4-gimkl-0.5.3-Python-2.7.3.eb diff --git a/easybuild/easyblocks/a/armadillo.py b/easybuild/easyblocks/a/armadillo.py index 0d6a769a4a..c53321bb64 100644 --- a/easybuild/easyblocks/a/armadillo.py +++ b/easybuild/easyblocks/a/armadillo.py @@ -17,10 +17,15 @@ # You should have received a copy of the GNU General Public License # along with EasyBuild. If not, see . ## +""" +EasyBuild support for Armadillo, implemented as an easyblock +""" import os + from easybuild.easyblocks.c.cmake import CMake from easybuild.tools.modules import get_software_root + class Armadillo(CMake): """Support for building Armadillo.""" @@ -45,7 +50,7 @@ def sanitycheck(self): if not self.getcfg('sanityCheckPaths'): - self.setcfg('sanityCheckPaths', {'files':['lib/libarmadillo.so','include/armadillo'], + self.setcfg('sanityCheckPaths', {'files':['lib/libarmadillo.so', 'include/armadillo'], 'dirs':['include/armadillo_bits']}) self.log.info("Customized sanity check paths: %s" % self.getcfg('sanityCheckPaths')) diff --git a/easybuild/easyconfigs/a/Armadillo/Armadillo-2.4.4-gimkl-0.5.3-Python-2.7.3.eb b/easybuild/easyconfigs/a/Armadillo/Armadillo-2.4.4-gimkl-0.5.3-Python-2.7.3.eb deleted file mode 100644 index 2cdaea8986..0000000000 --- a/easybuild/easyconfigs/a/Armadillo/Armadillo-2.4.4-gimkl-0.5.3-Python-2.7.3.eb +++ /dev/null @@ -1,19 +0,0 @@ -name='Armadillo' -version='2.4.4' - -homepage='http://arma.sourceforge.net/' -description="""Armadillo is an open-source C++ linear algebra library (matrix maths) aiming towards -a good balance between speed and ease of use. Integer, floating point and complex numbers are supported, -as well as a subset of trigonometric and statistics functions.""" - -toolkit={'name':'gimkl','version':'0.5.3'} - -sources=['%s-%s.tar.gz'%(name.lower(),version)] -sourceURLs=['http://sourceforge.net/projects/arma/files'] - -pythonversion='2.7.3' -versionsuffix="-Python-%s" % pythonversion - -dependencies=[('Boost','1.49.0', versionsuffix)] - -builddependencies = [('CMake','2.8.4')] \ No newline at end of file diff --git a/easybuild/easyconfigs/a/Armadillo/Armadillo-2.4.4-goalf-1.1.0-no-OFED-Python-2.7.3.eb b/easybuild/easyconfigs/a/Armadillo/Armadillo-2.4.4-goalf-1.1.0-no-OFED-Python-2.7.3.eb index 7fcb1e00f9..b684184105 100644 --- a/easybuild/easyconfigs/a/Armadillo/Armadillo-2.4.4-goalf-1.1.0-no-OFED-Python-2.7.3.eb +++ b/easybuild/easyconfigs/a/Armadillo/Armadillo-2.4.4-goalf-1.1.0-no-OFED-Python-2.7.3.eb @@ -1,19 +1,18 @@ -name='Armadillo' -version='2.4.4' +name = 'Armadillo' +version = '2.4.4' -homepage='http://arma.sourceforge.net/' -description="""Armadillo is an open-source C++ linear algebra library (matrix maths) aiming towards +homepage = 'http://arma.sourceforge.net/' +description = """Armadillo is an open-source C++ linear algebra library (matrix maths) aiming towards a good balance between speed and ease of use. Integer, floating point and complex numbers are supported, as well as a subset of trigonometric and statistics functions.""" -toolkit={'name':'goalf','version':'1.1.0-no-OFED'} +toolkit = {'name': 'goalf', 'version': '1.1.0-no-OFED'} -sources=['%s-%s.tar.gz'%(name.lower(),version)] -sourceURLs=['http://sourceforge.net/projects/arma/files'] +sources = ['%s-%s.tar.gz' % (name.lower(), version)] +sourceURLs = ['http://sourceforge.net/projects/arma/files'] -pythonversion='2.7.3' -versionsuffix="-Python-%s" % pythonversion +versionsuffix = "-Python-2.7.3" -dependencies=[('Boost','1.49.0', versionsuffix)] +dependencies = [('Boost', '1.49.0', versionsuffix)] -builddependencies = [('CMake','2.8.4')] \ No newline at end of file +builddependencies = [('CMake', '2.8.4')] \ No newline at end of file diff --git a/easybuild/easyconfigs/a/Armadillo/Armadillo-2.4.4-ictce-4.0.6-Python-2.7.3.eb b/easybuild/easyconfigs/a/Armadillo/Armadillo-2.4.4-ictce-4.0.6-Python-2.7.3.eb index dea141d6f2..915c9a2aaa 100644 --- a/easybuild/easyconfigs/a/Armadillo/Armadillo-2.4.4-ictce-4.0.6-Python-2.7.3.eb +++ b/easybuild/easyconfigs/a/Armadillo/Armadillo-2.4.4-ictce-4.0.6-Python-2.7.3.eb @@ -1,19 +1,18 @@ -name='Armadillo' -version='2.4.4' +name = 'Armadillo' +version = '2.4.4' -homepage='http://arma.sourceforge.net/' -description="""Armadillo is an open-source C++ linear algebra library (matrix maths) aiming towards +homepage = 'http://arma.sourceforge.net/' +description = """Armadillo is an open-source C++ linear algebra library (matrix maths) aiming towards a good balance between speed and ease of use. Integer, floating point and complex numbers are supported, as well as a subset of trigonometric and statistics functions.""" -toolkit={'name':'ictce','version':'4.0.6'} +toolkit = {'name': 'ictce', 'version': '4.0.6'} -sources=['%s-%s.tar.gz'%(name.lower(),version)] -sourceURLs=['http://sourceforge.net/projects/arma/files'] +sources = ['%s-%s.tar.gz' % (name.lower(), version)] +sourceURLs = ['http://sourceforge.net/projects/arma/files'] -pythonversion='2.7.3' -versionsuffix="-Python-%s" % pythonversion +versionsuffix = "-Python-2.7.3" -dependencies=[('Boost','1.49.0', versionsuffix)] +dependencies = [('Boost', '1.49.0', versionsuffix)] -builddependencies = [('CMake','2.8.4')] +builddependencies = [('CMake', '2.8.4')] From d0418fe0ccc5ed09094b8f3374651b2721e21017 Mon Sep 17 00:00:00 2001 From: Kenneth Hoste Date: Mon, 13 Aug 2012 08:49:16 +0200 Subject: [PATCH 597/798] style cleanup for Boost --- easybuild/easyblocks/b/boost.py | 11 +++---- .../Boost-1.49.0-gimkl-0.5.3-Python-2.7.3.eb | 21 ------------- ...1.49.0-goalf-1.1.0-no-OFED-Python-2.7.3.eb | 28 ++++++++--------- .../Boost-1.49.0-ictce-4.0.6-Python-2.7.3.eb | 30 +++++++++---------- 4 files changed, 35 insertions(+), 55 deletions(-) delete mode 100644 easybuild/easyconfigs/b/Boost/Boost-1.49.0-gimkl-0.5.3-Python-2.7.3.eb diff --git a/easybuild/easyblocks/b/boost.py b/easybuild/easyblocks/b/boost.py index c82fe8747c..16d1701f85 100644 --- a/easybuild/easyblocks/b/boost.py +++ b/easybuild/easyblocks/b/boost.py @@ -18,6 +18,9 @@ # You should have received a copy of the GNU General Public License # along with EasyBuild. If not, see . ## +""" +EasyBuild support for Boost, implemented as an easyblock +""" import os import shutil @@ -74,7 +77,6 @@ def configure(self): f.write("using mpi : %s ;" % os.getenv("MPICXX")) f.close() - def make(self): """Build Boost with bjam tool.""" @@ -86,15 +88,12 @@ def make(self): bjamoptions += " -sBZIP2_INCLUDE=%s/include" % bzip2 bjamoptions += " -sBZIP2_LIBPATH=%s/lib" % bzip2 - if self.getcfg('boost_mpi'): - self.log.info("Building boost_mpi library") bjammpioptions = "%s --user-config=user-config.jam --with-mpi" % bjamoptions # build mpi lib first - # let bjam know about the user-config.jam file we created in the configure step run_cmd("./bjam %s" % bjammpioptions, log_all=True, simple=True) @@ -121,7 +120,9 @@ def make_install(self): else: shutil.copy2(src, dst) except OSError, err: - self.log.error("Copying %s to installation dir %s failed: %s" % (self.objdir, self.installdir, err)) + self.log.error("Copying %s to installation dir %s failed: %s" % (self.objdir, + self.installdir, + err)) def sanitycheck(self): """Custom sanity check for Boost.""" diff --git a/easybuild/easyconfigs/b/Boost/Boost-1.49.0-gimkl-0.5.3-Python-2.7.3.eb b/easybuild/easyconfigs/b/Boost/Boost-1.49.0-gimkl-0.5.3-Python-2.7.3.eb deleted file mode 100644 index 96912f77da..0000000000 --- a/easybuild/easyconfigs/b/Boost/Boost-1.49.0-gimkl-0.5.3-Python-2.7.3.eb +++ /dev/null @@ -1,21 +0,0 @@ -name='Boost' -version='1.49.0' - -homepage='http://www.boost.org/' -description="Boost provides free peer-reviewed portable C++ source libraries." - -toolkit={'name':'gimkl','version':'0.5.3'} -toolkitopts={'pic':True, 'usempi':True} - -sources=['%s_%s.tar.gz'%(name.lower(), '_'.join(version.split('.')))] -sourceURLs=[('http://sourceforge.net/projects/%(name)s/files/%(name)s/%(version)s' % \ - {'name':name.lower(), 'version':version}, 'download')] - -pythonversion='2.7.3' -versionsuffix='-Python-%s'%pythonversion - -dependencies=[('bzip2', '1.0.6'), - ('Python', pythonversion)] - -# also build boost_mpi -boost_mpi=True diff --git a/easybuild/easyconfigs/b/Boost/Boost-1.49.0-goalf-1.1.0-no-OFED-Python-2.7.3.eb b/easybuild/easyconfigs/b/Boost/Boost-1.49.0-goalf-1.1.0-no-OFED-Python-2.7.3.eb index f58b0b0222..000a42cc0d 100644 --- a/easybuild/easyconfigs/b/Boost/Boost-1.49.0-goalf-1.1.0-no-OFED-Python-2.7.3.eb +++ b/easybuild/easyconfigs/b/Boost/Boost-1.49.0-goalf-1.1.0-no-OFED-Python-2.7.3.eb @@ -1,21 +1,21 @@ -name='Boost' -version='1.49.0' +name = 'Boost' +version = '1.49.0' -homepage='http://www.boost.org/' -description="Boost provides free peer-reviewed portable C++ source libraries." +homepage = 'http://www.boost.org/' +description = """Boost provides free peer-reviewed portable C++ source libraries.""" -toolkit={'name':'goalf','version':'1.1.0-no-OFED'} -toolkitopts={'pic':True, 'usempi':True} +toolkit = {'name': 'goalf', 'version': '1.1.0-no-OFED'} +toolkitopts = {'pic':True, 'usempi':True} -sources=['%s_%s.tar.gz'%(name.lower(), '_'.join(version.split('.')))] -sourceURLs=[('http://sourceforge.net/projects/%(name)s/files/%(name)s/%(version)s' % \ - {'name':name.lower(), 'version':version}, 'download')] +sources = ['%s_%s.tar.gz' % (name.lower(), '_'.join(version.split('.')))] +sourceURLs = [('http://sourceforge.net/projects/%(name)s/files/%(name)s/%(version)s' % \ + {'name': name.lower(), 'version': version}, 'download')] -pythonversion='2.7.3' -versionsuffix='-Python-%s'%pythonversion +pythonversion = '2.7.3' +versionsuffix = '-Python-%s'%pythonversion -dependencies=[('bzip2', '1.0.6'), - ('Python', pythonversion)] +dependencies = [('bzip2', '1.0.6'), + ('Python', pythonversion)] # also build boost_mpi -boost_mpi=True +boost_mpi = True diff --git a/easybuild/easyconfigs/b/Boost/Boost-1.49.0-ictce-4.0.6-Python-2.7.3.eb b/easybuild/easyconfigs/b/Boost/Boost-1.49.0-ictce-4.0.6-Python-2.7.3.eb index 9aafc195c7..f1612d3152 100644 --- a/easybuild/easyconfigs/b/Boost/Boost-1.49.0-ictce-4.0.6-Python-2.7.3.eb +++ b/easybuild/easyconfigs/b/Boost/Boost-1.49.0-ictce-4.0.6-Python-2.7.3.eb @@ -1,23 +1,23 @@ -name='Boost' -version='1.49.0' +name = 'Boost' +version = '1.49.0' -homepage='http://www.boost.org/' -description="Boost provides free peer-reviewed portable C++ source libraries." +homepage = 'http://www.boost.org/' +description = """Boost provides free peer-reviewed portable C++ source libraries.""" -toolkit={'name':'ictce','version':'4.0.6'} -toolkitopts={'pic':True, 'usempi':True} +toolkit={'name': 'ictce', 'version': '4.0.6'} +toolkitopts = {'pic':True, 'usempi':True} -sources=['%s_%s.tar.gz'%(name.lower(), '_'.join(version.split('.')))] -sourceURLs=[('http://sourceforge.net/projects/%(name)s/files/%(name)s/%(version)s' % \ - {'name':name.lower(), 'version':version}, 'download')] +sourceURLs = [('http://sourceforge.net/projects/%(name)s/files/%(name)s/%(version)s' % \ + {'name': name.lower(), 'version': version}, 'download')] +sources = ['%s_%s.tar.gz' % (name.lower(), '_'.join(version.split('.')))] -patches=['intellinuxjam_fPIC.patch'] +patches = ['intellinuxjam_fPIC.patch'] -pythonversion='2.7.3' -versionsuffix='-Python-%s'%pythonversion +pythonversion = '2.7.3' +versionsuffix = '-Python-%s'%pythonversion -dependencies=[('bzip2', '1.0.6'), - ('Python', pythonversion)] +dependencies = [('bzip2', '1.0.6'), + ('Python', pythonversion)] # also build boost_mpi -boost_mpi=True +boost_mpi = True From cf0ca75c0da0845b3dee361219d394c98d5da7ec Mon Sep 17 00:00:00 2001 From: Kenneth Hoste Date: Mon, 13 Aug 2012 08:52:51 +0200 Subject: [PATCH 598/798] style cleanup for bzip2 --- easybuild/easyblocks/b/bzip2.py | 16 +++++++++++++--- .../b/bzip2/bzip2-1.0.6-gimkl-0.5.3.eb | 13 ------------- .../b/bzip2/bzip2-1.0.6-goalf-1.1.0-no-OFED.eb | 16 ++++++++-------- .../b/bzip2/bzip2-1.0.6-ictce-4.0.6.eb | 16 ++++++++-------- 4 files changed, 29 insertions(+), 32 deletions(-) delete mode 100644 easybuild/easyconfigs/b/bzip2/bzip2-1.0.6-gimkl-0.5.3.eb diff --git a/easybuild/easyblocks/b/bzip2.py b/easybuild/easyblocks/b/bzip2.py index ce97c8a3dc..1b62a01a8f 100644 --- a/easybuild/easyblocks/b/bzip2.py +++ b/easybuild/easyblocks/b/bzip2.py @@ -17,18 +17,26 @@ # You should have received a copy of the GNU General Public License # along with EasyBuild. If not, see . ## +""" +EasyBuild support for bzip2, implemented as an easyblock +""" import os + from easybuild.framework.application import Application + class Bzip2(Application): - """Support for building bzip2.""" + """Support for building and installing bzip2.""" # no configure script def configure(self): + """Set extra configure options.""" + self.updatecfg('makeopts', "CFLAGS='-Wall -Winline %s -g $(BIGFILES)'" % os.getenv('CFLAGS')) def make_install(self): """Install in non-standard path by passing PREFIX variable to make install.""" + self.updatecfg('installopts', "PREFIX=%s" % self.installdir) Application.make_install(self) @@ -38,11 +46,13 @@ def sanitycheck(self): if not self.getcfg('sanityCheckPaths'): - self.setcfg('sanityCheckPaths', {'files': ["bin/%s" % x for x in ["bunzip2", "bzcat", "bzdiff", + self.setcfg('sanityCheckPaths', { + 'files': ["bin/%s" % x for x in ["bunzip2", "bzcat", "bzdiff", "bzgrep", "bzip2", "bzip2recover", "bzmore"]] + ['lib/libbz2.a', 'include/bzlib.h'], - 'dirs':[]}) + 'dirs': [] + }) self.log.info("Customized sanity check paths: %s" % self.getcfg('sanityCheckPaths')) diff --git a/easybuild/easyconfigs/b/bzip2/bzip2-1.0.6-gimkl-0.5.3.eb b/easybuild/easyconfigs/b/bzip2/bzip2-1.0.6-gimkl-0.5.3.eb deleted file mode 100644 index 34cc55c578..0000000000 --- a/easybuild/easyconfigs/b/bzip2/bzip2-1.0.6-gimkl-0.5.3.eb +++ /dev/null @@ -1,13 +0,0 @@ -name='bzip2' -version='1.0.6' - -homepage='http://www.bzip.org/' -description="""bzip2 is a freely available, patent free, high-quality data compressor. It typically -compresses files to within 10% to 15% of the best available techniques (the PPM family of statistical -compressors), whilst being around twice as fast at compression and six times faster at decompression.""" - -toolkit={'name':'gimkl','version':'0.5.3'} -toolkitopts={'pic':True} - -sources=['%s-%s.tar.gz'%(name, version)] -sourceURLs=['http://www.bzip.org/%s/' % version] \ No newline at end of file diff --git a/easybuild/easyconfigs/b/bzip2/bzip2-1.0.6-goalf-1.1.0-no-OFED.eb b/easybuild/easyconfigs/b/bzip2/bzip2-1.0.6-goalf-1.1.0-no-OFED.eb index df1be6dd51..b483726093 100644 --- a/easybuild/easyconfigs/b/bzip2/bzip2-1.0.6-goalf-1.1.0-no-OFED.eb +++ b/easybuild/easyconfigs/b/bzip2/bzip2-1.0.6-goalf-1.1.0-no-OFED.eb @@ -1,13 +1,13 @@ -name='bzip2' -version='1.0.6' +name = 'bzip2' +version = '1.0.6' -homepage='http://www.bzip.org/' -description="""bzip2 is a freely available, patent free, high-quality data compressor. It typically +homepage = 'http://www.bzip.org/' +description = """bzip2 is a freely available, patent free, high-quality data compressor. It typically compresses files to within 10% to 15% of the best available techniques (the PPM family of statistical compressors), whilst being around twice as fast at compression and six times faster at decompression.""" -toolkit={'name':'goalf','version':'1.1.0-no-OFED'} -toolkitopts={'pic':True} +toolkit = {'name': 'goalf', 'version': '1.1.0-no-OFED'} +toolkitopts = {'pic': True} -sources=['%s-%s.tar.gz'%(name, version)] -sourceURLs=['http://www.bzip.org/%s/' % version] \ No newline at end of file +sources = ['%s-%s.tar.gz' % (name, version)] +sourceURLs = ['http://www.bzip.org/%s/' % version] \ No newline at end of file diff --git a/easybuild/easyconfigs/b/bzip2/bzip2-1.0.6-ictce-4.0.6.eb b/easybuild/easyconfigs/b/bzip2/bzip2-1.0.6-ictce-4.0.6.eb index c926f9394b..4ee18ccdf9 100644 --- a/easybuild/easyconfigs/b/bzip2/bzip2-1.0.6-ictce-4.0.6.eb +++ b/easybuild/easyconfigs/b/bzip2/bzip2-1.0.6-ictce-4.0.6.eb @@ -1,13 +1,13 @@ -name='bzip2' -version='1.0.6' +name = 'bzip2' +version = '1.0.6' -homepage='http://www.bzip.org/' -description="""bzip2 is a freely available, patent free, high-quality data compressor. It typically +homepage = 'http://www.bzip.org/' +description = """bzip2 is a freely available, patent free, high-quality data compressor. It typically compresses files to within 10% to 15% of the best available techniques (the PPM family of statistical compressors), whilst being around twice as fast at compression and six times faster at decompression.""" -toolkit={'name':'ictce','version':'4.0.6'} -toolkitopts={'pic':True} +toolkit = {'name': 'ictce', 'version': '4.0.6'} +toolkitopts = {'pic': True} -sources=['%s-%s.tar.gz'%(name, version)] -sourceURLs=['http://www.bzip.org/%s/' % version] \ No newline at end of file +sources = ['%s-%s.tar.gz' % (name, version)] +sourceURLs = ['http://www.bzip.org/%s/' % version] \ No newline at end of file From 0bc1788de7f1f414d204ee132dd1c4c297ffdaee Mon Sep 17 00:00:00 2001 From: Kenneth Hoste Date: Mon, 13 Aug 2012 08:55:28 +0200 Subject: [PATCH 599/798] style cleanup for CGAL --- easybuild/easyblocks/c/cgal.py | 11 ++++++++-- .../CGAL/CGAL-4.0-gimkl-0.5.3-Python-2.7.3.eb | 21 ------------------- ...AL-4.0-goalf-1.1.0-no-OFED-Python-2.7.3.eb | 10 ++++----- .../CGAL/CGAL-4.0-ictce-4.0.6-Python-2.7.3.eb | 11 +++++----- 4 files changed, 20 insertions(+), 33 deletions(-) delete mode 100644 easybuild/easyconfigs/c/CGAL/CGAL-4.0-gimkl-0.5.3-Python-2.7.3.eb diff --git a/easybuild/easyblocks/c/cgal.py b/easybuild/easyblocks/c/cgal.py index 74f6d1e32f..68233f6b6a 100644 --- a/easybuild/easyblocks/c/cgal.py +++ b/easybuild/easyblocks/c/cgal.py @@ -17,10 +17,15 @@ # You should have received a copy of the GNU General Public License # along with EasyBuild. If not, see . ## +""" +EasyBuild support for CGAL, implemented as an easyblock +""" import os + from easybuild.easyblocks.c.cmake import CMake from easybuild.tools.modules import get_software_root + class CGAL(CMake): """Support for building CGAL.""" @@ -45,10 +50,12 @@ def sanitycheck(self): if not self.getcfg('sanityCheckPaths'): - self.setcfg('sanityCheckPaths', {'files': ['bin/cgal_%s' % x for x in ["create_cmake_script", + self.setcfg('sanityCheckPaths', { + 'files': ['bin/cgal_%s' % x for x in ["create_cmake_script", "make_macosx_app"]] + ['lib/libCGAL%s.so' % x for x in ["", "_Core"]], - 'dirs':['include/CGAL', 'lib/CGAL']}) + 'dirs':['include/CGAL', 'lib/CGAL'] + }) self.log.info("Customized sanity check paths: %s" % self.getcfg('sanityCheckPaths')) diff --git a/easybuild/easyconfigs/c/CGAL/CGAL-4.0-gimkl-0.5.3-Python-2.7.3.eb b/easybuild/easyconfigs/c/CGAL/CGAL-4.0-gimkl-0.5.3-Python-2.7.3.eb deleted file mode 100644 index 2db704cdd5..0000000000 --- a/easybuild/easyconfigs/c/CGAL/CGAL-4.0-gimkl-0.5.3-Python-2.7.3.eb +++ /dev/null @@ -1,21 +0,0 @@ -name='CGAL' -version='4.0' - -homepage='http://www.cgal.org/' -description="""The goal of the CGAL Open Source Project is to provide easy access to efficient -and reliable geometric algorithms in the form of a C++ library.""" - -toolkit={'name':'gimkl','version':'0.5.3'} - -sources = ['%s-%s.tar.gz' % (name, version)] -sourceURLs = ['http://fenicsproject.org/pub/software/contrib/'] - -pythonversion = '2.7.3' -versionsuffix = "-Python-%s" % pythonversion - -dependencies = [ - ('CMake','2.8.4'), - ('GMP','5.0.5'), - ('Boost','1.49.0', versionsuffix), - ('MPFR','3.1.0'), - ] diff --git a/easybuild/easyconfigs/c/CGAL/CGAL-4.0-goalf-1.1.0-no-OFED-Python-2.7.3.eb b/easybuild/easyconfigs/c/CGAL/CGAL-4.0-goalf-1.1.0-no-OFED-Python-2.7.3.eb index 5df71db6fa..526c956b00 100644 --- a/easybuild/easyconfigs/c/CGAL/CGAL-4.0-goalf-1.1.0-no-OFED-Python-2.7.3.eb +++ b/easybuild/easyconfigs/c/CGAL/CGAL-4.0-goalf-1.1.0-no-OFED-Python-2.7.3.eb @@ -1,11 +1,11 @@ -name='CGAL' -version='4.0' +name = 'CGAL' +version = '4.0' -homepage='http://www.cgal.org/' -description="""The goal of the CGAL Open Source Project is to provide easy access to efficient +homepage = 'http://www.cgal.org/' +description = """The goal of the CGAL Open Source Project is to provide easy access to efficient and reliable geometric algorithms in the form of a C++ library.""" -toolkit={'name':'goalf','version':'1.1.0-no-OFED'} +toolkit = {'name': 'goalf', 'version': '1.1.0-no-OFED'} sources = ['%s-%s.tar.gz' % (name, version)] sourceURLs = ['http://fenicsproject.org/pub/software/contrib/'] diff --git a/easybuild/easyconfigs/c/CGAL/CGAL-4.0-ictce-4.0.6-Python-2.7.3.eb b/easybuild/easyconfigs/c/CGAL/CGAL-4.0-ictce-4.0.6-Python-2.7.3.eb index 77e8889c13..cae08379bb 100644 --- a/easybuild/easyconfigs/c/CGAL/CGAL-4.0-ictce-4.0.6-Python-2.7.3.eb +++ b/easybuild/easyconfigs/c/CGAL/CGAL-4.0-ictce-4.0.6-Python-2.7.3.eb @@ -1,11 +1,11 @@ -name='CGAL' -version='4.0' +name = 'CGAL' +version = '4.0' -homepage='http://www.cgal.org/' -description="""The goal of the CGAL Open Source Project is to provide easy access to efficient +homepage = 'http://www.cgal.org/' +description = """The goal of the CGAL Open Source Project is to provide easy access to efficient and reliable geometric algorithms in the form of a C++ library.""" -toolkit={'name':'ictce','version':'4.0.6'} +toolkit={'name': 'ictce', 'version': '4.0.6'} sources = ['%s-%s.tar.gz' % (name, version)] sourceURLs = ['http://fenicsproject.org/pub/software/contrib/'] @@ -19,3 +19,4 @@ dependencies = [ ('Boost','1.49.0', versionsuffix), ('MPFR','3.1.0'), ] + \ No newline at end of file From e2eea77b98df3b003a8cee6e717f520eda4483a5 Mon Sep 17 00:00:00 2001 From: Toon Willems Date: Mon, 13 Aug 2012 09:01:56 +0200 Subject: [PATCH 600/798] add debug flag to make_devel_module --- easybuild/framework/application.py | 20 +++++++++++++------- 1 file changed, 13 insertions(+), 7 deletions(-) diff --git a/easybuild/framework/application.py b/easybuild/framework/application.py index c6701e4065..3bc9ccf640 100644 --- a/easybuild/framework/application.py +++ b/easybuild/framework/application.py @@ -654,7 +654,7 @@ def build(self): ## MAKE print_msg("building...", self.log) - self.runstep('make', [self.make], skippable=True) + self.runstep('make', [self.make_devel_module, self.make], skippable=True) ## TEST print_msg("testing...", self.log) @@ -1089,11 +1089,11 @@ def make_module(self, fake=False): self.log.info("Added modulefile: %s" % (self.moduleGenerator.filename)) if not fake: - self.make_devel_module() + self.make_devel_module(debug=False) return modpath - def make_devel_module(self): + def make_devel_module(self, debug=True): """ Create a develop module file which sets environment based on the build Usage: module load name, which loads the module you want to use. $SOFTDEVELNAME should then be the full path @@ -1136,11 +1136,17 @@ def make_devel_module(self): name, version = path.rsplit('/', 1) load_txt += mod_gen.loadModule(name, version) - output_dir = os.path.join(self.installdir, config.logPath()) - if not os.path.exists(output_dir): - os.makedirs(output_dir) + if not debug: + output_dir = os.path.join(self.installdir, config.logPath()) + if not os.path.exists(output_dir): + os.makedirs(output_dir) + else: + output_dir = self.builddir + + filename = os.path.join(output_dir, "%s-%s-easybuild-devel" % (self.name(), self.installversion())) + self.log.debug("Writing devel module to %s" % filename) - devel_module = open(os.path.join(output_dir, "%s-%s-easybuild-devel" % (self.name(), self.installversion())), "w") + devel_module = open(filename, "w") devel_module.write(header) devel_module.write(load_txt) devel_module.write(env_txt) From db3617ed85c3522839631be54a0de88ff712d727 Mon Sep 17 00:00:00 2001 From: Toon Willems Date: Mon, 13 Aug 2012 09:26:59 +0200 Subject: [PATCH 601/798] add prepare step, remove duplication of validstops --- easybuild/build.py | 6 ++---- easybuild/framework/application.py | 28 +++++++++++++++++++--------- easybuild/framework/easyblock.py | 2 +- 3 files changed, 22 insertions(+), 14 deletions(-) diff --git a/easybuild/build.py b/easybuild/build.py index 59a558495a..e1555394f5 100644 --- a/easybuild/build.py +++ b/easybuild/build.py @@ -77,11 +77,9 @@ def add_build_options(parser): help="does the build/installation in a test directory " \ "located in $HOME/easybuildinstall") - stop_options = ['cfg', 'source', 'patch', 'configure', 'make', 'install', - 'test', 'postproc', 'cleanup', 'packages'] - parser.add_option("-s", "--stop", type="choice", choices=stop_options, + parser.add_option("-s", "--stop", type="choice", choices=EasyBlock.validstops, help="stop the installation after certain step" \ - "(valid: %s)" % ', '.join(stop_options)) + "(valid: %s)" % ', '.join(EasyBlock.validstops)) parser.add_option("-b", "--only-blocks", metavar="blocks", help="Only build blocks blk[,blk2]") parser.add_option("-k", "--skip", action="store_true", help="skip existing software (useful for installing additional packages)") diff --git a/easybuild/framework/application.py b/easybuild/framework/application.py index 3bc9ccf640..2d4b0958c2 100644 --- a/easybuild/framework/application.py +++ b/easybuild/framework/application.py @@ -645,8 +645,8 @@ def build(self): ## PATCH self.runstep('patch', [self.apply_patch], skippable=True) - self.toolkit().prepare(self.getcfg('onlytkmod')) - self.startfrom() + # PREPARE + self.runstep('prepare', [self.prepare], skippable=True) ## CONFIGURE print_msg("configuring...", self.log) @@ -654,7 +654,7 @@ def build(self): ## MAKE print_msg("building...", self.log) - self.runstep('make', [self.make_devel_module, self.make], skippable=True) + self.runstep('make', [self.make], skippable=True) ## TEST print_msg("testing...", self.log) @@ -909,6 +909,15 @@ def startfrom(self): except OSError, err: self.log.exception("Can't change to real build directory %s: %s" % (self.getcfg('startfrom'), err)) + def prepare(self): + """ + Pre-configure step. Set's up the builddir just before starting configure + """ + self.toolkit().prepare(self.getcfg('onlytkmod')) + self.startfrom() + self.make_devel_module() + + def configure(self, cmd_prefix=''): """ Configure step @@ -1089,11 +1098,11 @@ def make_module(self, fake=False): self.log.info("Added modulefile: %s" % (self.moduleGenerator.filename)) if not fake: - self.make_devel_module(debug=False) + self.make_devel_module(create_in_builddir=False) return modpath - def make_devel_module(self, debug=True): + def make_devel_module(self, create_in_builddir=True): """ Create a develop module file which sets environment based on the build Usage: module load name, which loads the module you want to use. $SOFTDEVELNAME should then be the full path @@ -1130,18 +1139,19 @@ def make_devel_module(self, debug=True): # capture all the SOFTDEVEL vars # these should be all the dependencies and we should load them for key in os.environ: - if key.startswith("SOFTDEVEL"): + # select all the softdevel variables without my own + if key.startswith("SOFTDEVEL") and key != "SOFTDEVEL%s" % convertName(self.name(), upper=True): path = os.environ[key] if os.path.isfile(path): name, version = path.rsplit('/', 1) load_txt += mod_gen.loadModule(name, version) - if not debug: + if create_in_builddir: + output_dir = self.builddir + else: output_dir = os.path.join(self.installdir, config.logPath()) if not os.path.exists(output_dir): os.makedirs(output_dir) - else: - output_dir = self.builddir filename = os.path.join(output_dir, "%s-%s-easybuild-devel" % (self.name(), self.installversion())) self.log.debug("Writing devel module to %s" % filename) diff --git a/easybuild/framework/easyblock.py b/easybuild/framework/easyblock.py index 3937176ea2..35cf76c7b3 100644 --- a/easybuild/framework/easyblock.py +++ b/easybuild/framework/easyblock.py @@ -37,7 +37,7 @@ class EasyBlock: # mandatory entries mandatory = ['name', 'version', 'homepage', 'description', 'toolkit'] validmoduleclasses = ['base', 'compiler', 'lib'] - validstops = ['cfg', 'source', 'patch', 'configure', 'make', 'install', 'test', 'postproc', 'cleanup', 'packages'] + validstops = ['cfg', 'source', 'patch', 'prepare', 'configure', 'make', 'install', 'test', 'postproc', 'cleanup', 'packages'] default_config = { 'name': [None, "Name of software"], From dbeda7bcddf4264b67c22a471d3f0d6db69e232b Mon Sep 17 00:00:00 2001 From: Kenneth Hoste Date: Mon, 13 Aug 2012 09:30:17 +0200 Subject: [PATCH 602/798] style cleanup for CMake --- easybuild/easyblocks/c/cmake.py | 4 ++++ .../c/CMake/CMake-2.8.4-gimkl-0.5.3.eb | 21 ------------------- .../CMake/CMake-2.8.4-goalf-1.1.0-no-OFED.eb | 18 +++++++++------- .../c/CMake/CMake-2.8.4-ictce-4.0.6.eb | 19 ++++++++++------- 4 files changed, 25 insertions(+), 37 deletions(-) delete mode 100644 easybuild/easyconfigs/c/CMake/CMake-2.8.4-gimkl-0.5.3.eb diff --git a/easybuild/easyblocks/c/cmake.py b/easybuild/easyblocks/c/cmake.py index 0e94cf931c..8d8da88375 100644 --- a/easybuild/easyblocks/c/cmake.py +++ b/easybuild/easyblocks/c/cmake.py @@ -18,7 +18,11 @@ # You should have received a copy of the GNU General Public License # along with EasyBuild. If not, see . ## +""" +EasyBuild support for CMake, implemented as an easyblock +""" import os + from easybuild.framework.application import Application from easybuild.tools.filetools import run_cmd diff --git a/easybuild/easyconfigs/c/CMake/CMake-2.8.4-gimkl-0.5.3.eb b/easybuild/easyconfigs/c/CMake/CMake-2.8.4-gimkl-0.5.3.eb deleted file mode 100644 index 42f5f2bc12..0000000000 --- a/easybuild/easyconfigs/c/CMake/CMake-2.8.4-gimkl-0.5.3.eb +++ /dev/null @@ -1,21 +0,0 @@ -# we need to build with Application, not with CMake easyblock -easyblock="Application" - -name='CMake' -version='2.8.4' - -homepage='http://www.cmake.org' -description="""CMake, the cross-platform, open-source build system. -CMake is a family of tools designed to build, test and package software.""" - -toolkit={'name':'gimkl','version':'0.5.3'} - -sources=['%s-%s.tar.gz'%(name.lower(),version)] - -majorversion = ".".join(version.split('.')[:-1]) -sourceURLs = ['http://www.cmake.org/files/v%s' % majorversion] - -sanityCheckPaths={ - 'files':["bin/%s" % x for x in ['cmake','cpack','ctest']], - 'dirs':[] - } diff --git a/easybuild/easyconfigs/c/CMake/CMake-2.8.4-goalf-1.1.0-no-OFED.eb b/easybuild/easyconfigs/c/CMake/CMake-2.8.4-goalf-1.1.0-no-OFED.eb index 393cc081a2..7fa3973b8f 100644 --- a/easybuild/easyconfigs/c/CMake/CMake-2.8.4-goalf-1.1.0-no-OFED.eb +++ b/easybuild/easyconfigs/c/CMake/CMake-2.8.4-goalf-1.1.0-no-OFED.eb @@ -1,21 +1,23 @@ -# we need to build with Application, not with CMake easyblock +# we need to build CMake with Application easyblock, +# not with CMake easyblock for software being configured with CMake easyblock="Application" -name='CMake' -version='2.8.4' +name = 'CMake' +version = '2.8.4' -homepage='http://www.cmake.org' -description="""CMake, the cross-platform, open-source build system. +homepage = 'http://www.cmake.org' +description = """CMake, the cross-platform, open-source build system. CMake is a family of tools designed to build, test and package software.""" -toolkit={'name':'goalf','version':'1.1.0-no-OFED'} +toolkit = {'name': 'goalf', 'version': '1.1.0-no-OFED'} -sources=['%s-%s.tar.gz'%(name.lower(),version)] +sourceURLs = ["http://www.cmake.org/files/v%s/" % '.'.join(version.split('.')[0:2])] +sources = ['%s-%s.tar.gz' % (name.lower(), version)] majorversion = ".".join(version.split('.')[:-1]) sourceURLs = ['http://www.cmake.org/files/v%s' % majorversion] sanityCheckPaths={ - 'files':["bin/%s" % x for x in ['cmake','cpack','ctest']], + 'files':["bin/%s" % x for x in ['cmake', 'cpack', 'ctest']], 'dirs':[] } diff --git a/easybuild/easyconfigs/c/CMake/CMake-2.8.4-ictce-4.0.6.eb b/easybuild/easyconfigs/c/CMake/CMake-2.8.4-ictce-4.0.6.eb index 69bfffecf5..a189d2a257 100644 --- a/easybuild/easyconfigs/c/CMake/CMake-2.8.4-ictce-4.0.6.eb +++ b/easybuild/easyconfigs/c/CMake/CMake-2.8.4-ictce-4.0.6.eb @@ -1,21 +1,24 @@ -# we need to build with Application, not with CMake easyblock +# we need to build CMake with Application easyblock, +# not with CMake easyblock for software being configured with CMake easyblock="Application" -name='CMake' -version='2.8.4' +name = 'CMake' +version = '2.8.4' -homepage='http://www.cmake.org' -description="""CMake, the cross-platform, open-source build system. +homepage = 'http://www.cmake.org' +description = """CMake, the cross-platform, open-source build system. CMake is a family of tools designed to build, test and package software.""" -toolkit={'name':'ictce','version':'4.0.6'} +toolkit = {'name': 'ictce', 'version': '4.0.6'} -sources=['%s-%s.tar.gz'%(name.lower(),version)] +sourceURLs = ["http://www.cmake.org/files/v%s/" % '.'.join(version.split('.')[0:2])] +sources = ['%s-%s.tar.gz' % (name.lower(), version)] majorversion = ".".join(version.split('.')[:-1]) sourceURLs = ['http://www.cmake.org/files/v%s' % majorversion] sanityCheckPaths={ - 'files':["bin/%s" % x for x in ['cmake','cpack','ctest']], + 'files':["bin/%s" % x for x in ['cmake', 'cpack', 'ctest']], 'dirs':[] } + From 059c59581432dafccab023553aedc6db4bcd8490 Mon Sep 17 00:00:00 2001 From: Kenneth Hoste Date: Mon, 13 Aug 2012 09:32:31 +0200 Subject: [PATCH 603/798] fix docstrings for CMake and CMakePythonPackage classes --- easybuild/easyblocks/c/cmake.py | 2 +- easybuild/easyblocks/c/cmakepythonpackage.py | 7 ++++++- 2 files changed, 7 insertions(+), 2 deletions(-) diff --git a/easybuild/easyblocks/c/cmake.py b/easybuild/easyblocks/c/cmake.py index 8d8da88375..65b43e479a 100644 --- a/easybuild/easyblocks/c/cmake.py +++ b/easybuild/easyblocks/c/cmake.py @@ -19,7 +19,7 @@ # along with EasyBuild. If not, see . ## """ -EasyBuild support for CMake, implemented as an easyblock +EasyBuild support for software that is configured with CMake, implemented as an easyblock """ import os diff --git a/easybuild/easyblocks/c/cmakepythonpackage.py b/easybuild/easyblocks/c/cmakepythonpackage.py index 5b0155020d..a595ab9ce3 100644 --- a/easybuild/easyblocks/c/cmakepythonpackage.py +++ b/easybuild/easyblocks/c/cmakepythonpackage.py @@ -17,9 +17,13 @@ # You should have received a copy of the GNU General Public License # along with EasyBuild. If not, see . ## +""" +EasyBuild support for Python packages that are configured with CMake, implemented as an easyblock +""" from easybuild.easyblocks.c.cmake import CMake from easybuild.easyblocks.p.pythonpackage import PythonPackage + class CMakePythonPackage(CMake, PythonPackage): """Build a Python package and module with cmake. @@ -27,12 +31,13 @@ class CMakePythonPackage(CMake, PythonPackage): and then put the Python package in lib/pythonX.Y/site-packages. We install this in a seperate location and generate a module file - witch sets the PYTHONPATH. + which sets the PYTHONPATH. We use the default CMake implementation, and use make_module_extra from PythonPackage. """ def __init__(self, *args, **kwargs): + """Initialize with PythonPackage.""" PythonPackage.__init__(self, *args, **kwargs) def configure(self, *args, **kwargs): From 3c65aea2b9b6c25dc1b1ba79d8b0cf7fa0348f03 Mon Sep 17 00:00:00 2001 From: Kenneth Hoste Date: Mon, 13 Aug 2012 09:38:11 +0200 Subject: [PATCH 604/798] style cleanup for METIS --- easybuild/easyblocks/m/metis.py | 32 +++++++++++-------- .../METIS/METIS-4.0.1-goalf-1.1.0-no-OFED.eb | 22 +++++++------ .../m/METIS/METIS-4.0.1-ictce-4.0.6.eb | 22 +++++++------ .../METIS/METIS-5.0.2-goalf-1.1.0-no-OFED.eb | 22 +++++++------ .../m/METIS/METIS-5.0.2-ictce-4.0.6.eb | 22 +++++++------ .../{renameh_log2.patch => rename_log2.patch} | 0 6 files changed, 67 insertions(+), 53 deletions(-) rename easybuild/easyconfigs/m/METIS/{renameh_log2.patch => rename_log2.patch} (100%) diff --git a/easybuild/easyblocks/m/metis.py b/easybuild/easyblocks/m/metis.py index 40e8a2cb1e..76ef72d07e 100644 --- a/easybuild/easyblocks/m/metis.py +++ b/easybuild/easyblocks/m/metis.py @@ -18,15 +18,19 @@ # You should have received a copy of the GNU General Public License # along with EasyBuild. If not, see . ## - -from distutils.version import LooseVersion +""" +EasyBuild support for METIS, implemented as an easyblock +""" import os import shutil +from distutils.version import LooseVersion + from easybuild.framework.application import Application from easybuild.tools.filetools import run_cmd, mkdir + class METIS(Application): - """Support for building METIS.""" + """Support for building and installing METIS.""" def configure(self, *args, **kwargs): """Configure build using 'make config' (only for recent versions).""" @@ -47,7 +51,7 @@ def make(self): Application.make(self) def make_install(self): - """Install by manually copy files to install dir, for old versions, + """Install by manually copying files to install dir, for old versions, or by running 'make install' for new versions. Create symlinks where expected by other applications @@ -57,10 +61,10 @@ def make_install(self): libdir = os.path.join(self.installdir, 'lib') mkdir(libdir) - + includedir = os.path.join(self.installdir, 'include') mkdir(includedir) - + # copy libraries try: src = os.path.join(self.getcfg('startfrom'), 'libmetis.a') @@ -68,7 +72,7 @@ def make_install(self): shutil.copy2(src, dst) except OSError, err: self.log.error("Copying file libmetis.a to lib dir failed: %s" % err) - + # copy include files try: for f in ['defs.h', 'macros.h', 'metis.h', 'proto.h', 'rename.h', 'struct.h']: @@ -78,8 +82,8 @@ def make_install(self): os.chmod(dst, 0755) except OSError, err: self.log.error("Copying file metis.h to include dir failed: %s" % err) - - # Other applications depending on ParMETIS (SuiteSparse for one) look for both ParMETIS libraries + + # other applications depending on ParMETIS (SuiteSparse for one) look for both ParMETIS libraries # and header files in the Lib directory (capital L). The following symlinks are hence created. try: Libdir = os.path.join(self.installdir, 'Lib') @@ -99,20 +103,22 @@ def sanitycheck(self): binfiles = [] if LooseVersion(self.version()) > LooseVersion("5"): - binfiles += ["cmpfillin","gpmetis","graphchk","m2gmetis","mpmetis","ndmetis"] + binfiles += ["cmpfillin", "gpmetis", "graphchk", "m2gmetis", "mpmetis", "ndmetis"] incfiles = ["metis.h"] if LooseVersion(self.version()) < LooseVersion("5"): - incfiles += ["defs.h","macros.h","metis.h","proto.h","rename.h","struct.h"] + incfiles += ["defs.h", "macros.h", "proto.h", "rename.h", "struct.h"] dirs = [] if LooseVersion(self.version()) < LooseVersion("5"): dirs += ["Lib"] - self.setcfg('sanityCheckPaths', {'files': ['bin/%s' % x for x in binfiles] + + self.setcfg('sanityCheckPaths', { + 'files': ['bin/%s' % x for x in binfiles] + ['include/%s' % x for x in incfiles] + ['lib/libmetis.a'], - 'dirs' : dirs}) + 'dirs' : dirs + }) self.log.info("Customized sanity check paths: %s" % self.getcfg('sanityCheckPaths')) diff --git a/easybuild/easyconfigs/m/METIS/METIS-4.0.1-goalf-1.1.0-no-OFED.eb b/easybuild/easyconfigs/m/METIS/METIS-4.0.1-goalf-1.1.0-no-OFED.eb index add2e0f0d9..8ab6b80b9a 100644 --- a/easybuild/easyconfigs/m/METIS/METIS-4.0.1-goalf-1.1.0-no-OFED.eb +++ b/easybuild/easyconfigs/m/METIS/METIS-4.0.1-goalf-1.1.0-no-OFED.eb @@ -1,14 +1,16 @@ -name='METIS' -version='4.0.1' +name = 'METIS' +version = '4.0.1' -homepage='http://glaros.dtc.umn.edu/gkhome/metis/metis/overview' -description="METIS is a set of serial programs for partitioning graphs, partitioning finite element meshes, and producing fill reducing orderings for sparse matrices. The algorithms implemented in METIS are based on the multilevel recursive-bisection, multilevel k-way, and multi-constraint partitioning schemes." +homepage = 'http://glaros.dtc.umn.edu/gkhome/metis/metis/overview' +description = """METIS is a set of serial programs for partitioning graphs, partitioning finite element meshes, +and producing fill reducing orderings for sparse matrices. The algorithms implemented in METIS are based on the +multilevel recursive-bisection, multilevel k-way, and multi-constraint partitioning schemes.""" -toolkit={'name':'goalf','version':'1.1.0-no-OFED'} -toolkitopts={'optarch':True, 'pic':True} +toolkit = {'name': 'goalf', 'version': '1.1.0-no-OFED'} +toolkitopts = {'optarch': True, 'pic': True} -sources=['%s-%s.tar.gz'%(name.lower(), version)] -sourceURLs=['http://glaros.dtc.umn.edu/gkhome/fetch/sw/metis', - 'http://glaros.dtc.umn.edu/gkhome/fetch/sw/metis/OLD'] +sourceURLs = ['http://glaros.dtc.umn.edu/gkhome/fetch/sw/metis', + 'http://glaros.dtc.umn.edu/gkhome/fetch/sw/metis/OLD'] +sources = ['%s-%s.tar.gz' % (name.lower(), version)] -patches=['renameh_log2.patch'] +patches = ['rename_log2.patch'] diff --git a/easybuild/easyconfigs/m/METIS/METIS-4.0.1-ictce-4.0.6.eb b/easybuild/easyconfigs/m/METIS/METIS-4.0.1-ictce-4.0.6.eb index bd831cf2cc..b7185628b5 100644 --- a/easybuild/easyconfigs/m/METIS/METIS-4.0.1-ictce-4.0.6.eb +++ b/easybuild/easyconfigs/m/METIS/METIS-4.0.1-ictce-4.0.6.eb @@ -1,14 +1,16 @@ -name='METIS' -version='4.0.1' +name = 'METIS' +version = '4.0.1' -homepage='http://glaros.dtc.umn.edu/gkhome/metis/metis/overview' -description="METIS is a set of serial programs for partitioning graphs, partitioning finite element meshes, and producing fill reducing orderings for sparse matrices. The algorithms implemented in METIS are based on the multilevel recursive-bisection, multilevel k-way, and multi-constraint partitioning schemes." +homepage = 'http://glaros.dtc.umn.edu/gkhome/metis/metis/overview' +description = """METIS is a set of serial programs for partitioning graphs, partitioning finite element meshes, +and producing fill reducing orderings for sparse matrices. The algorithms implemented in METIS are based on the +multilevel recursive-bisection, multilevel k-way, and multi-constraint partitioning schemes.""" -toolkit={'name':'ictce','version':'4.0.6'} -toolkitopts={'optarch':True, 'pic':True} +toolkit = {'name': 'ictce', 'version': '4.0.6'} +toolkitopts = {'optarch': True, 'pic': True} -sources=['%s-%s.tar.gz'%(name.lower(), version)] -sourceURLs=['http://glaros.dtc.umn.edu/gkhome/fetch/sw/metis', - 'http://glaros.dtc.umn.edu/gkhome/fetch/sw/metis/OLD'] +sourceURLs = ['http://glaros.dtc.umn.edu/gkhome/fetch/sw/metis', + 'http://glaros.dtc.umn.edu/gkhome/fetch/sw/metis/OLD'] +sources = ['%s-%s.tar.gz' % (name.lower(), version)] -patches=['renameh_log2.patch'] +patches=['rename_log2.patch'] diff --git a/easybuild/easyconfigs/m/METIS/METIS-5.0.2-goalf-1.1.0-no-OFED.eb b/easybuild/easyconfigs/m/METIS/METIS-5.0.2-goalf-1.1.0-no-OFED.eb index 4355a0dad7..bfbf2f45b5 100644 --- a/easybuild/easyconfigs/m/METIS/METIS-5.0.2-goalf-1.1.0-no-OFED.eb +++ b/easybuild/easyconfigs/m/METIS/METIS-5.0.2-goalf-1.1.0-no-OFED.eb @@ -1,14 +1,16 @@ -name='METIS' -version='5.0.2' +name = 'METIS' +version = '5.0.2' -homepage='http://glaros.dtc.umn.edu/gkhome/metis/metis/overview' -description="METIS is a set of serial programs for partitioning graphs, partitioning finite element meshes, and producing fill reducing orderings for sparse matrices. The algorithms implemented in METIS are based on the multilevel recursive-bisection, multilevel k-way, and multi-constraint partitioning schemes." +homepage = 'http://glaros.dtc.umn.edu/gkhome/metis/metis/overview' +description = """METIS is a set of serial programs for partitioning graphs, partitioning finite element meshes, +and producing fill reducing orderings for sparse matrices. The algorithms implemented in METIS are based on the +multilevel recursive-bisection, multilevel k-way, and multi-constraint partitioning schemes.""" -toolkit={'name':'goalf','version':'1.1.0-no-OFED'} -toolkitopts={'optarch':True, 'pic':True} +toolkit = {'name': 'goalf', 'version': '1.1.0-no-OFED'} +toolkitopts = {'optarch': True, 'pic': True} -sources=['%s-%s.tar.gz'%(name.lower(), version)] -sourceURLs=['http://glaros.dtc.umn.edu/gkhome/fetch/sw/metis', - 'http://glaros.dtc.umn.edu/gkhome/fetch/sw/metis/OLD'] +sourceURLs = ['http://glaros.dtc.umn.edu/gkhome/fetch/sw/metis', + 'http://glaros.dtc.umn.edu/gkhome/fetch/sw/metis/OLD'] +sources = ['%s-%s.tar.gz' % (name.lower(), version)] -dependencies=[('CMake','2.8.4')] \ No newline at end of file +dependencies = [('CMake', '2.8.4')] \ No newline at end of file diff --git a/easybuild/easyconfigs/m/METIS/METIS-5.0.2-ictce-4.0.6.eb b/easybuild/easyconfigs/m/METIS/METIS-5.0.2-ictce-4.0.6.eb index ae3ee6c6a5..3597f5d600 100644 --- a/easybuild/easyconfigs/m/METIS/METIS-5.0.2-ictce-4.0.6.eb +++ b/easybuild/easyconfigs/m/METIS/METIS-5.0.2-ictce-4.0.6.eb @@ -1,14 +1,16 @@ -name='METIS' -version='5.0.2' +name = 'METIS' +version = '5.0.2' -homepage='http://glaros.dtc.umn.edu/gkhome/metis/metis/overview' -description="METIS is a set of serial programs for partitioning graphs, partitioning finite element meshes, and producing fill reducing orderings for sparse matrices. The algorithms implemented in METIS are based on the multilevel recursive-bisection, multilevel k-way, and multi-constraint partitioning schemes." +homepage = 'http://glaros.dtc.umn.edu/gkhome/metis/metis/overview' +description = """METIS is a set of serial programs for partitioning graphs, partitioning finite element meshes, +and producing fill reducing orderings for sparse matrices. The algorithms implemented in METIS are based on the +multilevel recursive-bisection, multilevel k-way, and multi-constraint partitioning schemes.""" -toolkit={'name':'ictce','version':'4.0.6'} -toolkitopts={'optarch':True, 'pic':True} +toolkit = {'name': 'ictce', 'version': '4.0.6'} +toolkitopts = {'optarch': True, 'pic': True} -sources=['%s-%s.tar.gz'%(name.lower(), version)] -sourceURLs=['http://glaros.dtc.umn.edu/gkhome/fetch/sw/metis', - 'http://glaros.dtc.umn.edu/gkhome/fetch/sw/metis/OLD'] +sourceURLs = ['http://glaros.dtc.umn.edu/gkhome/fetch/sw/metis', + 'http://glaros.dtc.umn.edu/gkhome/fetch/sw/metis/OLD'] +sources = ['%s-%s.tar.gz' % (name.lower(), version)] -dependencies=[('CMake','2.8.4')] \ No newline at end of file +dependencies = [('CMake', '2.8.4')] \ No newline at end of file diff --git a/easybuild/easyconfigs/m/METIS/renameh_log2.patch b/easybuild/easyconfigs/m/METIS/rename_log2.patch similarity index 100% rename from easybuild/easyconfigs/m/METIS/renameh_log2.patch rename to easybuild/easyconfigs/m/METIS/rename_log2.patch From 8513d6aec40a05b825c7e5930a4a8d78426733ee Mon Sep 17 00:00:00 2001 From: Kenneth Hoste Date: Mon, 13 Aug 2012 09:39:17 +0200 Subject: [PATCH 605/798] style cleanup for MTL4 --- easybuild/easyblocks/m/mtl4.py | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/easybuild/easyblocks/m/mtl4.py b/easybuild/easyblocks/m/mtl4.py index a09de59ed0..fa4b9148a8 100644 --- a/easybuild/easyblocks/m/mtl4.py +++ b/easybuild/easyblocks/m/mtl4.py @@ -17,7 +17,9 @@ # You should have received a copy of the GNU General Public License # along with EasyBuild. If not, see . ## - +""" +EasyBuild support for MTL4, implemented as an easyblock +""" import os from easybuild.easyblocks.t.tarball import Tarball @@ -40,7 +42,8 @@ def sanitycheck(self): incpref = os.path.join('include','boost', 'numeric') - self.setcfg('sanityCheckPaths', {'files':[], + self.setcfg('sanityCheckPaths', { + 'files':[], 'dirs':[os.path.join(incpref, x) for x in ["itl", "linear_algebra", "meta_math", From 38c1c592237ed63c39bdab921f283c48e228368c Mon Sep 17 00:00:00 2001 From: Kenneth Hoste Date: Mon, 13 Aug 2012 09:45:11 +0200 Subject: [PATCH 606/798] style cleanup for ParMETIS --- easybuild/easyblocks/p/parmetis.py | 18 ++++++++----- .../ParMETIS-3.1.1-goalf-1.1.0-no-OFED.eb | 16 ++++++------ .../p/ParMETIS/ParMETIS-3.1.1-ictce-4.0.6.eb | 16 ++++++------ .../p/ParMETIS/ParMETIS-4.0.2-gimkl-0.5.3.eb | 17 ------------- .../ParMETIS-4.0.2-goalf-1.1.0-no-OFED.eb | 25 ++++++++++--------- .../p/ParMETIS/ParMETIS-4.0.2-ictce-4.0.6.eb | 25 ++++++++++--------- 6 files changed, 54 insertions(+), 63 deletions(-) delete mode 100644 easybuild/easyconfigs/p/ParMETIS/ParMETIS-4.0.2-gimkl-0.5.3.eb diff --git a/easybuild/easyblocks/p/parmetis.py b/easybuild/easyblocks/p/parmetis.py index 33695ef483..2aeb970325 100644 --- a/easybuild/easyblocks/p/parmetis.py +++ b/easybuild/easyblocks/p/parmetis.py @@ -18,12 +18,17 @@ # You should have received a copy of the GNU General Public License # along with EasyBuild. If not, see . ## +""" +EasyBuild support for ParMETIS, implemented as an easyblock +""" import os import shutil + from distutils.version import LooseVersion from easybuild.framework.application import Application from easybuild.tools.filetools import run_cmd, mkdir + class ParMETIS(Application): """Support for building and installing ParMETIS.""" @@ -96,7 +101,7 @@ def make_install(self): libdir = os.path.join(self.installdir, 'lib') if LooseVersion(self.version()) >= LooseVersion("4"): - #i ncludedir etc changed in v4, use a normal makeinstall + # includedir etc changed in v4, use a normal make install cmd = "make install %s" % self.getcfg('installopts') try: os.chdir(self.parmetis_builddir) @@ -122,7 +127,6 @@ def make_install(self): self.log.error("Copying files to installation dir failed: %s" % err) else: - mkdir(libdir) mkdir(includedir) @@ -140,13 +144,13 @@ def make_install(self): src = os.path.join(self.getcfg('startfrom'), 'parmetis.h') dst = os.path.join(includedir, 'parmetis.h') shutil.copy2(src, dst) - # Some applications (SuiteSparse) can only use METIS (not ParMETIS), but header files are the same + # some applications (SuiteSparse) can only use METIS (not ParMETIS), but header files are the same dst = os.path.join(includedir, 'metis.h') shutil.copy2(src, dst) except OSError, err: self.log.error("Copying files to installation dir failed: %s" % err) - # Other applications depending on ParMETIS (SuiteSparse for one) look for both ParMETIS libraries + # other applications depending on ParMETIS (SuiteSparse for one) look for both ParMETIS libraries # and header files in the Lib directory (capital L). The following symlink are hence created. try: llibdir = os.path.join(self.installdir, 'Lib') @@ -161,9 +165,11 @@ def sanitycheck(self): if not self.getcfg('sanityCheckPaths'): - self.setcfg('sanityCheckPaths', {'files': ['include/%smetis.h' % x for x in ["", "par"]] + + self.setcfg('sanityCheckPaths', { + 'files': ['include/%smetis.h' % x for x in ["", "par"]] + ['lib/lib%smetis.a' % x for x in ["", "par"]], - 'dirs':['Lib']}) + 'dirs':['Lib'] + }) self.log.info("Customized sanity check paths: %s" % self.getcfg('sanityCheckPaths')) diff --git a/easybuild/easyconfigs/p/ParMETIS/ParMETIS-3.1.1-goalf-1.1.0-no-OFED.eb b/easybuild/easyconfigs/p/ParMETIS/ParMETIS-3.1.1-goalf-1.1.0-no-OFED.eb index 5525aa8a24..f97e48c33e 100644 --- a/easybuild/easyconfigs/p/ParMETIS/ParMETIS-3.1.1-goalf-1.1.0-no-OFED.eb +++ b/easybuild/easyconfigs/p/ParMETIS/ParMETIS-3.1.1-goalf-1.1.0-no-OFED.eb @@ -1,18 +1,18 @@ -name='ParMETIS' -version='3.1.1' +name = 'ParMETIS' +version = '3.1.1' -homepage='http://glaros.dtc.umn.edu/gkhome/metis/parmetis/overview' -description="""ParMETIS is an MPI-based parallel library that implements a variety of algorithms for partitioning unstructured graphs, +homepage = 'http://glaros.dtc.umn.edu/gkhome/metis/parmetis/overview' +description = """ParMETIS is an MPI-based parallel library that implements a variety of algorithms for partitioning unstructured graphs, meshes, and for computing fill-reducing orderings of sparse matrices. ParMETIS extends the functionality provided by METIS and includes routines that are especially suited for parallel AMR computations and large scale numerical simulations. The algorithms implemented in ParMETIS are based on the parallel multilevel k-way graph-partitioning, adaptive repartitioning, and parallel multi-constrained partitioning schemes.""" -toolkit={'name':'goalf','version':'1.1.0-no-OFED'} -toolkitopts={'optarch':True, 'usempi': True, 'pic':True} +toolkit = {'name': 'goalf', 'version': '1.1.0-no-OFED'} +toolkitopts = {'optarch': True, 'usempi': True, 'pic': True} -sources=['ParMetis-%s.tar.gz' % version] sourceURLs = ['http://glaros.dtc.umn.edu/gkhome/fetch/sw/parmetis', 'http://glaros.dtc.umn.edu/gkhome/fetch/sw/parmetis/OLD'] +sources = ['ParMetis-%s.tar.gz' % version] -builddependencies = [('CMake','2.8.4')] +builddependencies = [('CMake', '2.8.4')] diff --git a/easybuild/easyconfigs/p/ParMETIS/ParMETIS-3.1.1-ictce-4.0.6.eb b/easybuild/easyconfigs/p/ParMETIS/ParMETIS-3.1.1-ictce-4.0.6.eb index 327fdd3b03..2e4dc59f62 100644 --- a/easybuild/easyconfigs/p/ParMETIS/ParMETIS-3.1.1-ictce-4.0.6.eb +++ b/easybuild/easyconfigs/p/ParMETIS/ParMETIS-3.1.1-ictce-4.0.6.eb @@ -1,18 +1,18 @@ -name='ParMETIS' -version='3.1.1' +name = 'ParMETIS' +version = '3.1.1' -homepage='http://glaros.dtc.umn.edu/gkhome/metis/parmetis/overview' -description="""ParMETIS is an MPI-based parallel library that implements a variety of algorithms for partitioning unstructured graphs, +homepage = 'http://glaros.dtc.umn.edu/gkhome/metis/parmetis/overview' +description = """ParMETIS is an MPI-based parallel library that implements a variety of algorithms for partitioning unstructured graphs, meshes, and for computing fill-reducing orderings of sparse matrices. ParMETIS extends the functionality provided by METIS and includes routines that are especially suited for parallel AMR computations and large scale numerical simulations. The algorithms implemented in ParMETIS are based on the parallel multilevel k-way graph-partitioning, adaptive repartitioning, and parallel multi-constrained partitioning schemes.""" -toolkit={'name':'ictce','version':'4.0.6'} -toolkitopts={'optarch':True, 'usempi': True, 'pic':True} +toolkit = {'name': 'ictce', 'version': '4.0.6'} +toolkitopts = {'optarch': True, 'usempi': True, 'pic': True} -sources=['ParMetis-%s.tar.gz' % version] sourceURLs = ['http://glaros.dtc.umn.edu/gkhome/fetch/sw/parmetis', 'http://glaros.dtc.umn.edu/gkhome/fetch/sw/parmetis/OLD'] +sources = ['ParMetis-%s.tar.gz' % version] -builddependencies = [('CMake','2.8.4')] +builddependencies = [('CMake', '2.8.4')] diff --git a/easybuild/easyconfigs/p/ParMETIS/ParMETIS-4.0.2-gimkl-0.5.3.eb b/easybuild/easyconfigs/p/ParMETIS/ParMETIS-4.0.2-gimkl-0.5.3.eb deleted file mode 100644 index 2e636230c7..0000000000 --- a/easybuild/easyconfigs/p/ParMETIS/ParMETIS-4.0.2-gimkl-0.5.3.eb +++ /dev/null @@ -1,17 +0,0 @@ -easyblock="ParMETIS" - -name='ParMETIS' -version='4.0.2' - -homepage='http://glaros.dtc.umn.edu/gkhome/metis/parmetis/overview' -description="ParMETIS is an MPI-based parallel library that implements a variety of algorithms for partitioning unstructured graphs, meshes, and for computing fill-reducing orderings of sparse matrices. ParMETIS extends the functionality provided by METIS and includes routines that are especially suited for parallel AMR computations and large scale numerical simulations. The algorithms implemented in ParMETIS are based on the parallel multilevel k-way graph-partitioning, adaptive repartitioning, and parallel multi-constrained partitioning schemes." -builddependencies = [ - ('CMake','2.8.4'), - ] - -toolkit={'name':'gimkl','version':'0.5.3'} -toolkitopts={'optarch':True, 'usempi': True} - -sources=['%s-%s.tar.gz' % (name.lower(),version)] -sourceURLs = ['http://glaros.dtc.umn.edu/gkhome/fetch/sw/parmetis', - 'http://glaros.dtc.umn.edu/gkhome/fetch/sw/parmetis/OLD'] diff --git a/easybuild/easyconfigs/p/ParMETIS/ParMETIS-4.0.2-goalf-1.1.0-no-OFED.eb b/easybuild/easyconfigs/p/ParMETIS/ParMETIS-4.0.2-goalf-1.1.0-no-OFED.eb index 227b91459f..5aeca838bf 100644 --- a/easybuild/easyconfigs/p/ParMETIS/ParMETIS-4.0.2-goalf-1.1.0-no-OFED.eb +++ b/easybuild/easyconfigs/p/ParMETIS/ParMETIS-4.0.2-goalf-1.1.0-no-OFED.eb @@ -1,17 +1,18 @@ -easyblock="ParMETIS" +name = 'ParMETIS' +version = '4.0.2' -name='ParMETIS' -version='4.0.2' +homepage = 'http://glaros.dtc.umn.edu/gkhome/metis/parmetis/overview' +description = """ParMETIS is an MPI-based parallel library that implements a variety of algorithms for partitioning unstructured graphs, +meshes, and for computing fill-reducing orderings of sparse matrices. ParMETIS extends the functionality provided by METIS and includes +routines that are especially suited for parallel AMR computations and large scale numerical simulations. The algorithms implemented in +ParMETIS are based on the parallel multilevel k-way graph-partitioning, adaptive repartitioning, and parallel multi-constrained partitioning +schemes.""" -homepage='http://glaros.dtc.umn.edu/gkhome/metis/parmetis/overview' -description="ParMETIS is an MPI-based parallel library that implements a variety of algorithms for partitioning unstructured graphs, meshes, and for computing fill-reducing orderings of sparse matrices. ParMETIS extends the functionality provided by METIS and includes routines that are especially suited for parallel AMR computations and large scale numerical simulations. The algorithms implemented in ParMETIS are based on the parallel multilevel k-way graph-partitioning, adaptive repartitioning, and parallel multi-constrained partitioning schemes." -builddependencies = [ - ('CMake','2.8.4'), - ] +toolkit = {'name': 'goalf', 'version': '1.1.0-no-OFED'} +toolkitopts = {'optarch': True, 'usempi': True} -toolkit={'name':'goalf','version':'1.1.0-no-OFED'} -toolkitopts={'optarch':True, 'usempi': True} - -sources=['%s-%s.tar.gz' % (name.lower(),version)] sourceURLs = ['http://glaros.dtc.umn.edu/gkhome/fetch/sw/parmetis', 'http://glaros.dtc.umn.edu/gkhome/fetch/sw/parmetis/OLD'] +sources = ['%s-%s.tar.gz' % (name.lower(), version)] + +builddependencies = [('CMake', '2.8.4')] diff --git a/easybuild/easyconfigs/p/ParMETIS/ParMETIS-4.0.2-ictce-4.0.6.eb b/easybuild/easyconfigs/p/ParMETIS/ParMETIS-4.0.2-ictce-4.0.6.eb index 1f937d6cc0..826fa2b720 100644 --- a/easybuild/easyconfigs/p/ParMETIS/ParMETIS-4.0.2-ictce-4.0.6.eb +++ b/easybuild/easyconfigs/p/ParMETIS/ParMETIS-4.0.2-ictce-4.0.6.eb @@ -1,17 +1,18 @@ -easyblock="ParMETIS" +name = 'ParMETIS' +version = '4.0.2' -name='ParMETIS' -version='4.0.2' +homepage = 'http://glaros.dtc.umn.edu/gkhome/metis/parmetis/overview' +description = """ParMETIS is an MPI-based parallel library that implements a variety of algorithms for partitioning unstructured graphs, +meshes, and for computing fill-reducing orderings of sparse matrices. ParMETIS extends the functionality provided by METIS and includes +routines that are especially suited for parallel AMR computations and large scale numerical simulations. The algorithms implemented in +ParMETIS are based on the parallel multilevel k-way graph-partitioning, adaptive repartitioning, and parallel multi-constrained partitioning +schemes.""" -homepage='http://glaros.dtc.umn.edu/gkhome/metis/parmetis/overview' -description="ParMETIS is an MPI-based parallel library that implements a variety of algorithms for partitioning unstructured graphs, meshes, and for computing fill-reducing orderings of sparse matrices. ParMETIS extends the functionality provided by METIS and includes routines that are especially suited for parallel AMR computations and large scale numerical simulations. The algorithms implemented in ParMETIS are based on the parallel multilevel k-way graph-partitioning, adaptive repartitioning, and parallel multi-constrained partitioning schemes." -builddependencies = [ - ('CMake','2.8.4'), - ] +toolkit = {'name': 'ictce', 'version': '4.0.6'} +toolkitopts = {'optarch': True, 'usempi': True} -toolkit={'name':'ictce','version':'4.0.6'} -toolkitopts={'optarch':True, 'usempi': True} - -sources=['%s-%s.tar.gz' % (name.lower(),version)] sourceURLs = ['http://glaros.dtc.umn.edu/gkhome/fetch/sw/parmetis', 'http://glaros.dtc.umn.edu/gkhome/fetch/sw/parmetis/OLD'] +sources = ['%s-%s.tar.gz' % (name.lower(), version)] + +builddependencies = [('CMake', '2.8.4')] From 7c614c20b739552802d0df43c64a16aff5f4646c Mon Sep 17 00:00:00 2001 From: Kenneth Hoste Date: Mon, 13 Aug 2012 09:48:19 +0200 Subject: [PATCH 607/798] style cleanup for PETSc --- easybuild/easyblocks/p/petsc.py | 15 +++++++++------ ...TSc-3.3-p2-goalf-1.1.0-no-OFED-Python-2.7.3.eb | 4 ++-- 2 files changed, 11 insertions(+), 8 deletions(-) diff --git a/easybuild/easyblocks/p/petsc.py b/easybuild/easyblocks/p/petsc.py index edf348c32d..9e83459261 100644 --- a/easybuild/easyblocks/p/petsc.py +++ b/easybuild/easyblocks/p/petsc.py @@ -19,9 +19,8 @@ # along with EasyBuild. If not, see . ## """ -EasyBuild support for building and installing PETSc, implemented as an easyblock +EasyBuild support for PETSc, implemented as an easyblock """ - import os import re from distutils.version import LooseVersion @@ -155,10 +154,13 @@ def configure(self): umfpack_libs = [os.path.join(suitesparse, l, "Lib", "lib%s.a" % l.lower()) for l in ["UMFPACK", "CHOLMOD", "COLAMD", "AMD"]] - self.updatecfg('configopts', ' '.join([(withdep+x) for x in ["=1", + self.updatecfg('configopts', ' '.join([(withdep+x) for x in [ + "=1", "-include=%s" % os.path.join(suitesparse, "UMFPACK", "Include"), "-lib=[%s]" % ','.join(umfpack_libs) - ]])) + ] + ]) + ) # set PETSC_DIR for configure (env) and make env.set('PETSC_DIR', self.getcfg('startfrom')) @@ -206,7 +208,7 @@ def configure(self): # default make should be fine def make_install(self): - + """Install using make install (for non-source installations), or by symlinking files (old versions).""" if LooseVersion(self.version()) >= LooseVersion("3"): if not self.getcfg('sourceinstall'): Application.make_install(self) @@ -270,7 +272,8 @@ def sanitycheck(self): else: libext = "a" - self.setcfg('sanityCheckPaths', {'files': [os.path.join(prefix2, + self.setcfg('sanityCheckPaths', { + 'files': [os.path.join(prefix2, "lib", "libpetsc.%s" % libext) ], diff --git a/easybuild/easyconfigs/p/PETSc/PETSc-3.3-p2-goalf-1.1.0-no-OFED-Python-2.7.3.eb b/easybuild/easyconfigs/p/PETSc/PETSc-3.3-p2-goalf-1.1.0-no-OFED-Python-2.7.3.eb index 5c94f70446..fac5d72171 100644 --- a/easybuild/easyconfigs/p/PETSc/PETSc-3.3-p2-goalf-1.1.0-no-OFED-Python-2.7.3.eb +++ b/easybuild/easyconfigs/p/PETSc/PETSc-3.3-p2-goalf-1.1.0-no-OFED-Python-2.7.3.eb @@ -9,8 +9,8 @@ of scientific applications modeled by partial differential equations.""" toolkit = {'name':'goalf', 'version':'1.1.0-no-OFED'} toolkitopts = {'usempi': True, 'pic': True} -sourceURLs=['http://ftp.mcs.anl.gov/pub/petsc/release-snapshots'] -sources=['%s-%s.tar.gz' % (name.lower(), version)] +sourceURLs = ['http://ftp.mcs.anl.gov/pub/petsc/release-snapshots'] +sources = ['%s-%s.tar.gz' % (name.lower(), version)] dependencies = [ ('Boost', '1.49.0', versionsuffix), From 763e345f0db57be2aa185ad2a746502b9376b54b Mon Sep 17 00:00:00 2001 From: Toon Willems Date: Mon, 13 Aug 2012 10:10:30 +0200 Subject: [PATCH 608/798] extra_options is now a class method, fixes the dump cfg option --- easybuild/build.py | 20 ++++++++++++++++---- easybuild/easyblocks/a/atlas.py | 5 +++-- easybuild/easyblocks/c/cp2k.py | 5 +++-- easybuild/easyblocks/g/gcc.py | 5 +++-- easybuild/easyblocks/i/imkl.py | 5 +++-- easybuild/easyblocks/i/intelbase.py | 5 +++-- easybuild/easyblocks/i/itac.py | 5 +++-- easybuild/easyblocks/l/lapack.py | 5 +++-- easybuild/easyblocks/l/libsmm.py | 5 +++-- easybuild/easyblocks/m/mvapich2.py | 5 +++-- easybuild/easyblocks/w/wps.py | 5 +++-- easybuild/easyblocks/w/wrf.py | 5 +++-- easybuild/framework/application.py | 4 +++- 13 files changed, 52 insertions(+), 27 deletions(-) diff --git a/easybuild/build.py b/easybuild/build.py index 59a558495a..d9cdb9a440 100644 --- a/easybuild/build.py +++ b/easybuild/build.py @@ -167,12 +167,24 @@ def main(): config_file = os.path.join(appPath, "easybuild_config.py") config.init(config_file, **configOptions) - ## Dump possible options + # Dump possible options if options.avail_easyconfig_params: - # TODO: fix this with new easyblock class app = get_class(options.easyblock, log) - app = app() - app.dump_cfg_options() + extra = app.extra_options() + default = EasyBlock.default_config + + print "DEFAULT OPTIONS:" + for key in sorted(default): + tabs = "\t" * (3 - (len(key) + 1) / 8) + print "%s:%s%s" % (key, tabs, default[key][1]) + + if extra: + print "EXTRA OPTIONS:" + for key in sorted(extra): + tabs = "\t" * (3 - (len(key) + 1) / 8) + print "%s:%s%s" % (key, tabs, extra[key][1]) + + ## Dump available classes if options.dump_classes: diff --git a/easybuild/easyblocks/a/atlas.py b/easybuild/easyblocks/a/atlas.py index 0cab053802..69966763a4 100644 --- a/easybuild/easyblocks/a/atlas.py +++ b/easybuild/easyblocks/a/atlas.py @@ -45,13 +45,14 @@ class ATLAS(Application): def __init__(self, *args, **kwargs): Application.__init__(self, *args, **kwargs) - def extra_options(self): + @staticmethod + def extra_options(): extra_vars = { 'ignorethrottling': [False, "Ignore check done by ATLAS for CPU throttling (not recommended) (default: False)"], 'full_lapack': [False, "Build a full LAPACK library (requires netlib's LAPACK) (default: False)"], 'sharedlibs': [False, "Enable building of shared libs as well (default: False)"] } - return Application.extra_options(self, extra_vars) + return Application.extra_options(extra_vars) def configure(self): diff --git a/easybuild/easyblocks/c/cp2k.py b/easybuild/easyblocks/c/cp2k.py index 78a4d71d25..7b6a234e52 100644 --- a/easybuild/easyblocks/c/cp2k.py +++ b/easybuild/easyblocks/c/cp2k.py @@ -68,7 +68,8 @@ def __init__(self, *args, **kwargs): self.make_instructions = '' - def extra_options(self): + @staticmethod + def extra_options(): extra_vars = { 'type': ['popt', "Type of build ('popt' or 'psmp') (default: 'popt)"], 'typeopt': [True, "Enable optimization (default: True)"], @@ -81,7 +82,7 @@ def extra_options(self): 'ignore_regtest_fails': [False, "Ignore failures in regression test (should be used with care) (default: False)."], 'maxtasks': [3, "Maximum number of CP2K instances run at the same time during testing (default:3)"] } - return Application.extra_options(self, extra_vars) + return Application.extra_options(extra_vars) def _generateMakefile(self, options): diff --git a/easybuild/easyblocks/g/gcc.py b/easybuild/easyblocks/g/gcc.py index 8c8aa6f8f4..6151fa6ea1 100644 --- a/easybuild/easyblocks/g/gcc.py +++ b/easybuild/easyblocks/g/gcc.py @@ -51,7 +51,8 @@ def __init__(self, *args, **kwargs): self.stagedbuild = False - def extra_options(self): + @staticmethod + def extra_options(): extra_vars = { 'languages': [[], "List of languages to build GCC for (--enable-languages) (default: [])"], 'withlto': [True, "Enable LTO support (default: True)"], @@ -60,7 +61,7 @@ def extra_options(self): 'pplwatchdog': [False, "Enable PPL watchdog (default: False)"], 'clooguseisl': [False, "Use ISL with CLooG or not (use PPL otherwise) (default: False)"] } - return Application.extra_options(self, extra_vars) + return Application.extra_options(extra_vars) def create_dir(self, dirname): """ diff --git a/easybuild/easyblocks/i/imkl.py b/easybuild/easyblocks/i/imkl.py index 89fbb26391..d62b38fcca 100644 --- a/easybuild/easyblocks/i/imkl.py +++ b/easybuild/easyblocks/i/imkl.py @@ -49,9 +49,10 @@ def __init__(self, *args, **kwargs): """Constructor, adds extra config options""" IntelBase.__init__(self, *args, **kwargs) - def extra_options(self): + @staticmethod + def extra_options(): extra_vars = {'interfaces': [True, "Indicates whether interfaces should be built (default: True)"]} - return IntelBase.extra_options(self, extra_vars) + return IntelBase.extra_options(extra_vars) def configure(self): diff --git a/easybuild/easyblocks/i/intelbase.py b/easybuild/easyblocks/i/intelbase.py index dd70276b7f..981a47996c 100644 --- a/easybuild/easyblocks/i/intelbase.py +++ b/easybuild/easyblocks/i/intelbase.py @@ -46,8 +46,9 @@ def __init__(self, *args, **kwargs): self.license = None Application.__init__(self, *args, **kwargs) - def extra_options(self, extra_vars=None): - vars = Application.extra_options(self, extra_vars) + @staticmethod + def extra_options(extra_vars=None): + vars = Application.extra_options(extra_vars) intel_vars = { 'license':[None, "License file path (default: None)"], 'license_activation': ['license_server', "Indicates license activation type (default: 'license_server')"], diff --git a/easybuild/easyblocks/i/itac.py b/easybuild/easyblocks/i/itac.py index c28422ea97..280b6f77dc 100644 --- a/easybuild/easyblocks/i/itac.py +++ b/easybuild/easyblocks/i/itac.py @@ -42,9 +42,10 @@ def __init__(self, *args, **kwargs): """Constructor, adds extra config options""" IntelBase.__init__(self, *args, **kwargs) - def extra_options(self): + @staticmethod + def extra_options(): extra_vars = {'preferredmpi': ['impi3', "Preferred MPI type (default: 'impi3')"]} - return IntelBase.extra_options(self, extra_vars) + return IntelBase.extra_options(extra_vars) def make_install(self): """ diff --git a/easybuild/easyblocks/l/lapack.py b/easybuild/easyblocks/l/lapack.py index c70ecfb6a5..78ceeb2ce7 100644 --- a/easybuild/easyblocks/l/lapack.py +++ b/easybuild/easyblocks/l/lapack.py @@ -70,12 +70,13 @@ class LAPACK(Application): def __init__(self, *args, **kwargs): Application.__init__(self, *args, **kwargs) - def extra_options(self): + @staticmethod + def extra_options(): extra_vars = { 'supply_blas': [False, "Supply BLAS lib to LAPACK for building (default: False)"], 'test_only': [False, "Only make tests, don't try and build LAPACK lib."] } - return Application.extra_options(self, extra_vars) + return Application.extra_options(extra_vars) def configure(self): diff --git a/easybuild/easyblocks/l/libsmm.py b/easybuild/easyblocks/l/libsmm.py index e3ce6e2a73..8915f9bab6 100644 --- a/easybuild/easyblocks/l/libsmm.py +++ b/easybuild/easyblocks/l/libsmm.py @@ -47,7 +47,8 @@ class Libsmm(Application): def __init__(self, *args, **kwargs): Application.__init__(self, *args, **kwargs) - def extra_options(self): + @staticmethod + def extra_options(): # default dimensions dd = [1,4,5,6,9,13,16,17,22] extra_vars = { @@ -55,7 +56,7 @@ def extra_options(self): 'max_tiny_dim': [12, "Maximum tiny dimension (default: 12)"], 'dims': [dd, "Generate routines for these matrix dims (default: %s)" % dd] } - return Application.extra_options(self, extra_vars) + return Application.extra_options(extra_vars) def configure(self): """Configure build: change to tools/build_libsmm dir""" diff --git a/easybuild/easyblocks/m/mvapich2.py b/easybuild/easyblocks/m/mvapich2.py index d503386b78..02e051a58a 100644 --- a/easybuild/easyblocks/m/mvapich2.py +++ b/easybuild/easyblocks/m/mvapich2.py @@ -41,7 +41,8 @@ class MVAPICH2(Application): def __init__(self, *args, **kwargs): Application.__init__(self, *args, **kwargs) - def extra_options(self): + @staticmethod + def extra_options(): extra_vars = { 'withchkpt': [False, "Enable checkpointing support (required BLCR) (default: False)"], 'withlimic2': [False, "Enable LiMIC2 support for intra-node communication (default: False)"], @@ -49,7 +50,7 @@ def extra_options(self): 'debug': [False, "Enable debug build (which is slower) (default: False)"], 'rdma_type': ["gen2", "Specify the RDMA type (gen2/udapl) (default: gen2)"] } - return Application.extra_options(self, extra_vars) + return Application.extra_options(extra_vars) def configure(self): diff --git a/easybuild/easyblocks/w/wps.py b/easybuild/easyblocks/w/wps.py index 31bf05c7dc..ec9b068a5c 100644 --- a/easybuild/easyblocks/w/wps.py +++ b/easybuild/easyblocks/w/wps.py @@ -55,7 +55,8 @@ def __init__(self, *args, **kwargs): self.wrfdir = None self.compile_script = None - def extra_options(self): + @staticmethod + def extra_options(): testdata_urls = [ "http://www.mmm.ucar.edu/wrf/src/data/avn_data.tar.gz", "http://www.mmm.ucar.edu/wrf/src/wps_files/geog.tar.gz" # 697MB download, 16GB unpacked! @@ -66,7 +67,7 @@ def extra_options(self): 'runtest': [True, "Build and run WPS tests (default: True)."], 'testdata': [testdata_urls, "URL to test data required to run WPS test (default: %s)." % testdata_urls] } - return Application.extra_options(self, extra_vars) + return Application.extra_options(extra_vars) def configure(self): """Configure build: diff --git a/easybuild/easyblocks/w/wrf.py b/easybuild/easyblocks/w/wrf.py index 1d827f3a1d..6e919d934a 100644 --- a/easybuild/easyblocks/w/wrf.py +++ b/easybuild/easyblocks/w/wrf.py @@ -50,14 +50,15 @@ def __init__(self,*args,**kwargs): self.wrfsubdir = None self.comp_fam = None - def extra_options(self): + @staticmethod + def extra_options(): extra_vars = { 'buildtype': [None, "Specify the type of build (serial, smpar (OpenMP), " \ "dmpar (MPI), dm+sm (hybrid OpenMP/MPI))."], 'rewriteopts': [True, "Replace -O3 with CFLAGS/FFLAGS (default: True)."], 'runtest': [True, "Build and run WRF tests (default: True)."] } - return Application.extra_options(self, extra_vars) + return Application.extra_options(extra_vars) def configure(self): """Configure build: diff --git a/easybuild/framework/application.py b/easybuild/framework/application.py index ff1f6b87c3..2d4a0260b9 100644 --- a/easybuild/framework/application.py +++ b/easybuild/framework/application.py @@ -254,7 +254,9 @@ def addsource(self, listOfSources=None): self.log.info("Added sources: %s" % self.src) - def extra_options(self, extra=None): + # turn this into a class method. This makes it easy to access the information without needing an instance + @staticmethod + def extra_options(extra=None): """ Extra options method which will be passed to the EasyBlock constructor. Subclasses should call this method with a dict From b9663748cfbcbb3bf421b2af4a1df13f701bbfff Mon Sep 17 00:00:00 2001 From: Toon Willems Date: Mon, 13 Aug 2012 10:19:32 +0200 Subject: [PATCH 609/798] remove whitespace --- easybuild/build.py | 2 -- 1 file changed, 2 deletions(-) diff --git a/easybuild/build.py b/easybuild/build.py index d9cdb9a440..de0e6c07a7 100644 --- a/easybuild/build.py +++ b/easybuild/build.py @@ -184,8 +184,6 @@ def main(): tabs = "\t" * (3 - (len(key) + 1) / 8) print "%s:%s%s" % (key, tabs, extra[key][1]) - - ## Dump available classes if options.dump_classes: dumpClasses('easybuild.easyblocks') From c14cf954a0b7d15ece735bc76623d80446d0226e Mon Sep 17 00:00:00 2001 From: Kenneth Hoste Date: Mon, 13 Aug 2012 10:31:51 +0200 Subject: [PATCH 610/798] style cleanup for PythonPackage class and example easyconfigs for FFC, FIAT, Instant, Jinja2, ScientificPython, UFL, Viper --- easybuild/easyblocks/p/pythonpackage.py | 5 ++- .../FFC/FFC-1.0.0-gimkl-0.5.3-Python-2.7.3.eb | 34 ----------------- ...-1.0.0-goalf-1.1.0-no-OFED-Python-2.7.3.eb | 37 +++++++++--------- .../FFC/FFC-1.0.0-ictce-4.0.6-Python-2.7.3.eb | 38 +++++++++---------- .../FIAT-1.0.0-gimkl-0.5.3-Python-2.7.3.eb | 31 --------------- ...-1.0.0-goalf-1.1.0-no-OFED-Python-2.7.3.eb | 26 ++++++------- .../FIAT-1.0.0-ictce-4.0.6-Python-2.7.3.eb | 26 ++++++------- .../Instant-1.0.0-gimkl-0.5.3-Python-2.7.3.eb | 30 --------------- ...-1.0.0-goalf-1.1.0-no-OFED-Python-2.7.3.eb | 28 +++++++------- .../Instant-1.0.0-ictce-4.0.6-Python-2.7.3.eb | 28 +++++++------- ...a2-2.6-goalf-1.1.0-no-OFED-Python-2.7.3.eb | 6 ++- ...ificPython-2.8-gimkl-0.5.3-Python-2.7.3.eb | 27 ------------- ...on-2.8-goalf-1.1.0-no-OFED-Python-2.7.3.eb | 20 +++++----- ...ificPython-2.8-ictce-4.0.6-Python-2.7.3.eb | 20 +++++----- .../UFL/UFL-1.0.0-gimkl-0.5.3-Python-2.7.3.eb | 26 ------------- ...-1.0.0-goalf-1.1.0-no-OFED-Python-2.7.3.eb | 28 +++++++------- .../UFL/UFL-1.0.0-ictce-4.0.6-Python-2.7.3.eb | 30 ++++++++------- .../Viper-1.0.0-gimkl-0.5.3-Python-2.7.3.eb | 27 ------------- ...-1.0.0-goalf-1.1.0-no-OFED-Python-2.7.3.eb | 24 ++++++------ .../Viper-1.0.0-ictce-4.0.6-Python-2.7.3.eb | 24 ++++++------ 20 files changed, 175 insertions(+), 340 deletions(-) delete mode 100644 easybuild/easyconfigs/f/FFC/FFC-1.0.0-gimkl-0.5.3-Python-2.7.3.eb delete mode 100644 easybuild/easyconfigs/f/FIAT/FIAT-1.0.0-gimkl-0.5.3-Python-2.7.3.eb delete mode 100644 easybuild/easyconfigs/i/Instant/Instant-1.0.0-gimkl-0.5.3-Python-2.7.3.eb delete mode 100644 easybuild/easyconfigs/s/ScientificPython/ScientificPython-2.8-gimkl-0.5.3-Python-2.7.3.eb delete mode 100644 easybuild/easyconfigs/u/UFL/UFL-1.0.0-gimkl-0.5.3-Python-2.7.3.eb delete mode 100644 easybuild/easyconfigs/v/Viper/Viper-1.0.0-gimkl-0.5.3-Python-2.7.3.eb diff --git a/easybuild/easyblocks/p/pythonpackage.py b/easybuild/easyblocks/p/pythonpackage.py index 3490818247..c5c6ea80eb 100644 --- a/easybuild/easyblocks/p/pythonpackage.py +++ b/easybuild/easyblocks/p/pythonpackage.py @@ -18,6 +18,9 @@ # You should have received a copy of the GNU General Public License # along with EasyBuild. If not, see . ## +""" +EasyBuild support for Python packages, implemented as an easyblock +""" import os import easybuild.tools.environment as env @@ -27,7 +30,7 @@ class PythonPackage(Application): - """Builds and installs a Python package, and provides a dedicated module file""" + """Builds and installs a Python package, and provides a dedicated module file.""" def __init__(self, *args, **kwargs): Application.__init__(self, *args, **kwargs) diff --git a/easybuild/easyconfigs/f/FFC/FFC-1.0.0-gimkl-0.5.3-Python-2.7.3.eb b/easybuild/easyconfigs/f/FFC/FFC-1.0.0-gimkl-0.5.3-Python-2.7.3.eb deleted file mode 100644 index cb92e76a34..0000000000 --- a/easybuild/easyconfigs/f/FFC/FFC-1.0.0-gimkl-0.5.3-Python-2.7.3.eb +++ /dev/null @@ -1,34 +0,0 @@ -easyblock="PythonPackage" - -name='FFC' -version='1.0.0' - -homepage='https://launchpad.net/ffc' -description="""FEniCS Form Compiler (FFC) works as a compiler for multilinear forms by generating -code (C++) for the evaluation of a multilinear form given in mathematical notation.""" - -toolkit={'name':'dummy','version':''} -toolkitsuffix = "-gimkl-0.5.3" - -sources=['%s-%s.tar.gz'%(name.lower(),version)] -majorversion = "%s.x" % ".".join(version.split('.')[:-1]) -sourceURLs=['https://launchpad.net/FFC/%s/%s/+download/' % (majorversion, version)] - -pythonversion = '2.7.3' -pythonshortversion = ".".join(pythonversion.split(".")[:-1]) - -pythonsuffix = "-Python-%s" % pythonversion -versionsuffix = "%s%s" % (toolkitsuffix, pythonsuffix) - -dependencies=[ - ('Python', pythonversion, toolkitsuffix, True), - ('UFL', '1.0.0', versionsuffix, True), - ('FIAT', '1.0.0', versionsuffix, True), - ('UFC', '2.0.5', versionsuffix, True), - ('Viper', '1.0.0', versionsuffix, True), - ] - -sanityCheckPaths = { - 'files': ['bin/ffc'], - 'dirs':['lib/python%s/site-packages/ffc' % pythonshortversion] - } diff --git a/easybuild/easyconfigs/f/FFC/FFC-1.0.0-goalf-1.1.0-no-OFED-Python-2.7.3.eb b/easybuild/easyconfigs/f/FFC/FFC-1.0.0-goalf-1.1.0-no-OFED-Python-2.7.3.eb index fb1af9f6fe..6708b3d914 100644 --- a/easybuild/easyconfigs/f/FFC/FFC-1.0.0-goalf-1.1.0-no-OFED-Python-2.7.3.eb +++ b/easybuild/easyconfigs/f/FFC/FFC-1.0.0-goalf-1.1.0-no-OFED-Python-2.7.3.eb @@ -1,34 +1,33 @@ -easyblock="PythonPackage" +easyblock = "PythonPackage" -name='FFC' -version='1.0.0' +name = 'FFC' +version = '1.0.0' -homepage='https://launchpad.net/ffc' -description="""FEniCS Form Compiler (FFC) works as a compiler for multilinear forms by generating +homepage = 'https://launchpad.net/ffc' +description = """FEniCS Form Compiler (FFC) works as a compiler for multilinear forms by generating code (C++) for the evaluation of a multilinear form given in mathematical notation.""" -toolkit={'name':'dummy','version':''} -toolkitsuffix = "-goalf-1.1.0-no-OFED" +toolkit = {'name': 'goalf', 'version': '1.1.0-no-OFED'} -sources=['%s-%s.tar.gz'%(name.lower(),version)] majorversion = "%s.x" % ".".join(version.split('.')[:-1]) -sourceURLs=['https://launchpad.net/FFC/%s/%s/+download/' % (majorversion, version)] +sourceURLs = ['https://launchpad.net/FFC/%s/%s/+download/' % (majorversion, version)] +sources = ['%s-%s.tar.gz'%(name.lower(),version)] +python = "Python" pythonversion = '2.7.3' pythonshortversion = ".".join(pythonversion.split(".")[:-1]) -pythonsuffix = "-Python-%s" % pythonversion -versionsuffix = "%s%s" % (toolkitsuffix, pythonsuffix) +versionsuffix = "-%s-%s" % (python, pythonversion) -dependencies=[ - ('Python', pythonversion, toolkitsuffix, True), - ('UFL', '1.0.0', versionsuffix, True), - ('FIAT', '1.0.0', versionsuffix, True), - ('UFC', '2.0.5', versionsuffix, True), - ('Viper', '1.0.0', versionsuffix, True), - ] +dependencies = [ + (python, pythonversion), + ('UFL', '1.0.0', versionsuffix), + ('FIAT', '1.0.0', versionsuffix), + ('UFC', '2.0.5', versionsuffix), + ('Viper', '1.0.0', versionsuffix), + ] sanityCheckPaths = { 'files': ['bin/ffc'], - 'dirs':['lib/python%s/site-packages/ffc' % pythonshortversion] + 'dirs': ['lib/python%s/site-packages/ffc' % pythonshortversion] } diff --git a/easybuild/easyconfigs/f/FFC/FFC-1.0.0-ictce-4.0.6-Python-2.7.3.eb b/easybuild/easyconfigs/f/FFC/FFC-1.0.0-ictce-4.0.6-Python-2.7.3.eb index 8a697edd08..5e077f7142 100644 --- a/easybuild/easyconfigs/f/FFC/FFC-1.0.0-ictce-4.0.6-Python-2.7.3.eb +++ b/easybuild/easyconfigs/f/FFC/FFC-1.0.0-ictce-4.0.6-Python-2.7.3.eb @@ -1,33 +1,33 @@ -easyblock="PythonPackage" +easyblock = "PythonPackage" -name='FFC' -version='1.0.0' +name = 'FFC' +version = '1.0.0' -homepage='https://launchpad.net/ffc' -description="FEniCS Form Compiler (FFC) works as a compiler for multilinear forms by generating code (C++) for the evaluation of a multilinear form given in mathematical notation." +homepage = 'https://launchpad.net/ffc' +description = """FEniCS Form Compiler (FFC) works as a compiler for multilinear forms by generating +code (C++) for the evaluation of a multilinear form given in mathematical notation.""" -toolkit={'name':'dummy','version':''} -toolkitsuffix = "-goalf-1.1.0-no-OFED" +toolkit = {'name': 'ictce', 'version': '4.0.6'} -sources=['%s-%s.tar.gz'%(name.lower(),version)] majorversion = "%s.x" % ".".join(version.split('.')[:-1]) -sourceURLs=['https://launchpad.net/FFC/%s/%s/+download/' % (majorversion, version)] +sourceURLs = ['https://launchpad.net/FFC/%s/%s/+download/' % (majorversion, version)] +sources = ['%s-%s.tar.gz'%(name.lower(),version)] +python = "Python" pythonversion = '2.7.3' pythonshortversion = ".".join(pythonversion.split(".")[:-1]) -pythonsuffix = "-Python-%s" % pythonversion -versionsuffix = "%s%s" % (toolkitsuffix, pythonsuffix) +versionsuffix = "-%s-%s" % (python, pythonversion) -dependencies=[ - ('Python', pythonversion, toolkitsuffix, True), - ('UFL', '1.0.0', versionsuffix, True), - ('FIAT', '1.0.0', versionsuffix, True), - ('UFC', '2.0.5', versionsuffix, True), - ('Viper', '1.0.0', versionsuffix, True), - ] +dependencies = [ + (python, pythonversion), + ('UFL', '1.0.0', versionsuffix), + ('FIAT', '1.0.0', versionsuffix), + ('UFC', '2.0.5', versionsuffix), + ('Viper', '1.0.0', versionsuffix), + ] sanityCheckPaths = { 'files': ['bin/ffc'], - 'dirs':['lib/python%s/site-packages/ffc' % pythonshortversion] + 'dirs': ['lib/python%s/site-packages/ffc' % pythonshortversion] } diff --git a/easybuild/easyconfigs/f/FIAT/FIAT-1.0.0-gimkl-0.5.3-Python-2.7.3.eb b/easybuild/easyconfigs/f/FIAT/FIAT-1.0.0-gimkl-0.5.3-Python-2.7.3.eb deleted file mode 100644 index 56a7c001ec..0000000000 --- a/easybuild/easyconfigs/f/FIAT/FIAT-1.0.0-gimkl-0.5.3-Python-2.7.3.eb +++ /dev/null @@ -1,31 +0,0 @@ -easyblock="PythonPackage" - -name='FIAT' -version='1.0.0' - -homepage='https://launchpad.net/fiat' -description="""The FInite element Automatic Tabulator FIAT supports generation of arbitrary order -instances of the Lagrange elements on lines, triangles, and tetrahedra. It is also capable of generating -arbitrary order instances of Jacobi-type quadrature rules on the same element shapes.""" - -toolkit={'name':'dummy','version':''} -toolkitsuffix = "-gimkl-0.5.3" - -sources=['%s-%s.tar.gz'%(name.lower(),version)] -majorversion = "%s.x" % ".".join(version.split('.')[:-1]) -sourceURLs=['https://launchpad.net/FIAT/%s/%s/+download/' % (majorversion, version)] - -pythonversion = '2.7.3' -pythonshortversion = ".".join(pythonversion.split(".")[:-1]) - -versionsuffix = "%s-Python-%s" % (toolkitsuffix, pythonversion) - -dependencies=[ - ('Python', pythonversion, toolkitsuffix, True), - ('ScientificPython','2.8', versionsuffix, True), - ] - -sanityCheckPaths = { - 'files': [], - 'dirs':['lib/python%s/site-packages/FIAT' % pythonshortversion] - } diff --git a/easybuild/easyconfigs/f/FIAT/FIAT-1.0.0-goalf-1.1.0-no-OFED-Python-2.7.3.eb b/easybuild/easyconfigs/f/FIAT/FIAT-1.0.0-goalf-1.1.0-no-OFED-Python-2.7.3.eb index ad690e2952..320640e1a6 100644 --- a/easybuild/easyconfigs/f/FIAT/FIAT-1.0.0-goalf-1.1.0-no-OFED-Python-2.7.3.eb +++ b/easybuild/easyconfigs/f/FIAT/FIAT-1.0.0-goalf-1.1.0-no-OFED-Python-2.7.3.eb @@ -1,31 +1,31 @@ -easyblock="PythonPackage" +easyblock = "PythonPackage" -name='FIAT' -version='1.0.0' +name = 'FIAT' +version = '1.0.0' -homepage='https://launchpad.net/fiat' -description="""The FInite element Automatic Tabulator FIAT supports generation of arbitrary order +homepage = 'https://launchpad.net/fiat' +description = """The FInite element Automatic Tabulator FIAT supports generation of arbitrary order instances of the Lagrange elements on lines, triangles, and tetrahedra. It is also capable of generating arbitrary order instances of Jacobi-type quadrature rules on the same element shapes.""" -toolkit={'name':'dummy','version':''} -toolkitsuffix = "-goalf-1.1.0-no-OFED" +toolkit = {'name': 'goalf', 'version': '1.1.0-no-OFED'} -sources=['%s-%s.tar.gz'%(name.lower(),version)] majorversion = "%s.x" % ".".join(version.split('.')[:-1]) -sourceURLs=['https://launchpad.net/FIAT/%s/%s/+download/' % (majorversion, version)] +sourceURLs = ['https://launchpad.net/FIAT/%s/%s/+download/' % (majorversion, version)] +sources = ['%s-%s.tar.gz' % (name.lower(), version)] +python = "Python" pythonversion = '2.7.3' pythonshortversion = ".".join(pythonversion.split(".")[:-1]) -versionsuffix = "%s-Python-%s" % (toolkitsuffix, pythonversion) +versionsuffix = "-%s-%s" % (python, pythonversion) dependencies=[ - ('Python', pythonversion, toolkitsuffix, True), - ('ScientificPython','2.8', versionsuffix, True), + (python, pythonversion), + ('ScientificPython','2.8', versionsuffix), ] sanityCheckPaths = { 'files': [], - 'dirs':['lib/python%s/site-packages/FIAT' % pythonshortversion] + 'dirs': ['lib/python%s/site-packages/FIAT' % pythonshortversion] } diff --git a/easybuild/easyconfigs/f/FIAT/FIAT-1.0.0-ictce-4.0.6-Python-2.7.3.eb b/easybuild/easyconfigs/f/FIAT/FIAT-1.0.0-ictce-4.0.6-Python-2.7.3.eb index b69a3a98c0..bfe9ded3e8 100644 --- a/easybuild/easyconfigs/f/FIAT/FIAT-1.0.0-ictce-4.0.6-Python-2.7.3.eb +++ b/easybuild/easyconfigs/f/FIAT/FIAT-1.0.0-ictce-4.0.6-Python-2.7.3.eb @@ -1,31 +1,31 @@ -easyblock="PythonPackage" +easyblock = "PythonPackage" -name='FIAT' -version='1.0.0' +name = 'FIAT' +version = '1.0.0' -homepage='https://launchpad.net/fiat' -description="""The FInite element Automatic Tabulator FIAT supports generation of arbitrary order +homepage = 'https://launchpad.net/fiat' +description = """The FInite element Automatic Tabulator FIAT supports generation of arbitrary order instances of the Lagrange elements on lines, triangles, and tetrahedra. It is also capable of generating arbitrary order instances of Jacobi-type quadrature rules on the same element shapes.""" -toolkit={'name':'dummy','version':''} -toolkitsuffix = "-ictce-4.0.6" +toolkit = {'name': 'ictce', 'version': '4.0.6'} -sources=['%s-%s.tar.gz'%(name.lower(),version)] majorversion = "%s.x" % ".".join(version.split('.')[:-1]) -sourceURLs=['https://launchpad.net/FIAT/%s/%s/+download/' % (majorversion, version)] +sourceURLs = ['https://launchpad.net/FIAT/%s/%s/+download/' % (majorversion, version)] +sources = ['%s-%s.tar.gz' % (name.lower(), version)] +python = "Python" pythonversion = '2.7.3' pythonshortversion = ".".join(pythonversion.split(".")[:-1]) -versionsuffix = "%s-Python-%s" % (toolkitsuffix, pythonversion) +versionsuffix = "-%s-%s" % (python, pythonversion) dependencies=[ - ('Python', pythonversion, toolkitsuffix, True), - ('ScientificPython','2.8', versionsuffix, True), + (python, pythonversion), + ('ScientificPython','2.8', versionsuffix), ] sanityCheckPaths = { 'files': [], - 'dirs':['lib/python%s/site-packages/FIAT' % pythonshortversion] + 'dirs': ['lib/python%s/site-packages/FIAT' % pythonshortversion] } diff --git a/easybuild/easyconfigs/i/Instant/Instant-1.0.0-gimkl-0.5.3-Python-2.7.3.eb b/easybuild/easyconfigs/i/Instant/Instant-1.0.0-gimkl-0.5.3-Python-2.7.3.eb deleted file mode 100644 index 4e2f7b0200..0000000000 --- a/easybuild/easyconfigs/i/Instant/Instant-1.0.0-gimkl-0.5.3-Python-2.7.3.eb +++ /dev/null @@ -1,30 +0,0 @@ -easyblock="PythonPackage" - -name='Instant' -version='1.0.0' - -homepage='https://launchpad.net/instant' -description="Instant is a Python module that allows for instant inlining of C and C++ code in Python. It is a small Python module built on top of SWIG and Distutils. It is part of the FEniCS Project (http://fenicsproject.org)." - -#dummy toolkit, but we want to load dependencies, so empty version -toolkit={'name':'dummy','version':''} -toolkitversion = '-gimkl-0.5.3' - -sources=['%s-%s.tar.gz'%(name.lower(),version)] -majorversion = "%s.x" % ".".join(version.split('.')[:-1]) -sourceURLs=['https://launchpad.net/instant/%s/%s/+download/' % (majorversion, version)] - -pythonversion = '2.7.3' -pythonshortversion = ".".join(pythonversion.split(".")[:-1]) - -versionsuffix = '%s-Python-%s' % (toolkitversion, pythonversion) - -dependencies=[ - ('Python',pythonversion,toolkitversion,True), - ('SWIG','2.0.4',versionsuffix,True), - ] - -sanityCheckPaths = { - 'files': ['bin/'], - 'dirs':['lib/python%s/site-packages/instant' % pythonshortversion] - } diff --git a/easybuild/easyconfigs/i/Instant/Instant-1.0.0-goalf-1.1.0-no-OFED-Python-2.7.3.eb b/easybuild/easyconfigs/i/Instant/Instant-1.0.0-goalf-1.1.0-no-OFED-Python-2.7.3.eb index 2704d371f9..91d36d34bc 100644 --- a/easybuild/easyconfigs/i/Instant/Instant-1.0.0-goalf-1.1.0-no-OFED-Python-2.7.3.eb +++ b/easybuild/easyconfigs/i/Instant/Instant-1.0.0-goalf-1.1.0-no-OFED-Python-2.7.3.eb @@ -1,30 +1,30 @@ -easyblock="PythonPackage" +easyblock = "PythonPackage" -name='Instant' -version='1.0.0' +name = 'Instant' +version = '1.0.0' -homepage='https://launchpad.net/instant' -description="Instant is a Python module that allows for instant inlining of C and C++ code in Python. It is a small Python module built on top of SWIG and Distutils. It is part of the FEniCS Project (http://fenicsproject.org)." +homepage = 'https://launchpad.net/instant' +description = """Instant is a Python module that allows for instant inlining of C and C++ code in Python. +It is a small Python module built on top of SWIG and Distutils. It is part of the FEniCS Project (http://fenicsproject.org).""" -#dummy toolkit, but we want to load dependencies, so empty version -toolkit={'name':'dummy','version':''} -toolkitversion = '-goalf-1.1.0-no-OFED' +toolkit = {'name': 'goalf', 'version': '1.1.0-no-OFED'} -sources=['%s-%s.tar.gz'%(name.lower(),version)] majorversion = "%s.x" % ".".join(version.split('.')[:-1]) -sourceURLs=['https://launchpad.net/instant/%s/%s/+download/' % (majorversion, version)] +sourceURLs = ['https://launchpad.net/instant/%s/%s/+download/' % (majorversion, version)] +sources = ['%s-%s.tar.gz' % (name.lower(), version)] +python = "Python" pythonversion = '2.7.3' pythonshortversion = ".".join(pythonversion.split(".")[:-1]) -versionsuffix = '%s-Python-%s' % (toolkitversion, pythonversion) +versionsuffix = '-%s-%s' % (python, pythonversion) dependencies=[ - ('Python',pythonversion,toolkitversion,True), - ('SWIG','2.0.4',versionsuffix,True), + (python, pythonversion), + ('SWIG', '2.0.4', versionsuffix), ] sanityCheckPaths = { 'files': ['bin/'], - 'dirs':['lib/python%s/site-packages/instant' % pythonshortversion] + 'dirs': ['lib/python%s/site-packages/instant' % pythonshortversion] } diff --git a/easybuild/easyconfigs/i/Instant/Instant-1.0.0-ictce-4.0.6-Python-2.7.3.eb b/easybuild/easyconfigs/i/Instant/Instant-1.0.0-ictce-4.0.6-Python-2.7.3.eb index 0592dbd935..d307112757 100644 --- a/easybuild/easyconfigs/i/Instant/Instant-1.0.0-ictce-4.0.6-Python-2.7.3.eb +++ b/easybuild/easyconfigs/i/Instant/Instant-1.0.0-ictce-4.0.6-Python-2.7.3.eb @@ -1,30 +1,30 @@ -easyblock="PythonPackage" +easyblock = "PythonPackage" -name='Instant' -version='1.0.0' +name = 'Instant' +version = '1.0.0' -homepage='https://launchpad.net/instant' -description="Instant is a Python module that allows for instant inlining of C and C++ code in Python. It is a small Python module built on top of SWIG and Distutils. It is part of the FEniCS Project (http://fenicsproject.org)." +homepage = 'https://launchpad.net/instant' +description = """Instant is a Python module that allows for instant inlining of C and C++ code in Python. +It is a small Python module built on top of SWIG and Distutils. It is part of the FEniCS Project (http://fenicsproject.org).""" -#dummy toolkit, but we want to load dependencies, so empty version -toolkit={'name':'dummy','version':''} -toolkitversion = '-ictce-4.0.6' +toolkit = {'name': 'ictce', 'version': '4.0.6'} -sources=['%s-%s.tar.gz'%(name.lower(),version)] majorversion = "%s.x" % ".".join(version.split('.')[:-1]) -sourceURLs=['https://launchpad.net/instant/%s/%s/+download/' % (majorversion, version)] +sourceURLs = ['https://launchpad.net/instant/%s/%s/+download/' % (majorversion, version)] +sources = ['%s-%s.tar.gz' % (name.lower(), version)] +python = "Python" pythonversion = '2.7.3' pythonshortversion = ".".join(pythonversion.split(".")[:-1]) -versionsuffix = '%s-Python-%s' % (toolkitversion, pythonversion) +versionsuffix = '-%s-%s' % (python, pythonversion) dependencies=[ - ('Python',pythonversion,toolkitversion,True), - ('SWIG','2.0.4',versionsuffix,True), + (python, pythonversion), + ('SWIG', '2.0.4', versionsuffix), ] sanityCheckPaths = { 'files': ['bin/'], - 'dirs':['lib/python%s/site-packages/instant' % pythonshortversion] + 'dirs': ['lib/python%s/site-packages/instant' % pythonshortversion] } diff --git a/easybuild/easyconfigs/j/Jinja2/Jinja2-2.6-goalf-1.1.0-no-OFED-Python-2.7.3.eb b/easybuild/easyconfigs/j/Jinja2/Jinja2-2.6-goalf-1.1.0-no-OFED-Python-2.7.3.eb index df0a674280..21a4067d8d 100644 --- a/easybuild/easyconfigs/j/Jinja2/Jinja2-2.6-goalf-1.1.0-no-OFED-Python-2.7.3.eb +++ b/easybuild/easyconfigs/j/Jinja2/Jinja2-2.6-goalf-1.1.0-no-OFED-Python-2.7.3.eb @@ -17,8 +17,10 @@ pythonversion = "2.7.3" versionsuffix = "-%s-%s" % (python, pythonversion) -dependencies = [(python, pythonversion), - ('setuptools', '0.6c11', versionsuffix)] +dependencies = [ + (python, pythonversion), + ('setuptools', '0.6c11', versionsuffix) + ] py_short_ver = ".".join(pythonversion.split(".")[0:2]) pylibdir = "lib/python%s/site-packages/%s" % (py_short_ver, name) diff --git a/easybuild/easyconfigs/s/ScientificPython/ScientificPython-2.8-gimkl-0.5.3-Python-2.7.3.eb b/easybuild/easyconfigs/s/ScientificPython/ScientificPython-2.8-gimkl-0.5.3-Python-2.7.3.eb deleted file mode 100644 index ed4c1779b1..0000000000 --- a/easybuild/easyconfigs/s/ScientificPython/ScientificPython-2.8-gimkl-0.5.3-Python-2.7.3.eb +++ /dev/null @@ -1,27 +0,0 @@ -easyblock="PythonPackage" - -name='ScientificPython' -version='2.8' - -homepage='https://sourcesup.cru.fr/projects/scientific-py/' -description="""ScientificPython is a collection of Python modules for scientific computing. -It contains support for geometry, mathematical functions, statistics, physical units, IO, visualization, -and parallelization.""" - -toolkit={'name':'dummy','version':''} -toolkitsuffix = "-gimkl-0.5.3" - -sources=['%s-%s.tar.gz'%(name,version)] -sourceURLs = ['https://sourcesup.renater.fr/frs/download.php/2309'] - -pythonversion = '2.7.3' -pythonshortversion = ".".join(pythonversion.split(".")[:-1]) - -versionsuffix = "%s-Python-%s" % (toolkitsuffix, pythonversion) - -dependencies=[('Python',pythonversion,toolkitsuffix,True)] - -sanityCheckPaths = { - 'files': [], - 'dirs':['lib/python%s/site-packages/Scientific' % pythonshortversion] - } diff --git a/easybuild/easyconfigs/s/ScientificPython/ScientificPython-2.8-goalf-1.1.0-no-OFED-Python-2.7.3.eb b/easybuild/easyconfigs/s/ScientificPython/ScientificPython-2.8-goalf-1.1.0-no-OFED-Python-2.7.3.eb index cc7ef5a6ea..9d29bd1ade 100644 --- a/easybuild/easyconfigs/s/ScientificPython/ScientificPython-2.8-goalf-1.1.0-no-OFED-Python-2.7.3.eb +++ b/easybuild/easyconfigs/s/ScientificPython/ScientificPython-2.8-goalf-1.1.0-no-OFED-Python-2.7.3.eb @@ -1,25 +1,25 @@ -easyblock="PythonPackage" +easyblock = "PythonPackage" -name='ScientificPython' -version='2.8' +name = 'ScientificPython' +version = '2.8' -homepage='https://sourcesup.cru.fr/projects/scientific-py/' -description="""ScientificPython is a collection of Python modules for scientific computing. +homepage = 'https://sourcesup.cru.fr/projects/scientific-py/' +description = """ScientificPython is a collection of Python modules for scientific computing. It contains support for geometry, mathematical functions, statistics, physical units, IO, visualization, and parallelization.""" -toolkit={'name':'dummy','version':''} -toolkitsuffix = "-goalf-1.1.0-no-OFED" +toolkit = {'name': 'goalf', 'version': '1.1.0-no-OFED'} -sources=['%s-%s.tar.gz'%(name,version)] sourceURLs = ['https://sourcesup.renater.fr/frs/download.php/2309'] +sources = ['%s-%s.tar.gz' % (name, version)] +python = "Python" pythonversion = '2.7.3' pythonshortversion = ".".join(pythonversion.split(".")[:-1]) -versionsuffix = "%s-Python-%s" % (toolkitsuffix, pythonversion) +versionsuffix = "-%s-%s" % (python, pythonversion) -dependencies=[('Python',pythonversion,toolkitsuffix,True)] +dependencies=[(python,pythonversion)] sanityCheckPaths = { 'files': [], diff --git a/easybuild/easyconfigs/s/ScientificPython/ScientificPython-2.8-ictce-4.0.6-Python-2.7.3.eb b/easybuild/easyconfigs/s/ScientificPython/ScientificPython-2.8-ictce-4.0.6-Python-2.7.3.eb index dd7914dbec..d776b2efb2 100644 --- a/easybuild/easyconfigs/s/ScientificPython/ScientificPython-2.8-ictce-4.0.6-Python-2.7.3.eb +++ b/easybuild/easyconfigs/s/ScientificPython/ScientificPython-2.8-ictce-4.0.6-Python-2.7.3.eb @@ -1,25 +1,25 @@ -easyblock="PythonPackage" +easyblock = "PythonPackage" -name='ScientificPython' -version='2.8' +name = 'ScientificPython' +version = '2.8' -homepage='https://sourcesup.cru.fr/projects/scientific-py/' -description="""ScientificPython is a collection of Python modules for scientific computing. +homepage = 'https://sourcesup.cru.fr/projects/scientific-py/' +description = """ScientificPython is a collection of Python modules for scientific computing. It contains support for geometry, mathematical functions, statistics, physical units, IO, visualization, and parallelization.""" -toolkit={'name':'dummy','version':''} -toolkitsuffix = "-ictce-4.0.6" +toolkit = {'name': 'ictce', 'version': '4.0.6'} -sources=['%s-%s.tar.gz'%(name,version)] sourceURLs = ['https://sourcesup.renater.fr/frs/download.php/2309'] +sources = ['%s-%s.tar.gz' % (name, version)] +python = "Python" pythonversion = '2.7.3' pythonshortversion = ".".join(pythonversion.split(".")[:-1]) -versionsuffix = "%s-Python-%s" % (toolkitsuffix, pythonversion) +versionsuffix = "-%s-%s" % (python, pythonversion) -dependencies=[('Python',pythonversion,toolkitsuffix,True)] +dependencies=[(python,pythonversion)] sanityCheckPaths = { 'files': [], diff --git a/easybuild/easyconfigs/u/UFL/UFL-1.0.0-gimkl-0.5.3-Python-2.7.3.eb b/easybuild/easyconfigs/u/UFL/UFL-1.0.0-gimkl-0.5.3-Python-2.7.3.eb deleted file mode 100644 index 43d046004d..0000000000 --- a/easybuild/easyconfigs/u/UFL/UFL-1.0.0-gimkl-0.5.3-Python-2.7.3.eb +++ /dev/null @@ -1,26 +0,0 @@ -easyblock="PythonPackage" - -name='UFL' -version='1.0.0' - -homepage='https://launchpad.net/ufl' -description="The Unified Form Language (UFL) is a domain specific language for declaration of finite element discretizations of variational forms. More precisely, it defines a flexible interface for choosing finite element spaces and defining expressions for weak forms in a notation close to mathematical notation." - -toolkit={'name':'dummy','version':''} -toolkitsuffix = "-gimkl-0.5.3" - -sources=['%s-%s.tar.gz'%(name.lower(),version)] -majorversion = "%s.x" % ".".join(version.split('.')[:-1]) -sourceURLs=['https://launchpad.net/UFL/%s/%s/+download/' % (majorversion, version)] - -pythonversion = '2.7.3' -pythonshortversion = ".".join(pythonversion.split(".")[:-1]) - -versionsuffix = "%s-Python-%s" % (toolkitsuffix, pythonversion) - -dependencies=[('Python',pythonversion,toolkitsuffix,True)] - -sanityCheckPaths = { - 'files': ['bin/%s' % x for x in ["form2ufl","ufl2py","ufl-analyse","ufl-convert","ufl-version"]], - 'dirs':['lib/python%s/site-packages/ufl' % pythonshortversion] - } diff --git a/easybuild/easyconfigs/u/UFL/UFL-1.0.0-goalf-1.1.0-no-OFED-Python-2.7.3.eb b/easybuild/easyconfigs/u/UFL/UFL-1.0.0-goalf-1.1.0-no-OFED-Python-2.7.3.eb index eb3c1105c6..f2ecbe75b4 100644 --- a/easybuild/easyconfigs/u/UFL/UFL-1.0.0-goalf-1.1.0-no-OFED-Python-2.7.3.eb +++ b/easybuild/easyconfigs/u/UFL/UFL-1.0.0-goalf-1.1.0-no-OFED-Python-2.7.3.eb @@ -1,26 +1,28 @@ -easyblock="PythonPackage" +easyblock = "PythonPackage" -name='UFL' -version='1.0.0' +name = 'UFL' +version = '1.0.0' -homepage='https://launchpad.net/ufl' -description="The Unified Form Language (UFL) is a domain specific language for declaration of finite element discretizations of variational forms. More precisely, it defines a flexible interface for choosing finite element spaces and defining expressions for weak forms in a notation close to mathematical notation." +homepage = 'https://launchpad.net/ufl' +description = """The Unified Form Language (UFL) is a domain specific language for declaration of finite element discretizations +of variational forms. More precisely, it defines a flexible interface for choosing finite element spaces and defining expressions +for weak forms in a notation close to mathematical notation.""" -toolkit={'name':'dummy','version':''} -toolkitsuffix = "-goalf-1.1.0-no-OFED" +toolkit = {'name': 'goalf', 'version': '1.1.0-no-OFED'} -sources=['%s-%s.tar.gz'%(name.lower(),version)] majorversion = "%s.x" % ".".join(version.split('.')[:-1]) -sourceURLs=['https://launchpad.net/UFL/%s/%s/+download/' % (majorversion, version)] +sourceURLs = ['https://launchpad.net/UFL/%s/%s/+download/' % (majorversion, version)] +sources = ['%s-%s.tar.gz' % (name.lower(), version)] +python = "Python" pythonversion = '2.7.3' pythonshortversion = ".".join(pythonversion.split(".")[:-1]) -versionsuffix = "%s-Python-%s" % (toolkitsuffix, pythonversion) +versionsuffix = "-%s-%s" % (python, pythonversion) -dependencies=[('Python',pythonversion,toolkitsuffix,True)] +dependencies=[(python,pythonversion)] sanityCheckPaths = { - 'files': ['bin/%s' % x for x in ["form2ufl","ufl2py","ufl-analyse","ufl-convert","ufl-version"]], - 'dirs':['lib/python%s/site-packages/ufl' % pythonshortversion] + 'files': ['bin/%s' % x for x in ["form2ufl", "ufl2py", "ufl-analyse", "ufl-convert", "ufl-version"]], + 'dirs': ['lib/python%s/site-packages/ufl' % pythonshortversion] } diff --git a/easybuild/easyconfigs/u/UFL/UFL-1.0.0-ictce-4.0.6-Python-2.7.3.eb b/easybuild/easyconfigs/u/UFL/UFL-1.0.0-ictce-4.0.6-Python-2.7.3.eb index 097136fd81..cc1294f11b 100644 --- a/easybuild/easyconfigs/u/UFL/UFL-1.0.0-ictce-4.0.6-Python-2.7.3.eb +++ b/easybuild/easyconfigs/u/UFL/UFL-1.0.0-ictce-4.0.6-Python-2.7.3.eb @@ -1,24 +1,28 @@ -easyblock="PythonPackage" +easyblock = "PythonPackage" -name='UFL' -version='1.0.0' +name = 'UFL' +version = '1.0.0' -homepage='https://launchpad.net/ufl' -description="The Unified Form Language (UFL) is a domain specific language for declaration of finite element discretizations of variational forms. More precisely, it defines a flexible interface for choosing finite element spaces and defining expressions for weak forms in a notation close to mathematical notation." +homepage = 'https://launchpad.net/ufl' +description = """The Unified Form Language (UFL) is a domain specific language for declaration of finite element discretizations +of variational forms. More precisely, it defines a flexible interface for choosing finite element spaces and defining expressions +for weak forms in a notation close to mathematical notation.""" -toolkit={'name':'dummy','version':''} -toolkitsuffix = "-ictce-4.0.6" +toolkit = {'name': 'ictce', 'version': '4.0.6'} -sources=['%s-%s.tar.gz'%(name.lower(),version)] majorversion = "%s.x" % ".".join(version.split('.')[:-1]) -sourceURLs=['https://launchpad.net/UFL/%s/%s/+download/' % (majorversion, version)] +sourceURLs = ['https://launchpad.net/UFL/%s/%s/+download/' % (majorversion, version)] +sources = ['%s-%s.tar.gz' % (name.lower(), version)] +python = "Python" pythonversion = '2.7.3' -versionsuffix = "%s-Python-%s" % (toolkitsuffix, pythonversion) +pythonshortversion = ".".join(pythonversion.split(".")[:-1]) -dependencies=[('Python',pythonversion,toolkitsuffix,True)] +versionsuffix = "-%s-%s" % (python, pythonversion) + +dependencies=[(python,pythonversion)] sanityCheckPaths = { - 'files': ['bin/%s' % x for x in ["form2ufl","ufl2py","ufl-analyse","ufl-convert","ufl-version"]], - 'dirs':['lib/python%s/site-packages/ufl' % pythonshortversion] + 'files': ['bin/%s' % x for x in ["form2ufl", "ufl2py", "ufl-analyse", "ufl-convert", "ufl-version"]], + 'dirs': ['lib/python%s/site-packages/ufl' % pythonshortversion] } diff --git a/easybuild/easyconfigs/v/Viper/Viper-1.0.0-gimkl-0.5.3-Python-2.7.3.eb b/easybuild/easyconfigs/v/Viper/Viper-1.0.0-gimkl-0.5.3-Python-2.7.3.eb deleted file mode 100644 index 5c4dec98aa..0000000000 --- a/easybuild/easyconfigs/v/Viper/Viper-1.0.0-gimkl-0.5.3-Python-2.7.3.eb +++ /dev/null @@ -1,27 +0,0 @@ -easyblock="PythonPackage" - -name='Viper' -version='1.0.0' - -homepage='https://launchpad.net/fenics-viper' -description="""Viper is a minimalistic scientific plotter and run-time visualization module. -Viper has support for visualizing meshes and solutions in DOLFIN.""" - -toolkit={'name':'dummy','version':''} -toolkitsuffix = "-gimkl-0.5.3" - -sources=['%s-%s.tar.gz'%(name.lower(),version)] -majorversion = "%s.x" % ".".join(version.split('.')[:-1]) -sourceURLs=['https://launchpad.net/fenics-viper/%s/%s/+download/' % (majorversion, version)] - -pythonversion = '2.7.3' -pythonshortversion = ".".join(pythonversion.split(".")[:-1]) - -versionsuffix = "%s-Python-%s" % (toolkitsuffix, pythonversion) - -dependencies=[('Python',pythonversion,toolkitsuffix,True)] - -sanityCheckPaths = { - 'files': ['bin/'], - 'dirs':['lib/python%s/site-packages/viper' % pythonshortversion] - } diff --git a/easybuild/easyconfigs/v/Viper/Viper-1.0.0-goalf-1.1.0-no-OFED-Python-2.7.3.eb b/easybuild/easyconfigs/v/Viper/Viper-1.0.0-goalf-1.1.0-no-OFED-Python-2.7.3.eb index 0827aa7a3c..5d2f074cc2 100644 --- a/easybuild/easyconfigs/v/Viper/Viper-1.0.0-goalf-1.1.0-no-OFED-Python-2.7.3.eb +++ b/easybuild/easyconfigs/v/Viper/Viper-1.0.0-goalf-1.1.0-no-OFED-Python-2.7.3.eb @@ -1,27 +1,27 @@ -easyblock="PythonPackage" +easyblock = "PythonPackage" -name='Viper' -version='1.0.0' +name = 'Viper' +version = '1.0.0' -homepage='https://launchpad.net/fenics-viper' -description="""Viper is a minimalistic scientific plotter and run-time visualization module. +homepage = 'https://launchpad.net/fenics-viper' +description = """Viper is a minimalistic scientific plotter and run-time visualization module. Viper has support for visualizing meshes and solutions in DOLFIN.""" -toolkit={'name':'dummy','version':''} -toolkitsuffix = "-goalf-1.1.0-no-OFED" +toolkit = {'name': 'goalf', 'version': '1.1.0-no-OFED'} -sources=['%s-%s.tar.gz'%(name.lower(),version)] majorversion = "%s.x" % ".".join(version.split('.')[:-1]) -sourceURLs=['https://launchpad.net/fenics-viper/%s/%s/+download/' % (majorversion, version)] +sourceURLs = ['https://launchpad.net/fenics-viper/%s/%s/+download/' % (majorversion, version)] +sources = ['%s-%s.tar.gz' % (name.lower(), version)] +python = "Python" pythonversion = '2.7.3' pythonshortversion = ".".join(pythonversion.split(".")[:-1]) -versionsuffix = "%s-Python-%s" % (toolkitsuffix, pythonversion) +versionsuffix = "-%s-%s" % (python, pythonversion) -dependencies=[('Python',pythonversion,toolkitsuffix,True)] +dependencies=[(python,pythonversion)] sanityCheckPaths = { 'files': ['bin/'], - 'dirs':['lib/python%s/site-packages/viper' % pythonshortversion] + 'dirs': ['lib/python%s/site-packages/viper' % pythonshortversion] } diff --git a/easybuild/easyconfigs/v/Viper/Viper-1.0.0-ictce-4.0.6-Python-2.7.3.eb b/easybuild/easyconfigs/v/Viper/Viper-1.0.0-ictce-4.0.6-Python-2.7.3.eb index a8716a7dcb..189da7e1cd 100644 --- a/easybuild/easyconfigs/v/Viper/Viper-1.0.0-ictce-4.0.6-Python-2.7.3.eb +++ b/easybuild/easyconfigs/v/Viper/Viper-1.0.0-ictce-4.0.6-Python-2.7.3.eb @@ -1,27 +1,27 @@ -easyblock="PythonPackage" +easyblock = "PythonPackage" -name='Viper' -version='1.0.0' +name = 'Viper' +version = '1.0.0' -homepage='https://launchpad.net/fenics-viper' -description="""Viper is a minimalistic scientific plotter and run-time visualization module. +homepage = 'https://launchpad.net/fenics-viper' +description = """Viper is a minimalistic scientific plotter and run-time visualization module. Viper has support for visualizing meshes and solutions in DOLFIN.""" -toolkit={'name':'dummy','version':''} -toolkitsuffix = "-ictce-4.0.6" +toolkit = {'name': 'ictce', 'version': '4.0.6'} -sources=['%s-%s.tar.gz'%(name.lower(),version)] majorversion = "%s.x" % ".".join(version.split('.')[:-1]) -sourceURLs=['https://launchpad.net/fenics-viper/%s/%s/+download/' % (majorversion, version)] +sourceURLs = ['https://launchpad.net/fenics-viper/%s/%s/+download/' % (majorversion, version)] +sources = ['%s-%s.tar.gz' % (name.lower(), version)] +python = "Python" pythonversion = '2.7.3' pythonshortversion = ".".join(pythonversion.split(".")[:-1]) -versionsuffix = "%s-Python-%s" % (toolkitsuffix, pythonversion) +versionsuffix = "-%s-%s" % (python, pythonversion) -dependencies=[('Python',pythonversion,toolkitsuffix,True)] +dependencies=[(python,pythonversion)] sanityCheckPaths = { 'files': ['bin/'], - 'dirs':['lib/python%s/site-packages/viper' % pythonshortversion] + 'dirs': ['lib/python%s/site-packages/viper' % pythonshortversion] } From 012c8d21c225a600e9e4604156655a8898317f64 Mon Sep 17 00:00:00 2001 From: Kenneth Hoste Date: Mon, 13 Aug 2012 10:32:54 +0200 Subject: [PATCH 611/798] style cleanup for GMP, MPFR, libxml2 and PCRE example easyconfigs --- .../g/GMP/GMP-5.0.5-gimkl-0.5.3.eb | 18 ------------- .../g/GMP/GMP-5.0.5-goalf-1.1.0-no-OFED.eb | 22 ++++++++-------- .../g/GMP/GMP-5.0.5-ictce-4.0.6.eb | 22 ++++++++-------- .../l/libxml2/libxml2-2.8.0-gimkl-0.5.3.eb | 14 ----------- .../libxml2-2.8.0-goalf-1.1.0-no-OFED.eb | 20 ++++++++------- .../l/libxml2/libxml2-2.8.0-ictce-4.0.6.eb | 20 ++++++++------- .../m/MPFR/MPFR-3.1.0-gimkl-0.5.3.eb | 19 -------------- .../m/MPFR/MPFR-3.1.0-goalf-1.1.0-no-OFED.eb | 25 ++++++++++--------- .../m/MPFR/MPFR-3.1.0-ictce-4.0.6.eb | 25 ++++++++++--------- .../p/PCRE/PCRE-8.12-gimkl-0.5.3.eb | 13 ---------- .../p/PCRE/PCRE-8.12-goalf-1.1.0-no-OFED.eb | 19 +++++++------- .../p/PCRE/PCRE-8.12-ictce-4.0.6.eb | 19 +++++++------- 12 files changed, 90 insertions(+), 146 deletions(-) delete mode 100644 easybuild/easyconfigs/g/GMP/GMP-5.0.5-gimkl-0.5.3.eb delete mode 100644 easybuild/easyconfigs/l/libxml2/libxml2-2.8.0-gimkl-0.5.3.eb delete mode 100644 easybuild/easyconfigs/m/MPFR/MPFR-3.1.0-gimkl-0.5.3.eb delete mode 100644 easybuild/easyconfigs/p/PCRE/PCRE-8.12-gimkl-0.5.3.eb diff --git a/easybuild/easyconfigs/g/GMP/GMP-5.0.5-gimkl-0.5.3.eb b/easybuild/easyconfigs/g/GMP/GMP-5.0.5-gimkl-0.5.3.eb deleted file mode 100644 index 52fc500408..0000000000 --- a/easybuild/easyconfigs/g/GMP/GMP-5.0.5-gimkl-0.5.3.eb +++ /dev/null @@ -1,18 +0,0 @@ -name='GMP' -version='5.0.5' - -homepage='http://gmplib.org/' -description="""GMP is a free library for arbitrary precision arithmetic, -operating on signed integers, rational numbers, and floating point numbers. """ - -toolkit={'name':'gimkl','version':'0.5.3'} - -sources=['%s-%s.tar.bz2'%(name.lower(),version)] -sourceURLs = ['http://ftp.gnu.org/gnu/gmp'] - -runtest='check' - -sanityCheckPaths={ - 'files':['lib/libgmp.so','include/gmp.h'], - 'dirs':[] - } diff --git a/easybuild/easyconfigs/g/GMP/GMP-5.0.5-goalf-1.1.0-no-OFED.eb b/easybuild/easyconfigs/g/GMP/GMP-5.0.5-goalf-1.1.0-no-OFED.eb index 39d1aee4ba..0b2db9e6a6 100644 --- a/easybuild/easyconfigs/g/GMP/GMP-5.0.5-goalf-1.1.0-no-OFED.eb +++ b/easybuild/easyconfigs/g/GMP/GMP-5.0.5-goalf-1.1.0-no-OFED.eb @@ -1,18 +1,18 @@ -name='GMP' -version='5.0.5' +name = 'GMP' +version = '5.0.5' -homepage='http://gmplib.org/' -description="""GMP is a free library for arbitrary precision arithmetic, +homepage = 'http://gmplib.org/' +description = """GMP is a free library for arbitrary precision arithmetic, operating on signed integers, rational numbers, and floating point numbers. """ -toolkit={'name':'goalf','version':'1.1.0-no-OFED'} +toolkit = {'name': 'goalf', 'version': '1.1.0-no-OFED'} -sources=['%s-%s.tar.bz2'%(name.lower(),version)] +sources = ['%s-%s.tar.bz2' % (name.lower(), version)] sourceURLs = ['http://ftp.gnu.org/gnu/gmp'] -runtest='check' +runtest = 'check' -sanityCheckPaths={ - 'files':['lib/libgmp.so','include/gmp.h'], - 'dirs':[] - } +sanityCheckPaths = { + 'files': ['lib/libgmp.so', 'include/gmp.h'], + 'dirs': [] + } diff --git a/easybuild/easyconfigs/g/GMP/GMP-5.0.5-ictce-4.0.6.eb b/easybuild/easyconfigs/g/GMP/GMP-5.0.5-ictce-4.0.6.eb index 9bafdcdcd4..8a7e781254 100644 --- a/easybuild/easyconfigs/g/GMP/GMP-5.0.5-ictce-4.0.6.eb +++ b/easybuild/easyconfigs/g/GMP/GMP-5.0.5-ictce-4.0.6.eb @@ -1,18 +1,18 @@ -name='GMP' -version='5.0.5' +name = 'GMP' +version = '5.0.5' -homepage='http://gmplib.org/' -description="""GMP is a free library for arbitrary precision arithmetic, +homepage = 'http://gmplib.org/' +description = """GMP is a free library for arbitrary precision arithmetic, operating on signed integers, rational numbers, and floating point numbers. """ -toolkit={'name':'ictce','version':'4.0.6'} +toolkit = {'name': 'ictce', 'version': '4.0.6'} -sources=['%s-%s.tar.bz2'%(name.lower(),version)] +sources = ['%s-%s.tar.bz2' % (name.lower(), version)] sourceURLs = ['http://ftp.gnu.org/gnu/gmp'] -runtest='check' +runtest = 'check' -sanityCheckPaths={ - 'files':['lib/libgmp.so','include/gmp.h'], - 'dirs':[] - } +sanityCheckPaths = { + 'files': ['lib/libgmp.so', 'include/gmp.h'], + 'dirs': [] + } diff --git a/easybuild/easyconfigs/l/libxml2/libxml2-2.8.0-gimkl-0.5.3.eb b/easybuild/easyconfigs/l/libxml2/libxml2-2.8.0-gimkl-0.5.3.eb deleted file mode 100644 index 9b94d127ba..0000000000 --- a/easybuild/easyconfigs/l/libxml2/libxml2-2.8.0-gimkl-0.5.3.eb +++ /dev/null @@ -1,14 +0,0 @@ -name='libxml2' -version='2.8.0' - -homepage='http://xmlsoft.org/' -description="""Libxml2 is the XML C parser and toolkit developed for the Gnome project (but usable -outside of the Gnome platform).""" - -toolkit={'name':'gimkl','version':'0.5.3'} - -configopts="CC=$CC CXX=$CXX --with-pic" - -sources=['%s-%s.tar.gz'%(name.lower(),version)] -sourceURLs=['http://xmlsoft.org/sources/', - 'http://xmlsoft.org/sources/old/'] \ No newline at end of file diff --git a/easybuild/easyconfigs/l/libxml2/libxml2-2.8.0-goalf-1.1.0-no-OFED.eb b/easybuild/easyconfigs/l/libxml2/libxml2-2.8.0-goalf-1.1.0-no-OFED.eb index cf568f7cea..2637d52cd2 100644 --- a/easybuild/easyconfigs/l/libxml2/libxml2-2.8.0-goalf-1.1.0-no-OFED.eb +++ b/easybuild/easyconfigs/l/libxml2/libxml2-2.8.0-goalf-1.1.0-no-OFED.eb @@ -1,14 +1,16 @@ -name='libxml2' -version='2.8.0' +name = 'libxml2' +version = '2.8.0' -homepage='http://xmlsoft.org/' -description="""Libxml2 is the XML C parser and toolkit developed for the Gnome project (but usable +homepage = 'http://xmlsoft.org/' +description = """Libxml2 is the XML C parser and toolkit developed for the Gnome project (but usable outside of the Gnome platform).""" -toolkit={'name':'goalf','version':'1.1.0-no-OFED'} +toolkit = {'name': 'goalf', 'version': '1.1.0-no-OFED'} -configopts="CC=$CC CXX=$CXX --with-pic" +configopts = "CC=$CC CXX=$CXX --with-pic" -sources=['%s-%s.tar.gz'%(name.lower(),version)] -sourceURLs=['http://xmlsoft.org/sources/', - 'http://xmlsoft.org/sources/old/'] \ No newline at end of file +sourceURLs = [ + 'http://xmlsoft.org/sources/', + 'http://xmlsoft.org/sources/old/' + ] +sources = ['%s-%s.tar.gz' % (name.lower(), version)] \ No newline at end of file diff --git a/easybuild/easyconfigs/l/libxml2/libxml2-2.8.0-ictce-4.0.6.eb b/easybuild/easyconfigs/l/libxml2/libxml2-2.8.0-ictce-4.0.6.eb index cf568f7cea..f2477b4253 100644 --- a/easybuild/easyconfigs/l/libxml2/libxml2-2.8.0-ictce-4.0.6.eb +++ b/easybuild/easyconfigs/l/libxml2/libxml2-2.8.0-ictce-4.0.6.eb @@ -1,14 +1,16 @@ -name='libxml2' -version='2.8.0' +name = 'libxml2' +version = '2.8.0' -homepage='http://xmlsoft.org/' -description="""Libxml2 is the XML C parser and toolkit developed for the Gnome project (but usable +homepage = 'http://xmlsoft.org/' +description = """Libxml2 is the XML C parser and toolkit developed for the Gnome project (but usable outside of the Gnome platform).""" -toolkit={'name':'goalf','version':'1.1.0-no-OFED'} +toolkit = {'name': 'ictce', 'version': '4.0.6'} -configopts="CC=$CC CXX=$CXX --with-pic" +configopts = "CC=$CC CXX=$CXX --with-pic" -sources=['%s-%s.tar.gz'%(name.lower(),version)] -sourceURLs=['http://xmlsoft.org/sources/', - 'http://xmlsoft.org/sources/old/'] \ No newline at end of file +sourceURLs = [ + 'http://xmlsoft.org/sources/', + 'http://xmlsoft.org/sources/old/' + ] +sources = ['%s-%s.tar.gz' % (name.lower(), version)] \ No newline at end of file diff --git a/easybuild/easyconfigs/m/MPFR/MPFR-3.1.0-gimkl-0.5.3.eb b/easybuild/easyconfigs/m/MPFR/MPFR-3.1.0-gimkl-0.5.3.eb deleted file mode 100644 index 824952e0fb..0000000000 --- a/easybuild/easyconfigs/m/MPFR/MPFR-3.1.0-gimkl-0.5.3.eb +++ /dev/null @@ -1,19 +0,0 @@ -name='MPFR' -version='3.1.0' - -homepage='http://www.mpfr.org' -description="""The MPFR library is a C library for multiple-precision -floating-point computations with correct rounding.""" - -toolkit={'name':'gimkl','version':'0.5.3'} - -sources=['%s-%s.tar.bz2'%(name.lower(),version)] -sourceURLs = ['http://www.mpfr.org/mpfr-current/'] - -dependencies=[('GMP','5.0.5')] - -runtest='check' -sanityCheckPaths={ - 'files':['lib/libmpfr.so','include/mpfr.h'], - 'dirs':[] - } diff --git a/easybuild/easyconfigs/m/MPFR/MPFR-3.1.0-goalf-1.1.0-no-OFED.eb b/easybuild/easyconfigs/m/MPFR/MPFR-3.1.0-goalf-1.1.0-no-OFED.eb index 86f605d0b0..f2754b96a7 100644 --- a/easybuild/easyconfigs/m/MPFR/MPFR-3.1.0-goalf-1.1.0-no-OFED.eb +++ b/easybuild/easyconfigs/m/MPFR/MPFR-3.1.0-goalf-1.1.0-no-OFED.eb @@ -1,19 +1,20 @@ -name='MPFR' -version='3.1.0' +name = 'MPFR' +version = '3.1.0' -homepage='http://www.mpfr.org' -description="""The MPFR library is a C library for multiple-precision +homepage = 'http://www.mpfr.org' +description = """The MPFR library is a C library for multiple-precision floating-point computations with correct rounding.""" -toolkit={'name':'goalf','version':'1.1.0-no-OFED'} +toolkit = {'name': 'goalf', 'version': '1.1.0-no-OFED'} -sources=['%s-%s.tar.bz2'%(name.lower(),version)] +sources = ['%s-%s.tar.bz2' % (name.lower(), version)] sourceURLs = ['http://www.mpfr.org/mpfr-current/'] -dependencies=[('GMP','5.0.5')] +dependencies = [('GMP', '5.0.5')] -runtest='check' -sanityCheckPaths={ - 'files':['lib/libmpfr.so','include/mpfr.h'], - 'dirs':[] - } +runtest = 'check' + +sanityCheckPaths = { + 'files': ['lib/libmpfr.so', 'include/mpfr.h'], + 'dirs': [] + } diff --git a/easybuild/easyconfigs/m/MPFR/MPFR-3.1.0-ictce-4.0.6.eb b/easybuild/easyconfigs/m/MPFR/MPFR-3.1.0-ictce-4.0.6.eb index 8623b87265..a67e2b5b9e 100644 --- a/easybuild/easyconfigs/m/MPFR/MPFR-3.1.0-ictce-4.0.6.eb +++ b/easybuild/easyconfigs/m/MPFR/MPFR-3.1.0-ictce-4.0.6.eb @@ -1,19 +1,20 @@ -name='MPFR' -version='3.1.0' +name = 'MPFR' +version = '3.1.0' -homepage='http://www.mpfr.org' -description="""The MPFR library is a C library for multiple-precision +homepage = 'http://www.mpfr.org' +description = """The MPFR library is a C library for multiple-precision floating-point computations with correct rounding.""" -toolkit={'name':'ictce','version':'4.0.6'} +toolkit = {'name': 'ictce', 'version': '4.0.6'} -sources=['%s-%s.tar.bz2'%(name.lower(),version)] +sources = ['%s-%s.tar.bz2' % (name.lower(), version)] sourceURLs = ['http://www.mpfr.org/mpfr-current/'] -dependencies=[('GMP','5.0.5')] +dependencies = [('GMP', '5.0.5')] -runtest='check' -sanityCheckPaths={ - 'files':['lib/libmpfr.so','include/mpfr.h'], - 'dirs':[] - } +runtest = 'check' + +sanityCheckPaths = { + 'files': ['lib/libmpfr.so', 'include/mpfr.h'], + 'dirs': [] + } diff --git a/easybuild/easyconfigs/p/PCRE/PCRE-8.12-gimkl-0.5.3.eb b/easybuild/easyconfigs/p/PCRE/PCRE-8.12-gimkl-0.5.3.eb deleted file mode 100644 index 16676226e1..0000000000 --- a/easybuild/easyconfigs/p/PCRE/PCRE-8.12-gimkl-0.5.3.eb +++ /dev/null @@ -1,13 +0,0 @@ -name='PCRE' -version='8.12' - -homepage='http://www.pcre.org/' -description="The PCRE library is a set of functions that implement regular expression pattern matching using the same syntax and semantics as Perl 5." - -toolkit={'name':'gimkl','version':'0.5.3'} -toolkitopts={'optarch':True, 'pic':True} - -configopts="--with-pic --disable-cpp" - -sources=['%s-%s.tar.gz'%(name.lower(),version)] -sourceURLs=['http://prdownloads.sourceforge.net/pcre'] diff --git a/easybuild/easyconfigs/p/PCRE/PCRE-8.12-goalf-1.1.0-no-OFED.eb b/easybuild/easyconfigs/p/PCRE/PCRE-8.12-goalf-1.1.0-no-OFED.eb index 41f40779db..15e211f0d0 100644 --- a/easybuild/easyconfigs/p/PCRE/PCRE-8.12-goalf-1.1.0-no-OFED.eb +++ b/easybuild/easyconfigs/p/PCRE/PCRE-8.12-goalf-1.1.0-no-OFED.eb @@ -1,13 +1,14 @@ -name='PCRE' -version='8.12' +name = 'PCRE' +version = '8.12' -homepage='http://www.pcre.org/' -description="The PCRE library is a set of functions that implement regular expression pattern matching using the same syntax and semantics as Perl 5." +homepage = 'http://www.pcre.org/' +description = """The PCRE library is a set of functions that implement regular expression pattern matching using the same syntax +and semantics as Perl 5.""" -toolkit={'name':'goalf','version':'1.1.0-no-OFED'} -toolkitopts={'optarch':True, 'pic':True} +toolkit = {'name': 'goalf', 'version': '1.1.0-no-OFED'} +toolkitopts = {'optarch': True, 'pic': True} -configopts="--with-pic --disable-cpp" +configopts = "--with-pic --disable-cpp" -sources=['%s-%s.tar.gz'%(name.lower(),version)] -sourceURLs=['http://prdownloads.sourceforge.net/pcre'] +sourceURLs = ['http://prdownloads.sourceforge.net/pcre'] +sources = ['%s-%s.tar.gz' % (name.lower(), version)] diff --git a/easybuild/easyconfigs/p/PCRE/PCRE-8.12-ictce-4.0.6.eb b/easybuild/easyconfigs/p/PCRE/PCRE-8.12-ictce-4.0.6.eb index 4c94e1c08f..292d29f4e5 100644 --- a/easybuild/easyconfigs/p/PCRE/PCRE-8.12-ictce-4.0.6.eb +++ b/easybuild/easyconfigs/p/PCRE/PCRE-8.12-ictce-4.0.6.eb @@ -1,13 +1,14 @@ -name='PCRE' -version='8.12' +name = 'PCRE' +version = '8.12' -homepage='http://www.pcre.org/' -description="The PCRE library is a set of functions that implement regular expression pattern matching using the same syntax and semantics as Perl 5." +homepage = 'http://www.pcre.org/' +description = """The PCRE library is a set of functions that implement regular expression pattern matching using the same syntax +and semantics as Perl 5.""" -toolkit={'name':'ictce','version':'4.0.6'} -toolkitopts={'optarch':True, 'pic':True} +toolkit = {'name': 'ictce', 'version': '4.0.6'} +toolkitopts = {'optarch': True, 'pic': True} -configopts="--with-pic --disable-cpp" +configopts = "--with-pic --disable-cpp" -sources=['%s-%s.tar.gz'%(name.lower(),version)] -sourceURLs=['http://prdownloads.sourceforge.net/pcre'] +sourceURLs = ['http://prdownloads.sourceforge.net/pcre'] +sources = ['%s-%s.tar.gz' % (name.lower(), version)] From 37eda5f870f4f480b0020ceef606afb3a4ff7af8 Mon Sep 17 00:00:00 2001 From: Toon Willems Date: Mon, 13 Aug 2012 10:43:24 +0200 Subject: [PATCH 612/798] resolve final comments --- easybuild/tools/parallelbuild.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/easybuild/tools/parallelbuild.py b/easybuild/tools/parallelbuild.py index d7ebd42800..d47fe59be5 100644 --- a/easybuild/tools/parallelbuild.py +++ b/easybuild/tools/parallelbuild.py @@ -19,7 +19,7 @@ # along with EasyBuild. If not, see . ## """ -module for doing parallel builds. This uses a PBS like cluster. You should be able to submit jobs (which can have +module for doing parallel builds. This uses a PBS-like cluster. You should be able to submit jobs (which can have dependencies) Support for PBS is provided via the PbsJob class. If you want you could create other job classes and use them here. @@ -38,7 +38,7 @@ def build_packages_in_parallel(build_command, packages, output_dir, log): """ log.info("going to build these packages in parallel: %s", packages) job_module_dict = {} - # dependencies have already been resolved this means I can linearly walk over the list and use previous job id's + # dependencies have already been resolved this means one can linearly walk over the list and use previous job id's for pkg in packages: # This is very important, otherwise we might have race conditions # e.g. GCC-4.5.3 finds cloog.tar.gz but it was incorrectly downloaded by GCC-4.6.3 From a15f0ec9dd43b70dab827dbee43b0f3eab8f6c7b Mon Sep 17 00:00:00 2001 From: Toon Willems Date: Mon, 13 Aug 2012 10:53:58 +0200 Subject: [PATCH 613/798] Revert "Merge pull request #73 from nudded/346-check-loaded-modules" This reverts commit 6a50b8064fd02e78c369188569f5b9aef18d8f99, reversing changes made to da296a2b26b03b40284caa38a5f3213ef516c4fa. --- easybuild/build.py | 5 ----- 1 file changed, 5 deletions(-) diff --git a/easybuild/build.py b/easybuild/build.py index 59a558495a..87dcd29fd5 100644 --- a/easybuild/build.py +++ b/easybuild/build.py @@ -193,11 +193,6 @@ def main(): if options.strict: filetools.strictness = options.strict - # Check if any modules are loaded which could influence the build process - bad_keys = ["$%s" % key for key in os.environ if key.startswith("SOFTROOT")] - if bad_keys: - log.error("You have some easybuild modules loaded: %s are set in your environment" % bad_keys) - if options.job: submit_build_job(log) log.info("submitted job, exiting now") From 0710631aeb2bbade7e6d856cad1cfc005c82630d Mon Sep 17 00:00:00 2001 From: Toon Willems Date: Mon, 13 Aug 2012 11:17:11 +0200 Subject: [PATCH 614/798] call eb again instead of easybuild/build.py --- easybuild/build.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/easybuild/build.py b/easybuild/build.py index 36f2660b9b..41e96c586a 100644 --- a/easybuild/build.py +++ b/easybuild/build.py @@ -238,7 +238,9 @@ def main(): if options.job: curdir = os.getcwd() - command = "cd %s && python %s %%s -d" % (curdir, sys.argv[0]) + easybuild_basedir = os.path.dirname(os.path.dirname(sys.argv[0])) + eb_path = os.path.join(easybuild_basedir, "eb") + command = "cd %s && %s %%s -d" % (curdir, eb_path) parbuild.build_packages_in_parallel(command, orderedSpecs, "easybuild-build", log) log.info("Submitted parallel build jobs, exiting now") sys.exit(0) From c53cd0b003d575fc4f90f270c83bedfa294520fc Mon Sep 17 00:00:00 2001 From: Kenneth Hoste Date: Mon, 13 Aug 2012 11:19:14 +0200 Subject: [PATCH 615/798] fix permissions on build.py --- easybuild/build.py | 0 1 file changed, 0 insertions(+), 0 deletions(-) mode change 100644 => 100755 easybuild/build.py diff --git a/easybuild/build.py b/easybuild/build.py old mode 100644 new mode 100755 From 7e78bd5f8868280db52b7d0bbee190cbbcb765c0 Mon Sep 17 00:00:00 2001 From: Toon Willems Date: Mon, 13 Aug 2012 11:20:20 +0200 Subject: [PATCH 616/798] print job ids --- easybuild/build.py | 5 ++++- easybuild/tools/parallelbuild.py | 6 ++++++ 2 files changed, 10 insertions(+), 1 deletion(-) diff --git a/easybuild/build.py b/easybuild/build.py index 41e96c586a..a21cf52df7 100644 --- a/easybuild/build.py +++ b/easybuild/build.py @@ -241,7 +241,10 @@ def main(): easybuild_basedir = os.path.dirname(os.path.dirname(sys.argv[0])) eb_path = os.path.join(easybuild_basedir, "eb") command = "cd %s && %s %%s -d" % (curdir, eb_path) - parbuild.build_packages_in_parallel(command, orderedSpecs, "easybuild-build", log) + jobs = parbuild.build_packages_in_parallel(command, orderedSpecs, "easybuild-build", log) + for job in jobs: + print "%s: %s" % (job.name, job.jobid) + log.info("Submitted parallel build jobs, exiting now") sys.exit(0) diff --git a/easybuild/tools/parallelbuild.py b/easybuild/tools/parallelbuild.py index d47fe59be5..fd657958e9 100644 --- a/easybuild/tools/parallelbuild.py +++ b/easybuild/tools/parallelbuild.py @@ -35,10 +35,13 @@ def build_packages_in_parallel(build_command, packages, output_dir, log): """ packages is a list of packages which can be build! (e.g. they have no unresolved dependencies) this function will build them in parallel by submitting jobs + + returns the jobs """ log.info("going to build these packages in parallel: %s", packages) job_module_dict = {} # dependencies have already been resolved this means one can linearly walk over the list and use previous job id's + jobs = [] for pkg in packages: # This is very important, otherwise we might have race conditions # e.g. GCC-4.5.3 finds cloog.tar.gz but it was incorrectly downloaded by GCC-4.6.3 @@ -55,6 +58,9 @@ def build_packages_in_parallel(build_command, packages, output_dir, log): log.info("job for module %s has been submitted (job id: %s)" % (new_job.module, new_job.jobid)) # update dictionary job_module_dict[new_job.module] = new_job.jobid + jobs.append(new_job) + + return jobs def create_job(build_command, package, output_dir=""): From 9b575cba0abbabfee04cfb3d2bf19df29ec103ae Mon Sep 17 00:00:00 2001 From: Kenneth Hoste Date: Mon, 13 Aug 2012 11:40:37 +0200 Subject: [PATCH 617/798] fix typo --- easybuild/tools/toolkit.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/easybuild/tools/toolkit.py b/easybuild/tools/toolkit.py index 3e40c5af7b..bc5da9c6a0 100644 --- a/easybuild/tools/toolkit.py +++ b/easybuild/tools/toolkit.py @@ -587,7 +587,7 @@ def prepareIMKL(self): blas_libs = ["intel%s" % libsfx, "sequential", "core"] blas_mt_libs = ["intel%s" % libsfx, "intel_thread", "core"] scalapack_libs = ["scalapack%s" % libsfxsl, "solver%s_sequential" % libsfx] + blas_libs + ["blacs_intelmpi%s" % libsfx] - scalapack_mt_libs = ["scalapack%s" % libsfxsl, "solver" % libsfx] + blas_mt_libs + ["blacs_intelmpi%s" % libsfx] + scalapack_mt_libs = ["scalapack%s" % libsfxsl, "solver%s" % libsfx] + blas_mt_libs + ["blacs_intelmpi%s" % libsfx] # adjust lib subdir if GCC is used if self.comp_family() == GCC: From 286aa3c669a61185a9b4bf3124880f32bfb8d966 Mon Sep 17 00:00:00 2001 From: Kenneth Hoste Date: Mon, 13 Aug 2012 11:52:36 +0200 Subject: [PATCH 618/798] fix __init__, use extra_options --- easybuild/easyblocks/b/boost.py | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/easybuild/easyblocks/b/boost.py b/easybuild/easyblocks/b/boost.py index 16d1701f85..16ec35fcc6 100644 --- a/easybuild/easyblocks/b/boost.py +++ b/easybuild/easyblocks/b/boost.py @@ -34,11 +34,15 @@ class Boost(Application): """Support for building Boost.""" def __init__(self, *args, **kwargs): - Application.__init__(self, args, kwargs) + Application.__init__(self, *args, **kwargs) self.objdir = None - self.cfg.update({'boost_mpi':[False, "Build mpi boost module (default: False)"]}) + def extra_options(self): + + extra_vars = {'boost_mpi':[False, "Build mpi boost module (default: False)"]} + + return Application.extra_options(self, extra_vars) def configure(self): """Configure Boost build using custom tools""" From dfd756198b876f4814411ebe0b5072e830bd36f4 Mon Sep 17 00:00:00 2001 From: Kenneth Hoste Date: Mon, 13 Aug 2012 11:55:18 +0200 Subject: [PATCH 619/798] fix join argument (list) --- easybuild/tools/toolkit.py | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/easybuild/tools/toolkit.py b/easybuild/tools/toolkit.py index bc5da9c6a0..07581e9373 100644 --- a/easybuild/tools/toolkit.py +++ b/easybuild/tools/toolkit.py @@ -597,12 +597,12 @@ def prepareIMKL(self): # sequential BLAS and LAPACK prefix = "-Wl:-Bstatic -Wl,--start-group" suffix = "-Wl,--end-group -Wl:-Bdynamic" - self.vars['LIBBLAS'] = ' '.join(prefix, ' '.join(["-lmkl_%s" % x for x in blas_libs]), suffix) + self.vars['LIBBLAS'] = ' '.join([prefix, ' '.join(["-lmkl_%s" % x for x in blas_libs]), suffix]) self.vars['LIBLAPACK'] = self.vars['LIBBLAS'] # multi-threaded BLAS and LAPACK suffix += " -liomp5 -lpthread" - self.vars['LIBBLAS_MT'] = ' '.join(prefix, ' '.join(["-lmkl_%s" % x for x in blas_mt_libs]), suffix) + self.vars['LIBBLAS_MT'] = ' '.join([prefix, ' '.join(["-lmkl_%s" % x for x in blas_mt_libs]), suffix]) self.vars['LIBLAPACK_MT'] = self.vars['LIBBLAS_MT'] # determine BLACS/BLAS/LAPACK/FFTW library dir @@ -639,12 +639,12 @@ def prepareIMKL(self): self.vars['SCALAPACK_LIB_DIR'] = libs_dir suffix = "-Wl,--end-group -Wl:-Bdynamic" - self.vars['LIBSCALAPACK'] = ' '.join((prefix, ' '.join(["-lmkl_%s" % x for x in scalapack_libs]), suffix)) + self.vars['LIBSCALAPACK'] = ' '.join([prefix, ' '.join(["-lmkl_%s" % x for x in scalapack_libs]), suffix]) self.vars['SCALAPACK_STATIC_LIBS'] = ','.join(["libmkl_%s.a" % x for x in scalapack_libs]) # multi-threaded ScaLAPACK suffix += ' -liomp5 -lpthread' - self.vars['LIBSCALAPACK_MT'] = ' '.join((prefix, ' '.join(["-lmkl_%s" % x for x in scalapack_mt_libs]), suffix)) + self.vars['LIBSCALAPACK_MT'] = ' '.join([prefix, ' '.join(["-lmkl_%s" % x for x in scalapack_mt_libs]), suffix]) self.vars['SCALAPACK_MT_STATIC_LIBS'] = ','.join(["libmkl_%s.a" % x for x in scalapack_mt_libs]) # FFT library From 1531b18aa0d4934b960033f689c1658166de0f2e Mon Sep 17 00:00:00 2001 From: Kenneth Hoste Date: Mon, 13 Aug 2012 11:57:49 +0200 Subject: [PATCH 620/798] fix join argument (list) --- easybuild/tools/toolkit.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/easybuild/tools/toolkit.py b/easybuild/tools/toolkit.py index 07581e9373..752b3b8588 100644 --- a/easybuild/tools/toolkit.py +++ b/easybuild/tools/toolkit.py @@ -652,9 +652,9 @@ def prepareIMKL(self): if self.opts['pic']: fftwsuff = "_pic" fftw_libs = ["fftw3xc_intel%s" % fftwsuff] - self.vars['LIBFFT'] = ' '.join("-Wl:-Bstatic", - ' '.join(["-%s" % x for x in fftw_libs]), - "-Wl:-Bdynamic") + self.vars['LIBFFT'] = ' '.join(["-Wl:-Bstatic", + ' '.join(["-%s" % x for x in fftw_libs]), + "-Wl:-Bdynamic"]) self.vars['FFTW_INC'] = os.path.join(mklroot, "mkl", "include", "fftw") self.vars['FFTW_LIB_DIR'] = libs_dir self.vars['FFTW_STATIC_LIBS'] = ','.join(["libmkl_%s.a" % x for x in fftw_libs]) From 44bb6ac4ae50bb52c4de13bedcada7ebf8a448e1 Mon Sep 17 00:00:00 2001 From: Toon Willems Date: Mon, 13 Aug 2012 14:04:28 +0200 Subject: [PATCH 621/798] rename SOFT -> EB, but keep support for both --- easybuild/easyblocks/c/cp2k.py | 4 ++-- easybuild/easyblocks/l/lapack.py | 6 +++--- easybuild/framework/application.py | 25 +++++++++++++------------ easybuild/test/toolkit.py | 4 ++-- easybuild/tools/modules.py | 22 ++++++++++++++++++---- easybuild/tools/toolkit.py | 4 ++-- 6 files changed, 40 insertions(+), 25 deletions(-) diff --git a/easybuild/easyblocks/c/cp2k.py b/easybuild/easyblocks/c/cp2k.py index 78a4d71d25..f392e36588 100644 --- a/easybuild/easyblocks/c/cp2k.py +++ b/easybuild/easyblocks/c/cp2k.py @@ -269,8 +269,8 @@ def configureCommon(self): 'FCFLAGS': '$(FCFLAGS%s)' % optflags, 'FCFLAGS2': '$(FCFLAGS%s)' % regflags, - 'CFLAGS': ' %s %s $(FPIC) $(DEBUG) %s ' % (os.getenv('SOFTVARCPPFLAGS'), - os.getenv('SOFTVARLDFLAGS'), + 'CFLAGS': ' %s %s $(FPIC) $(DEBUG) %s ' % (os.getenv('EBVARCPPFLAGS'), + os.getenv('EBVARLDFLAGS'), self.getcfg('extracflags')), 'DFLAGS': ' -D__parallel -D__BLACS -D__SCALAPACK -D__FFTSG %s' % self.getcfg('extradflags'), diff --git a/easybuild/easyblocks/l/lapack.py b/easybuild/easyblocks/l/lapack.py index c70ecfb6a5..b256828cc7 100644 --- a/easybuild/easyblocks/l/lapack.py +++ b/easybuild/easyblocks/l/lapack.py @@ -84,9 +84,9 @@ def configure(self): """ # copy make.inc file from examples - if os.getenv('SOFTROOTGCC'): + if get_software_root('gcc'): makeinc = 'gfortran' - elif os.getenv('SOFTROOTIFORT'): + elif get_software_root('ifort'): makeinc = 'ifort' else: self.log.error("Don't know which make.inc file to pick, unknown compiler being used...") @@ -185,7 +185,7 @@ def test(self): """ if self.getcfg('test_only'): - if not os.getenv('SOFTROOTLAPACK'): + if not get_software_root('lapack'): self.log.error("You need to make sure that the LAPACK module is loaded to perform testing.") blaslib = get_blas_lib(self.log) diff --git a/easybuild/framework/application.py b/easybuild/framework/application.py index ff1f6b87c3..24ab52f3f5 100644 --- a/easybuild/framework/application.py +++ b/easybuild/framework/application.py @@ -334,8 +334,8 @@ def ready2build(self): self.log.error('Not all dependencies have a matching toolkit version') # Check if the application is not loaded at the moment - envName = "SOFTROOT%s" % convertName(self.name(), upper=True) - if envName in os.environ: + envName = "EBROOT%s" % convertName(self.name(), upper=True) + if get_software_root(self.name()): self.log.error("Module is already loaded (%s is set), installation cannot continue." % envName) # Check if main install needs to be skipped @@ -1096,10 +1096,10 @@ def make_module(self, fake=False): def make_devel_module(self): """ Create a develop module file which sets environment based on the build - Usage: module load name, which loads the module you want to use. $SOFTDEVELNAME should then be the full path - to the devel module file. So now you can module load $SOFTDEVELNAME. + Usage: module load name, which loads the module you want to use. $EBDEVELNAME should then be the full path + to the devel module file. So now you can module load $EBDEVELNAME. - WARNING: you cannot unload using $SOFTDEVELNAME (for now: use module unload `basename $SOFTDEVELNAME`) + WARNING: you cannot unload using $EBDEVELNAME (for now: use module unload `basename $EBDEVELNAME`) """ self.log.debug("loaded modules: %s" % Modules().loaded_modules()) mod_gen = ModuleGenerator(self) @@ -1114,10 +1114,11 @@ def make_devel_module(self): env_txt += mod_gen.setEnvironment(key, val) load_txt = "" - # capture all the SOFTDEVEL vars + # capture all the EBDEVEL vars # these should be all the dependencies and we should load them for key in os.environ: - if key.startswith("SOFTDEVEL"): + # legacy support + if key.startswith("EBDEVEL") or key.startswith("SOFTDEVEL"): path = os.environ[key] if os.path.isfile(path): name, version = path.rsplit('/', 1) @@ -1193,17 +1194,17 @@ def make_module_req_guess(self): def make_module_extra(self): """ - Sets optional variables (SOFTROOT, MPI tuning variables). + Sets optional variables (EBROOT, MPI tuning variables). """ txt = "\n" - # SOFTROOT + SOFTVERSION + SOFTDEVEL + # EBROOT + EBVERSION + EBDEVEL environment_name = convertName(self.name(), upper=True) - txt += self.moduleGenerator.setEnvironment("SOFTROOT" + environment_name, "$root") - txt += self.moduleGenerator.setEnvironment("SOFTVERSION" + environment_name, self.version()) + txt += self.moduleGenerator.setEnvironment("EBROOT" + environment_name, "$root") + txt += self.moduleGenerator.setEnvironment("EBVERSION" + environment_name, self.version()) devel_path = os.path.join("$root", config.logPath(), "%s-%s-easybuild-devel" % (self.name(), self.installversion())) - txt += self.moduleGenerator.setEnvironment("SOFTDEVEL" + environment_name, devel_path) + txt += self.moduleGenerator.setEnvironment("EBDEVEL" + environment_name, devel_path) txt += "\n" for (key, value) in self.getcfg('modextravars').items(): diff --git a/easybuild/test/toolkit.py b/easybuild/test/toolkit.py index 563c35887d..d3e6f8468e 100644 --- a/easybuild/test/toolkit.py +++ b/easybuild/test/toolkit.py @@ -114,8 +114,8 @@ def runTest(self): self.dummy_tk.prepare() self.assertEqual(MockModule.modules, []) - os.environ["SOFTVERSIONICC"] = "2011" - os.environ["SOFTROOTICC"] = "/tmp" + os.environ["EBVERSIONICC"] = "2011" + os.environ["EBROOTICC"] = "/tmp" self.tk_32bit.prepare() diff --git a/easybuild/tools/modules.py b/easybuild/tools/modules.py index 8559b160ab..c7ecc05643 100644 --- a/easybuild/tools/modules.py +++ b/easybuild/tools/modules.py @@ -307,12 +307,26 @@ def get_software_root(name): """ Return the software root set for a particular package. """ - environmentKey = "SOFTROOT%s" % convertName(name, upper=True) - return os.getenv(environmentKey) + name = convertName(name, upper=True) + environment_key = "EBROOT%s" % name + legacy_key = "SOFTROOT%s" % name + + # keep on supporting legacy installations + if environment_key in os.environ: + return os.getenv(environment_key) + else: + return os.getenv(legacy_key) def get_software_version(name): """ Return the software version set for a particular package. """ - environmentKey = "SOFTVERSION%s" % convertName(name, upper=True) - return os.getenv(environmentKey) + name = convertName(name, upper=True) + environment_key = "EBVERSION%s" % name + legacy_key = "SOFTVERSION%s" % name + + # keep on supporting legacy installations + if environment_key in os.environ: + return os.getenv(environment_key) + else: + return os.getenv(legacy_key) diff --git a/easybuild/tools/toolkit.py b/easybuild/tools/toolkit.py index eb5bc0d9e5..c309927c9e 100644 --- a/easybuild/tools/toolkit.py +++ b/easybuild/tools/toolkit.py @@ -224,10 +224,10 @@ def _setVariables(self, dontset=None): env.set(key, val) # also set unique named variables that can be used in Makefiles - # - so you can have 'CFLAGS = $(SOFTVARCFLAGS)' + # - so you can have 'CFLAGS = $(EBVARCFLAGS)' # -- 'CLFLAGS = $(CFLAGS)' gives '*** Recursive variable `CFLAGS' # references itself (eventually). Stop' error - env.set("SOFTVAR%s" % key, val) + env.set("EBVAR%s" % key, val) def _getOptimalArchitecture(self): From 43164e9c8d92964a2e6c4361eac7ea27943d19c8 Mon Sep 17 00:00:00 2001 From: Kenneth Hoste Date: Mon, 13 Aug 2012 14:58:46 +0200 Subject: [PATCH 622/798] add CC to bzip2 make opts --- easybuild/easyblocks/b/bzip2.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/easybuild/easyblocks/b/bzip2.py b/easybuild/easyblocks/b/bzip2.py index 1b62a01a8f..b5eb26f2fc 100644 --- a/easybuild/easyblocks/b/bzip2.py +++ b/easybuild/easyblocks/b/bzip2.py @@ -30,8 +30,9 @@ class Bzip2(Application): # no configure script def configure(self): - """Set extra configure options.""" + """Set extra configure options (CC, CFLAGS).""" + self.updatecfg('makeopts', 'CC="%s"' % os.getenv('CC')) self.updatecfg('makeopts', "CFLAGS='-Wall -Winline %s -g $(BIGFILES)'" % os.getenv('CFLAGS')) def make_install(self): From dddb5d7c000018b90a01af4e49c7145d879f4d83 Mon Sep 17 00:00:00 2001 From: Kenneth Hoste Date: Mon, 13 Aug 2012 15:04:34 +0200 Subject: [PATCH 623/798] style cleanup for SCOTCH --- easybuild/easyblocks/s/scotch.py | 17 ++++++++++++----- .../SCOTCH-5.1.12b_esmumps-gimkl-0.5.3.eb | 12 ------------ ...COTCH-5.1.12b_esmumps-goalf-1.1.0-no-OFED.eb | 14 +++++++------- .../SCOTCH-5.1.12b_esmumps-ictce-4.0.6.eb | 14 +++++++------- 4 files changed, 26 insertions(+), 31 deletions(-) delete mode 100644 easybuild/easyconfigs/s/SCOTCH/SCOTCH-5.1.12b_esmumps-gimkl-0.5.3.eb diff --git a/easybuild/easyblocks/s/scotch.py b/easybuild/easyblocks/s/scotch.py index 08e57725c8..899c4d49b3 100644 --- a/easybuild/easyblocks/s/scotch.py +++ b/easybuild/easyblocks/s/scotch.py @@ -18,6 +18,9 @@ # You should have received a copy of the GNU General Public License # along with EasyBuild. If not, see . ## +""" +EasyBuild support for SCOTCH, implemented as an easyblock +""" import fileinput import os import re @@ -28,12 +31,14 @@ from easybuild.framework.application import Application from easybuild.tools.filetools import run_cmd, copytree + class SCOTCH(Application): """Support for building/installing SCOTCH.""" def configure(self): - """Configure SCOTCH build: locate the correct makefile, and copy this to a general Makefile.inc""" + """Configure SCOTCH build: locate the template makefile, copy it to a general Makefile.inc and patch it.""" + # pick template makefile comp_fam = self.toolkit().comp_family() if comp_fam == toolkit.INTEL: makefilename = 'Makefile.inc.x86-64_pc_linux2.icc' @@ -53,9 +58,9 @@ def configure(self): self.log.error("Copying Makefile.inc to src dir failed.") # the default behaviour of these makefiles is still wrong - # e.g., we need -lpthread + # e.g., compiler settings, and we need -lpthread try: - for line in fileinput.input(dst, inplace=1, backup='.orig.patchictce'): + for line in fileinput.input(dst, inplace=1, backup='.orig.easybuild'): # use $CC and the likes since we're at it. line = re.sub(r"^CCS\s*=.*$", "CCS\t= $(CC)", line) line = re.sub(r"^CCP\s*=.*$", "CCP\t= $(MPICC)", line) @@ -128,7 +133,8 @@ def sanitycheck(self): if not self.getcfg('sanityCheckPaths'): - self.setcfg('sanityCheckPaths', {'files': ['bin/%s' % x for x in ["acpl","amk_fft2","amk_hy", + self.setcfg('sanityCheckPaths', { + 'files': ['bin/%s' % x for x in ["acpl","amk_fft2","amk_hy", "amk_p2","dggath","dgord", "dgscat","gbase","gmap", "gmk_m2","gmk_msh","gmtst", @@ -151,7 +157,8 @@ def sanitycheck(self): "ptscotcherr", "scotch", "scotcherrexit"]], - 'dirs':[]}) + 'dirs':[] + }) self.log.info("Customized sanity check paths: %s" % self.getcfg('sanityCheckPaths')) diff --git a/easybuild/easyconfigs/s/SCOTCH/SCOTCH-5.1.12b_esmumps-gimkl-0.5.3.eb b/easybuild/easyconfigs/s/SCOTCH/SCOTCH-5.1.12b_esmumps-gimkl-0.5.3.eb deleted file mode 100644 index 8ffa6d2067..0000000000 --- a/easybuild/easyconfigs/s/SCOTCH/SCOTCH-5.1.12b_esmumps-gimkl-0.5.3.eb +++ /dev/null @@ -1,12 +0,0 @@ -name='SCOTCH' -version='5.1.12b_esmumps' - -homepage='http://www.labri.fr/perso/pelegrin/scotch/' -description="""Software package and libraries for sequential and parallel graph partitioning, -static mapping, and sparse matrix block ordering, and sequential mesh and hypergraph partitioning.""" - -toolkit={'name':'gimkl','version':'0.5.3'} -toolkitopts={'pic':True} - -sources=['%s_%s.tar.gz'%(name.lower(),version)] -sourceURLs = ['https://gforge.inria.fr/frs/download.php/28978/'] diff --git a/easybuild/easyconfigs/s/SCOTCH/SCOTCH-5.1.12b_esmumps-goalf-1.1.0-no-OFED.eb b/easybuild/easyconfigs/s/SCOTCH/SCOTCH-5.1.12b_esmumps-goalf-1.1.0-no-OFED.eb index 69ca2436a0..d251449f82 100644 --- a/easybuild/easyconfigs/s/SCOTCH/SCOTCH-5.1.12b_esmumps-goalf-1.1.0-no-OFED.eb +++ b/easybuild/easyconfigs/s/SCOTCH/SCOTCH-5.1.12b_esmumps-goalf-1.1.0-no-OFED.eb @@ -1,12 +1,12 @@ -name='SCOTCH' -version='5.1.12b_esmumps' +name = 'SCOTCH' +version = '5.1.12b_esmumps' -homepage='http://www.labri.fr/perso/pelegrin/scotch/' -description="""Software package and libraries for sequential and parallel graph partitioning, +homepage = 'http://www.labri.fr/perso/pelegrin/scotch/' +description = """Software package and libraries for sequential and parallel graph partitioning, static mapping, and sparse matrix block ordering, and sequential mesh and hypergraph partitioning.""" -toolkit={'name':'goalf','version':'1.1.0-no-OFED'} -toolkitopts={'pic':True} +toolkit = {'name': 'goalf', 'version': '1.1.0-no-OFED'} +toolkitopts = {'pic': True} -sources=['%s_%s.tar.gz'%(name.lower(),version)] sourceURLs = ['https://gforge.inria.fr/frs/download.php/28978/'] +sources = ['%s_%s.tar.gz' % (name.lower(), version)] diff --git a/easybuild/easyconfigs/s/SCOTCH/SCOTCH-5.1.12b_esmumps-ictce-4.0.6.eb b/easybuild/easyconfigs/s/SCOTCH/SCOTCH-5.1.12b_esmumps-ictce-4.0.6.eb index 2222806b29..d06d1d6176 100644 --- a/easybuild/easyconfigs/s/SCOTCH/SCOTCH-5.1.12b_esmumps-ictce-4.0.6.eb +++ b/easybuild/easyconfigs/s/SCOTCH/SCOTCH-5.1.12b_esmumps-ictce-4.0.6.eb @@ -1,12 +1,12 @@ -name='SCOTCH' -version='5.1.12b_esmumps' +name = 'SCOTCH' +version = '5.1.12b_esmumps' -homepage='http://www.labri.fr/perso/pelegrin/scotch/' -description="""Software package and libraries for sequential and parallel graph partitioning, +homepage = 'http://www.labri.fr/perso/pelegrin/scotch/' +description = """Software package and libraries for sequential and parallel graph partitioning, static mapping, and sparse matrix block ordering, and sequential mesh and hypergraph partitioning.""" -toolkit={'name':'ictce','version':'4.0.6'} -toolkitopts={'pic':True} +toolkit = {'name': 'ictce', 'version': '4.0.6'} +toolkitopts = {'pic': True} -sources=['%s_%s.tar.gz'%(name.lower(),version)] sourceURLs = ['https://gforge.inria.fr/frs/download.php/28978/'] +sources = ['%s_%s.tar.gz' % (name.lower(), version)] From baac243a60866d341bf89c875be28fe4f615c81f Mon Sep 17 00:00:00 2001 From: Kenneth Hoste Date: Mon, 13 Aug 2012 15:08:18 +0200 Subject: [PATCH 624/798] style cleanup for SLEPc --- easybuild/easyblocks/s/slepc.py | 14 ++++++++------ 1 file changed, 8 insertions(+), 6 deletions(-) diff --git a/easybuild/easyblocks/s/slepc.py b/easybuild/easyblocks/s/slepc.py index 8d011c1cbe..76387c66bb 100644 --- a/easybuild/easyblocks/s/slepc.py +++ b/easybuild/easyblocks/s/slepc.py @@ -19,7 +19,7 @@ # along with EasyBuild. If not, see . ## """ -EasyBuild support for building and installing SLEPc, implemented as an easyblock +EasyBuild support for SLEPc, implemented as an easyblock """ import os @@ -50,7 +50,6 @@ def extra_options(self): def make_builddir(self): """Decide whether or not to build in install dir before creating build dir.""" - if self.getcfg('sourceinstall'): self.build_in_installdir = True @@ -68,7 +67,9 @@ def configure(self): self.log.debug('SLEPC_DIR: %s' % os.getenv('SLEPC_DIR')) # optional dependencies - for dep in ["ARPACK", "BLZPACK", "PRIMME", "TRLAN"]: + depfilter = self.cfg.builddependencies() + ["PETSc"] + deps = [dep['name'] for dep in self.cfg.dependencies() if not dep['name'] in depfilter] + for dep in deps: deproot = get_software_root(dep) if deproot: withdep = "--with-%s" % dep.lower() @@ -79,6 +80,7 @@ def configure(self): cmd = "%s ./configure %s" % (self.getcfg('preconfigopts'), self.getcfg('configopts')) (out, _) = run_cmd(cmd, log_all=True, simple=False) else: + # regular './configure --prefix=X' for non-source install out = Application.configure(self) # check for errors in configure @@ -97,7 +99,6 @@ def configure(self): def make_module_req_guess(self): """Specify correct LD_LIBRARY_PATH and CPATH for SLEPc installation.""" - guesses = Application.make_module_req_guess(self) guesses.update({ @@ -124,11 +125,12 @@ def sanitycheck(self): """Custom sanity check for SLEPc""" if not self.getcfg('sanityCheckPaths'): - self.setcfg('sanityCheckPaths', {'files': [], + self.setcfg('sanityCheckPaths', { + 'files': [], 'dirs': [os.path.join(self.slepc_subdir, x) for x in ["conf", "include", "lib"]] - }) + }) self.log.info("Customized sanity check paths: %s" % self.getcfg('sanityCheckPaths')) From 634f588583b38434259de78a0d80d819e9357b17 Mon Sep 17 00:00:00 2001 From: Kenneth Hoste Date: Mon, 13 Aug 2012 15:13:38 +0200 Subject: [PATCH 625/798] style cleanup for SuiteSparse --- easybuild/easyblocks/s/suitesparse.py | 34 ++++++++++--------- ...teSparse-3.7.0-gimkl-0.5.3-withparmetis.eb | 14 -------- ...-3.7.0-goalf-1.1.0-no-OFED-withparmetis.eb | 20 +++++------ ...teSparse-3.7.0-ictce-4.0.6-withparmetis.eb | 20 +++++------ 4 files changed, 38 insertions(+), 50 deletions(-) delete mode 100644 easybuild/easyconfigs/s/SuiteSparse/SuiteSparse-3.7.0-gimkl-0.5.3-withparmetis.eb diff --git a/easybuild/easyblocks/s/suitesparse.py b/easybuild/easyblocks/s/suitesparse.py index a34be17ae1..bba9e71f6d 100644 --- a/easybuild/easyblocks/s/suitesparse.py +++ b/easybuild/easyblocks/s/suitesparse.py @@ -18,6 +18,9 @@ # You should have received a copy of the GNU General Public License # along with EasyBuild. If not, see . ## +""" +EasyBuild support for SuiteSparse, implemented as an easyblock +""" import fileinput import re import os @@ -34,7 +37,6 @@ class SuiteSparse(Application): def configure(self): """Configure build by patching UFconfig.mk.""" - metis = get_software_root('METIS') parmetis = get_software_root('ParMETIS') if not metis and not parmetis: @@ -43,19 +45,19 @@ def configure(self): fp = os.path.join("UFconfig","UFconfig.mk") cfgvars = { - 'CC':os.getenv('MPICC'), - 'CFLAGS':os.getenv('CFLAGS'), - 'CXX':os.getenv('MPICXX'), - 'F77':os.getenv('MPIF77'), - 'F77FLAGS':os.getenv('F77FLAGS'), - 'BLAS':os.getenv('LIBBLAS_MT'), - 'LAPACK':os.getenv('LIBLAPACK_MT'), + 'CC': os.getenv('MPICC'), + 'CFLAGS': os.getenv('CFLAGS'), + 'CXX': os.getenv('MPICXX'), + 'F77': os.getenv('MPIF77'), + 'F77FLAGS': os.getenv('F77FLAGS'), + 'BLAS': os.getenv('LIBBLAS_MT'), + 'LAPACK': os.getenv('LIBLAPACK_MT'), } if parmetis: cfgvars.update({ - 'METIS_PATH':parmetis, - 'METIS':"%(p)s/lib/libparmetis.a %(p)s/lib/metis.a" % {'p':parmetis} + 'METIS_PATH': parmetis, + 'METIS': "%(p)s/lib/libparmetis.a %(p)s/lib/metis.a" % {'p':parmetis} }) # patch file @@ -103,7 +105,7 @@ def make_install(self): except: self.log.exception("Copying src %s to dst %s failed" % (src, dst)) - # Some extra symlinks are necessary for UMFPACK to work. + # some extra symlinks are necessary for UMFPACK to work. for p in ['AMD/include/amd.h', 'AMD/include/amd_internal.h', 'UFconfig/UFconfig.h', 'AMD/lib/libamd.a']: src = os.path.join(self.installdir, p) @@ -119,21 +121,21 @@ def make_install(self): def make_module_req_guess(self): """Add UFconfig dir to CPATH so UFconfig include file is found.""" - guesses = Application.make_module_req_guess(self) guesses.update({'CPATH': ["UFconfig"]}) return guesses def sanitycheck(self): - + """Custom sanity check for SuiteSparse.""" if not self.getcfg('sanityCheckPaths'): - self.setcfg('sanityCheckPaths', {'files':["%s/lib/lib%s.a" % (x, x.lower()) for x in ["AMD", "BTF", "CAMD", "CCOLAMD", "CHOLMOD", + self.setcfg('sanityCheckPaths', { + 'files':["%s/lib/lib%s.a" % (x, x.lower()) for x in ["AMD", "BTF", "CAMD", "CCOLAMD", "CHOLMOD", "COLAMD", "CXSparse", "KLU", "LDL", "RBio", "SPQR", "UMFPACK"]] + ["CSparse3/lib/libcsparse.a"], - 'dirs':["MATLAB_Tools"] - }) + 'dirs':["MATLAB_Tools"] + }) self.log.info("Customized sanity check paths: %s" % self.getcfg('sanityCheckPaths')) diff --git a/easybuild/easyconfigs/s/SuiteSparse/SuiteSparse-3.7.0-gimkl-0.5.3-withparmetis.eb b/easybuild/easyconfigs/s/SuiteSparse/SuiteSparse-3.7.0-gimkl-0.5.3-withparmetis.eb deleted file mode 100644 index 58b3980338..0000000000 --- a/easybuild/easyconfigs/s/SuiteSparse/SuiteSparse-3.7.0-gimkl-0.5.3-withparmetis.eb +++ /dev/null @@ -1,14 +0,0 @@ -name='SuiteSparse' -version='3.7.0' -versionsuffix='-withparmetis' - -homepage='http://www.cise.ufl.edu/research/sparse/SuiteSparse/' -description="SuiteSparse is a collection of libraries manipulate sparse matrices." - -toolkit={'name':'gimkl','version':'0.5.3'} -toolkitopts={'opt':True, 'unroll':True, 'pic':True, 'intel-static':True} - -sources=['%s-%s.tar.gz'%(name,version)] -sourceURLs = ['http://www.cise.ufl.edu/research/sparse/SuiteSparse'] - -dependencies=[('ParMETIS','4.0.2')] diff --git a/easybuild/easyconfigs/s/SuiteSparse/SuiteSparse-3.7.0-goalf-1.1.0-no-OFED-withparmetis.eb b/easybuild/easyconfigs/s/SuiteSparse/SuiteSparse-3.7.0-goalf-1.1.0-no-OFED-withparmetis.eb index b6158f92ca..63d6d94c75 100644 --- a/easybuild/easyconfigs/s/SuiteSparse/SuiteSparse-3.7.0-goalf-1.1.0-no-OFED-withparmetis.eb +++ b/easybuild/easyconfigs/s/SuiteSparse/SuiteSparse-3.7.0-goalf-1.1.0-no-OFED-withparmetis.eb @@ -1,14 +1,14 @@ -name='SuiteSparse' -version='3.7.0' -versionsuffix='-withparmetis' +name = 'SuiteSparse' +version = '3.7.0' +versionsuffix = '-withparmetis' -homepage='http://www.cise.ufl.edu/research/sparse/SuiteSparse/' -description="SuiteSparse is a collection of libraries manipulate sparse matrices." +homepage = 'http://www.cise.ufl.edu/research/sparse/SuiteSparse/' +description = """SuiteSparse is a collection of libraries manipulate sparse matrices.""" -toolkit={'name':'goalf','version':'1.1.0-no-OFED'} -toolkitopts={'opt':True, 'unroll':True, 'pic':True, 'intel-static':True} +toolkit = {'name': 'goalf', 'version': '1.1.0-no-OFED'} +toolkitopts = {'opt': True, 'unroll': True, 'pic': True, 'intel-static': True} -sources=['%s-%s.tar.gz'%(name,version)] -sourceURLs = ['http://www.cise.ufl.edu/research/sparse/SuiteSparse'] +sourceURLs = ['http://www.cise.ufl.edu/research/sparse/SuiteSparse/'] +sources = ['%s-%s.tar.gz'%(name,version)] -dependencies=[('ParMETIS','4.0.2')] +dependencies = [('ParMETIS','4.0.2')] diff --git a/easybuild/easyconfigs/s/SuiteSparse/SuiteSparse-3.7.0-ictce-4.0.6-withparmetis.eb b/easybuild/easyconfigs/s/SuiteSparse/SuiteSparse-3.7.0-ictce-4.0.6-withparmetis.eb index b6158f92ca..79f4014420 100644 --- a/easybuild/easyconfigs/s/SuiteSparse/SuiteSparse-3.7.0-ictce-4.0.6-withparmetis.eb +++ b/easybuild/easyconfigs/s/SuiteSparse/SuiteSparse-3.7.0-ictce-4.0.6-withparmetis.eb @@ -1,14 +1,14 @@ -name='SuiteSparse' -version='3.7.0' -versionsuffix='-withparmetis' +name = 'SuiteSparse' +version = '3.7.0' +versionsuffix = '-withparmetis' -homepage='http://www.cise.ufl.edu/research/sparse/SuiteSparse/' -description="SuiteSparse is a collection of libraries manipulate sparse matrices." +homepage = 'http://www.cise.ufl.edu/research/sparse/SuiteSparse/' +description = """SuiteSparse is a collection of libraries manipulate sparse matrices.""" -toolkit={'name':'goalf','version':'1.1.0-no-OFED'} -toolkitopts={'opt':True, 'unroll':True, 'pic':True, 'intel-static':True} +toolkit = {'name': 'ictce', 'version': '4.0.6'} +toolkitopts = {'opt': True, 'unroll': True, 'pic': True, 'intel-static': True} -sources=['%s-%s.tar.gz'%(name,version)] -sourceURLs = ['http://www.cise.ufl.edu/research/sparse/SuiteSparse'] +sourceURLs = ['http://www.cise.ufl.edu/research/sparse/SuiteSparse/'] +sources = ['%s-%s.tar.gz'%(name,version)] -dependencies=[('ParMETIS','4.0.2')] +dependencies = [('ParMETIS','4.0.2')] From bdcb32ed970c49d5f7f259c2cc0528e2e2a5fcdb Mon Sep 17 00:00:00 2001 From: Kenneth Hoste Date: Mon, 13 Aug 2012 15:17:06 +0200 Subject: [PATCH 626/798] style cleanup for SWIG --- easybuild/easyblocks/s/swig.py | 3 ++ .../SWIG-2.0.4-gimkl-0.5.3-Python-2.7.3.eb | 20 ------------- ...-2.0.4-goalf-1.1.0-no-OFED-Python-2.7.3.eb | 29 ++++++++++--------- .../SWIG-2.0.4-ictce-4.0.6-Python-2.7.3.eb | 29 ++++++++++--------- 4 files changed, 33 insertions(+), 48 deletions(-) delete mode 100644 easybuild/easyconfigs/s/SWIG/SWIG-2.0.4-gimkl-0.5.3-Python-2.7.3.eb diff --git a/easybuild/easyblocks/s/swig.py b/easybuild/easyblocks/s/swig.py index 8781795285..861c1a9143 100644 --- a/easybuild/easyblocks/s/swig.py +++ b/easybuild/easyblocks/s/swig.py @@ -17,6 +17,9 @@ # You should have received a copy of the GNU General Public License # along with EasyBuild. If not, see . ## +""" +EasyBuild support for SWIG, implemented as an easyblock +""" from easybuild.framework.application import Application from easybuild.tools.modules import get_software_root diff --git a/easybuild/easyconfigs/s/SWIG/SWIG-2.0.4-gimkl-0.5.3-Python-2.7.3.eb b/easybuild/easyconfigs/s/SWIG/SWIG-2.0.4-gimkl-0.5.3-Python-2.7.3.eb deleted file mode 100644 index 23f12c4121..0000000000 --- a/easybuild/easyconfigs/s/SWIG/SWIG-2.0.4-gimkl-0.5.3-Python-2.7.3.eb +++ /dev/null @@ -1,20 +0,0 @@ -name='SWIG' -version='2.0.4' - -homepage='http://www.swig.org/' -description="""SWIG is a software development tool that connects programs written in C and C++ with -a variety of high-level programming languages.""" - -toolkit={'name':'gimkl','version':'0.5.3'} -toolkitopts={'pic':True,'opt':True,'optarch':True} - -sources=['%s-%s.tar.gz'%(name.lower(),version)] -sourceURLs = ['http://prdownloads.sourceforge.net/swig'] - -pythonversion='2.7.3' -versionsuffix='-Python-%s'%pythonversion - -dependencies=[ - ('Python', pythonversion), - ('PCRE','8.12'), - ] diff --git a/easybuild/easyconfigs/s/SWIG/SWIG-2.0.4-goalf-1.1.0-no-OFED-Python-2.7.3.eb b/easybuild/easyconfigs/s/SWIG/SWIG-2.0.4-goalf-1.1.0-no-OFED-Python-2.7.3.eb index a7acde2db3..3748e25fa6 100644 --- a/easybuild/easyconfigs/s/SWIG/SWIG-2.0.4-goalf-1.1.0-no-OFED-Python-2.7.3.eb +++ b/easybuild/easyconfigs/s/SWIG/SWIG-2.0.4-goalf-1.1.0-no-OFED-Python-2.7.3.eb @@ -1,20 +1,21 @@ -name='SWIG' -version='2.0.4' +name = 'SWIG' +version = '2.0.4' -homepage='http://www.swig.org/' -description="""SWIG is a software development tool that connects programs written in C and C++ with +homepage = 'http://www.swig.org/' +description = """SWIG is a software development tool that connects programs written in C and C++ with a variety of high-level programming languages.""" -toolkit={'name':'goalf','version':'1.1.0-no-OFED'} -toolkitopts={'pic':True,'opt':True,'optarch':True} +toolkit = {'name': 'goalf', 'version': '1.1.0-no-OFED'} +toolkitopts = {'pic': True, 'opt': True, 'optarch': True} -sources=['%s-%s.tar.gz'%(name.lower(),version)] -sourceURLs = ['http://prdownloads.sourceforge.net/swig'] +sourceURLs = ['http://prdownloads.sourceforge.net/swig/'] +sources = ['%s-%s.tar.gz'%(name.lower(),version)] -pythonversion='2.7.3' -versionsuffix='-Python-%s'%pythonversion +python = "Python" +pythonversion = '2.7.3' +versionsuffix = '-%s-%s' % (python, pythonversion) -dependencies=[ - ('Python', pythonversion), - ('PCRE','8.12'), - ] +dependencies = [ + (python, pythonversion), + ('PCRE','8.12'), + ] diff --git a/easybuild/easyconfigs/s/SWIG/SWIG-2.0.4-ictce-4.0.6-Python-2.7.3.eb b/easybuild/easyconfigs/s/SWIG/SWIG-2.0.4-ictce-4.0.6-Python-2.7.3.eb index c946caa27c..e8c50eba7c 100644 --- a/easybuild/easyconfigs/s/SWIG/SWIG-2.0.4-ictce-4.0.6-Python-2.7.3.eb +++ b/easybuild/easyconfigs/s/SWIG/SWIG-2.0.4-ictce-4.0.6-Python-2.7.3.eb @@ -1,20 +1,21 @@ -name='SWIG' -version='2.0.4' +name = 'SWIG' +version = '2.0.4' -homepage='http://www.swig.org/' -description="""SWIG is a software development tool that connects programs written in C and C++ with +homepage = 'http://www.swig.org/' +description = """SWIG is a software development tool that connects programs written in C and C++ with a variety of high-level programming languages.""" -toolkit={'name':'ictce','version':'4.0.6'} -toolkitopts={'pic':True,'opt':True,'optarch':True} +toolkit = {'name': 'ictce', 'version': '4.0.6'} +toolkitopts = {'pic': True, 'opt': True, 'optarch': True} -sources=['%s-%s.tar.gz'%(name.lower(),version)] -sourceURLs = ['http://prdownloads.sourceforge.net/swig'] +sourceURLs = ['http://prdownloads.sourceforge.net/swig/'] +sources = ['%s-%s.tar.gz'%(name.lower(),version)] -pythonversion='2.7.3' -versionsuffix='-Python-%s'%pythonversion +python = "Python" +pythonversion = '2.7.3' +versionsuffix = '-%s-%s' % (python, pythonversion) -dependencies=[ - ('Python', pythonversion), - ('PCRE','8.12'), - ] +dependencies = [ + (python, pythonversion), + ('PCRE','8.12'), + ] From 3e2812cf9531fd98f9031a264f59fca3315ebda7 Mon Sep 17 00:00:00 2001 From: Kenneth Hoste Date: Mon, 13 Aug 2012 15:21:10 +0200 Subject: [PATCH 627/798] style cleanup for UFC --- easybuild/easyblocks/u/ufc.py | 11 +++++--- .../UFC/UFC-2.0.5-gimkl-0.5.3-Python-2.7.3.eb | 25 ----------------- ...-2.0.5-goalf-1.1.0-no-OFED-Python-2.7.3.eb | 27 ++++++++++--------- .../UFC/UFC-2.0.5-ictce-4.0.6-Python-2.7.3.eb | 27 ++++++++++--------- 4 files changed, 35 insertions(+), 55 deletions(-) delete mode 100644 easybuild/easyconfigs/u/UFC/UFC-2.0.5-gimkl-0.5.3-Python-2.7.3.eb diff --git a/easybuild/easyblocks/u/ufc.py b/easybuild/easyblocks/u/ufc.py index e19fb59b25..15b2fcd08d 100644 --- a/easybuild/easyblocks/u/ufc.py +++ b/easybuild/easyblocks/u/ufc.py @@ -17,7 +17,9 @@ # You should have received a copy of the GNU General Public License # along with EasyBuild. If not, see . ## -import os +""" +EasyBuild support for UFC, implemented as an easyblock +""" from distutils.version import LooseVersion from easybuild.easyblocks.c.cmakepythonpackage import CMakePythonPackage @@ -36,12 +38,12 @@ def configure(self): for dep in deps: deproot = get_software_root(dep) if not deproot: - self.log.error("Dependency %s not available." % dep) + self.log.error("%s module not loaded?" % dep) else: depsdict.update({dep:deproot}) # SWIG version more recent than 2.0.4 have a regression - # which causes problems with DOLFIN if UFC was built with it + # which causes problems with e.g. DOLFIN if UFC was built with it # fixed in 2.0.7? see https://bugs.launchpad.net/dolfin/+bug/996398 if LooseVersion(get_software_version('SWIG')) > '2.0.4': self.log.error("Using bad version of SWIG, expecting swig <= 2.0.4." \ @@ -53,7 +55,8 @@ def configure(self): self.updatecfg('configopts', "-DBOOST_INCLUDEDIR=%s/include" % depsdict['Boost']) self.updatecfg('configopts', "-DBoost_DEBUG=ON -DBOOST_ROOT=%s" % depsdict['Boost']) - self.updatecfg('configopts', '-DUFC_ENABLE_PYTHON:BOOL=ON -DSWIG_FOUND:BOOL=ON') + self.updatecfg('configopts', '-DUFC_ENABLE_PYTHON:BOOL=ON') + self.updatecfg('configopts', '-DSWIG_FOUND:BOOL=ON') self.updatecfg('configopts', '-DPYTHON_LIBRARY=%s/lib/libpython%s.so' % (depsdict['Python'], self.pyver)) self.updatecfg('configopts', '-DPYTHON_INCLUDE_PATH=%s/include/python%s' % (depsdict['Python'], diff --git a/easybuild/easyconfigs/u/UFC/UFC-2.0.5-gimkl-0.5.3-Python-2.7.3.eb b/easybuild/easyconfigs/u/UFC/UFC-2.0.5-gimkl-0.5.3-Python-2.7.3.eb deleted file mode 100644 index f861225d2e..0000000000 --- a/easybuild/easyconfigs/u/UFC/UFC-2.0.5-gimkl-0.5.3-Python-2.7.3.eb +++ /dev/null @@ -1,25 +0,0 @@ -name='UFC' -version='2.0.5' - -homepage='https://launchpad.net/ufc' -description="""UFC (Unified Form-assembly Code) is a unified framework for finite element assembly. -More precisely, it defines a fixed interface for communicating low level routines (functions) for -evaluating and assembling finite element variational forms.""" - -toolkit={'name':'gimkl','version':'0.5.3'} - -sources=['%s-%s.tar.gz'%(name.lower(),version)] -majorversion = "%s.x" % ".".join(version.split('.')[:-1]) -sourceURLs=['https://launchpad.net/ufc/%s/%s/+download/' % (majorversion, version) ] - -pythonversion = '2.7.3' -versionsuffix = "-Python-%s" % pythonversion - -dependencies=[ - ('Python',pythonversion), - ('Boost','1.49.0',versionsuffix), - ('Instant','1.0.0', versionsuffix), - ('SWIG','2.0.4',versionsuffix), - ] - -builddependencies = [('CMake','2.8.4')] diff --git a/easybuild/easyconfigs/u/UFC/UFC-2.0.5-goalf-1.1.0-no-OFED-Python-2.7.3.eb b/easybuild/easyconfigs/u/UFC/UFC-2.0.5-goalf-1.1.0-no-OFED-Python-2.7.3.eb index a48c0cf2c0..8bd26fce63 100644 --- a/easybuild/easyconfigs/u/UFC/UFC-2.0.5-goalf-1.1.0-no-OFED-Python-2.7.3.eb +++ b/easybuild/easyconfigs/u/UFC/UFC-2.0.5-goalf-1.1.0-no-OFED-Python-2.7.3.eb @@ -1,25 +1,26 @@ -name='UFC' -version='2.0.5' +name = 'UFC' +version = '2.0.5' -homepage='https://launchpad.net/ufc' -description="""UFC (Unified Form-assembly Code) is a unified framework for finite element assembly. +homepage = 'https://launchpad.net/ufc' +description = """UFC (Unified Form-assembly Code) is a unified framework for finite element assembly. More precisely, it defines a fixed interface for communicating low level routines (functions) for evaluating and assembling finite element variational forms.""" -toolkit={'name':'goalf','version':'1.1.0-no-OFED'} +toolkit = {'name': 'goalf', 'version': '1.1.0-no-OFED'} -sources=['%s-%s.tar.gz'%(name.lower(),version)] majorversion = "%s.x" % ".".join(version.split('.')[:-1]) -sourceURLs=['https://launchpad.net/ufc/%s/%s/+download/' % (majorversion, version) ] +sourceURLs = ['https://launchpad.net/ufc/%s/%s/+download/' % (majorversion, version)] +sources = ['%s-%s.tar.gz' % (name.lower(), version)] +python = "Python" pythonversion = '2.7.3' -versionsuffix = "-Python-%s" % pythonversion +versionsuffix = "-%s-%s" % (python, pythonversion) dependencies=[ - ('Python',pythonversion), - ('Boost','1.49.0',versionsuffix), - ('Instant','1.0.0', versionsuffix), - ('SWIG','2.0.4',versionsuffix), + (python, pythonversion), + ('Boost', '1.49.0', versionsuffix), + ('Instant', '1.0.0', versionsuffix), + ('SWIG', '2.0.4', versionsuffix), ] -builddependencies = [('CMake','2.8.4')] +builddependencies = [('CMake', '2.8.4')] diff --git a/easybuild/easyconfigs/u/UFC/UFC-2.0.5-ictce-4.0.6-Python-2.7.3.eb b/easybuild/easyconfigs/u/UFC/UFC-2.0.5-ictce-4.0.6-Python-2.7.3.eb index f0a14ff34c..4a404aaae5 100644 --- a/easybuild/easyconfigs/u/UFC/UFC-2.0.5-ictce-4.0.6-Python-2.7.3.eb +++ b/easybuild/easyconfigs/u/UFC/UFC-2.0.5-ictce-4.0.6-Python-2.7.3.eb @@ -1,25 +1,26 @@ -name='UFC' -version='2.0.5' +name = 'UFC' +version = '2.0.5' -homepage='https://launchpad.net/ufc' -description="""UFC (Unified Form-assembly Code) is a unified framework for finite element assembly. +homepage = 'https://launchpad.net/ufc' +description = """UFC (Unified Form-assembly Code) is a unified framework for finite element assembly. More precisely, it defines a fixed interface for communicating low level routines (functions) for evaluating and assembling finite element variational forms.""" -toolkit={'name':'ictce','version':'4.0.6'} +toolkit = {'name': 'ictce', 'version': '4.0.6'} -sources=['%s-%s.tar.gz'%(name.lower(),version)] majorversion = "%s.x" % ".".join(version.split('.')[:-1]) -sourceURLs=['https://launchpad.net/ufc/%s/%s/+download/' % (majorversion, version) ] +sourceURLs = ['https://launchpad.net/ufc/%s/%s/+download/' % (majorversion, version)] +sources = ['%s-%s.tar.gz' % (name.lower(), version)] +python = "Python" pythonversion = '2.7.3' -versionsuffix = "-Python-%s" % pythonversion +versionsuffix = "-%s-%s" % (python, pythonversion) dependencies=[ - ('Python',pythonversion), - ('Boost','1.49.0',versionsuffix), - ('Instant','1.0.0', versionsuffix), - ('SWIG','2.0.4',versionsuffix), + (python, pythonversion), + ('Boost', '1.49.0', versionsuffix), + ('Instant', '1.0.0', versionsuffix), + ('SWIG', '2.0.4', versionsuffix), ] -builddependencies = [('CMake','2.8.4')] +builddependencies = [('CMake', '2.8.4')] From b25200e156105ce2f3db7cf2e2603e2bd5720b9a Mon Sep 17 00:00:00 2001 From: Toon Willems Date: Mon, 13 Aug 2012 15:22:21 +0200 Subject: [PATCH 628/798] add support for specifying the number of processors and walltime --- easybuild/tools/pbs_job.py | 23 ++++++++++++++++------- 1 file changed, 16 insertions(+), 7 deletions(-) diff --git a/easybuild/tools/pbs_job.py b/easybuild/tools/pbs_job.py index 7e960e8dc6..3d7fdeece6 100644 --- a/easybuild/tools/pbs_job.py +++ b/easybuild/tools/pbs_job.py @@ -30,9 +30,11 @@ class PbsJob: """Interaction with TORQUE""" - def __init__(self, script, name, env_vars=None): + def __init__(self, script, name, env_vars=None, resources={}): """ create a new Job to be submitted to PBS + env_vars is a dictionary with key-value pairs of environment variables that should be passed on to the job + resources is a dictionary with optional keys: ['hours', 'procs'] """ self.log = getLog("PBS") self.script = script @@ -56,6 +58,15 @@ def __init__(self, script, name, env_vars=None): except: self.log.error("Could not connect to the default pbs server, is this correctly configured?") + hours = resources.get('hours', 72) + self.resources = { + "walltime": "%s:00:00" % hours, + "nodes": "1:ppn=%s" % resources.get('procs', self.get_ppn()) + } + if hours >= 12: + self.queue = 'long' + else: + self.queue = 'short' self.jobid = None self.deps = [] @@ -75,7 +86,6 @@ def submit(self): txt = self.script self.log.debug("Going to submit script %s" % txt) - resources = {"walltime": "72:00:00", "nodes": "1:ppn=%s" % self.get_ppn() } # Build default pbs_attributes list pbs_attributes = pbs.new_attropl(1) @@ -84,9 +94,9 @@ def submit(self): # set resource requirements - resourse_attributes = pbs.new_attropl(len(resources)) + resourse_attributes = pbs.new_attropl(len(self.resources)) idx = 0 - for k, v in resources.items(): + for k, v in self.resources.items(): resourse_attributes[idx].name = 'Resource_List' resourse_attributes[idx].resource = k resourse_attributes[idx].value = v @@ -121,12 +131,11 @@ def submit(self): f.write(txt) f.close() - queue = 'long' - self.log.debug("Going to submit to queue %s" % queue) + self.log.debug("Going to submit to queue %s" % self.queue) # extend paramater should be 'NULL' because this is required by the python api extend = 'NULL' - jobid = pbs.pbs_submit(self.pbsconn, pbs_attributes, scriptfn, queue, extend) + jobid = pbs.pbs_submit(self.pbsconn, pbs_attributes, scriptfn, self.queue, extend) is_error, errormsg = pbs.error() if is_error: From 0830984df869b7e1b2491998f91cd418a5cb6fbe Mon Sep 17 00:00:00 2001 From: Kenneth Hoste Date: Mon, 13 Aug 2012 15:24:19 +0200 Subject: [PATCH 629/798] style cleanup for Python --- easybuild/easyblocks/p/python.py | 8 ++- .../p/Python/Python-2.7.3-gimkl-0.5.3.eb | 29 ---------- .../Python-2.7.3-goalf-1.1.0-no-OFED.eb | 46 +++++++-------- .../p/Python/Python-2.7.3-ictce-4.0.6.eb | 47 +++++++-------- .../Python-3.2.3-goalf-1.1.0-no-OFED.eb | 54 +++++++++-------- .../p/Python/Python-3.2.3-ictce-4.0.6.eb | 58 +++++++++---------- 6 files changed, 104 insertions(+), 138 deletions(-) delete mode 100644 easybuild/easyconfigs/p/Python/Python-2.7.3-gimkl-0.5.3.eb diff --git a/easybuild/easyblocks/p/python.py b/easybuild/easyblocks/p/python.py index e25d7f4c13..f99a33b003 100644 --- a/easybuild/easyblocks/p/python.py +++ b/easybuild/easyblocks/p/python.py @@ -23,7 +23,7 @@ # along with EasyBuild. If not, see . ## """ -EasyBuild support for building and installing Python, implemented as an easyblock +EasyBuild support for Python, implemented as an easyblock """ import os @@ -57,6 +57,12 @@ def extra_packages_pre(self): self.setcfg('pkgdefaultclass', (__name__, "DefaultPythonPackage")) self.setcfg('pkgfilter', ('python -c "import %(name)s"', "")) + def configure(self): + """Set extra configure options.""" + self.updatecfg('configopts', "--with-threads --enable-shared") + + Application.configure(self) + def make_install(self): """Extend make install to make sure that the 'python' command is present.""" Application.make_install(self) diff --git a/easybuild/easyconfigs/p/Python/Python-2.7.3-gimkl-0.5.3.eb b/easybuild/easyconfigs/p/Python/Python-2.7.3-gimkl-0.5.3.eb deleted file mode 100644 index ee2e7d58ed..0000000000 --- a/easybuild/easyconfigs/p/Python/Python-2.7.3-gimkl-0.5.3.eb +++ /dev/null @@ -1,29 +0,0 @@ -name='Python' -version='2.7.3' - -homepage='http://python.org/' -description="Python is a programming language that lets you work more quickly and integrate your systems more effectively." - -toolkit={'name':'gimkl','version':'0.5.3'} -toolkitopts={'pic':True,'opt':True,'optarch':True} - -numpyversion = '1.6.1' -scipyversion = '0.10.1' - -# order is important! -pkglist=[ - ('nose','1.1.2'), # used extends unit testing - ('numpy',numpyversion), - ('scipy',scipyversion), -] - -sources=['%s-%s.tgz'%(name,version)] -sourceURLs=[ - 'http://www.python.org/ftp/%s/%s/' % (name.lower(),version), # Python - 'http://pypi.python.org/packages/source/n/nose/', # nose - ('http://sourceforge.net/projects/numpy/files/NumPy/%s' % numpyversion, 'download'), # numpy - ('http://sourceforge.net/projects/scipy/files/scipy/%s' % scipyversion, 'download'), # scipy - -] - -configopts="--with-threads --enable-shared" diff --git a/easybuild/easyconfigs/p/Python/Python-2.7.3-goalf-1.1.0-no-OFED.eb b/easybuild/easyconfigs/p/Python/Python-2.7.3-goalf-1.1.0-no-OFED.eb index 711090fd87..3ab2050857 100644 --- a/easybuild/easyconfigs/p/Python/Python-2.7.3-goalf-1.1.0-no-OFED.eb +++ b/easybuild/easyconfigs/p/Python/Python-2.7.3-goalf-1.1.0-no-OFED.eb @@ -1,34 +1,30 @@ -name='Python' -version='2.7.3' +name = 'Python' +version = '2.7.3' -homepage='http://python.org/' -description="Python is a programming language that lets you work more quickly and integrate your systems more effectively." +homepage = 'http://python.org/' +description = "Python is a programming language that lets you work more quickly and integrate your systems more effectively." -toolkit={'name':'goalf','version':'1.1.0-no-OFED'} -toolkitopts={'pic':True,'opt':True,'optarch':True} +toolkit = {'name': 'goalf', 'version': '1.1.0-no-OFED'} +toolkitopts = {'pic': True, 'opt': True, 'optarch': True} numpyversion = '1.6.1' scipyversion = '0.10.1' -# order is important! -pkglist=[ - ('nose','1.1.2'), # used extends unit testing - ('numpy',numpyversion), - ('scipy',scipyversion), -] - -sources=['%s-%s.tgz'%(name,version)] -sourceURLs=[ - 'http://www.python.org/ftp/%s/%s/' % (name.lower(),version), # Python - 'http://pypi.python.org/packages/source/n/nose/', # nose - ('http://sourceforge.net/projects/numpy/files/NumPy/%s' % numpyversion, 'download'), # numpy - ('http://sourceforge.net/projects/scipy/files/scipy/%s' % scipyversion, 'download'), # scipy - -] +sourceURLs = [ + 'http://www.python.org/ftp/%s/%s/' % (name.lower(),version), # Python + 'http://pypi.python.org/packages/source/n/nose/', # nose + ('http://sourceforge.net/projects/numpy/files/NumPy/%s' % numpyversion, 'download'), # numpy + ('http://sourceforge.net/projects/scipy/files/scipy/%s' % scipyversion, 'download'), # scipy + ] +sources = ['%s-%s.tgz' % (name, version)] -patches=['python_libffi_int128_icc.patch'] +patches = ['python_libffi_int128_icc.patch'] -pkgpatches=[('numpy', ['numpy-1.6.1_distutils_multiple-lib-dirs.patch'])] +dependencies = [('zlib', '1.2.7')] - -configopts="--with-threads --enable-shared" +# order is important! +pkglist = [ + ('nose', '1.1.2'), # used extends unit testing + ('numpy', numpyversion), + ('scipy', scipyversion) + ] diff --git a/easybuild/easyconfigs/p/Python/Python-2.7.3-ictce-4.0.6.eb b/easybuild/easyconfigs/p/Python/Python-2.7.3-ictce-4.0.6.eb index 223817a16a..42bd4dd45f 100644 --- a/easybuild/easyconfigs/p/Python/Python-2.7.3-ictce-4.0.6.eb +++ b/easybuild/easyconfigs/p/Python/Python-2.7.3-ictce-4.0.6.eb @@ -1,35 +1,32 @@ -name='Python' -version='2.7.3' +name = 'Python' +version = '2.7.3' -homepage='http://python.org/' -description="Python is a programming language that lets you work more quickly and integrate your systems more effectively." +homepage = 'http://python.org/' +description = "Python is a programming language that lets you work more quickly and integrate your systems more effectively." -toolkit={'name':'ictce','version':'4.0.6'} -toolkitopts={'pic':True,'opt':True,'optarch':True} +toolkit = {'name': 'ictce', 'version': '4.0.6'} +toolkitopts = {'pic': True, 'opt': True, 'optarch': True} numpyversion = '1.6.1' scipyversion = '0.10.1' -# order is important! -pkglist=[ - ('nose','1.1.2'), # used extends unit testing - ('numpy',numpyversion), - ('scipy',scipyversion), -] - -sources=['%s-%s.tgz'%(name,version)] -sourceURLs=[ - 'http://www.python.org/ftp/%s/%s/' % (name.lower(),version), # Python - 'http://pypi.python.org/packages/source/n/nose/', # nose - ('http://sourceforge.net/projects/numpy/files/NumPy/%s' % numpyversion, 'download'), # numpy - ('http://sourceforge.net/projects/scipy/files/scipy/%s' % scipyversion, 'download'), # scipy +sourceURLs = [ + 'http://www.python.org/ftp/%s/%s/' % (name.lower(),version), # Python + 'http://pypi.python.org/packages/source/n/nose/', # nose + ('http://sourceforge.net/projects/numpy/files/NumPy/%s' % numpyversion, 'download'), # numpy + ('http://sourceforge.net/projects/scipy/files/scipy/%s' % scipyversion, 'download'), # scipy + ] +sources = ['%s-%s.tgz' % (name, version)] -] +patches = ['python_libffi_int128_icc.patch'] -configopts="--with-threads --enable-shared" +dependencies = [('zlib', '1.2.7')] -patches=['python_libffi_int128_icc.patch'] - -pkgpatches=[('numpy', ['numpy-1.6.1_distutils_multiple-lib-dirs.patch'])] +# order is important! +pkglist = [ + ('nose', '1.1.2'), # used extends unit testing + ('numpy', numpyversion), + ('scipy', scipyversion) + ] -moduleclass='base' +pkgpatches = [('numpy', ['numpy-1.6.1_distutils_multiple-lib-dirs.patch'])] diff --git a/easybuild/easyconfigs/p/Python/Python-3.2.3-goalf-1.1.0-no-OFED.eb b/easybuild/easyconfigs/p/Python/Python-3.2.3-goalf-1.1.0-no-OFED.eb index f362ab6980..a5ebe1d51e 100644 --- a/easybuild/easyconfigs/p/Python/Python-3.2.3-goalf-1.1.0-no-OFED.eb +++ b/easybuild/easyconfigs/p/Python/Python-3.2.3-goalf-1.1.0-no-OFED.eb @@ -1,38 +1,36 @@ -name='Python' -version='3.2.3' +name = 'Python' +version = '3.2.3' -homepage='http://python.org/' -description="Python is a programming language that lets you work more quickly and integrate your systems more effectively." +homepage = 'http://python.org/' +description = "Python is a programming language that lets you work more quickly and integrate your systems more effectively." -toolkit={'name':'goalf','version':'1.1.0-no-OFED'} -toolkitopts={'pic':True,'opt':True,'optarch':True} +toolkit = {'name': 'goalf', 'version': '1.1.0-no-OFED'} +toolkitopts = {'pic': True, 'opt': True, 'optarch': True} numpyversion = '1.6.1' scipyversion = '0.10.1' -# order is important! -pkglist=[ - ('distribute','0.6.26'), - ('pip','1.1'), - ('nose','1.1.2'), # used extends unit testing - ('numpy',numpyversion), - ('scipy',scipyversion), - ('mpi4py','1.3') -] - -pkgmodulenames = {'distribute': 'setuptools'} - sources=['%s-%s.tgz'%(name,version)] sourceURLs=[ - 'http://www.python.org/ftp/%s/%s/' % (name.lower(),version), # Python - 'http://pypi.python.org/packages/source/d/distribute', # distribute - 'http://pypi.python.org/packages/source/p/pip/', # pip - 'http://pypi.python.org/packages/source/n/nose/', # nose - ('http://sourceforge.net/projects/numpy/files/NumPy/%s' % numpyversion, 'download'), # numpy - ('http://sourceforge.net/projects/scipy/files/scipy/%s' % scipyversion, 'download'), # scipy - 'http://mpi4py.googlecode.com/files', # mpi4py -] + 'http://www.python.org/ftp/%s/%s/' % (name.lower(),version), # Python + 'http://pypi.python.org/packages/source/d/distribute', # distribute + 'http://pypi.python.org/packages/source/p/pip/', # pip + 'http://pypi.python.org/packages/source/n/nose/', # nose + ('http://sourceforge.net/projects/numpy/files/NumPy/%s' % numpyversion, 'download'), # numpy + ('http://sourceforge.net/projects/scipy/files/scipy/%s' % scipyversion, 'download'), # scipy + 'http://mpi4py.googlecode.com/files', # mpi4py + ] -configopts="--with-threads --enable-shared" +dependencies = [('zlib', '1.2.7')] -osdependencies=['zlib-devel'] +# order is important! +pkglist = [ + ('distribute','0.6.26'), + ('pip','1.1'), + ('nose','1.1.2'), # used extends unit testing + ('numpy',numpyversion), + ('scipy',scipyversion), + ('mpi4py','1.3') + ] + +pkgmodulenames = {'distribute': 'setuptools'} diff --git a/easybuild/easyconfigs/p/Python/Python-3.2.3-ictce-4.0.6.eb b/easybuild/easyconfigs/p/Python/Python-3.2.3-ictce-4.0.6.eb index d5cd64af95..7396bb9882 100644 --- a/easybuild/easyconfigs/p/Python/Python-3.2.3-ictce-4.0.6.eb +++ b/easybuild/easyconfigs/p/Python/Python-3.2.3-ictce-4.0.6.eb @@ -1,42 +1,40 @@ -name='Python' -version='3.2.3' +name = 'Python' +version = '3.2.3' -homepage='http://python.org/' -description="Python is a programming language that lets you work more quickly and integrate your systems more effectively." +homepage = 'http://python.org/' +description = "Python is a programming language that lets you work more quickly and integrate your systems more effectively." -toolkit={'name':'ictce','version':'4.0.6'} -toolkitopts={'pic':True,'opt':True,'optarch':True} +toolkit = {'name': 'ictce', 'version': '4.0.6'} +toolkitopts = {'pic': True, 'opt': True, 'optarch': True} numpyversion = '1.6.1' scipyversion = '0.10.1' -# order is important! -pkglist=[ - ('distribute','0.6.26'), - ('pip','1.1'), - ('nose','1.1.2'), # used extends unit testing - ('numpy',numpyversion), - ('scipy',scipyversion), - ('mpi4py','1.3') -] - -pkgmodulenames = {'distribute': 'setuptools'} - sources=['%s-%s.tgz'%(name,version)] sourceURLs=[ - 'http://www.python.org/ftp/%s/%s/' % (name.lower(),version), # Python - 'http://pypi.python.org/packages/source/d/distribute', # distribute - 'http://pypi.python.org/packages/source/p/pip/', # pip - 'http://pypi.python.org/packages/source/n/nose/', # nose - ('http://sourceforge.net/projects/numpy/files/NumPy/%s' % numpyversion, 'download'), # numpy - ('http://sourceforge.net/projects/scipy/files/scipy/%s' % scipyversion, 'download'), # scipy - 'http://mpi4py.googlecode.com/files', # mpi4py -] + 'http://www.python.org/ftp/%s/%s/' % (name.lower(),version), # Python + 'http://pypi.python.org/packages/source/d/distribute', # distribute + 'http://pypi.python.org/packages/source/p/pip/', # pip + 'http://pypi.python.org/packages/source/n/nose/', # nose + ('http://sourceforge.net/projects/numpy/files/NumPy/%s' % numpyversion, 'download'), # numpy + ('http://sourceforge.net/projects/scipy/files/scipy/%s' % scipyversion, 'download'), # scipy + 'http://mpi4py.googlecode.com/files', # mpi4py + ] -configopts="--with-threads --enable-shared" +patches = ['python_libffi_int128_icc.patch'] -patches=['python_libffi_int128_icc.patch'] +dependencies = [('zlib', '1.2.7')] -pkgpatches=[('numpy', ['numpy-1.6.1_distutils_multiple-lib-dirs.patch'])] +# order is important! +pkglist = [ + ('distribute','0.6.26'), + ('pip','1.1'), + ('nose','1.1.2'), # used extends unit testing + ('numpy',numpyversion), + ('scipy',scipyversion), + ('mpi4py','1.3') + ] + +pkgmodulenames = {'distribute': 'setuptools'} -moduleclass='base' +pkgpatches = [('numpy', ['numpy-1.6.1_distutils_multiple-lib-dirs.patch'])] From 61a9b20f7713e46f348479bb18e5525a048eefc6 Mon Sep 17 00:00:00 2001 From: Kenneth Hoste Date: Mon, 13 Aug 2012 15:25:27 +0200 Subject: [PATCH 630/798] add zlib dependency in Boost example easyconfigs --- .../b/Boost/Boost-1.49.0-goalf-1.1.0-no-OFED-Python-2.7.3.eb | 1 + .../easyconfigs/b/Boost/Boost-1.49.0-ictce-4.0.6-Python-2.7.3.eb | 1 + 2 files changed, 2 insertions(+) diff --git a/easybuild/easyconfigs/b/Boost/Boost-1.49.0-goalf-1.1.0-no-OFED-Python-2.7.3.eb b/easybuild/easyconfigs/b/Boost/Boost-1.49.0-goalf-1.1.0-no-OFED-Python-2.7.3.eb index 000a42cc0d..218800fd25 100644 --- a/easybuild/easyconfigs/b/Boost/Boost-1.49.0-goalf-1.1.0-no-OFED-Python-2.7.3.eb +++ b/easybuild/easyconfigs/b/Boost/Boost-1.49.0-goalf-1.1.0-no-OFED-Python-2.7.3.eb @@ -15,6 +15,7 @@ pythonversion = '2.7.3' versionsuffix = '-Python-%s'%pythonversion dependencies = [('bzip2', '1.0.6'), + ('zlib', '1.2.7'), ('Python', pythonversion)] # also build boost_mpi diff --git a/easybuild/easyconfigs/b/Boost/Boost-1.49.0-ictce-4.0.6-Python-2.7.3.eb b/easybuild/easyconfigs/b/Boost/Boost-1.49.0-ictce-4.0.6-Python-2.7.3.eb index f1612d3152..7394f8d749 100644 --- a/easybuild/easyconfigs/b/Boost/Boost-1.49.0-ictce-4.0.6-Python-2.7.3.eb +++ b/easybuild/easyconfigs/b/Boost/Boost-1.49.0-ictce-4.0.6-Python-2.7.3.eb @@ -17,6 +17,7 @@ pythonversion = '2.7.3' versionsuffix = '-Python-%s'%pythonversion dependencies = [('bzip2', '1.0.6'), + ('zlib', '1.2.7'), ('Python', pythonversion)] # also build boost_mpi From dbf6ef9d714c59f01c7c07bef0ef82419c93c1fd Mon Sep 17 00:00:00 2001 From: Kenneth Hoste Date: Mon, 13 Aug 2012 15:26:36 +0200 Subject: [PATCH 631/798] simplify eb script, no need to change into easybuild dir to set PYTHONPATH correctly --- eb | 8 ++------ 1 file changed, 2 insertions(+), 6 deletions(-) diff --git a/eb b/eb index afdc6d6de3..593e447517 100755 --- a/eb +++ b/eb @@ -27,12 +27,8 @@ version=`python -V 2>&1 | sed 's/^Python \([0-9]*\)\.\([0-9]*\).*/\1.\2/'` # See http://docs.python.org/using/cmdline.html#cmdoption-unittest-discover-m for -m support -# determine absolute path name -cd `dirname $0` -absolute_path=$PWD -cd - > /dev/null - -export PYTHONPATH="${absolute_path}:$PYTHONPATH" +# add EasyBuild top directory to PYTHONPATH +export PYTHONPATH="`dirname $0`:$PYTHONPATH" if [[ "$version" = "2.4" ]]; then python "`dirname $0`/easybuild/build.py" $@ else From 3a045b4551987b66da47abdc44954d8cc6994a7e Mon Sep 17 00:00:00 2001 From: Kenneth Hoste Date: Mon, 13 Aug 2012 15:27:39 +0200 Subject: [PATCH 632/798] add empty line before 'built with EasyBuild version X' line in easyconfig, fix debugging msg for extending MODULEPATH (was broken if skip was being used) --- easybuild/framework/application.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/easybuild/framework/application.py b/easybuild/framework/application.py index 785913ec0e..7e719986ea 100644 --- a/easybuild/framework/application.py +++ b/easybuild/framework/application.py @@ -1089,7 +1089,7 @@ def make_module(self, fake=False): txt += self.make_module_extra() if self.getcfg('pkglist'): txt += self.make_module_extra_packages() - txt += '# built with EasyBuild version %s\n' % easybuild.VERBOSE_VERSION + txt += '\n# built with EasyBuild version %s\n' % easybuild.VERBOSE_VERSION try: f = open(self.moduleGenerator.filename, 'w') @@ -1270,10 +1270,10 @@ def packages(self): modpath = self.make_module(fake=True) # adjust MODULEPATH tand load module if self.getcfg('pkgloadmodule'): - self.log.debug("Adding %s to MODULEPATH" % modpath) if self.skip: m = Modules() else: + self.log.debug("Adding %s to MODULEPATH" % modpath) m = Modules([modpath] + os.environ['MODULEPATH'].split(':')) if m.exists(self.name(), self.installversion()): From 266e3ed6aea59c460044c3d07ade4c31994b0e68 Mon Sep 17 00:00:00 2001 From: Toon Willems Date: Mon, 13 Aug 2012 15:30:10 +0200 Subject: [PATCH 633/798] validate resources --- easybuild/tools/pbs_job.py | 23 ++++++++++++++++++++--- 1 file changed, 20 insertions(+), 3 deletions(-) diff --git a/easybuild/tools/pbs_job.py b/easybuild/tools/pbs_job.py index 3d7fdeece6..04af4a024f 100644 --- a/easybuild/tools/pbs_job.py +++ b/easybuild/tools/pbs_job.py @@ -26,6 +26,7 @@ from easybuild.tools.build_log import getLog +MAX_WALLTIME = 72 class PbsJob: """Interaction with TORQUE""" @@ -34,7 +35,8 @@ def __init__(self, script, name, env_vars=None, resources={}): """ create a new Job to be submitted to PBS env_vars is a dictionary with key-value pairs of environment variables that should be passed on to the job - resources is a dictionary with optional keys: ['hours', 'procs'] + resources is a dictionary with optional keys: ['hours', 'cores'] both of these should be integer values. + hours can be 1 - MAX_WALLTIME, cores depends on which cluster it is being run. """ self.log = getLog("PBS") self.script = script @@ -58,11 +60,26 @@ def __init__(self, script, name, env_vars=None, resources={}): except: self.log.error("Could not connect to the default pbs server, is this correctly configured?") - hours = resources.get('hours', 72) + # setup the resources requested + + # validate requested resources! + hours = resources.get('hours', MAX_WALLTIME) + if hours > MAX_WALLTIME: + self.log.warn("Specified %s hours, but this is impossible. (resetting to %s hours)" % (hours, MAX_WALLTIME)) + hours = MAX_WALLTIME + + max_cores = self.get_ppn() + cores = resources.get('cores', max_cores) + if cores > max_cores: + self.log.warn("number of requested cores (%s) was greater than available (%s) " % (cores, max_cores)) + cores = max_cores + + # only allow cores and hours for now. self.resources = { "walltime": "%s:00:00" % hours, - "nodes": "1:ppn=%s" % resources.get('procs', self.get_ppn()) + "nodes": "1:ppn=%s" % cores } + # set queue based on the hours requested if hours >= 12: self.queue = 'long' else: From 4b4df11b20777f5474c84be12a7f0410b717a29e Mon Sep 17 00:00:00 2001 From: Kenneth Hoste Date: Mon, 13 Aug 2012 15:34:33 +0200 Subject: [PATCH 634/798] style cleanup for DOLFIN, added Sphinx and MTL4 as dependencies --- easybuild/easyblocks/d/dolfin.py | 24 ++++++++++++++---------- 1 file changed, 14 insertions(+), 10 deletions(-) diff --git a/easybuild/easyblocks/d/dolfin.py b/easybuild/easyblocks/d/dolfin.py index 52be64c4d4..2855604f88 100644 --- a/easybuild/easyblocks/d/dolfin.py +++ b/easybuild/easyblocks/d/dolfin.py @@ -18,6 +18,9 @@ # You should have received a copy of the GNU General Public License # along with EasyBuild. If not, see . ## +""" +EasyBuild support for DOLFIN, implemented as an easyblock +""" import os from easybuild.easyblocks.c.cmakepythonpackage import CMakePythonPackage @@ -25,17 +28,14 @@ class DOLFIN(CMakePythonPackage): - """Extension of the CMakePythonPackage for Dolfin. - - Dolfin needs some environment variables to be set at run time. - """ + """Support for building and installing DOLFIN.""" def configure(self): - """Configure Dolfin build.""" + """Configure DOLFIN build by setting configure options.""" # make sure that required dependencies are loaded - deps = ['Armadillo', 'Boost', 'CGAL', 'ParMETIS', 'PETSc', 'Python', 'SCOTCH', - 'SLEPc', 'SuiteSparse', 'UFC'] + deps = ['Armadillo', 'Boost', 'CGAL', 'MTL4', 'ParMETIS', 'PETSc', 'Python', + 'SCOTCH', 'Sphinx', 'SLEPc', 'SuiteSparse', 'UFC'] depsdict = {} for dep in deps: deproot = get_software_root(dep) @@ -106,6 +106,9 @@ def configure(self): if val: self.updatecfg('configopts', '-D%s=%s' % (env_var, val)) + # MTL4 + self.updatecfg('configopts', '-DMTL4_DIR:PATH="%s"' % depsdict['MTL4']) + # set correct openmp options openmp = self.toolkit().get_openmp_flag() self.updatecfg('configopts', ' -DOpenMP_CXX_FLAGS="%s"' % openmp) @@ -119,7 +122,7 @@ def configure(self): # need to know exact output when all optional packages are found def make_module_extra(self): - """Set extra environment variables for Dolfin.""" + """Set extra environment variables for DOLFIN.""" txt = CMakePythonPackage.make_module_extra(self) @@ -138,10 +141,11 @@ def make_module_extra(self): return txt def sanitycheck(self): - """Custom sanity check for Dolfin.""" + """Custom sanity check for DOLFIN.""" if not self.getcfg('sanityCheckPaths'): - self.setcfg('sanityCheckPaths', {'files': ['bin/dolfin-%s' % x for x in ['version', 'convert', + self.setcfg('sanityCheckPaths', { + 'files': ['bin/dolfin-%s' % x for x in ['version', 'convert', 'order', 'plot']] + ['include/dolfin.h'], 'dirs':['%s/dolfin' % self.pylibdir] From ce71b71912664efe7142994d104c4e2f4c68d271 Mon Sep 17 00:00:00 2001 From: Kenneth Hoste Date: Mon, 13 Aug 2012 15:39:37 +0200 Subject: [PATCH 635/798] also specify zlib include/lib path to bjam --- easybuild/easyblocks/b/boost.py | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) diff --git a/easybuild/easyblocks/b/boost.py b/easybuild/easyblocks/b/boost.py index 16ec35fcc6..9cb9aa80d4 100644 --- a/easybuild/easyblocks/b/boost.py +++ b/easybuild/easyblocks/b/boost.py @@ -86,11 +86,12 @@ def make(self): bjamoptions = " --prefix=%s" % self.objdir - # specify path for bzip2 if module is loaded - bzip2 = get_software_root('bzip2') - if bzip2: - bjamoptions += " -sBZIP2_INCLUDE=%s/include" % bzip2 - bjamoptions += " -sBZIP2_LIBPATH=%s/lib" % bzip2 + # specify path for bzip2/zlib if module is loaded + for lib in ["bzip2", "zlib"]: + libroot = get_software_root(lib) + if libroot: + bjamoptions += " -s%s_INCLUDE=%s/include" % (lib.upper(), libroot) + bjamoptions += " -s%s_LIBPATH=%s/lib" % (lib.upper(), libroot) if self.getcfg('boost_mpi'): self.log.info("Building boost_mpi library") From eb35c646998c91ae3e3dadb8a3feaa3b48a979e9 Mon Sep 17 00:00:00 2001 From: Toon Willems Date: Mon, 13 Aug 2012 15:54:27 +0200 Subject: [PATCH 636/798] set hours based on previous build --- easybuild/tools/parallelbuild.py | 13 +++++++++---- 1 file changed, 9 insertions(+), 4 deletions(-) diff --git a/easybuild/tools/parallelbuild.py b/easybuild/tools/parallelbuild.py index fd657958e9..6678aafe40 100644 --- a/easybuild/tools/parallelbuild.py +++ b/easybuild/tools/parallelbuild.py @@ -24,11 +24,13 @@ Support for PBS is provided via the PbsJob class. If you want you could create other job classes and use them here. """ +import math import os import re from easybuild.framework.application import get_class from easybuild.tools.pbs_job import PbsJob +from easybuild.tools.config import getRepository def build_packages_in_parallel(build_command, packages, output_dir, log): @@ -46,7 +48,7 @@ def build_packages_in_parallel(build_command, packages, output_dir, log): # This is very important, otherwise we might have race conditions # e.g. GCC-4.5.3 finds cloog.tar.gz but it was incorrectly downloaded by GCC-4.6.3 # running this step here, prevents this - prepare_package(pkg) + prepare_package(pkg, log) # the new job will only depend on already submitted jobs log.info("creating job for pkg: %s" % str(pkg)) @@ -91,7 +93,10 @@ def create_job(build_command, package, output_dir=""): easybuild_vars['EASYBUILDTESTOUTPUT'] = os.path.join(os.path.abspath(output_dir), name) - job = PbsJob(command, name, easybuild_vars) + previous_time = getRepository().get_buildstats(*package['module'])['build_time'] + requested = int(math.ceil(previous_time * 2 / 60)) + + job = PbsJob(command, name, easybuild_vars, resources={'hours': requested}) job.module = package['module'] return job @@ -121,10 +126,10 @@ def get_instance(package, log): return app_class(spec, debug=True) -def prepare_package(pkg): +def prepare_package(pkg, log): """ prepare for building """ try: - instance = get_instance(pkg) + instance = get_instance(pkg, log) instance.prepare_build() except: pass From 540daf7ff9a15f2170b2e95bd7367ef6b3099e5c Mon Sep 17 00:00:00 2001 From: Toon Willems Date: Mon, 13 Aug 2012 15:55:56 +0200 Subject: [PATCH 637/798] use last build as time for new one --- easybuild/tools/parallelbuild.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/easybuild/tools/parallelbuild.py b/easybuild/tools/parallelbuild.py index 6678aafe40..2556d5649e 100644 --- a/easybuild/tools/parallelbuild.py +++ b/easybuild/tools/parallelbuild.py @@ -93,7 +93,8 @@ def create_job(build_command, package, output_dir=""): easybuild_vars['EASYBUILDTESTOUTPUT'] = os.path.join(os.path.abspath(output_dir), name) - previous_time = getRepository().get_buildstats(*package['module'])['build_time'] + # just use latest build stats + previous_time = getRepository().get_buildstats(*package['module'])[-1]['build_time'] requested = int(math.ceil(previous_time * 2 / 60)) job = PbsJob(command, name, easybuild_vars, resources={'hours': requested}) From ff232235ba43698233d20ed4a2b97ce86048a718 Mon Sep 17 00:00:00 2001 From: Kenneth Hoste Date: Mon, 13 Aug 2012 15:58:44 +0200 Subject: [PATCH 638/798] add example easyconfig for petsc4py Python package --- ...py-3.3-goalf-1.1.0-no-OFED-Python-2.7.3.eb | 29 +++++++++++++++++++ 1 file changed, 29 insertions(+) create mode 100644 easybuild/easyconfigs/p/petsc4py/petsc4py-3.3-goalf-1.1.0-no-OFED-Python-2.7.3.eb diff --git a/easybuild/easyconfigs/p/petsc4py/petsc4py-3.3-goalf-1.1.0-no-OFED-Python-2.7.3.eb b/easybuild/easyconfigs/p/petsc4py/petsc4py-3.3-goalf-1.1.0-no-OFED-Python-2.7.3.eb new file mode 100644 index 0000000000..f8450bf502 --- /dev/null +++ b/easybuild/easyconfigs/p/petsc4py/petsc4py-3.3-goalf-1.1.0-no-OFED-Python-2.7.3.eb @@ -0,0 +1,29 @@ +easyblock = "PythonPackage" + +name = "petsc4py" +version = "3.3" + +homepage = 'https://code.google.com/p/petsc4py/' +description = """petsc4py are Python bindings for PETSc, the Portable, Extensible Toolkit for Scientific Computation.""" + +toolkit = {'name': "goalf", 'version': "1.1.0-no-OFED"} + +sourceURLs = ['https://petsc4py.googlecode.com/files/'] +sources = ["%s-%s.tar.gz" % (name, version)] + +python = "Python" +python_version = "2.7.3" +versionsuffix = '-%s-%s' % (python, python_version) + +dependencies = [ + (python, python_version), + ('PETSc', '3.3-p2', versionsuffix) + ] + +py_short_ver = ".".join(python_version.split(".")[0:2]) +pylibdir = "lib/python%s/site-packages/%s" % (py_short_ver, name) + +sanityCheckPaths = { + 'files': [], + 'dirs': [pylibdir] + } \ No newline at end of file From f87468fdc932e622c805cf69fb88d42dd52e872a Mon Sep 17 00:00:00 2001 From: Toon Willems Date: Mon, 13 Aug 2012 16:22:46 +0200 Subject: [PATCH 639/798] fix for when no buildstats are available --- easybuild/tools/parallelbuild.py | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/easybuild/tools/parallelbuild.py b/easybuild/tools/parallelbuild.py index 2556d5649e..380bf93ea5 100644 --- a/easybuild/tools/parallelbuild.py +++ b/easybuild/tools/parallelbuild.py @@ -94,10 +94,13 @@ def create_job(build_command, package, output_dir=""): easybuild_vars['EASYBUILDTESTOUTPUT'] = os.path.join(os.path.abspath(output_dir), name) # just use latest build stats - previous_time = getRepository().get_buildstats(*package['module'])[-1]['build_time'] - requested = int(math.ceil(previous_time * 2 / 60)) + build_stats = getRepository().get_buildstats(*package['module']) + resources = {} + if buildstats: + previous_time = [-1]['build_time'] + resources['hours'] = int(math.ceil(previous_time * 2 / 60)) - job = PbsJob(command, name, easybuild_vars, resources={'hours': requested}) + job = PbsJob(command, name, easybuild_vars, resources=resources) job.module = package['module'] return job From 23d8d0440db6c6e7bd493405729f542addc571d4 Mon Sep 17 00:00:00 2001 From: Toon Willems Date: Mon, 13 Aug 2012 16:23:37 +0200 Subject: [PATCH 640/798] Woops, syntax errors --- easybuild/tools/parallelbuild.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/easybuild/tools/parallelbuild.py b/easybuild/tools/parallelbuild.py index 380bf93ea5..06caf93cc2 100644 --- a/easybuild/tools/parallelbuild.py +++ b/easybuild/tools/parallelbuild.py @@ -94,10 +94,10 @@ def create_job(build_command, package, output_dir=""): easybuild_vars['EASYBUILDTESTOUTPUT'] = os.path.join(os.path.abspath(output_dir), name) # just use latest build stats - build_stats = getRepository().get_buildstats(*package['module']) + buildstats = getRepository().get_buildstats(*package['module']) resources = {} if buildstats: - previous_time = [-1]['build_time'] + previous_time = buildstats[-1]['build_time'] resources['hours'] = int(math.ceil(previous_time * 2 / 60)) job = PbsJob(command, name, easybuild_vars, resources=resources) From fd5b714e1d010952a7e2d83f940a09672316a822 Mon Sep 17 00:00:00 2001 From: Kenneth Hoste Date: Mon, 13 Aug 2012 16:28:51 +0200 Subject: [PATCH 641/798] fix specifying of compilers/compiler options --- easybuild/easyblocks/p/petsc.py | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/easybuild/easyblocks/p/petsc.py b/easybuild/easyblocks/p/petsc.py index 9e83459261..aad515b63f 100644 --- a/easybuild/easyblocks/p/petsc.py +++ b/easybuild/easyblocks/p/petsc.py @@ -69,14 +69,14 @@ def configure(self): if LooseVersion(self.version()) >= LooseVersion("3"): # compilers - self.updatecfg('configopts', '--with-cc=%s' % os.getenv('CC')) - self.updatecfg('configopts', '--with-cxx=%s --with-c++-support' % os.getenv('CXX')) - self.updatecfg('configopts', '--with-fc=%s' % os.getenv('F90')) + self.updatecfg('configopts', '--with-cc="%s"' % os.getenv('CC')) + self.updatecfg('configopts', '--with-cxx="%s" --with-c++-support' % os.getenv('CXX')) + self.updatecfg('configopts', '--with-fc="%s"' % os.getenv('F90')) # compiler flags - self.updatecfg('configopts', '--with-cflags=%s' % os.getenv('CFLAGS')) - self.updatecfg('configopts', '--with-cxxflags=%s' % os.getenv('CXXFLAGS')) - self.updatecfg('configopts', '--with-fcflags=%s' % os.getenv('F90FLAGS')) + self.updatecfg('configopts', '--with-cflags="%s"' % os.getenv('CFLAGS')) + self.updatecfg('configopts', '--with-cxxflags="%s"' % os.getenv('CXXFLAGS')) + self.updatecfg('configopts', '--with-fcflags="%s"' % os.getenv('F90FLAGS')) if not self.toolkit().comp_family() == toolkit.GCC: self.updatecfg('configopts', '--with-gnu-compilers=0') From 107608d413e5086a7fac58a2565988f085e1a1dd Mon Sep 17 00:00:00 2001 From: Kenneth Hoste Date: Mon, 13 Aug 2012 16:41:27 +0200 Subject: [PATCH 642/798] mention sopt as possible value for 'type' CP2K option --- easybuild/easyblocks/c/cp2k.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/easybuild/easyblocks/c/cp2k.py b/easybuild/easyblocks/c/cp2k.py index 78a4d71d25..45980e7240 100644 --- a/easybuild/easyblocks/c/cp2k.py +++ b/easybuild/easyblocks/c/cp2k.py @@ -70,7 +70,7 @@ def __init__(self, *args, **kwargs): def extra_options(self): extra_vars = { - 'type': ['popt', "Type of build ('popt' or 'psmp') (default: 'popt)"], + 'type': ['popt', "Type of build ('popt', 'psmp' or 'sopt') (default: 'popt')"], 'typeopt': [True, "Enable optimization (default: True)"], 'libint': [True, "Use LibInt (default: True)"], 'modincprefix': ['', "IMKL prefix for modinc include dir (default: '')"], From c3e6bb4a8d023138476352c21090dce62046111a Mon Sep 17 00:00:00 2001 From: Kenneth Hoste Date: Mon, 13 Aug 2012 17:02:27 +0200 Subject: [PATCH 643/798] correct specifying BLAS/LAPACK static libs for IMKL-based toolkits --- easybuild/tools/toolkit.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/easybuild/tools/toolkit.py b/easybuild/tools/toolkit.py index 752b3b8588..c54b50efd8 100644 --- a/easybuild/tools/toolkit.py +++ b/easybuild/tools/toolkit.py @@ -619,8 +619,8 @@ def prepareIMKL(self): self.vars['BLAS_LAPACK_LIB_DIR'] = libs_dir # BLAS/LAPACK library - self.vars['BLAS_STATIC_LIBS'] = ','.join(blas_libs) - self.vars['BLAS_MT_STATIC_LIBS'] = ','.join(blas_mt_libs) + self.vars['BLAS_STATIC_LIBS'] = ','.join(["lib%s.a" % x for x in blas_libs]) + self.vars['BLAS_MT_STATIC_LIBS'] = ','.join(["lib%s.a" % x for x in blas_mt_libs]) self.vars['LAPACK_STATIC_LIBS'] = self.vars['BLAS_STATIC_LIBS'] self.vars['LAPACK_MT_STATIC_LIBS'] = self.vars['BLAS_MT_STATIC_LIBS'] From 92d8ad42d4fc3ba60aeb47a78f689948a4b9634b Mon Sep 17 00:00:00 2001 From: Kenneth Hoste Date: Mon, 13 Aug 2012 19:28:44 +0200 Subject: [PATCH 644/798] correct specifying BLAS/LAPACK static libs for IMKL-based toolkits again --- easybuild/tools/toolkit.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/easybuild/tools/toolkit.py b/easybuild/tools/toolkit.py index c54b50efd8..44b9aac39b 100644 --- a/easybuild/tools/toolkit.py +++ b/easybuild/tools/toolkit.py @@ -619,8 +619,8 @@ def prepareIMKL(self): self.vars['BLAS_LAPACK_LIB_DIR'] = libs_dir # BLAS/LAPACK library - self.vars['BLAS_STATIC_LIBS'] = ','.join(["lib%s.a" % x for x in blas_libs]) - self.vars['BLAS_MT_STATIC_LIBS'] = ','.join(["lib%s.a" % x for x in blas_mt_libs]) + self.vars['BLAS_STATIC_LIBS'] = ','.join(["libmkl_%s.a" % x for x in blas_libs]) + self.vars['BLAS_MT_STATIC_LIBS'] = ','.join(["libmkl_%s.a" % x for x in blas_mt_libs]) self.vars['LAPACK_STATIC_LIBS'] = self.vars['BLAS_STATIC_LIBS'] self.vars['LAPACK_MT_STATIC_LIBS'] = self.vars['BLAS_MT_STATIC_LIBS'] From 8e3330961dc88eeb78a9bb58372d408bf8003a80 Mon Sep 17 00:00:00 2001 From: Kenneth Hoste Date: Mon, 13 Aug 2012 19:44:47 +0200 Subject: [PATCH 645/798] fix FFTW static libs for IMKL --- easybuild/tools/toolkit.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/easybuild/tools/toolkit.py b/easybuild/tools/toolkit.py index 44b9aac39b..633c7586c8 100644 --- a/easybuild/tools/toolkit.py +++ b/easybuild/tools/toolkit.py @@ -657,7 +657,7 @@ def prepareIMKL(self): "-Wl:-Bdynamic"]) self.vars['FFTW_INC'] = os.path.join(mklroot, "mkl", "include", "fftw") self.vars['FFTW_LIB_DIR'] = libs_dir - self.vars['FFTW_STATIC_LIBS'] = ','.join(["libmkl_%s.a" % x for x in fftw_libs]) + self.vars['FFTW_STATIC_LIBS'] = ','.join(["lib%s.a" % x for x in fftw_libs]) # some tools (like pkg-utils) don't handle groups well, so pack them if required if self.opts['packed-groups']: From bff944a61bcf3a3af25b955eb252af529050927c Mon Sep 17 00:00:00 2001 From: Kenneth Hoste Date: Mon, 13 Aug 2012 21:04:58 +0200 Subject: [PATCH 646/798] fix list of FFTW libs (add blacs libs as well for deps) --- easybuild/tools/toolkit.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/easybuild/tools/toolkit.py b/easybuild/tools/toolkit.py index 633c7586c8..f595fe9108 100644 --- a/easybuild/tools/toolkit.py +++ b/easybuild/tools/toolkit.py @@ -657,7 +657,7 @@ def prepareIMKL(self): "-Wl:-Bdynamic"]) self.vars['FFTW_INC'] = os.path.join(mklroot, "mkl", "include", "fftw") self.vars['FFTW_LIB_DIR'] = libs_dir - self.vars['FFTW_STATIC_LIBS'] = ','.join(["lib%s.a" % x for x in fftw_libs]) + self.vars['FFTW_STATIC_LIBS'] = ','.join(["lib%s.a" % x for x in fftw_libs+blas_libs]) # some tools (like pkg-utils) don't handle groups well, so pack them if required if self.opts['packed-groups']: From 758d7d95f067a42d3e7d6da8d7e66d5ef9eb19b2 Mon Sep 17 00:00:00 2001 From: Kenneth Hoste Date: Mon, 13 Aug 2012 21:27:08 +0200 Subject: [PATCH 647/798] specify correct blas static libs for FFTW --- easybuild/tools/toolkit.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/easybuild/tools/toolkit.py b/easybuild/tools/toolkit.py index f595fe9108..a26571cfff 100644 --- a/easybuild/tools/toolkit.py +++ b/easybuild/tools/toolkit.py @@ -657,7 +657,8 @@ def prepareIMKL(self): "-Wl:-Bdynamic"]) self.vars['FFTW_INC'] = os.path.join(mklroot, "mkl", "include", "fftw") self.vars['FFTW_LIB_DIR'] = libs_dir - self.vars['FFTW_STATIC_LIBS'] = ','.join(["lib%s.a" % x for x in fftw_libs+blas_libs]) + fftw_static_libs = ["lib%s.a" % x for x in fftw_libs] + self.vars['FFTW_STATIC_LIBS'] = ','.join(fftw_static_libs + self.vars['BLAS_STATIC_LIBS']) # some tools (like pkg-utils) don't handle groups well, so pack them if required if self.opts['packed-groups']: From cff3efebfb20a4a485af9aa2e9216965ae9a1b4f Mon Sep 17 00:00:00 2001 From: Kenneth Hoste Date: Mon, 13 Aug 2012 21:41:31 +0200 Subject: [PATCH 648/798] fix typo --- easybuild/tools/toolkit.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/easybuild/tools/toolkit.py b/easybuild/tools/toolkit.py index a26571cfff..a8e2871902 100644 --- a/easybuild/tools/toolkit.py +++ b/easybuild/tools/toolkit.py @@ -658,7 +658,7 @@ def prepareIMKL(self): self.vars['FFTW_INC'] = os.path.join(mklroot, "mkl", "include", "fftw") self.vars['FFTW_LIB_DIR'] = libs_dir fftw_static_libs = ["lib%s.a" % x for x in fftw_libs] - self.vars['FFTW_STATIC_LIBS'] = ','.join(fftw_static_libs + self.vars['BLAS_STATIC_LIBS']) + self.vars['FFTW_STATIC_LIBS'] = ','.join(fftw_static_libs + [self.vars['BLAS_STATIC_LIBS']]) # some tools (like pkg-utils) don't handle groups well, so pack them if required if self.opts['packed-groups']: From 66424acb5895a496edaa1e88590975a279b32071 Mon Sep 17 00:00:00 2001 From: Kenneth Hoste Date: Mon, 13 Aug 2012 22:16:33 +0200 Subject: [PATCH 649/798] extend list of FFTW lib in IMKL --- easybuild/tools/toolkit.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/easybuild/tools/toolkit.py b/easybuild/tools/toolkit.py index a8e2871902..768553896d 100644 --- a/easybuild/tools/toolkit.py +++ b/easybuild/tools/toolkit.py @@ -651,7 +651,8 @@ def prepareIMKL(self): fftwsuff = "" if self.opts['pic']: fftwsuff = "_pic" - fftw_libs = ["fftw3xc_intel%s" % fftwsuff] + fftw_libs = ["fftw3xc_intel%s" % fftwsuff, + "fftw3x_cdft%" % fftwsuff] self.vars['LIBFFT'] = ' '.join(["-Wl:-Bstatic", ' '.join(["-%s" % x for x in fftw_libs]), "-Wl:-Bdynamic"]) From 819a59a3d6b81b1609d57114565b3e13a3d31538 Mon Sep 17 00:00:00 2001 From: Kenneth Hoste Date: Mon, 13 Aug 2012 22:19:49 +0200 Subject: [PATCH 650/798] fix typo --- easybuild/tools/toolkit.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/easybuild/tools/toolkit.py b/easybuild/tools/toolkit.py index 768553896d..529dc3fe69 100644 --- a/easybuild/tools/toolkit.py +++ b/easybuild/tools/toolkit.py @@ -652,7 +652,7 @@ def prepareIMKL(self): if self.opts['pic']: fftwsuff = "_pic" fftw_libs = ["fftw3xc_intel%s" % fftwsuff, - "fftw3x_cdft%" % fftwsuff] + "fftw3x_cdft%s" % fftwsuff] self.vars['LIBFFT'] = ' '.join(["-Wl:-Bstatic", ' '.join(["-%s" % x for x in fftw_libs]), "-Wl:-Bdynamic"]) From 968aedcade8ec34ad2c753e9bcb2d72446b8ea86 Mon Sep 17 00:00:00 2001 From: Kenneth Hoste Date: Mon, 13 Aug 2012 22:52:27 +0200 Subject: [PATCH 651/798] add libmkl_cdft_core.a to list of FFTW libs for IMKL --- easybuild/tools/toolkit.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/easybuild/tools/toolkit.py b/easybuild/tools/toolkit.py index 529dc3fe69..ae62a1da03 100644 --- a/easybuild/tools/toolkit.py +++ b/easybuild/tools/toolkit.py @@ -652,7 +652,8 @@ def prepareIMKL(self): if self.opts['pic']: fftwsuff = "_pic" fftw_libs = ["fftw3xc_intel%s" % fftwsuff, - "fftw3x_cdft%s" % fftwsuff] + "fftw3x_cdft%s" % fftwsuff, + "mkl_cdft_core"] self.vars['LIBFFT'] = ' '.join(["-Wl:-Bstatic", ' '.join(["-%s" % x for x in fftw_libs]), "-Wl:-Bdynamic"]) From a8c24f2528d5344befe3cb629810d7dae6410b05 Mon Sep 17 00:00:00 2001 From: Kenneth Hoste Date: Mon, 13 Aug 2012 23:06:52 +0200 Subject: [PATCH 652/798] append BLACS libs to list of FFTW libs --- easybuild/tools/toolkit.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/easybuild/tools/toolkit.py b/easybuild/tools/toolkit.py index ae62a1da03..094ecfe4c7 100644 --- a/easybuild/tools/toolkit.py +++ b/easybuild/tools/toolkit.py @@ -660,7 +660,8 @@ def prepareIMKL(self): self.vars['FFTW_INC'] = os.path.join(mklroot, "mkl", "include", "fftw") self.vars['FFTW_LIB_DIR'] = libs_dir fftw_static_libs = ["lib%s.a" % x for x in fftw_libs] - self.vars['FFTW_STATIC_LIBS'] = ','.join(fftw_static_libs + [self.vars['BLAS_STATIC_LIBS']]) + self.vars['FFTW_STATIC_LIBS'] = ','.join(fftw_static_libs + [self.vars['BLAS_STATIC_LIBS'], + self.vars['BLACS_STATIC_LIBS']]) # some tools (like pkg-utils) don't handle groups well, so pack them if required if self.opts['packed-groups']: From e0c4f13583a665d1dea133e8190e86b931c6c9f8 Mon Sep 17 00:00:00 2001 From: Toon Willems Date: Tue, 14 Aug 2012 09:17:54 +0200 Subject: [PATCH 653/798] Add inverse option parser to string --- easybuild/build.py | 28 +++++++++++++++++++++++++++- 1 file changed, 27 insertions(+), 1 deletion(-) diff --git a/easybuild/build.py b/easybuild/build.py index e3d993644a..daa5c962d4 100644 --- a/easybuild/build.py +++ b/easybuild/build.py @@ -240,7 +240,33 @@ def main(): curdir = os.getcwd() easybuild_basedir = os.path.dirname(os.path.dirname(sys.argv[0])) eb_path = os.path.join(easybuild_basedir, "eb") - command = "cd %s && %s %%s -d" % (curdir, eb_path) + + # Reverse option parser -> string + + # the options to ignore + ignore = map(parser.get_option, ['--robot', '--help', '--job']) + + # loop over all the different options. + string_options = [] + for option in parser.option_list: + if option not in ignore: + if option.action == 'store_true' or option.action == 'store_false': + if getattr(options, option.dest) != None: + if option._long_opts: + string_options.append(option._long_opts[0]) + else: + string_options.append(option._short_opts[0]) + elif option.action == 'store': + value = getattr(options, option.dest) + if value: + if option._long_opts: + string_options.append("%s %s" % (option._long_opts[0], value)) + else: + string_options.append("%s %s" % (option._short_opts[0], value)) + + opts = ' '.join(string_options) + + command = "cd %s && %s %%s %s" % (curdir, eb_path, opts) jobs = parbuild.build_packages_in_parallel(command, orderedSpecs, "easybuild-build", log) for job in jobs: print "%s: %s" % (job.name, job.jobid) From 4a83ea7a811f306b84722ce12b0e2ef48806d148 Mon Sep 17 00:00:00 2001 From: Toon Willems Date: Tue, 14 Aug 2012 10:13:30 +0200 Subject: [PATCH 654/798] simple enough reversing to satisfy the needs --- easybuild/build.py | 32 ++++++++++++++------------------ 1 file changed, 14 insertions(+), 18 deletions(-) diff --git a/easybuild/build.py b/easybuild/build.py index daa5c962d4..54b59b821a 100644 --- a/easybuild/build.py +++ b/easybuild/build.py @@ -247,24 +247,20 @@ def main(): ignore = map(parser.get_option, ['--robot', '--help', '--job']) # loop over all the different options. - string_options = [] - for option in parser.option_list: - if option not in ignore: - if option.action == 'store_true' or option.action == 'store_false': - if getattr(options, option.dest) != None: - if option._long_opts: - string_options.append(option._long_opts[0]) - else: - string_options.append(option._short_opts[0]) - elif option.action == 'store': - value = getattr(options, option.dest) - if value: - if option._long_opts: - string_options.append("%s %s" % (option._long_opts[0], value)) - else: - string_options.append("%s %s" % (option._short_opts[0], value)) - - opts = ' '.join(string_options) + result_opts = [] + relevant_opts = [o for o in parser.option_list if o not in ignore] + for opt in relevant_opts: + value = getattr(options, opt.dest) + # explicit check for None (some option are store_false) + if value != None: + # get_opt_string is not documented (but is a public method) + name = opt.get_opt_string() + if opt.action == 'store': + result_opts.append("%s %s" % (name, value)) + else: + result_opts.append(name) + + opts = ' '.join(result_opts) command = "cd %s && %s %%s %s" % (curdir, eb_path, opts) jobs = parbuild.build_packages_in_parallel(command, orderedSpecs, "easybuild-build", log) From cc3b439f2fc14558a72b72a92b8609b03a74150a Mon Sep 17 00:00:00 2001 From: Kenneth Hoste Date: Tue, 14 Aug 2012 10:29:25 +0200 Subject: [PATCH 655/798] add example easyconfigs for PETSc/SLEPc with ictce toolkit --- .../DOLFIN-1.0.0-gimkl-0.5.3-Python-2.7.3.eb | 44 ------------------- ...-0.9.1-goalf-1.1.0-no-OFED-Python-2.7.3.eb | 2 +- .../PETSc-3.3-p2-ictce-4.0.6-Python-2.7.3.eb | 25 +++++++++++ ...3.3-p1-goalf-1.1.0-no-OFED-Python-2.7.3.eb | 2 +- .../SLEPc-3.3-p1-ictce-4.0.6-Python-2.7.3.eb | 17 +++++++ ...0.6c11-goalf-1.1.0-no-OFED-Python-2.7.3.eb | 2 +- 6 files changed, 45 insertions(+), 47 deletions(-) delete mode 100644 easybuild/easyconfigs/d/DOLFIN/DOLFIN-1.0.0-gimkl-0.5.3-Python-2.7.3.eb create mode 100644 easybuild/easyconfigs/p/PETSc/PETSc-3.3-p2-ictce-4.0.6-Python-2.7.3.eb create mode 100644 easybuild/easyconfigs/s/SLEPc/SLEPc-3.3-p1-ictce-4.0.6-Python-2.7.3.eb diff --git a/easybuild/easyconfigs/d/DOLFIN/DOLFIN-1.0.0-gimkl-0.5.3-Python-2.7.3.eb b/easybuild/easyconfigs/d/DOLFIN/DOLFIN-1.0.0-gimkl-0.5.3-Python-2.7.3.eb deleted file mode 100644 index 7f0ec48fba..0000000000 --- a/easybuild/easyconfigs/d/DOLFIN/DOLFIN-1.0.0-gimkl-0.5.3-Python-2.7.3.eb +++ /dev/null @@ -1,44 +0,0 @@ -name='DOLFIN' -version='1.0.0' - -homepage='https://launchpad.net/dolfin' -description="""DOLFIN is the C++/Python interface of FEniCS, providing a consistent PSE -(Problem Solving Environment) for ordinary and partial differential equations.""" - -toolkit={'name':'gimkl','version':'0.5.3'} -toolkitopts={'usempi':True, 'packed-groups':False} - -majver = version.split('.') -if majver[0] == '0': - majver = majver[0] -else: - majver = '.'.join(majver[0:2]) - -sources=['%s-%s.tar.gz'%(name.lower(),version)] -sourceURLs=['https://launchpad.net/%s/%s.x/%s/+download' % (name.lower(), majver, version)] - -patches=['wl_pkg_linkflags.patch'] - -builddependencies = [('CMake', '2.8.4')] - -python_version = '2.7.3' -versionsuffix = '-Python-%s' % (python_version) - -dependencies=[ - ('Python', python_version), - ('Boost', '1.49.0', versionsuffix ), - ('UFC', '2.0.5', versionsuffix), - ('SWIG','2.0.4',versionsuffix), - ('FFC', '1.0.0', versionsuffix), - ('FIAT', '1.0.0', versionsuffix), - ('Instant', '1.0.0', versionsuffix), - ('Viper', '1.0.0', versionsuffix), - ('UFL', '1.0.0', versionsuffix), - ('SCOTCH', '5.1.12b_esmumps'), - ('Armadillo', '2.4.4', versionsuffix), - ('ParMETIS', '4.0.2'), - ('SuiteSparse', '3.7.0', '-withparmetis'), - ('CGAL', '4.0', versionsuffix), - ('zlib', '1.2.7'), - ('libxml2', '2.8.0') - ] diff --git a/easybuild/easyconfigs/d/Docutils/Docutils-0.9.1-goalf-1.1.0-no-OFED-Python-2.7.3.eb b/easybuild/easyconfigs/d/Docutils/Docutils-0.9.1-goalf-1.1.0-no-OFED-Python-2.7.3.eb index e1a537cb27..22b7a0db81 100644 --- a/easybuild/easyconfigs/d/Docutils/Docutils-0.9.1-goalf-1.1.0-no-OFED-Python-2.7.3.eb +++ b/easybuild/easyconfigs/d/Docutils/Docutils-0.9.1-goalf-1.1.0-no-OFED-Python-2.7.3.eb @@ -9,7 +9,7 @@ documentation into useful formats, such as HTML, LaTeX, man-pages, open-document It includes reStructuredText, the easy to read, easy to use, what-you-see-is-what-you-get plaintext markup language.""" -toolkit = {'name':'goalf','version':'1.1.0-no-OFED'} +toolkit = {'name':'goalf','version': '1.1.0-no-OFED'} sourceURLs = [('http://sourceforge.net/projects/docutils/files/docutils/%s/' % version, 'download')] sources = ["%s-%s.tar.gz" % (name.lower(), version)] diff --git a/easybuild/easyconfigs/p/PETSc/PETSc-3.3-p2-ictce-4.0.6-Python-2.7.3.eb b/easybuild/easyconfigs/p/PETSc/PETSc-3.3-p2-ictce-4.0.6-Python-2.7.3.eb new file mode 100644 index 0000000000..a312705044 --- /dev/null +++ b/easybuild/easyconfigs/p/PETSc/PETSc-3.3-p2-ictce-4.0.6-Python-2.7.3.eb @@ -0,0 +1,25 @@ +name = "PETSc" +version = "3.3-p2" +versionsuffix = '-Python-2.7.3' + +homepage = 'http://www.mcs.anl.gov/petsc' +description = """PETSc, pronounced PET-see (the S is silent), is a suite of data structures and routines for the scalable (parallel) solution +of scientific applications modeled by partial differential equations.""" + +toolkit = {'name':'ictce', 'version':'4.0.6'} +toolkitopts = {'usempi': True, 'pic': True} + +sourceURLs = ['http://ftp.mcs.anl.gov/pub/petsc/release-snapshots'] +sources = ['%s-%s.tar.gz' % (name.lower(), version)] + +dependencies = [ + ('Boost', '1.49.0', versionsuffix), + ('FIAT', '1.0.0', versionsuffix), + ('METIS', '5.0.2'), + ('ParMETIS', '4.0.2'), + ('ScientificPython', '2.8', versionsuffix), + ('SCOTCH', '5.1.12b_esmumps'), + ('SuiteSparse', '3.7.0', '-withparmetis'), # for CHOLMOD, UMFPACK + ] + +patches = ['fix.patch'] # ignore failed ranlib check on use of '-c' argument diff --git a/easybuild/easyconfigs/s/SLEPc/SLEPc-3.3-p1-goalf-1.1.0-no-OFED-Python-2.7.3.eb b/easybuild/easyconfigs/s/SLEPc/SLEPc-3.3-p1-goalf-1.1.0-no-OFED-Python-2.7.3.eb index 82b21308b9..64b567bcb0 100644 --- a/easybuild/easyconfigs/s/SLEPc/SLEPc-3.3-p1-goalf-1.1.0-no-OFED-Python-2.7.3.eb +++ b/easybuild/easyconfigs/s/SLEPc/SLEPc-3.3-p1-goalf-1.1.0-no-OFED-Python-2.7.3.eb @@ -8,7 +8,7 @@ large scale sparse eigenvalue problems on parallel computers. It is an extension generalized eigenproblems, with real or complex arithmetic. It can also be used for computing a partial SVD of a large, sparse, rectangular matrix, and to solve quadratic eigenvalue problems.""" -toolkit = {'name':'goalf', 'version':'1.1.0-no-OFED'} +toolkit = {'name':'goalf', 'version': '1.1.0-no-OFED'} toolkitopts = {'usempi': True} sourceURLs = ['http://www.grycap.upv.es/slepc/download/download.php?filename='] diff --git a/easybuild/easyconfigs/s/SLEPc/SLEPc-3.3-p1-ictce-4.0.6-Python-2.7.3.eb b/easybuild/easyconfigs/s/SLEPc/SLEPc-3.3-p1-ictce-4.0.6-Python-2.7.3.eb new file mode 100644 index 0000000000..73e799901b --- /dev/null +++ b/easybuild/easyconfigs/s/SLEPc/SLEPc-3.3-p1-ictce-4.0.6-Python-2.7.3.eb @@ -0,0 +1,17 @@ +name = "SLEPc" +version = "3.3-p1" +versionsuffix = '-Python-2.7.3' + +homepage = 'http://www.grycap.upv.es/slepc/' +description = """SLEPc (Scalable Library for Eigenvalue Problem Computations) is a software library for the solution of +large scale sparse eigenvalue problems on parallel computers. It is an extension of PETSc and can be used for either standard or +generalized eigenproblems, with real or complex arithmetic. It can also be used for computing a partial SVD of a large, sparse, +rectangular matrix, and to solve quadratic eigenvalue problems.""" + +toolkit = {'name':'ictce', 'version': '4.0.6'} +toolkitopts = {'usempi': True} + +sourceURLs = ['http://www.grycap.upv.es/slepc/download/download.php?filename='] +sources = ['%s-%s.tar.gz' % (name.lower(), version)] + +dependencies = [('PETSc', '3.3-p2', versionsuffix)] diff --git a/easybuild/easyconfigs/s/setuptools/setuptools-0.6c11-goalf-1.1.0-no-OFED-Python-2.7.3.eb b/easybuild/easyconfigs/s/setuptools/setuptools-0.6c11-goalf-1.1.0-no-OFED-Python-2.7.3.eb index aea2ad9352..1ef35d7cb6 100644 --- a/easybuild/easyconfigs/s/setuptools/setuptools-0.6c11-goalf-1.1.0-no-OFED-Python-2.7.3.eb +++ b/easybuild/easyconfigs/s/setuptools/setuptools-0.6c11-goalf-1.1.0-no-OFED-Python-2.7.3.eb @@ -6,7 +6,7 @@ version = "0.6c11" homepage = "http://pypi.python.org/pypi/setuptools/" description = """Download, build, install, upgrade, and uninstall Python packages -- easily!""" -toolkit = {'name':'goalf','version':'1.1.0-no-OFED'} +toolkit = {'name':'goalf','version': '1.1.0-no-OFED'} sourceURLs = ['http://pypi.python.org/packages/source/s/%s/' % name] sources = ["%s-%s.tar.gz" % (name, version)] From b90ead2dbad6f5981dcfe970bcd6f432045f60a7 Mon Sep 17 00:00:00 2001 From: Kenneth Hoste Date: Tue, 14 Aug 2012 11:42:27 +0200 Subject: [PATCH 656/798] add support for building and installing Trilinos, with example easyconfigs --- easybuild/easyblocks/t/trilinos.py | 203 ++++++++++++++++++ ...-10.12-goalf-1.1.0-no-OFED-Python-2.7.3.eb | 26 +++ ...Trilinos-10.12-ictce-4.0.6-Python-2.7.3.eb | 26 +++ .../easyconfigs/t/Trilinos/fix-parmetis.patch | 12 ++ 4 files changed, 267 insertions(+) create mode 100644 easybuild/easyblocks/t/trilinos.py create mode 100644 easybuild/easyconfigs/t/Trilinos/Trilinos-10.12-goalf-1.1.0-no-OFED-Python-2.7.3.eb create mode 100644 easybuild/easyconfigs/t/Trilinos/Trilinos-10.12-ictce-4.0.6-Python-2.7.3.eb create mode 100644 easybuild/easyconfigs/t/Trilinos/fix-parmetis.patch diff --git a/easybuild/easyblocks/t/trilinos.py b/easybuild/easyblocks/t/trilinos.py new file mode 100644 index 0000000000..5215608204 --- /dev/null +++ b/easybuild/easyblocks/t/trilinos.py @@ -0,0 +1,203 @@ +# Copyright 2012 Kenneth Hoste +# +# This file is part of EasyBuild, +# originally created by the HPC team of the University of Ghent (http://ugent.be/hpc). +# +# http://github.com/hpcugent/easybuild +# +# EasyBuild is free software: you can redistribute it and/or modify +# it under the terms of the GNU General Public License as published by +# the Free Software Foundation v2. +# +# EasyBuild is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with EasyBuild. If not, see . +## +""" +EasyBuild support for Trilinos, implemented as an easyblock +""" +import os +import re + +import easybuild.tools.toolkit as toolkit +from easybuild.easyblocks.c.cmake import CMake +from easybuild.tools.modules import get_software_root + + +class Trilinos(CMake): + """Support for building Trilinos.""" + # see http://trilinos.sandia.gov/Trilinos10CMakeQuickstart.txt + + def extra_options(self): + """Add extra config options specific to Trilinos.""" + extra_vars = { + 'shared_libs': [False, "BUild shared libs; if False, build static libs. (default: False)."], + 'openmp': [True, "Enable OpenMP support (default: True)"], + 'all_pkgs': [True, "Enable all packages (default: True)"], + } + return CMake.extra_options(self, extra_vars) + + def configure(self): + """Set some extra environment variables before configuring.""" + + # enable verbose output + #for x in ["CONFIGURE", "MAKEFILE"]: + # self.updatecfg('configopts', "-DTrilinos_VERBOSE_%s:BOOL=ON" % x) + + # compiler flags + self.updatecfg('configopts', '-DCMAKE_C_FLAGS="%s"' % os.getenv('CFLAGS')) + self.updatecfg('configopts', '-DCMAKE_CXX_FLAGS="%s"' % os.getenv('CXXFLAGS')) + self.updatecfg('configopts', '-DCMAKE_Fortran_FLAGS="%s"' % os.getenv('F90FLAGS')) + + # OpenMP + if self.getcfg('openmp'): + self.updatecfg('configopts', "-DTrilinos_ENABLE_OpenMP:BOOL=ON") + + # MPI + if self.toolkit().opts['usempi']: + self.updatecfg('configopts', "-DTPL_ENABLE_MPI:BOOL=ON") + + # shared libraries + if self.getcfg('shared_libs'): + self.updatecfg('configopts', "-DBUILD_SHARED_LIBS:BOOL=ON") + else: + self.updatecfg('configopts', "-DBUILD_SHARED_LIBS:BOOL=OFF") + + # release or debug version + if self.toolkit().opts['debug']: + self.updatecfg('configopts', "-DCMAKE_BUILD_TYPE:STRING=DEBUG") + else: + self.updatecfg('configopts', "-DCMAKE_BUILD_TYPE:STRING=RELEASE") + + # enable full testing + self.updatecfg('configopts', "-DTrilinos_ENABLE_TESTS:BOOL=ON") + self.updatecfg('configopts', "-DTrilinos_ENABLE_ALL_FORWARD_DEP_PACKAGES:BOOL=ON") + + lib_re = re.compile("^lib(.*).a$") + + # BLAS, LAPACK + for dep in ["BLAS", "LAPACK"]: + self.updatecfg('configopts', '-DTPL_ENABLE_%s:BOOL=ON' % dep) + libdirs = os.getenv('%s_LIB_DIR' % dep) + if self.toolkit().comp_family() == toolkit.GCC: + libdirs += ";%s/lib64" % get_software_root('GCC') + self.updatecfg('configopts', '-D%s_LIBRARY_DIRS="%s"' % (dep, libdirs)) + libs = os.getenv('%s_MT_STATIC_LIBS' % dep).split(',') + lib_names = ';'.join([lib_re.search(l).group(1) for l in libs]) + if self.toolkit().comp_family() == toolkit.GCC: + # explicitely specify static lib! + lib_names += ";libgfortran.a" + self.updatecfg('configopts', '-D%s_LIBRARY_NAMES="%s"' % (dep, lib_names)) + + # UMFPACK is part of SuiteSparse + suitesparse = get_software_root('SuiteSparse') + if suitesparse: + self.updatecfg('configopts', "-DTPL_ENABLE_UMFPACK:BOOL=ON") + incdirs, libdirs, libnames = [], [], [] + for lib in ["UMFPACK", "CHOLMOD", "COLAMD", "AMD"]: + incdirs.append(os.path.join(suitesparse, lib, "Include")) + libdirs.append(os.path.join(suitesparse, lib, "Lib")) + libnames.append(lib.lower()) + self.updatecfg('configopts', '-DUMFPACK_INCLUDE_DIRS:PATH="%s"' % ';'.join(incdirs)) + self.updatecfg('configopts', '-DUMFPACK_LIBRARY_DIRS:PATH="%s"' % ';'.join(libdirs)) + self.updatecfg('configopts', '-DUMFPACK_LIBRARY_NAMES:STRING="%s"' % ';'.join(libnames)) + + # BLACS + blacs = get_software_root('BLACS') + self.updatecfg('configopts', "-DTPL_ENABLE_BLACS:BOOL=ON") + self.updatecfg('configopts', '-DBLACS_INCLUDE_DIRS:PATH="%s"' % os.path.join(blacs, "include")) + self.updatecfg('configopts', '-DBLACS_LIBRARY_DIRS:PATH="%s"' % os.path.join(blacs, "lib")) + blacs_lib_names = os.getenv('BLACS_STATIC_LIBS').split(',') + blacs_lib_names = [lib_re.search(x).group(1) for x in blacs_lib_names] + self.updatecfg('configopts', '-DBLACS_LIBRARY_NAMES:STRING="%s"' % (';'.join(blacs_lib_names))) + + # ScaLAPACK + scalapack = get_software_root('ScaLAPACK') + self.updatecfg('configopts', "-DTPL_ENABLE_SCALAPACK:BOOL=ON") + self.updatecfg('configopts', '-DSCALAPACK_INCLUDE_DIRS:PATH="%s"' % os.path.join(scalapack, "include")) + self.updatecfg('configopts', '-DSCALAPACK_LIBRARY_DIRS:PATH="%s;%s"' % (os.path.join(scalapack, "lib"), + os.path.join(blacs, "lib"))) + + # PETSc + petsc = get_software_root('PETSc') + if petsc: + self.updatecfg('configopts', "-DTPL_ENABLE_PETSC:BOOL=ON") + incdirs = [os.path.join(petsc, "include")] + self.updatecfg('configopts', '-DPETSC_INCLUDE_DIRS:PATH="%s"' % ';'.join(incdirs)) + petsc_libdirs = [ + os.path.join(petsc, "lib"), + os.path.join(suitesparse, "UMFPACK", "Lib"), + os.path.join(suitesparse, "CHOLMOD", "Lib"), + os.path.join(suitesparse, "COLAMD", "Lib"), + os.path.join(suitesparse, "AMD", "Lib"), + os.getenv('FFTW_LIB_DIR'), + os.path.join(get_software_root('ParMETIS'), "Lib") + ] + self.updatecfg('configopts', '-DPETSC_LIBRARY_DIRS:PATH="%s"' % ';'.join(petsc_libdirs)) + petsc_libnames = ["petsc", "umfpack", "cholmod", "colamd", "amd", "parmetis", "metis"] + petsc_libnames += [lib_re.search(x).group(1) for x in os.getenv('FFTW_STATIC_LIBS').split(',')] + self.updatecfg('configopts', '-DPETSC_LIBRARY_NAMES:STRING="%s"' % ';'.join(petsc_libnames)) + + # other Third-Party Libraries (TPLs) + deps = self.cfg.dependencies() + builddeps = self.cfg.builddependencies() + ["SuiteSparse"] + deps = [dep['name'] for dep in deps if not dep['name'] in builddeps] + for dep in deps: + deproot = get_software_root(dep) + if deproot: + depmap = { + 'SCOTCH': 'Scotch', + } + dep = depmap.get(dep, dep) + self.updatecfg('configopts', "-DTPL_ENABLE_%s:BOOL=ON" % dep) + incdir = os.path.join(deproot, "include") + self.updatecfg('configopts', '-D%s_INCLUDE_DIRS:PATH="%s"' % (dep, incdir)) + libdir = os.path.join(deproot, "lib") + self.updatecfg('configopts', '-D%s_LIBRARY_DIRS:PATH="%s"' % (dep, libdir)) + + # packages + if self.getcfg('all_pkgs'): + self.updatecfg('configopts', "-DTrilinos_ENABLE_ALL_PACKAGES:BOOL=ON") + + else: + for pkg in self.getcfg('pkglist'): + self.updatecfg('configopts', "-DTrilinos_ENABLE_%s=ON" % pkg) + + # building in source dir not supported + try: + build_dir = "BUILD" + os.mkdir(build_dir) + os.chdir(build_dir) + except OSError, err: + self.log.error("Failed to create and move into build directory: %s" % err) + + # configure using cmake + CMake.configure(self, "..") + + def make(self): + """Build with make (verbose logging enabled).""" + CMake.make(self, verbose=True) + + def sanitycheck(self): + """Custom sanity check for Trilinos.""" + + if not self.getcfg('sanityCheckPaths'): + + # selection of libraries + libs = ["amesos", "anasazi", "aztecoo", "belos", "dpliris", "epetra", + "fei_base", "fei_trilinos", "galeri","globipack", "ifpack", + "intrepid", "isorropia", "kokkos", "komplex", "loca", "mesquite", + "ml", "ModeLaplace", "moertel", "moocho", "nox", "optipack", + "pamgen", "rtop", "rythmos", "sacado", "shards", "stratimikos", + "teuchos", "thyracore", "tpetra", "tpi", "triutils", "zoltan"] + + self.setcfg('sanityCheckPaths', {'files':["lib%s.a" % x for x in libs], + 'dirs':['bin', 'include']}) + + self.log.info("Customized sanity check paths: %s" % self.getcfg('sanityCheckPaths')) + + CMake.sanitycheck(self) \ No newline at end of file diff --git a/easybuild/easyconfigs/t/Trilinos/Trilinos-10.12-goalf-1.1.0-no-OFED-Python-2.7.3.eb b/easybuild/easyconfigs/t/Trilinos/Trilinos-10.12-goalf-1.1.0-no-OFED-Python-2.7.3.eb new file mode 100644 index 0000000000..e4369c41ec --- /dev/null +++ b/easybuild/easyconfigs/t/Trilinos/Trilinos-10.12-goalf-1.1.0-no-OFED-Python-2.7.3.eb @@ -0,0 +1,26 @@ +name = "Trilinos" +version = "10.12.2" +versionsuffix = "-Python-2.7.3" + +homepage = 'http://trilinos.sandia.gov/' +description = """The Trilinos Project is an effort to develop algorithms and enabling technologies +within an object-oriented software framework for the solution of large-scale, complex multi-physics +engineering and scientific problems. A unique design feature of Trilinos is its focus on packages.""" + +toolkit = {'name':'goalf', 'version': '1.1.0-no-OFED'} +toolkitopts = {'usempi': True} + +sourceURLs = ['http://trilinos.sandia.gov/download/files/'] +sources = ['%s-%s-Source.tar.gz' % (name.lower(), version)] + +patches = ['fix-parmetis.patch'] +# 'fix-petsc-3.3.patch'] + +# order matters! +# ParMETIS needs to go after SCOTCH (because of incldue dirs) +dependencies=[ + ('Boost', '1.49.0', versionsuffix ), + ('SCOTCH', '5.1.12b_esmumps'), + ('SuiteSparse', '3.7.0', '-withparmetis'), + ('ParMETIS', '4.0.2') + ] diff --git a/easybuild/easyconfigs/t/Trilinos/Trilinos-10.12-ictce-4.0.6-Python-2.7.3.eb b/easybuild/easyconfigs/t/Trilinos/Trilinos-10.12-ictce-4.0.6-Python-2.7.3.eb new file mode 100644 index 0000000000..247c017fab --- /dev/null +++ b/easybuild/easyconfigs/t/Trilinos/Trilinos-10.12-ictce-4.0.6-Python-2.7.3.eb @@ -0,0 +1,26 @@ +name = "Trilinos" +version = "10.12.2" +versionsuffix = "-Python-2.7.3" + +homepage = 'http://trilinos.sandia.gov/' +description = """The Trilinos Project is an effort to develop algorithms and enabling technologies +within an object-oriented software framework for the solution of large-scale, complex multi-physics +engineering and scientific problems. A unique design feature of Trilinos is its focus on packages.""" + +toolkit = {'name':'ictce', 'version': '4.0.6'} +toolkitopts = {'usempi': True} + +sourceURLs = ['http://trilinos.sandia.gov/download/files/'] +sources = ['%s-%s-Source.tar.gz' % (name.lower(), version)] + +patches = ['fix-parmetis.patch'] +# 'fix-petsc-3.3.patch'] + +# order matters! +# ParMETIS needs to go after SCOTCH (because of incldue dirs) +dependencies=[ + ('Boost', '1.49.0', versionsuffix ), + ('SCOTCH', '5.1.12b_esmumps'), + ('SuiteSparse', '3.7.0', '-withparmetis'), + ('ParMETIS', '4.0.2') + ] diff --git a/easybuild/easyconfigs/t/Trilinos/fix-parmetis.patch b/easybuild/easyconfigs/t/Trilinos/fix-parmetis.patch new file mode 100644 index 0000000000..2afe4f3e6b --- /dev/null +++ b/easybuild/easyconfigs/t/Trilinos/fix-parmetis.patch @@ -0,0 +1,12 @@ +diff -ru trilinos-10.12.2-Source.orig/packages/ml/src/Coarsen/ml_agg_ParMETIS.c trilinos-10.12.2-Source/packages/ml/src/Coarsen/ml_agg_ParMETIS.c +--- trilinos-10.12.2-Source.orig/packages/ml/src/Coarsen/ml_agg_ParMETIS.c 2012-08-02 19:44:06.000000000 +0200 ++++ trilinos-10.12.2-Source/packages/ml/src/Coarsen/ml_agg_ParMETIS.c 2012-08-12 08:20:41.812840502 +0200 +@@ -105,6 +105,8 @@ + #define idxtype int + #endif + ++typedef idx_t idxtype; ++ + int OPTIMAL_VALUE = 27*27; /* don't ask me why */ + + int PARMETIS_DEBUG_LEVEL = 0; From 1c6c6956281755eca8ab42edb4f2ae7b16c0feee Mon Sep 17 00:00:00 2001 From: Kenneth Hoste Date: Tue, 14 Aug 2012 11:42:48 +0200 Subject: [PATCH 657/798] add example ictce easyconfigs for Docutils, setuptools and Sphinx --- ...Docutils-0.9.1-ictce-4.0.6-Python-2.7.3.eb | 29 +++++++++++++++++++ .../Sphinx-1.1.3-ictce-4.0.6-Python.2.7.3.eb | 26 +++++++++++++++++ ...uptools-0.6c11-ictce-4.0.6-Python-2.7.3.eb | 27 +++++++++++++++++ 3 files changed, 82 insertions(+) create mode 100644 easybuild/easyconfigs/d/Docutils/Docutils-0.9.1-ictce-4.0.6-Python-2.7.3.eb create mode 100644 easybuild/easyconfigs/s/Sphinx/Sphinx-1.1.3-ictce-4.0.6-Python.2.7.3.eb create mode 100644 easybuild/easyconfigs/s/setuptools/setuptools-0.6c11-ictce-4.0.6-Python-2.7.3.eb diff --git a/easybuild/easyconfigs/d/Docutils/Docutils-0.9.1-ictce-4.0.6-Python-2.7.3.eb b/easybuild/easyconfigs/d/Docutils/Docutils-0.9.1-ictce-4.0.6-Python-2.7.3.eb new file mode 100644 index 0000000000..d3b6a8c03c --- /dev/null +++ b/easybuild/easyconfigs/d/Docutils/Docutils-0.9.1-ictce-4.0.6-Python-2.7.3.eb @@ -0,0 +1,29 @@ +easyblock = "PythonPackage" + +name = "Docutils" +version = "0.9.1" + +homepage = "http://docutils.sourceforge.net/" +description = """Docutils is an open-source text processing system for processing plaintext +documentation into useful formats, such as HTML, LaTeX, man-pages, open-document or XML. +It includes reStructuredText, the easy to read, easy to use, what-you-see-is-what-you-get +plaintext markup language.""" + +toolkit = {'name':'ictce','version': '4.0.6'} + +sourceURLs = [('http://sourceforge.net/projects/docutils/files/docutils/%s/' % version, 'download')] +sources = ["%s-%s.tar.gz" % (name.lower(), version)] + +python = "Python" +pythonversion = "2.7.3" + +versionsuffix = "-%s-%s" % (python, pythonversion) + +dependencies = [(python, pythonversion)] + +pylibdir = "lib/python%s/site-packages/%s" % (".".join(pythonversion.split(".")[0:2]), name.lower()) + +sanityCheckPaths = { + 'files': [], + 'dirs': ["bin", pylibdir] + } \ No newline at end of file diff --git a/easybuild/easyconfigs/s/Sphinx/Sphinx-1.1.3-ictce-4.0.6-Python.2.7.3.eb b/easybuild/easyconfigs/s/Sphinx/Sphinx-1.1.3-ictce-4.0.6-Python.2.7.3.eb new file mode 100644 index 0000000000..6b6005703c --- /dev/null +++ b/easybuild/easyconfigs/s/Sphinx/Sphinx-1.1.3-ictce-4.0.6-Python.2.7.3.eb @@ -0,0 +1,26 @@ +easyblock = "PythonPackage" + +name = "Sphinx" +version = "1.1.3" + +homepage = "http://sphinx.pocoo.org/" +description = """Sphinx is a tool that makes it easy to create intelligent and beautiful documentation. +It was originally created for the new Python documentation, and it has excellent facilities for the +documentation of Python projects, but C/C++ is already supported as well, and it is planned to add +special support for other languages as well.""" + +toolkit = {'name': "ictce", 'version': "4.0.6"} + +sourceURLs = ["http://pypi.python.org/packages/source/S/Sphinx/"] +sources = ["%s-%s.tar.gz" % (name.capitalize(), version)] + +python = "Python" +python_ver = "2.7.3" + +versionsuffix = "-%s-%s" % (python, python_ver) + +dependencies = [(python, python_ver), + ('Docutils', '0.9.1', versionsuffix), + ('Jinja2', '2.6', versionsuffix)] + +runtest = "test" \ No newline at end of file diff --git a/easybuild/easyconfigs/s/setuptools/setuptools-0.6c11-ictce-4.0.6-Python-2.7.3.eb b/easybuild/easyconfigs/s/setuptools/setuptools-0.6c11-ictce-4.0.6-Python-2.7.3.eb new file mode 100644 index 0000000000..0beaf5c299 --- /dev/null +++ b/easybuild/easyconfigs/s/setuptools/setuptools-0.6c11-ictce-4.0.6-Python-2.7.3.eb @@ -0,0 +1,27 @@ +easyblock = "PythonPackage" + +name = "setuptools" +version = "0.6c11" + +homepage = "http://pypi.python.org/pypi/setuptools/" +description = """Download, build, install, upgrade, and uninstall Python packages -- easily!""" + +toolkit = {'name':'ictce','version': '4.0.6'} + +sourceURLs = ['http://pypi.python.org/packages/source/s/%s/' % name] +sources = ["%s-%s.tar.gz" % (name, version)] + +python = "Python" +pythonversion = "2.7.3" + +versionsuffix = "-%s-%s" % (python, pythonversion) + +dependencies = [(python, pythonversion)] + +py_short_ver = ".".join(pythonversion.split(".")[0:2]) +pylibdir = "lib/python%s/site-packages/%s" % (py_short_ver, name) + +sanityCheckPaths = { + 'files': ["bin/easy_install", "%s-%s-py%s.egg" % (pylibdir, version, py_short_ver)], + 'dirs': [] + } \ No newline at end of file From 9cfccfbc8e466321e4ca4b2b59b3191a67c134be Mon Sep 17 00:00:00 2001 From: Kenneth Hoste Date: Tue, 14 Aug 2012 12:11:29 +0200 Subject: [PATCH 658/798] fix fetching settings for BLACS/ScaLAPACK in Trilinos easyblock, rename _INC to _INC_DIR --- easybuild/easyblocks/d/dolfin.py | 6 +++--- easybuild/easyblocks/p/petsc.py | 2 +- easybuild/easyblocks/t/trilinos.py | 12 +++++------- easybuild/tools/toolkit.py | 20 ++++++++++---------- 4 files changed, 19 insertions(+), 21 deletions(-) diff --git a/easybuild/easyblocks/d/dolfin.py b/easybuild/easyblocks/d/dolfin.py index 2855604f88..8550a7efc1 100644 --- a/easybuild/easyblocks/d/dolfin.py +++ b/easybuild/easyblocks/d/dolfin.py @@ -62,11 +62,11 @@ def configure(self): # specify MPI library self.updatecfg('configopts', ' -DMPI_COMPILER="%s"' % os.getenv('MPICC')) - if os.getenv('MPI_LIB_SHARED') and os.getenv('MPI_INC'): + if os.getenv('MPI_LIB_SHARED') and os.getenv('MPI_INC_DIR'): self.updatecfg('configopts', ' -DMPI_LIBRARY="%s"' % os.getenv('MPI_LIB_SHARED')) - self.updatecfg('configopts', ' -DMPI_INCLUDE_PATH="%s"' % os.getenv('MPI_INC')) + self.updatecfg('configopts', ' -DMPI_INCLUDE_PATH="%s"' % os.getenv('MPI_INC_DIR')) else: - self.log.error('MPI_LIB_SHARED or MPI_INC not set, could not determine MPI-related paths.') + self.log.error('MPI_LIB_SHARED or MPI_INC_DIR not set, could not determine MPI-related paths.') # specify Python paths python_short_ver = ".".join(get_software_version('Python').split(".")[0:2]) diff --git a/easybuild/easyblocks/p/petsc.py b/easybuild/easyblocks/p/petsc.py index aad515b63f..41fba9dd56 100644 --- a/easybuild/easyblocks/p/petsc.py +++ b/easybuild/easyblocks/p/petsc.py @@ -114,7 +114,7 @@ def configure(self): # BLACS, FFTW, ScaLAPACK for dep in ["BLACS", "FFTW", "ScaLAPACK"]: - inc = os.getenv('%s_INC' % dep.upper()) + inc = os.getenv('%s_INC_DIR' % dep.upper()) libdir = os.getenv('%s_LIB_DIR' % dep.upper()) libs = os.getenv('%s_STATIC_LIBS' % dep.upper()) if inc and libdir and libs: diff --git a/easybuild/easyblocks/t/trilinos.py b/easybuild/easyblocks/t/trilinos.py index 5215608204..e3e1d305cc 100644 --- a/easybuild/easyblocks/t/trilinos.py +++ b/easybuild/easyblocks/t/trilinos.py @@ -107,20 +107,18 @@ def configure(self): self.updatecfg('configopts', '-DUMFPACK_LIBRARY_NAMES:STRING="%s"' % ';'.join(libnames)) # BLACS - blacs = get_software_root('BLACS') self.updatecfg('configopts', "-DTPL_ENABLE_BLACS:BOOL=ON") - self.updatecfg('configopts', '-DBLACS_INCLUDE_DIRS:PATH="%s"' % os.path.join(blacs, "include")) - self.updatecfg('configopts', '-DBLACS_LIBRARY_DIRS:PATH="%s"' % os.path.join(blacs, "lib")) + self.updatecfg('configopts', '-DBLACS_INCLUDE_DIRS:PATH="%s"' % os.getenv('BLACS_INC_DIR')) + self.updatecfg('configopts', '-DBLACS_LIBRARY_DIRS:PATH="%s"' % os.getenv('BLACS_LIB_DIR')) blacs_lib_names = os.getenv('BLACS_STATIC_LIBS').split(',') blacs_lib_names = [lib_re.search(x).group(1) for x in blacs_lib_names] self.updatecfg('configopts', '-DBLACS_LIBRARY_NAMES:STRING="%s"' % (';'.join(blacs_lib_names))) # ScaLAPACK - scalapack = get_software_root('ScaLAPACK') self.updatecfg('configopts', "-DTPL_ENABLE_SCALAPACK:BOOL=ON") - self.updatecfg('configopts', '-DSCALAPACK_INCLUDE_DIRS:PATH="%s"' % os.path.join(scalapack, "include")) - self.updatecfg('configopts', '-DSCALAPACK_LIBRARY_DIRS:PATH="%s;%s"' % (os.path.join(scalapack, "lib"), - os.path.join(blacs, "lib"))) + self.updatecfg('configopts', '-DSCALAPACK_INCLUDE_DIRS:PATH="%s"' % os.getenv('SCALAPACK_INC_DIR')) + self.updatecfg('configopts', '-DSCALAPACK_LIBRARY_DIRS:PATH="%s;%s"' % (os.getenv('SCALAPACK_LIB_DIR'), + os.getenv('BLACS_LIB_DIR'))) # PETSc petsc = get_software_root('PETSc') diff --git a/easybuild/tools/toolkit.py b/easybuild/tools/toolkit.py index 094ecfe4c7..8c2ec0edbb 100644 --- a/easybuild/tools/toolkit.py +++ b/easybuild/tools/toolkit.py @@ -377,7 +377,7 @@ def prepareBLACS(self): # order matters! blacs_libs = ["blacsCinit", "blacsF77init", "blacs"] - self.vars['BLACS_INC'] = os.path.join(blacs, "include") + self.vars['BLACS_INC_DIR'] = os.path.join(blacs, "include") self.vars['BLACS_LIB_DIR'] = os.path.join(blacs, "lib") self.vars['BLACS_STATIC_LIBS'] = ','.join(["lib%s.a" % x for x in blacs_libs]) @@ -414,7 +414,7 @@ def prepareFFTW(self): self.vars['LIBFFT'] = ','.join(["-l%s" % x for x in fftw_libs]) - self.vars['FFTW_INC'] = os.path.join(fftw, "include") + self.vars['FFTW_INC_DIR'] = os.path.join(fftw, "include") self.vars['FFTW_LIB_DIR'] = os.path.join(fftw, "lib") self.vars['FFTW_STATIC_LIBS'] = ','.join(["lib%s.a" % x for x in fftw_libs]) @@ -629,13 +629,13 @@ def prepareIMKL(self): self.vars['BLAS_LAPACK_MT_STATIC_LIBS'] = self.vars['LAPACK_MT_STATIC_LIBS'] # BLACS library - self.vars['BLACS_INC'] = os.path.join(mklroot, "mkl", "include") + self.vars['BLACS_INC_DIR'] = os.path.join(mklroot, "mkl", "include") self.vars['BLACS_LIB_DIR'] = libs_dir self.vars['BLACS_STATIC_LIBS'] = ','.join(["libmkl_%s.a" % x for x in blacs_libs]) self.vars['BLACS_MT_STATIC_LIBS'] = self.vars['BLACS_STATIC_LIBS'] # sequential ScaLAPACK - self.vars['SCALAPACK_INC'] = os.path.join(mklroot, "mkl", "include") + self.vars['SCALAPACK_INC_DIR'] = os.path.join(mklroot, "mkl", "include") self.vars['SCALAPACK_LIB_DIR'] = libs_dir suffix = "-Wl,--end-group -Wl:-Bdynamic" @@ -657,7 +657,7 @@ def prepareIMKL(self): self.vars['LIBFFT'] = ' '.join(["-Wl:-Bstatic", ' '.join(["-%s" % x for x in fftw_libs]), "-Wl:-Bdynamic"]) - self.vars['FFTW_INC'] = os.path.join(mklroot, "mkl", "include", "fftw") + self.vars['FFTW_INC_DIR'] = os.path.join(mklroot, "mkl", "include", "fftw") self.vars['FFTW_LIB_DIR'] = libs_dir fftw_static_libs = ["lib%s.a" % x for x in fftw_libs] self.vars['FFTW_STATIC_LIBS'] = ','.join(fftw_static_libs + [self.vars['BLAS_STATIC_LIBS'], @@ -713,7 +713,7 @@ def prepareIMPI(self): self.log.error("Don't know how to set IMPI paths for old versions.") else: mpi_lib = os.path.join(impiroot, 'lib64', 'libmpi') - self.vars['MPI_INC'] = os.path.join(impiroot, 'include64') + self.vars['MPI_INC_DIR'] = os.path.join(impiroot, 'include64') self.vars['MPI_LIB_SHARED'] = "%s.so" % mpi_lib self.vars['MPI_LIB_STATIC'] = "%s.a" % mpi_lib @@ -737,7 +737,7 @@ def prepareQLogicMPI(self): self.vars[i] = self.vars["MPI%s" % i] qlogic = get_software_root('QLogicMPI') - self.vars['MPI_INC'] = "%s/include" % qlogic + self.vars['MPI_INC_DIR'] = "%s/include" % qlogic self.vars['MPI_LIB_SHARED'] = "%s/lib64/libmpich.so" % qlogic def prepareLAPACK(self): @@ -775,7 +775,7 @@ def prepareMPICH2(self): self.vars[i] = self.vars["MPI%s" % i] mpich2 = get_software_root('MPICH2') - self.vars['MPI_INC'] = "%s/include" % mpich2 + self.vars['MPI_INC_DIR'] = "%s/include" % mpich2 self.vars['MPI_LIB_SHARED'] = "%s/lib/libmpich.so" % mpich2 self.vars['MPI_LIB_STATIC'] = "%s/lib/libmpich.a" % mpich2 else: @@ -819,7 +819,7 @@ def prepareOpenMPI(self): self.vars['MPI_LIB_STATIC'] = "%s/lib/libmpi.a" % openmpi self.vars['MPI_LIB_SHARED'] = "%s/lib/libmpi.so" % openmpi - self.vars['MPI_INC'] = "%s/include" % openmpi + self.vars['MPI_INC_DIR'] = "%s/include" % openmpi self.prepareSimpleMPI() def prepareScaLAPACK(self): @@ -834,7 +834,7 @@ def prepareScaLAPACK(self): self.vars['LIBSCALAPACK_MT'] = "%s %s -lpthread" % (self.vars['LIBSCALAPACK'], self.vars.get('LIBSCALAPACK_MT', '')) - self.vars['SCALAPACK_INC'] = os.path.join(scalapack, "include") + self.vars['SCALAPACK_INC_DIR'] = os.path.join(scalapack, "include") self.vars['SCALAPACK_LIB_DIR'] = os.path.join(scalapack, "lib") self.vars['SCALAPACK_STATIC_LIBS'] = "libscalapack.a" self.vars['SCALAPACK_MT_STATIC_LIBS'] = self.vars['SCALAPACK_STATIC_LIBS'] From fa3b20d13a3749b5ce937f43ccad6d0245a45732 Mon Sep 17 00:00:00 2001 From: Kenneth Hoste Date: Tue, 14 Aug 2012 13:04:36 +0200 Subject: [PATCH 659/798] add CMake as build dependency for Trilinos --- .../Trilinos/Trilinos-10.12-goalf-1.1.0-no-OFED-Python-2.7.3.eb | 2 ++ 1 file changed, 2 insertions(+) diff --git a/easybuild/easyconfigs/t/Trilinos/Trilinos-10.12-goalf-1.1.0-no-OFED-Python-2.7.3.eb b/easybuild/easyconfigs/t/Trilinos/Trilinos-10.12-goalf-1.1.0-no-OFED-Python-2.7.3.eb index e4369c41ec..3985cfd5a5 100644 --- a/easybuild/easyconfigs/t/Trilinos/Trilinos-10.12-goalf-1.1.0-no-OFED-Python-2.7.3.eb +++ b/easybuild/easyconfigs/t/Trilinos/Trilinos-10.12-goalf-1.1.0-no-OFED-Python-2.7.3.eb @@ -24,3 +24,5 @@ dependencies=[ ('SuiteSparse', '3.7.0', '-withparmetis'), ('ParMETIS', '4.0.2') ] + +builddependencies = [('CMake', '2.8.4')] From 54765c8592d5f233a0fff5925119d33c84ff2477 Mon Sep 17 00:00:00 2001 From: Kenneth Hoste Date: Tue, 14 Aug 2012 14:23:18 +0200 Subject: [PATCH 660/798] fix sanity check for Trilinos, define FFLAGS and F90FLAGS for both GCC and ifort toolkits --- easybuild/easyblocks/t/trilinos.py | 4 ++-- easybuild/tools/toolkit.py | 9 +++++---- 2 files changed, 7 insertions(+), 6 deletions(-) diff --git a/easybuild/easyblocks/t/trilinos.py b/easybuild/easyblocks/t/trilinos.py index e3e1d305cc..1db44809e3 100644 --- a/easybuild/easyblocks/t/trilinos.py +++ b/easybuild/easyblocks/t/trilinos.py @@ -51,7 +51,7 @@ def configure(self): # compiler flags self.updatecfg('configopts', '-DCMAKE_C_FLAGS="%s"' % os.getenv('CFLAGS')) self.updatecfg('configopts', '-DCMAKE_CXX_FLAGS="%s"' % os.getenv('CXXFLAGS')) - self.updatecfg('configopts', '-DCMAKE_Fortran_FLAGS="%s"' % os.getenv('F90FLAGS')) + self.updatecfg('configopts', '-DCMAKE_Fortran_FLAGS="%s"' % os.getenv('FFLAGS')) # OpenMP if self.getcfg('openmp'): @@ -193,7 +193,7 @@ def sanitycheck(self): "pamgen", "rtop", "rythmos", "sacado", "shards", "stratimikos", "teuchos", "thyracore", "tpetra", "tpi", "triutils", "zoltan"] - self.setcfg('sanityCheckPaths', {'files':["lib%s.a" % x for x in libs], + self.setcfg('sanityCheckPaths', {'files':[os.path.join("lib", "lib%s.a" % x) for x in libs], 'dirs':['bin', 'include']}) self.log.info("Customized sanity check paths: %s" % self.getcfg('sanityCheckPaths')) diff --git a/easybuild/tools/toolkit.py b/easybuild/tools/toolkit.py index 8c2ec0edbb..92760eb6cd 100644 --- a/easybuild/tools/toolkit.py +++ b/easybuild/tools/toolkit.py @@ -457,13 +457,13 @@ def prepareGCC(self, withMPI=True): copts.append("std=%s" % self.opts['cstd']) if len(flags + copts) > 0: - self.vars['CFLAGS'] = "%s" % ('-' + ' -'.join(flags + copts)) + self.vars['CFLAGS'] = '-' + ' -'.join(flags + copts) if len(flags) > 0: - self.vars['CXXFLAGS'] = "%s" % ('-' + ' -'.join(flags)) + self.vars['CXXFLAGS'] = '-' + ' -'.join(flags) if len(flags) > 0: - self.vars['FFLAGS'] = "%s" % ('-' + ' -'.join(flags)) + self.vars['FFLAGS'] = '-' + ' -'.join(flags) if len(flags) > 0: - self.vars['F90FLAGS'] = "%s" % ('-' + ' -'.join(flags)) + self.vars['F90FLAGS'] = '-' + ' -'.join(flags) ## to get rid of lots of problems with libgfortranbegin ## or remove the system gcc-gfortran @@ -547,6 +547,7 @@ def prepareIfort(self): if len(flags) > 0: self.vars['FFLAGS'] = '-' + ' -'.join(flags) + self.vars['F90FLAGS'] = '-' + ' -'.join(flags) self.prepareIntelCompiler('ifort') From e1b66c067875454a7a9cfbb53e4d5dbe6fbcd71a Mon Sep 17 00:00:00 2001 From: Kenneth Hoste Date: Tue, 14 Aug 2012 14:24:17 +0200 Subject: [PATCH 661/798] slight cleanup in toolkit.py --- easybuild/tools/toolkit.py | 2 -- 1 file changed, 2 deletions(-) diff --git a/easybuild/tools/toolkit.py b/easybuild/tools/toolkit.py index 92760eb6cd..70350ff3c9 100644 --- a/easybuild/tools/toolkit.py +++ b/easybuild/tools/toolkit.py @@ -460,9 +460,7 @@ def prepareGCC(self, withMPI=True): self.vars['CFLAGS'] = '-' + ' -'.join(flags + copts) if len(flags) > 0: self.vars['CXXFLAGS'] = '-' + ' -'.join(flags) - if len(flags) > 0: self.vars['FFLAGS'] = '-' + ' -'.join(flags) - if len(flags) > 0: self.vars['F90FLAGS'] = '-' + ' -'.join(flags) ## to get rid of lots of problems with libgfortranbegin From 7aed447d47b15883feca4ccdbb355e2b7973c970 Mon Sep 17 00:00:00 2001 From: Toon Willems Date: Tue, 14 Aug 2012 14:42:04 +0200 Subject: [PATCH 662/798] create_in_builddir default false --- easybuild/framework/application.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/easybuild/framework/application.py b/easybuild/framework/application.py index fd730ed13d..01dd1dd443 100644 --- a/easybuild/framework/application.py +++ b/easybuild/framework/application.py @@ -917,7 +917,7 @@ def prepare(self): """ self.toolkit().prepare(self.getcfg('onlytkmod')) self.startfrom() - self.make_devel_module() + self.make_devel_module(create_in_builddir=True) def configure(self, cmd_prefix=''): @@ -1100,11 +1100,11 @@ def make_module(self, fake=False): self.log.info("Added modulefile: %s" % (self.moduleGenerator.filename)) if not fake: - self.make_devel_module(create_in_builddir=False) + self.make_devel_module() return modpath - def make_devel_module(self, create_in_builddir=True): + def make_devel_module(self, create_in_builddir=False): """ Create a develop module file which sets environment based on the build Usage: module load name, which loads the module you want to use. $EBDEVELNAME should then be the full path From 55e64988c3a8ac9b441cf7ec0166ba3498dd9792 Mon Sep 17 00:00:00 2001 From: Toon Willems Date: Tue, 14 Aug 2012 14:44:22 +0200 Subject: [PATCH 663/798] Add prepare step to regtest --- easybuild/scripts/regtest.py | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/easybuild/scripts/regtest.py b/easybuild/scripts/regtest.py index 3f84d2fa90..525d79e232 100755 --- a/easybuild/scripts/regtest.py +++ b/easybuild/scripts/regtest.py @@ -32,8 +32,7 @@ * make builddir * unpacking * patching - * prepare toolkit - * setup startfrom + * prepare * configure * make * test @@ -186,8 +185,7 @@ def build_packages(packages, output_dir): perform_step("make builddir", app, lambda x: x.make_builddir()) perform_step("unpacking", app, lambda x: x.unpack_src()) perform_step("patching", app, lambda x: x.apply_patch()) - perform_step("prepare toolkit", app, lambda x: x.toolkit().prepare(x.getcfg('onlytkmod'))) - perform_step("setup startfrom", app, lambda x: x.startfrom()) + perform_step("prepare", app, lambda x: x.prepare()) perform_step('configure', app, lambda x: x.configure()) perform_step('make', app, lambda x: x.make()) perform_step('test', app, lambda x: x.test()) From 2b2cbc8bb80dee572212ead14b2115193a5ce76b Mon Sep 17 00:00:00 2001 From: Kenneth Hoste Date: Tue, 14 Aug 2012 15:11:41 +0200 Subject: [PATCH 664/798] also specify Fortran compiler and flags in CMake configure --- easybuild/easyblocks/c/cmake.py | 3 +++ 1 file changed, 3 insertions(+) diff --git a/easybuild/easyblocks/c/cmake.py b/easybuild/easyblocks/c/cmake.py index 65b43e479a..b6ff23c345 100644 --- a/easybuild/easyblocks/c/cmake.py +++ b/easybuild/easyblocks/c/cmake.py @@ -41,6 +41,9 @@ def configure(self, builddir=None): compilers += "-DCMAKE_CXX_FLAGS='%s' -DCMAKE_CXX_COMPILER='%s' " % (os.getenv('CXXFLAGS'), os.getenv('CXX')) + compilers += "-DCMAKE_Fortran_FLAGS='%s' -DCMAKE_Fortran_COMPILER='%s' " % (os.getenv('FFLAGS'), + os.getenv('F90')) + command = "%s cmake -DCMAKE_INSTALL_PREFIX=%s %s %s %s" % (self.getcfg('preconfigopts'), self.installdir, compilers, From 4076c1e82274ede3d5dcb5d12de1018d2a084446 Mon Sep 17 00:00:00 2001 From: Kenneth Hoste Date: Tue, 14 Aug 2012 15:30:09 +0200 Subject: [PATCH 665/798] only enable BLACS/ScaLAPACK support if they're available as dependencies --- easybuild/easyblocks/t/trilinos.py | 22 ++++++++++++---------- 1 file changed, 12 insertions(+), 10 deletions(-) diff --git a/easybuild/easyblocks/t/trilinos.py b/easybuild/easyblocks/t/trilinos.py index 1db44809e3..86d27b51e2 100644 --- a/easybuild/easyblocks/t/trilinos.py +++ b/easybuild/easyblocks/t/trilinos.py @@ -107,18 +107,20 @@ def configure(self): self.updatecfg('configopts', '-DUMFPACK_LIBRARY_NAMES:STRING="%s"' % ';'.join(libnames)) # BLACS - self.updatecfg('configopts', "-DTPL_ENABLE_BLACS:BOOL=ON") - self.updatecfg('configopts', '-DBLACS_INCLUDE_DIRS:PATH="%s"' % os.getenv('BLACS_INC_DIR')) - self.updatecfg('configopts', '-DBLACS_LIBRARY_DIRS:PATH="%s"' % os.getenv('BLACS_LIB_DIR')) - blacs_lib_names = os.getenv('BLACS_STATIC_LIBS').split(',') - blacs_lib_names = [lib_re.search(x).group(1) for x in blacs_lib_names] - self.updatecfg('configopts', '-DBLACS_LIBRARY_NAMES:STRING="%s"' % (';'.join(blacs_lib_names))) + if get_software_root('BLACS'): + self.updatecfg('configopts', "-DTPL_ENABLE_BLACS:BOOL=ON") + self.updatecfg('configopts', '-DBLACS_INCLUDE_DIRS:PATH="%s"' % os.getenv('BLACS_INC_DIR')) + self.updatecfg('configopts', '-DBLACS_LIBRARY_DIRS:PATH="%s"' % os.getenv('BLACS_LIB_DIR')) + blacs_lib_names = os.getenv('BLACS_STATIC_LIBS').split(',') + blacs_lib_names = [lib_re.search(x).group(1) for x in blacs_lib_names] + self.updatecfg('configopts', '-DBLACS_LIBRARY_NAMES:STRING="%s"' % (';'.join(blacs_lib_names))) # ScaLAPACK - self.updatecfg('configopts', "-DTPL_ENABLE_SCALAPACK:BOOL=ON") - self.updatecfg('configopts', '-DSCALAPACK_INCLUDE_DIRS:PATH="%s"' % os.getenv('SCALAPACK_INC_DIR')) - self.updatecfg('configopts', '-DSCALAPACK_LIBRARY_DIRS:PATH="%s;%s"' % (os.getenv('SCALAPACK_LIB_DIR'), - os.getenv('BLACS_LIB_DIR'))) + if get_software_root('ScaLAPACK'): + self.updatecfg('configopts', "-DTPL_ENABLE_SCALAPACK:BOOL=ON") + self.updatecfg('configopts', '-DSCALAPACK_INCLUDE_DIRS:PATH="%s"' % os.getenv('SCALAPACK_INC_DIR')) + self.updatecfg('configopts', '-DSCALAPACK_LIBRARY_DIRS:PATH="%s;%s"' % (os.getenv('SCALAPACK_LIB_DIR'), + os.getenv('BLACS_LIB_DIR'))) # PETSc petsc = get_software_root('PETSc') From 75894759237178221b8fce9980dcacc1fc16937d Mon Sep 17 00:00:00 2001 From: Kenneth Hoste Date: Tue, 14 Aug 2012 15:58:57 +0200 Subject: [PATCH 666/798] set -DMPICH_IGNORE_CXX_SEEK for Intel MPI and MPICH2 --- easybuild/easyblocks/t/trilinos.py | 13 ++++++++++--- 1 file changed, 10 insertions(+), 3 deletions(-) diff --git a/easybuild/easyblocks/t/trilinos.py b/easybuild/easyblocks/t/trilinos.py index 86d27b51e2..0c506f02a3 100644 --- a/easybuild/easyblocks/t/trilinos.py +++ b/easybuild/easyblocks/t/trilinos.py @@ -49,9 +49,16 @@ def configure(self): # self.updatecfg('configopts', "-DTrilinos_VERBOSE_%s:BOOL=ON" % x) # compiler flags - self.updatecfg('configopts', '-DCMAKE_C_FLAGS="%s"' % os.getenv('CFLAGS')) - self.updatecfg('configopts', '-DCMAKE_CXX_FLAGS="%s"' % os.getenv('CXXFLAGS')) - self.updatecfg('configopts', '-DCMAKE_Fortran_FLAGS="%s"' % os.getenv('FFLAGS')) + cflags = os.getenv('CFLAGS') + cxxflags = os.getenv('CXXFLAGS') + fflags = os.getenv('FFLAGS') + if self.toolkit().mpi_type() in [toolkit.INTEL, toolkit.MPICH2]: + cflags += " -DMPICH_IGNORE_CXX_SEEK" + cxxflags += " -DMPICH_IGNORE_CXX_SEEK" + fflags += " -DMPICH_IGNORE_CXX_SEEK" + self.updatecfg('configopts', '-DCMAKE_C_FLAGS="%s"' % cflags) + self.updatecfg('configopts', '-DCMAKE_CXX_FLAGS="%s"' % cxxflags) + self.updatecfg('configopts', '-DCMAKE_Fortran_FLAGS="%s"' % fflags) # OpenMP if self.getcfg('openmp'): From b4f6247ae07cbaef3000ffd789f37ddeaf8918b4 Mon Sep 17 00:00:00 2001 From: Kenneth Hoste Date: Tue, 14 Aug 2012 17:17:27 +0200 Subject: [PATCH 667/798] add skip_pkgs option for Trilinos, adjust sanity check accordingly --- easybuild/easyblocks/t/trilinos.py | 26 +++++++++++++------ ...Trilinos-10.12-ictce-4.0.6-Python-2.7.3.eb | 4 +++ 2 files changed, 22 insertions(+), 8 deletions(-) diff --git a/easybuild/easyblocks/t/trilinos.py b/easybuild/easyblocks/t/trilinos.py index 0c506f02a3..52f1f3c08e 100644 --- a/easybuild/easyblocks/t/trilinos.py +++ b/easybuild/easyblocks/t/trilinos.py @@ -38,6 +38,7 @@ def extra_options(self): 'shared_libs': [False, "BUild shared libs; if False, build static libs. (default: False)."], 'openmp': [True, "Enable OpenMP support (default: True)"], 'all_pkgs': [True, "Enable all packages (default: True)"], + 'skip_pkgs': [[], "List of packages to skip (default: [])"] } return CMake.extra_options(self, extra_vars) @@ -52,10 +53,12 @@ def configure(self): cflags = os.getenv('CFLAGS') cxxflags = os.getenv('CXXFLAGS') fflags = os.getenv('FFLAGS') + if self.toolkit().mpi_type() in [toolkit.INTEL, toolkit.MPICH2]: cflags += " -DMPICH_IGNORE_CXX_SEEK" cxxflags += " -DMPICH_IGNORE_CXX_SEEK" fflags += " -DMPICH_IGNORE_CXX_SEEK" + self.updatecfg('configopts', '-DCMAKE_C_FLAGS="%s"' % cflags) self.updatecfg('configopts', '-DCMAKE_CXX_FLAGS="%s"' % cxxflags) self.updatecfg('configopts', '-DCMAKE_Fortran_FLAGS="%s"' % fflags) @@ -174,6 +177,12 @@ def configure(self): for pkg in self.getcfg('pkglist'): self.updatecfg('configopts', "-DTrilinos_ENABLE_%s=ON" % pkg) + # packages to skip + skip_pkgs = self.getcfg('skip_pkgs') + if skip_pkgs: + for pkg in skip_pkgs: + self.updatecfg('configopts', "-DTrilinos_ENABLE_%s:BOOL=OFF" % pkg) + # building in source dir not supported try: build_dir = "BUILD" @@ -195,14 +204,15 @@ def sanitycheck(self): if not self.getcfg('sanityCheckPaths'): # selection of libraries - libs = ["amesos", "anasazi", "aztecoo", "belos", "dpliris", "epetra", - "fei_base", "fei_trilinos", "galeri","globipack", "ifpack", - "intrepid", "isorropia", "kokkos", "komplex", "loca", "mesquite", - "ml", "ModeLaplace", "moertel", "moocho", "nox", "optipack", - "pamgen", "rtop", "rythmos", "sacado", "shards", "stratimikos", - "teuchos", "thyracore", "tpetra", "tpi", "triutils", "zoltan"] - - self.setcfg('sanityCheckPaths', {'files':[os.path.join("lib", "lib%s.a" % x) for x in libs], + libs = ["Amesos", "Anasazi", "AztecOO", "Belos", "Epetra", "Galeri", + "GlobiPack", "Ifpack", "Intrepid", "Isorropia", "Kokkos", + "Komplex", "LOCA", "Mesquite", "ML", "Moertel", "MOOCHO", "NOX", + "Pamgen", "RTOp", "Rythmos", "Sacado", "Shards", "Stratimikos", + "Teuchos", "Tpetra", "Triutils", "Zoltan"] + + libs = [l for l in libs if not l in self.getcfg('skip_pkgs')] + + self.setcfg('sanityCheckPaths', {'files':[os.path.join("lib", "lib%s.a" % x.lower()) for x in libs], 'dirs':['bin', 'include']}) self.log.info("Customized sanity check paths: %s" % self.getcfg('sanityCheckPaths')) diff --git a/easybuild/easyconfigs/t/Trilinos/Trilinos-10.12-ictce-4.0.6-Python-2.7.3.eb b/easybuild/easyconfigs/t/Trilinos/Trilinos-10.12-ictce-4.0.6-Python-2.7.3.eb index 247c017fab..00da1f66a1 100644 --- a/easybuild/easyconfigs/t/Trilinos/Trilinos-10.12-ictce-4.0.6-Python-2.7.3.eb +++ b/easybuild/easyconfigs/t/Trilinos/Trilinos-10.12-ictce-4.0.6-Python-2.7.3.eb @@ -24,3 +24,7 @@ dependencies=[ ('SuiteSparse', '3.7.0', '-withparmetis'), ('ParMETIS', '4.0.2') ] + +# Kokkos build is broken with ictce/4.0.6 +# yields internal error: 0_1670 for packages/kokkos/LinAlg/Kokkos_DefaultArithmetic.hpp (line 827) +skip_pkgs = ["Kokkos"] \ No newline at end of file From c6b72814e67b139fe9ce61e66ac4533162ff7b76 Mon Sep 17 00:00:00 2001 From: Kenneth Hoste Date: Tue, 14 Aug 2012 17:18:31 +0200 Subject: [PATCH 668/798] enable -fPIC for Trilinos --- .../Trilinos/Trilinos-10.12-goalf-1.1.0-no-OFED-Python-2.7.3.eb | 2 +- .../t/Trilinos/Trilinos-10.12-ictce-4.0.6-Python-2.7.3.eb | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/easybuild/easyconfigs/t/Trilinos/Trilinos-10.12-goalf-1.1.0-no-OFED-Python-2.7.3.eb b/easybuild/easyconfigs/t/Trilinos/Trilinos-10.12-goalf-1.1.0-no-OFED-Python-2.7.3.eb index 3985cfd5a5..059a588049 100644 --- a/easybuild/easyconfigs/t/Trilinos/Trilinos-10.12-goalf-1.1.0-no-OFED-Python-2.7.3.eb +++ b/easybuild/easyconfigs/t/Trilinos/Trilinos-10.12-goalf-1.1.0-no-OFED-Python-2.7.3.eb @@ -8,7 +8,7 @@ within an object-oriented software framework for the solution of large-scale, co engineering and scientific problems. A unique design feature of Trilinos is its focus on packages.""" toolkit = {'name':'goalf', 'version': '1.1.0-no-OFED'} -toolkitopts = {'usempi': True} +toolkitopts = {'usempi': True, 'pic': True} sourceURLs = ['http://trilinos.sandia.gov/download/files/'] sources = ['%s-%s-Source.tar.gz' % (name.lower(), version)] diff --git a/easybuild/easyconfigs/t/Trilinos/Trilinos-10.12-ictce-4.0.6-Python-2.7.3.eb b/easybuild/easyconfigs/t/Trilinos/Trilinos-10.12-ictce-4.0.6-Python-2.7.3.eb index 00da1f66a1..3d145f177c 100644 --- a/easybuild/easyconfigs/t/Trilinos/Trilinos-10.12-ictce-4.0.6-Python-2.7.3.eb +++ b/easybuild/easyconfigs/t/Trilinos/Trilinos-10.12-ictce-4.0.6-Python-2.7.3.eb @@ -8,7 +8,7 @@ within an object-oriented software framework for the solution of large-scale, co engineering and scientific problems. A unique design feature of Trilinos is its focus on packages.""" toolkit = {'name':'ictce', 'version': '4.0.6'} -toolkitopts = {'usempi': True} +toolkitopts = {'usempi': True, 'pic': True} sourceURLs = ['http://trilinos.sandia.gov/download/files/'] sources = ['%s-%s-Source.tar.gz' % (name.lower(), version)] From 16ff184a7efec7a6bce2145c85b55d3ba36b2841 Mon Sep 17 00:00:00 2001 From: Kenneth Hoste Date: Tue, 14 Aug 2012 18:13:52 +0200 Subject: [PATCH 669/798] add Trilinos and zlib as DOLFIN dependencies --- easybuild/easyblocks/d/dolfin.py | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/easybuild/easyblocks/d/dolfin.py b/easybuild/easyblocks/d/dolfin.py index 8550a7efc1..de821d5ba2 100644 --- a/easybuild/easyblocks/d/dolfin.py +++ b/easybuild/easyblocks/d/dolfin.py @@ -35,7 +35,7 @@ def configure(self): # make sure that required dependencies are loaded deps = ['Armadillo', 'Boost', 'CGAL', 'MTL4', 'ParMETIS', 'PETSc', 'Python', - 'SCOTCH', 'Sphinx', 'SLEPc', 'SuiteSparse', 'UFC'] + 'SCOTCH', 'Sphinx', 'SLEPc', 'SuiteSparse', 'Trilinos', 'UFC', 'zlib'] depsdict = {} for dep in deps: deproot = get_software_root(dep) @@ -109,6 +109,9 @@ def configure(self): # MTL4 self.updatecfg('configopts', '-DMTL4_DIR:PATH="%s"' % depsdict['MTL4']) + # zlib + self.updatecfg('configopts', '-DZLIB_DIR=%s' % depsdict['zlib']) + # set correct openmp options openmp = self.toolkit().get_openmp_flag() self.updatecfg('configopts', ' -DOpenMP_CXX_FLAGS="%s"' % openmp) From 355a601aacc00c2cbf56e9b5b1a58974b07f9de1 Mon Sep 17 00:00:00 2001 From: Kenneth Hoste Date: Tue, 14 Aug 2012 18:15:47 +0200 Subject: [PATCH 670/798] cleaned up example easyconfigs for DOLFIN, add remaining dependencies --- ...-1.0.0-goalf-1.1.0-no-OFED-Python-2.7.3.eb | 28 ++++++++++-------- .../DOLFIN-1.0.0-ictce-4.0.6-Python-2.7.3.eb | 29 ++++++++++++------- 2 files changed, 34 insertions(+), 23 deletions(-) diff --git a/easybuild/easyconfigs/d/DOLFIN/DOLFIN-1.0.0-goalf-1.1.0-no-OFED-Python-2.7.3.eb b/easybuild/easyconfigs/d/DOLFIN/DOLFIN-1.0.0-goalf-1.1.0-no-OFED-Python-2.7.3.eb index 470c2ca8f9..c6d05d5eb3 100644 --- a/easybuild/easyconfigs/d/DOLFIN/DOLFIN-1.0.0-goalf-1.1.0-no-OFED-Python-2.7.3.eb +++ b/easybuild/easyconfigs/d/DOLFIN/DOLFIN-1.0.0-goalf-1.1.0-no-OFED-Python-2.7.3.eb @@ -1,12 +1,12 @@ -name='DOLFIN' -version='1.0.0' +name = 'DOLFIN' +version = '1.0.0' -homepage='https://launchpad.net/dolfin' -description="""DOLFIN is the C++/Python interface of FEniCS, providing a consistent PSE +homepage = 'https://launchpad.net/dolfin' +description = """DOLFIN is the C++/Python interface of FEniCS, providing a consistent PSE (Problem Solving Environment) for ordinary and partial differential equations.""" -toolkit={'name':'goalf','version':'1.1.0-no-OFED'} -toolkitopts={'usempi':True, 'packed-groups':False} +toolkit = {'name': 'goalf', 'version': '1.1.0-no-OFED'} +toolkitopts = {'usempi': True, 'packed-groups': False} majver = version.split('.') if majver[0] == '0': @@ -14,19 +14,20 @@ if majver[0] == '0': else: majver = '.'.join(majver[0:2]) -sources=['%s-%s.tar.gz'%(name.lower(),version)] -sourceURLs=['https://launchpad.net/%s/%s.x/%s/+download' % (name.lower(), majver, version)] +sources = ['%s-%s.tar.gz' % (name.lower(), version)] +sourceURLs = ['https://launchpad.net/%s/%s.x/%s/+download' % (name.lower(), majver, version)] -patches=['wl_pkg_linkflags.patch', - 'petsc-slepc-libs.patch'] +patches = ['wl_pkg_linkflags.patch', + 'petsc-slepc-libs.patch'] builddependencies = [('CMake', '2.8.4')] +python = 'Python' python_version = '2.7.3' -versionsuffix = '-Python-%s' % (python_version) +versionsuffix = '-%s-%s' % (python, python_version) dependencies=[ - ('Python', python_version), + (python, python_version), ('Boost', '1.49.0', versionsuffix ), ('UFC', '2.0.5', versionsuffix), ('SWIG','2.0.4',versionsuffix), @@ -42,6 +43,9 @@ dependencies=[ ('CGAL', '4.0', versionsuffix), ('PETSc', '3.3-p2', versionsuffix), ('SLEPc', '3.3-p1', versionsuffix), + ('MTL4', '4.0.8878', '', True), + ('Trilinos', '10.12.2', versionsuffix), + ('Sphinx', '1.1.3', versionsuffix), ('zlib', '1.2.7'), ('libxml2', '2.8.0') ] diff --git a/easybuild/easyconfigs/d/DOLFIN/DOLFIN-1.0.0-ictce-4.0.6-Python-2.7.3.eb b/easybuild/easyconfigs/d/DOLFIN/DOLFIN-1.0.0-ictce-4.0.6-Python-2.7.3.eb index df3300c33c..27290c774e 100644 --- a/easybuild/easyconfigs/d/DOLFIN/DOLFIN-1.0.0-ictce-4.0.6-Python-2.7.3.eb +++ b/easybuild/easyconfigs/d/DOLFIN/DOLFIN-1.0.0-ictce-4.0.6-Python-2.7.3.eb @@ -1,12 +1,12 @@ -name='DOLFIN' -version='1.0.0' +name = 'DOLFIN' +version = '1.0.0' -homepage='https://launchpad.net/dolfin' -description="""DOLFIN is the C++/Python interface of FEniCS, providing a consistent PSE +homepage = 'https://launchpad.net/dolfin' +description = """DOLFIN is the C++/Python interface of FEniCS, providing a consistent PSE (Problem Solving Environment) for ordinary and partial differential equations.""" -toolkit={'name':'ictce','version':'4.0.6'} -toolkitopts={'usempi':True, 'packed-groups':False} +toolkit = {'name': 'ictce', 'version': '4.0.6'} +toolkitopts = {'usempi': True, 'packed-groups': False} majver = version.split('.') if majver[0] == '0': @@ -14,18 +14,20 @@ if majver[0] == '0': else: majver = '.'.join(majver[0:2]) -sources=['%s-%s.tar.gz'%(name.lower(),version)] -sourceURLs=['https://launchpad.net/%s/%s.x/%s/+download' % (name.lower(), majver, version)] +sources = ['%s-%s.tar.gz' % (name.lower(), version)] +sourceURLs = ['https://launchpad.net/%s/%s.x/%s/+download' % (name.lower(), majver, version)] -patches=['wl_pkg_linkflags.patch'] +patches = ['wl_pkg_linkflags.patch', + 'petsc-slepc-libs.patch'] builddependencies = [('CMake', '2.8.4')] +python = 'Python' python_version = '2.7.3' -versionsuffix = '-Python-%s' % (python_version) +versionsuffix = '-%s-%s' % (python, python_version) dependencies=[ - ('Python', python_version), + (python, python_version), ('Boost', '1.49.0', versionsuffix ), ('UFC', '2.0.5', versionsuffix), ('SWIG','2.0.4',versionsuffix), @@ -39,6 +41,11 @@ dependencies=[ ('ParMETIS', '4.0.2'), ('SuiteSparse', '3.7.0', '-withparmetis'), ('CGAL', '4.0', versionsuffix), + ('PETSc', '3.3-p2', versionsuffix), + ('SLEPc', '3.3-p1', versionsuffix), + ('MTL4', '4.0.8878', '', True), + ('Trilinos', '10.12.2', versionsuffix), + ('Sphinx', '1.1.3', versionsuffix), ('zlib', '1.2.7'), ('libxml2', '2.8.0') ] From 5cdf3d8be202f0231e80c090f8653d352c42d875 Mon Sep 17 00:00:00 2001 From: Kenneth Hoste Date: Tue, 14 Aug 2012 19:43:12 +0200 Subject: [PATCH 671/798] get rid of software_env_var_name, enhance get_software_root --- easybuild/framework/application.py | 7 ++++--- easybuild/tools/modules.py | 19 ++++++++++--------- 2 files changed, 14 insertions(+), 12 deletions(-) diff --git a/easybuild/framework/application.py b/easybuild/framework/application.py index ca5f76be6a..56a84ab879 100644 --- a/easybuild/framework/application.py +++ b/easybuild/framework/application.py @@ -46,7 +46,7 @@ from easybuild.tools.config import source_path, buildPath, installPath from easybuild.tools.filetools import unpack, patch, run_cmd, convertName from easybuild.tools.module_generator import ModuleGenerator -from easybuild.tools.modules import Modules, get_software_root, sofware_env_var_name +from easybuild.tools.modules import Modules, get_software_root, software_env_var_name from easybuild.tools.systemtools import get_core_count @@ -334,8 +334,9 @@ def ready2build(self): self.log.error('Not all dependencies have a matching toolkit version') # Check if the application is not loaded at the moment - if get_software_root(self.name()): - self.log.error("Module is already loaded (%s is set), installation cannot continue." % sofware_env_var_name('root', self.name())) + (root, env_var) = get_software_root(self.name(), with_env_var=True) + if root: + self.log.error("Module is already loaded (%s is set), installation cannot continue." % env_var) # Check if main install needs to be skipped # - if a current module can be found, skip is ok diff --git a/easybuild/tools/modules.py b/easybuild/tools/modules.py index 03d47001cd..7432438b7a 100644 --- a/easybuild/tools/modules.py +++ b/easybuild/tools/modules.py @@ -303,13 +303,7 @@ def searchModule(path, query): except ValueError: pass -def sofware_env_var_name(infix, name): - """ - Return environment variable name for this software, with a given infix. - """ - return "SOFT%s%s" % (infix.upper(), convertName(name, upper=True)) - -def get_software_root(name): +def get_software_root(name, with_env_var=False): """ Return the software root set for a particular package. """ @@ -319,9 +313,16 @@ def get_software_root(name): # keep on supporting legacy installations if environment_key in os.environ: - return os.getenv(environment_key) + env_var = environment_key else: - return os.getenv(legacy_key) + env_var = legacy_key + + root = os.getenv(env_var) + + if with_env_var: + return (root, env_var) + else: + return root def get_software_version(name): """ From 5b8a5a45a0f2e8350ae04ab0bd49f3226321ecf2 Mon Sep 17 00:00:00 2001 From: Kenneth Hoste Date: Tue, 14 Aug 2012 19:43:57 +0200 Subject: [PATCH 672/798] correct names of Sphinx and Trilinos example easyconfigs --- ....2.7.3.eb => Sphinx-1.1.3-goalf-1.1.0-no-OFED-Python-2.7.3.eb} | 0 ...6-Python.2.7.3.eb => Sphinx-1.1.3-ictce-4.0.6-Python-2.7.3.eb} | 0 ....3.eb => Trilinos-10.12.2-goalf-1.1.0-no-OFED-Python-2.7.3.eb} | 0 ...thon-2.7.3.eb => Trilinos-10.12.2-ictce-4.0.6-Python-2.7.3.eb} | 0 4 files changed, 0 insertions(+), 0 deletions(-) rename easybuild/easyconfigs/s/Sphinx/{Sphinx-1.1.3-goalf-1.1.0-no-OFED-Python.2.7.3.eb => Sphinx-1.1.3-goalf-1.1.0-no-OFED-Python-2.7.3.eb} (100%) rename easybuild/easyconfigs/s/Sphinx/{Sphinx-1.1.3-ictce-4.0.6-Python.2.7.3.eb => Sphinx-1.1.3-ictce-4.0.6-Python-2.7.3.eb} (100%) rename easybuild/easyconfigs/t/Trilinos/{Trilinos-10.12-goalf-1.1.0-no-OFED-Python-2.7.3.eb => Trilinos-10.12.2-goalf-1.1.0-no-OFED-Python-2.7.3.eb} (100%) rename easybuild/easyconfigs/t/Trilinos/{Trilinos-10.12-ictce-4.0.6-Python-2.7.3.eb => Trilinos-10.12.2-ictce-4.0.6-Python-2.7.3.eb} (100%) diff --git a/easybuild/easyconfigs/s/Sphinx/Sphinx-1.1.3-goalf-1.1.0-no-OFED-Python.2.7.3.eb b/easybuild/easyconfigs/s/Sphinx/Sphinx-1.1.3-goalf-1.1.0-no-OFED-Python-2.7.3.eb similarity index 100% rename from easybuild/easyconfigs/s/Sphinx/Sphinx-1.1.3-goalf-1.1.0-no-OFED-Python.2.7.3.eb rename to easybuild/easyconfigs/s/Sphinx/Sphinx-1.1.3-goalf-1.1.0-no-OFED-Python-2.7.3.eb diff --git a/easybuild/easyconfigs/s/Sphinx/Sphinx-1.1.3-ictce-4.0.6-Python.2.7.3.eb b/easybuild/easyconfigs/s/Sphinx/Sphinx-1.1.3-ictce-4.0.6-Python-2.7.3.eb similarity index 100% rename from easybuild/easyconfigs/s/Sphinx/Sphinx-1.1.3-ictce-4.0.6-Python.2.7.3.eb rename to easybuild/easyconfigs/s/Sphinx/Sphinx-1.1.3-ictce-4.0.6-Python-2.7.3.eb diff --git a/easybuild/easyconfigs/t/Trilinos/Trilinos-10.12-goalf-1.1.0-no-OFED-Python-2.7.3.eb b/easybuild/easyconfigs/t/Trilinos/Trilinos-10.12.2-goalf-1.1.0-no-OFED-Python-2.7.3.eb similarity index 100% rename from easybuild/easyconfigs/t/Trilinos/Trilinos-10.12-goalf-1.1.0-no-OFED-Python-2.7.3.eb rename to easybuild/easyconfigs/t/Trilinos/Trilinos-10.12.2-goalf-1.1.0-no-OFED-Python-2.7.3.eb diff --git a/easybuild/easyconfigs/t/Trilinos/Trilinos-10.12-ictce-4.0.6-Python-2.7.3.eb b/easybuild/easyconfigs/t/Trilinos/Trilinos-10.12.2-ictce-4.0.6-Python-2.7.3.eb similarity index 100% rename from easybuild/easyconfigs/t/Trilinos/Trilinos-10.12-ictce-4.0.6-Python-2.7.3.eb rename to easybuild/easyconfigs/t/Trilinos/Trilinos-10.12.2-ictce-4.0.6-Python-2.7.3.eb From a786459cbaa59de13887d81c2777dbfe3621c302 Mon Sep 17 00:00:00 2001 From: Kenneth Hoste Date: Tue, 14 Aug 2012 19:45:01 +0200 Subject: [PATCH 673/798] get rid of software_env_var_name import --- easybuild/framework/application.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/easybuild/framework/application.py b/easybuild/framework/application.py index 56a84ab879..08bbd8847e 100644 --- a/easybuild/framework/application.py +++ b/easybuild/framework/application.py @@ -46,7 +46,7 @@ from easybuild.tools.config import source_path, buildPath, installPath from easybuild.tools.filetools import unpack, patch, run_cmd, convertName from easybuild.tools.module_generator import ModuleGenerator -from easybuild.tools.modules import Modules, get_software_root, software_env_var_name +from easybuild.tools.modules import Modules, get_software_root from easybuild.tools.systemtools import get_core_count From 9027b88ba6eb6593fb22e568d3e41826b390dade Mon Sep 17 00:00:00 2001 From: Kenneth Hoste Date: Tue, 14 Aug 2012 21:52:54 +0200 Subject: [PATCH 674/798] add support for creating dependency graphs --- easybuild/build.py | 93 ++++++++++++++++--- ...-3.4.0-gompi-1.1.0-no-OFED-ATLAS-3.8.4.eb} | 0 2 files changed, 78 insertions(+), 15 deletions(-) rename easybuild/easyconfigs/l/LAPACK/{LAPACK-3.4.0-gompi-no-OFED-1.1.0-ATLAS-3.8.4.eb => LAPACK-3.4.0-gompi-1.1.0-no-OFED-ATLAS-3.8.4.eb} (100%) diff --git a/easybuild/build.py b/easybuild/build.py index dc1ee35e15..632af52a62 100644 --- a/easybuild/build.py +++ b/easybuild/build.py @@ -36,7 +36,6 @@ import sys import tempfile import time -from datetime import datetime from optparse import OptionParser import easybuild # required for VERBOSE_VERSION @@ -78,7 +77,7 @@ def add_build_options(parser): "located in $HOME/easybuildinstall") parser.add_option("-s", "--stop", type="choice", choices=EasyBlock.validstops, - help="stop the installation after certain step" \ + help="stop the installation after certain step " \ "(valid: %s)" % ', '.join(EasyBlock.validstops)) parser.add_option("-b", "--only-blocks", metavar="blocks", help="Only build blocks blk[,blk2]") parser.add_option("-k", "--skip", action="store_true", @@ -96,7 +95,8 @@ def add_build_options(parser): strictness_options = ['ignore', 'warn', 'error'] parser.add_option("--strict", type="choice", choices=strictness_options, help="set strictness \ level (possible levels: %s" % ', '.join(strictness_options)) - parser.add_option("--job", action="store_true", help="will submit the build as a job") + parser.add_option("--job", action="store_true", help="submit the build as job(s)") + parser.add_option("--dep-graph", metavar="depgraph.", help="create dependency graph") def main(): @@ -213,7 +213,7 @@ def main(): try: files = findEasyconfigs(path, log) for eb_file in files: - packages.extend(processEasyconfig(eb_file, log, blocks)) + packages.extend(processEasyconfig(eb_file, log, blocks, validate=(not options.dep_graph))) except IOError, err: log.error("Processing easyconfigs in path %s failed: %s" % (path, err)) @@ -222,7 +222,7 @@ def main(): os.chdir(os.environ['PWD']) ## Skip modules that are already installed unless forced - if not options.force: + if not options.force and not options.dep_graph: m = Modules() packages, checkPackages = [], packages for package in checkPackages: @@ -239,11 +239,18 @@ def main(): ## Determine an order that will allow all specs in the set to build if len(packages) > 0: print_msg("resolving dependencies ...", log) - orderedSpecs = resolveDependencies(packages, options.robot, log) + orderedSpecs = resolveDependencies(packages, options.robot, log, force=options.dep_graph) else: print_msg("No packages left to be built.", log) orderedSpecs = [] + # create dependency graph and exit + if options.dep_graph: + log.info("Creating dependency graph %s" % options.dep_graph) + dep_graph(options.dep_graph, orderedSpecs, log) + sys.exit(0) + + # submit build as job(s) and exit if options.job: curdir = os.getcwd() easybuild_basedir = os.path.dirname(os.path.dirname(sys.argv[0])) @@ -334,7 +341,7 @@ def findEasyconfigs(path, log): return files -def processEasyconfig(path, log, onlyBlocks=None, regtest_online=False): +def processEasyconfig(path, log, onlyBlocks=None, regtest_online=False, validate=True): """ Process easyconfig, returning some information for each block """ @@ -347,7 +354,7 @@ def processEasyconfig(path, log, onlyBlocks=None, regtest_online=False): log.debug("Processing easyconfig %s" % spec) try: - eb = EasyBlock(spec) + eb = EasyBlock(spec, validate=validate) except EasyBuildError, err: msg = "Failed to process easyconfig %s:\n%s" % (spec, err.msg) log.exception(msg) @@ -379,7 +386,7 @@ def processEasyconfig(path, log, onlyBlocks=None, regtest_online=False): package['unresolvedDependencies'] = copy.copy(package['dependencies']) # ensure the pathname is equal to the module - base_name, ext = os.path.splitext(os.path.basename(spec)) + base_name, _ = os.path.splitext(os.path.basename(spec)) module_name = "-".join(package['module']) if base_name.lower() != module_name.lower(): log.error("easyconfig file: %s does not contain module %s" % (spec, module_name)) @@ -388,15 +395,21 @@ def processEasyconfig(path, log, onlyBlocks=None, regtest_online=False): return packages -def resolveDependencies(unprocessed, robot, log): +def resolveDependencies(unprocessed, robot, log, force=False): """ Work through the list of packages to determine an optimal order """ - ## Get a list of all available modules (format: [(name, installversion), ...]) - availableModules = Modules().available() - if len(availableModules) == 0: - log.warning("No installed modules. Your MODULEPATH is probably incomplete.") + if force: + # assume that no modules are available when forced + availableModules = [] + log.info("Forcing all dependencies to be retained.") + else: + # Get a list of all available modules (format: [(name, installversion), ...]) + availableModules = Modules().available() + + if len(availableModules) == 0: + log.warning("No installed modules. Your MODULEPATH is probably incomplete.") orderedSpecs = [] # All available modules can be used for resolving dependencies except @@ -444,7 +457,7 @@ def resolveDependencies(unprocessed, robot, log): if path: log.info("Robot: resolving dependency %s with %s" % (candidates[0], path)) - processedSpecs = processEasyconfig(path, log) + processedSpecs = processEasyconfig(path, log, validate=(not force)) unprocessed.extend(processedSpecs) robotAddedDependency = True break @@ -744,6 +757,56 @@ def build(module, options, log, origEnviron, exitOnFailure=True): return (True, applicationLog) +def dep_graph(fn, specs, log): + """ + Create a depenency graph for the given easyconfigs. + """ + # import graphviz + try: + import sys + sys.path.append('..') + sys.path.append('/usr/lib/graphviz/python/') + sys.path.append('/usr/lib64/graphviz/python/') + import gv + except ImportError, err: + error("Failed to import graphviz: %s" % err) + + # import pygraph + try: + import pygraph.readwrite.dot as dot + from pygraph.classes.digraph import digraph + except ImportError, err: + error("Failed to import pygraph: %s" % err) + + # enhance list of specs + for spec in specs: + spec['module'] = '-'.join(spec['module']) #spec['module'][0] + spec['unresolvedDependencies'] = ['-'.join(s) for s in spec['unresolvedDependencies']] #[s[0] for s in spec['unresolvedDependencies']] + + dgr = digraph() + dgr.add_nodes([spec['module'] for spec in specs]) + for spec in specs: + for dep in spec['unresolvedDependencies']: + dgr.add_edge((dep, spec['module'])) + + dot = dot.write(dgr) + if fn.endswith(".dot"): + # create .dot file + try: + f = open(fn, "w") + f.write(dot) + f.close() + except IOError, err: + log.error("Failed to create file %s: %s" % (fn, err)) + else: + # try and render graph in specified file format + gvv = gv.readstring(dot) + gv.layout(gvv, 'dot') + gv.render(gvv, fn.split('.')[-1], fn) + + print "Wrote dependency graph to %s" % fn + + if __name__ == "__main__": try: main() diff --git a/easybuild/easyconfigs/l/LAPACK/LAPACK-3.4.0-gompi-no-OFED-1.1.0-ATLAS-3.8.4.eb b/easybuild/easyconfigs/l/LAPACK/LAPACK-3.4.0-gompi-1.1.0-no-OFED-ATLAS-3.8.4.eb similarity index 100% rename from easybuild/easyconfigs/l/LAPACK/LAPACK-3.4.0-gompi-no-OFED-1.1.0-ATLAS-3.8.4.eb rename to easybuild/easyconfigs/l/LAPACK/LAPACK-3.4.0-gompi-1.1.0-no-OFED-ATLAS-3.8.4.eb From 77a90cca6957b2ea22f23a365e2712c4d60af19d Mon Sep 17 00:00:00 2001 From: Kenneth Hoste Date: Tue, 14 Aug 2012 22:29:02 +0200 Subject: [PATCH 675/798] return output of cmake command --- easybuild/easyblocks/c/cmake.py | 4 +++- easybuild/easyblocks/c/cmakepythonpackage.py | 2 +- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/easybuild/easyblocks/c/cmake.py b/easybuild/easyblocks/c/cmake.py index b6ff23c345..9aabd66d49 100644 --- a/easybuild/easyblocks/c/cmake.py +++ b/easybuild/easyblocks/c/cmake.py @@ -50,4 +50,6 @@ def configure(self, builddir=None): builddir, self.getcfg('configopts') ) - run_cmd(command, log_all=True, simple=True) + (out, _) = run_cmd(command, log_all=True, simple=False) + + return out diff --git a/easybuild/easyblocks/c/cmakepythonpackage.py b/easybuild/easyblocks/c/cmakepythonpackage.py index a595ab9ce3..7029b0d238 100644 --- a/easybuild/easyblocks/c/cmakepythonpackage.py +++ b/easybuild/easyblocks/c/cmakepythonpackage.py @@ -45,7 +45,7 @@ def configure(self, *args, **kwargs): PythonPackage.configure(self, *args, **kwargs) - CMake.configure(self, *args, **kwargs) + return CMake.configure(self, *args, **kwargs) def make(self, *args, **kwargs): """Build Python package with cmake""" From 7731973ceb326641e2db006ede87a9e3bb5e3825 Mon Sep 17 00:00:00 2001 From: Kenneth Hoste Date: Tue, 14 Aug 2012 22:29:25 +0200 Subject: [PATCH 676/798] fix merge conflict in lapack.py --- easybuild/easyblocks/l/lapack.py | 4 ---- 1 file changed, 4 deletions(-) diff --git a/easybuild/easyblocks/l/lapack.py b/easybuild/easyblocks/l/lapack.py index 9d12e9d470..bd4cd75b60 100644 --- a/easybuild/easyblocks/l/lapack.py +++ b/easybuild/easyblocks/l/lapack.py @@ -187,11 +187,7 @@ def test(self): """ if self.getcfg('test_only'): -<<<<<<< HEAD if not get_software_root('LAPACK'): -======= - if not get_software_root('lapack'): ->>>>>>> develop self.log.error("You need to make sure that the LAPACK module is loaded to perform testing.") blaslib = get_blas_lib(self.log) From 202f6b27b533c6952f99043de4ddbf90783f2ac0 Mon Sep 17 00:00:00 2001 From: Kenneth Hoste Date: Tue, 14 Aug 2012 22:30:56 +0200 Subject: [PATCH 677/798] also disable Tpetra Trilinos package for ictce (depends on Kokkos) --- .../t/Trilinos/Trilinos-10.12.2-ictce-4.0.6-Python-2.7.3.eb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/easybuild/easyconfigs/t/Trilinos/Trilinos-10.12.2-ictce-4.0.6-Python-2.7.3.eb b/easybuild/easyconfigs/t/Trilinos/Trilinos-10.12.2-ictce-4.0.6-Python-2.7.3.eb index 3d145f177c..01f665f2f4 100644 --- a/easybuild/easyconfigs/t/Trilinos/Trilinos-10.12.2-ictce-4.0.6-Python-2.7.3.eb +++ b/easybuild/easyconfigs/t/Trilinos/Trilinos-10.12.2-ictce-4.0.6-Python-2.7.3.eb @@ -27,4 +27,4 @@ dependencies=[ # Kokkos build is broken with ictce/4.0.6 # yields internal error: 0_1670 for packages/kokkos/LinAlg/Kokkos_DefaultArithmetic.hpp (line 827) -skip_pkgs = ["Kokkos"] \ No newline at end of file +skip_pkgs = ["Kokkos", "Tpetra"] \ No newline at end of file From 1a2d194b640fe54b657d1b7b1d6b7acfdcdc674f Mon Sep 17 00:00:00 2001 From: Kenneth Hoste Date: Tue, 14 Aug 2012 22:31:45 +0200 Subject: [PATCH 678/798] add CFLAGS to CCFLAGS used for ScaLAPACK, such that -fPIC is passed when enabled --- easybuild/easyblocks/s/scalapack.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/easybuild/easyblocks/s/scalapack.py b/easybuild/easyblocks/s/scalapack.py index 0f331271c1..98f19710dc 100644 --- a/easybuild/easyblocks/s/scalapack.py +++ b/easybuild/easyblocks/s/scalapack.py @@ -121,7 +121,7 @@ def make(self): 'F77="%s"' % mpif77, 'CC="%s"' % mpicc, 'NOOPT="%s"' % noopt, - 'CCFLAGS="-O3"' + 'CCFLAGS="-O3 %s"' % os.getenv('CFLAGS') ] # set interface From aec41775ad98967f68dfa9613f870677b16fa57b Mon Sep 17 00:00:00 2001 From: Kenneth Hoste Date: Wed, 15 Aug 2012 08:47:27 +0200 Subject: [PATCH 679/798] build BLACS with -fPIC enabled --- easybuild/easyblocks/b/blacs.py | 10 +++----- .../BLACS/BLACS-1.1-GCC-4.6.3-MVAPICH2-1.7.eb | 24 ------------------- .../b/BLACS/BLACS-1.1-gmvapich2-1.1.0.eb | 1 + .../b/BLACS/BLACS-1.1-gompi-1.1.0-no-OFED.eb | 1 + 4 files changed, 5 insertions(+), 31 deletions(-) delete mode 100644 easybuild/easyconfigs/b/BLACS/BLACS-1.1-GCC-4.6.3-MVAPICH2-1.7.eb diff --git a/easybuild/easyblocks/b/blacs.py b/easybuild/easyblocks/b/blacs.py index ab6ceaf924..50e27f7d53 100644 --- a/easybuild/easyblocks/b/blacs.py +++ b/easybuild/easyblocks/b/blacs.py @@ -95,13 +95,9 @@ def make(self): else: self.log.error("Unknown MPI lib %s used (known MPI libs: %s)" % (mpi_type, known_mpis.keys())) - # common settings (for now) - mpicc = 'mpicc' - mpif77 = 'mpif77' - opts = { - 'mpicc': mpicc, - 'mpif77': mpif77, + 'mpicc': "%s %s" % (os.getenv('MPICC'), os.getenv('CFLAGS')), + 'mpif77': "%s %s" % (os.getenv('MPIF77'), os.getenv('FFLAGS')), 'f77': os.getenv('F77'), 'cc': os.getenv('CC'), 'builddir': os.getcwd(), @@ -172,7 +168,7 @@ def make(self): 'base': base }) - add_makeopts = ' MPICC=%(mpicc)s MPIF77=%(mpif77)s %(comm)s ' % opts + add_makeopts = ' MPICC="%(mpicc)s" MPIF77="%(mpif77)s" %(comm)s ' % opts add_makeopts += ' INTERFACE=%(int)s MPIdir=%(base)s BTOPdir=%(builddir)s mpi ' % opts self.updatecfg('makeopts', add_makeopts) diff --git a/easybuild/easyconfigs/b/BLACS/BLACS-1.1-GCC-4.6.3-MVAPICH2-1.7.eb b/easybuild/easyconfigs/b/BLACS/BLACS-1.1-GCC-4.6.3-MVAPICH2-1.7.eb deleted file mode 100644 index e1b59eb898..0000000000 --- a/easybuild/easyconfigs/b/BLACS/BLACS-1.1-GCC-4.6.3-MVAPICH2-1.7.eb +++ /dev/null @@ -1,24 +0,0 @@ -name='BLACS' -version='1.1' - -homepage='http://www.netlib.org/blacs/' -description="""The BLACS (Basic Linear Algebra Communication Subprograms) project is an ongoing investigation whose purpose is to create a linear algebra oriented message passing interface that may be implemented efficiently and uniformly across a large range of distributed memory platforms.""" - -toolkit={'name':'GCC','version':'4.6.3'} - -mpilib='MVAPICH2' -mpilibver='1.7' -versionsuffix='-%s-%s'%(mpilib, mpilibver) - -sources=['mpiblacs.tgz', - 'mpiblacs-patch03.tgz'] -sourceURLs=[homepage] - -dependencies=[(mpilib, mpilibver)] - -patches=['bmake.mpi.patch'] - -## parallel build tends to fail -#parallel=1 - -moduleclass='lib' diff --git a/easybuild/easyconfigs/b/BLACS/BLACS-1.1-gmvapich2-1.1.0.eb b/easybuild/easyconfigs/b/BLACS/BLACS-1.1-gmvapich2-1.1.0.eb index 7ebeda5bc6..f2d82cd1e4 100644 --- a/easybuild/easyconfigs/b/BLACS/BLACS-1.1-gmvapich2-1.1.0.eb +++ b/easybuild/easyconfigs/b/BLACS/BLACS-1.1-gmvapich2-1.1.0.eb @@ -7,6 +7,7 @@ an ongoing investigation whose purpose is to create a linear algebra oriented me that may be implemented efficiently and uniformly across a large range of distributed memory platforms.""" toolkit = {'name': 'gmvapich2', 'version': '1.1.0'} +toolkitopts = {'pic': True} sources = [ 'mpiblacs.tgz', diff --git a/easybuild/easyconfigs/b/BLACS/BLACS-1.1-gompi-1.1.0-no-OFED.eb b/easybuild/easyconfigs/b/BLACS/BLACS-1.1-gompi-1.1.0-no-OFED.eb index 3200807b5e..cb6cf4e1b9 100644 --- a/easybuild/easyconfigs/b/BLACS/BLACS-1.1-gompi-1.1.0-no-OFED.eb +++ b/easybuild/easyconfigs/b/BLACS/BLACS-1.1-gompi-1.1.0-no-OFED.eb @@ -7,6 +7,7 @@ an ongoing investigation whose purpose is to create a linear algebra oriented me that may be implemented efficiently and uniformly across a large range of distributed memory platforms.""" toolkit = {'name': 'gompi', 'version': '1.1.0-no-OFED'} +toolkitopts = {'pic': True} sources = [ 'mpiblacs.tgz', From f4bd8b6affa4119ba9c1f3bcf55b062bd69d60f3 Mon Sep 17 00:00:00 2001 From: Kenneth Hoste Date: Wed, 15 Aug 2012 08:48:39 +0200 Subject: [PATCH 680/798] enable -fPIC in DOLFIN example easyconfigs, set zlib options in DOLFIN configure, check whether all optional packages were found --- easybuild/easyblocks/d/dolfin.py | 13 ++++++++----- ...DOLFIN-1.0.0-goalf-1.1.0-no-OFED-Python-2.7.3.eb | 2 +- .../DOLFIN/DOLFIN-1.0.0-ictce-4.0.6-Python-2.7.3.eb | 2 +- 3 files changed, 10 insertions(+), 7 deletions(-) diff --git a/easybuild/easyblocks/d/dolfin.py b/easybuild/easyblocks/d/dolfin.py index de821d5ba2..1c2abe52f4 100644 --- a/easybuild/easyblocks/d/dolfin.py +++ b/easybuild/easyblocks/d/dolfin.py @@ -22,6 +22,7 @@ EasyBuild support for DOLFIN, implemented as an easyblock """ import os +import re from easybuild.easyblocks.c.cmakepythonpackage import CMakePythonPackage from easybuild.tools.modules import get_software_root, get_software_version @@ -110,7 +111,8 @@ def configure(self): self.updatecfg('configopts', '-DMTL4_DIR:PATH="%s"' % depsdict['MTL4']) # zlib - self.updatecfg('configopts', '-DZLIB_DIR=%s' % depsdict['zlib']) + self.updatecfg('configopts', '-DZLIB_INCLUDE_DIR=%s' % os.path.join(depsdict['zlib'], "include")) + self.updatecfg('configopts', '-DZLIB_LIBRARY=%s' % os.path.join(depsdict['zlib'], "lib", "libz.a")) # set correct openmp options openmp = self.toolkit().get_openmp_flag() @@ -118,11 +120,12 @@ def configure(self): self.updatecfg('configopts', ' -DOpenMP_C_FLAGS="%s"' % openmp) # configure - CMakePythonPackage.configure(self) + out = CMakePythonPackage.configure(self) - #### FIXME ##### - # implement check for optional packages that could not be found - # need to know exact output when all optional packages are found + # make sure that all optional packages are found + not_found_re = re.compile("The following optional packages could not be found") + if not_found_re.search(out): + self.log.error("Optional packages could not be found, this should not happen...") def make_module_extra(self): """Set extra environment variables for DOLFIN.""" diff --git a/easybuild/easyconfigs/d/DOLFIN/DOLFIN-1.0.0-goalf-1.1.0-no-OFED-Python-2.7.3.eb b/easybuild/easyconfigs/d/DOLFIN/DOLFIN-1.0.0-goalf-1.1.0-no-OFED-Python-2.7.3.eb index c6d05d5eb3..1223206ab6 100644 --- a/easybuild/easyconfigs/d/DOLFIN/DOLFIN-1.0.0-goalf-1.1.0-no-OFED-Python-2.7.3.eb +++ b/easybuild/easyconfigs/d/DOLFIN/DOLFIN-1.0.0-goalf-1.1.0-no-OFED-Python-2.7.3.eb @@ -6,7 +6,7 @@ description = """DOLFIN is the C++/Python interface of FEniCS, providing a consi (Problem Solving Environment) for ordinary and partial differential equations.""" toolkit = {'name': 'goalf', 'version': '1.1.0-no-OFED'} -toolkitopts = {'usempi': True, 'packed-groups': False} +toolkitopts = {'usempi': True, 'pic': True, 'packed-groups': False} majver = version.split('.') if majver[0] == '0': diff --git a/easybuild/easyconfigs/d/DOLFIN/DOLFIN-1.0.0-ictce-4.0.6-Python-2.7.3.eb b/easybuild/easyconfigs/d/DOLFIN/DOLFIN-1.0.0-ictce-4.0.6-Python-2.7.3.eb index 27290c774e..57d8f1b53f 100644 --- a/easybuild/easyconfigs/d/DOLFIN/DOLFIN-1.0.0-ictce-4.0.6-Python-2.7.3.eb +++ b/easybuild/easyconfigs/d/DOLFIN/DOLFIN-1.0.0-ictce-4.0.6-Python-2.7.3.eb @@ -6,7 +6,7 @@ description = """DOLFIN is the C++/Python interface of FEniCS, providing a consi (Problem Solving Environment) for ordinary and partial differential equations.""" toolkit = {'name': 'ictce', 'version': '4.0.6'} -toolkitopts = {'usempi': True, 'packed-groups': False} +toolkitopts = {'usempi': True, 'pic': True, 'packed-groups': False} majver = version.split('.') if majver[0] == '0': From 66b7951907825921fe439670721bb03ec4784789 Mon Sep 17 00:00:00 2001 From: Kenneth Hoste Date: Wed, 15 Aug 2012 09:16:31 +0200 Subject: [PATCH 681/798] style cleanup, fix cmd for building imkl interfaces being overwritten --- easybuild/build.py | 6 +++--- easybuild/easyblocks/a/armadillo.py | 6 ++++-- easybuild/easyblocks/b/blacs.py | 2 +- easybuild/easyblocks/b/boost.py | 9 ++++++--- easybuild/easyblocks/d/dolfin.py | 2 +- easybuild/easyblocks/i/imkl.py | 4 ++-- easybuild/easyblocks/p/petsc.py | 2 +- easybuild/easyblocks/p/pythonpackage.py | 3 ++- easybuild/easyblocks/s/slepc.py | 2 +- easybuild/easyblocks/t/trilinos.py | 6 ++++-- 10 files changed, 25 insertions(+), 17 deletions(-) diff --git a/easybuild/build.py b/easybuild/build.py index 1f5dc90892..9e2bf40bc0 100755 --- a/easybuild/build.py +++ b/easybuild/build.py @@ -36,7 +36,6 @@ import sys import tempfile import time -from datetime import datetime from optparse import OptionParser import easybuild # required for VERBOSE_VERSION @@ -48,7 +47,8 @@ from easybuild.tools.build_log import EasyBuildError, initLogger, \ removeLogHandler, print_msg from easybuild.tools.class_dumper import dumpClasses -from easybuild.tools.modules import Modules, searchModule, curr_module_paths, mk_module_path +from easybuild.tools.modules import Modules, searchModule, \ + curr_module_paths, mk_module_path from easybuild.tools.config import getRepository from easybuild.tools import systemtools @@ -379,7 +379,7 @@ def processEasyconfig(path, log, onlyBlocks=None, regtest_online=False): package['unresolvedDependencies'] = copy.copy(package['dependencies']) # ensure the pathname is equal to the module - base_name, ext = os.path.splitext(os.path.basename(spec)) + base_name, _ = os.path.splitext(os.path.basename(spec)) module_name = "-".join(package['module']) if base_name.lower() != module_name.lower(): log.error("easyconfig file: %s does not contain module %s" % (spec, module_name)) diff --git a/easybuild/easyblocks/a/armadillo.py b/easybuild/easyblocks/a/armadillo.py index c53321bb64..c706103b52 100644 --- a/easybuild/easyblocks/a/armadillo.py +++ b/easybuild/easyblocks/a/armadillo.py @@ -50,8 +50,10 @@ def sanitycheck(self): if not self.getcfg('sanityCheckPaths'): - self.setcfg('sanityCheckPaths', {'files':['lib/libarmadillo.so', 'include/armadillo'], - 'dirs':['include/armadillo_bits']}) + self.setcfg('sanityCheckPaths', { + 'files':['lib/libarmadillo.so', 'include/armadillo'], + 'dirs':['include/armadillo_bits'] + }) self.log.info("Customized sanity check paths: %s" % self.getcfg('sanityCheckPaths')) diff --git a/easybuild/easyblocks/b/blacs.py b/easybuild/easyblocks/b/blacs.py index 50e27f7d53..2f96cdf8c9 100644 --- a/easybuild/easyblocks/b/blacs.py +++ b/easybuild/easyblocks/b/blacs.py @@ -83,7 +83,7 @@ def make(self): toolkit.OPENMPI: "-L$(MPILIBdir) -lmpi_f77", toolkit.MVAPICH2: "$(MPILIBdir)/libmpich.a $(MPILIBdir)/libfmpich.a " + \ "$(MPILIBdir)/libmpl.a -lpthread" - } + } mpi_type = self.toolkit().mpi_type() diff --git a/easybuild/easyblocks/b/boost.py b/easybuild/easyblocks/b/boost.py index 9cb9aa80d4..658abc5c6a 100644 --- a/easybuild/easyblocks/b/boost.py +++ b/easybuild/easyblocks/b/boost.py @@ -34,12 +34,13 @@ class Boost(Application): """Support for building Boost.""" def __init__(self, *args, **kwargs): + """Initialize Boost-specific variables.""" Application.__init__(self, *args, **kwargs) self.objdir = None def extra_options(self): - + """Add extra easyconfig parameters for Boost.""" extra_vars = {'boost_mpi':[False, "Build mpi boost module (default: False)"]} return Application.extra_options(self, extra_vars) @@ -138,9 +139,11 @@ def sanitycheck(self): if self.getcfg('boost_mpi'): mpifs = ['lib/libboost_mpi.so'] - self.setcfg('sanityCheckPaths', {'files': mpifs + ['lib/libboost_%s.so' % x for x in ['python', + self.setcfg('sanityCheckPaths', { + 'files': mpifs + ['lib/libboost_%s.so' % x for x in ['python', 'system']], - 'dirs':['include/boost']}) + 'dirs':['include/boost'] + }) self.log.info("Customized sanity check paths: %s" % self.getcfg('sanityCheckPaths')) diff --git a/easybuild/easyblocks/d/dolfin.py b/easybuild/easyblocks/d/dolfin.py index 1c2abe52f4..407bf3f40d 100644 --- a/easybuild/easyblocks/d/dolfin.py +++ b/easybuild/easyblocks/d/dolfin.py @@ -32,7 +32,7 @@ class DOLFIN(CMakePythonPackage): """Support for building and installing DOLFIN.""" def configure(self): - """Configure DOLFIN build by setting configure options.""" + """Set DOLFIN-specific configure options and configure with CMake.""" # make sure that required dependencies are loaded deps = ['Armadillo', 'Boost', 'CGAL', 'MTL4', 'ParMETIS', 'PETSc', 'Python', diff --git a/easybuild/easyblocks/i/imkl.py b/easybuild/easyblocks/i/imkl.py index 18222dd466..59a33817a4 100644 --- a/easybuild/easyblocks/i/imkl.py +++ b/easybuild/easyblocks/i/imkl.py @@ -184,8 +184,8 @@ def postproc(self): extramakeopts += 'mpi=mpich2' cmd = "make -f makefile libintel64 %s" % extramakeopts - ## Use INSTALL_DIR and CFLAGS and COPTS - cmd = "make -f makefile libintel64 %s %s" % (makeopts, extramakeopts) + # add other make options as well + cmd += makeopts for opt in ['', '-fPIC']: try: diff --git a/easybuild/easyblocks/p/petsc.py b/easybuild/easyblocks/p/petsc.py index 41fba9dd56..6e87b78001 100644 --- a/easybuild/easyblocks/p/petsc.py +++ b/easybuild/easyblocks/p/petsc.py @@ -224,7 +224,7 @@ def make_install(self): self.log.error("Something went wrong during symlink creation of file %s: %s" % (f, err)) def make_module_req_guess(self): - """Specify correct LD_LIBRARY_PATH and CPATH for PETSc installation.""" + """Specify PETSc custom values for PATH, CPATH and LD_LIBRARY_PATH.""" guesses = Application.make_module_req_guess(self) diff --git a/easybuild/easyblocks/p/pythonpackage.py b/easybuild/easyblocks/p/pythonpackage.py index c5c6ea80eb..2856174131 100644 --- a/easybuild/easyblocks/p/pythonpackage.py +++ b/easybuild/easyblocks/p/pythonpackage.py @@ -33,9 +33,10 @@ class PythonPackage(Application): """Builds and installs a Python package, and provides a dedicated module file.""" def __init__(self, *args, **kwargs): + """Initialize custom variables.""" Application.__init__(self, *args, **kwargs) - # Python packages lib dir + # template for Python packages lib dir self.pylibdir = os.path.join("lib", "python%s", "site-packages") def configure(self): diff --git a/easybuild/easyblocks/s/slepc.py b/easybuild/easyblocks/s/slepc.py index 76387c66bb..71da803ab4 100644 --- a/easybuild/easyblocks/s/slepc.py +++ b/easybuild/easyblocks/s/slepc.py @@ -35,7 +35,7 @@ class SLEPc(Application): """Support for building and installing SLEPc""" def __init__(self, *args, **kwargs): - """Specify that SLEPc should be built in install dir.""" + """Initialize SLEPc custom variables.""" Application.__init__(self, *args, **kwargs) self.slepc_arch_dir = None diff --git a/easybuild/easyblocks/t/trilinos.py b/easybuild/easyblocks/t/trilinos.py index 52f1f3c08e..09418527d5 100644 --- a/easybuild/easyblocks/t/trilinos.py +++ b/easybuild/easyblocks/t/trilinos.py @@ -212,8 +212,10 @@ def sanitycheck(self): libs = [l for l in libs if not l in self.getcfg('skip_pkgs')] - self.setcfg('sanityCheckPaths', {'files':[os.path.join("lib", "lib%s.a" % x.lower()) for x in libs], - 'dirs':['bin', 'include']}) + self.setcfg('sanityCheckPaths', { + 'files':[os.path.join("lib", "lib%s.a" % x.lower()) for x in libs], + 'dirs':['bin', 'include'] + }) self.log.info("Customized sanity check paths: %s" % self.getcfg('sanityCheckPaths')) From d2f904388420026abb9ad94024eaa374efe1b8a1 Mon Sep 17 00:00:00 2001 From: Kenneth Hoste Date: Wed, 15 Aug 2012 09:43:29 +0200 Subject: [PATCH 682/798] add zlib example easyconfig for ictce-4.0.6 (required for robot build of DOLFIN) --- .../z/zlib/zlib-1.2.7-ictce-4.0.6.eb | 20 +++++++++++++++++++ 1 file changed, 20 insertions(+) create mode 100644 easybuild/easyconfigs/z/zlib/zlib-1.2.7-ictce-4.0.6.eb diff --git a/easybuild/easyconfigs/z/zlib/zlib-1.2.7-ictce-4.0.6.eb b/easybuild/easyconfigs/z/zlib/zlib-1.2.7-ictce-4.0.6.eb new file mode 100644 index 0000000000..7e6965d463 --- /dev/null +++ b/easybuild/easyconfigs/z/zlib/zlib-1.2.7-ictce-4.0.6.eb @@ -0,0 +1,20 @@ +name='zlib' +version='1.2.7' + +homepage='http://www.zlib.net/' +description="""zlib is designed to be a free, general-purpose, legally unencumbered -- that is, +not covered by any patents -- lossless data-compression library for use on virtually any +computer hardware and operating system.""" + +toolkit={'name':'ictce','version':'4.0.6'} +toolkitopts={'optarch':True, 'pic':True} + +sources=['%s-%s.tar.gz'%(name.lower(), version)] +sourceURLs=[('http://sourceforge.net/projects/libpng/files/zlib/%s' % version, 'download')] + +preconfigopts='LDSHARED="$CC -shared"' + +sanityCheckPaths={ + 'files':["include/zconf.h", "include/zlib.h", "lib/libz.a", "lib/libz.so"], + 'dirs':[] + } From d32374889fdbe2bdfa9e786c515c7a484bafc3b9 Mon Sep 17 00:00:00 2001 From: Kenneth Hoste Date: Wed, 15 Aug 2012 09:48:56 +0200 Subject: [PATCH 683/798] fix sourceURLs for SWIG example easyconfigs --- .../s/SWIG/SWIG-2.0.4-goalf-1.1.0-no-OFED-Python-2.7.3.eb | 2 +- .../easyconfigs/s/SWIG/SWIG-2.0.4-ictce-4.0.6-Python-2.7.3.eb | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/easybuild/easyconfigs/s/SWIG/SWIG-2.0.4-goalf-1.1.0-no-OFED-Python-2.7.3.eb b/easybuild/easyconfigs/s/SWIG/SWIG-2.0.4-goalf-1.1.0-no-OFED-Python-2.7.3.eb index 3748e25fa6..c92b0acf1b 100644 --- a/easybuild/easyconfigs/s/SWIG/SWIG-2.0.4-goalf-1.1.0-no-OFED-Python-2.7.3.eb +++ b/easybuild/easyconfigs/s/SWIG/SWIG-2.0.4-goalf-1.1.0-no-OFED-Python-2.7.3.eb @@ -8,7 +8,7 @@ a variety of high-level programming languages.""" toolkit = {'name': 'goalf', 'version': '1.1.0-no-OFED'} toolkitopts = {'pic': True, 'opt': True, 'optarch': True} -sourceURLs = ['http://prdownloads.sourceforge.net/swig/'] +sourceURLs = [('http://sourceforge.net/projects/swig/files/swig/swig-%s/' % version, 'download')] sources = ['%s-%s.tar.gz'%(name.lower(),version)] python = "Python" diff --git a/easybuild/easyconfigs/s/SWIG/SWIG-2.0.4-ictce-4.0.6-Python-2.7.3.eb b/easybuild/easyconfigs/s/SWIG/SWIG-2.0.4-ictce-4.0.6-Python-2.7.3.eb index e8c50eba7c..cbc7b80904 100644 --- a/easybuild/easyconfigs/s/SWIG/SWIG-2.0.4-ictce-4.0.6-Python-2.7.3.eb +++ b/easybuild/easyconfigs/s/SWIG/SWIG-2.0.4-ictce-4.0.6-Python-2.7.3.eb @@ -8,7 +8,7 @@ a variety of high-level programming languages.""" toolkit = {'name': 'ictce', 'version': '4.0.6'} toolkitopts = {'pic': True, 'opt': True, 'optarch': True} -sourceURLs = ['http://prdownloads.sourceforge.net/swig/'] +sourceURLs = [('http://sourceforge.net/projects/swig/files/swig/swig-%s/' % version, 'download')] sources = ['%s-%s.tar.gz'%(name.lower(),version)] python = "Python" From 9465e4f55190e0d54ae9d3645a4c98441f4f980c Mon Sep 17 00:00:00 2001 From: Kenneth Hoste Date: Wed, 15 Aug 2012 10:38:24 +0200 Subject: [PATCH 684/798] remove check for loaded Boost module --- easybuild/easyblocks/m/mtl4.py | 6 ------ 1 file changed, 6 deletions(-) diff --git a/easybuild/easyblocks/m/mtl4.py b/easybuild/easyblocks/m/mtl4.py index fa4b9148a8..9d8bd420a4 100644 --- a/easybuild/easyblocks/m/mtl4.py +++ b/easybuild/easyblocks/m/mtl4.py @@ -29,12 +29,6 @@ class MTL4(Tarball): """Support for installing MTL4.""" - def configure(self): - """Check for dependencies (Boost).""" - - if not get_software_root("Boost"): - self.log.error("Boost module not loaded?") - def sanitycheck(self): """Custom sanity check for MTL4.""" From 2d5004c14fe56c6e441f91bf16c14f9cc65e6265 Mon Sep 17 00:00:00 2001 From: Kenneth Hoste Date: Wed, 15 Aug 2012 11:23:52 +0200 Subject: [PATCH 685/798] clean up support for building dependency graph, omit versions from module names if possible (if module names are unique) --- easybuild/build.py | 38 +++++++++++++++++++++++++++++++++----- 1 file changed, 33 insertions(+), 5 deletions(-) diff --git a/easybuild/build.py b/easybuild/build.py index 632af52a62..e1d82c37a9 100644 --- a/easybuild/build.py +++ b/easybuild/build.py @@ -200,6 +200,16 @@ def main(): if options.strict: filetools.strictness = options.strict + # building a dependency graph implies force, so that all dependencies are retained + # and also skips validation of easyconfigs (e.g. checking os dependencies) + validate_easyconfigs = True + retain_all_deps = False + if options.dep_graph: + log.info("Enabling force to generate dependency graph.") + options.force = True + validate_easyconfigs = False + retain_all_deps = True + ## Read easyconfig files packages = [] if len(paths) == 0: @@ -213,7 +223,7 @@ def main(): try: files = findEasyconfigs(path, log) for eb_file in files: - packages.extend(processEasyconfig(eb_file, log, blocks, validate=(not options.dep_graph))) + packages.extend(processEasyconfig(eb_file, log, blocks, validate=validate_easyconfigs)) except IOError, err: log.error("Processing easyconfigs in path %s failed: %s" % (path, err)) @@ -222,7 +232,7 @@ def main(): os.chdir(os.environ['PWD']) ## Skip modules that are already installed unless forced - if not options.force and not options.dep_graph: + if not options.force: m = Modules() packages, checkPackages = [], packages for package in checkPackages: @@ -239,7 +249,9 @@ def main(): ## Determine an order that will allow all specs in the set to build if len(packages) > 0: print_msg("resolving dependencies ...", log) - orderedSpecs = resolveDependencies(packages, options.robot, log, force=options.dep_graph) + # force all dependencies to be retained and validation to be skipped for building dep graph + force = retain_all_deps and not validate_easyconfigs + orderedSpecs = resolveDependencies(packages, options.robot, log, force=force) else: print_msg("No packages left to be built.", log) orderedSpecs = [] @@ -398,6 +410,7 @@ def processEasyconfig(path, log, onlyBlocks=None, regtest_online=False, validate def resolveDependencies(unprocessed, robot, log, force=False): """ Work through the list of packages to determine an optimal order + enabling force results in retaining all dependencies and skipping validation of easyconfigs """ if force: @@ -778,17 +791,32 @@ def dep_graph(fn, specs, log): except ImportError, err: error("Failed to import pygraph: %s" % err) + # check whether module names are unique + # if so, we can omit versions in the graph + names = set() + for spec in specs: + names.add(spec['module'][0]) + omit_versions = len(names) == len(specs) + + def mk_node_name(mod): + if omit_versions: + return mod[0] + else: + return '-'.join(mod) + # enhance list of specs for spec in specs: - spec['module'] = '-'.join(spec['module']) #spec['module'][0] - spec['unresolvedDependencies'] = ['-'.join(s) for s in spec['unresolvedDependencies']] #[s[0] for s in spec['unresolvedDependencies']] + spec['module'] = mk_node_name(spec['module']) + spec['unresolvedDependencies'] = [mk_node_name(s) for s in spec['unresolvedDependencies']] #[s[0] for s in spec['unresolvedDependencies']] + # build directed graph dgr = digraph() dgr.add_nodes([spec['module'] for spec in specs]) for spec in specs: for dep in spec['unresolvedDependencies']: dgr.add_edge((dep, spec['module'])) + # write to file dot = dot.write(dgr) if fn.endswith(".dot"): # create .dot file From 40ea0ddd49a56a8f45df32712a9630ba4c27a722 Mon Sep 17 00:00:00 2001 From: Kenneth Hoste Date: Wed, 15 Aug 2012 11:25:35 +0200 Subject: [PATCH 686/798] fix sourceURLs in MPFR example easyconfigs --- easybuild/easyconfigs/m/MPFR/MPFR-3.1.0-goalf-1.1.0-no-OFED.eb | 2 +- easybuild/easyconfigs/m/MPFR/MPFR-3.1.0-ictce-4.0.6.eb | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/easybuild/easyconfigs/m/MPFR/MPFR-3.1.0-goalf-1.1.0-no-OFED.eb b/easybuild/easyconfigs/m/MPFR/MPFR-3.1.0-goalf-1.1.0-no-OFED.eb index f2754b96a7..20d58c1906 100644 --- a/easybuild/easyconfigs/m/MPFR/MPFR-3.1.0-goalf-1.1.0-no-OFED.eb +++ b/easybuild/easyconfigs/m/MPFR/MPFR-3.1.0-goalf-1.1.0-no-OFED.eb @@ -7,8 +7,8 @@ floating-point computations with correct rounding.""" toolkit = {'name': 'goalf', 'version': '1.1.0-no-OFED'} +sourceURLs = ['http://www.mpfr.org/mpfr-%s/' % version] sources = ['%s-%s.tar.bz2' % (name.lower(), version)] -sourceURLs = ['http://www.mpfr.org/mpfr-current/'] dependencies = [('GMP', '5.0.5')] diff --git a/easybuild/easyconfigs/m/MPFR/MPFR-3.1.0-ictce-4.0.6.eb b/easybuild/easyconfigs/m/MPFR/MPFR-3.1.0-ictce-4.0.6.eb index a67e2b5b9e..1b4bd8d9f3 100644 --- a/easybuild/easyconfigs/m/MPFR/MPFR-3.1.0-ictce-4.0.6.eb +++ b/easybuild/easyconfigs/m/MPFR/MPFR-3.1.0-ictce-4.0.6.eb @@ -7,8 +7,8 @@ floating-point computations with correct rounding.""" toolkit = {'name': 'ictce', 'version': '4.0.6'} +sourceURLs = ['http://www.mpfr.org/mpfr-%s/' % version] sources = ['%s-%s.tar.bz2' % (name.lower(), version)] -sourceURLs = ['http://www.mpfr.org/mpfr-current/'] dependencies = [('GMP', '5.0.5')] From 87c1ed1448c62c47719dd862b0c0ee42d400386e Mon Sep 17 00:00:00 2001 From: Kenneth Hoste Date: Wed, 15 Aug 2012 12:02:53 +0200 Subject: [PATCH 687/798] specify -DMPICH_IGNORE_CXX_SEEK as C/C++/Fortran flags when using Intel compilers for DOLFIN --- easybuild/easyblocks/d/dolfin.py | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) diff --git a/easybuild/easyblocks/d/dolfin.py b/easybuild/easyblocks/d/dolfin.py index 407bf3f40d..8b8a22ad33 100644 --- a/easybuild/easyblocks/d/dolfin.py +++ b/easybuild/easyblocks/d/dolfin.py @@ -24,6 +24,7 @@ import os import re +import easybuild.tools.toolkit as toolkit from easybuild.easyblocks.c.cmakepythonpackage import CMakePythonPackage from easybuild.tools.modules import get_software_root, get_software_version @@ -34,6 +35,21 @@ class DOLFIN(CMakePythonPackage): def configure(self): """Set DOLFIN-specific configure options and configure with CMake.""" + # compiler flags + cflags = os.getenv('CFLAGS') + cxxflags = os.getenv('CXXFLAGS') + fflags = os.getenv('FFLAGS') + + # fix for "SEEK_SET is #defined but must not be for the C++ binding of MPI. Include mpi.h before stdio.h" + if self.toolkit().mpi_type() in [toolkit.INTEL, toolkit.MPICH2]: + cflags += " -DMPICH_IGNORE_CXX_SEEK" + cxxflags += " -DMPICH_IGNORE_CXX_SEEK" + fflags += " -DMPICH_IGNORE_CXX_SEEK" + + self.updatecfg('configopts', '-DCMAKE_C_FLAGS="%s"' % cflags) + self.updatecfg('configopts', '-DCMAKE_CXX_FLAGS="%s"' % cxxflags) + self.updatecfg('configopts', '-DCMAKE_Fortran_FLAGS="%s"' % fflags) + # make sure that required dependencies are loaded deps = ['Armadillo', 'Boost', 'CGAL', 'MTL4', 'ParMETIS', 'PETSc', 'Python', 'SCOTCH', 'Sphinx', 'SLEPc', 'SuiteSparse', 'Trilinos', 'UFC', 'zlib'] From 8c639b0efc08f91480c9aae179c3af7b3aa6153c Mon Sep 17 00:00:00 2001 From: Kenneth Hoste Date: Wed, 15 Aug 2012 12:06:17 +0200 Subject: [PATCH 688/798] only import graphviz when needed --- easybuild/build.py | 19 ++++++++++--------- 1 file changed, 10 insertions(+), 9 deletions(-) diff --git a/easybuild/build.py b/easybuild/build.py index e1d82c37a9..f330a7ca64 100644 --- a/easybuild/build.py +++ b/easybuild/build.py @@ -774,15 +774,6 @@ def dep_graph(fn, specs, log): """ Create a depenency graph for the given easyconfigs. """ - # import graphviz - try: - import sys - sys.path.append('..') - sys.path.append('/usr/lib/graphviz/python/') - sys.path.append('/usr/lib64/graphviz/python/') - import gv - except ImportError, err: - error("Failed to import graphviz: %s" % err) # import pygraph try: @@ -827,6 +818,16 @@ def mk_node_name(mod): except IOError, err: log.error("Failed to create file %s: %s" % (fn, err)) else: + # import graphviz + try: + import sys + sys.path.append('..') + sys.path.append('/usr/lib/graphviz/python/') + sys.path.append('/usr/lib64/graphviz/python/') + import gv + except ImportError, err: + error("Failed to import graphviz: %s" % err) + # try and render graph in specified file format gvv = gv.readstring(dot) gv.layout(gvv, 'dot') From a1185df7ba7b2cfa974fb9a298f1236b499217c9 Mon Sep 17 00:00:00 2001 From: Kenneth Hoste Date: Wed, 15 Aug 2012 15:51:51 +0200 Subject: [PATCH 689/798] fix copyright sections according to new style (one line per author) --- easybuild/easyblocks/b/boost.py | 8 ++++++-- easybuild/easyblocks/b/bzip2.py | 6 ++++-- easybuild/easyblocks/c/cgal.py | 6 ++++-- easybuild/easyblocks/c/cmake.py | 6 +++++- easybuild/easyblocks/c/cmakepythonpackage.py | 7 ++++++- easybuild/easyblocks/c/cplex.py | 6 +++++- easybuild/easyblocks/d/dolfin.py | 3 ++- easybuild/easyblocks/m/metis.py | 8 ++++++-- easybuild/easyblocks/p/packedbinary.py | 2 +- easybuild/easyblocks/p/parmetis.py | 6 +++++- easybuild/easyblocks/p/pythonpackage.py | 6 +++++- easybuild/easyblocks/s/scotch.py | 8 ++++++-- easybuild/easyblocks/s/suitesparse.py | 6 +++++- easybuild/framework/easyblock.py | 6 +++++- easybuild/scripts/add_header.py | 3 ++- easybuild/tools/asyncprocess.py | 6 +++++- easybuild/tools/pbs_job.py | 3 ++- 17 files changed, 74 insertions(+), 22 deletions(-) diff --git a/easybuild/easyblocks/b/boost.py b/easybuild/easyblocks/b/boost.py index 658abc5c6a..459c033023 100644 --- a/easybuild/easyblocks/b/boost.py +++ b/easybuild/easyblocks/b/boost.py @@ -1,5 +1,9 @@ ## -# Copyright 2009-2012 Stijn De Weirdt, Dries Verdegem, Kenneth Hoste, Pieter De Baets, Jens Timmerman +# Copyright 2009-2012 Stijn De Weirdt +# Copyright 2010 Dries Verdegem +# Copyright 2010-2012 Kenneth Hoste +# Copyright 2011 Pieter De Baets +# Copyright 2011-2012 Jens Timmerman # # This file is part of EasyBuild, # originally created by the HPC team of the University of Ghent (http://ugent.be/hpc). @@ -147,4 +151,4 @@ def sanitycheck(self): self.log.info("Customized sanity check paths: %s" % self.getcfg('sanityCheckPaths')) - Application.sanitycheck(self) \ No newline at end of file + Application.sanitycheck(self) diff --git a/easybuild/easyblocks/b/bzip2.py b/easybuild/easyblocks/b/bzip2.py index b5eb26f2fc..c1124bc2e0 100644 --- a/easybuild/easyblocks/b/bzip2.py +++ b/easybuild/easyblocks/b/bzip2.py @@ -1,4 +1,6 @@ -# Copyright 2012 Jens Timmerman, Kenneth Hoste +## +# Copyright 2012 Kenneth Hoste +# Copyright 2012 Jens Timmerman # # This file is part of EasyBuild # originally created by the HPC team of the University of Ghent (http://ugent.be/hpc). @@ -57,4 +59,4 @@ def sanitycheck(self): self.log.info("Customized sanity check paths: %s" % self.getcfg('sanityCheckPaths')) - Application.sanitycheck(self) \ No newline at end of file + Application.sanitycheck(self) diff --git a/easybuild/easyblocks/c/cgal.py b/easybuild/easyblocks/c/cgal.py index 68233f6b6a..e900d55392 100644 --- a/easybuild/easyblocks/c/cgal.py +++ b/easybuild/easyblocks/c/cgal.py @@ -1,4 +1,6 @@ -# Copyright 2012 Jens Timmerman, Kenneth Hoste +## +# Copyright 2012 Kenneth Hoste +# Copyright 2012 Jens Timmerman # # This file is part of EasyBuild, # originally created by the HPC team of the University of Ghent (http://ugent.be/hpc). @@ -59,4 +61,4 @@ def sanitycheck(self): self.log.info("Customized sanity check paths: %s" % self.getcfg('sanityCheckPaths')) - CMake.sanitycheck(self) \ No newline at end of file + CMake.sanitycheck(self) diff --git a/easybuild/easyblocks/c/cmake.py b/easybuild/easyblocks/c/cmake.py index 9aabd66d49..9e44a3169a 100644 --- a/easybuild/easyblocks/c/cmake.py +++ b/easybuild/easyblocks/c/cmake.py @@ -1,5 +1,9 @@ ## -# Copyright 2009-2012 Stijn De Weirdt, Dries Verdegem, Kenneth Hoste, Pieter De Baets, Jens Timmerman +# Copyright 2009-2012 Stijn De Weirdt +# Copyright 2010 Dries Verdegem +# Copyright 2010-2012 Kenneth Hoste +# Copyright 2011 Pieter De Baets +# Copyright 2011-2012 Jens Timmerman # # This file is part of EasyBuild, # originally created by the HPC team of the University of Ghent (http://ugent.be/hpc). diff --git a/easybuild/easyblocks/c/cmakepythonpackage.py b/easybuild/easyblocks/c/cmakepythonpackage.py index 7029b0d238..8308d9f44d 100644 --- a/easybuild/easyblocks/c/cmakepythonpackage.py +++ b/easybuild/easyblocks/c/cmakepythonpackage.py @@ -1,4 +1,9 @@ -# Copyright 2009-2012 Stijn De Weirdt, Dries Verdegem, Kenneth Hoste, Pieter De Baets, Jens Timmerman +## +# Copyright 2009-2012 Stijn De Weirdt +# Copyright 2010 Dries Verdegem +# Copyright 2010-2012 Kenneth Hoste +# Copyright 2011 Pieter De Baets +# Copyright 2011-2012 Jens Timmerman # # This file is part of EasyBuild, # originally created by the HPC team of the University of Ghent (http://ugent.be/hpc). diff --git a/easybuild/easyblocks/c/cplex.py b/easybuild/easyblocks/c/cplex.py index 28f4150213..6c0dd5e06d 100644 --- a/easybuild/easyblocks/c/cplex.py +++ b/easybuild/easyblocks/c/cplex.py @@ -1,5 +1,9 @@ ## -# Copyright 2009-2012 Stijn De Weirdt, Dries Verdegem, Kenneth Hoste, Pieter De Baets, Jens Timmerman +# Copyright 2009-2012 Stijn De Weirdt +# Copyright 2010 Dries Verdegem +# Copyright 2010-2012 Kenneth Hoste +# Copyright 2011 Pieter De Baets +# Copyright 2011-2012 Jens Timmerman # # This file is part of EasyBuild, # originally created by the HPC team of the University of Ghent (http://ugent.be/hpc). diff --git a/easybuild/easyblocks/d/dolfin.py b/easybuild/easyblocks/d/dolfin.py index 8b8a22ad33..20e5ef828e 100644 --- a/easybuild/easyblocks/d/dolfin.py +++ b/easybuild/easyblocks/d/dolfin.py @@ -1,5 +1,6 @@ ## -# Copyright 2009-2012 Stijn De Weirdt, Dries Verdegem, Kenneth Hoste, Pieter De Baets, Jens Timmerman +# Copyright 2012 Kenneth Hoste +# Copyright 2012 Jens Timmerman # # This file is part of EasyBuild, # originally created by the HPC team of the University of Ghent (http://ugent.be/hpc). diff --git a/easybuild/easyblocks/m/metis.py b/easybuild/easyblocks/m/metis.py index 76ef72d07e..2b1d553f30 100644 --- a/easybuild/easyblocks/m/metis.py +++ b/easybuild/easyblocks/m/metis.py @@ -1,5 +1,9 @@ ## -# Copyright 2009-2012 Stijn De Weirdt, Dries Verdegem, Kenneth Hoste, Pieter De Baets, Jens Timmerman +# Copyright 2009-2012 Stijn De Weirdt +# Copyright 2010 Dries Verdegem +# Copyright 2010-2012 Kenneth Hoste +# Copyright 2011 Pieter De Baets +# Copyright 2011-2012 Jens Timmerman # # This file is part of EasyBuild, # originally created by the HPC team of the University of Ghent (http://ugent.be/hpc). @@ -122,4 +126,4 @@ def sanitycheck(self): self.log.info("Customized sanity check paths: %s" % self.getcfg('sanityCheckPaths')) - Application.sanitycheck(self) \ No newline at end of file + Application.sanitycheck(self) diff --git a/easybuild/easyblocks/p/packedbinary.py b/easybuild/easyblocks/p/packedbinary.py index 79d8a256be..6695b08d57 100644 --- a/easybuild/easyblocks/p/packedbinary.py +++ b/easybuild/easyblocks/p/packedbinary.py @@ -1,5 +1,5 @@ ## -# Copyright 2009-2012 Stijn De Weirdt, Dries Verdegem, Kenneth Hoste, Pieter De Baets, Jens Timmerman +# Copyright 2012 Jens Timmerman # # This file is part of EasyBuild, # originally created by the HPC team of the University of Ghent (http://ugent.be/hpc). diff --git a/easybuild/easyblocks/p/parmetis.py b/easybuild/easyblocks/p/parmetis.py index 2aeb970325..f73a216916 100644 --- a/easybuild/easyblocks/p/parmetis.py +++ b/easybuild/easyblocks/p/parmetis.py @@ -1,5 +1,9 @@ ## -# Copyright 2009-2012 Stijn De Weirdt, Dries Verdegem, Kenneth Hoste, Pieter De Baets, Jens Timmerman +# Copyright 2009-2012 Stijn De Weirdt +# Copyright 2010 Dries Verdegem +# Copyright 2010-2012 Kenneth Hoste +# Copyright 2011 Pieter De Baets +# Copyright 2011-2012 Jens Timmerman # # This file is part of EasyBuild, # originally created by the HPC team of the University of Ghent (http://ugent.be/hpc). diff --git a/easybuild/easyblocks/p/pythonpackage.py b/easybuild/easyblocks/p/pythonpackage.py index 2856174131..113c7b83b3 100644 --- a/easybuild/easyblocks/p/pythonpackage.py +++ b/easybuild/easyblocks/p/pythonpackage.py @@ -1,5 +1,9 @@ ## -# Copyright 2009-2012 Stijn De Weirdt, Dries Verdegem, Kenneth Hoste, Pieter De Baets, Jens Timmerman +# Copyright 2009-2012 Stijn De Weirdt +# Copyright 2010 Dries Verdegem +# Copyright 2010-2012 Kenneth Hoste +# Copyright 2011 Pieter De Baets +# Copyright 2011-2012 Jens Timmerman # # This file is part of EasyBuild, # originally created by the HPC team of the University of Ghent (http://ugent.be/hpc). diff --git a/easybuild/easyblocks/s/scotch.py b/easybuild/easyblocks/s/scotch.py index 899c4d49b3..a53674319e 100644 --- a/easybuild/easyblocks/s/scotch.py +++ b/easybuild/easyblocks/s/scotch.py @@ -1,5 +1,9 @@ ## -# Copyright 2009-2012 Stijn De Weirdt, Dries Verdegem, Kenneth Hoste, Pieter De Baets, Jens Timmerman +# Copyright 2009-2012 Stijn De Weirdt +# Copyright 2010 Dries Verdegem +# Copyright 2010-2012 Kenneth Hoste +# Copyright 2011 Pieter De Baets +# Copyright 2011-2012 Jens Timmerman # # This file is part of EasyBuild, # originally created by the HPC team of the University of Ghent (http://ugent.be/hpc). @@ -162,4 +166,4 @@ def sanitycheck(self): self.log.info("Customized sanity check paths: %s" % self.getcfg('sanityCheckPaths')) - Application.sanitycheck(self) \ No newline at end of file + Application.sanitycheck(self) diff --git a/easybuild/easyblocks/s/suitesparse.py b/easybuild/easyblocks/s/suitesparse.py index bba9e71f6d..91bd7cb288 100644 --- a/easybuild/easyblocks/s/suitesparse.py +++ b/easybuild/easyblocks/s/suitesparse.py @@ -1,5 +1,9 @@ ## -# Copyright 2009-2012 Stijn De Weirdt, Dries Verdegem, Kenneth Hoste, Pieter De Baets, Jens Timmerman +# Copyright 2009-2012 Stijn De Weirdt +# Copyright 2010 Dries Verdegem +# Copyright 2010-2012 Kenneth Hoste +# Copyright 2011 Pieter De Baets +# Copyright 2011-2012 Jens Timmerman # # This file is part of EasyBuild, # originally created by the HPC team of the University of Ghent (http://ugent.be/hpc). diff --git a/easybuild/framework/easyblock.py b/easybuild/framework/easyblock.py index f5e31b561e..26a6e4a6e0 100644 --- a/easybuild/framework/easyblock.py +++ b/easybuild/framework/easyblock.py @@ -1,5 +1,9 @@ ## -# Copyright 2009-2012 Stijn De Weirdt, Dries Verdegem, Kenneth Hoste, Pieter De Baets, Jens Timmerman +# Copyright 2009-2012 Stijn De Weirdt +# Copyright 2010 Dries Verdegem +# Copyright 2010-2012 Kenneth Hoste +# Copyright 2011 Pieter De Baets +# Copyright 2011-2012 Jens Timmerman # Copyright 2012 Toon Willems # # This file is part of EasyBuild, diff --git a/easybuild/scripts/add_header.py b/easybuild/scripts/add_header.py index 36a85c946e..0ceb25341d 100755 --- a/easybuild/scripts/add_header.py +++ b/easybuild/scripts/add_header.py @@ -1,6 +1,7 @@ #!/usr/bin/env python ## -# Copyright 2012 Jens Timmerman, Kenneth Hoste +# Copyright 2012 Jens Timmerman +# Copyright 2012 Kenneth Hoste # # This file is part of EasyBuild, # originally created by the HPC-UGent team. diff --git a/easybuild/tools/asyncprocess.py b/easybuild/tools/asyncprocess.py index 960ebab698..49e9209e8f 100644 --- a/easybuild/tools/asyncprocess.py +++ b/easybuild/tools/asyncprocess.py @@ -5,7 +5,11 @@ # # http://code.activestate.com/recipes/440554/ # -# Copyright 2009-2012 Stijn De Weirdt, Dries Verdegem, Kenneth Hoste, Pieter De Baets, Jens Timmerman +# Copyright 2009-2012 Stijn De Weirdt +# Copyright 2010 Dries Verdegem +# Copyright 2010-2012 Kenneth Hoste +# Copyright 2011 Pieter De Baets +# Copyright 2011-2012 Jens Timmerman # # This file is part of EasyBuild, # originally created by the HPC team of the University of Ghent (http://ugent.be/hpc). diff --git a/easybuild/tools/pbs_job.py b/easybuild/tools/pbs_job.py index 04af4a024f..5c88af4d6c 100644 --- a/easybuild/tools/pbs_job.py +++ b/easybuild/tools/pbs_job.py @@ -1,5 +1,6 @@ ## -# Copyright 2012 Stijn De Weirdt, Toon Willems +# Copyright 2012 Stijn De Weirdt +# Copyright 2012 Toon Willems # # This file is part of EasyBuild, # originally created by the HPC team of the University of Ghent (http://ugent.be/hpc). From 44d6d95f233cbdc8cac9d92443a4d682d9a246ab Mon Sep 17 00:00:00 2001 From: Kenneth Hoste Date: Wed, 15 Aug 2012 21:06:05 +0200 Subject: [PATCH 690/798] fix typo in SCOTCH easyblock that miscompiles SCOTCH with Intel-based toolkit --- easybuild/easyblocks/s/scotch.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/easybuild/easyblocks/s/scotch.py b/easybuild/easyblocks/s/scotch.py index a53674319e..91819785e9 100644 --- a/easybuild/easyblocks/s/scotch.py +++ b/easybuild/easyblocks/s/scotch.py @@ -93,7 +93,7 @@ def make(self): if self.toolkit().comp_family() == toolkit.GCC: cflags += " -Drestrict=__restrict" else: - cflags = " -restrict -DIDXSIZE64" + cflags += " -restrict -DIDXSIZE64" # actually build for app in ["scotch", "ptscotch"]: From 44148f7c5593fc1e5c4ed590f7200dfa9e114b81 Mon Sep 17 00:00:00 2001 From: Kenneth Hoste Date: Wed, 15 Aug 2012 22:01:25 +0200 Subject: [PATCH 691/798] disable -DSCOTCH_PTHREAD when IMPI is used --- easybuild/easyblocks/s/scotch.py | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/easybuild/easyblocks/s/scotch.py b/easybuild/easyblocks/s/scotch.py index 91819785e9..6ecc87fb28 100644 --- a/easybuild/easyblocks/s/scotch.py +++ b/easybuild/easyblocks/s/scotch.py @@ -89,12 +89,15 @@ def make(self): ccp = os.environ['MPICC'] ccd = os.environ['MPICC'] - cflags = "-fPIC -O3 -DCOMMON_FILE_COMPRESS_GZ -DCOMMON_PTHREAD -DCOMMON_RANDOM_FIXED_SEED -DSCOTCH_RENAME -DSCOTCH_PTHREAD" + cflags = "-fPIC -O3 -DCOMMON_FILE_COMPRESS_GZ -DCOMMON_PTHREAD -DCOMMON_RANDOM_FIXED_SEED -DSCOTCH_RENAME" if self.toolkit().comp_family() == toolkit.GCC: cflags += " -Drestrict=__restrict" else: cflags += " -restrict -DIDXSIZE64" + if not self.toolkit().mpi_type() == toolkit.INTEL: + cflags += " -DSCOTCH_PTHREAD" + # actually build for app in ["scotch", "ptscotch"]: cmd = 'make CCS="%s" CCP="%s" CCD="%s" CFLAGS="%s" %s' % (ccs, ccp, ccd, cflags, app) From 142fc0a8ecc6f2a811f80b67db6337b89556900e Mon Sep 17 00:00:00 2001 From: Kenneth Hoste Date: Wed, 15 Aug 2012 22:46:00 +0200 Subject: [PATCH 692/798] fix use of extra_options in Boost, PETSc, SLEPc and Trilinos easyblocks --- easybuild/easyblocks/b/boost.py | 5 +++-- easybuild/easyblocks/p/petsc.py | 5 +++-- easybuild/easyblocks/s/slepc.py | 5 +++-- easybuild/easyblocks/t/trilinos.py | 5 +++-- 4 files changed, 12 insertions(+), 8 deletions(-) diff --git a/easybuild/easyblocks/b/boost.py b/easybuild/easyblocks/b/boost.py index 459c033023..d873366511 100644 --- a/easybuild/easyblocks/b/boost.py +++ b/easybuild/easyblocks/b/boost.py @@ -43,11 +43,12 @@ def __init__(self, *args, **kwargs): self.objdir = None - def extra_options(self): + @staticmethod + def extra_options(): """Add extra easyconfig parameters for Boost.""" extra_vars = {'boost_mpi':[False, "Build mpi boost module (default: False)"]} - return Application.extra_options(self, extra_vars) + return Application.extra_options(extra_vars) def configure(self): """Configure Boost build using custom tools""" diff --git a/easybuild/easyblocks/p/petsc.py b/easybuild/easyblocks/p/petsc.py index 6e87b78001..88b75f5adb 100644 --- a/easybuild/easyblocks/p/petsc.py +++ b/easybuild/easyblocks/p/petsc.py @@ -43,7 +43,8 @@ def __init__(self, *args, **kwargs): self.petsc_arch = "" self.petsc_subdir = "" - def extra_options(self): + @staticmethod + def extra_options(): """Add extra config options specific to PETSc.""" extra_vars = { 'sourceinstall': [False, "Indicates whether a source installation should be performed (default: False)"], @@ -53,7 +54,7 @@ def extra_options(self): 'papi_lib': ['/usr/lib64/libpapi.so', "Path for PAPI library (default: '/usr/lib64/libpapi.so')"], 'runtest': ['test', "Make target to test build (default: test)"] } - return Application.extra_options(self, extra_vars) + return Application.extra_options(extra_vars) def make_builddir(self): """Decide whether or not to build in install dir before creating build dir.""" diff --git a/easybuild/easyblocks/s/slepc.py b/easybuild/easyblocks/s/slepc.py index 71da803ab4..4fcd5118f7 100644 --- a/easybuild/easyblocks/s/slepc.py +++ b/easybuild/easyblocks/s/slepc.py @@ -40,13 +40,14 @@ def __init__(self, *args, **kwargs): self.slepc_arch_dir = None - def extra_options(self): + @staticmethod + def extra_options(): """Add extra config options specific to SLEPc.""" extra_vars = { 'sourceinstall': [False, "Indicates whether a source installation should be performed (default: False)"], 'runtest': ['test', "Make target to test build (default: test)"] } - return Application.extra_options(self, extra_vars) + return Application.extra_options(extra_vars) def make_builddir(self): """Decide whether or not to build in install dir before creating build dir.""" diff --git a/easybuild/easyblocks/t/trilinos.py b/easybuild/easyblocks/t/trilinos.py index 09418527d5..50cb12ce93 100644 --- a/easybuild/easyblocks/t/trilinos.py +++ b/easybuild/easyblocks/t/trilinos.py @@ -32,7 +32,8 @@ class Trilinos(CMake): """Support for building Trilinos.""" # see http://trilinos.sandia.gov/Trilinos10CMakeQuickstart.txt - def extra_options(self): + @staticmethod + def extra_options(): """Add extra config options specific to Trilinos.""" extra_vars = { 'shared_libs': [False, "BUild shared libs; if False, build static libs. (default: False)."], @@ -40,7 +41,7 @@ def extra_options(self): 'all_pkgs': [True, "Enable all packages (default: True)"], 'skip_pkgs': [[], "List of packages to skip (default: [])"] } - return CMake.extra_options(self, extra_vars) + return CMake.extra_options(extra_vars) def configure(self): """Set some extra environment variables before configuring.""" From 0fcaaf42b40f8de565571c0839a88db60197e998 Mon Sep 17 00:00:00 2001 From: Kenneth Hoste Date: Wed, 15 Aug 2012 22:50:06 +0200 Subject: [PATCH 693/798] add CMake as build dep for Trilinos with ictce --- .../t/Trilinos/Trilinos-10.12.2-ictce-4.0.6-Python-2.7.3.eb | 2 ++ 1 file changed, 2 insertions(+) diff --git a/easybuild/easyconfigs/t/Trilinos/Trilinos-10.12.2-ictce-4.0.6-Python-2.7.3.eb b/easybuild/easyconfigs/t/Trilinos/Trilinos-10.12.2-ictce-4.0.6-Python-2.7.3.eb index 01f665f2f4..31c459255e 100644 --- a/easybuild/easyconfigs/t/Trilinos/Trilinos-10.12.2-ictce-4.0.6-Python-2.7.3.eb +++ b/easybuild/easyconfigs/t/Trilinos/Trilinos-10.12.2-ictce-4.0.6-Python-2.7.3.eb @@ -25,6 +25,8 @@ dependencies=[ ('ParMETIS', '4.0.2') ] +builddependencies = [('CMake', '2.8.4')] + # Kokkos build is broken with ictce/4.0.6 # yields internal error: 0_1670 for packages/kokkos/LinAlg/Kokkos_DefaultArithmetic.hpp (line 827) skip_pkgs = ["Kokkos", "Tpetra"] \ No newline at end of file From 26bffb3f6a84de040c9633692785bfcd07ef6f35 Mon Sep 17 00:00:00 2001 From: Toon Willems Date: Thu, 16 Aug 2012 14:51:51 +0200 Subject: [PATCH 694/798] Fix hardcoded /tmp and use tempfile.mkdtemp() --- easybuild/tools/build_log.py | 17 ++++++----------- 1 file changed, 6 insertions(+), 11 deletions(-) diff --git a/easybuild/tools/build_log.py b/easybuild/tools/build_log.py index 4d454ec5c2..e9c961054b 100644 --- a/easybuild/tools/build_log.py +++ b/easybuild/tools/build_log.py @@ -29,6 +29,7 @@ import logging import os import sys +import tempfile import time from socket import gethostname from copy import copy @@ -165,17 +166,11 @@ def logFilename(name, version): date = time.strftime("%Y%m%d") timeStamp = time.strftime("%H%M%S") - filename = '/tmp/' + (logFormat() % {'name':name, - 'version':version, - 'date':date, - 'time':timeStamp - }) - - # Append numbers if the log file already exist - counter = 1 - while os.path.isfile(filename): - counter += 1 - filename = "%s.%d" % (filename, counter) + filename = os.path.join(tempfile.mkdtemp(), logFormat() % {'name': name, + 'version': version, + 'date': date, + 'time': timeStamp + }) return filename From 7db280f1df79607b872a7d845eadcfea06ba6c93 Mon Sep 17 00:00:00 2001 From: Toon Willems Date: Fri, 17 Aug 2012 08:57:53 +0200 Subject: [PATCH 695/798] Fix variables, logdir --- easybuild/build.py | 5 +++-- easybuild/easybuild_config.py | 3 +++ easybuild/scripts/regtest.py | 5 +++-- easybuild/tools/build_log.py | 18 ++++++++++++------ easybuild/tools/config.py | 14 ++++++++++++-- easybuild/tools/parallelbuild.py | 3 ++- 6 files changed, 35 insertions(+), 13 deletions(-) diff --git a/easybuild/build.py b/easybuild/build.py index dc1ee35e15..b7b6c42337 100644 --- a/easybuild/build.py +++ b/easybuild/build.py @@ -157,8 +157,9 @@ def main(): # - then, check command line option # - last, use default config file easybuild_config.py in build.py directory config_file = options.config - if not config_file and os.getenv('EASYBUILDCONFIG'): - config_file = os.getenv('EASYBUILDCONFIG') + + if not config_file and os.getenv(config.environmentVariables['configFile']): + config_file = os.getenv(config.environmentVariables['configFile']) else: appPath = os.path.dirname(os.path.realpath(sys.argv[0])) config_file = os.path.join(appPath, "easybuild_config.py") diff --git a/easybuild/easybuild_config.py b/easybuild/easybuild_config.py index 1a870ea58d..2229b05b9d 100644 --- a/easybuild/easybuild_config.py +++ b/easybuild/easybuild_config.py @@ -74,5 +74,8 @@ # supported in template: name, version, data, time logFormat = ("easybuild", "easybuild-%(name)s-%(version)s-%(date)s.%(time)s.log") +# set the path where log files will be stored +logDir = '/tmp' + # general cleanliness del os, getLog, config, log, prefix, buildDir, installDir, sourceDir diff --git a/easybuild/scripts/regtest.py b/easybuild/scripts/regtest.py index 525d79e232..7df369ac68 100755 --- a/easybuild/scripts/regtest.py +++ b/easybuild/scripts/regtest.py @@ -98,10 +98,11 @@ def main(): # Create base directory inside the current directory. This will be used to place # all log files and the test output as xml basename = "easybuild-test-%s" % datetime.now().strftime("%Y%m%d%H%M%S") + var = config.environmentVariables['testOutputPath'] if opts.directory: output_dir = opts.directory - elif "EASYBUILDTESTOUTPUT" in os.environ: - output_dir = os.path.abspath(os.environ['EASYBUILDTESTOUTPUT']) + elif var in os.environ: + output_dir = os.path.abspath(os.environ[var]) else: # Use default: Current dir + easybuil-test-timestamp output_dir = os.path.join(cur_dir, basename) diff --git a/easybuild/tools/build_log.py b/easybuild/tools/build_log.py index e9c961054b..e83cdc910e 100644 --- a/easybuild/tools/build_log.py +++ b/easybuild/tools/build_log.py @@ -161,16 +161,22 @@ def logFilename(name, version): Generate a filename to be used """ # this can't be imported at the top, otherwise we'd have a cyclic dependency - from easybuild.tools.config import logFormat + from easybuild.tools.config import logFormat, get_build_log_path date = time.strftime("%Y%m%d") timeStamp = time.strftime("%H%M%S") - filename = os.path.join(tempfile.mkdtemp(), logFormat() % {'name': name, - 'version': version, - 'date': date, - 'time': timeStamp - }) + filename = os.path.join(get_build_log_path(), logFormat() % {'name':name, + 'version':version, + 'date':date, + 'time':timeStamp + }) + + # Append numbers if the log file already exist + counter = 1 + while os.path.isfile(filename): + counter += 1 + filename = "%s.%d" % (filename, counter) return filename diff --git a/easybuild/tools/config.py b/easybuild/tools/config.py index b878a5dbfd..0f5e83af8f 100644 --- a/easybuild/tools/config.py +++ b/easybuild/tools/config.py @@ -38,8 +38,11 @@ variables = {} requiredVariables = ['buildPath', 'installPath', 'sourcePath', 'logFormat', 'repository', 'repositoryPath'] environmentVariables = { - 'buildPath': 'EASYBUILDBUILDPATH', - 'installPath': 'EASYBUILDINSTALLPATH' + 'buildPath': 'EASYBUILDBUILDPATH', # temporary build path + 'installPath': 'EASYBUILDINSTALLPATH', # final install path + 'logDir': 'EASYBUILDLOGDIR', # log directory where temporary log files are stored + 'configFile': 'EASYBUILDCONFIG', # path to the config file + 'testOutputPath': 'EASYBUILDTESTOUTPUT', # path to where jobs should place test output } def init(filename, **kwargs): @@ -171,3 +174,10 @@ def logPath(): Return the log path """ return variables['logFormat'][0] + +def get_build_log_path(): + """ + return temporary log directory + """ + return variables.get('logDir', '/tmp') + diff --git a/easybuild/tools/parallelbuild.py b/easybuild/tools/parallelbuild.py index 06caf93cc2..c20868d422 100644 --- a/easybuild/tools/parallelbuild.py +++ b/easybuild/tools/parallelbuild.py @@ -91,7 +91,8 @@ def create_job(build_command, package, output_dir=""): # create unique name based on module name name = "%s-%s" % package['module'] - easybuild_vars['EASYBUILDTESTOUTPUT'] = os.path.join(os.path.abspath(output_dir), name) + var = config.environmentVariables['testOutputPath'] + easybuild_vars[var] = os.path.join(os.path.abspath(output_dir), name) # just use latest build stats buildstats = getRepository().get_buildstats(*package['module']) From 1ebb0b843c108e9e14eaea36d63a2de04aa83410 Mon Sep 17 00:00:00 2001 From: Toon Willems Date: Fri, 17 Aug 2012 09:21:09 +0200 Subject: [PATCH 696/798] rename EasyBlock -> EasyConfig --- easybuild/build.py | 10 ++-- easybuild/framework/application.py | 6 +-- .../framework/{easyblock.py => easyconfig.py} | 8 ++-- easybuild/test/easyblock.py | 46 +++++++++---------- easybuild/tools/repository.py | 4 +- 5 files changed, 37 insertions(+), 37 deletions(-) rename easybuild/framework/{easyblock.py => easyconfig.py} (98%) diff --git a/easybuild/build.py b/easybuild/build.py index dc1ee35e15..5960b2e980 100644 --- a/easybuild/build.py +++ b/easybuild/build.py @@ -44,7 +44,7 @@ import easybuild.tools.filetools as filetools import easybuild.tools.parallelbuild as parbuild from easybuild.framework.application import get_class -from easybuild.framework.easyblock import EasyBlock +from easybuild.framework.easyconfig import EasyConfig from easybuild.tools.build_log import EasyBuildError, initLogger, \ removeLogHandler, print_msg from easybuild.tools.class_dumper import dumpClasses @@ -77,9 +77,9 @@ def add_build_options(parser): help="does the build/installation in a test directory " \ "located in $HOME/easybuildinstall") - parser.add_option("-s", "--stop", type="choice", choices=EasyBlock.validstops, + parser.add_option("-s", "--stop", type="choice", choices=EasyConfig.validstops, help="stop the installation after certain step" \ - "(valid: %s)" % ', '.join(EasyBlock.validstops)) + "(valid: %s)" % ', '.join(EasyConfig.validstops)) parser.add_option("-b", "--only-blocks", metavar="blocks", help="Only build blocks blk[,blk2]") parser.add_option("-k", "--skip", action="store_true", help="skip existing software (useful for installing additional packages)") @@ -168,7 +168,7 @@ def main(): if options.avail_easyconfig_params: app = get_class(options.easyblock, log) extra = app.extra_options() - default = EasyBlock.default_config + default = EasyConfig.default_config print "DEFAULT OPTIONS:" for key in sorted(default): @@ -347,7 +347,7 @@ def processEasyconfig(path, log, onlyBlocks=None, regtest_online=False): log.debug("Processing easyconfig %s" % spec) try: - eb = EasyBlock(spec) + eb = EasyConfig(spec) except EasyBuildError, err: msg = "Failed to process easyconfig %s:\n%s" % (spec, err.msg) log.exception(msg) diff --git a/easybuild/framework/application.py b/easybuild/framework/application.py index 01dd1dd443..d0d1b15301 100644 --- a/easybuild/framework/application.py +++ b/easybuild/framework/application.py @@ -42,7 +42,7 @@ import easybuild import easybuild.tools.config as config import easybuild.tools.environment as env -from easybuild.framework.easyblock import EasyBlock +from easybuild.framework.easyconfig import EasyConfig from easybuild.tools.build_log import EasyBuildError, initLogger, removeLogHandler,print_msg from easybuild.tools.config import source_path, buildPath, installPath from easybuild.tools.filetools import unpack, patch, run_cmd, convertName @@ -79,7 +79,7 @@ def __init__(self, path, debug=False): self.skip = None # Easyblock for this Application - self.cfg = EasyBlock(path, self.extra_options()) + self.cfg = EasyConfig(path, self.extra_options()) # module generator self.moduleGenerator = None @@ -258,7 +258,7 @@ def addsource(self, listOfSources=None): @staticmethod def extra_options(extra=None): """ - Extra options method which will be passed to the EasyBlock constructor. + Extra options method which will be passed to the EasyConfig constructor. Subclasses should call this method with a dict """ if extra == None: diff --git a/easybuild/framework/easyblock.py b/easybuild/framework/easyconfig.py similarity index 98% rename from easybuild/framework/easyblock.py rename to easybuild/framework/easyconfig.py index 35cf76c7b3..4fb069efa3 100644 --- a/easybuild/framework/easyblock.py +++ b/easybuild/framework/easyconfig.py @@ -30,7 +30,7 @@ from easybuild.tools.filetools import run_cmd -class EasyBlock: +class EasyConfig: """ Class which handles loading, reading, validation of easyconfigs """ @@ -107,13 +107,13 @@ def __init__(self, path, extra_options={}, validate=True): # perform a deepcopy of the default_config found in the easybuild.tools.easyblock module self.config = copy.deepcopy(self.default_config) self.config.update(extra_options) - self.log = getLog("EasyBlock") + self.log = getLog("EasyConfig") # store toolkit self._toolkit = None if not os.path.isfile(path): - self.log.error("EasyBlock __init__ expected a valid path") + self.log.error("EasyConfig __init__ expected a valid path") self.validations = {'moduleclass': self.validmoduleclasses, 'stop': self.validstops } @@ -158,7 +158,7 @@ def parse(self, path): def validate(self): """ - Validate this EasyBlock + Validate this EasyConfig - check certain variables TODO: move more into here """ diff --git a/easybuild/test/easyblock.py b/easybuild/test/easyblock.py index b335ae2fb2..61e02c1f73 100644 --- a/easybuild/test/easyblock.py +++ b/easybuild/test/easyblock.py @@ -22,12 +22,12 @@ import re from unittest import TestCase, TestSuite -from easybuild.framework.easyblock import EasyBlock +from easybuild.framework.easyconfig import EasyConfig from easybuild.tools.build_log import EasyBuildError from easybuild.tools.systemtools import get_shared_lib_ext -class EasyBlockTest(TestCase): +class EasyConfigTest(TestCase): """ Baseclass for easyblock testcases """ def setUp(self): @@ -49,18 +49,18 @@ def assertErrorRegex(self, error, regex, call, *args): self.assertTrue(re.search(regex, err.msg)) -class TestEmpty(EasyBlockTest): +class TestEmpty(EasyConfigTest): """ Test empty easyblocks """ contents = "# empty string" def runTest(self): """ empty files should not parse! """ - self.assertRaises(EasyBuildError, EasyBlock, self.eb_file) - self.assertErrorRegex(EasyBuildError, "expected a valid path", EasyBlock, "") + self.assertRaises(EasyBuildError, EasyConfig, self.eb_file) + self.assertErrorRegex(EasyBuildError, "expected a valid path", EasyConfig, "") -class TestMandatory(EasyBlockTest): +class TestMandatory(EasyConfigTest): """ Test mandatory variable validation """ contents = """ @@ -70,13 +70,13 @@ class TestMandatory(EasyBlockTest): def runTest(self): """ make sure all checking of mandatory variables works """ - self.assertErrorRegex(EasyBuildError, "mandatory variable \w* not provided", EasyBlock, self.eb_file) + self.assertErrorRegex(EasyBuildError, "mandatory variable \w* not provided", EasyConfig, self.eb_file) self.contents += "\n".join(['homepage = "http://google.com"', 'description = "test easyblock"', 'toolkit = {"name": "dummy", "version": "dummy"}']) self.setUp() - eb = EasyBlock(self.eb_file) + eb = EasyConfig(self.eb_file) self.assertEqual(eb['name'], "pi") self.assertEqual(eb['version'], "3.14") @@ -85,7 +85,7 @@ def runTest(self): self.assertEqual(eb['description'], "test easyblock") -class TestValidation(EasyBlockTest): +class TestValidation(EasyConfigTest): """ test other validations """ contents = """ @@ -99,7 +99,7 @@ class TestValidation(EasyBlockTest): def runTest(self): """ test other validations beside mandatory variables """ - eb = EasyBlock(self.eb_file, validate=False) + eb = EasyConfig(self.eb_file, validate=False) self.assertErrorRegex(EasyBuildError, "\w* provided \w* is not valid", eb.validate) eb['stop'] = 'patch' @@ -113,15 +113,15 @@ def runTest(self): self.assertEqual(eb.installversion(), "3.14") os.chmod(self.eb_file, 0000) - self.assertErrorRegex(EasyBuildError, "Unexpected IOError", EasyBlock, self.eb_file) + self.assertErrorRegex(EasyBuildError, "Unexpected IOError", EasyConfig, self.eb_file) os.chmod(self.eb_file, 0755) self.contents += "\nsyntax_error'" self.setUp() - self.assertErrorRegex(EasyBuildError, "SyntaxError", EasyBlock, self.eb_file) + self.assertErrorRegex(EasyBuildError, "SyntaxError", EasyConfig, self.eb_file) -class TestSharedLibExt(EasyBlockTest): +class TestSharedLibExt(EasyConfigTest): """ test availability of shared_lib_ext in easyblock context """ contents = """ @@ -135,11 +135,11 @@ class TestSharedLibExt(EasyBlockTest): def runTest(self): """ inside easyconfigs shared_lib_ext should be set """ - eb = EasyBlock(self.eb_file) + eb = EasyConfig(self.eb_file) self.assertEqual(eb['sanityCheckPaths']['files'][0], "lib/lib.%s" % get_shared_lib_ext()) -class TestDependency(EasyBlockTest): +class TestDependency(EasyConfigTest): """ Test parsing of dependencies """ contents = """ @@ -154,7 +154,7 @@ class TestDependency(EasyBlockTest): def runTest(self): """ test all possible ways of specifying dependencies """ - eb = EasyBlock(self.eb_file) + eb = EasyConfig(self.eb_file) # should include builddependencies self.assertEqual(len(eb.dependencies()), 4) self.assertEqual(len(eb.builddependencies()), 2) @@ -193,7 +193,7 @@ def runTest(self): self.assertErrorRegex(EasyBuildError, "without version", eb.dependencies) -class TestExtraOptions(EasyBlockTest): +class TestExtraOptions(EasyConfigTest): """ test extra options constructor """ contents = """ @@ -208,12 +208,12 @@ class TestExtraOptions(EasyBlockTest): def runTest(self): """ extra_options should allow other variables to be stored """ - eb = EasyBlock(self.eb_file) + eb = EasyConfig(self.eb_file) self.assertRaises(KeyError, lambda: eb['custom_key']) extra_vars = { 'custom_key': ['default', "This is a default key"]} - eb = EasyBlock(self.eb_file, extra_vars) + eb = EasyConfig(self.eb_file, extra_vars) self.assertEqual(eb['custom_key'], 'default') eb['custom_key'] = "not so default" @@ -223,7 +223,7 @@ def runTest(self): self.setUp() - eb = EasyBlock(self.eb_file, extra_vars) + eb = EasyConfig(self.eb_file, extra_vars) self.assertEqual(eb['custom_key'], 'test') eb['custom_key'] = "not so default" @@ -233,7 +233,7 @@ def runTest(self): self.assertEqual(eb.toolkit().opts['static'], True) -class TestSuggestions(EasyBlockTest): +class TestSuggestions(EasyConfigTest): """ test suggestions on typos """ contents = """ @@ -247,8 +247,8 @@ class TestSuggestions(EasyBlockTest): def runTest(self): """ If a typo is present, suggestion should be provided (if possible) """ - self.assertErrorRegex(EasyBuildError, "invalid variable dependencis", EasyBlock, self.eb_file) - self.assertErrorRegex(EasyBuildError, "suggestions: dependencies", EasyBlock, self.eb_file) + self.assertErrorRegex(EasyBuildError, "invalid variable dependencis", EasyConfig, self.eb_file) + self.assertErrorRegex(EasyBuildError, "suggestions: dependencies", EasyConfig, self.eb_file) def suite(): diff --git a/easybuild/tools/repository.py b/easybuild/tools/repository.py index cfa93ca945..8d5b6a0219 100644 --- a/easybuild/tools/repository.py +++ b/easybuild/tools/repository.py @@ -36,7 +36,7 @@ import time import easybuild -from easybuild.framework.easyblock import EasyBlock +from easybuild.framework.easyconfig import EasyConfig from easybuild.tools.build_log import getLog @@ -186,7 +186,7 @@ def get_buildstats(self, name, version): log.debug("version (%s) of module (%s) has not been found in the repo" % (version, name)) return [] - eb = EasyBlock(dest) + eb = EasyConfig(dest) return eb['buildstats'] From e205aa976b6939df5985a3690835c8fba2fb4106 Mon Sep 17 00:00:00 2001 From: Toon Willems Date: Fri, 17 Aug 2012 11:14:49 +0200 Subject: [PATCH 697/798] create categories for options --- easybuild/framework/easyblock.py | 14 ++++++++++++++ 1 file changed, 14 insertions(+) diff --git a/easybuild/framework/easyblock.py b/easybuild/framework/easyblock.py index 35cf76c7b3..bcb8814cd5 100644 --- a/easybuild/framework/easyblock.py +++ b/easybuild/framework/easyblock.py @@ -39,6 +39,20 @@ class EasyBlock: validmoduleclasses = ['base', 'compiler', 'lib'] validstops = ['cfg', 'source', 'patch', 'prepare', 'configure', 'make', 'install', 'test', 'postproc', 'cleanup', 'packages'] + categories = { + 'mandatory': mandatory, + 'toolkit': ['toolkit', 'toolkitopts', 'onlytkmod'], + 'build': ['sources', 'sourceURLs', 'unpackOptions', 'patches', 'preconfigopts', 'configopts', + 'premakeopts', 'makeopts', 'parallel', 'runtest', 'installopts', 'sanityCheckPaths', + 'sanityCheckCommand', 'modextravars', 'tests', 'versionprefix', 'versionsuffix'], + 'file-management': ['startfrom', 'cleanupoldbuild', 'cleanupoldinstall', 'dontcreateinstalldir', + 'keeppreviousinstall', 'keepsymlinks'], + 'dependencies': ['dependencies', 'builddependencies', 'osdependencies'], + 'license': ['group', 'key', 'licenseServer', 'licenseServerPort'], + 'package': ['pkglist', 'pkgcfgs', 'pkgdefaultclass', 'pkgfilter', 'pkgfindsource', 'pkginstalldeps', + 'pkgloadmodule', 'pkgmodulenames', 'pkgpatches', 'pkgtemplate', 'requirements'], + } + default_config = { 'name': [None, "Name of software"], 'version': [None, "Version of software"], From acbeab711b9f599d207fce3396be0fcf74256bcb Mon Sep 17 00:00:00 2001 From: Toon Willems Date: Fri, 17 Aug 2012 12:45:40 +0200 Subject: [PATCH 698/798] add category to default_config --- easybuild/framework/easyblock.py | 163 +++++++++++++++++-------------- 1 file changed, 92 insertions(+), 71 deletions(-) diff --git a/easybuild/framework/easyblock.py b/easybuild/framework/easyblock.py index bcb8814cd5..2d3becd27d 100644 --- a/easybuild/framework/easyblock.py +++ b/easybuild/framework/easyblock.py @@ -30,85 +30,100 @@ from easybuild.tools.filetools import run_cmd +MANDATORY = (0, 'mandatory') +CUSTOM = (1, 'easyblock-specific') +TOOLKIT = (2, 'toolkit') +BUILD = (3, 'build') +FILEMANAGEMENT = (4, 'file-management') +DEPENDENCIES = (5, 'dependencies') +LICENSE = (6, 'license') +PACKAGE = (7, 'package') +MODULES = (8, 'modules') +OTHER = (9, 'buildstats') + + class EasyBlock: """ Class which handles loading, reading, validation of easyconfigs """ - # mandatory entries - mandatory = ['name', 'version', 'homepage', 'description', 'toolkit'] + # validations validmoduleclasses = ['base', 'compiler', 'lib'] validstops = ['cfg', 'source', 'patch', 'prepare', 'configure', 'make', 'install', 'test', 'postproc', 'cleanup', 'packages'] - categories = { - 'mandatory': mandatory, - 'toolkit': ['toolkit', 'toolkitopts', 'onlytkmod'], - 'build': ['sources', 'sourceURLs', 'unpackOptions', 'patches', 'preconfigopts', 'configopts', - 'premakeopts', 'makeopts', 'parallel', 'runtest', 'installopts', 'sanityCheckPaths', - 'sanityCheckCommand', 'modextravars', 'tests', 'versionprefix', 'versionsuffix'], - 'file-management': ['startfrom', 'cleanupoldbuild', 'cleanupoldinstall', 'dontcreateinstalldir', - 'keeppreviousinstall', 'keepsymlinks'], - 'dependencies': ['dependencies', 'builddependencies', 'osdependencies'], - 'license': ['group', 'key', 'licenseServer', 'licenseServerPort'], - 'package': ['pkglist', 'pkgcfgs', 'pkgdefaultclass', 'pkgfilter', 'pkgfindsource', 'pkginstalldeps', - 'pkgloadmodule', 'pkgmodulenames', 'pkgpatches', 'pkgtemplate', 'requirements'], - } - default_config = { - 'name': [None, "Name of software"], - 'version': [None, "Version of software"], - 'easybuildVersion': [None, "EasyBuild-version this spec-file was written for"], - 'group': [None, "Name of the user group for which the software should be available"], - 'versionsuffix': ['', 'Additional suffix for software version (placed after toolkit name)'], - 'versionprefix': ['', 'Additional prefix for software version (placed before version and toolkit name)'], - 'runtest': [None, 'Indicates if a test should be run after make; should specify argument after make (for e.g., "test" for make test) (Default: None)'], - 'preconfigopts': ['', 'Extra options pre-passed to configure.'], - 'configopts': ['', 'Extra options passed to configure (Default already has --prefix)'], - 'premakeopts': ['', 'Extra options pre-passed to make.'], - 'makeopts': ['', 'Extra options passed to make (Default already has -j X)'], - 'installopts': ['', 'Extra options for installation (Default: nothing)'], - 'moduleclass': ['base', 'Module class to be used for this software (Default: base) (Valid: %s)' % validmoduleclasses], - 'moduleforceunload': [False, 'Force unload of all modules when loading the package (Default: False)'], - 'moduleloadnoconflict': [False, "Don't check for conflicts, unload other versions instead (Default: False)"], - 'startfrom': [None, 'Path to start the make in. If the path is absolute, use that path. If not, this is added to the guessed path.'], - 'onlytkmod': [False, 'Boolean/string to indicate if the toolkit should only load the enviornment with module (True) or also set all other variables (False) like compiler CC etc (If string: comma separated list of variables that will be ignored). (Default: False)'], - 'stop': [None, 'Keyword to halt the buildprocess at certain points. Valid are %s' % validstops], - 'homepage': [None, 'The homepage of the software'], - 'description': [None, 'A short description of the software'], - 'parallel': [None, 'Degree of parallelism for e.g. make (default: based on the number of cores and restrictions in ulimit)'], - 'maxparallel': [None, 'Max degree of parallelism (default: None)'], - 'keeppreviousinstall': [False, 'Boolean to keep the previous installation with identical name. Default False, expert s only!'], - 'cleanupoldbuild': [True, 'Boolean to remove (True) or backup (False) the previous build directory with identical name or not. Default True'], - 'cleanupoldinstall': [True, 'Boolean to remove (True) or backup (False) the previous install directory with identical name or not. Default True'], - 'dontcreateinstalldir': [False, 'Boolean to create (False) or not create (True) the install directory (Default False)'], - 'toolkit': [None, 'Name and version of toolkit'], - 'toolkitopts': ['', 'Extra options for compilers'], - 'keepsymlinks': [False, 'Boolean to determine whether symlinks are to be kept during copying or if the content of the files pointed to should be copied'], - 'licenseServer': [None, 'License server for software'], - 'licenseServerPort': [None, 'Port for license server'], - 'key': [None, 'Key for installing software'], - 'pkglist': [[], 'List with packages added to the baseinstallation (Default: [])'], - 'pkgmodulenames': [{}, 'Dictionary with real modules names for packages, if they are different from the package name (Default: {})'], - 'pkgloadmodule': [True, 'Load the to-be installed software using temporary module (Default: True)'], - 'pkgtemplate': ["%s-%s.tar.gz", "Template for package source file names (Default: %s-%s.tar.gz)"], - 'pkgfindsource': [True, "Find sources for packages (Default: True)"], - 'pkginstalldeps': [True, "Install dependencies for specified packages if necessary (Default: True)"], - 'pkgdefaultclass': [None, "List of module for and name of the default package class (Default: None)"], - 'skip': [False, "Skip existing software (Default: False)"], - 'pkgfilter': [None, "Package filter details. List with template for cmd and input to cmd (templates for name, version and src). (Default: None)"], - 'pkgpatches': [[], 'List with patches for packages (default: [])'], - 'pkgcfgs': [{}, 'Dictionary with config parameters for packages (default: {})'], - 'dependencies': [[], "List of dependencies (default: [])"], - 'builddependencies': [[], "List of build dependencies (default: [])"], - 'unpackOptions': [None, "Extra options for unpacking source (default: None)"], - 'modextravars': [{}, "Extra environment variables to be added to module file (default: {})"], - 'osdependencies': [[], "Packages that should be present on the system"], - 'sources': [[], "List of source files"], - 'sourceURLs': [[], "List of URLs for source files"], - 'patches': [[], "List of patches to apply"], - 'tests': [[], "List of test-scripts to run after install. A test script should return a non-zero exit status to fail"], - 'sanityCheckPaths': [{}, "List of files and directories to check (format: {'files':, 'dirs':}, default: {})"], - 'sanityCheckCommand': [None, "format: (name, options) e.g. ('gzip','-h') . If set to True it will use (name, '-h')"], - 'buildstats': [None, "A list of dicts with buildstats: build_time, platform, core_count, cpu_model, install_size, timestamp"], + 'name': [None, "Name of software", MANDATORY], + 'version': [None, "Version of software", MANDATORY], + 'easybuildVersion': [None, "EasyBuild-version this spec-file was written for", BUILD], + 'group': [None, "Name of the user group for which the software should be available", LICENSE], + 'versionsuffix': ['', 'Additional suffix for software version (placed after toolkit name)', BUILD], + 'versionprefix': ['', 'Additional prefix for software version (placed before version and toolkit name)', BUILD], + 'runtest': [None, 'Indicates if a test should be run after make; should specify argument after make (for \ + e.g.,"test" for make test) (Default: None)', BUILD], + 'preconfigopts': ['', 'Extra options pre-passed to configure.', BUILD], + 'configopts': ['', 'Extra options passed to configure (Default already has --prefix)', BUILD], + 'premakeopts': ['', 'Extra options pre-passed to make.', BUILD], + 'makeopts': ['', 'Extra options passed to make (Default already has -j X)', BUILD], + 'installopts': ['', 'Extra options for installation (Default: nothing)', BUILD], + 'moduleclass': ['base', 'Module class to be used for this software (Default: base) (Valid: %s)' % + validmoduleclasses, MODULES], + 'moduleforceunload': [False, 'Force unload of all modules when loading the package (Default: False)', MODULES], + 'moduleloadnoconflict': [False, "Don't check for conflicts, unload other versions instead (Default: False)", + MODULES], + 'startfrom': [None, 'Path to start the make in. If the path is absolute, use that path. If not, this is added \ + to the guessed path.', FILEMANAGEMENT], + 'onlytkmod': [False, 'Boolean/string to indicate if the toolkit should only load the enviornment with module \ + (True) or also set all other variables (False) like compiler CC etc (If string: comma separated list of \ + variables that will be ignored). (Default: False)', TOOLKIT], + 'stop': [None, 'Keyword to halt the buildprocess at certain points. Valid are %s' % validstops, BUILD], + 'homepage': [None, 'The homepage of the software', MANDATORY], + 'description': [None, 'A short description of the software', MANDATORY], + 'parallel': [None, 'Degree of parallelism for e.g. make (default: based on the number of cores and \ + restrictions in ulimit)', BUILD], + 'maxparallel': [None, 'Max degree of parallelism (default: None)', BUILD], + 'keeppreviousinstall': [False, 'Boolean to keep the previous installation with identical name. Default False, \ + expert s only!', FILEMANAGEMENT], + 'cleanupoldbuild': [True, 'Boolean to remove (True) or backup (False) the previous build directory with \ + identical name or not. Default True', FILEMANAGEMENT], + 'cleanupoldinstall': [True, 'Boolean to remove (True) or backup (False) the previous install directory with \ + identical name or not. Default True', FILEMANAGEMENT], + 'dontcreateinstalldir': [False, 'Boolean to create (False) or not create (True) the install directory (Default \ + False)', FILEMANAGEMENT], + 'toolkit': [None, 'Name and version of toolkit', MANDATORY], + 'toolkitopts': ['', 'Extra options for compilers', TOOLKIT], + 'keepsymlinks': [False, 'Boolean to determine whether symlinks are to be kept during copying or if the content \ + of the files pointed to should be copied', FILEMANAGEMENT], + 'licenseServer': [None, 'License server for software', LICENSE], + 'licenseServerPort': [None, 'Port for license server', LICENSE], + 'key': [None, 'Key for installing software', LICENSE], + 'pkglist': [[], 'List with packages added to the baseinstallation (Default: [])', PACKAGE], + 'pkgmodulenames': [{}, 'Dictionary with real modules names for packages, if they are different from the \ + package name (Default: {})', PACKAGE], + 'pkgloadmodule': [True, 'Load the to-be installed software using temporary module (Default: True)', PACKAGE], + 'pkgtemplate': ["%s-%s.tar.gz", "Template for package source file names (Default: %s-%s.tar.gz)", PACKAGE], + 'pkgfindsource': [True, "Find sources for packages (Default: True)", PACKAGE], + 'pkginstalldeps': [True, "Install dependencies for specified packages if necessary (Default: True)", PACKAGE], + 'pkgdefaultclass': [None, "List of module for and name of the default package class (Default: None)", PACKAGE], + 'skip': [False, "Skip existing software (Default: False)", BUILD], + 'pkgfilter': [None, "Package filter details. List with template for cmd and input to cmd (templates for name, \ + version and src). (Default: None)", PACKAGE], + 'pkgpatches': [[], 'List with patches for packages (default: [])', PACKAGE], + 'pkgcfgs': [{}, 'Dictionary with config parameters for packages (default: {})', PACKAGE], + 'dependencies': [[], "List of dependencies (default: [])", DEPENDENCIES], + 'builddependencies': [[], "List of build dependencies (default: [])", DEPENDENCIES], + 'unpackOptions': [None, "Extra options for unpacking source (default: None)", BUILD], + 'modextravars': [{}, "Extra environment variables to be added to module file (default: {})", MODULES], + 'osdependencies': [[], "Packages that should be present on the system", DEPENDENCIES], + 'sources': [[], "List of source files", BUILD], + 'sourceURLs': [[], "List of URLs for source files", BUILD], + 'patches': [[], "List of patches to apply", BUILD], + 'tests': [[], "List of test-scripts to run after install. A test script should return a non-zero exit status \ + to fail", BUILD], + 'sanityCheckPaths': [{}, "List of files and directories to check (format: {'files':, 'dirs':}, \ + default: {})", BUILD], + 'sanityCheckCommand': [None, "format: (name, options) e.g. ('gzip','-h') . If set to True it will use (name, \ + '-h')", BUILD], + 'buildstats': [None, "A list of dicts with buildstats: build_time, platform, core_count, cpu_model, \ + install_size, timestamp", OTHER], } def __init__(self, path, extra_options={}, validate=True): @@ -122,6 +137,12 @@ def __init__(self, path, extra_options={}, validate=True): self.config = copy.deepcopy(self.default_config) self.config.update(extra_options) self.log = getLog("EasyBlock") + self.mandatory = ['name', 'version', 'homepage', 'description', 'toolkit'] + + # extend mandatory keys + for key in extra_options: + if extra_options[key][2] == MANDATORY: + self.mandatory.append(key) # store toolkit self._toolkit = None From 7d5fc237f19b5e7677feff1ec3eb50f8c67ad505 Mon Sep 17 00:00:00 2001 From: Toon Willems Date: Fri, 17 Aug 2012 12:47:03 +0200 Subject: [PATCH 699/798] rename test files as well --- easybuild/test/{easyblock.py => easyconfig.py} | 0 easybuild/test/suite.py | 2 +- 2 files changed, 1 insertion(+), 1 deletion(-) rename easybuild/test/{easyblock.py => easyconfig.py} (100%) diff --git a/easybuild/test/easyblock.py b/easybuild/test/easyconfig.py similarity index 100% rename from easybuild/test/easyblock.py rename to easybuild/test/easyconfig.py diff --git a/easybuild/test/suite.py b/easybuild/test/suite.py index 30358f56c2..be0db5c0ff 100644 --- a/easybuild/test/suite.py +++ b/easybuild/test/suite.py @@ -24,7 +24,7 @@ # toolkit should be first to allow hacks to work import easybuild.test.toolkit as t import easybuild.test.asyncprocess as a -import easybuild.test.easyblock as e +import easybuild.test.easyconfig as e import easybuild.test.modulegenerator as mg import easybuild.test.modules as m import easybuild.test.filetools as f From ba861e4c688d8c8d3255a22f9beaaf6e3391c5d2 Mon Sep 17 00:00:00 2001 From: Toon Willems Date: Fri, 17 Aug 2012 13:03:27 +0200 Subject: [PATCH 700/798] add tests for the extra mandatory arguments --- easybuild/test/easyblock.py | 15 ++++++++++++++- 1 file changed, 14 insertions(+), 1 deletion(-) diff --git a/easybuild/test/easyblock.py b/easybuild/test/easyblock.py index 61e02c1f73..cf3c4bc502 100644 --- a/easybuild/test/easyblock.py +++ b/easybuild/test/easyblock.py @@ -21,6 +21,7 @@ import os import re +import easybuild.framework.easyconfig as easyconfig from unittest import TestCase, TestSuite from easybuild.framework.easyconfig import EasyConfig from easybuild.tools.build_log import EasyBuildError @@ -211,7 +212,7 @@ def runTest(self): eb = EasyConfig(self.eb_file) self.assertRaises(KeyError, lambda: eb['custom_key']) - extra_vars = { 'custom_key': ['default', "This is a default key"]} + extra_vars = {'custom_key': ['default', "This is a default key", easyconfig.CUSTOM]} eb = EasyConfig(self.eb_file, extra_vars) self.assertEqual(eb['custom_key'], 'default') @@ -232,6 +233,18 @@ def runTest(self): # test if extra toolkit options are being passed self.assertEqual(eb.toolkit().opts['static'], True) + extra_vars.update({'mandatory_key': ['default', 'another mandatory key', easyconfig.MANDATORY]}) + + # test extra mandatory vars + self.assertErrorRegex(EasyBuildError, "mandatory variable \S* not provided", EasyConfig, self.eb_file) + + self.contents += '\nmandatory_key = "value"' + self.setUp() + + eb = EasyConfig(self.eb_file, extra_vars) + + self.assertEqual(eb['mandatory_key'], 'value') + class TestSuggestions(EasyConfigTest): """ test suggestions on typos """ From 608d1d248232a9b7964b18f4e5fadd91f26396ce Mon Sep 17 00:00:00 2001 From: Kenneth Hoste Date: Fri, 17 Aug 2012 15:05:54 +0200 Subject: [PATCH 701/798] move all imports on top in try-except-ImportError blocks, use try-except-NameError block around functions that use optional packages to deliver sensible error messages if the packages are not there --- easybuild/build.py | 51 ++++++++++++++++------------- easybuild/scripts/port_easyblock.py | 25 +++++++++----- easybuild/tools/repository.py | 31 ++++++++++-------- 3 files changed, 64 insertions(+), 43 deletions(-) diff --git a/easybuild/build.py b/easybuild/build.py index f330a7ca64..29141e1a0f 100644 --- a/easybuild/build.py +++ b/easybuild/build.py @@ -38,6 +38,26 @@ import time from optparse import OptionParser +# optional Python packages, these might be missing +# failing imports are just ignored +# a NameError should be catched where these are used + +# PyGraph (used for generating dependency graphs) +try: + import pygraph.readwrite.dot as dot + from pygraph.classes.digraph import digraph +except ImportError, err: + pass + +# graphviz (used for creating dependency graph images) +try: + sys.path.append('..') + sys.path.append('/usr/lib/graphviz/python/') + sys.path.append('/usr/lib64/graphviz/python/') + import gv +except ImportError, err: + pass + import easybuild # required for VERBOSE_VERSION import easybuild.tools.config as config import easybuild.tools.filetools as filetools @@ -259,7 +279,11 @@ def main(): # create dependency graph and exit if options.dep_graph: log.info("Creating dependency graph %s" % options.dep_graph) - dep_graph(options.dep_graph, orderedSpecs, log) + try: + dep_graph(options.dep_graph, orderedSpecs, log) + except NameError, err: + log.error("At least one optional Python packages (pygraph, dot, graphviz) required to " \ + "generate dependency graphs is missing: %s" % err) sys.exit(0) # submit build as job(s) and exit @@ -772,16 +796,9 @@ def build(module, options, log, origEnviron, exitOnFailure=True): def dep_graph(fn, specs, log): """ - Create a depenency graph for the given easyconfigs. + Create a dependency graph for the given easyconfigs. """ - # import pygraph - try: - import pygraph.readwrite.dot as dot - from pygraph.classes.digraph import digraph - except ImportError, err: - error("Failed to import pygraph: %s" % err) - # check whether module names are unique # if so, we can omit versions in the graph names = set() @@ -808,28 +825,18 @@ def mk_node_name(mod): dgr.add_edge((dep, spec['module'])) # write to file - dot = dot.write(dgr) + dottxt = dot.write(dgr) if fn.endswith(".dot"): # create .dot file try: f = open(fn, "w") - f.write(dot) + f.write(dottxt) f.close() except IOError, err: log.error("Failed to create file %s: %s" % (fn, err)) else: - # import graphviz - try: - import sys - sys.path.append('..') - sys.path.append('/usr/lib/graphviz/python/') - sys.path.append('/usr/lib64/graphviz/python/') - import gv - except ImportError, err: - error("Failed to import graphviz: %s" % err) - # try and render graph in specified file format - gvv = gv.readstring(dot) + gvv = gv.readstring(dottxt) gv.layout(gvv, 'dot') gv.render(gvv, fn.split('.')[-1], fn) diff --git a/easybuild/scripts/port_easyblock.py b/easybuild/scripts/port_easyblock.py index 942c632496..d5cabf2ebf 100755 --- a/easybuild/scripts/port_easyblock.py +++ b/easybuild/scripts/port_easyblock.py @@ -42,17 +42,24 @@ import shutil import sys +# optional Python packages, these might be missing +# failing imports are just ignored +# a NameError should be catched where these are used + +# PyLint +try: + import pylint.lint + from pylint.reporters.text import TextReporter +except ImportError: + pass + + # error function (exits) def error(msg): """Error function: print message to stderr and exit with non-zero exit code.""" sys.stderr.write("ERROR: %s\n" % msg) sys.exit(1) -try: - import pylint.lint -except ImportError: - error("Failed to import PyLint module, I need it.") - # warning function def warning(msg): """Warning function: print message to stderr.""" @@ -201,8 +208,6 @@ def read(self): # check whether PyLint still reports warnings or error def run_pylint(fn): - from pylint.reporters.text import TextReporter - print "checking for PyLint warnings or errors..." # run PyLint on file, catch output @@ -290,7 +295,11 @@ def run_pylint(fn): error("Failed to write refactored easyblock %s: %s" % (easyblock, err)) # check for PyLint warnings/errors -all_checks.append(run_pylint(easyblock)) +try: + all_checks.append(run_pylint(easyblock)) +except NameError, err: + error("It seems like PyLint is not available: %s" % err) + if not all(all_checks): error("One or multiple checks have failed, easyblock %s is not fully cleaned up yet!" % easyblock) diff --git a/easybuild/tools/repository.py b/easybuild/tools/repository.py index cfa93ca945..4485b600d0 100644 --- a/easybuild/tools/repository.py +++ b/easybuild/tools/repository.py @@ -35,24 +35,31 @@ import tempfile import time -import easybuild -from easybuild.framework.easyblock import EasyBlock -from easybuild.tools.build_log import getLog +# optional Python packages, these might be missing +# failing imports are just ignored +# a NameError should be catched where these are used - -log = getLog('repo') +# GitPython try: import git from git import GitCommandError except ImportError: pass +# PySVN try: import pysvn #@UnusedImport from pysvn import ClientError #IGNORE:E0611 pysvn fails to recognize ClientError is available except ImportError: pass +import easybuild +from easybuild.framework.easyblock import EasyBlock +from easybuild.tools.build_log import getLog + + +log = getLog('repo') + class Repository: """ @@ -208,10 +215,9 @@ def setupRepo(self): Set up git repository. """ try: - import git #@UnusedImport - from git import GitCommandError #@UnusedImport - except ImportError: - log.exception("GitPython failed to load") + raise git.GitCommandError + except NameError, err: + log.exception("It seems like GitPython is not available: %s" % err) self.wc = tempfile.mkdtemp(prefix='git-wc-') def createWorkingCopy(self): @@ -301,10 +307,9 @@ def setupRepo(self): """ self.repo = os.path.join(self.repo, self.subdir) try: - import pysvn - from pysvn import ClientError #IGNORE:E0611 pysvn fails to recognize ClientError is available - except ImportError: - log.exception("Failed to load pysvn. Make sure it is installed " + raise pysvn.ClientError #IGNORE:E0611 pysvn fails to recognize ClientError is available + except NameError, err: + log.exception("pysvn not available (%s). Make sure it is installed " % err + "properly. Run 'python -c \"import pysvn\"' to test.") ## try to connect to the repository From e57f6c00a2cd5eaa8089e8cce444eda7cb31675a Mon Sep 17 00:00:00 2001 From: Toon Willems Date: Fri, 17 Aug 2012 15:08:41 +0200 Subject: [PATCH 702/798] do not hardcode /tmp, use gettempdir() --- easybuild/easybuild_config.py | 3 ++- easybuild/tools/config.py | 2 +- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/easybuild/easybuild_config.py b/easybuild/easybuild_config.py index 2229b05b9d..53b617d477 100644 --- a/easybuild/easybuild_config.py +++ b/easybuild/easybuild_config.py @@ -28,6 +28,7 @@ """ import os +import tempfile from easybuild.tools.build_log import getLog import easybuild.tools.config as config @@ -75,7 +76,7 @@ logFormat = ("easybuild", "easybuild-%(name)s-%(version)s-%(date)s.%(time)s.log") # set the path where log files will be stored -logDir = '/tmp' +logDir = tempfile.gettempdir() # general cleanliness del os, getLog, config, log, prefix, buildDir, installDir, sourceDir diff --git a/easybuild/tools/config.py b/easybuild/tools/config.py index 0f5e83af8f..4921ccfbc7 100644 --- a/easybuild/tools/config.py +++ b/easybuild/tools/config.py @@ -179,5 +179,5 @@ def get_build_log_path(): """ return temporary log directory """ - return variables.get('logDir', '/tmp') + return variables['logDir'] From 0c6482e5525a135542051810232d23774660971b Mon Sep 17 00:00:00 2001 From: Toon Willems Date: Fri, 17 Aug 2012 15:20:28 +0200 Subject: [PATCH 703/798] change to an option list --- easybuild/build.py | 2 +- easybuild/framework/application.py | 9 - easybuild/framework/easyconfig.py | 167 ++++++++++-------- easybuild/tools/ordereddict.py | 268 +++++++++++++++++++++++++++++ 4 files changed, 360 insertions(+), 86 deletions(-) create mode 100644 easybuild/tools/ordereddict.py diff --git a/easybuild/build.py b/easybuild/build.py index 5960b2e980..9868ce058f 100644 --- a/easybuild/build.py +++ b/easybuild/build.py @@ -171,7 +171,7 @@ def main(): default = EasyConfig.default_config print "DEFAULT OPTIONS:" - for key in sorted(default): + for key, value in sorted(default.items(), cmp=cmp_func): tabs = "\t" * (3 - (len(key) + 1) / 8) print "%s:%s%s" % (key, tabs, default[key][1]) diff --git a/easybuild/framework/application.py b/easybuild/framework/application.py index d0d1b15301..9c255ef694 100644 --- a/easybuild/framework/application.py +++ b/easybuild/framework/application.py @@ -1494,15 +1494,6 @@ def version(self): """ return self.getcfg('version') - def dump_cfg_options(self): - """ - Print a list of available configuration options. - """ - for key in sorted(self.cfg): - tabs = "\t" * (3 - (len(key) + 1) / 8) - print "%s:%s%s" % (key, tabs, self.cfg[key][1]) - - class StopException(Exception): """ diff --git a/easybuild/framework/easyconfig.py b/easybuild/framework/easyconfig.py index 1e555a011f..29f47dc203 100644 --- a/easybuild/framework/easyconfig.py +++ b/easybuild/framework/easyconfig.py @@ -28,6 +28,7 @@ from easybuild.tools.toolkit import Toolkit from easybuild.tools.systemtools import get_shared_lib_ext from easybuild.tools.filetools import run_cmd +from easybuild.tools.ordereddict import OrderedDict MANDATORY = (0, 'mandatory') @@ -50,81 +51,71 @@ class EasyConfig: validmoduleclasses = ['base', 'compiler', 'lib'] validstops = ['cfg', 'source', 'patch', 'prepare', 'configure', 'make', 'install', 'test', 'postproc', 'cleanup', 'packages'] - default_config = { - 'name': [None, "Name of software", MANDATORY], - 'version': [None, "Version of software", MANDATORY], - 'easybuildVersion': [None, "EasyBuild-version this spec-file was written for", BUILD], - 'group': [None, "Name of the user group for which the software should be available", LICENSE], - 'versionsuffix': ['', 'Additional suffix for software version (placed after toolkit name)', BUILD], - 'versionprefix': ['', 'Additional prefix for software version (placed before version and toolkit name)', BUILD], - 'runtest': [None, 'Indicates if a test should be run after make; should specify argument after make (for \ - e.g.,"test" for make test) (Default: None)', BUILD], - 'preconfigopts': ['', 'Extra options pre-passed to configure.', BUILD], - 'configopts': ['', 'Extra options passed to configure (Default already has --prefix)', BUILD], - 'premakeopts': ['', 'Extra options pre-passed to make.', BUILD], - 'makeopts': ['', 'Extra options passed to make (Default already has -j X)', BUILD], - 'installopts': ['', 'Extra options for installation (Default: nothing)', BUILD], - 'moduleclass': ['base', 'Module class to be used for this software (Default: base) (Valid: %s)' % - validmoduleclasses, MODULES], - 'moduleforceunload': [False, 'Force unload of all modules when loading the package (Default: False)', MODULES], - 'moduleloadnoconflict': [False, "Don't check for conflicts, unload other versions instead (Default: False)", - MODULES], - 'startfrom': [None, 'Path to start the make in. If the path is absolute, use that path. If not, this is added \ - to the guessed path.', FILEMANAGEMENT], - 'onlytkmod': [False, 'Boolean/string to indicate if the toolkit should only load the enviornment with module \ - (True) or also set all other variables (False) like compiler CC etc (If string: comma separated list of \ - variables that will be ignored). (Default: False)', TOOLKIT], - 'stop': [None, 'Keyword to halt the buildprocess at certain points. Valid are %s' % validstops, BUILD], - 'homepage': [None, 'The homepage of the software', MANDATORY], - 'description': [None, 'A short description of the software', MANDATORY], - 'parallel': [None, 'Degree of parallelism for e.g. make (default: based on the number of cores and \ - restrictions in ulimit)', BUILD], - 'maxparallel': [None, 'Max degree of parallelism (default: None)', BUILD], - 'keeppreviousinstall': [False, 'Boolean to keep the previous installation with identical name. Default False, \ - expert s only!', FILEMANAGEMENT], - 'cleanupoldbuild': [True, 'Boolean to remove (True) or backup (False) the previous build directory with \ - identical name or not. Default True', FILEMANAGEMENT], - 'cleanupoldinstall': [True, 'Boolean to remove (True) or backup (False) the previous install directory with \ - identical name or not. Default True', FILEMANAGEMENT], - 'dontcreateinstalldir': [False, 'Boolean to create (False) or not create (True) the install directory (Default \ - False)', FILEMANAGEMENT], - 'toolkit': [None, 'Name and version of toolkit', MANDATORY], - 'toolkitopts': ['', 'Extra options for compilers', TOOLKIT], - 'keepsymlinks': [False, 'Boolean to determine whether symlinks are to be kept during copying or if the content \ - of the files pointed to should be copied', FILEMANAGEMENT], - 'licenseServer': [None, 'License server for software', LICENSE], - 'licenseServerPort': [None, 'Port for license server', LICENSE], - 'key': [None, 'Key for installing software', LICENSE], - 'pkglist': [[], 'List with packages added to the baseinstallation (Default: [])', PACKAGE], - 'pkgmodulenames': [{}, 'Dictionary with real modules names for packages, if they are different from the \ - package name (Default: {})', PACKAGE], - 'pkgloadmodule': [True, 'Load the to-be installed software using temporary module (Default: True)', PACKAGE], - 'pkgtemplate': ["%s-%s.tar.gz", "Template for package source file names (Default: %s-%s.tar.gz)", PACKAGE], - 'pkgfindsource': [True, "Find sources for packages (Default: True)", PACKAGE], - 'pkginstalldeps': [True, "Install dependencies for specified packages if necessary (Default: True)", PACKAGE], - 'pkgdefaultclass': [None, "List of module for and name of the default package class (Default: None)", PACKAGE], - 'skip': [False, "Skip existing software (Default: False)", BUILD], - 'pkgfilter': [None, "Package filter details. List with template for cmd and input to cmd (templates for name, \ - version and src). (Default: None)", PACKAGE], - 'pkgpatches': [[], 'List with patches for packages (default: [])', PACKAGE], - 'pkgcfgs': [{}, 'Dictionary with config parameters for packages (default: {})', PACKAGE], - 'dependencies': [[], "List of dependencies (default: [])", DEPENDENCIES], - 'builddependencies': [[], "List of build dependencies (default: [])", DEPENDENCIES], - 'unpackOptions': [None, "Extra options for unpacking source (default: None)", BUILD], - 'modextravars': [{}, "Extra environment variables to be added to module file (default: {})", MODULES], - 'osdependencies': [[], "Packages that should be present on the system", DEPENDENCIES], - 'sources': [[], "List of source files", BUILD], - 'sourceURLs': [[], "List of URLs for source files", BUILD], - 'patches': [[], "List of patches to apply", BUILD], - 'tests': [[], "List of test-scripts to run after install. A test script should return a non-zero exit status \ - to fail", BUILD], - 'sanityCheckPaths': [{}, "List of files and directories to check (format: {'files':, 'dirs':}, \ - default: {})", BUILD], - 'sanityCheckCommand': [None, "format: (name, options) e.g. ('gzip','-h') . If set to True it will use (name, \ - '-h')", BUILD], - 'buildstats': [None, "A list of dicts with buildstats: build_time, platform, core_count, cpu_model, \ - install_size, timestamp", OTHER], - } + default_config = [ + ('name', [None, "Name of software", MANDATORY]), + ('version', [None, "Version of software", MANDATORY]), + ('toolkit', [None, 'Name and version of toolkit', MANDATORY]), + ('description', [None, 'A short description of the software', MANDATORY]), + ('homepage', [None, 'The homepage of the software', MANDATORY]), + + ('toolkitopts', ['', 'Extra options for compilers', TOOLKIT]), + ('onlytkmod', [False, 'Boolean/string to indicate if the toolkit should only load the enviornment with module (True) or also set all other variables (False) like compiler CC etc (If string: comma separated list of variables that will be ignored). (Default: False)', TOOLKIT]), + + ('easybuildVersion', [None, "EasyBuild-version this spec-file was written for", BUILD]), + ('versionsuffix', ['', 'Additional suffix for software version (placed after toolkit name)', BUILD]), + ('versionprefix', ['', 'Additional prefix for software version (placed before version and toolkit name)',BUILD]), + ('runtest', [None, 'Indicates if a test should be run after make; should specify argument after make (for e.g.,"test" for make test) (Default: None)', BUILD]), + ('preconfigopts', ['', 'Extra options pre-passed to configure.', BUILD]), + ('configopts', ['', 'Extra options passed to configure (Default already has --prefix)', BUILD]), + ('premakeopts', ['', 'Extra options pre-passed to make.', BUILD]), + ('makeopts', ['', 'Extra options passed to make (Default already has -j X)', BUILD]), + ('installopts', ['', 'Extra options for installation (Default: nothing)', BUILD]), + ('unpackOptions', [None, "Extra options for unpacking source (default: None)", BUILD]), + ('stop', [None, 'Keyword to halt the buildprocess at certain points. Valid are %s' % validstops, BUILD]), + ('skip', [False, "Skip existing software (Default: False)", BUILD]), + ('parallel', [None, 'Degree of parallelism for e.g. make (default: based on the number of cores and restrictions in ulimit)', BUILD]), + ('maxparallel', [None, 'Max degree of parallelism (default: None)', BUILD]), + ('sources', [[], "List of source files", BUILD]), + ('sourceURLs', [[], "List of URLs for source files", BUILD]), + ('patches', [[], "List of patches to apply", BUILD]), + ('tests', [[], "List of test-scripts to run after install. A test script should return a non-zero exit status to fail", BUILD]), + ('sanityCheckPaths', [{}, "List of files and directories to check (format: {'files':, 'dirs':}, default: {})", BUILD]), + ('sanityCheckCommand', [None, "format: (name, options) e.g. ('gzip','-h') . If set to True it will use (name, '-h')", BUILD]), + + ('startfrom', [None, 'Path to start the make in. If the path is absolute, use that path. If not, this is added to the guessed path.', FILEMANAGEMENT]), + ('keeppreviousinstall', [False, 'Boolean to keep the previous installation with identical name. Default False, experts only!', FILEMANAGEMENT]), + ('cleanupoldbuild', [True, 'Boolean to remove (True) or backup (False) the previous build directory with identical name or not. Default True', FILEMANAGEMENT]), + ('cleanupoldinstall', [True, 'Boolean to remove (True) or backup (False) the previous install directory with identical name or not. Default True', FILEMANAGEMENT]), + ('dontcreateinstalldir', [False, 'Boolean to create (False) or not create (True) the install directory (Default False)', FILEMANAGEMENT]), + ('keepsymlinks', [False, 'Boolean to determine whether symlinks are to be kept during copying or if the content of the files pointed to should be copied', FILEMANAGEMENT]), + + ('dependencies', [[], "List of dependencies (default: [])", DEPENDENCIES]), + ('builddependencies', [[], "List of build dependencies (default: [])", DEPENDENCIES]), + ('osdependencies', [[], "Packages that should be present on the system", DEPENDENCIES]), + + ('licenseServer', [None, 'License server for software', LICENSE]), + ('licenseServerPort', [None, 'Port for license server', LICENSE]), + ('key', [None, 'Key for installing software', LICENSE]), + ('group', [None, "Name of the user group for which the software should be available", LICENSE]), + + ('pkglist', [[], 'List with packages added to the baseinstallation (Default: [])', PACKAGE]), + ('pkgmodulenames', [{}, 'Dictionary with real modules names for packages, if they are different from the package name (Default: {})', PACKAGE]), + ('pkgloadmodule', [True, 'Load the to-be installed software using temporary module (Default: True)', PACKAGE]), + ('pkgtemplate', ["%s-%s.tar.gz", "Template for package source file names (Default: %s-%s.tar.gz)", PACKAGE]), + ('pkgfindsource', [True, "Find sources for packages (Default: True)", PACKAGE]), + ('pkginstalldeps', [True, "Install dependencies for specified packages if necessary (Default: True)", PACKAGE]), + ('pkgdefaultclass', [None, "List of module for and name of the default package class (Default: None)", PACKAGE]), + ('pkgfilter', [None, "Package filter details. List with template for cmd and input to cmd (templates for name, version and src). (Default: None)", PACKAGE]), + ('pkgpatches', [[], 'List with patches for packages (default: [])', PACKAGE]), + ('pkgcfgs', [{}, 'Dictionary with config parameters for packages (default: {})', PACKAGE]), + + ('modextravars', [{}, "Extra environment variables to be added to module file (default: {})", MODULES]), + ('moduleclass', ['base', 'Module class to be used for this software (Default: base) (Valid: %s)' % validmoduleclasses, MODULES]), + ('moduleforceunload', [False, 'Force unload of all modules when loading the package (Default: False)', MODULES]), + ('moduleloadnoconflict', [False, "Don't check for conflicts, unload other versions instead (Default: False)", MODULES]), + + ('buildstats', [None, "A list of dicts with buildstats: build_time, platform, core_count, cpu_model, install_size, timestamp", OTHER]), + ] def __init__(self, path, extra_options={}, validate=True): """ @@ -134,7 +125,7 @@ def __init__(self, path, extra_options={}, validate=True): validate specifies whether validations should happen """ # perform a deepcopy of the default_config found in the easybuild.tools.easyblock module - self.config = copy.deepcopy(self.default_config) + self.config = dict(copy.deepcopy(self.default_config)) self.config.update(extra_options) self.mandatory = ['name', 'version', 'homepage', 'description', 'toolkit'] @@ -375,3 +366,27 @@ def __setitem__(self, key, value): """ self.config[key][0] = value + +def sorted_categories(): + """ + returns the categories in the correct order + """ + categories = [MANDATORY, CUSTOM , TOOLKIT, BUILD, FILEMANAGEMENT, DEPENDENCIES, LICENSE , PACKAGE, MODULES, OTHER] + categories.sort(key = lambda c: c[0]) + return categories + + +def convert_to_help(option_list): + """ + Converts the given list to a mapping of category -> [(name, help)] (OrderedDict) + """ + mapping = OrderedDict() + + for category in sorted_categories(): + mapping[category[1]] = filter(lambda (k, v): v[2] == category, option_list) + + print mapping + + + + diff --git a/easybuild/tools/ordereddict.py b/easybuild/tools/ordereddict.py new file mode 100644 index 0000000000..d23b272cf1 --- /dev/null +++ b/easybuild/tools/ordereddict.py @@ -0,0 +1,268 @@ +## http://code.activestate.com/recipes/576693/ (r9) +# Backport of OrderedDict() class that runs on Python 2.4, 2.5, 2.6, 2.7 and pypy. +# Passes Python2.7's test suite and incorporates all the latest updates. + +# Copyright (C) 2009 Raymond Hettinger + +# Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: + +# The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. + +# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. + +try: + from thread import get_ident as _get_ident +except ImportError: + from dummy_thread import get_ident as _get_ident + +try: + from _abcoll import KeysView, ValuesView, ItemsView +except ImportError: + pass + + +class OrderedDict(dict): + 'Dictionary that remembers insertion order' + # An inherited dict maps keys to values. + # The inherited dict provides __getitem__, __len__, __contains__, and get. + # The remaining methods are order-aware. + # Big-O running times for all methods are the same as for regular dictionaries. + + # The internal self.__map dictionary maps keys to links in a doubly linked list. + # The circular doubly linked list starts and ends with a sentinel element. + # The sentinel element never gets deleted (this simplifies the algorithm). + # Each link is stored as a list of length three: [PREV, NEXT, KEY]. + + def __init__(self, *args, **kwds): + '''Initialize an ordered dictionary. Signature is the same as for + regular dictionaries, but keyword arguments are not recommended + because their insertion order is arbitrary. + + ''' + if len(args) > 1: + raise TypeError('expected at most 1 arguments, got %d' % len(args)) + try: + self.__root + except AttributeError: + self.__root = root = [] # sentinel node + root[:] = [root, root, None] + self.__map = {} + self.__update(*args, **kwds) + + def __setitem__(self, key, value, dict_setitem=dict.__setitem__): + 'od.__setitem__(i, y) <==> od[i]=y' + # Setting a new item creates a new link which goes at the end of the linked + # list, and the inherited dictionary is updated with the new key/value pair. + if key not in self: + root = self.__root + last = root[0] + last[1] = root[0] = self.__map[key] = [last, root, key] + dict_setitem(self, key, value) + + def __delitem__(self, key, dict_delitem=dict.__delitem__): + 'od.__delitem__(y) <==> del od[y]' + # Deleting an existing item uses self.__map to find the link which is + # then removed by updating the links in the predecessor and successor nodes. + dict_delitem(self, key) + link_prev, link_next, key = self.__map.pop(key) + link_prev[1] = link_next + link_next[0] = link_prev + + def __iter__(self): + 'od.__iter__() <==> iter(od)' + root = self.__root + curr = root[1] + while curr is not root: + yield curr[2] + curr = curr[1] + + def __reversed__(self): + 'od.__reversed__() <==> reversed(od)' + root = self.__root + curr = root[0] + while curr is not root: + yield curr[2] + curr = curr[0] + + def clear(self): + 'od.clear() -> None. Remove all items from od.' + try: + for node in self.__map.itervalues(): + del node[:] + root = self.__root + root[:] = [root, root, None] + self.__map.clear() + except AttributeError: + pass + dict.clear(self) + + def popitem(self, last=True): + '''od.popitem() -> (k, v), return and remove a (key, value) pair. + Pairs are returned in LIFO order if last is true or FIFO order if false. + + ''' + if not self: + raise KeyError('dictionary is empty') + root = self.__root + if last: + link = root[0] + link_prev = link[0] + link_prev[1] = root + root[0] = link_prev + else: + link = root[1] + link_next = link[1] + root[1] = link_next + link_next[0] = root + key = link[2] + del self.__map[key] + value = dict.pop(self, key) + return key, value + + # -- the following methods do not depend on the internal structure -- + + def keys(self): + 'od.keys() -> list of keys in od' + return list(self) + + def values(self): + 'od.values() -> list of values in od' + return [self[key] for key in self] + + def items(self): + 'od.items() -> list of (key, value) pairs in od' + return [(key, self[key]) for key in self] + + def iterkeys(self): + 'od.iterkeys() -> an iterator over the keys in od' + return iter(self) + + def itervalues(self): + 'od.itervalues -> an iterator over the values in od' + for k in self: + yield self[k] + + def iteritems(self): + 'od.iteritems -> an iterator over the (key, value) items in od' + for k in self: + yield (k, self[k]) + + def update(*args, **kwds): + '''od.update(E, **F) -> None. Update od from dict/iterable E and F. + + If E is a dict instance, does: for k in E: od[k] = E[k] + If E has a .keys() method, does: for k in E.keys(): od[k] = E[k] + Or if E is an iterable of items, does: for k, v in E: od[k] = v + In either case, this is followed by: for k, v in F.items(): od[k] = v + + ''' + if len(args) > 2: + raise TypeError('update() takes at most 2 positional ' + 'arguments (%d given)' % (len(args),)) + elif not args: + raise TypeError('update() takes at least 1 argument (0 given)') + self = args[0] + # Make progressively weaker assumptions about "other" + other = () + if len(args) == 2: + other = args[1] + if isinstance(other, dict): + for key in other: + self[key] = other[key] + elif hasattr(other, 'keys'): + for key in other.keys(): + self[key] = other[key] + else: + for key, value in other: + self[key] = value + for key, value in kwds.items(): + self[key] = value + + __update = update # let subclasses override update without breaking __init__ + + __marker = object() + + def pop(self, key, default=__marker): + '''od.pop(k[,d]) -> v, remove specified key and return the corresponding value. + If key is not found, d is returned if given, otherwise KeyError is raised. + + ''' + if key in self: + result = self[key] + del self[key] + return result + if default is self.__marker: + raise KeyError(key) + return default + + def setdefault(self, key, default=None): + 'od.setdefault(k[,d]) -> od.get(k,d), also set od[k]=d if k not in od' + if key in self: + return self[key] + self[key] = default + return default + + def __repr__(self, _repr_running={}): + 'od.__repr__() <==> repr(od)' + call_key = id(self), _get_ident() + if call_key in _repr_running: + return '...' + _repr_running[call_key] = 1 + try: + if not self: + return '%s()' % (self.__class__.__name__,) + return '%s(%r)' % (self.__class__.__name__, self.items()) + finally: + del _repr_running[call_key] + + def __reduce__(self): + 'Return state information for pickling' + items = [[k, self[k]] for k in self] + inst_dict = vars(self).copy() + for k in vars(OrderedDict()): + inst_dict.pop(k, None) + if inst_dict: + return (self.__class__, (items,), inst_dict) + return self.__class__, (items,) + + def copy(self): + 'od.copy() -> a shallow copy of od' + return self.__class__(self) + + @classmethod + def fromkeys(cls, iterable, value=None): + '''OD.fromkeys(S[, v]) -> New ordered dictionary with keys from S + and values equal to v (which defaults to None). + + ''' + d = cls() + for key in iterable: + d[key] = value + return d + + def __eq__(self, other): + '''od.__eq__(y) <==> od==y. Comparison to another OD is order-sensitive + while comparison to a regular mapping is order-insensitive. + + ''' + if isinstance(other, OrderedDict): + return len(self)==len(other) and self.items() == other.items() + return dict.__eq__(self, other) + + def __ne__(self, other): + return not self == other + + # -- the following methods are only used in Python 2.7 -- + + def viewkeys(self): + "od.viewkeys() -> a set-like object providing a view on od's keys" + return KeysView(self) + + def viewvalues(self): + "od.viewvalues() -> an object providing a view on od's values" + return ValuesView(self) + + def viewitems(self): + "od.viewitems() -> a set-like object providing a view on od's items" + return ItemsView(self) + From 29f0def38aed4aadc8b1cecb4ccde3494d2a5771 Mon Sep 17 00:00:00 2001 From: Toon Willems Date: Fri, 17 Aug 2012 15:44:40 +0200 Subject: [PATCH 704/798] print categories --- easybuild/build.py | 23 ++++++++++------------- easybuild/framework/easyconfig.py | 7 ++++--- 2 files changed, 14 insertions(+), 16 deletions(-) diff --git a/easybuild/build.py b/easybuild/build.py index 9868ce058f..3aa7c39881 100644 --- a/easybuild/build.py +++ b/easybuild/build.py @@ -40,6 +40,7 @@ from optparse import OptionParser import easybuild # required for VERBOSE_VERSION +import easybuild.framework.easyconfig as easyconfig import easybuild.tools.config as config import easybuild.tools.filetools as filetools import easybuild.tools.parallelbuild as parbuild @@ -167,19 +168,15 @@ def main(): # Dump possible options if options.avail_easyconfig_params: app = get_class(options.easyblock, log) - extra = app.extra_options() - default = EasyConfig.default_config - - print "DEFAULT OPTIONS:" - for key, value in sorted(default.items(), cmp=cmp_func): - tabs = "\t" * (3 - (len(key) + 1) / 8) - print "%s:%s%s" % (key, tabs, default[key][1]) - - if extra: - print "EXTRA OPTIONS:" - for key in sorted(extra): - tabs = "\t" * (3 - (len(key) + 1) / 8) - print "%s:%s%s" % (key, tabs, extra[key][1]) + extra = [] + mapping = easyconfig.convert_to_help(EasyConfig.default_config) + + for key, values in mapping.items(): + print "%s:" % key.upper() + for name, value in values: + tabs = "\t" * (3 - (len(name) + 1) / 8) + print "%s:%s%s" % (name, tabs, value) + ## Dump available classes if options.dump_classes: diff --git a/easybuild/framework/easyconfig.py b/easybuild/framework/easyconfig.py index 29f47dc203..5364586f5e 100644 --- a/easybuild/framework/easyconfig.py +++ b/easybuild/framework/easyconfig.py @@ -40,7 +40,7 @@ LICENSE = (6, 'license') PACKAGE = (7, 'package') MODULES = (8, 'modules') -OTHER = (9, 'buildstats') +OTHER = (9, 'other') class EasyConfig: @@ -383,9 +383,10 @@ def convert_to_help(option_list): mapping = OrderedDict() for category in sorted_categories(): - mapping[category[1]] = filter(lambda (k, v): v[2] == category, option_list) + mapping[category[1]] = [(arr[0], arr[1][1]) for arr in option_list if arr[1][2] == category] + + return mapping - print mapping From d71ae048a853211030c722304c6ba04d0bc1b091 Mon Sep 17 00:00:00 2001 From: Toon Willems Date: Fri, 17 Aug 2012 16:44:42 +0200 Subject: [PATCH 705/798] change extra_options for all easyblocks --- easybuild/easyblocks/a/atlas.py | 11 ++++++----- easybuild/easyblocks/c/cp2k.py | 28 +++++++++++++++------------- easybuild/easyblocks/g/gcc.py | 17 +++++++++-------- easybuild/easyblocks/i/imkl.py | 3 ++- easybuild/easyblocks/i/intelbase.py | 15 ++++++++------- easybuild/easyblocks/i/itac.py | 3 ++- easybuild/easyblocks/l/lapack.py | 9 +++++---- easybuild/easyblocks/l/libsmm.py | 11 ++++++----- easybuild/easyblocks/m/mvapich2.py | 15 ++++++++------- easybuild/easyblocks/w/wps.py | 11 ++++++----- easybuild/easyblocks/w/wrf.py | 13 +++++++------ easybuild/framework/application.py | 2 +- easybuild/framework/easyconfig.py | 7 ++++--- easybuild/test/easyblock.py | 4 ++-- 14 files changed, 81 insertions(+), 68 deletions(-) diff --git a/easybuild/easyblocks/a/atlas.py b/easybuild/easyblocks/a/atlas.py index 69966763a4..24f93a78fc 100644 --- a/easybuild/easyblocks/a/atlas.py +++ b/easybuild/easyblocks/a/atlas.py @@ -30,6 +30,7 @@ import os from easybuild.framework.application import Application +from easybuild.framework.easyconfig import CUSTOM from easybuild.tools.filetools import run_cmd from easybuild.tools.modules import get_software_root @@ -47,11 +48,11 @@ def __init__(self, *args, **kwargs): @staticmethod def extra_options(): - extra_vars = { - 'ignorethrottling': [False, "Ignore check done by ATLAS for CPU throttling (not recommended) (default: False)"], - 'full_lapack': [False, "Build a full LAPACK library (requires netlib's LAPACK) (default: False)"], - 'sharedlibs': [False, "Enable building of shared libs as well (default: False)"] - } + extra_vars = [ + ('ignorethrottling', [False, "Ignore check done by ATLAS for CPU throttling (not recommended) (default: False)", CUSTOM]), + ('full_lapack', [False, "Build a full LAPACK library (requires netlib's LAPACK) (default: False)", CUSTOM]), + ('sharedlibs', [False, "Enable building of shared libs as well (default: False)", CUSTOM]) + ] return Application.extra_options(extra_vars) def configure(self): diff --git a/easybuild/easyblocks/c/cp2k.py b/easybuild/easyblocks/c/cp2k.py index baed577eae..236ceff89a 100644 --- a/easybuild/easyblocks/c/cp2k.py +++ b/easybuild/easyblocks/c/cp2k.py @@ -36,6 +36,7 @@ import easybuild.tools.toolkit as toolkit from easybuild.framework.application import Application +from easybuild.framework.easyconfig import CUSTOM from easybuild.tools.filetools import run_cmd from easybuild.tools.modules import get_software_root, get_software_version @@ -68,23 +69,24 @@ def __init__(self, *args, **kwargs): self.make_instructions = '' + # always enable testing for CP2K + self.setcfg('runtest', True) + @staticmethod def extra_options(): - extra_vars = { - 'type': ['popt', "Type of build ('popt' or 'psmp') (default: 'popt)"], - 'typeopt': [True, "Enable optimization (default: True)"], - 'libint': [True, "Use LibInt (default: True)"], - 'modincprefix': ['', "IMKL prefix for modinc include dir (default: '')"], - 'modinc': [[], "List of modinc's to use (*.f90), or 'True' to use all found at given prefix (default: [])"], - 'extracflags': ['', "Extra CFLAGS to be added (default: '')"], - 'extradflags': ['', "Extra DFLAGS to be added (default: '')"], - 'runtest': [True, 'Indicates if a regression test should be run after make (default: True)'], - 'ignore_regtest_fails': [False, "Ignore failures in regression test (should be used with care) (default: False)."], - 'maxtasks': [3, "Maximum number of CP2K instances run at the same time during testing (default:3)"] - } + extra_vars = [ + ('type', ['popt', "Type of build ('popt' or 'psmp') (default: 'popt)", CUSTOM]), + ('typeopt', [True, "Enable optimization (default: True)", CUSTOM]), + ('libint', [True, "Use LibInt (default: True)", CUSTOM]), + ('modincprefix', ['', "IMKL prefix for modinc include dir (default: '')", CUSTOM]), + ('modinc', [[], "List of modinc's to use (*.f90), or 'True' to use all found at given prefix (default: [])", CUSTOM]), + ('extracflags', ['', "Extra CFLAGS to be added (default: '')", CUSTOM]), + ('extradflags', ['', "Extra DFLAGS to be added (default: '')", CUSTOM]), + ('ignore_regtest_fails', [False, "Ignore failures in regression test (should be used with care) (default: False).", CUSTOM]), + ('maxtasks', [3, "Maximum number of CP2K instances run at the same time during testing (default:3)", CUSTOM]) + ] return Application.extra_options(extra_vars) - def _generateMakefile(self, options): """Generate Makefile based on options dictionary and optional make instructions""" diff --git a/easybuild/easyblocks/g/gcc.py b/easybuild/easyblocks/g/gcc.py index 6151fa6ea1..4d0633eea8 100644 --- a/easybuild/easyblocks/g/gcc.py +++ b/easybuild/easyblocks/g/gcc.py @@ -35,6 +35,7 @@ import easybuild.tools.environment as env from easybuild.framework.application import Application +from easybuild.framework.easyconfig import CUSTOM from easybuild.tools.filetools import run_cmd from easybuild.tools.modules import get_software_root from easybuild.tools.systemtools import get_kernel_name, get_shared_lib_ext, get_platform_name @@ -53,14 +54,14 @@ def __init__(self, *args, **kwargs): @staticmethod def extra_options(): - extra_vars = { - 'languages': [[], "List of languages to build GCC for (--enable-languages) (default: [])"], - 'withlto': [True, "Enable LTO support (default: True)"], - 'withcloog': [False, "Build GCC with CLooG support (default: False)."], - 'withppl': [False, "Build GCC with PPL support (default: False)."], - 'pplwatchdog': [False, "Enable PPL watchdog (default: False)"], - 'clooguseisl': [False, "Use ISL with CLooG or not (use PPL otherwise) (default: False)"] - } + extra_vars = [ + ('languages', [[], "List of languages to build GCC for (--enable-languages) (default: [])", CUSTOM]), + ('withlto', [True, "Enable LTO support (default: True)", CUSTOM]), + ('withcloog', [False, "Build GCC with CLooG support (default: False).", CUSTOM]), + ('withppl', [False, "Build GCC with PPL support (default: False).", CUSTOM]), + ('pplwatchdog', [False, "Enable PPL watchdog (default: False)", CUSTOM]), + ('clooguseisl', [False, "Use ISL with CLooG or not (use PPL otherwise) (default: False)", CUSTOM]) + ] return Application.extra_options(extra_vars) def create_dir(self, dirname): diff --git a/easybuild/easyblocks/i/imkl.py b/easybuild/easyblocks/i/imkl.py index d62b38fcca..1ee437ee8e 100644 --- a/easybuild/easyblocks/i/imkl.py +++ b/easybuild/easyblocks/i/imkl.py @@ -34,6 +34,7 @@ import easybuild.tools.environment as env import easybuild.tools.toolkit as toolkit from easybuild.easyblocks.i.intelbase import IntelBase +from easybuild.framework.easyconfig import CUSTOM from easybuild.tools.filetools import run_cmd from easybuild.tools.modules import Modules @@ -51,7 +52,7 @@ def __init__(self, *args, **kwargs): @staticmethod def extra_options(): - extra_vars = {'interfaces': [True, "Indicates whether interfaces should be built (default: True)"]} + extra_vars = [('interfaces', [True, "Indicates whether interfaces should be built (default: True)", CUSTOM])] return IntelBase.extra_options(extra_vars) diff --git a/easybuild/easyblocks/i/intelbase.py b/easybuild/easyblocks/i/intelbase.py index cebb7b2470..b6410da40e 100644 --- a/easybuild/easyblocks/i/intelbase.py +++ b/easybuild/easyblocks/i/intelbase.py @@ -31,6 +31,7 @@ import easybuild.tools.environment as env from easybuild.framework.application import Application +from easybuild.framework.easyconfig import CUSTOM, MANDATORY from easybuild.tools.filetools import run_cmd @@ -49,17 +50,17 @@ def __init__(self, *args, **kwargs): @staticmethod def extra_options(extra_vars=None): vars = Application.extra_options(extra_vars) - intel_vars = { - 'license':[None, "License file path (default: None)"], - 'license_activation': ['license_server', "Indicates license activation type (default: 'license_server')"], + intel_vars = [ + ('license', [None, "License file path (default: None)", MANDATORY]), + ('license_activation', ['license_server', "Indicates license activation type (default: 'license_server')", CUSTOM]), # 'usetmppath': # workaround for older SL5 version (5.5 and earlier) # used to be True, but False since SL5.6/SL6 # disables TMP_PATH env and command line option - 'usetmppath': [False, "Use temporary path for installation (default: False)"], - 'm32': [False, "Enable 32-bit toolkit (default: False)"], - } - intel_vars.update(vars) + ('usetmppath', [False, "Use temporary path for installation (default: False)", CUSTOM]), + ('m32', [False, "Enable 32-bit toolkit (default: False)", CUSTOM]), + ] + intel_vars.extend(vars) return intel_vars diff --git a/easybuild/easyblocks/i/itac.py b/easybuild/easyblocks/i/itac.py index 280b6f77dc..ab61fcda0a 100644 --- a/easybuild/easyblocks/i/itac.py +++ b/easybuild/easyblocks/i/itac.py @@ -28,6 +28,7 @@ import os +from easybuild.framework.easyconfig import CUSTOM from easybuild.easyblocks.i.intelbase import IntelBase from easybuild.tools.filetools import run_cmd @@ -44,7 +45,7 @@ def __init__(self, *args, **kwargs): @staticmethod def extra_options(): - extra_vars = {'preferredmpi': ['impi3', "Preferred MPI type (default: 'impi3')"]} + extra_vars = [('preferredmpi', ['impi3', "Preferred MPI type (default: 'impi3')", CUSTOM])] return IntelBase.extra_options(extra_vars) def make_install(self): diff --git a/easybuild/easyblocks/l/lapack.py b/easybuild/easyblocks/l/lapack.py index 2c687fe6a5..01118e8258 100644 --- a/easybuild/easyblocks/l/lapack.py +++ b/easybuild/easyblocks/l/lapack.py @@ -31,6 +31,7 @@ import shutil from easybuild.framework.application import Application +from easybuild.framework.easyconfig import CUSTOM from easybuild.tools.filetools import run_cmd from easybuild.tools.modules import get_software_root @@ -72,10 +73,10 @@ def __init__(self, *args, **kwargs): @staticmethod def extra_options(): - extra_vars = { - 'supply_blas': [False, "Supply BLAS lib to LAPACK for building (default: False)"], - 'test_only': [False, "Only make tests, don't try and build LAPACK lib."] - } + extra_vars = [ + ('supply_blas', [False, "Supply BLAS lib to LAPACK for building (default: False)", CUSTOM]), + ('test_only', [False, "Only make tests, don't try and build LAPACK lib.", CUSTOM]) + ] return Application.extra_options(extra_vars) diff --git a/easybuild/easyblocks/l/libsmm.py b/easybuild/easyblocks/l/libsmm.py index 8915f9bab6..c1cb733a0c 100644 --- a/easybuild/easyblocks/l/libsmm.py +++ b/easybuild/easyblocks/l/libsmm.py @@ -33,6 +33,7 @@ import easybuild # required for VERBOSE_VERSION import easybuild.tools.toolkit as toolkit from easybuild.framework.application import Application +from easybuild.framework.easyconfig import Application from easybuild.tools.filetools import run_cmd from easybuild.tools.modules import get_software_root, get_software_version @@ -51,11 +52,11 @@ def __init__(self, *args, **kwargs): def extra_options(): # default dimensions dd = [1,4,5,6,9,13,16,17,22] - extra_vars = { - 'transpose_flavour': [1, "Transpose flavour of routines (default: 1)"], - 'max_tiny_dim': [12, "Maximum tiny dimension (default: 12)"], - 'dims': [dd, "Generate routines for these matrix dims (default: %s)" % dd] - } + extra_vars = [ + ('transpose_flavour', [1, "Transpose flavour of routines (default: 1)", CUSTOM]), + ('max_tiny_dim', [12, "Maximum tiny dimension (default: 12)", CUSTOM]), + ('dims', [dd, "Generate routines for these matrix dims (default: %s)" % dd, CUSTOM]) + ] return Application.extra_options(extra_vars) def configure(self): diff --git a/easybuild/easyblocks/m/mvapich2.py b/easybuild/easyblocks/m/mvapich2.py index 02e051a58a..eb6b3676c7 100644 --- a/easybuild/easyblocks/m/mvapich2.py +++ b/easybuild/easyblocks/m/mvapich2.py @@ -30,6 +30,7 @@ import easybuild.tools.environment as env from easybuild.framework.application import Application +from easybuild.framework.easyconfig import CUSTOM class MVAPICH2(Application): @@ -43,13 +44,13 @@ def __init__(self, *args, **kwargs): @staticmethod def extra_options(): - extra_vars = { - 'withchkpt': [False, "Enable checkpointing support (required BLCR) (default: False)"], - 'withlimic2': [False, "Enable LiMIC2 support for intra-node communication (default: False)"], - 'withmpe': [False, "Build MPE routines (default: False)"], - 'debug': [False, "Enable debug build (which is slower) (default: False)"], - 'rdma_type': ["gen2", "Specify the RDMA type (gen2/udapl) (default: gen2)"] - } + extra_vars = [ + ('withchkpt', [False, "Enable checkpointing support (required BLCR) (default: False)", CUSTOM]), + ('withlimic2', [False, "Enable LiMIC2 support for intra-node communication (default: False)", CUSTOM]), + ('withmpe', [False, "Build MPE routines (default: False)", CUSTOM]), + ('debug', [False, "Enable debug build (which is slower) (default: False)", CUSTOM]), + ('rdma_type', ["gen2", "Specify the RDMA type (gen2/udapl) (default: gen2)", CUSTOM]) + ] return Application.extra_options(extra_vars) def configure(self): diff --git a/easybuild/easyblocks/w/wps.py b/easybuild/easyblocks/w/wps.py index ec9b068a5c..a26c4e6800 100644 --- a/easybuild/easyblocks/w/wps.py +++ b/easybuild/easyblocks/w/wps.py @@ -38,6 +38,7 @@ import easybuild.tools.toolkit as toolkit from easybuild.easyblocks.n.netcdf import set_netcdf_env_vars, get_netcdf_module_set_cmds from easybuild.framework.application import Application +from easybuild.framework.easyconfig import CUSTOM, MANDATORY from easybuild.tools.filetools import patch_perl_script_autoflush, run_cmd, run_cmd_qa, unpack from easybuild.tools.modules import get_software_root, get_software_version @@ -62,11 +63,11 @@ def extra_options(): "http://www.mmm.ucar.edu/wrf/src/wps_files/geog.tar.gz" # 697MB download, 16GB unpacked! ] - extra_vars = { - 'buildtype': [None, "Specify the type of build (smpar: OpenMP, dmpar: MPI)."], - 'runtest': [True, "Build and run WPS tests (default: True)."], - 'testdata': [testdata_urls, "URL to test data required to run WPS test (default: %s)." % testdata_urls] - } + extra_vars = [ + ('buildtype', [None, "Specify the type of build (smpar: OpenMP, dmpar: MPI).", MANDATORY]), + ('runtest', [True, "Build and run WPS tests (default: True).", CUSTOM]), + ('testdata', [testdata_urls, "URL to test data required to run WPS test (default: %s)." % testdata_urls, CUSTOM]) + ] return Application.extra_options(extra_vars) def configure(self): diff --git a/easybuild/easyblocks/w/wrf.py b/easybuild/easyblocks/w/wrf.py index 6e919d934a..a41c1d97b2 100644 --- a/easybuild/easyblocks/w/wrf.py +++ b/easybuild/easyblocks/w/wrf.py @@ -35,6 +35,7 @@ import easybuild.tools.toolkit as toolkit from easybuild.easyblocks.n.netcdf import set_netcdf_env_vars, get_netcdf_module_set_cmds from easybuild.framework.application import Application +from easybuild.framework.easyconfig import CUSTOM, MANDATORY from easybuild.tools.filetools import patch_perl_script_autoflush, run_cmd, run_cmd_qa from easybuild.tools.modules import get_software_root @@ -52,12 +53,12 @@ def __init__(self,*args,**kwargs): @staticmethod def extra_options(): - extra_vars = { - 'buildtype': [None, "Specify the type of build (serial, smpar (OpenMP), " \ - "dmpar (MPI), dm+sm (hybrid OpenMP/MPI))."], - 'rewriteopts': [True, "Replace -O3 with CFLAGS/FFLAGS (default: True)."], - 'runtest': [True, "Build and run WRF tests (default: True)."] - } + extra_vars = [ + ('buildtype', [None, "Specify the type of build (serial, smpar (OpenMP), " \ + "dmpar (MPI), dm+sm (hybrid OpenMP/MPI)).", MANDATORY]), + ('rewriteopts', [True, "Replace -O3 with CFLAGS/FFLAGS (default: True).", CUSTOM]), + ('runtest', [True, "Build and run WRF tests (default: True).", CUSTOM]) + ] return Application.extra_options(extra_vars) def configure(self): diff --git a/easybuild/framework/application.py b/easybuild/framework/application.py index 9c255ef694..fb859e4cff 100644 --- a/easybuild/framework/application.py +++ b/easybuild/framework/application.py @@ -262,7 +262,7 @@ def extra_options(extra=None): Subclasses should call this method with a dict """ if extra == None: - return {} + return [] else: return extra diff --git a/easybuild/framework/easyconfig.py b/easybuild/framework/easyconfig.py index 5364586f5e..fd5234a598 100644 --- a/easybuild/framework/easyconfig.py +++ b/easybuild/framework/easyconfig.py @@ -117,7 +117,7 @@ class EasyConfig: ('buildstats', [None, "A list of dicts with buildstats: build_time, platform, core_count, cpu_model, install_size, timestamp", OTHER]), ] - def __init__(self, path, extra_options={}, validate=True): + def __init__(self, path, extra_options=[], validate=True): """ initialize an easyconfig. path should be a path to a file that can be parsed @@ -130,9 +130,10 @@ def __init__(self, path, extra_options={}, validate=True): self.mandatory = ['name', 'version', 'homepage', 'description', 'toolkit'] # extend mandatory keys - for key in extra_options: - if extra_options[key][2] == MANDATORY: + for (key, value) in extra_options: + if value[2] == MANDATORY: self.mandatory.append(key) + self.log = getLog("EasyConfig") # store toolkit diff --git a/easybuild/test/easyblock.py b/easybuild/test/easyblock.py index cf3c4bc502..3b18e579af 100644 --- a/easybuild/test/easyblock.py +++ b/easybuild/test/easyblock.py @@ -212,7 +212,7 @@ def runTest(self): eb = EasyConfig(self.eb_file) self.assertRaises(KeyError, lambda: eb['custom_key']) - extra_vars = {'custom_key': ['default', "This is a default key", easyconfig.CUSTOM]} + extra_vars = [('custom_key', ['default', "This is a default key", easyconfig.CUSTOM])] eb = EasyConfig(self.eb_file, extra_vars) self.assertEqual(eb['custom_key'], 'default') @@ -233,7 +233,7 @@ def runTest(self): # test if extra toolkit options are being passed self.assertEqual(eb.toolkit().opts['static'], True) - extra_vars.update({'mandatory_key': ['default', 'another mandatory key', easyconfig.MANDATORY]}) + extra_vars.extend([('mandatory_key', ['default', 'another mandatory key', easyconfig.MANDATORY])]) # test extra mandatory vars self.assertErrorRegex(EasyBuildError, "mandatory variable \S* not provided", EasyConfig, self.eb_file) From b9c267d1d41fc319ef0bb4f5c889db0efc00a9c4 Mon Sep 17 00:00:00 2001 From: Kenneth Hoste Date: Fri, 17 Aug 2012 16:47:35 +0200 Subject: [PATCH 706/798] update README with contact info, clean up links --- README.md | 67 +++++++++++++++++++++++++++++++++++++------------------ 1 file changed, 45 insertions(+), 22 deletions(-) diff --git a/README.md b/README.md index a03deb10a4..355f750625 100644 --- a/README.md +++ b/README.md @@ -1,7 +1,7 @@ EasyBuild: building software with ease ======================================= -EasyBuild [1] is a software build and installation framework written in Python +[EasyBuild] [1] is a software build and installation framework written in Python that allows you to install software in a structured, repeatable and robust way. It is motivated by the need for a tool that allows to: @@ -28,19 +28,19 @@ Some key properties of EasyBuild: * after the installation, the specification files can be sent to a repository for archiving -For more information on EasyBuild, see the documentation wiki on github [3]. +For more information on EasyBuild, see the [EasyBuild wiki] [2] on GitHub. REQUIREMENTS ------------- EasyBuild requires Python 2.4 (or a more recent 2.x version) to be available, -as well as the environment-modules software package [4]. +as well as the [environment modules] [3] software package. -The GitPython Python module [5] is recommended, especially when EasyBuild is +The [GitPython] [4] Python module is recommended, especially when EasyBuild is being used from a git repository. -See [6] for more information on EasyBuild dependencies. +See the EasyBuild wiki for more information on [EasyBuild dependencies] [5]. QUICK DEMO FOR THE IMPATIENT @@ -69,7 +69,7 @@ e.g., gcc and g++. QUICK START ------------ -To get started, you first need to configure EasyBuild for use [7]. +To get started, you first need to [configure EasyBuild] [6] for use. Once this is done, using EasyBuild is as simple as creating a .eb specification file, and providing it to the framework: @@ -80,16 +80,38 @@ For command line options, see easybuild/eb -h (or --help) -Documentation on writing your own .eb specification files is available on the -EasyBuild github wiki [8]. +See the EasyBuild wiki for documentation on writing your own easyconfig files [7] (.eb). To add support for a particular software package that requires a custom installation procedure, you will need to implement an easyblock that can be -plugged into the EasyBuild framework [9]. +plugged into the EasyBuild framework (see [Development guide] [8]). -A step-by-step guide to getting started with EasyBuild is provided on -the github wiki [10]. +On the EasyBuild wiki, a step-by-step guide to [getting started] [9] with EasyBuild is provided. +CONTACT INFO +------------ + +You can get in contact with the EasyBuild community in different ways: + +### Mailing list + +An EasyBuild mailinglist easybuild@lists.ugent.be is available to subscribe to. + +This list is used by both users and developers of EasyBuild, so if you have any questions or suggestions, you can post them there. + +Only members can post to this mailinglist. To request membership, see https://lists.ugent.be/sympa/info/easybuild. + +### IRC + +An IRC channel #easybuild has been set up on the FreeNode network. + +Just connect your IRC client to the irc.freenode.net server, and join the #easybuild channel. + +There is an IRC bot present (easybuilder). Just type !help to get pointers to the available commands. + +### Twitter + +The EasyBuild team also has a Twitter feed, see [@easy_build] [10]. DISCLAIMER ----------- @@ -102,17 +124,18 @@ systems is pending. LICENSE -------- -EasyBuild is developed by the High-Performance Computing team at Ghent University [2] +EasyBuild is developed by the [High-Performance Computing team at Ghent University] [11] and is made available under the GNU General Public License (GPL) version 2. -[1] https://github.com/hpcugent/easybuild -[2] http://www.ugent.be/hpc/en -[3] https://github.com/hpcugent/easybuild/wiki/Home -[4] http://modules.sourceforge.net/ -[5] http://gitorious.org/git-python -[6] https://github.com/hpcugent/easybuild/wiki/Dependencies -[7] https://github.com/hpcugent/easybuild/wiki/Configuration -[8] https://github.com/hpcugent/easybuild/wiki/Specification-files -[9] https://github.com/hpcugent/easybuild/wiki/Development-guide -[10] https://github.com/hpcugent/easybuild/wiki/Step-by-step-guide +[1]: https://github.com/hpcugent/easybuild "EasyBuild" +[2]: https://github.com/hpcugent/easybuild/wiki/Home "EasyBuild wiki" +[3]: http://modules.sourceforge.net/ "environment modules" +[4]: http://gitorious.org/git-python "GitPython" +[5]: https://github.com/hpcugent/easybuild/wiki/Dependencies "EasyBuild dependencies" +[6]: https://github.com/hpcugent/easybuild/wiki/Configuration "configure EasyBuild" +[7]: https://github.com/hpcugent/easybuild/wiki/Specification-files "easyconfig files" +[8]: https://github.com/hpcugent/easybuild/wiki/Development-guide "Development guide" +[9]: https://github.com/hpcugent/easybuild/wiki/Step-by-step-guide "getting started" +[10]: http://twitter.com/easy_build "@easy_build" +[11]: https://ugent.be/hpcugent "High-Performance Computing team at Ghent University" From c1b959b5e4cf364eec9267121db7320458757e5b Mon Sep 17 00:00:00 2001 From: Toon Willems Date: Fri, 17 Aug 2012 16:53:14 +0200 Subject: [PATCH 707/798] use extra as well --- easybuild/build.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/easybuild/build.py b/easybuild/build.py index 3aa7c39881..9844a118f7 100644 --- a/easybuild/build.py +++ b/easybuild/build.py @@ -168,8 +168,8 @@ def main(): # Dump possible options if options.avail_easyconfig_params: app = get_class(options.easyblock, log) - extra = [] - mapping = easyconfig.convert_to_help(EasyConfig.default_config) + extra = app.extra_options() + mapping = easyconfig.convert_to_help(EasyConfig.default_config + extra) for key, values in mapping.items(): print "%s:" % key.upper() From 76e684ff323982dd7fb0b0adfc9d986ae5e41fa8 Mon Sep 17 00:00:00 2001 From: Kenneth Hoste Date: Fri, 17 Aug 2012 16:57:18 +0200 Subject: [PATCH 708/798] fix link --- README.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/README.md b/README.md index 355f750625..047d59571e 100644 --- a/README.md +++ b/README.md @@ -80,7 +80,7 @@ For command line options, see easybuild/eb -h (or --help) -See the EasyBuild wiki for documentation on writing your own easyconfig files [7] (.eb). +See the EasyBuild wiki for documentation on writing your own [easyconfig files] [7] (.eb). To add support for a particular software package that requires a custom installation procedure, you will need to implement an easyblock that can be @@ -111,7 +111,7 @@ There is an IRC bot present (easybuilder). Just type !help to get pointers to th ### Twitter -The EasyBuild team also has a Twitter feed, see [@easy_build] [10]. +The EasyBuild team also has a Twitter feed: [@easy_build] [10]. DISCLAIMER ----------- From fda295e40b23799830cc46563566ad152d7c35f0 Mon Sep 17 00:00:00 2001 From: Toon Willems Date: Fri, 17 Aug 2012 16:58:30 +0200 Subject: [PATCH 709/798] improve output --- easybuild/build.py | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/easybuild/build.py b/easybuild/build.py index 9844a118f7..b0e7296fe0 100644 --- a/easybuild/build.py +++ b/easybuild/build.py @@ -172,11 +172,14 @@ def main(): mapping = easyconfig.convert_to_help(EasyConfig.default_config + extra) for key, values in mapping.items(): - print "%s:" % key.upper() + print "%s" % key.upper() + print '-' * len(key) for name, value in values: tabs = "\t" * (3 - (len(name) + 1) / 8) print "%s:%s%s" % (name, tabs, value) + print + ## Dump available classes if options.dump_classes: From 28b76fd30ab78a917c6cd21a02cee303621764ec Mon Sep 17 00:00:00 2001 From: Kenneth Hoste Date: Fri, 17 Aug 2012 17:00:56 +0200 Subject: [PATCH 710/798] fix missing import for get_software_root in application.py --- easybuild/framework/application.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/easybuild/framework/application.py b/easybuild/framework/application.py index d0d1b15301..8f9e0d64d0 100644 --- a/easybuild/framework/application.py +++ b/easybuild/framework/application.py @@ -47,7 +47,7 @@ from easybuild.tools.config import source_path, buildPath, installPath from easybuild.tools.filetools import unpack, patch, run_cmd, convertName from easybuild.tools.module_generator import ModuleGenerator -from easybuild.tools.modules import Modules +from easybuild.tools.modules import Modules, get_software_root from easybuild.tools.toolkit import Toolkit from easybuild.tools.systemtools import get_core_count From 08b589238e3848f06593b61aba20d0d5d7941a0b Mon Sep 17 00:00:00 2001 From: Toon Willems Date: Fri, 17 Aug 2012 17:21:05 +0200 Subject: [PATCH 711/798] fix issues --- easybuild/build.py | 28 +++++++++++++++------------- easybuild/easyblocks/l/libsmm.py | 2 +- 2 files changed, 16 insertions(+), 14 deletions(-) diff --git a/easybuild/build.py b/easybuild/build.py index b0e7296fe0..ac48de21df 100644 --- a/easybuild/build.py +++ b/easybuild/build.py @@ -167,19 +167,7 @@ def main(): # Dump possible options if options.avail_easyconfig_params: - app = get_class(options.easyblock, log) - extra = app.extra_options() - mapping = easyconfig.convert_to_help(EasyConfig.default_config + extra) - - for key, values in mapping.items(): - print "%s" % key.upper() - print '-' * len(key) - for name, value in values: - tabs = "\t" * (3 - (len(name) + 1) / 8) - print "%s:%s%s" % (name, tabs, value) - - print - + print_avail_params(options.easyblock, log) ## Dump available classes if options.dump_classes: @@ -743,6 +731,20 @@ def build(module, options, log, origEnviron, exitOnFailure=True): else: return (True, applicationLog) +def print_avail_params(easyblock, log): + app = get_class(easyblock, log) + extra = app.extra_options() + mapping = easyconfig.convert_to_help(EasyConfig.default_config + extra) + + for key, values in mapping.items(): + print "%s" % key.upper() + print '-' * len(key) + for name, value in values: + tabs = "\t" * (3 - (len(name) + 1) / 8) + print "%s:%s%s" % (name, tabs, value) + + print + if __name__ == "__main__": try: diff --git a/easybuild/easyblocks/l/libsmm.py b/easybuild/easyblocks/l/libsmm.py index c1cb733a0c..45b06b8192 100644 --- a/easybuild/easyblocks/l/libsmm.py +++ b/easybuild/easyblocks/l/libsmm.py @@ -33,7 +33,7 @@ import easybuild # required for VERBOSE_VERSION import easybuild.tools.toolkit as toolkit from easybuild.framework.application import Application -from easybuild.framework.easyconfig import Application +from easybuild.framework.easyconfig import CUSTOM from easybuild.tools.filetools import run_cmd from easybuild.tools.modules import get_software_root, get_software_version From 48908357bf7834f92f66df1ac3260bbce01c9f42 Mon Sep 17 00:00:00 2001 From: Toon Willems Date: Fri, 17 Aug 2012 17:23:17 +0200 Subject: [PATCH 712/798] final fixes --- easybuild/framework/easyconfig.py | 8 ++------ 1 file changed, 2 insertions(+), 6 deletions(-) diff --git a/easybuild/framework/easyconfig.py b/easybuild/framework/easyconfig.py index fd5234a598..b857487244 100644 --- a/easybuild/framework/easyconfig.py +++ b/easybuild/framework/easyconfig.py @@ -30,7 +30,7 @@ from easybuild.tools.filetools import run_cmd from easybuild.tools.ordereddict import OrderedDict - +# we use a tuple here so we can sort them based on the numbers MANDATORY = (0, 'mandatory') CUSTOM = (1, 'easyblock-specific') TOOLKIT = (2, 'toolkit') @@ -51,6 +51,7 @@ class EasyConfig: validmoduleclasses = ['base', 'compiler', 'lib'] validstops = ['cfg', 'source', 'patch', 'prepare', 'configure', 'make', 'install', 'test', 'postproc', 'cleanup', 'packages'] + # List of tuples. Each tuple has the following format (key, [default, help text, category]) default_config = [ ('name', [None, "Name of software", MANDATORY]), ('version', [None, "Version of software", MANDATORY]), @@ -387,8 +388,3 @@ def convert_to_help(option_list): mapping[category[1]] = [(arr[0], arr[1][1]) for arr in option_list if arr[1][2] == category] return mapping - - - - - From d2393e34996b378fbf8b2ce5e8b9ba49149819ea Mon Sep 17 00:00:00 2001 From: Toon Willems Date: Fri, 17 Aug 2012 18:01:04 +0200 Subject: [PATCH 713/798] add default for logDir --- easybuild/tools/config.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/easybuild/tools/config.py b/easybuild/tools/config.py index 4921ccfbc7..b0d815b7c0 100644 --- a/easybuild/tools/config.py +++ b/easybuild/tools/config.py @@ -28,6 +28,7 @@ """ import os +import tempfile from easybuild.tools.build_log import getLog import easybuild.tools.repository as repo @@ -179,5 +180,5 @@ def get_build_log_path(): """ return temporary log directory """ - return variables['logDir'] + return variables.get('logDir', tempfile.gettempdir()) From 91e6655d54fe3c68b36ed5a91d6a8c863a47bf46 Mon Sep 17 00:00:00 2001 From: Kenneth Hoste Date: Mon, 13 Aug 2012 15:27:39 +0200 Subject: [PATCH 714/798] add empty line before 'built with EasyBuild version X' line in easyconfig, fix debugging msg for extending MODULEPATH (was broken if skip was being used) Conflicts: easybuild/framework/application.py --- easybuild/framework/application.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/easybuild/framework/application.py b/easybuild/framework/application.py index 8f9e0d64d0..63428548df 100644 --- a/easybuild/framework/application.py +++ b/easybuild/framework/application.py @@ -1088,7 +1088,7 @@ def make_module(self, fake=False): txt += self.make_module_extra() if self.getcfg('pkglist'): txt += self.make_module_extra_packages() - txt += '\n# built with EasyBuild version %s' % easybuild.VERBOSE_VERSION + txt += '\n# built with EasyBuild version %s\n' % easybuild.VERBOSE_VERSION try: f = open(self.moduleGenerator.filename, 'w') @@ -1290,10 +1290,10 @@ def packages(self): modpath = self.make_module(fake=True) # adjust MODULEPATH tand load module if self.getcfg('pkgloadmodule'): - self.log.debug("Adding %s to MODULEPATH" % modpath) if self.skip: m = Modules() else: + self.log.debug("Adding %s to MODULEPATH" % modpath) m = Modules([modpath] + os.environ['MODULEPATH'].split(':')) if m.exists(self.name(), self.installversion()): From 7592d0490ba83a05a65910e3a26ba0b10cc4e50e Mon Sep 17 00:00:00 2001 From: Kenneth Hoste Date: Sat, 18 Aug 2012 10:40:39 +0200 Subject: [PATCH 715/798] join UMFPACK parameters using ' '.join() --- easybuild/easyblocks/d/dolfin.py | 23 +++++++++++++---------- 1 file changed, 13 insertions(+), 10 deletions(-) diff --git a/easybuild/easyblocks/d/dolfin.py b/easybuild/easyblocks/d/dolfin.py index 20e5ef828e..fe6d230e01 100644 --- a/easybuild/easyblocks/d/dolfin.py +++ b/easybuild/easyblocks/d/dolfin.py @@ -95,16 +95,19 @@ def configure(self): # SuiteSparse config params suitesparse = depsdict['SuiteSparse'] - umfpack_params = ' -DUMFPACK_DIR="%(sp)s/UMFPACK"' - umfpack_params += ' -DUMFPACK_INCLUDE_DIRS="%(sp)s/UMFPACK/include;%(sp)s/UFconfig"' - umfpack_params += ' -DAMD_DIR="%(sp)s/UMFPACK"' - umfpack_params += ' -DCHOLMOD_DIR="%(sp)s/CHOLMOD"' - umfpack_params += ' -DCHOLMOD_INCLUDE_DIRS="%(sp)s/CHOLMOD/include;%(sp)s/UFconfig"' - umfpack_params += ' -DUFCONFIG_DIR="%(sp)s/UFconfig"' - umfpack_params += ' -DCAMD_LIBRARY:PATH="%(sp)s/CAMD/lib/libcamd.a"' - umfpack_params += ' -DCCOLAMD_LIBRARY:PATH="%(sp)s/CCOLAMD/lib/libccolamd.a"' - umfpack_params += ' -DCOLAMD_LIBRARY:PATH="%(sp)s/COLAMD/lib/libcolamd.a"' - self.updatecfg('configopts', umfpack_params % {'sp':suitesparse}) + umfpack_params = [ + ' -DUMFPACK_DIR="%(sp)s/UMFPACK"', + '-DUMFPACK_INCLUDE_DIRS="%(sp)s/UMFPACK/include;%(sp)s/UFconfig"', + '-DAMD_DIR="%(sp)s/UMFPACK"', + '-DCHOLMOD_DIR="%(sp)s/CHOLMOD"', + '-DCHOLMOD_INCLUDE_DIRS="%(sp)s/CHOLMOD/include;%(sp)s/UFconfig"', + '-DUFCONFIG_DIR="%(sp)s/UFconfig"', + '-DCAMD_LIBRARY:PATH="%(sp)s/CAMD/lib/libcamd.a"', + '-DCCOLAMD_LIBRARY:PATH="%(sp)s/CCOLAMD/lib/libccolamd.a"', + '-DCOLAMD_LIBRARY:PATH="%(sp)s/COLAMD/lib/libcolamd.a"' + ] + + self.updatecfg('configopts', ' '.join(umfpack_params) % {'sp':suitesparse}) # ParMETIS and SCOTCH self.updatecfg('configopts', '-DPARMETIS_DIR="%s"' % depsdict['ParMETIS']) From 93b62f5b71fbd96a9ba17fed9d4d38d03363823e Mon Sep 17 00:00:00 2001 From: Kenneth Hoste Date: Sat, 18 Aug 2012 10:48:41 +0200 Subject: [PATCH 716/798] use module generator functions in make_module_extra --- easybuild/easyblocks/d/dolfin.py | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/easybuild/easyblocks/d/dolfin.py b/easybuild/easyblocks/d/dolfin.py index fe6d230e01..ca4785bfda 100644 --- a/easybuild/easyblocks/d/dolfin.py +++ b/easybuild/easyblocks/d/dolfin.py @@ -153,16 +153,17 @@ def make_module_extra(self): txt = CMakePythonPackage.make_module_extra(self) # Dolfin needs to find Boost and the UFC pkgconfig file - txt += "setenv\tBOOST_DIR\t%s\n" % get_software_root('Boost') - txt += "prepend-path\tPKG_CONFIG_PATH\t%s/lib/pkgconfig\n" % get_software_root('UFC') - txt += "prepend-path\tPKG_CONFIG_PATH\t%s/lib/pkgconfig\n" % self.installdir + txt += self.moduleGenerator.setEnvironment('BOOST_DIR', get_software_root('Boost')) + pkg_config_paths = [os.path.join(get_software_root('UFC'), "lib", "pkgconfig"), + os.path.join(self.installdir, "lib", "pkgconfig")] + txt += self.moduleGenerator.prependPaths("PKG_CONFIG_PATH", pkg_config_paths) envvars = ['I_MPI_CXX', 'I_MPI_CC'] for envvar in envvars: envar_val = os.getenv(envvar) # if environment variable is set, also set it in module if envar_val: - txt += "setenv\t%s\t%s\n" % (envvar, envar_val) + txt += self.moduleGenerator.setEnvironment(envvar, envar_val) return txt From 9458c0588be094f7c27c853bd0d47845e121123d Mon Sep 17 00:00:00 2001 From: Kenneth Hoste Date: Sat, 18 Aug 2012 10:51:37 +0200 Subject: [PATCH 717/798] process style remarks --- easybuild/easyblocks/m/metis.py | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/easybuild/easyblocks/m/metis.py b/easybuild/easyblocks/m/metis.py index 2b1d553f30..84bceee383 100644 --- a/easybuild/easyblocks/m/metis.py +++ b/easybuild/easyblocks/m/metis.py @@ -37,7 +37,7 @@ class METIS(Application): """Support for building and installing METIS.""" def configure(self, *args, **kwargs): - """Configure build using 'make config' (only for recent versions).""" + """Configure build using 'make config' (only for recent versions (>= v5)).""" if LooseVersion(self.version()) >= LooseVersion("5"): @@ -55,11 +55,13 @@ def make(self): Application.make(self) def make_install(self): - """Install by manually copying files to install dir, for old versions, + """ + Install by manually copying files to install dir, for old versions, or by running 'make install' for new versions. Create symlinks where expected by other applications - (in Lib instead of lib)""" + (in Lib instead of lib) + """ if LooseVersion(self.version()) < LooseVersion("5"): @@ -101,7 +103,7 @@ def make_install(self): Application.make_install(self) def sanitycheck(self): - """Custom sanity check for METIS.""" + """Custom sanity check for METIS (more extensive for recent version (>= v5))""" if not self.getcfg('sanityCheckPaths'): From 34151181b4cb2f8fc7aa348acd7991b1613a40ce Mon Sep 17 00:00:00 2001 From: Kenneth Hoste Date: Sat, 18 Aug 2012 10:52:39 +0200 Subject: [PATCH 718/798] process style remarks --- easybuild/easyblocks/p/parmetis.py | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/easybuild/easyblocks/p/parmetis.py b/easybuild/easyblocks/p/parmetis.py index f73a216916..f57337632f 100644 --- a/easybuild/easyblocks/p/parmetis.py +++ b/easybuild/easyblocks/p/parmetis.py @@ -27,8 +27,8 @@ """ import os import shutil - from distutils.version import LooseVersion + from easybuild.framework.application import Application from easybuild.tools.filetools import run_cmd, mkdir @@ -97,9 +97,10 @@ def make(self, verbose=False): run_cmd(cmd, log_all=True, simple=True, log_output=verbose) def make_install(self): - """Install by copying files over to the right places + """ + Install by copying files over to the right places. - Also create symlinks where expected by other packages (Lib directory) + Also create symlinks where expected by other packages (Lib directory). """ includedir = os.path.join(self.installdir, 'include') libdir = os.path.join(self.installdir, 'lib') From a9c91f92fb30d8135753d7ad752e790e0146bea8 Mon Sep 17 00:00:00 2001 From: Kenneth Hoste Date: Sat, 18 Aug 2012 10:54:33 +0200 Subject: [PATCH 719/798] process style remarks --- easybuild/easyblocks/p/petsc.py | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/easybuild/easyblocks/p/petsc.py b/easybuild/easyblocks/p/petsc.py index 88b75f5adb..2e0c4caa8c 100644 --- a/easybuild/easyblocks/p/petsc.py +++ b/easybuild/easyblocks/p/petsc.py @@ -65,7 +65,11 @@ def make_builddir(self): Application.make_builddir(self) def configure(self): - """Configure PETSc by setting configure options and running configure script.""" + """ + Configure PETSc by setting configure options and running configure script. + + Configure procedure is much more concise for older versions (< v3). + """ if LooseVersion(self.version()) >= LooseVersion("3"): From ef7ffe773f6e0932e6640aa80cd120a087d49d4e Mon Sep 17 00:00:00 2001 From: Kenneth Hoste Date: Sat, 18 Aug 2012 10:55:28 +0200 Subject: [PATCH 720/798] removed comment on old attemp not compatible with Python v2.4 --- easybuild/easyblocks/p/pythonpackage.py | 4 ---- 1 file changed, 4 deletions(-) diff --git a/easybuild/easyblocks/p/pythonpackage.py b/easybuild/easyblocks/p/pythonpackage.py index 113c7b83b3..58e78550a4 100644 --- a/easybuild/easyblocks/p/pythonpackage.py +++ b/easybuild/easyblocks/p/pythonpackage.py @@ -84,10 +84,6 @@ def make_module_extra(self): txt = Application.make_module_extra(self) - # geting installation directory with distutils doesn't work in Python 2.4 - #installdir = distutils.sysconfig.get_python_lib(plat_specific=True, - # prefix=self.installdir) - txt += "prepend-path\tPYTHONPATH\t%s\n" % os.path.join(self.installdir , self.pylibdir) return txt From 2c21e0c3b033d7449da8a71e1210a3c0181e3ba3 Mon Sep 17 00:00:00 2001 From: Kenneth Hoste Date: Sat, 18 Aug 2012 10:57:54 +0200 Subject: [PATCH 721/798] fix possible issues with cmd string construction (spaces) --- easybuild/easyblocks/i/imkl.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/easybuild/easyblocks/i/imkl.py b/easybuild/easyblocks/i/imkl.py index 59a33817a4..d7225774e8 100644 --- a/easybuild/easyblocks/i/imkl.py +++ b/easybuild/easyblocks/i/imkl.py @@ -168,7 +168,7 @@ def postproc(self): # compiler defaults to icc, but we could be using gcc to create gimkl. makeopts = '' if self.toolkit().comp_family() == toolkit.GCC: - makeopts += 'compiler=gnu ' + makeopts = 'compiler=gnu ' for i in lis1 + lis2 + lis3: if i in lis1: @@ -181,11 +181,11 @@ def postproc(self): # use INSTALL_DIR and SPEC_OPT extramakeopts = '' if self.toolkit().mpi_type() == toolkit.MPICH2: - extramakeopts += 'mpi=mpich2' + extramakeopts = 'mpi=mpich2' cmd = "make -f makefile libintel64 %s" % extramakeopts # add other make options as well - cmd += makeopts + cmd = ' '.join(cmd, makeopts) for opt in ['', '-fPIC']: try: From d8b093b4bf1bed3ab767949e41776a70c2ab9840 Mon Sep 17 00:00:00 2001 From: Kenneth Hoste Date: Sat, 18 Aug 2012 11:13:12 +0200 Subject: [PATCH 722/798] process style remarks --- easybuild/easyblocks/p/parmetis.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/easybuild/easyblocks/p/parmetis.py b/easybuild/easyblocks/p/parmetis.py index f57337632f..ccc88683c5 100644 --- a/easybuild/easyblocks/p/parmetis.py +++ b/easybuild/easyblocks/p/parmetis.py @@ -117,7 +117,7 @@ def make_install(self): # libraries try: - src = os.path.join(self.getcfg('startfrom'), 'build/libmetis/libmetis.a') + src = os.path.join(self.getcfg('startfrom'), 'build' ,'libmetis' ,'libmetis.a') dst = os.path.join(libdir, 'libmetis.a') shutil.copy2(src, dst) except OSError, err: @@ -125,7 +125,7 @@ def make_install(self): # include files try: - src = os.path.join(self.getcfg('startfrom'), 'build/metis/include/metis.h') + src = os.path.join(self.getcfg('startfrom'), 'build', 'metis', 'include', 'metis.h') dst = os.path.join(includedir, 'metis.h') shutil.copy2(src, dst) except OSError, err: From 11d1c2a21e05b51ad007ff3d41606c3ac45f413e Mon Sep 17 00:00:00 2001 From: Kenneth Hoste Date: Sat, 18 Aug 2012 11:14:24 +0200 Subject: [PATCH 723/798] process remarks w.r.t. docstrings --- easybuild/easyblocks/p/petsc.py | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/easybuild/easyblocks/p/petsc.py b/easybuild/easyblocks/p/petsc.py index 2e0c4caa8c..28cea22e81 100644 --- a/easybuild/easyblocks/p/petsc.py +++ b/easybuild/easyblocks/p/petsc.py @@ -213,7 +213,10 @@ def configure(self): # default make should be fine def make_install(self): - """Install using make install (for non-source installations), or by symlinking files (old versions).""" + """ + Install using make install (for non-source installations), + or by symlinking files (old versions, < 3). + """ if LooseVersion(self.version()) >= LooseVersion("3"): if not self.getcfg('sourceinstall'): Application.make_install(self) From 7d3f03d2eb1b84dbbbf94c77821561ad3a93f92e Mon Sep 17 00:00:00 2001 From: Kenneth Hoste Date: Sat, 18 Aug 2012 11:22:25 +0200 Subject: [PATCH 724/798] process style remarks --- easybuild/easyblocks/s/suitesparse.py | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-) diff --git a/easybuild/easyblocks/s/suitesparse.py b/easybuild/easyblocks/s/suitesparse.py index 91bd7cb288..4b45b0bf41 100644 --- a/easybuild/easyblocks/s/suitesparse.py +++ b/easybuild/easyblocks/s/suitesparse.py @@ -110,11 +110,15 @@ def make_install(self): self.log.exception("Copying src %s to dst %s failed" % (src, dst)) # some extra symlinks are necessary for UMFPACK to work. - for p in ['AMD/include/amd.h', 'AMD/include/amd_internal.h', - 'UFconfig/UFconfig.h', 'AMD/lib/libamd.a']: + for p in [ + os.path.join('AMD', 'include', 'amd.h'), + os.path.join('AMD' ,'include' ,'amd_internal.h'), + os.path.join('UFconfig', 'UFconfig.h'), + os.path.join('AMD', 'lib', 'libamd.a') + ]: src = os.path.join(self.installdir, p) - dn = p.split('/')[-2] - fn = p.split('/')[-1] + dn = p.split(os.path.sep)[-2] + fn = p.split(os.path.sep)[-1] dstdir = os.path.join(self.installdir, 'UMFPACK', dn) mkdir(dstdir) if os.path.exists(src): From 7cd82190f1ea55bf8d7df66db88d7f7090467fe9 Mon Sep 17 00:00:00 2001 From: Kenneth Hoste Date: Sat, 18 Aug 2012 11:23:42 +0200 Subject: [PATCH 725/798] add option for enable verbose mode --- easybuild/easyblocks/t/trilinos.py | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/easybuild/easyblocks/t/trilinos.py b/easybuild/easyblocks/t/trilinos.py index 50cb12ce93..d80b0d7867 100644 --- a/easybuild/easyblocks/t/trilinos.py +++ b/easybuild/easyblocks/t/trilinos.py @@ -39,16 +39,18 @@ def extra_options(): 'shared_libs': [False, "BUild shared libs; if False, build static libs. (default: False)."], 'openmp': [True, "Enable OpenMP support (default: True)"], 'all_pkgs': [True, "Enable all packages (default: True)"], - 'skip_pkgs': [[], "List of packages to skip (default: [])"] + 'skip_pkgs': [[], "List of packages to skip (default: [])"], + 'verbose': [False, 'Configure for verbose output (default: False)'] } return CMake.extra_options(extra_vars) def configure(self): """Set some extra environment variables before configuring.""" - # enable verbose output - #for x in ["CONFIGURE", "MAKEFILE"]: - # self.updatecfg('configopts', "-DTrilinos_VERBOSE_%s:BOOL=ON" % x) + # enable verbose output if desired + if self.getcfg('verbose'): + for x in ["CONFIGURE", "MAKEFILE"]: + self.updatecfg('configopts', "-DTrilinos_VERBOSE_%s:BOOL=ON" % x) # compiler flags cflags = os.getenv('CFLAGS') From f1171f6455988e94bbfebb13708654288054b889 Mon Sep 17 00:00:00 2001 From: Kenneth Hoste Date: Sat, 18 Aug 2012 11:32:09 +0200 Subject: [PATCH 726/798] enable packed-groups for DOLFIN with ictce; this option was intended for this case --- .../d/DOLFIN/DOLFIN-1.0.0-ictce-4.0.6-Python-2.7.3.eb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/easybuild/easyconfigs/d/DOLFIN/DOLFIN-1.0.0-ictce-4.0.6-Python-2.7.3.eb b/easybuild/easyconfigs/d/DOLFIN/DOLFIN-1.0.0-ictce-4.0.6-Python-2.7.3.eb index 57d8f1b53f..661d79d995 100644 --- a/easybuild/easyconfigs/d/DOLFIN/DOLFIN-1.0.0-ictce-4.0.6-Python-2.7.3.eb +++ b/easybuild/easyconfigs/d/DOLFIN/DOLFIN-1.0.0-ictce-4.0.6-Python-2.7.3.eb @@ -6,7 +6,7 @@ description = """DOLFIN is the C++/Python interface of FEniCS, providing a consi (Problem Solving Environment) for ordinary and partial differential equations.""" toolkit = {'name': 'ictce', 'version': '4.0.6'} -toolkitopts = {'usempi': True, 'pic': True, 'packed-groups': False} +toolkitopts = {'usempi': True, 'pic': True, 'packed-groups': True} majver = version.split('.') if majver[0] == '0': From 3f3110031bbf12e3e6e2633c60ed289264488995 Mon Sep 17 00:00:00 2001 From: Kenneth Hoste Date: Sat, 18 Aug 2012 11:34:56 +0200 Subject: [PATCH 727/798] remove example easyconfig for IMKL which uses GCC for interfaces, bad example --- .../easyconfigs/i/imkl/imkl-10.3.6.233-GCC.eb | 30 ------------------- 1 file changed, 30 deletions(-) delete mode 100644 easybuild/easyconfigs/i/imkl/imkl-10.3.6.233-GCC.eb diff --git a/easybuild/easyconfigs/i/imkl/imkl-10.3.6.233-GCC.eb b/easybuild/easyconfigs/i/imkl/imkl-10.3.6.233-GCC.eb deleted file mode 100644 index b3a2afcd35..0000000000 --- a/easybuild/easyconfigs/i/imkl/imkl-10.3.6.233-GCC.eb +++ /dev/null @@ -1,30 +0,0 @@ -name='imkl' -version='10.3.6.233' -versionsuffix='-GCC' - -homepage='http://software.intel.com/en-us/intel-mkl/' -description="""Intel Math Kernel Library is a library of highly optimized, extensively threaded math routines for science, engineering, and financial applications that require maximum performance. Core math functions include BLAS, LAPACK, ScaLAPACK, Sparse Solvers, Fast Fourier Transforms, Vector Math, and more.""" - -toolkit={'name':'dummy','version':'dummy'} - -sources=['l_mkl_%s_intel64.tgz'%version] - -## deps for interface build -dependencies=[ - {'name':'GCC', 'version': '4.6.2'}, - {'name':'impi','version':'4.0.2.003'}, - ] - -## compiler class -moduleclass='lib' - -dontcreateinstalldir='True' - -## make opts for gcc -makeopts='compiler=gnu' - -## licensepath -import os -license=os.path.join(os.getenv('HOME'),"licenses","intel","license.lic") - -interfaces=True From 0baeec6d714e0adb72b33ad789c447c472edb790 Mon Sep 17 00:00:00 2001 From: Kenneth Hoste Date: Sat, 18 Aug 2012 12:27:27 +0200 Subject: [PATCH 728/798] added Jinja2 example easyconfig for ictce --- .../Jinja2-2.6-ictce-4.0.6-Python-2.7.3.eb | 31 +++++++++++++++++++ 1 file changed, 31 insertions(+) create mode 100644 easybuild/easyconfigs/j/Jinja2/Jinja2-2.6-ictce-4.0.6-Python-2.7.3.eb diff --git a/easybuild/easyconfigs/j/Jinja2/Jinja2-2.6-ictce-4.0.6-Python-2.7.3.eb b/easybuild/easyconfigs/j/Jinja2/Jinja2-2.6-ictce-4.0.6-Python-2.7.3.eb new file mode 100644 index 0000000000..1fb90e5120 --- /dev/null +++ b/easybuild/easyconfigs/j/Jinja2/Jinja2-2.6-ictce-4.0.6-Python-2.7.3.eb @@ -0,0 +1,31 @@ +easyblock = "PythonPackage" + +name = "Jinja2" +version = "2.6" + +homepage = "http://pypi.python.org/pypi/Jinja2" +description = """Jinja2 is a template engine written in pure Python. It provides a Django inspired +non-XML syntax but supports inline expressions and an optional sandboxed environment.""" + +toolkit = {'name':'ictce','version':'4.0.6'} + +sourceURLs = ['http://pypi.python.org/packages/source/J/%s/' % name] +sources = ["%s-%s.tar.gz" % (name, version)] + +python = "Python" +pythonversion = "2.7.3" + +versionsuffix = "-%s-%s" % (python, pythonversion) + +dependencies = [ + (python, pythonversion), + ('setuptools', '0.6c11', versionsuffix) + ] + +py_short_ver = ".".join(pythonversion.split(".")[0:2]) +pylibdir = "lib/python%s/site-packages/%s" % (py_short_ver, name) + +sanityCheckPaths = { + 'files': [], + 'dirs': ["%s-%s-py%s.egg" % (pylibdir, version, py_short_ver)] + } \ No newline at end of file From 492e08a7a8546ef01359454ed12000c06db660e8 Mon Sep 17 00:00:00 2001 From: Kenneth Hoste Date: Sat, 18 Aug 2012 12:30:54 +0200 Subject: [PATCH 729/798] split import into two lines --- easybuild/tools/filetools.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/easybuild/tools/filetools.py b/easybuild/tools/filetools.py index 9b09957e73..4971f35a43 100644 --- a/easybuild/tools/filetools.py +++ b/easybuild/tools/filetools.py @@ -37,8 +37,8 @@ import time import easybuild.tools.environment as env -from easybuild.tools.asyncprocess import Popen, PIPE, STDOUT, send_all, \ - recv_some +from easybuild.tools.asyncprocess import Popen, PIPE, STDOUT +from easybuild.tools.asyncprocess import send_all, recv_some from easybuild.tools.build_log import getLog From f0bb6c2ba1c6585d53e41cff3ea6c358dbf28869 Mon Sep 17 00:00:00 2001 From: Kenneth Hoste Date: Sat, 18 Aug 2012 12:31:49 +0200 Subject: [PATCH 730/798] get rid of now useless comment line --- easybuild/tools/toolkit.py | 1 - 1 file changed, 1 deletion(-) diff --git a/easybuild/tools/toolkit.py b/easybuild/tools/toolkit.py index 5d82131652..363d42d810 100644 --- a/easybuild/tools/toolkit.py +++ b/easybuild/tools/toolkit.py @@ -335,7 +335,6 @@ def prepareACML(self): self.log.error("Don't know which compiler-specific subdir for ACML to use.") self.vars['LDFLAGS'] += " -L%s/%s64/lib/ " % (acml, compiler) - # "%s/%s64/lib/libacml.a -lpthread" % (acml, compiler) self.vars['LIBBLAS'] = " -lacml_mv -lacml " #-lpthread" self.vars['LIBBLAS_MT'] = self.vars['LIBBLAS'] From 4ad3c0b95b2ad4392e4cafe67139636de14c55bf Mon Sep 17 00:00:00 2001 From: Kenneth Hoste Date: Sat, 18 Aug 2012 13:57:30 +0200 Subject: [PATCH 731/798] fix packing of groups --- easybuild/tools/toolkit.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/easybuild/tools/toolkit.py b/easybuild/tools/toolkit.py index 363d42d810..9c65f0a37a 100644 --- a/easybuild/tools/toolkit.py +++ b/easybuild/tools/toolkit.py @@ -665,7 +665,9 @@ def prepareIMKL(self): if self.opts['packed-groups']: for x in ['LIBBLAS', 'LIBLAPACK', 'LIBSCALAPACK']: for var in [x, "%s_MT" % x]: - self.vars[var] = self.vars[var].replace(" ", ",").replace("-Wl,--end-group", "--end-group") + self.vars[var] = self.vars[var].replace(" ", ",") + self.vars[var] = self.vars[var].replace(",-Wl,", ",") + self.vars[var] = self.vars[var].replace(",-Wl:", ",") # linker flags self._flagsForSubdirs(mklroot, mklld, flag="-L%s", varskey="LDFLAGS") From 18631b5c9d8af4c488f78aed6e3af8558ffe670a Mon Sep 17 00:00:00 2001 From: Fotis Georgatos Date: Sat, 18 Aug 2012 14:22:05 +0200 Subject: [PATCH 732/798] added function encode_string Signed-off-by: Fotis Georgatos --- easybuild/tools/filetools.py | 53 ++++++++++++++++++++++++++++++++++++ 1 file changed, 53 insertions(+) diff --git a/easybuild/tools/filetools.py b/easybuild/tools/filetools.py index 0ee01a0d04..dd9785d522 100644 --- a/easybuild/tools/filetools.py +++ b/easybuild/tools/filetools.py @@ -717,3 +717,56 @@ def patch_perl_script_autoflush(path): except IOError, err: log.error("Failed to patch Perl configure script: %s" % err) + + +def encode_string(name): + """ + Here is an encoding function to handle funky package names ad infinitum; + it has been inspired by the concept seen at: + * http://fossies.org/dox/netcdf-4.2.1.1/escapes_8c_source.html # in effect, current names are a lower case derivative of this one + * http://celldesigner.org/help/CDH_Species_01.html + * http://research.cs.berkeley.edu/project/sbp/darcsrepo-no-longer-updated/src/edu/berkeley/sbp/misc/ReflectiveWalker.java + and can be extended freely as per ISO/IEC 10646:2012 / Unicode 6.1 names, as long as they are described in _CamelCase_ style iff more than 2 words, for readability: + http://www.unicode.org/versions/Unicode6.1.0/ + So, yes, '_GreekSmallLetterEtaWithPsiliAndOxia_' *can* indeed be a fully valid package name; package "electron" in the original spelling anyone? ;-) + """ + + charmap = { + ' ': "_space_", + '!': "_exclamation_", + '"': "_quotation_", + '#': "_hash_", + '$': "_dollar_", + '%': "_percent_", + '&': "_ampersand_", + '(': "_leftparen_", + ')': "_rightparen_", + '*': "_asterisk_", + '+': "_plus_", + ',': "_comma_", + '-': "_minus_", + '.': "_period_", + '/': "_slash_", + ':': "_colon_", + ';': "_semicolon_", + '<': "_lessthan_", + '=': "_equals_", + '>': "_greaterthan_", + '?': "_question_", + '@': "_atsign_", + '[': "_leftbracket_", + '\'': "_apostrophe_", + '\\': "_backslash_", + ']': "_rightbracket_", + '^': "_circumflex_", + '_': "_underscore_", + '`': "_backquote_", + '{': "_leftcurly_", + '|': "_verticalbar_", + '}': "_rightcurly_", + '~': "_tilde_" + } + + result = ''.join(map(lambda x: charmap(x, x), name) # do the remapping and do return same char by default + return result + From daa07561972fe0d5c8472a903c034fdb0da306eb Mon Sep 17 00:00:00 2001 From: Kenneth Hoste Date: Sat, 18 Aug 2012 14:28:51 +0200 Subject: [PATCH 733/798] change EasyBlock to EasyConfig, fix direction of edges in dependency graph --- easybuild/build.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/easybuild/build.py b/easybuild/build.py index 2b23c6a561..b4295146a8 100644 --- a/easybuild/build.py +++ b/easybuild/build.py @@ -97,9 +97,9 @@ def add_build_options(parser): help="does the build/installation in a test directory " \ "located in $HOME/easybuildinstall") - parser.add_option("-s", "--stop", type="choice", choices=EasyBlock.validstops, + parser.add_option("-s", "--stop", type="choice", choices=EasyConfig.validstops, help="stop the installation after certain step " \ - "(valid: %s)" % ', '.join(EasyBlock.validstops)) + "(valid: %s)" % ', '.join(EasyConfig.validstops)) parser.add_option("-b", "--only-blocks", metavar="blocks", help="Only build blocks blk[,blk2]") parser.add_option("-k", "--skip", action="store_true", help="skip existing software (useful for installing additional packages)") @@ -825,7 +825,7 @@ def mk_node_name(mod): dgr.add_nodes([spec['module'] for spec in specs]) for spec in specs: for dep in spec['unresolvedDependencies']: - dgr.add_edge((dep, spec['module'])) + dgr.add_edge((spec['module'], spec)) # write to file dottxt = dot.write(dgr) From 91fe49320683eabb84305434912ebd18b379ce82 Mon Sep 17 00:00:00 2001 From: Kenneth Hoste Date: Sat, 18 Aug 2012 14:29:49 +0200 Subject: [PATCH 734/798] rename EasyBlock to EasyConfig --- easybuild/tools/repository.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/easybuild/tools/repository.py b/easybuild/tools/repository.py index 320d6ca26b..9d051dd3ea 100644 --- a/easybuild/tools/repository.py +++ b/easybuild/tools/repository.py @@ -54,7 +54,7 @@ pass import easybuild -from easybuild.framework.easyblock import EasyBlock +from easybuild.framework.easyconfig import EasyConfig from easybuild.tools.build_log import getLog From 5d7d2481fea6a607b068af68a262d03c31c5de15 Mon Sep 17 00:00:00 2001 From: Kenneth Hoste Date: Sat, 18 Aug 2012 14:30:59 +0200 Subject: [PATCH 735/798] fix typo --- easybuild/build.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/easybuild/build.py b/easybuild/build.py index b4295146a8..dd12746d7f 100644 --- a/easybuild/build.py +++ b/easybuild/build.py @@ -825,7 +825,7 @@ def mk_node_name(mod): dgr.add_nodes([spec['module'] for spec in specs]) for spec in specs: for dep in spec['unresolvedDependencies']: - dgr.add_edge((spec['module'], spec)) + dgr.add_edge((spec['module'], dep)) # write to file dottxt = dot.write(dgr) From 56d61585b02734a04624a6a6ee49a49e1e21b8af Mon Sep 17 00:00:00 2001 From: Fotis Georgatos Date: Sat, 18 Aug 2012 14:39:28 +0200 Subject: [PATCH 736/798] added eb_ prefix to all easyblock classes --- easybuild/easyblocks/a/atlas.py | 2 +- easybuild/easyblocks/b/binary.py | 2 +- easybuild/easyblocks/b/blacs.py | 2 +- easybuild/easyblocks/c/cp2k.py | 2 +- easybuild/easyblocks/c/cplex.py | 2 +- easybuild/easyblocks/d/doxygen.py | 2 +- easybuild/easyblocks/f/fsl.py | 2 +- easybuild/easyblocks/g/g2clib.py | 2 +- easybuild/easyblocks/g/g2lib.py | 2 +- easybuild/easyblocks/g/gcc.py | 2 +- easybuild/easyblocks/h/hdf5.py | 2 +- easybuild/easyblocks/h/hpl.py | 2 +- easybuild/easyblocks/i/icc.py | 2 +- easybuild/easyblocks/i/ifort.py | 2 +- easybuild/easyblocks/i/imkl.py | 2 +- easybuild/easyblocks/i/impi.py | 2 +- easybuild/easyblocks/i/intelbase.py | 2 +- easybuild/easyblocks/i/ipp.py | 2 +- easybuild/easyblocks/i/itac.py | 2 +- easybuild/easyblocks/l/lapack.py | 2 +- easybuild/easyblocks/l/libsmm.py | 2 +- easybuild/easyblocks/m/maple.py | 2 +- easybuild/easyblocks/m/mrbayes.py | 2 +- easybuild/easyblocks/m/mvapich2.py | 2 +- easybuild/easyblocks/n/ncl.py | 2 +- easybuild/easyblocks/n/netcdf.py | 2 +- easybuild/easyblocks/n/netcdf_fortran.py | 2 +- easybuild/easyblocks/o/openfoam.py | 2 +- easybuild/easyblocks/p/packedbinary.py | 2 +- easybuild/easyblocks/p/pasha.py | 2 +- easybuild/easyblocks/p/python.py | 28 ++++++++++++------------ easybuild/easyblocks/s/scalapack.py | 2 +- easybuild/easyblocks/t/tarball.py | 2 +- easybuild/easyblocks/t/tbb.py | 2 +- easybuild/easyblocks/t/toolkit.py | 2 +- easybuild/easyblocks/w/wps.py | 2 +- easybuild/easyblocks/w/wrf.py | 2 +- 37 files changed, 50 insertions(+), 50 deletions(-) diff --git a/easybuild/easyblocks/a/atlas.py b/easybuild/easyblocks/a/atlas.py index 24f93a78fc..95ddea11dc 100644 --- a/easybuild/easyblocks/a/atlas.py +++ b/easybuild/easyblocks/a/atlas.py @@ -35,7 +35,7 @@ from easybuild.tools.modules import get_software_root -class ATLAS(Application): +class eb_ATLAS(Application): """ Support for building ATLAS - configure (and check if it failed due to CPU throttling being enabled) diff --git a/easybuild/easyblocks/b/binary.py b/easybuild/easyblocks/b/binary.py index 84855b4cdb..3786119c0c 100644 --- a/easybuild/easyblocks/b/binary.py +++ b/easybuild/easyblocks/b/binary.py @@ -33,7 +33,7 @@ from easybuild.framework.application import Application -class Binary(Application): +class eb_Binary(Application): """Support for installing a binary package. Just copy it's sources to the installdir""" diff --git a/easybuild/easyblocks/b/blacs.py b/easybuild/easyblocks/b/blacs.py index 3fb3d3944d..509b26ad5b 100644 --- a/easybuild/easyblocks/b/blacs.py +++ b/easybuild/easyblocks/b/blacs.py @@ -50,7 +50,7 @@ def det_interface(log, path): log.error("Failed to determine interface, output for xintface: %s" % out) -class BLACS(Application): +class eb_BLACS(Application): """ Support for building/installing BLACS - configure: symlink BMAKES/Bmake.MPI-LINUX to Bmake.inc diff --git a/easybuild/easyblocks/c/cp2k.py b/easybuild/easyblocks/c/cp2k.py index 236ceff89a..9aeef14b2e 100644 --- a/easybuild/easyblocks/c/cp2k.py +++ b/easybuild/easyblocks/c/cp2k.py @@ -41,7 +41,7 @@ from easybuild.tools.modules import get_software_root, get_software_version -class CP2K(Application): +class eb_CP2K(Application): """ Support for building CP2K - prepare module include files if required diff --git a/easybuild/easyblocks/c/cplex.py b/easybuild/easyblocks/c/cplex.py index 28f4150213..3743e168f2 100644 --- a/easybuild/easyblocks/c/cplex.py +++ b/easybuild/easyblocks/c/cplex.py @@ -30,7 +30,7 @@ from easybuild.tools.filetools import run_cmd_qa -class CPLEX(Binary): +class eb_CPLEX(Binary): """ Support for installing CPLEX. Version 12.2 has a self-extracting package with a Java installer diff --git a/easybuild/easyblocks/d/doxygen.py b/easybuild/easyblocks/d/doxygen.py index 2156c04394..67cdfd62f5 100644 --- a/easybuild/easyblocks/d/doxygen.py +++ b/easybuild/easyblocks/d/doxygen.py @@ -30,7 +30,7 @@ from easybuild.tools.filetools import run_cmd -class Doxygen(Application): +class eb_Doxygen(Application): """Support for building/installing Doxygen""" def configure(self): diff --git a/easybuild/easyblocks/f/fsl.py b/easybuild/easyblocks/f/fsl.py index 55c7b28668..5dd56ea3e9 100644 --- a/easybuild/easyblocks/f/fsl.py +++ b/easybuild/easyblocks/f/fsl.py @@ -32,7 +32,7 @@ from easybuild.tools.filetools import run_cmd -class FSL(Application): +class eb_FSL(Application): """Support for building and installing FSL.""" def __init__(self,*args,**kwargs): diff --git a/easybuild/easyblocks/g/g2clib.py b/easybuild/easyblocks/g/g2clib.py index a0879f27bb..4005c98a15 100644 --- a/easybuild/easyblocks/g/g2clib.py +++ b/easybuild/easyblocks/g/g2clib.py @@ -34,7 +34,7 @@ from easybuild.tools.modules import get_software_root -class G2clib(Application): +class eb_g2clib(Application): """Support for building g2clib GRIB2 C library.""" def configure(self): diff --git a/easybuild/easyblocks/g/g2lib.py b/easybuild/easyblocks/g/g2lib.py index b9887e581a..2d0e00bfe4 100644 --- a/easybuild/easyblocks/g/g2lib.py +++ b/easybuild/easyblocks/g/g2lib.py @@ -33,7 +33,7 @@ from easybuild.tools.modules import get_software_root -class G2lib(Application): +class eb_g2lib(Application): """Support for building g2clib GRIB2 library.""" def configure(self): diff --git a/easybuild/easyblocks/g/gcc.py b/easybuild/easyblocks/g/gcc.py index 4d0633eea8..d895c61cb4 100644 --- a/easybuild/easyblocks/g/gcc.py +++ b/easybuild/easyblocks/g/gcc.py @@ -41,7 +41,7 @@ from easybuild.tools.systemtools import get_kernel_name, get_shared_lib_ext, get_platform_name -class GCC(Application): +class eb_GCC(Application): """ Self-contained build of GCC. Uses system compiler for initial build, then bootstraps. diff --git a/easybuild/easyblocks/h/hdf5.py b/easybuild/easyblocks/h/hdf5.py index 463ccc1a64..302810c0bc 100644 --- a/easybuild/easyblocks/h/hdf5.py +++ b/easybuild/easyblocks/h/hdf5.py @@ -32,7 +32,7 @@ from easybuild.tools.modules import get_software_root -class HDF5(Application): +class eb_HDF5(Application): """Support for building/installing HDF5""" def configure(self): diff --git a/easybuild/easyblocks/h/hpl.py b/easybuild/easyblocks/h/hpl.py index 3aeb94e316..01879ad2d6 100644 --- a/easybuild/easyblocks/h/hpl.py +++ b/easybuild/easyblocks/h/hpl.py @@ -33,7 +33,7 @@ from easybuild.tools.filetools import run_cmd -class HPL(Application): +class eb_HPL(Application): """ Support for building HPL (High Performance Linpack) - create Make.UNKNOWN diff --git a/easybuild/easyblocks/i/icc.py b/easybuild/easyblocks/i/icc.py index a838fa31a7..e1a2fd4714 100644 --- a/easybuild/easyblocks/i/icc.py +++ b/easybuild/easyblocks/i/icc.py @@ -32,7 +32,7 @@ from easybuild.easyblocks.i.intelbase import IntelBase -class Icc(IntelBase): +class eb_icc(IntelBase): """Support for installing icc - tested with 11.1.046 diff --git a/easybuild/easyblocks/i/ifort.py b/easybuild/easyblocks/i/ifort.py index 303328ad03..c88585c00e 100644 --- a/easybuild/easyblocks/i/ifort.py +++ b/easybuild/easyblocks/i/ifort.py @@ -31,7 +31,7 @@ from easybuild.easyblocks.i.icc import Icc, IntelBase -class Ifort(Icc): +class eb_ifort(Icc): """ Class that can be used to install ifort - tested with 11.1.046 diff --git a/easybuild/easyblocks/i/imkl.py b/easybuild/easyblocks/i/imkl.py index 1ee437ee8e..166cd71930 100644 --- a/easybuild/easyblocks/i/imkl.py +++ b/easybuild/easyblocks/i/imkl.py @@ -39,7 +39,7 @@ from easybuild.tools.modules import Modules -class Imkl(IntelBase): +class eb_imkl(IntelBase): """ Class that can be used to install mkl - tested with 10.2.1.017 diff --git a/easybuild/easyblocks/i/impi.py b/easybuild/easyblocks/i/impi.py index 8c6ae8ab68..5b381f7876 100644 --- a/easybuild/easyblocks/i/impi.py +++ b/easybuild/easyblocks/i/impi.py @@ -33,7 +33,7 @@ from easybuild.tools.filetools import run_cmd -class Impi(IntelBase): +class eb_impi(IntelBase): """ Support for installing Intel MPI library """ diff --git a/easybuild/easyblocks/i/intelbase.py b/easybuild/easyblocks/i/intelbase.py index b6410da40e..2f4b509ec0 100644 --- a/easybuild/easyblocks/i/intelbase.py +++ b/easybuild/easyblocks/i/intelbase.py @@ -35,7 +35,7 @@ from easybuild.tools.filetools import run_cmd -class IntelBase(Application): +class eb_intelBase(Application): """ Base class for Intel software - no configure/make : binary release diff --git a/easybuild/easyblocks/i/ipp.py b/easybuild/easyblocks/i/ipp.py index d7ff219fa2..5e5df4bf59 100644 --- a/easybuild/easyblocks/i/ipp.py +++ b/easybuild/easyblocks/i/ipp.py @@ -29,7 +29,7 @@ from easybuild.easyblocks.i.intelbase import IntelBase -class Ipp(IntelBase): +class eb_ipp(IntelBase): def sanitycheck(self): diff --git a/easybuild/easyblocks/i/itac.py b/easybuild/easyblocks/i/itac.py index ab61fcda0a..3e7b1f34b1 100644 --- a/easybuild/easyblocks/i/itac.py +++ b/easybuild/easyblocks/i/itac.py @@ -33,7 +33,7 @@ from easybuild.tools.filetools import run_cmd -class Itac(IntelBase): +class eb_itac(IntelBase): """ Class that can be used to install itac - tested with Intel Trace Analyzer and Collector 7.2.1.008 diff --git a/easybuild/easyblocks/l/lapack.py b/easybuild/easyblocks/l/lapack.py index 01118e8258..d23746e2f2 100644 --- a/easybuild/easyblocks/l/lapack.py +++ b/easybuild/easyblocks/l/lapack.py @@ -61,7 +61,7 @@ def get_blas_lib(log): return blaslib -class LAPACK(Application): +class eb_LAPACK(Application): """ Support for building LAPACK - read make.inc.example and replace BLAS line with configtops diff --git a/easybuild/easyblocks/l/libsmm.py b/easybuild/easyblocks/l/libsmm.py index 45b06b8192..01bb2cee28 100644 --- a/easybuild/easyblocks/l/libsmm.py +++ b/easybuild/easyblocks/l/libsmm.py @@ -38,7 +38,7 @@ from easybuild.tools.modules import get_software_root, get_software_version -class Libsmm(Application): +class eb_libsmm(Application): """ Support for the CP2K small matrix library Notes: - build can take really really long, and no real rebuilding needed for each version diff --git a/easybuild/easyblocks/m/maple.py b/easybuild/easyblocks/m/maple.py index 489b8711c1..6476842ae9 100644 --- a/easybuild/easyblocks/m/maple.py +++ b/easybuild/easyblocks/m/maple.py @@ -33,7 +33,7 @@ from easybuild.tools.filetools import run_cmd_qa -class Maple(Application): +class eb_Maple(Application): """Support for installing Maple.""" def unpack_src(self): diff --git a/easybuild/easyblocks/m/mrbayes.py b/easybuild/easyblocks/m/mrbayes.py index 3eabb898e3..cd2eac54c4 100644 --- a/easybuild/easyblocks/m/mrbayes.py +++ b/easybuild/easyblocks/m/mrbayes.py @@ -36,7 +36,7 @@ from easybuild.tools.modules import get_software_root -class MrBayes(Application): +class eb_MrBayes(Application): """Support for building/installing MrBayes.""" def configure(self): diff --git a/easybuild/easyblocks/m/mvapich2.py b/easybuild/easyblocks/m/mvapich2.py index eb6b3676c7..1ac2596f4f 100644 --- a/easybuild/easyblocks/m/mvapich2.py +++ b/easybuild/easyblocks/m/mvapich2.py @@ -33,7 +33,7 @@ from easybuild.framework.easyconfig import CUSTOM -class MVAPICH2(Application): +class eb_MVAPICH2(Application): """ Support for building the MVAPICH2 MPI library. - some compiler dependent configure options diff --git a/easybuild/easyblocks/n/ncl.py b/easybuild/easyblocks/n/ncl.py index 26f196d4b4..2ded66ba67 100644 --- a/easybuild/easyblocks/n/ncl.py +++ b/easybuild/easyblocks/n/ncl.py @@ -37,7 +37,7 @@ from easybuild.tools.modules import get_software_root, get_software_version -class NCL(Application): +class eb_NCL(Application): """Support for building/installing NCL.""" def configure(self): diff --git a/easybuild/easyblocks/n/netcdf.py b/easybuild/easyblocks/n/netcdf.py index ed2babf71d..d8930242a2 100644 --- a/easybuild/easyblocks/n/netcdf.py +++ b/easybuild/easyblocks/n/netcdf.py @@ -35,7 +35,7 @@ from easybuild.tools.modules import get_software_root, get_software_version -class NetCDF(Application): +class eb_netCDF(Application): """Support for building/installing netCDF""" def configure(self): diff --git a/easybuild/easyblocks/n/netcdf_fortran.py b/easybuild/easyblocks/n/netcdf_fortran.py index c69bd64061..2248450edb 100644 --- a/easybuild/easyblocks/n/netcdf_fortran.py +++ b/easybuild/easyblocks/n/netcdf_fortran.py @@ -33,7 +33,7 @@ from easybuild.framework.application import Application -class NetCDF_Fortran(Application): +class eb_netCDF_Fortran(Application): """Support for building/installing the netCDF-Fortran library""" def configure(self): diff --git a/easybuild/easyblocks/o/openfoam.py b/easybuild/easyblocks/o/openfoam.py index 555bef8ff2..03001c8777 100644 --- a/easybuild/easyblocks/o/openfoam.py +++ b/easybuild/easyblocks/o/openfoam.py @@ -36,7 +36,7 @@ from easybuild.tools.modules import get_software_root -class OpenFOAM(Application): +class eb_OpenFOAM(Application): """Support for building and installing OpenFOAM.""" def __init__(self,*args,**kwargs): diff --git a/easybuild/easyblocks/p/packedbinary.py b/easybuild/easyblocks/p/packedbinary.py index 79d8a256be..e583316eda 100644 --- a/easybuild/easyblocks/p/packedbinary.py +++ b/easybuild/easyblocks/p/packedbinary.py @@ -27,7 +27,7 @@ from easybuild.easyblocks.b.binary import Binary -class PackedBinary(Binary, Application): +class eb_PackedBinary(Binary, Application): """Support for installing a packed binary package. Just unpack its source in the installdir """ diff --git a/easybuild/easyblocks/p/pasha.py b/easybuild/easyblocks/p/pasha.py index e9406bef8f..88f577bc8e 100644 --- a/easybuild/easyblocks/p/pasha.py +++ b/easybuild/easyblocks/p/pasha.py @@ -29,7 +29,7 @@ from easybuild.tools.modules import get_software_root -class Pasha(Application): +class eb_Pasha(Application): """Support for building and installing Pasha""" def configure(self): diff --git a/easybuild/easyblocks/p/python.py b/easybuild/easyblocks/p/python.py index e25d7f4c13..6420d631e5 100644 --- a/easybuild/easyblocks/p/python.py +++ b/easybuild/easyblocks/p/python.py @@ -35,7 +35,7 @@ from easybuild.tools.modules import get_software_root -class Python(Application): +class eb_Python(Application): """Support for building/installing Python - default configure/make/make install works fine @@ -51,10 +51,10 @@ def extra_packages_pre(self): """ We set some default configs here for packages included in python """ - #insert new packages by building them with DefaultPythonPackage + #insert new packages by building them with eb_DefaultPythonPackage self.log.debug("setting extra packages options") - # use __name__ here, since this is the module where DefaultPythonPackage is defined - self.setcfg('pkgdefaultclass', (__name__, "DefaultPythonPackage")) + # use __name__ here, since this is the module where eb_DefaultPythonPackage is defined + self.setcfg('pkgdefaultclass', (__name__, "eb_DefaultPythonPackage")) self.setcfg('pkgfilter', ('python -c "import %(name)s"', "")) def make_install(self): @@ -71,7 +71,7 @@ def make_install(self): self.log.error("Failed to symlink %s to %s: %s" % err) -class DefaultPythonPackage(ApplicationPackage): +class eb_DefaultPythonPackage(ApplicationPackage): """ Easyblock for python packages to be included in the python installation. """ @@ -189,10 +189,10 @@ def getcfg(self, *args, **kwargs): return self.mself.getcfg(*args, **kwargs) -class Nose(DefaultPythonPackage): +class eb_Nose(eb_DefaultPythonPackage): """nose package""" def __init__(self, mself, pkg, pkginstalldeps): - DefaultPythonPackage.__init__(self, mself, pkg, pkginstalldeps) + eb_DefaultPythonPackage.__init__(self, mself, pkg, pkginstalldeps) # use extra unpack options to avoid problems like # 'tar: Ignoring unknown extended header keyword `SCHILY.nlink' @@ -200,8 +200,8 @@ def __init__(self, mself, pkg, pkginstalldeps): self.unpack_options = ' --pax-option="delete=SCHILY.*" --pax-option="delete=LIBARCHIVE.*" ' -class FortranPythonPackage(DefaultPythonPackage): - """Extends DefaultPythonPackage to add a Fortran compiler to the make call""" +class eb_FortranPythonPackage(eb_DefaultPythonPackage): + """Extends eb_DefaultPythonPackage to add a Fortran compiler to the make call""" def make(self): comp_fam = self.toolkit().comp_family() @@ -227,11 +227,11 @@ def make(self): run_cmd(cmd, log_all=True, simple=True) -class Numpy(FortranPythonPackage): +class eb_Numpy(eb_FortranPythonPackage): """numpy package""" def __init__(self, mself, pkg, pkginstalldeps): - FortranPythonPackage.__init__(self, mself, pkg, pkginstalldeps) + eb_FortranPythonPackage.__init__(self, mself, pkg, pkginstalldeps) self.pkgcfgs = mself.getcfg('pkgcfgs') if self.pkgcfgs.has_key('numpysitecfglibsubdirs'): @@ -302,7 +302,7 @@ def make_install(self): """Install numpy package We remove the numpy build dir here, so scipy doesn't find it by accident """ - FortranPythonPackage.make_install(self) + eb_FortranPythonPackage.make_install(self) builddir = os.path.join(self.builddir, "numpy") if os.path.isdir(builddir): shutil.rmtree(builddir) @@ -310,11 +310,11 @@ def make_install(self): self.log.debug("build dir %s already clean" % builddir) -class Scipy(FortranPythonPackage): +class eb_Scipy(eb_FortranPythonPackage): """scipy package""" def __init__(self, mself, pkg, pkginstalldeps): - FortranPythonPackage.__init__(self, mself, pkg, pkginstalldeps) + eb_FortranPythonPackage.__init__(self, mself, pkg, pkginstalldeps) # disable testing test = False diff --git a/easybuild/easyblocks/s/scalapack.py b/easybuild/easyblocks/s/scalapack.py index 2a48212901..1f6eed2342 100644 --- a/easybuild/easyblocks/s/scalapack.py +++ b/easybuild/easyblocks/s/scalapack.py @@ -37,7 +37,7 @@ from easybuild.tools.modules import get_software_root -class ScaLAPACK(Application): +class eb_ScaLAPACK(Application): """ Support for building and installing ScaLAPACK, both versions 1.x and 2.x """ diff --git a/easybuild/easyblocks/t/tarball.py b/easybuild/easyblocks/t/tarball.py index 7e60633a0c..2f1e3a03f4 100644 --- a/easybuild/easyblocks/t/tarball.py +++ b/easybuild/easyblocks/t/tarball.py @@ -32,7 +32,7 @@ from easybuild.framework.application import Application -class Tarball(Application): +class eb_Tarball(Application): """ Precompiled software packaged as tarball: - will unpack binary and copy it to the install dir diff --git a/easybuild/easyblocks/t/tbb.py b/easybuild/easyblocks/t/tbb.py index b4602852a8..f64daca652 100644 --- a/easybuild/easyblocks/t/tbb.py +++ b/easybuild/easyblocks/t/tbb.py @@ -33,7 +33,7 @@ from easybuild.easyblocks.i.intelbase import IntelBase -class Tbb(IntelBase): +class eb_tbb(IntelBase): """EasyBlock for tbb, threading building blocks""" def make_install(self): diff --git a/easybuild/easyblocks/t/toolkit.py b/easybuild/easyblocks/t/toolkit.py index 8de48b911b..207d99a8bf 100644 --- a/easybuild/easyblocks/t/toolkit.py +++ b/easybuild/easyblocks/t/toolkit.py @@ -29,7 +29,7 @@ from easybuild.framework.application import Application -class Toolkit(Application): +class eb_Toolkit(Application): """ Compiler toolkit: generate module file only, nothing to make/install """ diff --git a/easybuild/easyblocks/w/wps.py b/easybuild/easyblocks/w/wps.py index a26c4e6800..257931ed6f 100644 --- a/easybuild/easyblocks/w/wps.py +++ b/easybuild/easyblocks/w/wps.py @@ -43,7 +43,7 @@ from easybuild.tools.modules import get_software_root, get_software_version -class WPS(Application): +class eb_WPS(Application): """Support for building/installing WPS.""" def __init__(self, *args, **kwargs): diff --git a/easybuild/easyblocks/w/wrf.py b/easybuild/easyblocks/w/wrf.py index a41c1d97b2..f21197d289 100644 --- a/easybuild/easyblocks/w/wrf.py +++ b/easybuild/easyblocks/w/wrf.py @@ -40,7 +40,7 @@ from easybuild.tools.modules import get_software_root -class WRF(Application): +class eb_WRF(Application): """Support for building/installing WRF.""" def __init__(self,*args,**kwargs): From 64e5c0cbcb0695a20579b9a1b500b58811c3cfe1 Mon Sep 17 00:00:00 2001 From: Fotis Georgatos Date: Sat, 18 Aug 2012 14:41:17 +0200 Subject: [PATCH 737/798] enabled new class name convention as per: EBCLASSPREFIX + encode_string(name) Signed-off-by: Fotis Georgatos --- easybuild/framework/application.py | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) diff --git a/easybuild/framework/application.py b/easybuild/framework/application.py index 646d62a8de..cbc8d5aa3b 100644 --- a/easybuild/framework/application.py +++ b/easybuild/framework/application.py @@ -45,13 +45,16 @@ from easybuild.framework.easyconfig import EasyConfig from easybuild.tools.build_log import EasyBuildError, initLogger, removeLogHandler,print_msg from easybuild.tools.config import source_path, buildPath, installPath -from easybuild.tools.filetools import unpack, patch, run_cmd, convertName +from easybuild.tools.filetools import unpack, patch, run_cmd, convertName, encode_string from easybuild.tools.module_generator import ModuleGenerator from easybuild.tools.modules import Modules, get_software_root from easybuild.tools.toolkit import Toolkit from easybuild.tools.systemtools import get_core_count +EBCLASSPREFIX = 'eb_' + + class Application: """ Support for building and installing applications with configure/make/make install @@ -1401,7 +1404,7 @@ def extra_packages(self): allclassmodule = pkgdefaultclass[0] defaultClass = pkgdefaultclass[1] for pkg in self.pkgs: - name = pkg['name'][0].upper() + pkg['name'][1:] # classnames start with a capital + name = EBCLASSPREFIX + encode_string(pkg['name']) # Use the same encoding as get_class self.log.debug("Starting package %s" % name) try: @@ -1566,8 +1569,8 @@ def get_class(easyblock, log, name=None): name = "UNKNOWN" modulepath = module_path_for_easyblock(name) - # don't use capitalize, as it changes 'GCC' into 'Gcc', we want to keep the capitals that are there already - class_name = name[0].upper() + name[1:].replace('-','_') + # The following is a generic way to calculate unique class names for any funny package title + class_name = EBCLASSPREFIX + encode_string(name) # try and find easyblock easyblock_found = False From 8ab0789fd96b0bbb7615effd435e6f6390221a5c Mon Sep 17 00:00:00 2001 From: Kenneth Hoste Date: Sat, 18 Aug 2012 14:52:53 +0200 Subject: [PATCH 738/798] don't use -Wl: but use -Wl, instead --- easybuild/tools/toolkit.py | 11 +++++------ 1 file changed, 5 insertions(+), 6 deletions(-) diff --git a/easybuild/tools/toolkit.py b/easybuild/tools/toolkit.py index 9c65f0a37a..c00366214e 100644 --- a/easybuild/tools/toolkit.py +++ b/easybuild/tools/toolkit.py @@ -593,8 +593,8 @@ def prepareIMKL(self): libs.replace('mkl_intel_lp64', 'mkl_gf_lp64') # sequential BLAS and LAPACK - prefix = "-Wl:-Bstatic -Wl,--start-group" - suffix = "-Wl,--end-group -Wl:-Bdynamic" + prefix = "-Wl,-Bstatic -Wl,--start-group" + suffix = "-Wl,--end-group -Wl,-Bdynamic" self.vars['LIBBLAS'] = ' '.join([prefix, ' '.join(["-lmkl_%s" % x for x in blas_libs]), suffix]) self.vars['LIBLAPACK'] = self.vars['LIBBLAS'] @@ -636,7 +636,7 @@ def prepareIMKL(self): self.vars['SCALAPACK_INC_DIR'] = os.path.join(mklroot, "mkl", "include") self.vars['SCALAPACK_LIB_DIR'] = libs_dir - suffix = "-Wl,--end-group -Wl:-Bdynamic" + suffix = "-Wl,--end-group -Wl,-Bdynamic" self.vars['LIBSCALAPACK'] = ' '.join([prefix, ' '.join(["-lmkl_%s" % x for x in scalapack_libs]), suffix]) self.vars['SCALAPACK_STATIC_LIBS'] = ','.join(["libmkl_%s.a" % x for x in scalapack_libs]) @@ -652,9 +652,9 @@ def prepareIMKL(self): fftw_libs = ["fftw3xc_intel%s" % fftwsuff, "fftw3x_cdft%s" % fftwsuff, "mkl_cdft_core"] - self.vars['LIBFFT'] = ' '.join(["-Wl:-Bstatic", + self.vars['LIBFFT'] = ' '.join(["-Wl,-Bstatic", ' '.join(["-%s" % x for x in fftw_libs]), - "-Wl:-Bdynamic"]) + "-Wl,-Bdynamic"]) self.vars['FFTW_INC_DIR'] = os.path.join(mklroot, "mkl", "include", "fftw") self.vars['FFTW_LIB_DIR'] = libs_dir fftw_static_libs = ["lib%s.a" % x for x in fftw_libs] @@ -667,7 +667,6 @@ def prepareIMKL(self): for var in [x, "%s_MT" % x]: self.vars[var] = self.vars[var].replace(" ", ",") self.vars[var] = self.vars[var].replace(",-Wl,", ",") - self.vars[var] = self.vars[var].replace(",-Wl:", ",") # linker flags self._flagsForSubdirs(mklroot, mklld, flag="-L%s", varskey="LDFLAGS") From c1cedcdc932d61b1c2687834798c0dfb6fb8b1e6 Mon Sep 17 00:00:00 2001 From: Fotis Georgatos Date: Sat, 18 Aug 2012 16:05:23 +0200 Subject: [PATCH 739/798] bugfixing on line with: result = .join(map(lambda x: charmap.get(x, x), name)) Signed-off-by: Fotis Georgatos --- easybuild/tools/filetools.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/easybuild/tools/filetools.py b/easybuild/tools/filetools.py index dd9785d522..c3dc447791 100644 --- a/easybuild/tools/filetools.py +++ b/easybuild/tools/filetools.py @@ -767,6 +767,6 @@ def encode_string(name): '~': "_tilde_" } - result = ''.join(map(lambda x: charmap(x, x), name) # do the remapping and do return same char by default + result = ''.join(map(lambda x: charmap.get(x, x), name)) # do the remapping and do return same char by default return result From 95c90136eb3e350de9c92b283c5d230c1965d01d Mon Sep 17 00:00:00 2001 From: Kenneth Hoste Date: Sat, 18 Aug 2012 19:19:26 +0200 Subject: [PATCH 740/798] corret naming of classes for Python packages nose, numpy and scipy --- easybuild/easyblocks/p/python.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/easybuild/easyblocks/p/python.py b/easybuild/easyblocks/p/python.py index 6420d631e5..2232f5748e 100644 --- a/easybuild/easyblocks/p/python.py +++ b/easybuild/easyblocks/p/python.py @@ -189,7 +189,7 @@ def getcfg(self, *args, **kwargs): return self.mself.getcfg(*args, **kwargs) -class eb_Nose(eb_DefaultPythonPackage): +class eb_nose(eb_DefaultPythonPackage): """nose package""" def __init__(self, mself, pkg, pkginstalldeps): eb_DefaultPythonPackage.__init__(self, mself, pkg, pkginstalldeps) @@ -227,7 +227,7 @@ def make(self): run_cmd(cmd, log_all=True, simple=True) -class eb_Numpy(eb_FortranPythonPackage): +class eb_numpy(eb_FortranPythonPackage): """numpy package""" def __init__(self, mself, pkg, pkginstalldeps): @@ -310,7 +310,7 @@ def make_install(self): self.log.debug("build dir %s already clean" % builddir) -class eb_Scipy(eb_FortranPythonPackage): +class eb_scipy(eb_FortranPythonPackage): """scipy package""" def __init__(self, mself, pkg, pkginstalldeps): From bcd0237871197a12f33b6719d3f8e2ddd9d6a33d Mon Sep 17 00:00:00 2001 From: Kenneth Hoste Date: Sat, 18 Aug 2012 20:38:04 +0200 Subject: [PATCH 741/798] fix typo --- easybuild/framework/application.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/easybuild/framework/application.py b/easybuild/framework/application.py index 29713f0e4c..b457762dde 100644 --- a/easybuild/framework/application.py +++ b/easybuild/framework/application.py @@ -842,7 +842,7 @@ def sanitycheck(self): self.log.debug("Loading module failed: %s" % err) self.sanityCheckOK = False - # chdir to installdir (beter environment for running tests) + # chdir to installdir (better environment for running tests) os.chdir(self.installdir) # run sanity check command From c422ec349d62c8a450dd24ad863b788e2fb9799d Mon Sep 17 00:00:00 2001 From: Kenneth Hoste Date: Sat, 18 Aug 2012 21:58:39 +0200 Subject: [PATCH 742/798] run DOLFIN demos as tests to check the build --- easybuild/easyblocks/d/dolfin.py | 30 ++++++++++++++++++++++++++++++ 1 file changed, 30 insertions(+) diff --git a/easybuild/easyblocks/d/dolfin.py b/easybuild/easyblocks/d/dolfin.py index ca4785bfda..b4d4508071 100644 --- a/easybuild/easyblocks/d/dolfin.py +++ b/easybuild/easyblocks/d/dolfin.py @@ -27,12 +27,23 @@ import easybuild.tools.toolkit as toolkit from easybuild.easyblocks.c.cmakepythonpackage import CMakePythonPackage +from easybuild.framework.easyconfig import BUILD +from easybuild.tools.filetools import run_cmd from easybuild.tools.modules import get_software_root, get_software_version class DOLFIN(CMakePythonPackage): """Support for building and installing DOLFIN.""" + def extra_options(self): + """Add DOLFIN-specific easyconfig options.""" + + extra_vars = [ + ('runtest', [True, "Test using the DOLFIN demos (default: True)", BUILD]), + ] + + return CMakePythonPackage.extra_options(extra_vars) + def configure(self): """Set DOLFIN-specific configure options and configure with CMake.""" @@ -147,6 +158,25 @@ def configure(self): if not_found_re.search(out): self.log.error("Optional packages could not be found, this should not happen...") + def test(self): + """Run demos that come with DOLFIN to test the build.""" + + if self.getcfg('runtest'): + + cmd_template = "cd %s && python demo_%s.py && cd -" + + # list based on demos available for DOLFIN v1.0.0 + pde_demos = ['biharmonic', 'cahn-hilliard', 'hyperelasticity', 'mixed-poisson', + 'navier-stokes', 'poisson', 'stokes-iterative', 'subdomains-poisson'] + demos = [os.path.join('la', 'eigenvalue')] + [os.path.join('pde', x) for x in pde_demos] + + cmds = [cmd_template % (os.path.join('demo', d, 'python'), os.path.basename(d)) + for d in demos] + + for cmd in cmds: + self.log.info("Run DOLFIN demo as test: %s" % cmd) + run_cmd(cmd, log_all=True, simple=True) + def make_module_extra(self): """Set extra environment variables for DOLFIN.""" From 3ecbd0cd5ea6546f76d1f3a3c5565b494fb1a345 Mon Sep 17 00:00:00 2001 From: Kenneth Hoste Date: Sun, 19 Aug 2012 00:22:57 +0200 Subject: [PATCH 743/798] run DOLFIN demos as a single sanity check command (took about 8 minutes on my laptop); running them as tests turned out to require too much fiddling around with getting the PYTHONPATH right --- easybuild/easyblocks/d/dolfin.py | 50 +++++++++++++------------------- 1 file changed, 20 insertions(+), 30 deletions(-) diff --git a/easybuild/easyblocks/d/dolfin.py b/easybuild/easyblocks/d/dolfin.py index b4d4508071..71519b9d98 100644 --- a/easybuild/easyblocks/d/dolfin.py +++ b/easybuild/easyblocks/d/dolfin.py @@ -27,23 +27,12 @@ import easybuild.tools.toolkit as toolkit from easybuild.easyblocks.c.cmakepythonpackage import CMakePythonPackage -from easybuild.framework.easyconfig import BUILD -from easybuild.tools.filetools import run_cmd from easybuild.tools.modules import get_software_root, get_software_version class DOLFIN(CMakePythonPackage): """Support for building and installing DOLFIN.""" - def extra_options(self): - """Add DOLFIN-specific easyconfig options.""" - - extra_vars = [ - ('runtest', [True, "Test using the DOLFIN demos (default: True)", BUILD]), - ] - - return CMakePythonPackage.extra_options(extra_vars) - def configure(self): """Set DOLFIN-specific configure options and configure with CMake.""" @@ -158,25 +147,6 @@ def configure(self): if not_found_re.search(out): self.log.error("Optional packages could not be found, this should not happen...") - def test(self): - """Run demos that come with DOLFIN to test the build.""" - - if self.getcfg('runtest'): - - cmd_template = "cd %s && python demo_%s.py && cd -" - - # list based on demos available for DOLFIN v1.0.0 - pde_demos = ['biharmonic', 'cahn-hilliard', 'hyperelasticity', 'mixed-poisson', - 'navier-stokes', 'poisson', 'stokes-iterative', 'subdomains-poisson'] - demos = [os.path.join('la', 'eigenvalue')] + [os.path.join('pde', x) for x in pde_demos] - - cmds = [cmd_template % (os.path.join('demo', d, 'python'), os.path.basename(d)) - for d in demos] - - for cmd in cmds: - self.log.info("Run DOLFIN demo as test: %s" % cmd) - run_cmd(cmd, log_all=True, simple=True) - def make_module_extra(self): """Set extra environment variables for DOLFIN.""" @@ -210,4 +180,24 @@ def sanitycheck(self): self.log.info("Customized sanity check paths: %s" % self.getcfg('sanityCheckPaths')) + if not self.getcfg('sanityCheckCommand'): + + pref = os.path.join('share', 'dolfin', 'demo') + + # test command template + cmd_template = "cd %s && python demo_%s.py && cd -" + + # list based on demos available for DOLFIN v1.0.0 + pde_demos = ['biharmonic', 'cahn-hilliard', 'hyperelasticity', 'mixed-poisson', + 'navier-stokes', 'poisson', 'stokes-iterative', 'subdomains-poisson'] + + demos = [os.path.join('la', 'eigenvalue')] + [os.path.join('pde', x) for x in pde_demos] + + # construct commands + cmds = [cmd_template % (os.path.join(pref, d, 'python'), os.path.basename(d)) + for d in demos] + + # join all commands into one large single sanity check command + self.setcfg('sanityCheckCommand', (" && ".join(cmds), "")) + CMakePythonPackage.sanitycheck(self) From 21df2f25e24665521d38660911bedc68d0f38f6a Mon Sep 17 00:00:00 2001 From: Kenneth Hoste Date: Sun, 19 Aug 2012 00:31:04 +0200 Subject: [PATCH 744/798] extend demo cmd template to also report which demo is being run --- easybuild/easyblocks/d/dolfin.py | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/easybuild/easyblocks/d/dolfin.py b/easybuild/easyblocks/d/dolfin.py index 71519b9d98..7a60aaf11f 100644 --- a/easybuild/easyblocks/d/dolfin.py +++ b/easybuild/easyblocks/d/dolfin.py @@ -185,7 +185,8 @@ def sanitycheck(self): pref = os.path.join('share', 'dolfin', 'demo') # test command template - cmd_template = "cd %s && python demo_%s.py && cd -" + cmd_template = " && ".join(["echo", "echo '+++ RUNNING DEMO %(name)s'", "echo", + "cd %(dir)s", "python demo_%(name)s.py", "cd -"]) # list based on demos available for DOLFIN v1.0.0 pde_demos = ['biharmonic', 'cahn-hilliard', 'hyperelasticity', 'mixed-poisson', @@ -194,7 +195,10 @@ def sanitycheck(self): demos = [os.path.join('la', 'eigenvalue')] + [os.path.join('pde', x) for x in pde_demos] # construct commands - cmds = [cmd_template % (os.path.join(pref, d, 'python'), os.path.basename(d)) + cmds = [cmd_template % { + 'dir': os.path.join(pref, d, 'python'), + 'name': os.path.basename(d), + } for d in demos] # join all commands into one large single sanity check command From 97cddc17a7aee3504dd34d7dfcb8dee14bd16136 Mon Sep 17 00:00:00 2001 From: Fotis Georgatos Date: Sun, 19 Aug 2012 00:35:00 +0200 Subject: [PATCH 745/798] tweaked filetools.py for PEP0008 compatibility Signed-off-by: Fotis Georgatos --- easybuild/tools/filetools.py | 22 +++++++++++++++------- 1 file changed, 15 insertions(+), 7 deletions(-) diff --git a/easybuild/tools/filetools.py b/easybuild/tools/filetools.py index c3dc447791..eb1ce3d1ab 100644 --- a/easybuild/tools/filetools.py +++ b/easybuild/tools/filetools.py @@ -721,14 +721,21 @@ def patch_perl_script_autoflush(path): def encode_string(name): """ - Here is an encoding function to handle funky package names ad infinitum; - it has been inspired by the concept seen at: - * http://fossies.org/dox/netcdf-4.2.1.1/escapes_8c_source.html # in effect, current names are a lower case derivative of this one + + This encoding function handles funky package names ad infinitum, like: + example: '0_foo+0x0x#-$__' + becomes: '0_underscore_foo_plus_0x0x_hash__minus__dollar__underscore__underscore_' + + It has been inspired by the concepts seen at, but in lowercase style: + * http://fossies.org/dox/netcdf-4.2.1.1/escapes_8c_source.html * http://celldesigner.org/help/CDH_Species_01.html * http://research.cs.berkeley.edu/project/sbp/darcsrepo-no-longer-updated/src/edu/berkeley/sbp/misc/ReflectiveWalker.java - and can be extended freely as per ISO/IEC 10646:2012 / Unicode 6.1 names, as long as they are described in _CamelCase_ style iff more than 2 words, for readability: - http://www.unicode.org/versions/Unicode6.1.0/ - So, yes, '_GreekSmallLetterEtaWithPsiliAndOxia_' *can* indeed be a fully valid package name; package "electron" in the original spelling anyone? ;-) + and can be extended freely as per ISO/IEC 10646:2012 / Unicode 6.1 names: + * http://www.unicode.org/versions/Unicode6.1.0/ + For readability of >2 words, it is suggested to use _CamelCase_ style. + So, yes, '_GreekSmallLetterEtaWithPsiliAndOxia_' *could* indeed be a fully + valid package name; package "electron" in the original spelling anyone? ;-) + """ charmap = { @@ -767,6 +774,7 @@ def encode_string(name): '~': "_tilde_" } - result = ''.join(map(lambda x: charmap.get(x, x), name)) # do the remapping and do return same char by default + # do the remapping and do return same char by default + result = ''.join(map(lambda x: charmap.get(x, x), name)) return result From 49d0c5e495bb463977bc1af2714a16e414437302 Mon Sep 17 00:00:00 2001 From: Kenneth Hoste Date: Sun, 19 Aug 2012 00:42:35 +0200 Subject: [PATCH 746/798] fix extra_options after changes in develop --- easybuild/easyblocks/b/boost.py | 3 ++- easybuild/easyblocks/m/mtl4.py | 1 - easybuild/easyblocks/p/petsc.py | 17 +++++++++-------- easybuild/easyblocks/s/slepc.py | 9 +++++---- easybuild/easyblocks/t/trilinos.py | 15 ++++++++------- 5 files changed, 24 insertions(+), 21 deletions(-) diff --git a/easybuild/easyblocks/b/boost.py b/easybuild/easyblocks/b/boost.py index d873366511..282c54e8d8 100644 --- a/easybuild/easyblocks/b/boost.py +++ b/easybuild/easyblocks/b/boost.py @@ -30,6 +30,7 @@ import easybuild.tools.toolkit as toolkit from easybuild.framework.application import Application +from easybuild.framework.easyconfig import CUSTOM from easybuild.tools.filetools import run_cmd from easybuild.tools.modules import get_software_root @@ -46,7 +47,7 @@ def __init__(self, *args, **kwargs): @staticmethod def extra_options(): """Add extra easyconfig parameters for Boost.""" - extra_vars = {'boost_mpi':[False, "Build mpi boost module (default: False)"]} + extra_vars = [('boost_mpi', [False, "Build mpi boost module (default: False)", CUSTOM])] return Application.extra_options(extra_vars) diff --git a/easybuild/easyblocks/m/mtl4.py b/easybuild/easyblocks/m/mtl4.py index 9d8bd420a4..422e470565 100644 --- a/easybuild/easyblocks/m/mtl4.py +++ b/easybuild/easyblocks/m/mtl4.py @@ -23,7 +23,6 @@ import os from easybuild.easyblocks.t.tarball import Tarball -from easybuild.tools.modules import get_software_root class MTL4(Tarball): diff --git a/easybuild/easyblocks/p/petsc.py b/easybuild/easyblocks/p/petsc.py index 28cea22e81..7c401341f6 100644 --- a/easybuild/easyblocks/p/petsc.py +++ b/easybuild/easyblocks/p/petsc.py @@ -28,6 +28,7 @@ import easybuild.tools.environment as env import easybuild.tools.toolkit as toolkit from easybuild.framework.application import Application +from easybuild.framework.easyconfig import BUILD, CUSTOM from easybuild.tools.filetools import run_cmd from easybuild.tools.modules import get_software_root from easybuild.tools.systemtools import get_shared_lib_ext @@ -46,14 +47,14 @@ def __init__(self, *args, **kwargs): @staticmethod def extra_options(): """Add extra config options specific to PETSc.""" - extra_vars = { - 'sourceinstall': [False, "Indicates whether a source installation should be performed (default: False)"], - 'shared_libs': [False, "Build shared libraries (default: False)"], - 'with_papi': [False, "Enable PAPI support (default: False)"], - 'papi_inc': ['/usr/include', "Path for PAPI include files (default: /usr/include)"], - 'papi_lib': ['/usr/lib64/libpapi.so', "Path for PAPI library (default: '/usr/lib64/libpapi.so')"], - 'runtest': ['test', "Make target to test build (default: test)"] - } + extra_vars = [ + ('sourceinstall', [False, "Indicates whether a source installation should be performed (default: False)", CUSTOM]), + ('shared_libs', [False, "Build shared libraries (default: False)", CUSTOM]), + ('with_papi', [False, "Enable PAPI support (default: False)", CUSTOM]), + ('papi_inc', ['/usr/include', "Path for PAPI include files (default: /usr/include)", CUSTOM]), + ('papi_lib', ['/usr/lib64/libpapi.so', "Path for PAPI library (default: '/usr/lib64/libpapi.so')", CUSTOM]), + ('runtest', ['test', "Make target to test build (default: test)", BUILD]) + ] return Application.extra_options(extra_vars) def make_builddir(self): diff --git a/easybuild/easyblocks/s/slepc.py b/easybuild/easyblocks/s/slepc.py index 4fcd5118f7..df130004b0 100644 --- a/easybuild/easyblocks/s/slepc.py +++ b/easybuild/easyblocks/s/slepc.py @@ -27,6 +27,7 @@ import easybuild.tools.environment as env from easybuild.framework.application import Application +from easybuild.framework.easyconfig import BUILD, CUSTOM from easybuild.tools.filetools import run_cmd from easybuild.tools.modules import get_software_root @@ -43,10 +44,10 @@ def __init__(self, *args, **kwargs): @staticmethod def extra_options(): """Add extra config options specific to SLEPc.""" - extra_vars = { - 'sourceinstall': [False, "Indicates whether a source installation should be performed (default: False)"], - 'runtest': ['test', "Make target to test build (default: test)"] - } + extra_vars = [ + ('sourceinstall', [False, "Indicates whether a source installation should be performed (default: False)", CUSTOM]), + ('runtest', ['test', "Make target to test build (default: test)", BUILD]) + ] return Application.extra_options(extra_vars) def make_builddir(self): diff --git a/easybuild/easyblocks/t/trilinos.py b/easybuild/easyblocks/t/trilinos.py index d80b0d7867..22d620240a 100644 --- a/easybuild/easyblocks/t/trilinos.py +++ b/easybuild/easyblocks/t/trilinos.py @@ -25,6 +25,7 @@ import easybuild.tools.toolkit as toolkit from easybuild.easyblocks.c.cmake import CMake +from easybuild.framework.easyconfig import CUSTOM from easybuild.tools.modules import get_software_root @@ -35,13 +36,13 @@ class Trilinos(CMake): @staticmethod def extra_options(): """Add extra config options specific to Trilinos.""" - extra_vars = { - 'shared_libs': [False, "BUild shared libs; if False, build static libs. (default: False)."], - 'openmp': [True, "Enable OpenMP support (default: True)"], - 'all_pkgs': [True, "Enable all packages (default: True)"], - 'skip_pkgs': [[], "List of packages to skip (default: [])"], - 'verbose': [False, 'Configure for verbose output (default: False)'] - } + extra_vars = [ + ('shared_libs', [False, "BUild shared libs; if False, build static libs. (default: False).", CUSTOM]), + ('openmp', [True, "Enable OpenMP support (default: True)"], CUSTOM), + ('all_pkgs', [True, "Enable all packages (default: True)"], CUSTOM), + ('skip_pkgs', [[], "List of packages to skip (default: [])"], CUSTOM), + ('verbose', [False, 'Configure for verbose output (default: False)'], CUSTOM) + ] return CMake.extra_options(extra_vars) def configure(self): From abe637df3a4b7e57ffe7f8bc98eaad04a8786ee6 Mon Sep 17 00:00:00 2001 From: Fotis Georgatos Date: Sun, 19 Aug 2012 00:53:02 +0200 Subject: [PATCH 747/798] rewired bits in favor of encode_class_name function & fixed comments Signed-off-by: Fotis Georgatos --- easybuild/framework/application.py | 9 +++------ easybuild/tools/filetools.py | 10 +++++++--- 2 files changed, 10 insertions(+), 9 deletions(-) diff --git a/easybuild/framework/application.py b/easybuild/framework/application.py index cbc8d5aa3b..2ccc14f6c8 100644 --- a/easybuild/framework/application.py +++ b/easybuild/framework/application.py @@ -45,16 +45,13 @@ from easybuild.framework.easyconfig import EasyConfig from easybuild.tools.build_log import EasyBuildError, initLogger, removeLogHandler,print_msg from easybuild.tools.config import source_path, buildPath, installPath -from easybuild.tools.filetools import unpack, patch, run_cmd, convertName, encode_string +from easybuild.tools.filetools import unpack, patch, run_cmd, convertName, encode_class_name from easybuild.tools.module_generator import ModuleGenerator from easybuild.tools.modules import Modules, get_software_root from easybuild.tools.toolkit import Toolkit from easybuild.tools.systemtools import get_core_count -EBCLASSPREFIX = 'eb_' - - class Application: """ Support for building and installing applications with configure/make/make install @@ -1404,7 +1401,7 @@ def extra_packages(self): allclassmodule = pkgdefaultclass[0] defaultClass = pkgdefaultclass[1] for pkg in self.pkgs: - name = EBCLASSPREFIX + encode_string(pkg['name']) # Use the same encoding as get_class + name = encode_class_name(pkg['name']) # Use the same encoding as get_class self.log.debug("Starting package %s" % name) try: @@ -1570,7 +1567,7 @@ def get_class(easyblock, log, name=None): modulepath = module_path_for_easyblock(name) # The following is a generic way to calculate unique class names for any funny package title - class_name = EBCLASSPREFIX + encode_string(name) + class_name = encode_class_name(name) # try and find easyblock easyblock_found = False diff --git a/easybuild/tools/filetools.py b/easybuild/tools/filetools.py index eb1ce3d1ab..25ed064f64 100644 --- a/easybuild/tools/filetools.py +++ b/easybuild/tools/filetools.py @@ -723,8 +723,9 @@ def encode_string(name): """ This encoding function handles funky package names ad infinitum, like: - example: '0_foo+0x0x#-$__' - becomes: '0_underscore_foo_plus_0x0x_hash__minus__dollar__underscore__underscore_' + example: '0_foo+0x0x#-$__' + becomes: '0_underscore_foo_plus_0x0x_hash__minus__dollar__underscore__underscore_' + The intention is to have a robust escaping mechanism for names like c++, C# et al It has been inspired by the concepts seen at, but in lowercase style: * http://fossies.org/dox/netcdf-4.2.1.1/escapes_8c_source.html @@ -774,7 +775,10 @@ def encode_string(name): '~': "_tilde_" } - # do the remapping and do return same char by default + # do the character remapping, return same char by default result = ''.join(map(lambda x: charmap.get(x, x), name)) return result +def encode_class_name(name): + return "EB_" + encode_string(name) + From df03518fe2a16538dccbbf927919349ab6575503 Mon Sep 17 00:00:00 2001 From: Fotis Georgatos Date: Sun, 19 Aug 2012 00:59:12 +0200 Subject: [PATCH 748/798] converted eb_ to EB_ prefixed everywhere Signed-off-by: Fotis Georgatos --- easybuild/easyblocks/a/atlas.py | 2 +- easybuild/easyblocks/b/binary.py | 2 +- easybuild/easyblocks/b/blacs.py | 2 +- easybuild/easyblocks/c/cp2k.py | 2 +- easybuild/easyblocks/c/cplex.py | 2 +- easybuild/easyblocks/d/doxygen.py | 2 +- easybuild/easyblocks/f/fsl.py | 2 +- easybuild/easyblocks/g/g2clib.py | 2 +- easybuild/easyblocks/g/g2lib.py | 2 +- easybuild/easyblocks/g/gcc.py | 2 +- easybuild/easyblocks/h/hdf5.py | 2 +- easybuild/easyblocks/h/hpl.py | 2 +- easybuild/easyblocks/i/icc.py | 2 +- easybuild/easyblocks/i/ifort.py | 2 +- easybuild/easyblocks/i/imkl.py | 2 +- easybuild/easyblocks/i/impi.py | 2 +- easybuild/easyblocks/i/intelbase.py | 2 +- easybuild/easyblocks/i/ipp.py | 2 +- easybuild/easyblocks/i/itac.py | 2 +- easybuild/easyblocks/l/lapack.py | 2 +- easybuild/easyblocks/l/libsmm.py | 2 +- easybuild/easyblocks/m/maple.py | 2 +- easybuild/easyblocks/m/mrbayes.py | 2 +- easybuild/easyblocks/m/mvapich2.py | 2 +- easybuild/easyblocks/n/ncl.py | 2 +- easybuild/easyblocks/n/netcdf.py | 2 +- easybuild/easyblocks/n/netcdf_fortran.py | 2 +- easybuild/easyblocks/o/openfoam.py | 2 +- easybuild/easyblocks/p/packedbinary.py | 2 +- easybuild/easyblocks/p/pasha.py | 2 +- easybuild/easyblocks/p/python.py | 28 ++++++++++++------------ easybuild/easyblocks/s/scalapack.py | 2 +- easybuild/easyblocks/t/tarball.py | 2 +- easybuild/easyblocks/t/tbb.py | 2 +- easybuild/easyblocks/t/toolkit.py | 2 +- easybuild/easyblocks/w/wps.py | 2 +- easybuild/easyblocks/w/wrf.py | 2 +- 37 files changed, 50 insertions(+), 50 deletions(-) diff --git a/easybuild/easyblocks/a/atlas.py b/easybuild/easyblocks/a/atlas.py index 95ddea11dc..d4235a35fd 100644 --- a/easybuild/easyblocks/a/atlas.py +++ b/easybuild/easyblocks/a/atlas.py @@ -35,7 +35,7 @@ from easybuild.tools.modules import get_software_root -class eb_ATLAS(Application): +class EB_ATLAS(Application): """ Support for building ATLAS - configure (and check if it failed due to CPU throttling being enabled) diff --git a/easybuild/easyblocks/b/binary.py b/easybuild/easyblocks/b/binary.py index 3786119c0c..32936246ad 100644 --- a/easybuild/easyblocks/b/binary.py +++ b/easybuild/easyblocks/b/binary.py @@ -33,7 +33,7 @@ from easybuild.framework.application import Application -class eb_Binary(Application): +class EB_Binary(Application): """Support for installing a binary package. Just copy it's sources to the installdir""" diff --git a/easybuild/easyblocks/b/blacs.py b/easybuild/easyblocks/b/blacs.py index 509b26ad5b..fd69355078 100644 --- a/easybuild/easyblocks/b/blacs.py +++ b/easybuild/easyblocks/b/blacs.py @@ -50,7 +50,7 @@ def det_interface(log, path): log.error("Failed to determine interface, output for xintface: %s" % out) -class eb_BLACS(Application): +class EB_BLACS(Application): """ Support for building/installing BLACS - configure: symlink BMAKES/Bmake.MPI-LINUX to Bmake.inc diff --git a/easybuild/easyblocks/c/cp2k.py b/easybuild/easyblocks/c/cp2k.py index 9aeef14b2e..b82d572e91 100644 --- a/easybuild/easyblocks/c/cp2k.py +++ b/easybuild/easyblocks/c/cp2k.py @@ -41,7 +41,7 @@ from easybuild.tools.modules import get_software_root, get_software_version -class eb_CP2K(Application): +class EB_CP2K(Application): """ Support for building CP2K - prepare module include files if required diff --git a/easybuild/easyblocks/c/cplex.py b/easybuild/easyblocks/c/cplex.py index 3743e168f2..bba69a2174 100644 --- a/easybuild/easyblocks/c/cplex.py +++ b/easybuild/easyblocks/c/cplex.py @@ -30,7 +30,7 @@ from easybuild.tools.filetools import run_cmd_qa -class eb_CPLEX(Binary): +class EB_CPLEX(Binary): """ Support for installing CPLEX. Version 12.2 has a self-extracting package with a Java installer diff --git a/easybuild/easyblocks/d/doxygen.py b/easybuild/easyblocks/d/doxygen.py index 67cdfd62f5..e9d7790c3b 100644 --- a/easybuild/easyblocks/d/doxygen.py +++ b/easybuild/easyblocks/d/doxygen.py @@ -30,7 +30,7 @@ from easybuild.tools.filetools import run_cmd -class eb_Doxygen(Application): +class EB_Doxygen(Application): """Support for building/installing Doxygen""" def configure(self): diff --git a/easybuild/easyblocks/f/fsl.py b/easybuild/easyblocks/f/fsl.py index 5dd56ea3e9..f6c51bfefe 100644 --- a/easybuild/easyblocks/f/fsl.py +++ b/easybuild/easyblocks/f/fsl.py @@ -32,7 +32,7 @@ from easybuild.tools.filetools import run_cmd -class eb_FSL(Application): +class EB_FSL(Application): """Support for building and installing FSL.""" def __init__(self,*args,**kwargs): diff --git a/easybuild/easyblocks/g/g2clib.py b/easybuild/easyblocks/g/g2clib.py index 4005c98a15..6b5b53cd7c 100644 --- a/easybuild/easyblocks/g/g2clib.py +++ b/easybuild/easyblocks/g/g2clib.py @@ -34,7 +34,7 @@ from easybuild.tools.modules import get_software_root -class eb_g2clib(Application): +class EB_g2clib(Application): """Support for building g2clib GRIB2 C library.""" def configure(self): diff --git a/easybuild/easyblocks/g/g2lib.py b/easybuild/easyblocks/g/g2lib.py index 2d0e00bfe4..51ce554160 100644 --- a/easybuild/easyblocks/g/g2lib.py +++ b/easybuild/easyblocks/g/g2lib.py @@ -33,7 +33,7 @@ from easybuild.tools.modules import get_software_root -class eb_g2lib(Application): +class EB_g2lib(Application): """Support for building g2clib GRIB2 library.""" def configure(self): diff --git a/easybuild/easyblocks/g/gcc.py b/easybuild/easyblocks/g/gcc.py index d895c61cb4..dfdbaabae9 100644 --- a/easybuild/easyblocks/g/gcc.py +++ b/easybuild/easyblocks/g/gcc.py @@ -41,7 +41,7 @@ from easybuild.tools.systemtools import get_kernel_name, get_shared_lib_ext, get_platform_name -class eb_GCC(Application): +class EB_GCC(Application): """ Self-contained build of GCC. Uses system compiler for initial build, then bootstraps. diff --git a/easybuild/easyblocks/h/hdf5.py b/easybuild/easyblocks/h/hdf5.py index 302810c0bc..64a970b3a9 100644 --- a/easybuild/easyblocks/h/hdf5.py +++ b/easybuild/easyblocks/h/hdf5.py @@ -32,7 +32,7 @@ from easybuild.tools.modules import get_software_root -class eb_HDF5(Application): +class EB_HDF5(Application): """Support for building/installing HDF5""" def configure(self): diff --git a/easybuild/easyblocks/h/hpl.py b/easybuild/easyblocks/h/hpl.py index 01879ad2d6..152a932ab8 100644 --- a/easybuild/easyblocks/h/hpl.py +++ b/easybuild/easyblocks/h/hpl.py @@ -33,7 +33,7 @@ from easybuild.tools.filetools import run_cmd -class eb_HPL(Application): +class EB_HPL(Application): """ Support for building HPL (High Performance Linpack) - create Make.UNKNOWN diff --git a/easybuild/easyblocks/i/icc.py b/easybuild/easyblocks/i/icc.py index e1a2fd4714..467a46babb 100644 --- a/easybuild/easyblocks/i/icc.py +++ b/easybuild/easyblocks/i/icc.py @@ -32,7 +32,7 @@ from easybuild.easyblocks.i.intelbase import IntelBase -class eb_icc(IntelBase): +class EB_icc(IntelBase): """Support for installing icc - tested with 11.1.046 diff --git a/easybuild/easyblocks/i/ifort.py b/easybuild/easyblocks/i/ifort.py index c88585c00e..dd89307d87 100644 --- a/easybuild/easyblocks/i/ifort.py +++ b/easybuild/easyblocks/i/ifort.py @@ -31,7 +31,7 @@ from easybuild.easyblocks.i.icc import Icc, IntelBase -class eb_ifort(Icc): +class EB_ifort(Icc): """ Class that can be used to install ifort - tested with 11.1.046 diff --git a/easybuild/easyblocks/i/imkl.py b/easybuild/easyblocks/i/imkl.py index 166cd71930..1098448115 100644 --- a/easybuild/easyblocks/i/imkl.py +++ b/easybuild/easyblocks/i/imkl.py @@ -39,7 +39,7 @@ from easybuild.tools.modules import Modules -class eb_imkl(IntelBase): +class EB_imkl(IntelBase): """ Class that can be used to install mkl - tested with 10.2.1.017 diff --git a/easybuild/easyblocks/i/impi.py b/easybuild/easyblocks/i/impi.py index 5b381f7876..b3dd7f498d 100644 --- a/easybuild/easyblocks/i/impi.py +++ b/easybuild/easyblocks/i/impi.py @@ -33,7 +33,7 @@ from easybuild.tools.filetools import run_cmd -class eb_impi(IntelBase): +class EB_impi(IntelBase): """ Support for installing Intel MPI library """ diff --git a/easybuild/easyblocks/i/intelbase.py b/easybuild/easyblocks/i/intelbase.py index 2f4b509ec0..bc83bdc046 100644 --- a/easybuild/easyblocks/i/intelbase.py +++ b/easybuild/easyblocks/i/intelbase.py @@ -35,7 +35,7 @@ from easybuild.tools.filetools import run_cmd -class eb_intelBase(Application): +class EB_intelBase(Application): """ Base class for Intel software - no configure/make : binary release diff --git a/easybuild/easyblocks/i/ipp.py b/easybuild/easyblocks/i/ipp.py index 5e5df4bf59..f931be3343 100644 --- a/easybuild/easyblocks/i/ipp.py +++ b/easybuild/easyblocks/i/ipp.py @@ -29,7 +29,7 @@ from easybuild.easyblocks.i.intelbase import IntelBase -class eb_ipp(IntelBase): +class EB_ipp(IntelBase): def sanitycheck(self): diff --git a/easybuild/easyblocks/i/itac.py b/easybuild/easyblocks/i/itac.py index 3e7b1f34b1..052e3547f8 100644 --- a/easybuild/easyblocks/i/itac.py +++ b/easybuild/easyblocks/i/itac.py @@ -33,7 +33,7 @@ from easybuild.tools.filetools import run_cmd -class eb_itac(IntelBase): +class EB_itac(IntelBase): """ Class that can be used to install itac - tested with Intel Trace Analyzer and Collector 7.2.1.008 diff --git a/easybuild/easyblocks/l/lapack.py b/easybuild/easyblocks/l/lapack.py index d23746e2f2..efc3d56a01 100644 --- a/easybuild/easyblocks/l/lapack.py +++ b/easybuild/easyblocks/l/lapack.py @@ -61,7 +61,7 @@ def get_blas_lib(log): return blaslib -class eb_LAPACK(Application): +class EB_LAPACK(Application): """ Support for building LAPACK - read make.inc.example and replace BLAS line with configtops diff --git a/easybuild/easyblocks/l/libsmm.py b/easybuild/easyblocks/l/libsmm.py index 01bb2cee28..64468a044d 100644 --- a/easybuild/easyblocks/l/libsmm.py +++ b/easybuild/easyblocks/l/libsmm.py @@ -38,7 +38,7 @@ from easybuild.tools.modules import get_software_root, get_software_version -class eb_libsmm(Application): +class EB_libsmm(Application): """ Support for the CP2K small matrix library Notes: - build can take really really long, and no real rebuilding needed for each version diff --git a/easybuild/easyblocks/m/maple.py b/easybuild/easyblocks/m/maple.py index 6476842ae9..e09b4be15d 100644 --- a/easybuild/easyblocks/m/maple.py +++ b/easybuild/easyblocks/m/maple.py @@ -33,7 +33,7 @@ from easybuild.tools.filetools import run_cmd_qa -class eb_Maple(Application): +class EB_Maple(Application): """Support for installing Maple.""" def unpack_src(self): diff --git a/easybuild/easyblocks/m/mrbayes.py b/easybuild/easyblocks/m/mrbayes.py index cd2eac54c4..11cec923ac 100644 --- a/easybuild/easyblocks/m/mrbayes.py +++ b/easybuild/easyblocks/m/mrbayes.py @@ -36,7 +36,7 @@ from easybuild.tools.modules import get_software_root -class eb_MrBayes(Application): +class EB_MrBayes(Application): """Support for building/installing MrBayes.""" def configure(self): diff --git a/easybuild/easyblocks/m/mvapich2.py b/easybuild/easyblocks/m/mvapich2.py index 1ac2596f4f..fa00784bda 100644 --- a/easybuild/easyblocks/m/mvapich2.py +++ b/easybuild/easyblocks/m/mvapich2.py @@ -33,7 +33,7 @@ from easybuild.framework.easyconfig import CUSTOM -class eb_MVAPICH2(Application): +class EB_MVAPICH2(Application): """ Support for building the MVAPICH2 MPI library. - some compiler dependent configure options diff --git a/easybuild/easyblocks/n/ncl.py b/easybuild/easyblocks/n/ncl.py index 2ded66ba67..daaaa4105d 100644 --- a/easybuild/easyblocks/n/ncl.py +++ b/easybuild/easyblocks/n/ncl.py @@ -37,7 +37,7 @@ from easybuild.tools.modules import get_software_root, get_software_version -class eb_NCL(Application): +class EB_NCL(Application): """Support for building/installing NCL.""" def configure(self): diff --git a/easybuild/easyblocks/n/netcdf.py b/easybuild/easyblocks/n/netcdf.py index d8930242a2..f04089cec9 100644 --- a/easybuild/easyblocks/n/netcdf.py +++ b/easybuild/easyblocks/n/netcdf.py @@ -35,7 +35,7 @@ from easybuild.tools.modules import get_software_root, get_software_version -class eb_netCDF(Application): +class EB_netCDF(Application): """Support for building/installing netCDF""" def configure(self): diff --git a/easybuild/easyblocks/n/netcdf_fortran.py b/easybuild/easyblocks/n/netcdf_fortran.py index 2248450edb..10054015c0 100644 --- a/easybuild/easyblocks/n/netcdf_fortran.py +++ b/easybuild/easyblocks/n/netcdf_fortran.py @@ -33,7 +33,7 @@ from easybuild.framework.application import Application -class eb_netCDF_Fortran(Application): +class EB_netCDF_Fortran(Application): """Support for building/installing the netCDF-Fortran library""" def configure(self): diff --git a/easybuild/easyblocks/o/openfoam.py b/easybuild/easyblocks/o/openfoam.py index 03001c8777..c4ace2dce3 100644 --- a/easybuild/easyblocks/o/openfoam.py +++ b/easybuild/easyblocks/o/openfoam.py @@ -36,7 +36,7 @@ from easybuild.tools.modules import get_software_root -class eb_OpenFOAM(Application): +class EB_OpenFOAM(Application): """Support for building and installing OpenFOAM.""" def __init__(self,*args,**kwargs): diff --git a/easybuild/easyblocks/p/packedbinary.py b/easybuild/easyblocks/p/packedbinary.py index e583316eda..59f84d668b 100644 --- a/easybuild/easyblocks/p/packedbinary.py +++ b/easybuild/easyblocks/p/packedbinary.py @@ -27,7 +27,7 @@ from easybuild.easyblocks.b.binary import Binary -class eb_PackedBinary(Binary, Application): +class EB_PackedBinary(Binary, Application): """Support for installing a packed binary package. Just unpack its source in the installdir """ diff --git a/easybuild/easyblocks/p/pasha.py b/easybuild/easyblocks/p/pasha.py index 88f577bc8e..28583fabd2 100644 --- a/easybuild/easyblocks/p/pasha.py +++ b/easybuild/easyblocks/p/pasha.py @@ -29,7 +29,7 @@ from easybuild.tools.modules import get_software_root -class eb_Pasha(Application): +class EB_Pasha(Application): """Support for building and installing Pasha""" def configure(self): diff --git a/easybuild/easyblocks/p/python.py b/easybuild/easyblocks/p/python.py index 2232f5748e..709445145f 100644 --- a/easybuild/easyblocks/p/python.py +++ b/easybuild/easyblocks/p/python.py @@ -35,7 +35,7 @@ from easybuild.tools.modules import get_software_root -class eb_Python(Application): +class EB_Python(Application): """Support for building/installing Python - default configure/make/make install works fine @@ -51,10 +51,10 @@ def extra_packages_pre(self): """ We set some default configs here for packages included in python """ - #insert new packages by building them with eb_DefaultPythonPackage + #insert new packages by building them with EB_DefaultPythonPackage self.log.debug("setting extra packages options") - # use __name__ here, since this is the module where eb_DefaultPythonPackage is defined - self.setcfg('pkgdefaultclass', (__name__, "eb_DefaultPythonPackage")) + # use __name__ here, since this is the module where EB_DefaultPythonPackage is defined + self.setcfg('pkgdefaultclass', (__name__, "EB_DefaultPythonPackage")) self.setcfg('pkgfilter', ('python -c "import %(name)s"', "")) def make_install(self): @@ -71,7 +71,7 @@ def make_install(self): self.log.error("Failed to symlink %s to %s: %s" % err) -class eb_DefaultPythonPackage(ApplicationPackage): +class EB_DefaultPythonPackage(ApplicationPackage): """ Easyblock for python packages to be included in the python installation. """ @@ -189,10 +189,10 @@ def getcfg(self, *args, **kwargs): return self.mself.getcfg(*args, **kwargs) -class eb_nose(eb_DefaultPythonPackage): +class EB_nose(EB_DefaultPythonPackage): """nose package""" def __init__(self, mself, pkg, pkginstalldeps): - eb_DefaultPythonPackage.__init__(self, mself, pkg, pkginstalldeps) + EB_DefaultPythonPackage.__init__(self, mself, pkg, pkginstalldeps) # use extra unpack options to avoid problems like # 'tar: Ignoring unknown extended header keyword `SCHILY.nlink' @@ -200,8 +200,8 @@ def __init__(self, mself, pkg, pkginstalldeps): self.unpack_options = ' --pax-option="delete=SCHILY.*" --pax-option="delete=LIBARCHIVE.*" ' -class eb_FortranPythonPackage(eb_DefaultPythonPackage): - """Extends eb_DefaultPythonPackage to add a Fortran compiler to the make call""" +class EB_FortranPythonPackage(EB_DefaultPythonPackage): + """Extends EB_DefaultPythonPackage to add a Fortran compiler to the make call""" def make(self): comp_fam = self.toolkit().comp_family() @@ -227,11 +227,11 @@ def make(self): run_cmd(cmd, log_all=True, simple=True) -class eb_numpy(eb_FortranPythonPackage): +class EB_numpy(EB_FortranPythonPackage): """numpy package""" def __init__(self, mself, pkg, pkginstalldeps): - eb_FortranPythonPackage.__init__(self, mself, pkg, pkginstalldeps) + EB_FortranPythonPackage.__init__(self, mself, pkg, pkginstalldeps) self.pkgcfgs = mself.getcfg('pkgcfgs') if self.pkgcfgs.has_key('numpysitecfglibsubdirs'): @@ -302,7 +302,7 @@ def make_install(self): """Install numpy package We remove the numpy build dir here, so scipy doesn't find it by accident """ - eb_FortranPythonPackage.make_install(self) + EB_FortranPythonPackage.make_install(self) builddir = os.path.join(self.builddir, "numpy") if os.path.isdir(builddir): shutil.rmtree(builddir) @@ -310,11 +310,11 @@ def make_install(self): self.log.debug("build dir %s already clean" % builddir) -class eb_scipy(eb_FortranPythonPackage): +class EB_scipy(EB_FortranPythonPackage): """scipy package""" def __init__(self, mself, pkg, pkginstalldeps): - eb_FortranPythonPackage.__init__(self, mself, pkg, pkginstalldeps) + EB_FortranPythonPackage.__init__(self, mself, pkg, pkginstalldeps) # disable testing test = False diff --git a/easybuild/easyblocks/s/scalapack.py b/easybuild/easyblocks/s/scalapack.py index 1f6eed2342..1b1ccc601d 100644 --- a/easybuild/easyblocks/s/scalapack.py +++ b/easybuild/easyblocks/s/scalapack.py @@ -37,7 +37,7 @@ from easybuild.tools.modules import get_software_root -class eb_ScaLAPACK(Application): +class EB_ScaLAPACK(Application): """ Support for building and installing ScaLAPACK, both versions 1.x and 2.x """ diff --git a/easybuild/easyblocks/t/tarball.py b/easybuild/easyblocks/t/tarball.py index 2f1e3a03f4..31ba7f8440 100644 --- a/easybuild/easyblocks/t/tarball.py +++ b/easybuild/easyblocks/t/tarball.py @@ -32,7 +32,7 @@ from easybuild.framework.application import Application -class eb_Tarball(Application): +class EB_Tarball(Application): """ Precompiled software packaged as tarball: - will unpack binary and copy it to the install dir diff --git a/easybuild/easyblocks/t/tbb.py b/easybuild/easyblocks/t/tbb.py index f64daca652..a4a439b455 100644 --- a/easybuild/easyblocks/t/tbb.py +++ b/easybuild/easyblocks/t/tbb.py @@ -33,7 +33,7 @@ from easybuild.easyblocks.i.intelbase import IntelBase -class eb_tbb(IntelBase): +class EB_tbb(IntelBase): """EasyBlock for tbb, threading building blocks""" def make_install(self): diff --git a/easybuild/easyblocks/t/toolkit.py b/easybuild/easyblocks/t/toolkit.py index 207d99a8bf..822c6b1193 100644 --- a/easybuild/easyblocks/t/toolkit.py +++ b/easybuild/easyblocks/t/toolkit.py @@ -29,7 +29,7 @@ from easybuild.framework.application import Application -class eb_Toolkit(Application): +class EB_Toolkit(Application): """ Compiler toolkit: generate module file only, nothing to make/install """ diff --git a/easybuild/easyblocks/w/wps.py b/easybuild/easyblocks/w/wps.py index 257931ed6f..e2eb7a9b42 100644 --- a/easybuild/easyblocks/w/wps.py +++ b/easybuild/easyblocks/w/wps.py @@ -43,7 +43,7 @@ from easybuild.tools.modules import get_software_root, get_software_version -class eb_WPS(Application): +class EB_WPS(Application): """Support for building/installing WPS.""" def __init__(self, *args, **kwargs): diff --git a/easybuild/easyblocks/w/wrf.py b/easybuild/easyblocks/w/wrf.py index f21197d289..8e083ae789 100644 --- a/easybuild/easyblocks/w/wrf.py +++ b/easybuild/easyblocks/w/wrf.py @@ -40,7 +40,7 @@ from easybuild.tools.modules import get_software_root -class eb_WRF(Application): +class EB_WRF(Application): """Support for building/installing WRF.""" def __init__(self,*args,**kwargs): From a4afac2b10bc214aadfa9c52323259545b293d65 Mon Sep 17 00:00:00 2001 From: Kenneth Hoste Date: Sun, 19 Aug 2012 01:32:40 +0200 Subject: [PATCH 749/798] add Hypre as dependency for PETSc; it's required to run the DOLFIN demos --- .../Hypre/Hypre-2.8.0b-goalf-1.1.0-no-OFED.eb | 18 ++++++++++++++++++ .../h/Hypre/Hypre-2.8.0b-ictce-4.0.6.eb | 18 ++++++++++++++++++ ...-3.3-p2-goalf-1.1.0-no-OFED-Python-2.7.3.eb | 1 + .../PETSc-3.3-p2-ictce-4.0.6-Python-2.7.3.eb | 1 + 4 files changed, 38 insertions(+) create mode 100644 easybuild/easyconfigs/h/Hypre/Hypre-2.8.0b-goalf-1.1.0-no-OFED.eb create mode 100644 easybuild/easyconfigs/h/Hypre/Hypre-2.8.0b-ictce-4.0.6.eb diff --git a/easybuild/easyconfigs/h/Hypre/Hypre-2.8.0b-goalf-1.1.0-no-OFED.eb b/easybuild/easyconfigs/h/Hypre/Hypre-2.8.0b-goalf-1.1.0-no-OFED.eb new file mode 100644 index 0000000000..e37a1c8181 --- /dev/null +++ b/easybuild/easyconfigs/h/Hypre/Hypre-2.8.0b-goalf-1.1.0-no-OFED.eb @@ -0,0 +1,18 @@ +name = "Hypre" +version = "2.8.0b" + +homepage = "" +description = "" + +toolkit = {'name': 'goalf', 'version': '1.1.0-no-OFED'} +toolkitopts = {'pic': True} + +sourceURLs = ["https://computation.llnl.gov/casc/hypre/download/"] +sources = ["%s-%s.tar.gz" % (name.lower(), version)] + +startfrom = "src" + +sanityCheckPaths = { + 'files': ['lib/libHYPRE.a'], + 'dirs': ['include'] + } \ No newline at end of file diff --git a/easybuild/easyconfigs/h/Hypre/Hypre-2.8.0b-ictce-4.0.6.eb b/easybuild/easyconfigs/h/Hypre/Hypre-2.8.0b-ictce-4.0.6.eb new file mode 100644 index 0000000000..e37a1c8181 --- /dev/null +++ b/easybuild/easyconfigs/h/Hypre/Hypre-2.8.0b-ictce-4.0.6.eb @@ -0,0 +1,18 @@ +name = "Hypre" +version = "2.8.0b" + +homepage = "" +description = "" + +toolkit = {'name': 'goalf', 'version': '1.1.0-no-OFED'} +toolkitopts = {'pic': True} + +sourceURLs = ["https://computation.llnl.gov/casc/hypre/download/"] +sources = ["%s-%s.tar.gz" % (name.lower(), version)] + +startfrom = "src" + +sanityCheckPaths = { + 'files': ['lib/libHYPRE.a'], + 'dirs': ['include'] + } \ No newline at end of file diff --git a/easybuild/easyconfigs/p/PETSc/PETSc-3.3-p2-goalf-1.1.0-no-OFED-Python-2.7.3.eb b/easybuild/easyconfigs/p/PETSc/PETSc-3.3-p2-goalf-1.1.0-no-OFED-Python-2.7.3.eb index fac5d72171..159f3d9673 100644 --- a/easybuild/easyconfigs/p/PETSc/PETSc-3.3-p2-goalf-1.1.0-no-OFED-Python-2.7.3.eb +++ b/easybuild/easyconfigs/p/PETSc/PETSc-3.3-p2-goalf-1.1.0-no-OFED-Python-2.7.3.eb @@ -20,6 +20,7 @@ dependencies = [ ('ScientificPython', '2.8', versionsuffix), ('SCOTCH', '5.1.12b_esmumps'), ('SuiteSparse', '3.7.0', '-withparmetis'), # for CHOLMOD, UMFPACK + ('Hypre', '2.8.0b'), ] patches = ['fix.patch'] # ignore failed ranlib check on use of '-c' argument diff --git a/easybuild/easyconfigs/p/PETSc/PETSc-3.3-p2-ictce-4.0.6-Python-2.7.3.eb b/easybuild/easyconfigs/p/PETSc/PETSc-3.3-p2-ictce-4.0.6-Python-2.7.3.eb index a312705044..d2a3f4f023 100644 --- a/easybuild/easyconfigs/p/PETSc/PETSc-3.3-p2-ictce-4.0.6-Python-2.7.3.eb +++ b/easybuild/easyconfigs/p/PETSc/PETSc-3.3-p2-ictce-4.0.6-Python-2.7.3.eb @@ -20,6 +20,7 @@ dependencies = [ ('ScientificPython', '2.8', versionsuffix), ('SCOTCH', '5.1.12b_esmumps'), ('SuiteSparse', '3.7.0', '-withparmetis'), # for CHOLMOD, UMFPACK + ('Hypre', '2.8.0b'), ] patches = ['fix.patch'] # ignore failed ranlib check on use of '-c' argument From b9a189dc271f28fa6c2f8a1bb3ee51be41dd4b7d Mon Sep 17 00:00:00 2001 From: Fotis Georgatos Date: Sun, 19 Aug 2012 01:43:36 +0200 Subject: [PATCH 750/798] fixed docstrings to be ready for generated documentation Signed-off-by: Fotis Georgatos --- easybuild/tools/filetools.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/easybuild/tools/filetools.py b/easybuild/tools/filetools.py index 25ed064f64..cdbb98b6e7 100644 --- a/easybuild/tools/filetools.py +++ b/easybuild/tools/filetools.py @@ -721,7 +721,6 @@ def patch_perl_script_autoflush(path): def encode_string(name): """ - This encoding function handles funky package names ad infinitum, like: example: '0_foo+0x0x#-$__' becomes: '0_underscore_foo_plus_0x0x_hash__minus__dollar__underscore__underscore_' @@ -780,5 +779,6 @@ def encode_string(name): return result def encode_class_name(name): + """return encoded version of class name""" return "EB_" + encode_string(name) From 293753026b448736be1e401a82157fb1dea0a6fe Mon Sep 17 00:00:00 2001 From: Kenneth Hoste Date: Sun, 19 Aug 2012 02:08:31 +0200 Subject: [PATCH 751/798] follow new class naming scheme (see #86) --- easybuild/easyblocks/a/armadillo.py | 8 ++++---- easybuild/easyblocks/b/boost.py | 2 +- easybuild/easyblocks/b/bzip2.py | 5 ++--- easybuild/easyblocks/c/cgal.py | 8 ++++---- easybuild/easyblocks/c/cmake.py | 2 +- easybuild/easyblocks/c/cmakepythonpackage.py | 18 +++++++++--------- easybuild/easyblocks/c/cplex.py | 10 +++++----- easybuild/easyblocks/d/dolfin.py | 10 +++++----- easybuild/easyblocks/i/icc.py | 8 ++++---- easybuild/easyblocks/i/ifort.py | 4 ++-- easybuild/easyblocks/i/imkl.py | 14 +++++++------- easybuild/easyblocks/i/impi.py | 8 ++++---- easybuild/easyblocks/i/intelbase.py | 2 +- easybuild/easyblocks/i/ipp.py | 6 +++--- easybuild/easyblocks/i/itac.py | 12 ++++++------ easybuild/easyblocks/m/metis.py | 2 +- easybuild/easyblocks/m/mtl4.py | 10 +++++----- easybuild/easyblocks/p/packedbinary.py | 4 ++-- easybuild/easyblocks/p/parmetis.py | 2 +- easybuild/easyblocks/p/petsc.py | 2 +- easybuild/easyblocks/p/pythonpackage.py | 2 +- easybuild/easyblocks/s/scotch.py | 2 +- easybuild/easyblocks/s/slepc.py | 2 +- easybuild/easyblocks/s/suitesparse.py | 2 +- easybuild/easyblocks/s/swig.py | 4 ++-- easybuild/easyblocks/t/tbb.py | 10 +++++----- easybuild/easyblocks/t/trilinos.py | 12 ++++++------ easybuild/easyblocks/u/ufc.py | 8 ++++---- 28 files changed, 89 insertions(+), 90 deletions(-) diff --git a/easybuild/easyblocks/a/armadillo.py b/easybuild/easyblocks/a/armadillo.py index c706103b52..47e231d0a7 100644 --- a/easybuild/easyblocks/a/armadillo.py +++ b/easybuild/easyblocks/a/armadillo.py @@ -22,11 +22,11 @@ """ import os -from easybuild.easyblocks.c.cmake import CMake +from easybuild.easyblocks.c.cmake import EB_CMake from easybuild.tools.modules import get_software_root -class Armadillo(CMake): +class EB_Armadillo(EB_CMake): """Support for building Armadillo.""" def configure(self): @@ -43,7 +43,7 @@ def configure(self): self.updatecfg('configopts', '-DBLAS_LIBRARY:PATH="%s"' % os.getenv('LIBBLAS')) self.updatecfg('configopts', '-DLAPACK_LIBRARY:PATH="%s"' % os.getenv('LIBLAPACK')) - CMake.configure(self) + EB_CMake.configure(self) def sanitycheck(self): """Custom sanity check for Armadillo.""" @@ -57,4 +57,4 @@ def sanitycheck(self): self.log.info("Customized sanity check paths: %s" % self.getcfg('sanityCheckPaths')) - CMake.sanitycheck(self) \ No newline at end of file + EB_CMake.sanitycheck(self) diff --git a/easybuild/easyblocks/b/boost.py b/easybuild/easyblocks/b/boost.py index 282c54e8d8..878b743694 100644 --- a/easybuild/easyblocks/b/boost.py +++ b/easybuild/easyblocks/b/boost.py @@ -35,7 +35,7 @@ from easybuild.tools.modules import get_software_root -class Boost(Application): +class EB_Boost(Application): """Support for building Boost.""" def __init__(self, *args, **kwargs): diff --git a/easybuild/easyblocks/b/bzip2.py b/easybuild/easyblocks/b/bzip2.py index c1124bc2e0..42077df7bc 100644 --- a/easybuild/easyblocks/b/bzip2.py +++ b/easybuild/easyblocks/b/bzip2.py @@ -1,5 +1,4 @@ -## -# Copyright 2012 Kenneth Hoste +### Copyright 2012 Kenneth Hoste # Copyright 2012 Jens Timmerman # # This file is part of EasyBuild @@ -27,7 +26,7 @@ from easybuild.framework.application import Application -class Bzip2(Application): +class EB_bzip2(Application): """Support for building and installing bzip2.""" # no configure script diff --git a/easybuild/easyblocks/c/cgal.py b/easybuild/easyblocks/c/cgal.py index e900d55392..b3d539bc30 100644 --- a/easybuild/easyblocks/c/cgal.py +++ b/easybuild/easyblocks/c/cgal.py @@ -24,11 +24,11 @@ """ import os -from easybuild.easyblocks.c.cmake import CMake +from easybuild.easyblocks.c.cmake import EB_CMake from easybuild.tools.modules import get_software_root -class CGAL(CMake): +class EB_CGAL(EB_CMake): """Support for building CGAL.""" def configure(self): @@ -45,7 +45,7 @@ def configure(self): os.environ['BOOST_ROOT'] = get_software_root("Boost") - CMake.configure(self) + EB_CMake.configure(self) def sanitycheck(self): """Custom sanity check for CGAL.""" @@ -61,4 +61,4 @@ def sanitycheck(self): self.log.info("Customized sanity check paths: %s" % self.getcfg('sanityCheckPaths')) - CMake.sanitycheck(self) + EB_CMake.sanitycheck(self) diff --git a/easybuild/easyblocks/c/cmake.py b/easybuild/easyblocks/c/cmake.py index 9e44a3169a..c37a36a5ed 100644 --- a/easybuild/easyblocks/c/cmake.py +++ b/easybuild/easyblocks/c/cmake.py @@ -31,7 +31,7 @@ from easybuild.tools.filetools import run_cmd -class CMake(Application): +class EB_CMake(Application): """Support for configuring build with CMake instead of traditional configure script""" def configure(self, builddir=None): diff --git a/easybuild/easyblocks/c/cmakepythonpackage.py b/easybuild/easyblocks/c/cmakepythonpackage.py index 8308d9f44d..f19e63ef72 100644 --- a/easybuild/easyblocks/c/cmakepythonpackage.py +++ b/easybuild/easyblocks/c/cmakepythonpackage.py @@ -25,11 +25,11 @@ """ EasyBuild support for Python packages that are configured with CMake, implemented as an easyblock """ -from easybuild.easyblocks.c.cmake import CMake -from easybuild.easyblocks.p.pythonpackage import PythonPackage +from easybuild.easyblocks.c.cmake import EB_CMake +from easybuild.easyblocks.p.pythonpackage import EB_PythonPackage -class CMakePythonPackage(CMake, PythonPackage): +class EB_CMakePythonPackage(EB_CMake, EB_PythonPackage): """Build a Python package and module with cmake. Some packages use cmake to first build and install C Python packages @@ -43,23 +43,23 @@ class CMakePythonPackage(CMake, PythonPackage): def __init__(self, *args, **kwargs): """Initialize with PythonPackage.""" - PythonPackage.__init__(self, *args, **kwargs) + EB_PythonPackage.__init__(self, *args, **kwargs) def configure(self, *args, **kwargs): """Main configuration using cmake""" - PythonPackage.configure(self, *args, **kwargs) + EB_PythonPackage.configure(self, *args, **kwargs) - return CMake.configure(self, *args, **kwargs) + return EB_CMake.configure(self, *args, **kwargs) def make(self, *args, **kwargs): """Build Python package with cmake""" - return CMake.make(self, *args, **kwargs) + return EB_CMake.make(self, *args, **kwargs) def make_install(self): """Install with cmake install""" - return CMake.make_install(self) + return EB_CMake.make_install(self) def make_module_extra(self): """Add extra Python package module parameters""" - return PythonPackage.make_module_extra(self) + return EB_PythonPackage.make_module_extra(self) diff --git a/easybuild/easyblocks/c/cplex.py b/easybuild/easyblocks/c/cplex.py index 82206cd1b8..f9cd7dcc70 100644 --- a/easybuild/easyblocks/c/cplex.py +++ b/easybuild/easyblocks/c/cplex.py @@ -30,11 +30,11 @@ import stat import easybuild.tools.environment as env -from easybuild.easyblocks.b.binary import Binary +from easybuild.easyblocks.b.binary import EB_Binary from easybuild.tools.filetools import run_cmd_qa -class EB_CPLEX(Binary): +class EB_CPLEX(EB_Binary): """ Support for installing CPLEX. Version 12.2 has a self-extracting package with a Java installer @@ -43,7 +43,7 @@ class EB_CPLEX(Binary): def __init__(self, *args, **kwargs): """Initialize CPLEX-specific variables.""" - Binary.__init__(self, *args, **kwargs) + EB_Binary.__init__(self, *args, **kwargs) self.bindir = None def make_install(self): @@ -99,7 +99,7 @@ def make_install(self): def make_module_extra(self): """Add installdir to path and set CPLEX_HOME""" - txt = Binary.make_module_extra(self) + txt = EB_Binary.make_module_extra(self) txt += self.moduleGenerator.prependPaths("PATH", [self.bindir]) txt += self.moduleGenerator.setEnvironment("CPLEX_HOME", "$root/cplex") self.log.debug("make_module_extra added %s" % txt) @@ -116,4 +116,4 @@ def sanitycheck(self): self.log.info("Customized sanity check paths: %s" % self.getcfg('sanityCheckPaths')) - Binary.sanitycheck(self) + EB_Binary.sanitycheck(self) diff --git a/easybuild/easyblocks/d/dolfin.py b/easybuild/easyblocks/d/dolfin.py index 7a60aaf11f..404a74e961 100644 --- a/easybuild/easyblocks/d/dolfin.py +++ b/easybuild/easyblocks/d/dolfin.py @@ -26,11 +26,11 @@ import re import easybuild.tools.toolkit as toolkit -from easybuild.easyblocks.c.cmakepythonpackage import CMakePythonPackage +from easybuild.easyblocks.c.cmakepythonpackage import EB_CMakePythonPackage from easybuild.tools.modules import get_software_root, get_software_version -class DOLFIN(CMakePythonPackage): +class EB_DOLFIN(EB_CMakePythonPackage): """Support for building and installing DOLFIN.""" def configure(self): @@ -140,7 +140,7 @@ def configure(self): self.updatecfg('configopts', ' -DOpenMP_C_FLAGS="%s"' % openmp) # configure - out = CMakePythonPackage.configure(self) + out = EB_CMakePythonPackage.configure(self) # make sure that all optional packages are found not_found_re = re.compile("The following optional packages could not be found") @@ -150,7 +150,7 @@ def configure(self): def make_module_extra(self): """Set extra environment variables for DOLFIN.""" - txt = CMakePythonPackage.make_module_extra(self) + txt = EB_CMakePythonPackage.make_module_extra(self) # Dolfin needs to find Boost and the UFC pkgconfig file txt += self.moduleGenerator.setEnvironment('BOOST_DIR', get_software_root('Boost')) @@ -204,4 +204,4 @@ def sanitycheck(self): # join all commands into one large single sanity check command self.setcfg('sanityCheckCommand', (" && ".join(cmds), "")) - CMakePythonPackage.sanitycheck(self) + EB_CMakePythonPackage.sanitycheck(self) diff --git a/easybuild/easyblocks/i/icc.py b/easybuild/easyblocks/i/icc.py index 467a46babb..7976b2c171 100644 --- a/easybuild/easyblocks/i/icc.py +++ b/easybuild/easyblocks/i/icc.py @@ -29,10 +29,10 @@ import os from distutils.version import LooseVersion -from easybuild.easyblocks.i.intelbase import IntelBase +from easybuild.easyblocks.i.intelbase import EB_IntelBase -class EB_icc(IntelBase): +class EB_icc(EB_IntelBase): """Support for installing icc - tested with 11.1.046 @@ -57,7 +57,7 @@ def sanitycheck(self): self.log.info("Customized sanity check paths: %s" % self.getcfg('sanityCheckPaths')) - IntelBase.sanitycheck(self) + EB_IntelBase.sanitycheck(self) def make_module_req_guess(self): """Customize paths to check and add in environment. @@ -114,7 +114,7 @@ def make_module_req_guess(self): def make_module_extra(self): """Add extra environment variables for icc, for license file and NLS path.""" - txt = IntelBase.make_module_extra(self) + txt = EB_IntelBase.make_module_extra(self) txt += "prepend-path\t%s\t\t%s\n" % ('INTEL_LICENSE_FILE', self.license) txt += "prepend-path\t%s\t\t$root/%s\n" % ('NLSPATH', 'idb/intel64/locale/%l_%t/%N') diff --git a/easybuild/easyblocks/i/ifort.py b/easybuild/easyblocks/i/ifort.py index dd89307d87..5e6e6eac75 100644 --- a/easybuild/easyblocks/i/ifort.py +++ b/easybuild/easyblocks/i/ifort.py @@ -28,7 +28,7 @@ from distutils.version import LooseVersion -from easybuild.easyblocks.i.icc import Icc, IntelBase +from easybuild.easyblocks.i.icc import Icc, EB_IntelBase class EB_ifort(Icc): @@ -57,4 +57,4 @@ def sanitycheck(self): self.log.info("Customized sanity check paths: %s" % self.getcfg('sanityCheckPaths')) - IntelBase.sanitycheck(self) + EB_IntelBase.sanitycheck(self) diff --git a/easybuild/easyblocks/i/imkl.py b/easybuild/easyblocks/i/imkl.py index 7797dc0989..9e06aad511 100644 --- a/easybuild/easyblocks/i/imkl.py +++ b/easybuild/easyblocks/i/imkl.py @@ -33,13 +33,13 @@ import easybuild.tools.environment as env import easybuild.tools.toolkit as toolkit -from easybuild.easyblocks.i.intelbase import IntelBase +from easybuild.easyblocks.i.intelbase import EB_IntelBase from easybuild.framework.easyconfig import CUSTOM from easybuild.tools.filetools import run_cmd from easybuild.tools.modules import Modules -class EB_imkl(IntelBase): +class EB_imkl(EB_IntelBase): """ Class that can be used to install mkl - tested with 10.2.1.017 @@ -48,16 +48,16 @@ class EB_imkl(IntelBase): def __init__(self, *args, **kwargs): """Constructor, adds extra config options""" - IntelBase.__init__(self, *args, **kwargs) + EB_IntelBase.__init__(self, *args, **kwargs) @staticmethod def extra_options(): extra_vars = [('interfaces', [True, "Indicates whether interfaces should be built (default: True)", CUSTOM])] - return IntelBase.extra_options(extra_vars) + return EB_IntelBase.extra_options(extra_vars) def configure(self): - IntelBase.configure(self) + EB_IntelBase.configure(self) if os.getenv('MKLROOT'): self.log.error("Found MKLROOT in current environment, which may cause problems...") @@ -100,7 +100,7 @@ def make_module_req_guess(self): def make_module_extra(self): """Overwritten from Application to add extra txt""" - txt = IntelBase.make_module_extra(self) + txt = EB_IntelBase.make_module_extra(self) txt += "prepend-path\t%s\t\t%s\n" % ('INTEL_LICENSE_FILE', self.license) if self.getcfg('m32'): txt += "prepend-path\t%s\t\t$root/%s\n" % ('NLSPATH', 'idb/32/locale/%l_%t/%N') @@ -381,4 +381,4 @@ def sanitycheck(self): self.log.info("Customized sanity check paths: %s" % self.getcfg('sanityCheckPaths')) - IntelBase.sanitycheck(self) + EB_IntelBase.sanitycheck(self) diff --git a/easybuild/easyblocks/i/impi.py b/easybuild/easyblocks/i/impi.py index b3dd7f498d..da63992a98 100644 --- a/easybuild/easyblocks/i/impi.py +++ b/easybuild/easyblocks/i/impi.py @@ -29,11 +29,11 @@ import os from distutils.version import LooseVersion -from easybuild.easyblocks.i.intelbase import IntelBase +from easybuild.easyblocks.i.intelbase import EB_IntelBase from easybuild.tools.filetools import run_cmd -class EB_impi(IntelBase): +class EB_impi(EB_IntelBase): """ Support for installing Intel MPI library """ @@ -46,7 +46,7 @@ def make_install(self): """ if LooseVersion(self.version()) >= LooseVersion('4.0.1'): #impi starting from version 4.0.1.x uses standard installation procedure. - IntelBase.make_install(self) + EB_IntelBase.make_install(self) return None else: #impi up until version 4.0.0.x uses custom installation procedure. @@ -108,7 +108,7 @@ def make_module_req_guess(self): def make_module_extra(self): """Overwritten from Application to add extra txt""" - txt = IntelBase.make_module_extra(self) + txt = EB_IntelBase.make_module_extra(self) txt += "prepend-path\t%s\t\t%s\n" % ('INTEL_LICENSE_FILE', self.license) txt += "setenv\t%s\t\t$root\n" % ('I_MPI_ROOT') diff --git a/easybuild/easyblocks/i/intelbase.py b/easybuild/easyblocks/i/intelbase.py index bc83bdc046..2b9f98a228 100644 --- a/easybuild/easyblocks/i/intelbase.py +++ b/easybuild/easyblocks/i/intelbase.py @@ -35,7 +35,7 @@ from easybuild.tools.filetools import run_cmd -class EB_intelBase(Application): +class EB_IntelBase(Application): """ Base class for Intel software - no configure/make : binary release diff --git a/easybuild/easyblocks/i/ipp.py b/easybuild/easyblocks/i/ipp.py index f931be3343..11b65c1f87 100644 --- a/easybuild/easyblocks/i/ipp.py +++ b/easybuild/easyblocks/i/ipp.py @@ -26,10 +26,10 @@ EasyBuild support for installing the Intel Performance Primitives (IPP) library, implemented as an easyblock """ -from easybuild.easyblocks.i.intelbase import IntelBase +from easybuild.easyblocks.i.intelbase import EB_IntelBase -class EB_ipp(IntelBase): +class EB_ipp(EB_IntelBase): def sanitycheck(self): @@ -45,4 +45,4 @@ def sanitycheck(self): self.log.info("Customized sanity check paths: %s" % self.getcfg('sanityCheckPaths')) - IntelBase.sanitycheck(self) + EB_IntelBase.sanitycheck(self) diff --git a/easybuild/easyblocks/i/itac.py b/easybuild/easyblocks/i/itac.py index 052e3547f8..d9240c5d7e 100644 --- a/easybuild/easyblocks/i/itac.py +++ b/easybuild/easyblocks/i/itac.py @@ -29,11 +29,11 @@ import os from easybuild.framework.easyconfig import CUSTOM -from easybuild.easyblocks.i.intelbase import IntelBase +from easybuild.easyblocks.i.intelbase import EB_IntelBase from easybuild.tools.filetools import run_cmd -class EB_itac(IntelBase): +class EB_itac(EB_IntelBase): """ Class that can be used to install itac - tested with Intel Trace Analyzer and Collector 7.2.1.008 @@ -41,12 +41,12 @@ class EB_itac(IntelBase): def __init__(self, *args, **kwargs): """Constructor, adds extra config options""" - IntelBase.__init__(self, *args, **kwargs) + EB_IntelBase.__init__(self, *args, **kwargs) @staticmethod def extra_options(): extra_vars = [('preferredmpi', ['impi3', "Preferred MPI type (default: 'impi3')", CUSTOM])] - return IntelBase.extra_options(extra_vars) + return EB_IntelBase.extra_options(extra_vars) def make_install(self): """ @@ -109,8 +109,8 @@ def make_module_req_guess(self): return guesses def make_module_extra(self): - """Overwritten from IntelBase to add extra txt""" - txt = IntelBase.make_module_extra(self) + """Overwritten from EB_IntelBase to add extra txt""" + txt = EB_IntelBase.make_module_extra(self) txt += "prepend-path\t%s\t\t%s\n" % ('INTEL_LICENSE_FILE', self.license) txt += "setenv\t%s\t\t$root\n" % 'VT_ROOT' txt += "setenv\t%s\t\t%s\n" % ('VT_MPI', self.getcfg('preferredmpi')) diff --git a/easybuild/easyblocks/m/metis.py b/easybuild/easyblocks/m/metis.py index 84bceee383..b3f4f62ed2 100644 --- a/easybuild/easyblocks/m/metis.py +++ b/easybuild/easyblocks/m/metis.py @@ -33,7 +33,7 @@ from easybuild.tools.filetools import run_cmd, mkdir -class METIS(Application): +class EB_METIS(Application): """Support for building and installing METIS.""" def configure(self, *args, **kwargs): diff --git a/easybuild/easyblocks/m/mtl4.py b/easybuild/easyblocks/m/mtl4.py index 422e470565..224850df78 100644 --- a/easybuild/easyblocks/m/mtl4.py +++ b/easybuild/easyblocks/m/mtl4.py @@ -22,10 +22,10 @@ """ import os -from easybuild.easyblocks.t.tarball import Tarball +from easybuild.easyblocks.t.tarball import EB_Tarball -class MTL4(Tarball): +class EB_MTL4(EB_Tarball): """Support for installing MTL4.""" def sanitycheck(self): @@ -45,12 +45,12 @@ def sanitycheck(self): self.log.info("Customized sanity check paths: %s" % self.getcfg('sanityCheckPaths')) - Tarball.sanitycheck(self) + EB_Tarball.sanitycheck(self) def make_module_req_guess(self): """Adjust CPATH for MTL4.""" - guesses = Tarball.make_module_req_guess(self) + guesses = EB_Tarball.make_module_req_guess(self) guesses.update({'CPATH': 'include'}) - return guesses \ No newline at end of file + return guesses diff --git a/easybuild/easyblocks/p/packedbinary.py b/easybuild/easyblocks/p/packedbinary.py index 78aa23b90d..ceb985275f 100644 --- a/easybuild/easyblocks/p/packedbinary.py +++ b/easybuild/easyblocks/p/packedbinary.py @@ -24,10 +24,10 @@ """ from easybuild.framework.application import Application -from easybuild.easyblocks.b.binary import Binary +from easybuild.easyblocks.b.binary import EB_Binary -class EB_PackedBinary(Binary, Application): +class EB_PackedBinary(EB_Binary, Application): """Support for installing a packed binary package. Just unpack its source in the installdir """ diff --git a/easybuild/easyblocks/p/parmetis.py b/easybuild/easyblocks/p/parmetis.py index ccc88683c5..fc26aadc1e 100644 --- a/easybuild/easyblocks/p/parmetis.py +++ b/easybuild/easyblocks/p/parmetis.py @@ -33,7 +33,7 @@ from easybuild.tools.filetools import run_cmd, mkdir -class ParMETIS(Application): +class EB_ParMETIS(Application): """Support for building and installing ParMETIS.""" def configure(self): diff --git a/easybuild/easyblocks/p/petsc.py b/easybuild/easyblocks/p/petsc.py index 7c401341f6..17e2d2819b 100644 --- a/easybuild/easyblocks/p/petsc.py +++ b/easybuild/easyblocks/p/petsc.py @@ -34,7 +34,7 @@ from easybuild.tools.systemtools import get_shared_lib_ext -class PETSc(Application): +class EB_PETSc(Application): """Support for building and installing PETSc""" def __init__(self, *args, **kwargs): diff --git a/easybuild/easyblocks/p/pythonpackage.py b/easybuild/easyblocks/p/pythonpackage.py index 58e78550a4..ee812db167 100644 --- a/easybuild/easyblocks/p/pythonpackage.py +++ b/easybuild/easyblocks/p/pythonpackage.py @@ -33,7 +33,7 @@ from easybuild.tools.modules import get_software_version -class PythonPackage(Application): +class EB_PythonPackage(Application): """Builds and installs a Python package, and provides a dedicated module file.""" def __init__(self, *args, **kwargs): diff --git a/easybuild/easyblocks/s/scotch.py b/easybuild/easyblocks/s/scotch.py index 6ecc87fb28..7229391859 100644 --- a/easybuild/easyblocks/s/scotch.py +++ b/easybuild/easyblocks/s/scotch.py @@ -36,7 +36,7 @@ from easybuild.tools.filetools import run_cmd, copytree -class SCOTCH(Application): +class EB_SCOTCH(Application): """Support for building/installing SCOTCH.""" def configure(self): diff --git a/easybuild/easyblocks/s/slepc.py b/easybuild/easyblocks/s/slepc.py index df130004b0..31f3763928 100644 --- a/easybuild/easyblocks/s/slepc.py +++ b/easybuild/easyblocks/s/slepc.py @@ -32,7 +32,7 @@ from easybuild.tools.modules import get_software_root -class SLEPc(Application): +class EB_SLEPc(Application): """Support for building and installing SLEPc""" def __init__(self, *args, **kwargs): diff --git a/easybuild/easyblocks/s/suitesparse.py b/easybuild/easyblocks/s/suitesparse.py index 4b45b0bf41..1b7e1c8652 100644 --- a/easybuild/easyblocks/s/suitesparse.py +++ b/easybuild/easyblocks/s/suitesparse.py @@ -36,7 +36,7 @@ from easybuild.tools.modules import get_software_root -class SuiteSparse(Application): +class EB_SuiteSparse(Application): """Support for building SuiteSparse.""" def configure(self): diff --git a/easybuild/easyblocks/s/swig.py b/easybuild/easyblocks/s/swig.py index 861c1a9143..7cc32e42f9 100644 --- a/easybuild/easyblocks/s/swig.py +++ b/easybuild/easyblocks/s/swig.py @@ -24,7 +24,7 @@ from easybuild.tools.modules import get_software_root -class SWIG(Application): +class EB_SWIG(Application): """Support for building SWIG.""" def configure(self): @@ -56,4 +56,4 @@ def sanitycheck(self): self.log.info("Customized sanity check paths: %s" % self.getcfg('sanityCheckPaths')) - Application.sanitycheck(self) \ No newline at end of file + Application.sanitycheck(self) diff --git a/easybuild/easyblocks/t/tbb.py b/easybuild/easyblocks/t/tbb.py index a4a439b455..cf7d3af2d0 100644 --- a/easybuild/easyblocks/t/tbb.py +++ b/easybuild/easyblocks/t/tbb.py @@ -30,15 +30,15 @@ import shutil import glob -from easybuild.easyblocks.i.intelbase import IntelBase +from easybuild.easyblocks.i.intelbase import EB_IntelBase -class EB_tbb(IntelBase): +class EB_tbb(EB_IntelBase): """EasyBlock for tbb, threading building blocks""" def make_install(self): """overwrite make_install to add extra symlinks""" - IntelBase.make_install(self) + EB_IntelBase.make_install(self) # save libdir os.chdir(self.installdir) @@ -68,12 +68,12 @@ def sanitycheck(self): self.log.info("Customized sanity check paths: %s" % self.getcfg('sanityCheckPaths')) - IntelBase.sanitycheck(self) + EB_IntelBase.sanitycheck(self) def make_module_extra(self): """Add correct path to lib to LD_LIBRARY_PATH. and intel license file""" - txt = IntelBase.make_module_extra(self) + txt = EB_IntelBase.make_module_extra(self) txt += "prepend-path\t%s\t\t%s\n" % ('LD_LIBRARY_PATH', self.libpath) return txt diff --git a/easybuild/easyblocks/t/trilinos.py b/easybuild/easyblocks/t/trilinos.py index 22d620240a..aa5c889528 100644 --- a/easybuild/easyblocks/t/trilinos.py +++ b/easybuild/easyblocks/t/trilinos.py @@ -24,12 +24,12 @@ import re import easybuild.tools.toolkit as toolkit -from easybuild.easyblocks.c.cmake import CMake +from easybuild.easyblocks.c.cmake import EB_CMake from easybuild.framework.easyconfig import CUSTOM from easybuild.tools.modules import get_software_root -class Trilinos(CMake): +class EB_Trilinos(EB_CMake): """Support for building Trilinos.""" # see http://trilinos.sandia.gov/Trilinos10CMakeQuickstart.txt @@ -43,7 +43,7 @@ def extra_options(): ('skip_pkgs', [[], "List of packages to skip (default: [])"], CUSTOM), ('verbose', [False, 'Configure for verbose output (default: False)'], CUSTOM) ] - return CMake.extra_options(extra_vars) + return EB_CMake.extra_options(extra_vars) def configure(self): """Set some extra environment variables before configuring.""" @@ -196,11 +196,11 @@ def configure(self): self.log.error("Failed to create and move into build directory: %s" % err) # configure using cmake - CMake.configure(self, "..") + EB_CMake.configure(self, "..") def make(self): """Build with make (verbose logging enabled).""" - CMake.make(self, verbose=True) + EB_CMake.make(self, verbose=True) def sanitycheck(self): """Custom sanity check for Trilinos.""" @@ -223,4 +223,4 @@ def sanitycheck(self): self.log.info("Customized sanity check paths: %s" % self.getcfg('sanityCheckPaths')) - CMake.sanitycheck(self) \ No newline at end of file + EB_CMake.sanitycheck(self) diff --git a/easybuild/easyblocks/u/ufc.py b/easybuild/easyblocks/u/ufc.py index 15b2fcd08d..56b4d77eed 100644 --- a/easybuild/easyblocks/u/ufc.py +++ b/easybuild/easyblocks/u/ufc.py @@ -22,11 +22,11 @@ """ from distutils.version import LooseVersion -from easybuild.easyblocks.c.cmakepythonpackage import CMakePythonPackage +from easybuild.easyblocks.c.cmakepythonpackage import EB_CMakePythonPackage from easybuild.tools.modules import get_software_root, get_software_version -class UFC(CMakePythonPackage): +class EB_UFC(EB_CMakePythonPackage): """Support for building UFC.""" def configure(self): @@ -62,7 +62,7 @@ def configure(self): self.updatecfg('configopts', '-DPYTHON_INCLUDE_PATH=%s/include/python%s' % (depsdict['Python'], self.pyver)) - CMakePythonPackage.configure(self) + EB_CMakePythonPackage.configure(self) def sanitycheck(self): """Custom sanity check for UFC.""" @@ -76,4 +76,4 @@ def sanitycheck(self): self.log.info("Customized sanity check paths: %s" % self.getcfg('sanityCheckPaths')) - CMakePythonPackage.sanitycheck(self) \ No newline at end of file + EB_CMakePythonPackage.sanitycheck(self) From 81582a182ba8e8ea6467c16104098e65d0222182 Mon Sep 17 00:00:00 2001 From: Kenneth Hoste Date: Sun, 19 Aug 2012 02:24:15 +0200 Subject: [PATCH 752/798] fix easyblock specification in easyconfig files according to new class name encoding scheme (see #86) --- .../Docutils/Docutils-0.9.1-goalf-1.1.0-no-OFED-Python-2.7.3.eb | 2 +- .../d/Docutils/Docutils-0.9.1-ictce-4.0.6-Python-2.7.3.eb | 2 +- easybuild/easyconfigs/e/ECore/ecore-1.5.2.eb | 2 +- .../f/FFC/FFC-1.0.0-goalf-1.1.0-no-OFED-Python-2.7.3.eb | 2 +- .../easyconfigs/f/FFC/FFC-1.0.0-ictce-4.0.6-Python-2.7.3.eb | 2 +- .../f/FIAT/FIAT-1.0.0-goalf-1.1.0-no-OFED-Python-2.7.3.eb | 2 +- .../easyconfigs/f/FIAT/FIAT-1.0.0-ictce-4.0.6-Python-2.7.3.eb | 2 +- easybuild/easyconfigs/g/gimkl/gimkl-0.5.3.eb | 2 +- easybuild/easyconfigs/g/gmvapich2/gmvapich2-1.1.0.eb | 2 +- easybuild/easyconfigs/g/goalf/goalf-1.1.0-no-OFED.eb | 2 +- easybuild/easyconfigs/g/gompi/gompi-1.1.0-no-OFED.eb | 2 +- .../i/Instant/Instant-1.0.0-goalf-1.1.0-no-OFED-Python-2.7.3.eb | 2 +- .../i/Instant/Instant-1.0.0-ictce-4.0.6-Python-2.7.3.eb | 2 +- easybuild/easyconfigs/i/ictce/ictce-3.2.2.u3-32bit.eb | 2 +- easybuild/easyconfigs/i/ictce/ictce-3.2.2.u3.eb | 2 +- easybuild/easyconfigs/i/ictce/ictce-4.0.6.eb | 2 +- .../j/Jinja2/Jinja2-2.6-goalf-1.1.0-no-OFED-Python-2.7.3.eb | 2 +- .../easyconfigs/j/Jinja2/Jinja2-2.6-ictce-4.0.6-Python-2.7.3.eb | 2 +- easybuild/easyconfigs/o/ORCA/ORCA-2_9_1-linux_x86-64.eb | 2 +- .../p/petsc4py/petsc4py-3.3-goalf-1.1.0-no-OFED-Python-2.7.3.eb | 2 +- .../ScientificPython-2.8-goalf-1.1.0-no-OFED-Python-2.7.3.eb | 2 +- .../ScientificPython-2.8-ictce-4.0.6-Python-2.7.3.eb | 2 +- .../s/Sphinx/Sphinx-1.1.3-goalf-1.1.0-no-OFED-Python-2.7.3.eb | 2 +- .../s/Sphinx/Sphinx-1.1.3-ictce-4.0.6-Python-2.7.3.eb | 2 +- .../setuptools-0.6c11-goalf-1.1.0-no-OFED-Python-2.7.3.eb | 2 +- .../s/setuptools/setuptools-0.6c11-ictce-4.0.6-Python-2.7.3.eb | 2 +- .../u/UFL/UFL-1.0.0-goalf-1.1.0-no-OFED-Python-2.7.3.eb | 2 +- .../easyconfigs/u/UFL/UFL-1.0.0-ictce-4.0.6-Python-2.7.3.eb | 2 +- .../v/Viper/Viper-1.0.0-goalf-1.1.0-no-OFED-Python-2.7.3.eb | 2 +- .../easyconfigs/v/Viper/Viper-1.0.0-ictce-4.0.6-Python-2.7.3.eb | 2 +- 30 files changed, 30 insertions(+), 30 deletions(-) diff --git a/easybuild/easyconfigs/d/Docutils/Docutils-0.9.1-goalf-1.1.0-no-OFED-Python-2.7.3.eb b/easybuild/easyconfigs/d/Docutils/Docutils-0.9.1-goalf-1.1.0-no-OFED-Python-2.7.3.eb index 22b7a0db81..e482cdf9be 100644 --- a/easybuild/easyconfigs/d/Docutils/Docutils-0.9.1-goalf-1.1.0-no-OFED-Python-2.7.3.eb +++ b/easybuild/easyconfigs/d/Docutils/Docutils-0.9.1-goalf-1.1.0-no-OFED-Python-2.7.3.eb @@ -1,4 +1,4 @@ -easyblock = "PythonPackage" +easyblock = "EB_PythonPackage" name = "Docutils" version = "0.9.1" diff --git a/easybuild/easyconfigs/d/Docutils/Docutils-0.9.1-ictce-4.0.6-Python-2.7.3.eb b/easybuild/easyconfigs/d/Docutils/Docutils-0.9.1-ictce-4.0.6-Python-2.7.3.eb index d3b6a8c03c..3a31ee2940 100644 --- a/easybuild/easyconfigs/d/Docutils/Docutils-0.9.1-ictce-4.0.6-Python-2.7.3.eb +++ b/easybuild/easyconfigs/d/Docutils/Docutils-0.9.1-ictce-4.0.6-Python-2.7.3.eb @@ -1,4 +1,4 @@ -easyblock = "PythonPackage" +easyblock = "EB_PythonPackage" name = "Docutils" version = "0.9.1" diff --git a/easybuild/easyconfigs/e/ECore/ecore-1.5.2.eb b/easybuild/easyconfigs/e/ECore/ecore-1.5.2.eb index 5c2a61ef29..fc9da01879 100644 --- a/easybuild/easyconfigs/e/ECore/ecore-1.5.2.eb +++ b/easybuild/easyconfigs/e/ECore/ecore-1.5.2.eb @@ -1,4 +1,4 @@ -easyblock='Binary' +easyblock='EB_Binary' name='ECore' version='1.5.2' diff --git a/easybuild/easyconfigs/f/FFC/FFC-1.0.0-goalf-1.1.0-no-OFED-Python-2.7.3.eb b/easybuild/easyconfigs/f/FFC/FFC-1.0.0-goalf-1.1.0-no-OFED-Python-2.7.3.eb index 6708b3d914..bf45110bae 100644 --- a/easybuild/easyconfigs/f/FFC/FFC-1.0.0-goalf-1.1.0-no-OFED-Python-2.7.3.eb +++ b/easybuild/easyconfigs/f/FFC/FFC-1.0.0-goalf-1.1.0-no-OFED-Python-2.7.3.eb @@ -1,4 +1,4 @@ -easyblock = "PythonPackage" +easyblock = "EB_PythonPackage" name = 'FFC' version = '1.0.0' diff --git a/easybuild/easyconfigs/f/FFC/FFC-1.0.0-ictce-4.0.6-Python-2.7.3.eb b/easybuild/easyconfigs/f/FFC/FFC-1.0.0-ictce-4.0.6-Python-2.7.3.eb index 5e077f7142..6d508d1edb 100644 --- a/easybuild/easyconfigs/f/FFC/FFC-1.0.0-ictce-4.0.6-Python-2.7.3.eb +++ b/easybuild/easyconfigs/f/FFC/FFC-1.0.0-ictce-4.0.6-Python-2.7.3.eb @@ -1,4 +1,4 @@ -easyblock = "PythonPackage" +easyblock = "EB_PythonPackage" name = 'FFC' version = '1.0.0' diff --git a/easybuild/easyconfigs/f/FIAT/FIAT-1.0.0-goalf-1.1.0-no-OFED-Python-2.7.3.eb b/easybuild/easyconfigs/f/FIAT/FIAT-1.0.0-goalf-1.1.0-no-OFED-Python-2.7.3.eb index 320640e1a6..5054006fcd 100644 --- a/easybuild/easyconfigs/f/FIAT/FIAT-1.0.0-goalf-1.1.0-no-OFED-Python-2.7.3.eb +++ b/easybuild/easyconfigs/f/FIAT/FIAT-1.0.0-goalf-1.1.0-no-OFED-Python-2.7.3.eb @@ -1,4 +1,4 @@ -easyblock = "PythonPackage" +easyblock = "EB_PythonPackage" name = 'FIAT' version = '1.0.0' diff --git a/easybuild/easyconfigs/f/FIAT/FIAT-1.0.0-ictce-4.0.6-Python-2.7.3.eb b/easybuild/easyconfigs/f/FIAT/FIAT-1.0.0-ictce-4.0.6-Python-2.7.3.eb index bfe9ded3e8..84086c4b4d 100644 --- a/easybuild/easyconfigs/f/FIAT/FIAT-1.0.0-ictce-4.0.6-Python-2.7.3.eb +++ b/easybuild/easyconfigs/f/FIAT/FIAT-1.0.0-ictce-4.0.6-Python-2.7.3.eb @@ -1,4 +1,4 @@ -easyblock = "PythonPackage" +easyblock = "EB_PythonPackage" name = 'FIAT' version = '1.0.0' diff --git a/easybuild/easyconfigs/g/gimkl/gimkl-0.5.3.eb b/easybuild/easyconfigs/g/gimkl/gimkl-0.5.3.eb index 94ec4ee2fc..16ea5fccd6 100644 --- a/easybuild/easyconfigs/g/gimkl/gimkl-0.5.3.eb +++ b/easybuild/easyconfigs/g/gimkl/gimkl-0.5.3.eb @@ -1,4 +1,4 @@ -easyblock="Toolkit" +easyblock="EB_Toolkit" name='gimkl' version='0.5.3' diff --git a/easybuild/easyconfigs/g/gmvapich2/gmvapich2-1.1.0.eb b/easybuild/easyconfigs/g/gmvapich2/gmvapich2-1.1.0.eb index 87075c37b4..22d896ab6e 100644 --- a/easybuild/easyconfigs/g/gmvapich2/gmvapich2-1.1.0.eb +++ b/easybuild/easyconfigs/g/gmvapich2/gmvapich2-1.1.0.eb @@ -1,4 +1,4 @@ -easyblock = "Toolkit" +easyblock = "EB_Toolkit" name = 'gmvapich2' version = '1.1.0' diff --git a/easybuild/easyconfigs/g/goalf/goalf-1.1.0-no-OFED.eb b/easybuild/easyconfigs/g/goalf/goalf-1.1.0-no-OFED.eb index f7b85b0bb1..8cbed925c2 100644 --- a/easybuild/easyconfigs/g/goalf/goalf-1.1.0-no-OFED.eb +++ b/easybuild/easyconfigs/g/goalf/goalf-1.1.0-no-OFED.eb @@ -1,4 +1,4 @@ -easyblock = "Toolkit" +easyblock = "EB_Toolkit" name = 'goalf' version = '1.1.0' diff --git a/easybuild/easyconfigs/g/gompi/gompi-1.1.0-no-OFED.eb b/easybuild/easyconfigs/g/gompi/gompi-1.1.0-no-OFED.eb index 57d2733ac6..4ec66131c5 100644 --- a/easybuild/easyconfigs/g/gompi/gompi-1.1.0-no-OFED.eb +++ b/easybuild/easyconfigs/g/gompi/gompi-1.1.0-no-OFED.eb @@ -1,4 +1,4 @@ -easyblock = "Toolkit" +easyblock = "EB_Toolkit" name = 'gompi' version = '1.1.0' diff --git a/easybuild/easyconfigs/i/Instant/Instant-1.0.0-goalf-1.1.0-no-OFED-Python-2.7.3.eb b/easybuild/easyconfigs/i/Instant/Instant-1.0.0-goalf-1.1.0-no-OFED-Python-2.7.3.eb index 91d36d34bc..5ded278644 100644 --- a/easybuild/easyconfigs/i/Instant/Instant-1.0.0-goalf-1.1.0-no-OFED-Python-2.7.3.eb +++ b/easybuild/easyconfigs/i/Instant/Instant-1.0.0-goalf-1.1.0-no-OFED-Python-2.7.3.eb @@ -1,4 +1,4 @@ -easyblock = "PythonPackage" +easyblock = "EB_PythonPackage" name = 'Instant' version = '1.0.0' diff --git a/easybuild/easyconfigs/i/Instant/Instant-1.0.0-ictce-4.0.6-Python-2.7.3.eb b/easybuild/easyconfigs/i/Instant/Instant-1.0.0-ictce-4.0.6-Python-2.7.3.eb index d307112757..fba5a20a61 100644 --- a/easybuild/easyconfigs/i/Instant/Instant-1.0.0-ictce-4.0.6-Python-2.7.3.eb +++ b/easybuild/easyconfigs/i/Instant/Instant-1.0.0-ictce-4.0.6-Python-2.7.3.eb @@ -1,4 +1,4 @@ -easyblock = "PythonPackage" +easyblock = "EB_PythonPackage" name = 'Instant' version = '1.0.0' diff --git a/easybuild/easyconfigs/i/ictce/ictce-3.2.2.u3-32bit.eb b/easybuild/easyconfigs/i/ictce/ictce-3.2.2.u3-32bit.eb index 6d46e18d58..e54a28c4f4 100644 --- a/easybuild/easyconfigs/i/ictce/ictce-3.2.2.u3-32bit.eb +++ b/easybuild/easyconfigs/i/ictce/ictce-3.2.2.u3-32bit.eb @@ -1,4 +1,4 @@ -easyblock="Toolkit" +easyblock="EB_Toolkit" name='ictce' version='3.2.2.u3' diff --git a/easybuild/easyconfigs/i/ictce/ictce-3.2.2.u3.eb b/easybuild/easyconfigs/i/ictce/ictce-3.2.2.u3.eb index c5c181c91a..bd1fc36841 100644 --- a/easybuild/easyconfigs/i/ictce/ictce-3.2.2.u3.eb +++ b/easybuild/easyconfigs/i/ictce/ictce-3.2.2.u3.eb @@ -1,4 +1,4 @@ -easyblock="Toolkit" +easyblock="EB_Toolkit" name='ictce' version='3.2.2.u3' diff --git a/easybuild/easyconfigs/i/ictce/ictce-4.0.6.eb b/easybuild/easyconfigs/i/ictce/ictce-4.0.6.eb index 8da6a9cc68..de716a1d36 100644 --- a/easybuild/easyconfigs/i/ictce/ictce-4.0.6.eb +++ b/easybuild/easyconfigs/i/ictce/ictce-4.0.6.eb @@ -1,4 +1,4 @@ -easyblock="Toolkit" +easyblock="EB_Toolkit" name='ictce' version='4.0.6' diff --git a/easybuild/easyconfigs/j/Jinja2/Jinja2-2.6-goalf-1.1.0-no-OFED-Python-2.7.3.eb b/easybuild/easyconfigs/j/Jinja2/Jinja2-2.6-goalf-1.1.0-no-OFED-Python-2.7.3.eb index 21a4067d8d..0154496b1d 100644 --- a/easybuild/easyconfigs/j/Jinja2/Jinja2-2.6-goalf-1.1.0-no-OFED-Python-2.7.3.eb +++ b/easybuild/easyconfigs/j/Jinja2/Jinja2-2.6-goalf-1.1.0-no-OFED-Python-2.7.3.eb @@ -1,4 +1,4 @@ -easyblock = "PythonPackage" +easyblock = "EB_PythonPackage" name = "Jinja2" version = "2.6" diff --git a/easybuild/easyconfigs/j/Jinja2/Jinja2-2.6-ictce-4.0.6-Python-2.7.3.eb b/easybuild/easyconfigs/j/Jinja2/Jinja2-2.6-ictce-4.0.6-Python-2.7.3.eb index 1fb90e5120..3a8bf0d06a 100644 --- a/easybuild/easyconfigs/j/Jinja2/Jinja2-2.6-ictce-4.0.6-Python-2.7.3.eb +++ b/easybuild/easyconfigs/j/Jinja2/Jinja2-2.6-ictce-4.0.6-Python-2.7.3.eb @@ -1,4 +1,4 @@ -easyblock = "PythonPackage" +easyblock = "EB_PythonPackage" name = "Jinja2" version = "2.6" diff --git a/easybuild/easyconfigs/o/ORCA/ORCA-2_9_1-linux_x86-64.eb b/easybuild/easyconfigs/o/ORCA/ORCA-2_9_1-linux_x86-64.eb index f2bad21dfa..2293de5792 100644 --- a/easybuild/easyconfigs/o/ORCA/ORCA-2_9_1-linux_x86-64.eb +++ b/easybuild/easyconfigs/o/ORCA/ORCA-2_9_1-linux_x86-64.eb @@ -1,4 +1,4 @@ -easyblock = "PackedBinary" +easyblock = "EB_PackedBinary" name = "ORCA" version = '2_9_1-linux_x86-64' diff --git a/easybuild/easyconfigs/p/petsc4py/petsc4py-3.3-goalf-1.1.0-no-OFED-Python-2.7.3.eb b/easybuild/easyconfigs/p/petsc4py/petsc4py-3.3-goalf-1.1.0-no-OFED-Python-2.7.3.eb index f8450bf502..d51f0cbb3b 100644 --- a/easybuild/easyconfigs/p/petsc4py/petsc4py-3.3-goalf-1.1.0-no-OFED-Python-2.7.3.eb +++ b/easybuild/easyconfigs/p/petsc4py/petsc4py-3.3-goalf-1.1.0-no-OFED-Python-2.7.3.eb @@ -1,4 +1,4 @@ -easyblock = "PythonPackage" +easyblock = "EB_PythonPackage" name = "petsc4py" version = "3.3" diff --git a/easybuild/easyconfigs/s/ScientificPython/ScientificPython-2.8-goalf-1.1.0-no-OFED-Python-2.7.3.eb b/easybuild/easyconfigs/s/ScientificPython/ScientificPython-2.8-goalf-1.1.0-no-OFED-Python-2.7.3.eb index 9d29bd1ade..9b14a79d23 100644 --- a/easybuild/easyconfigs/s/ScientificPython/ScientificPython-2.8-goalf-1.1.0-no-OFED-Python-2.7.3.eb +++ b/easybuild/easyconfigs/s/ScientificPython/ScientificPython-2.8-goalf-1.1.0-no-OFED-Python-2.7.3.eb @@ -1,4 +1,4 @@ -easyblock = "PythonPackage" +easyblock = "EB_PythonPackage" name = 'ScientificPython' version = '2.8' diff --git a/easybuild/easyconfigs/s/ScientificPython/ScientificPython-2.8-ictce-4.0.6-Python-2.7.3.eb b/easybuild/easyconfigs/s/ScientificPython/ScientificPython-2.8-ictce-4.0.6-Python-2.7.3.eb index d776b2efb2..a28a4f1f2e 100644 --- a/easybuild/easyconfigs/s/ScientificPython/ScientificPython-2.8-ictce-4.0.6-Python-2.7.3.eb +++ b/easybuild/easyconfigs/s/ScientificPython/ScientificPython-2.8-ictce-4.0.6-Python-2.7.3.eb @@ -1,4 +1,4 @@ -easyblock = "PythonPackage" +easyblock = "EB_PythonPackage" name = 'ScientificPython' version = '2.8' diff --git a/easybuild/easyconfigs/s/Sphinx/Sphinx-1.1.3-goalf-1.1.0-no-OFED-Python-2.7.3.eb b/easybuild/easyconfigs/s/Sphinx/Sphinx-1.1.3-goalf-1.1.0-no-OFED-Python-2.7.3.eb index 38c742c6cf..44d7d0ef94 100644 --- a/easybuild/easyconfigs/s/Sphinx/Sphinx-1.1.3-goalf-1.1.0-no-OFED-Python-2.7.3.eb +++ b/easybuild/easyconfigs/s/Sphinx/Sphinx-1.1.3-goalf-1.1.0-no-OFED-Python-2.7.3.eb @@ -1,4 +1,4 @@ -easyblock = "PythonPackage" +easyblock = "EB_PythonPackage" name = "Sphinx" version = "1.1.3" diff --git a/easybuild/easyconfigs/s/Sphinx/Sphinx-1.1.3-ictce-4.0.6-Python-2.7.3.eb b/easybuild/easyconfigs/s/Sphinx/Sphinx-1.1.3-ictce-4.0.6-Python-2.7.3.eb index 6b6005703c..95e07e123a 100644 --- a/easybuild/easyconfigs/s/Sphinx/Sphinx-1.1.3-ictce-4.0.6-Python-2.7.3.eb +++ b/easybuild/easyconfigs/s/Sphinx/Sphinx-1.1.3-ictce-4.0.6-Python-2.7.3.eb @@ -1,4 +1,4 @@ -easyblock = "PythonPackage" +easyblock = "EB_PythonPackage" name = "Sphinx" version = "1.1.3" diff --git a/easybuild/easyconfigs/s/setuptools/setuptools-0.6c11-goalf-1.1.0-no-OFED-Python-2.7.3.eb b/easybuild/easyconfigs/s/setuptools/setuptools-0.6c11-goalf-1.1.0-no-OFED-Python-2.7.3.eb index 1ef35d7cb6..0ef2051ad7 100644 --- a/easybuild/easyconfigs/s/setuptools/setuptools-0.6c11-goalf-1.1.0-no-OFED-Python-2.7.3.eb +++ b/easybuild/easyconfigs/s/setuptools/setuptools-0.6c11-goalf-1.1.0-no-OFED-Python-2.7.3.eb @@ -1,4 +1,4 @@ -easyblock = "PythonPackage" +easyblock = "EB_PythonPackage" name = "setuptools" version = "0.6c11" diff --git a/easybuild/easyconfigs/s/setuptools/setuptools-0.6c11-ictce-4.0.6-Python-2.7.3.eb b/easybuild/easyconfigs/s/setuptools/setuptools-0.6c11-ictce-4.0.6-Python-2.7.3.eb index 0beaf5c299..25b6f94b5f 100644 --- a/easybuild/easyconfigs/s/setuptools/setuptools-0.6c11-ictce-4.0.6-Python-2.7.3.eb +++ b/easybuild/easyconfigs/s/setuptools/setuptools-0.6c11-ictce-4.0.6-Python-2.7.3.eb @@ -1,4 +1,4 @@ -easyblock = "PythonPackage" +easyblock = "EB_PythonPackage" name = "setuptools" version = "0.6c11" diff --git a/easybuild/easyconfigs/u/UFL/UFL-1.0.0-goalf-1.1.0-no-OFED-Python-2.7.3.eb b/easybuild/easyconfigs/u/UFL/UFL-1.0.0-goalf-1.1.0-no-OFED-Python-2.7.3.eb index f2ecbe75b4..47722a075e 100644 --- a/easybuild/easyconfigs/u/UFL/UFL-1.0.0-goalf-1.1.0-no-OFED-Python-2.7.3.eb +++ b/easybuild/easyconfigs/u/UFL/UFL-1.0.0-goalf-1.1.0-no-OFED-Python-2.7.3.eb @@ -1,4 +1,4 @@ -easyblock = "PythonPackage" +easyblock = "EB_PythonPackage" name = 'UFL' version = '1.0.0' diff --git a/easybuild/easyconfigs/u/UFL/UFL-1.0.0-ictce-4.0.6-Python-2.7.3.eb b/easybuild/easyconfigs/u/UFL/UFL-1.0.0-ictce-4.0.6-Python-2.7.3.eb index cc1294f11b..5d4f0463e9 100644 --- a/easybuild/easyconfigs/u/UFL/UFL-1.0.0-ictce-4.0.6-Python-2.7.3.eb +++ b/easybuild/easyconfigs/u/UFL/UFL-1.0.0-ictce-4.0.6-Python-2.7.3.eb @@ -1,4 +1,4 @@ -easyblock = "PythonPackage" +easyblock = "EB_PythonPackage" name = 'UFL' version = '1.0.0' diff --git a/easybuild/easyconfigs/v/Viper/Viper-1.0.0-goalf-1.1.0-no-OFED-Python-2.7.3.eb b/easybuild/easyconfigs/v/Viper/Viper-1.0.0-goalf-1.1.0-no-OFED-Python-2.7.3.eb index 5d2f074cc2..eea205ad22 100644 --- a/easybuild/easyconfigs/v/Viper/Viper-1.0.0-goalf-1.1.0-no-OFED-Python-2.7.3.eb +++ b/easybuild/easyconfigs/v/Viper/Viper-1.0.0-goalf-1.1.0-no-OFED-Python-2.7.3.eb @@ -1,4 +1,4 @@ -easyblock = "PythonPackage" +easyblock = "EB_PythonPackage" name = 'Viper' version = '1.0.0' diff --git a/easybuild/easyconfigs/v/Viper/Viper-1.0.0-ictce-4.0.6-Python-2.7.3.eb b/easybuild/easyconfigs/v/Viper/Viper-1.0.0-ictce-4.0.6-Python-2.7.3.eb index 189da7e1cd..0c1cba1686 100644 --- a/easybuild/easyconfigs/v/Viper/Viper-1.0.0-ictce-4.0.6-Python-2.7.3.eb +++ b/easybuild/easyconfigs/v/Viper/Viper-1.0.0-ictce-4.0.6-Python-2.7.3.eb @@ -1,4 +1,4 @@ -easyblock = "PythonPackage" +easyblock = "EB_PythonPackage" name = 'Viper' version = '1.0.0' From 26c3e291a44943c429db1f0d375c2c67e1277b29 Mon Sep 17 00:00:00 2001 From: Kenneth Hoste Date: Sun, 19 Aug 2012 02:31:09 +0200 Subject: [PATCH 753/798] fix example Hypre easyconfig for ictce toolkit --- easybuild/easyconfigs/h/Hypre/Hypre-2.8.0b-ictce-4.0.6.eb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/easybuild/easyconfigs/h/Hypre/Hypre-2.8.0b-ictce-4.0.6.eb b/easybuild/easyconfigs/h/Hypre/Hypre-2.8.0b-ictce-4.0.6.eb index e37a1c8181..48aecef969 100644 --- a/easybuild/easyconfigs/h/Hypre/Hypre-2.8.0b-ictce-4.0.6.eb +++ b/easybuild/easyconfigs/h/Hypre/Hypre-2.8.0b-ictce-4.0.6.eb @@ -4,7 +4,7 @@ version = "2.8.0b" homepage = "" description = "" -toolkit = {'name': 'goalf', 'version': '1.1.0-no-OFED'} +toolkit = {'name': 'ictce', 'version': '4.0.6'} toolkitopts = {'pic': True} sourceURLs = ["https://computation.llnl.gov/casc/hypre/download/"] From dcaa97a8fc39a944ef9d190072d73d2e9f536295 Mon Sep 17 00:00:00 2001 From: Kenneth Hoste Date: Sun, 19 Aug 2012 02:32:53 +0200 Subject: [PATCH 754/798] fix determining module path based on class name (take prefix into account) --- easybuild/framework/application.py | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/easybuild/framework/application.py b/easybuild/framework/application.py index 3e69f6c9ca..eb9e5f5638 100644 --- a/easybuild/framework/application.py +++ b/easybuild/framework/application.py @@ -1541,6 +1541,10 @@ def module_path_for_easyblock(easyblock): if not easyblock: return None + class_prefix = encode_class_name("") + if easyblock.startswith(class_prefix): + easyblock = easyblock[len(class_prefix):] + modname = easyblock.replace('-','_') first_char = easyblock[0].lower() From 4cc9b58b687948033dea44857f22d090559d8bf2 Mon Sep 17 00:00:00 2001 From: Kenneth Hoste Date: Sun, 19 Aug 2012 12:26:10 +0200 Subject: [PATCH 755/798] enable fPIC in ParMETIS example easyconfigs --- .../p/ParMETIS/ParMETIS-4.0.2-goalf-1.1.0-no-OFED.eb | 2 +- easybuild/easyconfigs/p/ParMETIS/ParMETIS-4.0.2-ictce-4.0.6.eb | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/easybuild/easyconfigs/p/ParMETIS/ParMETIS-4.0.2-goalf-1.1.0-no-OFED.eb b/easybuild/easyconfigs/p/ParMETIS/ParMETIS-4.0.2-goalf-1.1.0-no-OFED.eb index 5aeca838bf..86adc06d60 100644 --- a/easybuild/easyconfigs/p/ParMETIS/ParMETIS-4.0.2-goalf-1.1.0-no-OFED.eb +++ b/easybuild/easyconfigs/p/ParMETIS/ParMETIS-4.0.2-goalf-1.1.0-no-OFED.eb @@ -9,7 +9,7 @@ ParMETIS are based on the parallel multilevel k-way graph-partitioning, adaptive schemes.""" toolkit = {'name': 'goalf', 'version': '1.1.0-no-OFED'} -toolkitopts = {'optarch': True, 'usempi': True} +toolkitopts = {'optarch': True, 'usempi': True, 'pic': True} sourceURLs = ['http://glaros.dtc.umn.edu/gkhome/fetch/sw/parmetis', 'http://glaros.dtc.umn.edu/gkhome/fetch/sw/parmetis/OLD'] diff --git a/easybuild/easyconfigs/p/ParMETIS/ParMETIS-4.0.2-ictce-4.0.6.eb b/easybuild/easyconfigs/p/ParMETIS/ParMETIS-4.0.2-ictce-4.0.6.eb index 826fa2b720..e31bb258d4 100644 --- a/easybuild/easyconfigs/p/ParMETIS/ParMETIS-4.0.2-ictce-4.0.6.eb +++ b/easybuild/easyconfigs/p/ParMETIS/ParMETIS-4.0.2-ictce-4.0.6.eb @@ -9,7 +9,7 @@ ParMETIS are based on the parallel multilevel k-way graph-partitioning, adaptive schemes.""" toolkit = {'name': 'ictce', 'version': '4.0.6'} -toolkitopts = {'optarch': True, 'usempi': True} +toolkitopts = {'optarch': True, 'usempi': True, 'pic':True} sourceURLs = ['http://glaros.dtc.umn.edu/gkhome/fetch/sw/parmetis', 'http://glaros.dtc.umn.edu/gkhome/fetch/sw/parmetis/OLD'] From 21eaf6afe0faca2f4452b5ca0866d372258a0dad Mon Sep 17 00:00:00 2001 From: Kenneth Hoste Date: Sun, 19 Aug 2012 12:27:23 +0200 Subject: [PATCH 756/798] fix types in extra_options for Trilinos --- easybuild/easyblocks/t/trilinos.py | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/easybuild/easyblocks/t/trilinos.py b/easybuild/easyblocks/t/trilinos.py index aa5c889528..9fdf5fa5d3 100644 --- a/easybuild/easyblocks/t/trilinos.py +++ b/easybuild/easyblocks/t/trilinos.py @@ -38,10 +38,10 @@ def extra_options(): """Add extra config options specific to Trilinos.""" extra_vars = [ ('shared_libs', [False, "BUild shared libs; if False, build static libs. (default: False).", CUSTOM]), - ('openmp', [True, "Enable OpenMP support (default: True)"], CUSTOM), - ('all_pkgs', [True, "Enable all packages (default: True)"], CUSTOM), - ('skip_pkgs', [[], "List of packages to skip (default: [])"], CUSTOM), - ('verbose', [False, 'Configure for verbose output (default: False)'], CUSTOM) + ('openmp', [True, "Enable OpenMP support (default: True)", CUSTOM]), + ('all_pkgs', [True, "Enable all packages (default: True)", CUSTOM]), + ('skip_pkgs', [[], "List of packages to skip (default: [])", CUSTOM]), + ('verbose', [False, 'Configure for verbose output (default: False)', CUSTOM]) ] return EB_CMake.extra_options(extra_vars) From 16e11448ef05191a357b59d5dfe9a0fd68b367ab Mon Sep 17 00:00:00 2001 From: Kenneth Hoste Date: Sun, 19 Aug 2012 12:57:57 +0200 Subject: [PATCH 757/798] only check easyconfig filename against module it provided in resolveDependencies --- easybuild/build.py | 14 ++++++++------ 1 file changed, 8 insertions(+), 6 deletions(-) diff --git a/easybuild/build.py b/easybuild/build.py index dd12746d7f..6336974bd3 100644 --- a/easybuild/build.py +++ b/easybuild/build.py @@ -253,6 +253,7 @@ def main(): print_msg(msg, log) log.info(msg) else: + log.debug("%s is not installed yet, so retaining it" % mod) packages.append(package) ## Determine an order that will allow all specs in the set to build @@ -378,6 +379,7 @@ def processEasyconfig(path, log, onlyBlocks=None, regtest_online=False, validate ## - use mod? __init__ and importCfg are ignored. log.debug("Processing easyconfig %s" % spec) + # create easyconfig try: eb = EasyConfig(spec, validate=validate) except EasyBuildError, err: @@ -410,12 +412,6 @@ def processEasyconfig(path, log, onlyBlocks=None, regtest_online=False, validate # this is used by the parallel builder package['unresolvedDependencies'] = copy.copy(package['dependencies']) - # ensure the pathname is equal to the module - base_name, _ = os.path.splitext(os.path.basename(spec)) - module_name = "-".join(package['module']) - if base_name.lower() != module_name.lower(): - log.error("easyconfig file: %s does not contain module %s" % (spec, module_name)) - packages.append(package) return packages @@ -484,6 +480,12 @@ def resolveDependencies(unprocessed, robot, log, force=False): log.info("Robot: resolving dependency %s with %s" % (candidates[0], path)) processedSpecs = processEasyconfig(path, log, validate=(not force)) + + # ensure the pathname is equal to the module + mods = [spec['module'] for spec in processedSpecs] + if not candidates[0] in mods: + log.error("easyconfig file %s does not contain module %s" % (path, candidates[0])) + unprocessed.extend(processedSpecs) robotAddedDependency = True break From adcfc99738ef01a89004dd48eab4fee7154a11ad Mon Sep 17 00:00:00 2001 From: Kenneth Hoste Date: Sun, 19 Aug 2012 14:56:23 +0200 Subject: [PATCH 758/798] support multiple sanity check commands, run both Python and C++ version of DOLFIN demos as sanity check commands --- easybuild/easyblocks/d/dolfin.py | 28 ++++++++++++++++++++-------- easybuild/framework/application.py | 14 ++++++++------ easybuild/framework/easyconfig.py | 2 +- 3 files changed, 29 insertions(+), 15 deletions(-) diff --git a/easybuild/easyblocks/d/dolfin.py b/easybuild/easyblocks/d/dolfin.py index 404a74e961..3a4f9e7ca4 100644 --- a/easybuild/easyblocks/d/dolfin.py +++ b/easybuild/easyblocks/d/dolfin.py @@ -36,6 +36,11 @@ class EB_DOLFIN(EB_CMakePythonPackage): def configure(self): """Set DOLFIN-specific configure options and configure with CMake.""" + # compilers + self.updatecfg('configopts', "-DCMAKE_C_COMPILER='%s' " % os.getenv('CC')) + self.updatecfg('configopts', "-DCMAKE_CXX_COMPILER='%s' " % os.getenv('CXX')) + self.updatecfg('configopts', "-DCMAKE_Fortran_COMPILER='%s' " % os.getenv('F90')) + # compiler flags cflags = os.getenv('CFLAGS') cxxflags = os.getenv('CXXFLAGS') @@ -180,13 +185,17 @@ def sanitycheck(self): self.log.info("Customized sanity check paths: %s" % self.getcfg('sanityCheckPaths')) - if not self.getcfg('sanityCheckCommand'): + if not self.getcfg('sanityCheckCommands'): pref = os.path.join('share', 'dolfin', 'demo') - # test command template - cmd_template = " && ".join(["echo", "echo '+++ RUNNING DEMO %(name)s'", "echo", - "cd %(dir)s", "python demo_%(name)s.py", "cd -"]) + # test command templates + cmd_template_python = " && ".join(["echo", "echo '+++ Python DEMO %(name)s'", "echo", + "cd %(dir)s", "python demo_%(name)s.py", "cd -"]) + + cmd_template_cpp = " && ".join(["echo", "echo '+++ C++ DEMO %(name)s'", "echo", + "cd %(dir)s", "cmake . %s" % self.getcfg('configopts'), + "make", "./demo_%(name)s", "cd -"]) # list based on demos available for DOLFIN v1.0.0 pde_demos = ['biharmonic', 'cahn-hilliard', 'hyperelasticity', 'mixed-poisson', @@ -195,13 +204,16 @@ def sanitycheck(self): demos = [os.path.join('la', 'eigenvalue')] + [os.path.join('pde', x) for x in pde_demos] # construct commands - cmds = [cmd_template % { - 'dir': os.path.join(pref, d, 'python'), + cmds = [tmpl % { + 'dir': os.path.join(pref, d, subdir), 'name': os.path.basename(d), } - for d in demos] + for d in demos + for (tmpl, subdir) in [(cmd_template_python, 'python'), (cmd_template_cpp, 'cpp')]] + # supply empty argument to each command + cmds = [(cmd, "") for cmd in cmds] # join all commands into one large single sanity check command - self.setcfg('sanityCheckCommand', (" && ".join(cmds), "")) + self.setcfg('sanityCheckCommands', cmds) EB_CMakePythonPackage.sanitycheck(self) diff --git a/easybuild/framework/application.py b/easybuild/framework/application.py index eb9e5f5638..a5ed57fed6 100644 --- a/easybuild/framework/application.py +++ b/easybuild/framework/application.py @@ -845,11 +845,11 @@ def sanitycheck(self): # chdir to installdir (better environment for running tests) os.chdir(self.installdir) - # run sanity check command - command = self.getcfg('sanityCheckCommand') - if command: + # run sanity check commands + commands = self.getcfg('sanityCheckCommands') + for command in commands: # set command to default. This allows for config files with - # sanityCheckCommand = True + # non-tuple commands if not isinstance(command, tuple): self.log.debug("Setting sanity check command to default") command = (None, None) @@ -868,9 +868,9 @@ def sanitycheck(self): out, ec = run_cmd(cmd, simple=False) if ec != 0: self.sanityCheckOK = False - self.log.debug("sanityCheckCommand %s exited with code %s (output: %s)" % (cmd, ec, out)) + self.log.warning("sanityCheckCommand %s exited with code %s (output: %s)" % (cmd, ec, out)) else: - self.log.debug("sanityCheckCommand %s ran successfully! (output: %s)" % (cmd, out)) + self.log.info("sanityCheckCommand %s ran successfully! (output: %s)" % (cmd, out)) failed_pkgs = [pkg.name for pkg in self.instance_pkgs if not pkg.sanitycheck()] @@ -1541,6 +1541,8 @@ def module_path_for_easyblock(easyblock): if not easyblock: return None + # FIXME: we actually need a decoding function here, + # i.e. from encoded class name to module name class_prefix = encode_class_name("") if easyblock.startswith(class_prefix): easyblock = easyblock[len(class_prefix):] diff --git a/easybuild/framework/easyconfig.py b/easybuild/framework/easyconfig.py index 84dea3572d..6c186e7529 100644 --- a/easybuild/framework/easyconfig.py +++ b/easybuild/framework/easyconfig.py @@ -85,7 +85,7 @@ class EasyConfig: ('patches', [[], "List of patches to apply", BUILD]), ('tests', [[], "List of test-scripts to run after install. A test script should return a non-zero exit status to fail", BUILD]), ('sanityCheckPaths', [{}, "List of files and directories to check (format: {'files':, 'dirs':}, default: {})", BUILD]), - ('sanityCheckCommand', [None, "format: (name, options) e.g. ('gzip','-h') . If set to True it will use (name, '-h')", BUILD]), + ('sanityCheckCommands', [[], "format: [(name, options)] e.g. [('gzip','-h')] . Using a non-tuple is equivalent to (name, '-h')", BUILD]), ('startfrom', [None, 'Path to start the make in. If the path is absolute, use that path. If not, this is added to the guessed path.', FILEMANAGEMENT]), ('keeppreviousinstall', [False, 'Boolean to keep the previous installation with identical name. Default False, experts only!', FILEMANAGEMENT]), From cde930785f814abbf37050d801b78d64a7c9a1d3 Mon Sep 17 00:00:00 2001 From: Kenneth Hoste Date: Sun, 19 Aug 2012 16:32:53 +0200 Subject: [PATCH 759/798] subdomains-poisson has no C++ version --- easybuild/easyblocks/d/dolfin.py | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/easybuild/easyblocks/d/dolfin.py b/easybuild/easyblocks/d/dolfin.py index 3a4f9e7ca4..52dabb1a10 100644 --- a/easybuild/easyblocks/d/dolfin.py +++ b/easybuild/easyblocks/d/dolfin.py @@ -199,7 +199,7 @@ def sanitycheck(self): # list based on demos available for DOLFIN v1.0.0 pde_demos = ['biharmonic', 'cahn-hilliard', 'hyperelasticity', 'mixed-poisson', - 'navier-stokes', 'poisson', 'stokes-iterative', 'subdomains-poisson'] + 'navier-stokes', 'poisson', 'stokes-iterative'] demos = [os.path.join('la', 'eigenvalue')] + [os.path.join('pde', x) for x in pde_demos] @@ -210,6 +210,12 @@ def sanitycheck(self): } for d in demos for (tmpl, subdir) in [(cmd_template_python, 'python'), (cmd_template_cpp, 'cpp')]] + + # subdomains-poisson has no C++ version, only Python + name = 'subdomains-poisson' + path = os.path.join(pref, 'pde', name, 'python') + cmds += [cmd_template_python % (path, name)] + # supply empty argument to each command cmds = [(cmd, "") for cmd in cmds] From 4bd8c9ecbd28de4a516cc7163b70678370fd8848 Mon Sep 17 00:00:00 2001 From: Kenneth Hoste Date: Sun, 19 Aug 2012 16:55:19 +0200 Subject: [PATCH 760/798] only supply required CMake config opts, shorted sanity check command template (drop echos) --- easybuild/easyblocks/d/dolfin.py | 42 ++++++++++++++++---------------- 1 file changed, 21 insertions(+), 21 deletions(-) diff --git a/easybuild/easyblocks/d/dolfin.py b/easybuild/easyblocks/d/dolfin.py index 52dabb1a10..a635463195 100644 --- a/easybuild/easyblocks/d/dolfin.py +++ b/easybuild/easyblocks/d/dolfin.py @@ -74,14 +74,6 @@ def configure(self): self.updatecfg('configopts', ' -DMPI_C_COMPILER="$MPICC"') self.updatecfg('configopts', ' -DMPI_CXX_COMPILER="$MPICXX"') - # Boost config parameters - self.updatecfg('configopts', " -DBOOST_INCLUDEDIR=%s/include" % depsdict['Boost']) - self.updatecfg('configopts', " -DBoost_DEBUG=ON -DBOOST_ROOT=%s" % depsdict['Boost']) - - # UFC and Armadillo config params - self.updatecfg('configopts', " -DUFC_DIR=%s" % depsdict['UFC']) - self.updatecfg('configopts', "-DARMADILLO_DIR:PATH=%s " % depsdict['Armadillo']) - # specify MPI library self.updatecfg('configopts', ' -DMPI_COMPILER="%s"' % os.getenv('MPICC')) @@ -91,6 +83,25 @@ def configure(self): else: self.log.error('MPI_LIB_SHARED or MPI_INC_DIR not set, could not determine MPI-related paths.') + # zlib + self.updatecfg('configopts', '-DZLIB_INCLUDE_DIR=%s' % os.path.join(depsdict['zlib'], "include")) + self.updatecfg('configopts', '-DZLIB_LIBRARY=%s' % os.path.join(depsdict['zlib'], "lib", "libz.a")) + + # set correct openmp options + openmp = self.toolkit().get_openmp_flag() + self.updatecfg('configopts', ' -DOpenMP_CXX_FLAGS="%s"' % openmp) + self.updatecfg('configopts', ' -DOpenMP_C_FLAGS="%s"' % openmp) + + self.saved_configopts = self.getcfg('configopts') + + # Boost config parameters + self.updatecfg('configopts', " -DBOOST_INCLUDEDIR=%s/include" % depsdict['Boost']) + self.updatecfg('configopts', " -DBoost_DEBUG=ON -DBOOST_ROOT=%s" % depsdict['Boost']) + + # UFC and Armadillo config params + self.updatecfg('configopts', " -DUFC_DIR=%s" % depsdict['UFC']) + self.updatecfg('configopts', "-DARMADILLO_DIR:PATH=%s " % depsdict['Armadillo']) + # specify Python paths python_short_ver = ".".join(get_software_version('Python').split(".")[0:2]) self.updatecfg('configopts', " -DPYTHON_INCLUDE_PATH=%s/include/python%s" % (depsdict['Python'], @@ -135,15 +146,6 @@ def configure(self): # MTL4 self.updatecfg('configopts', '-DMTL4_DIR:PATH="%s"' % depsdict['MTL4']) - # zlib - self.updatecfg('configopts', '-DZLIB_INCLUDE_DIR=%s' % os.path.join(depsdict['zlib'], "include")) - self.updatecfg('configopts', '-DZLIB_LIBRARY=%s' % os.path.join(depsdict['zlib'], "lib", "libz.a")) - - # set correct openmp options - openmp = self.toolkit().get_openmp_flag() - self.updatecfg('configopts', ' -DOpenMP_CXX_FLAGS="%s"' % openmp) - self.updatecfg('configopts', ' -DOpenMP_C_FLAGS="%s"' % openmp) - # configure out = EB_CMakePythonPackage.configure(self) @@ -190,11 +192,9 @@ def sanitycheck(self): pref = os.path.join('share', 'dolfin', 'demo') # test command templates - cmd_template_python = " && ".join(["echo", "echo '+++ Python DEMO %(name)s'", "echo", - "cd %(dir)s", "python demo_%(name)s.py", "cd -"]) + cmd_template_python = " && ".join(["cd %(dir)s", "python demo_%(name)s.py", "cd -"]) - cmd_template_cpp = " && ".join(["echo", "echo '+++ C++ DEMO %(name)s'", "echo", - "cd %(dir)s", "cmake . %s" % self.getcfg('configopts'), + cmd_template_cpp = " && ".join(["cd %(dir)s", "cmake . %s" % self.saved_configopts, "make", "./demo_%(name)s", "cd -"]) # list based on demos available for DOLFIN v1.0.0 From 7a6aa477c76567c6c0f21bc204023cfd8560dcc4 Mon Sep 17 00:00:00 2001 From: Kenneth Hoste Date: Sun, 19 Aug 2012 19:31:13 +0200 Subject: [PATCH 761/798] fix typos in extra sanity check command for DOLFIN --- easybuild/easyblocks/d/dolfin.py | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/easybuild/easyblocks/d/dolfin.py b/easybuild/easyblocks/d/dolfin.py index a635463195..41a99e1c86 100644 --- a/easybuild/easyblocks/d/dolfin.py +++ b/easybuild/easyblocks/d/dolfin.py @@ -205,16 +205,16 @@ def sanitycheck(self): # construct commands cmds = [tmpl % { - 'dir': os.path.join(pref, d, subdir), - 'name': os.path.basename(d), - } + 'dir': os.path.join(pref, d, subdir), + 'name': os.path.basename(d), + } for d in demos for (tmpl, subdir) in [(cmd_template_python, 'python'), (cmd_template_cpp, 'cpp')]] # subdomains-poisson has no C++ version, only Python name = 'subdomains-poisson' path = os.path.join(pref, 'pde', name, 'python') - cmds += [cmd_template_python % (path, name)] + cmds += [cmd_template_python % {'dir': path, 'name': name}] # supply empty argument to each command cmds = [(cmd, "") for cmd in cmds] From 8a7a102ec5e5a597af4f12cef036683418f932a5 Mon Sep 17 00:00:00 2001 From: Kenneth Hoste Date: Sun, 19 Aug 2012 20:07:02 +0200 Subject: [PATCH 762/798] don't use zlib as dependency for Boost or DOLFIN, this currently breaks the PETSc build (see issue #108); specify 'zlib-devel' as osdependency instead --- .../b/Boost/Boost-1.49.0-goalf-1.1.0-no-OFED-Python-2.7.3.eb | 3 ++- .../b/Boost/Boost-1.49.0-ictce-4.0.6-Python-2.7.3.eb | 3 ++- .../easyconfigs/p/Python/Python-2.7.3-goalf-1.1.0-no-OFED.eb | 4 ++-- easybuild/easyconfigs/p/Python/Python-2.7.3-ictce-4.0.6.eb | 4 ++-- .../easyconfigs/p/Python/Python-3.2.3-goalf-1.1.0-no-OFED.eb | 4 ++-- easybuild/easyconfigs/p/Python/Python-3.2.3-ictce-4.0.6.eb | 4 ++-- 6 files changed, 12 insertions(+), 10 deletions(-) diff --git a/easybuild/easyconfigs/b/Boost/Boost-1.49.0-goalf-1.1.0-no-OFED-Python-2.7.3.eb b/easybuild/easyconfigs/b/Boost/Boost-1.49.0-goalf-1.1.0-no-OFED-Python-2.7.3.eb index 218800fd25..85a765b509 100644 --- a/easybuild/easyconfigs/b/Boost/Boost-1.49.0-goalf-1.1.0-no-OFED-Python-2.7.3.eb +++ b/easybuild/easyconfigs/b/Boost/Boost-1.49.0-goalf-1.1.0-no-OFED-Python-2.7.3.eb @@ -15,8 +15,9 @@ pythonversion = '2.7.3' versionsuffix = '-Python-%s'%pythonversion dependencies = [('bzip2', '1.0.6'), - ('zlib', '1.2.7'), ('Python', pythonversion)] # also build boost_mpi boost_mpi = True + +osdependencies = ['zlib-devel'] \ No newline at end of file diff --git a/easybuild/easyconfigs/b/Boost/Boost-1.49.0-ictce-4.0.6-Python-2.7.3.eb b/easybuild/easyconfigs/b/Boost/Boost-1.49.0-ictce-4.0.6-Python-2.7.3.eb index 7394f8d749..8c161ac540 100644 --- a/easybuild/easyconfigs/b/Boost/Boost-1.49.0-ictce-4.0.6-Python-2.7.3.eb +++ b/easybuild/easyconfigs/b/Boost/Boost-1.49.0-ictce-4.0.6-Python-2.7.3.eb @@ -17,8 +17,9 @@ pythonversion = '2.7.3' versionsuffix = '-Python-%s'%pythonversion dependencies = [('bzip2', '1.0.6'), - ('zlib', '1.2.7'), ('Python', pythonversion)] # also build boost_mpi boost_mpi = True + +osdependencies = ['zlib-devel'] \ No newline at end of file diff --git a/easybuild/easyconfigs/p/Python/Python-2.7.3-goalf-1.1.0-no-OFED.eb b/easybuild/easyconfigs/p/Python/Python-2.7.3-goalf-1.1.0-no-OFED.eb index 3ab2050857..04b913bfc0 100644 --- a/easybuild/easyconfigs/p/Python/Python-2.7.3-goalf-1.1.0-no-OFED.eb +++ b/easybuild/easyconfigs/p/Python/Python-2.7.3-goalf-1.1.0-no-OFED.eb @@ -20,11 +20,11 @@ sources = ['%s-%s.tgz' % (name, version)] patches = ['python_libffi_int128_icc.patch'] -dependencies = [('zlib', '1.2.7')] - # order is important! pkglist = [ ('nose', '1.1.2'), # used extends unit testing ('numpy', numpyversion), ('scipy', scipyversion) ] + +osdependencies=['zlib-devel'] diff --git a/easybuild/easyconfigs/p/Python/Python-2.7.3-ictce-4.0.6.eb b/easybuild/easyconfigs/p/Python/Python-2.7.3-ictce-4.0.6.eb index 42bd4dd45f..27c8cc6e85 100644 --- a/easybuild/easyconfigs/p/Python/Python-2.7.3-ictce-4.0.6.eb +++ b/easybuild/easyconfigs/p/Python/Python-2.7.3-ictce-4.0.6.eb @@ -20,8 +20,6 @@ sources = ['%s-%s.tgz' % (name, version)] patches = ['python_libffi_int128_icc.patch'] -dependencies = [('zlib', '1.2.7')] - # order is important! pkglist = [ ('nose', '1.1.2'), # used extends unit testing @@ -30,3 +28,5 @@ pkglist = [ ] pkgpatches = [('numpy', ['numpy-1.6.1_distutils_multiple-lib-dirs.patch'])] + +osdependencies=['zlib-devel'] diff --git a/easybuild/easyconfigs/p/Python/Python-3.2.3-goalf-1.1.0-no-OFED.eb b/easybuild/easyconfigs/p/Python/Python-3.2.3-goalf-1.1.0-no-OFED.eb index a5ebe1d51e..31e8291cb9 100644 --- a/easybuild/easyconfigs/p/Python/Python-3.2.3-goalf-1.1.0-no-OFED.eb +++ b/easybuild/easyconfigs/p/Python/Python-3.2.3-goalf-1.1.0-no-OFED.eb @@ -21,8 +21,6 @@ sourceURLs=[ 'http://mpi4py.googlecode.com/files', # mpi4py ] -dependencies = [('zlib', '1.2.7')] - # order is important! pkglist = [ ('distribute','0.6.26'), @@ -34,3 +32,5 @@ pkglist = [ ] pkgmodulenames = {'distribute': 'setuptools'} + +osdependencies=['zlib-devel'] diff --git a/easybuild/easyconfigs/p/Python/Python-3.2.3-ictce-4.0.6.eb b/easybuild/easyconfigs/p/Python/Python-3.2.3-ictce-4.0.6.eb index 7396bb9882..8a8d33c625 100644 --- a/easybuild/easyconfigs/p/Python/Python-3.2.3-ictce-4.0.6.eb +++ b/easybuild/easyconfigs/p/Python/Python-3.2.3-ictce-4.0.6.eb @@ -23,8 +23,6 @@ sourceURLs=[ patches = ['python_libffi_int128_icc.patch'] -dependencies = [('zlib', '1.2.7')] - # order is important! pkglist = [ ('distribute','0.6.26'), @@ -38,3 +36,5 @@ pkglist = [ pkgmodulenames = {'distribute': 'setuptools'} pkgpatches = [('numpy', ['numpy-1.6.1_distutils_multiple-lib-dirs.patch'])] + +osdependencies=['zlib-devel'] From b0193cb8de1430f5b9518bdf8d81d63f00c2a0bd Mon Sep 17 00:00:00 2001 From: Kenneth Hoste Date: Sun, 19 Aug 2012 20:07:48 +0200 Subject: [PATCH 763/798] fix SLEPc build, set slepc_subdir in __init__ --- easybuild/easyblocks/s/slepc.py | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/easybuild/easyblocks/s/slepc.py b/easybuild/easyblocks/s/slepc.py index 31f3763928..186e8c3c38 100644 --- a/easybuild/easyblocks/s/slepc.py +++ b/easybuild/easyblocks/s/slepc.py @@ -41,6 +41,11 @@ def __init__(self, *args, **kwargs): self.slepc_arch_dir = None + self.slepc_subdir = '' + if self.getcfg('sourceinstall'): + self.slepc_subdir = os.path.join('%s-%s' % (self.name().lower(), self.version()), + os.getenv('PETSC_ARCH')) + @staticmethod def extra_options(): """Add extra config options specific to SLEPc.""" @@ -94,11 +99,6 @@ def configure(self): if not os.getenv('PETSC_ARCH'): env.set('PETSC_ARCH' , 'arch-installed-petsc') - self.slepc_subdir = '' - if self.getcfg('sourceinstall'): - self.slepc_subdir = os.path.join('%s-%s' % (self.name().lower(), self.version()), - os.getenv('PETSC_ARCH')) - def make_module_req_guess(self): """Specify correct LD_LIBRARY_PATH and CPATH for SLEPc installation.""" guesses = Application.make_module_req_guess(self) From 11755e3ed7362350237b40c45452a03eec908f64 Mon Sep 17 00:00:00 2001 From: Kenneth Hoste Date: Sun, 19 Aug 2012 22:26:15 +0200 Subject: [PATCH 764/798] change LAPACK to build dependency of ATLAS, set LAPACK env vars for ATLAS --- .../ATLAS/ATLAS-3.8.4-gompi-1.1.0-no-OFED-LAPACK-3.4.0.eb | 2 +- easybuild/easyconfigs/g/goalf/goalf-1.1.0-no-OFED.eb | 8 ++------ 2 files changed, 3 insertions(+), 7 deletions(-) diff --git a/easybuild/easyconfigs/a/ATLAS/ATLAS-3.8.4-gompi-1.1.0-no-OFED-LAPACK-3.4.0.eb b/easybuild/easyconfigs/a/ATLAS/ATLAS-3.8.4-gompi-1.1.0-no-OFED-LAPACK-3.4.0.eb index 1cab1769c5..9cea142bda 100644 --- a/easybuild/easyconfigs/a/ATLAS/ATLAS-3.8.4-gompi-1.1.0-no-OFED-LAPACK-3.4.0.eb +++ b/easybuild/easyconfigs/a/ATLAS/ATLAS-3.8.4-gompi-1.1.0-no-OFED-LAPACK-3.4.0.eb @@ -16,7 +16,7 @@ sourceURLs = [('http://sourceforge.net/projects/math-atlas/files/Stable/%s' % ve lapack = 'LAPACK' lapackver = '3.4.0' -dependencies = [(lapack, lapackver)] +builddependencies = [(lapack, lapackver)] versionsuffix = '-%s-%s' % (lapack, lapackver) patches = ['ATLAS-3.8.4_illegal-instruction-fix.patch'] diff --git a/easybuild/easyconfigs/g/goalf/goalf-1.1.0-no-OFED.eb b/easybuild/easyconfigs/g/goalf/goalf-1.1.0-no-OFED.eb index 8cbed925c2..5275c01ca8 100644 --- a/easybuild/easyconfigs/g/goalf/goalf-1.1.0-no-OFED.eb +++ b/easybuild/easyconfigs/g/goalf/goalf-1.1.0-no-OFED.eb @@ -17,10 +17,7 @@ comp = "%s-%s" % (comp_name, comp_version) blaslib = 'ATLAS' blasver = '3.8.4' blas = '%s-%s'%(blaslib, blasver) - -lapacklib = 'LAPACK' -lapackver = '3.4.0' -lapack = '%s-%s' % (lapacklib, lapackver) +blassuff = 'LAPACK-3.4.0' blacsver = '1.1' @@ -35,8 +32,7 @@ comp_mpi_tk = "%s-%s" % (comp_mpi_tk_name, comp_mpi_tk_ver) dependencies = [ ('GCC', '4.6.3'), # part of gompi-1.1.0 ('OpenMPI', '1.4.5-%s%s' % (comp, versionsuffix)), # part of gompi-1.1.0 - (blaslib, blasver, '-%s-%s' % (comp_mpi_tk, lapack)), - (lapacklib, lapackver, "-%s" % comp_mpi_tk), + (blaslib, blasver, '-%s-%s' % (comp_mpi_tk, blassuff)), ('FFTW', '3.3.1', "-%s" % comp_mpi_tk), ('BLACS', blacsver, "-%s" % comp_mpi_tk), ('ScaLAPACK','1.8.0', '-%s-%s-%s-BLACS-%s' % (comp_mpi_tk, blas, lapack, blacsver)) From cae76e3efcb22c082f8ba2a250000f22a5702d6d Mon Sep 17 00:00:00 2001 From: Kenneth Hoste Date: Sun, 19 Aug 2012 22:28:40 +0200 Subject: [PATCH 765/798] set LAPACK env vars for ATLAS (unless they were already set) --- easybuild/tools/toolkit.py | 3 +++ 1 file changed, 3 insertions(+) diff --git a/easybuild/tools/toolkit.py b/easybuild/tools/toolkit.py index c00366214e..e64d98ac87 100644 --- a/easybuild/tools/toolkit.py +++ b/easybuild/tools/toolkit.py @@ -357,6 +357,9 @@ def prepareATLAS(self): self.vars['BLAS_STATIC_LIBS'] = ','.join(["lib%s.a" % x for x in blas_libs]) self.vars['BLAS_MT_STATIC_LIBS'] = ','.join(["lib%s.a" % x for x in blas_mt_libs]) + if not self.vars.has_key('LIBLAPACK') and not self.vars.has_key('LIBLAPACK_MT'): + self.vars['LIBLAPACK'] = ' '.join(["lapack", self.vars['LIBBLAS']]) + self.vars['LIBLAPACK_MT'] = ' '.join(["lapack", self.vars['LIBBLAS_MT']]) self.vars['LAPACK_LIB_DIR'] = self.vars['BLAS_LIB_DIR'] self.vars['LAPACK_STATIC_LIBS'] = "liblapack.a," + self.vars['BLAS_STATIC_LIBS'] self.vars['LAPACK_MT_STATIC_LIBS'] = "liblapack.a," + self.vars['BLAS_MT_STATIC_LIBS'] From 2fafb2f7530193110d93acfc3a258e6f89c8d9f3 Mon Sep 17 00:00:00 2001 From: Kenneth Hoste Date: Sun, 19 Aug 2012 22:29:22 +0200 Subject: [PATCH 766/798] don't use patch file for Python which is intended for Intel compilers when building with GCC --- .../easyconfigs/p/Python/Python-2.7.3-goalf-1.1.0-no-OFED.eb | 2 -- 1 file changed, 2 deletions(-) diff --git a/easybuild/easyconfigs/p/Python/Python-2.7.3-goalf-1.1.0-no-OFED.eb b/easybuild/easyconfigs/p/Python/Python-2.7.3-goalf-1.1.0-no-OFED.eb index 04b913bfc0..e5a4cf4a33 100644 --- a/easybuild/easyconfigs/p/Python/Python-2.7.3-goalf-1.1.0-no-OFED.eb +++ b/easybuild/easyconfigs/p/Python/Python-2.7.3-goalf-1.1.0-no-OFED.eb @@ -18,8 +18,6 @@ sourceURLs = [ ] sources = ['%s-%s.tgz' % (name, version)] -patches = ['python_libffi_int128_icc.patch'] - # order is important! pkglist = [ ('nose', '1.1.2'), # used extends unit testing From 205b37c38d37eed6b6845411541de23e144addd5 Mon Sep 17 00:00:00 2001 From: Kenneth Hoste Date: Sun, 19 Aug 2012 22:29:55 +0200 Subject: [PATCH 767/798] limit saved config opts used in sanity check commands --- easybuild/easyblocks/d/dolfin.py | 27 ++++++++++++++------------- 1 file changed, 14 insertions(+), 13 deletions(-) diff --git a/easybuild/easyblocks/d/dolfin.py b/easybuild/easyblocks/d/dolfin.py index 41a99e1c86..954ffd62f6 100644 --- a/easybuild/easyblocks/d/dolfin.py +++ b/easybuild/easyblocks/d/dolfin.py @@ -56,17 +56,6 @@ def configure(self): self.updatecfg('configopts', '-DCMAKE_CXX_FLAGS="%s"' % cxxflags) self.updatecfg('configopts', '-DCMAKE_Fortran_FLAGS="%s"' % fflags) - # make sure that required dependencies are loaded - deps = ['Armadillo', 'Boost', 'CGAL', 'MTL4', 'ParMETIS', 'PETSc', 'Python', - 'SCOTCH', 'Sphinx', 'SLEPc', 'SuiteSparse', 'Trilinos', 'UFC', 'zlib'] - depsdict = {} - for dep in deps: - deproot = get_software_root(dep) - if not deproot: - self.log.error("Dependency %s not available." % dep) - else: - depsdict.update({dep:deproot}) - # run cmake in debug mode self.updatecfg('configopts', ' -DCMAKE_BUILD_TYPE=Debug') @@ -83,6 +72,20 @@ def configure(self): else: self.log.error('MPI_LIB_SHARED or MPI_INC_DIR not set, could not determine MPI-related paths.') + # save config options to reuse them later (e.g. for sanity check commands) + self.saved_configopts = self.getcfg('configopts') + + # make sure that required dependencies are loaded + deps = ['Armadillo', 'Boost', 'CGAL', 'MTL4', 'ParMETIS', 'PETSc', 'Python', + 'SCOTCH', 'Sphinx', 'SLEPc', 'SuiteSparse', 'Trilinos', 'UFC', 'zlib'] + depsdict = {} + for dep in deps: + deproot = get_software_root(dep) + if not deproot: + self.log.error("Dependency %s not available." % dep) + else: + depsdict.update({dep:deproot}) + # zlib self.updatecfg('configopts', '-DZLIB_INCLUDE_DIR=%s' % os.path.join(depsdict['zlib'], "include")) self.updatecfg('configopts', '-DZLIB_LIBRARY=%s' % os.path.join(depsdict['zlib'], "lib", "libz.a")) @@ -92,8 +95,6 @@ def configure(self): self.updatecfg('configopts', ' -DOpenMP_CXX_FLAGS="%s"' % openmp) self.updatecfg('configopts', ' -DOpenMP_C_FLAGS="%s"' % openmp) - self.saved_configopts = self.getcfg('configopts') - # Boost config parameters self.updatecfg('configopts', " -DBOOST_INCLUDEDIR=%s/include" % depsdict['Boost']) self.updatecfg('configopts', " -DBoost_DEBUG=ON -DBOOST_ROOT=%s" % depsdict['Boost']) From 6565f93e868e115edaff2cea8bb3c4a0fba9dfbb Mon Sep 17 00:00:00 2001 From: Kenneth Hoste Date: Sun, 19 Aug 2012 22:53:27 +0200 Subject: [PATCH 768/798] add zlib as dependency for libxml2 --- .../l/libxml2/libxml2-2.8.0-goalf-1.1.0-no-OFED.eb | 4 +++- easybuild/easyconfigs/l/libxml2/libxml2-2.8.0-ictce-4.0.6.eb | 4 +++- 2 files changed, 6 insertions(+), 2 deletions(-) diff --git a/easybuild/easyconfigs/l/libxml2/libxml2-2.8.0-goalf-1.1.0-no-OFED.eb b/easybuild/easyconfigs/l/libxml2/libxml2-2.8.0-goalf-1.1.0-no-OFED.eb index 2637d52cd2..a63694cac0 100644 --- a/easybuild/easyconfigs/l/libxml2/libxml2-2.8.0-goalf-1.1.0-no-OFED.eb +++ b/easybuild/easyconfigs/l/libxml2/libxml2-2.8.0-goalf-1.1.0-no-OFED.eb @@ -13,4 +13,6 @@ sourceURLs = [ 'http://xmlsoft.org/sources/', 'http://xmlsoft.org/sources/old/' ] -sources = ['%s-%s.tar.gz' % (name.lower(), version)] \ No newline at end of file +sources = ['%s-%s.tar.gz' % (name.lower(), version)] + +dependencies = [('zlib', '1.2.7')] \ No newline at end of file diff --git a/easybuild/easyconfigs/l/libxml2/libxml2-2.8.0-ictce-4.0.6.eb b/easybuild/easyconfigs/l/libxml2/libxml2-2.8.0-ictce-4.0.6.eb index f2477b4253..7f718cea9f 100644 --- a/easybuild/easyconfigs/l/libxml2/libxml2-2.8.0-ictce-4.0.6.eb +++ b/easybuild/easyconfigs/l/libxml2/libxml2-2.8.0-ictce-4.0.6.eb @@ -13,4 +13,6 @@ sourceURLs = [ 'http://xmlsoft.org/sources/', 'http://xmlsoft.org/sources/old/' ] -sources = ['%s-%s.tar.gz' % (name.lower(), version)] \ No newline at end of file +sources = ['%s-%s.tar.gz' % (name.lower(), version)] + +dependencies = [('zlib', '1.2.7')] \ No newline at end of file From f9e21f2e22399a34ae4f48b7d421017b7e4b1e65 Mon Sep 17 00:00:00 2001 From: Kenneth Hoste Date: Sun, 19 Aug 2012 23:00:36 +0200 Subject: [PATCH 769/798] add easyblock for Hypre --- easybuild/easyblocks/h/hypre.py | 56 +++++++++++++++++++++++++++++++++ 1 file changed, 56 insertions(+) create mode 100644 easybuild/easyblocks/h/hypre.py diff --git a/easybuild/easyblocks/h/hypre.py b/easybuild/easyblocks/h/hypre.py new file mode 100644 index 0000000000..a1d58d63fa --- /dev/null +++ b/easybuild/easyblocks/h/hypre.py @@ -0,0 +1,56 @@ +# Copyright 2012 Kenneth Hoste +# +# This file is part of EasyBuild, +# originally created by the HPC team of the University of Ghent (http://ugent.be/hpc). +# +# http://github.com/hpcugent/easybuild +# +# EasyBuild is free software: you can redistribute it and/or modify +# it under the terms of the GNU General Public License as published by +# the Free Software Foundation v2. +# +# EasyBuild is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with EasyBuild. If not, see . +## +""" +EasyBuild support for Hypre, implemented as an easyblock +""" +import os + +from easybuild.framework.application import Application + + +class EB_Hypre(Application): + """Support for building Hypre.""" + + def configure(self): + """Configure Hypre build after setting extra configure options.""" + + self.updatecfg('configopts', '--with-MPI-include=%s' % os.getenv('MPI_INC_DIR')) + + for dep in ["BLAS", "LAPACK"]: + libs = ' '.join(os.getenv('%s_STATIC_LIBS' % dep).split(',')) + self.updatecfg('configopts', '--with-%s-libs="%s"' % (dep.lower(), libs)) + self.updatecfg('configopts', '--with-%s-lib-dirs="%s"' % (dep.lower(), + os.getenv('%s_LIB_DIR' % dep))) + + Application.configure(self) + + def sanitycheck(self): + """Custom sanity check for Hypre.""" + + if not self.getcfg('sanityCheckPaths'): + + self.setcfg('sanityCheckPaths', { + 'files':['lib/libHYPRE.a'], + 'dirs':['include'] + }) + + self.log.info("Customized sanity check paths: %s" % self.getcfg('sanityCheckPaths')) + + Application.sanitycheck(self) \ No newline at end of file From d076236f870912d18ff52268de71588507229626 Mon Sep 17 00:00:00 2001 From: Kenneth Hoste Date: Sun, 19 Aug 2012 23:44:19 +0200 Subject: [PATCH 770/798] fix missing import in parallelbuild.py --- easybuild/tools/parallelbuild.py | 1 + 1 file changed, 1 insertion(+) diff --git a/easybuild/tools/parallelbuild.py b/easybuild/tools/parallelbuild.py index c20868d422..45e5677445 100644 --- a/easybuild/tools/parallelbuild.py +++ b/easybuild/tools/parallelbuild.py @@ -28,6 +28,7 @@ import os import re +import easybuild.tools.config as config from easybuild.framework.application import get_class from easybuild.tools.pbs_job import PbsJob from easybuild.tools.config import getRepository From a2aef69b1632519ac27dc195a70dabd8acc8f530 Mon Sep 17 00:00:00 2001 From: Kenneth Hoste Date: Mon, 20 Aug 2012 09:02:59 +0200 Subject: [PATCH 771/798] improve debug info when submitting a build through jobs --- easybuild/build.py | 2 ++ easybuild/tools/parallelbuild.py | 9 ++++++--- 2 files changed, 8 insertions(+), 3 deletions(-) diff --git a/easybuild/build.py b/easybuild/build.py index 99c0a4002b..5940d569a9 100755 --- a/easybuild/build.py +++ b/easybuild/build.py @@ -261,8 +261,10 @@ def main(): command = "cd %s && %s %%s %s" % (curdir, eb_path, opts) jobs = parbuild.build_packages_in_parallel(command, orderedSpecs, "easybuild-build", log) + print "List of submitted jobs:" for job in jobs: print "%s: %s" % (job.name, job.jobid) + print "(%d jobs submitted)" % len(jobs) log.info("Submitted parallel build jobs, exiting now") sys.exit(0) diff --git a/easybuild/tools/parallelbuild.py b/easybuild/tools/parallelbuild.py index 45e5677445..ab0d3852cf 100644 --- a/easybuild/tools/parallelbuild.py +++ b/easybuild/tools/parallelbuild.py @@ -43,7 +43,8 @@ def build_packages_in_parallel(build_command, packages, output_dir, log): """ log.info("going to build these packages in parallel: %s", packages) job_module_dict = {} - # dependencies have already been resolved this means one can linearly walk over the list and use previous job id's + # dependencies have already been resolved, + # so one can linearly walk over the list and use previous job id's jobs = [] for pkg in packages: # This is very important, otherwise we might have race conditions @@ -53,7 +54,7 @@ def build_packages_in_parallel(build_command, packages, output_dir, log): # the new job will only depend on already submitted jobs log.info("creating job for pkg: %s" % str(pkg)) - new_job = create_job(build_command, pkg, output_dir) + new_job = create_job(build_command, pkg, log, output_dir) # Sometimes unresolvedDependencies will contain things, not needed to be build. job_deps = [job_module_dict[dep] for dep in pkg['unresolvedDependencies'] if dep in job_module_dict] new_job.add_dependencies(job_deps) @@ -66,7 +67,7 @@ def build_packages_in_parallel(build_command, packages, output_dir, log): return jobs -def create_job(build_command, package, output_dir=""): +def create_job(build_command, package, log, output_dir=""): """ Creates a job, to build a *single* package build_command is a format string in which a full path to an eb file will be substituted @@ -89,6 +90,8 @@ def create_job(build_command, package, output_dir=""): if env_var in os.environ: easybuild_vars[env_var] = os.environ[env_var] + log.info("Dictionary of environment variables passed to job: %s" % easybuild_vars) + # create unique name based on module name name = "%s-%s" % package['module'] From fe07aaca758a66dece7a5ad4bd07f89df9b62596 Mon Sep 17 00:00:00 2001 From: Kenneth Hoste Date: Mon, 20 Aug 2012 09:03:35 +0200 Subject: [PATCH 772/798] disable all mail, move imports to the top where they should be --- easybuild/tools/pbs_job.py | 36 +++++++++++++++++++++++++----------- 1 file changed, 25 insertions(+), 11 deletions(-) diff --git a/easybuild/tools/pbs_job.py b/easybuild/tools/pbs_job.py index 5c88af4d6c..e98838b1e9 100644 --- a/easybuild/tools/pbs_job.py +++ b/easybuild/tools/pbs_job.py @@ -25,6 +25,12 @@ import os +try: + from PBSQuery import PBSQuery + import pbs +except ImportError: + pass + from easybuild.tools.build_log import getLog MAX_WALLTIME = 72 @@ -47,19 +53,19 @@ def __init__(self, script, name, env_vars=None, resources={}): self.env_vars = {} self.name = name - global pbs - global PBSQuery try: - from PBSQuery import PBSQuery - import pbs - except ImportError: - self.log.error("Cannot import PBSQuery or pbs. Please make sure pbs_python is installed and usable.") + # try and use pbs and PBSQuery to see if they're there + pbs.pbs_default() + PBSQuery() + except NameError, err: + self.log.error("PBSQuery or pbs modules not available: %s\n" \ + "Please make sure pbs_python is installed and usable." % err) try: self.pbs_server = pbs.pbs_default() self.pbsconn = pbs.pbs_connect(self.pbs_server) - except: - self.log.error("Could not connect to the default pbs server, is this correctly configured?") + except Exception, err: + self.log.error("Failed to connect to the default pbs server: %s" % err) # setup the resources requested @@ -142,6 +148,12 @@ def submit(self): pbs_attributes.extend(variable_attributes) + # mail settings + mail_attributes = pbs.new_attropl(1) + mail_attributes[0].name = 'Mail_Points' + mail_attributes[0].value = 'n' # disable all mail + pbs_attributes.extend(mail_attributes) + import tempfile fh, scriptfn = tempfile.mkstemp() f = os.fdopen(fh, 'w') @@ -259,15 +271,17 @@ def get_ppn(self): """Guess the ppn for full node""" pq = PBSQuery() node_vals = pq.getnodes().values() ## only the values, not the names - interesni_nodes = ('free', 'job-exclusive',) + interesting_nodes = ('free', 'job-exclusive',) res = {} - for np in [int(x['np'][0]) for x in node_vals if x['state'][0] in interesni_nodes]: + for np in [int(x['np'][0]) for x in node_vals if x['state'][0] in interesting_nodes]: res.setdefault(np, 0) res[np] += 1 ## return most frequent freq_count, freq_np = max([(j, i) for i, j in res.items()]) - self.log.debug("Found most frequent np %s (%s times) in interesni nodes %s" % (freq_np, freq_count, interesni_nodes)) + self.log.debug("Found most frequent np %s (%s times) in interesni nodes %s" % (freq_np, + freq_count, + interesting_nodes)) return freq_np From b6889fe1978440d890cae1d347d3c5ae5f9799e8 Mon Sep 17 00:00:00 2001 From: Kenneth Hoste Date: Mon, 20 Aug 2012 12:02:20 +0200 Subject: [PATCH 773/798] fix logic for obtaining correct config file, add debug info --- easybuild/build.py | 17 ++++++++++++----- 1 file changed, 12 insertions(+), 5 deletions(-) diff --git a/easybuild/build.py b/easybuild/build.py index 5940d569a9..1fde0a0a25 100755 --- a/easybuild/build.py +++ b/easybuild/build.py @@ -159,11 +159,18 @@ def main(): # - last, use default config file easybuild_config.py in build.py directory config_file = options.config - if not config_file and os.getenv(config.environmentVariables['configFile']): - config_file = os.getenv(config.environmentVariables['configFile']) - else: - appPath = os.path.dirname(os.path.realpath(sys.argv[0])) - config_file = os.path.join(appPath, "easybuild_config.py") + if not config_file: + log.debug("No config file specified on command line, trying other options.") + + config_env_var = config.environmentVariables['configFile'] + if os.getenv(config_env_var): + log.debug("Environment variable %s, so using that as config file." % config_env_var) + config_file = os.getenv(config_env_var) + else: + appPath = os.path.dirname(os.path.realpath(sys.argv[0])) + config_file = os.path.join(appPath, "easybuild_config.py") + log.debug("Falling back to default config: %s" % config_file) + config.init(config_file, **configOptions) # Dump possible options From fd1394af387464d3fbdf74aff43cc639717f08ba Mon Sep 17 00:00:00 2001 From: Kenneth Hoste Date: Tue, 21 Aug 2012 11:13:23 +0200 Subject: [PATCH 774/798] ported support for building/installing BiSearch --- easybuild/easyblocks/b/bisearch.py | 63 +++++++++++++++++++ .../BiSearch-20051222-goalf-1.1.0-no-OFED.eb | 9 +++ .../BiSearch/BiSearch-20051222-ictce-4.0.6.eb | 9 +++ 3 files changed, 81 insertions(+) create mode 100644 easybuild/easyblocks/b/bisearch.py create mode 100644 easybuild/easyconfigs/b/BiSearch/BiSearch-20051222-goalf-1.1.0-no-OFED.eb create mode 100644 easybuild/easyconfigs/b/BiSearch/BiSearch-20051222-ictce-4.0.6.eb diff --git a/easybuild/easyblocks/b/bisearch.py b/easybuild/easyblocks/b/bisearch.py new file mode 100644 index 0000000000..a3d779f812 --- /dev/null +++ b/easybuild/easyblocks/b/bisearch.py @@ -0,0 +1,63 @@ +## +# Copyright 2009-2012 Stijn De Weirdt +# Copyright 2010 Dries Verdegem +# Copyright 2010-2012 Kenneth Hoste +# Copyright 2011 Pieter De Baets +# Copyright 2011-2012 Jens Timmerman +# +# This file is part of EasyBuild, +# originally created by the HPC team of the University of Ghent (http://ugent.be/hpc). +# +# http://github.com/hpcugent/easybuild +# +# EasyBuild is free software: you can redistribute it and/or modify +# it under the terms of the GNU General Public License as published by +# the Free Software Foundation v2. +# +# EasyBuild is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with EasyBuild. If not, see . +## +""" +EasyBuild support for BiSearch, implemented as an easyblock +""" +import os + +from easybuild.framework.application import Application +from easybuild.tools.filetools import run_cmd_qa + + +class EB_BiSearch(Application): + + def configure(self): + pass + + def make(self): + pass + + def make_install(self): + cmd = "./install.sh" + + qanda = { + 'Please enter the BiSearch root directory: ': self.installdir, + 'Please enter the path of c++ compiler [/usr/bin/g++]: ': os.getenv('CXX') + } + + run_cmd_qa(cmd, qanda, log_all=True, simple=True) + + def sanitycheck(self): + + if not self.getcfg('sanityCheckPaths'): + self.setcfg('sanityCheckPaths', {'files':["bin/%s" % x for x in ["fpcr", "indexing_cdna", + "indexing_genome", "makecomp"]], + 'dirs':[] + } + ) + + self.log.info("Customized sanity check paths: %s" % self.getcfg('sanityCheckPaths')) + + Application.sanitycheck(self) diff --git a/easybuild/easyconfigs/b/BiSearch/BiSearch-20051222-goalf-1.1.0-no-OFED.eb b/easybuild/easyconfigs/b/BiSearch/BiSearch-20051222-goalf-1.1.0-no-OFED.eb new file mode 100644 index 0000000000..2e20b344c5 --- /dev/null +++ b/easybuild/easyconfigs/b/BiSearch/BiSearch-20051222-goalf-1.1.0-no-OFED.eb @@ -0,0 +1,9 @@ +name = 'BiSearch' +version = '20051222' + +homepage = 'http://bisearch.enzim.hu/' +description = """BiSearch is a primer-design algorithm for DNA sequences.""" + +toolkit={'name': 'goalf', 'version': '1.1.0-no-OFED'} + +sources = ['%s_%s.tar.gz' % (name.lower(), version)] diff --git a/easybuild/easyconfigs/b/BiSearch/BiSearch-20051222-ictce-4.0.6.eb b/easybuild/easyconfigs/b/BiSearch/BiSearch-20051222-ictce-4.0.6.eb new file mode 100644 index 0000000000..048835d5a6 --- /dev/null +++ b/easybuild/easyconfigs/b/BiSearch/BiSearch-20051222-ictce-4.0.6.eb @@ -0,0 +1,9 @@ +name = 'BiSearch' +version = '20051222' + +homepage = 'http://bisearch.enzim.hu/' +description = """BiSearch is a primer-design algorithm for DNA sequences.""" + +toolkit={'name': 'ictce', 'version': '4.0.6'} + +sources = ['%s_%s.tar.gz' % (name.lower(), version)] From 5ab8f6d074a5344102fd704c81a002ab9fc25b72 Mon Sep 17 00:00:00 2001 From: Kenneth Hoste Date: Tue, 21 Aug 2012 14:48:28 +0200 Subject: [PATCH 775/798] ported support for Primer3 --- easybuild/easyblocks/b/bisearch.py | 3 + easybuild/easyblocks/p/primer3.py | 82 +++++++++++++++++++ .../Primer3-2.3.0-goalf-1.1.0-no-OFED.eb | 14 ++++ .../p/Primer3/Primer3-2.3.0-ictce-4.0.6.eb | 14 ++++ 4 files changed, 113 insertions(+) create mode 100644 easybuild/easyblocks/p/primer3.py create mode 100644 easybuild/easyconfigs/p/Primer3/Primer3-2.3.0-goalf-1.1.0-no-OFED.eb create mode 100644 easybuild/easyconfigs/p/Primer3/Primer3-2.3.0-ictce-4.0.6.eb diff --git a/easybuild/easyblocks/b/bisearch.py b/easybuild/easyblocks/b/bisearch.py index a3d779f812..57c59b3ec9 100644 --- a/easybuild/easyblocks/b/bisearch.py +++ b/easybuild/easyblocks/b/bisearch.py @@ -34,9 +34,11 @@ class EB_BiSearch(Application): def configure(self): + """(no configure)""" pass def make(self): + """(empty, building is performed in make_install step)""" pass def make_install(self): @@ -50,6 +52,7 @@ def make_install(self): run_cmd_qa(cmd, qanda, log_all=True, simple=True) def sanitycheck(self): + """Custom sanity check for BiSearch.""" if not self.getcfg('sanityCheckPaths'): self.setcfg('sanityCheckPaths', {'files':["bin/%s" % x for x in ["fpcr", "indexing_cdna", diff --git a/easybuild/easyblocks/p/primer3.py b/easybuild/easyblocks/p/primer3.py new file mode 100644 index 0000000000..67cec38dfa --- /dev/null +++ b/easybuild/easyblocks/p/primer3.py @@ -0,0 +1,82 @@ +## +# Copyright 2009-2012 Stijn De Weirdt +# Copyright 2010 Dries Verdegem +# Copyright 2010-2012 Kenneth Hoste +# Copyright 2011 Pieter De Baets +# Copyright 2011-2012 Jens Timmerman +# +# This file is part of EasyBuild, +# originally created by the HPC team of the University of Ghent (http://ugent.be/hpc). +# +# http://github.com/hpcugent/easybuild +# +# EasyBuild is free software: you can redistribute it and/or modify +# it under the terms of the GNU General Public License as published by +# the Free Software Foundation v2. +# +# EasyBuild is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with EasyBuild. If not, see . +## +""" +EasyBuild support for Primer3, implemented as an easyblock +""" +import os + +from easybuild.framework.application import Application + + +class EB_Primer3(Application): + + def __init__(self, *args, **kwargs): + """Specify that Primer3 should be built in install directory, and set correct startfrom dir.""" + + Application.__init__(self, *args, **kwargs) + + self.build_in_installdir = True + + self.bindir = "%s-%s/src" % (self.name().lower(), self.version()) + + self.setcfg('startfrom', 'src') + + def configure(self): + """Configure Primer3 build by setting make options.""" + + self.updatecfg('makeopts', 'CC="%s" CPP="%s" O_OPTS="%s" all' % (os.getenv('CC'), + os.getenv('CXX'), + os.getenv('CFLAGS'))) + + # default make should be fine + + def make_install(self): + """(no make install)""" + pass + + def sanitycheck(self): + """Custom sanity check for Primer3.""" + + if not self.getcfg('sanityCheckPaths'): + self.setcfg('sanityCheckPaths', {'files':["%s/%s" % (self.bindir, x) for x in ["primer3_core", + "ntdpal", + "oligotm", + "long_seq_tm_test"]], + 'dirs':[] + } + ) + + self.log.info("Customized sanity check paths: %s" % self.getcfg('sanityCheckPaths')) + + Application.sanitycheck(self) + + def make_module_req_guess(self): + """Correct suggestion for PATH variable.""" + + guesses = Application.make_module_req_guess(self) + + guesses.update({'PATH':[self.bindir]}) + + return guesses diff --git a/easybuild/easyconfigs/p/Primer3/Primer3-2.3.0-goalf-1.1.0-no-OFED.eb b/easybuild/easyconfigs/p/Primer3/Primer3-2.3.0-goalf-1.1.0-no-OFED.eb new file mode 100644 index 0000000000..1514a9ea28 --- /dev/null +++ b/easybuild/easyconfigs/p/Primer3/Primer3-2.3.0-goalf-1.1.0-no-OFED.eb @@ -0,0 +1,14 @@ +name = 'Primer3' +version = '2.3.0' + +homepage = 'http://primer3.sourceforge.net' +description = """Primer3 is a widely used program for designing PCR primers (PCR = "Polymerase Chain Reaction"). +PCR is an essential and ubiquitous tool in genetics and molecular biology. +Primer3 can also design hybridization probes and sequencing primers.""" + +toolkit = {'name':'goalf','version':'1.1.0-no-OFED'} + +sourceURLs = ['http://prdownloads.sourceforge.net/primer3'] +sources = ['%s-%s.tar.gz' % (name.lower(), version)] + +runtest = 'test' diff --git a/easybuild/easyconfigs/p/Primer3/Primer3-2.3.0-ictce-4.0.6.eb b/easybuild/easyconfigs/p/Primer3/Primer3-2.3.0-ictce-4.0.6.eb new file mode 100644 index 0000000000..adccf93f42 --- /dev/null +++ b/easybuild/easyconfigs/p/Primer3/Primer3-2.3.0-ictce-4.0.6.eb @@ -0,0 +1,14 @@ +name = 'Primer3' +version = '2.3.0' + +homepage = 'http://primer3.sourceforge.net' +description = """Primer3 is a widely used program for designing PCR primers (PCR = "Polymerase Chain Reaction"). +PCR is an essential and ubiquitous tool in genetics and molecular biology. +Primer3 can also design hybridization probes and sequencing primers.""" + +toolkit = {'name':'ictce','version':'4.0.6'} + +sourceURLs = ['http://prdownloads.sourceforge.net/primer3'] +sources = ['%s-%s.tar.gz' % (name.lower(), version)] + +runtest = 'test' From 7716c6b70cb7e2828be86033f593f5ddc642b121 Mon Sep 17 00:00:00 2001 From: Kenneth Hoste Date: Tue, 21 Aug 2012 17:24:03 +0200 Subject: [PATCH 776/798] code style fixes --- easybuild/easyblocks/b/bisearch.py | 4 ++++ easybuild/easyblocks/p/primer3.py | 4 ++++ .../b/BiSearch/BiSearch-20051222-goalf-1.1.0-no-OFED.eb | 2 +- .../easyconfigs/b/BiSearch/BiSearch-20051222-ictce-4.0.6.eb | 2 +- 4 files changed, 10 insertions(+), 2 deletions(-) diff --git a/easybuild/easyblocks/b/bisearch.py b/easybuild/easyblocks/b/bisearch.py index 57c59b3ec9..2c5ea227f8 100644 --- a/easybuild/easyblocks/b/bisearch.py +++ b/easybuild/easyblocks/b/bisearch.py @@ -32,6 +32,10 @@ class EB_BiSearch(Application): + """ + Support for building BiSearch. + Basically just run the interactive installation script install.sh. + """ def configure(self): """(no configure)""" diff --git a/easybuild/easyblocks/p/primer3.py b/easybuild/easyblocks/p/primer3.py index 67cec38dfa..f552eecf23 100644 --- a/easybuild/easyblocks/p/primer3.py +++ b/easybuild/easyblocks/p/primer3.py @@ -31,6 +31,10 @@ class EB_Primer3(Application): + """ + Support for building Primer3. + Configure and build in installation dir. + """ def __init__(self, *args, **kwargs): """Specify that Primer3 should be built in install directory, and set correct startfrom dir.""" diff --git a/easybuild/easyconfigs/b/BiSearch/BiSearch-20051222-goalf-1.1.0-no-OFED.eb b/easybuild/easyconfigs/b/BiSearch/BiSearch-20051222-goalf-1.1.0-no-OFED.eb index 2e20b344c5..d6c482c873 100644 --- a/easybuild/easyconfigs/b/BiSearch/BiSearch-20051222-goalf-1.1.0-no-OFED.eb +++ b/easybuild/easyconfigs/b/BiSearch/BiSearch-20051222-goalf-1.1.0-no-OFED.eb @@ -4,6 +4,6 @@ version = '20051222' homepage = 'http://bisearch.enzim.hu/' description = """BiSearch is a primer-design algorithm for DNA sequences.""" -toolkit={'name': 'goalf', 'version': '1.1.0-no-OFED'} +toolkit = {'name': 'goalf', 'version': '1.1.0-no-OFED'} sources = ['%s_%s.tar.gz' % (name.lower(), version)] diff --git a/easybuild/easyconfigs/b/BiSearch/BiSearch-20051222-ictce-4.0.6.eb b/easybuild/easyconfigs/b/BiSearch/BiSearch-20051222-ictce-4.0.6.eb index 048835d5a6..b19f650492 100644 --- a/easybuild/easyconfigs/b/BiSearch/BiSearch-20051222-ictce-4.0.6.eb +++ b/easybuild/easyconfigs/b/BiSearch/BiSearch-20051222-ictce-4.0.6.eb @@ -4,6 +4,6 @@ version = '20051222' homepage = 'http://bisearch.enzim.hu/' description = """BiSearch is a primer-design algorithm for DNA sequences.""" -toolkit={'name': 'ictce', 'version': '4.0.6'} +toolkit = {'name': 'ictce', 'version': '4.0.6'} sources = ['%s_%s.tar.gz' % (name.lower(), version)] From 64a25114b27e0015b7b70d14f5c9ccfa4a115c63 Mon Sep 17 00:00:00 2001 From: Jens Timmerman Date: Wed, 22 Aug 2012 11:58:06 +0300 Subject: [PATCH 777/798] gotta catch them all. --- easybuild/tools/repository.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/easybuild/tools/repository.py b/easybuild/tools/repository.py index 9d051dd3ea..e69bc2d154 100644 --- a/easybuild/tools/repository.py +++ b/easybuild/tools/repository.py @@ -215,7 +215,7 @@ def setupRepo(self): Set up git repository. """ try: - raise git.GitCommandError + git.GitCommandError except NameError, err: log.exception("It seems like GitPython is not available: %s" % err) self.wc = tempfile.mkdtemp(prefix='git-wc-') From c8706a9dfa287b0f4ab509af34272168748a66fd Mon Sep 17 00:00:00 2001 From: Jens Timmerman Date: Wed, 22 Aug 2012 12:11:13 +0300 Subject: [PATCH 778/798] remove extra make_devel_module Why do we create it in the build dir anyway? --- easybuild/framework/application.py | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/easybuild/framework/application.py b/easybuild/framework/application.py index a5ed57fed6..a4c2fb9227 100644 --- a/easybuild/framework/application.py +++ b/easybuild/framework/application.py @@ -915,7 +915,6 @@ def prepare(self): """ self.toolkit().prepare(self.getcfg('onlytkmod')) self.startfrom() - self.make_devel_module(create_in_builddir=True) def configure(self, cmd_prefix=''): @@ -1117,7 +1116,7 @@ def make_module(self, fake=False): return modpath - def make_devel_module(self, create_in_builddir=False): + def vim _module(self, create_in_builddir=False): """ Create a develop module file which sets environment based on the build Usage: module load name, which loads the module you want to use. $EBDEVELNAME should then be the full path From 0bcae45ee5436aec30704fa953622a40dbed3c5d Mon Sep 17 00:00:00 2001 From: Jens Timmerman Date: Wed, 22 Aug 2012 12:14:04 +0300 Subject: [PATCH 779/798] fix accidental change in last commit. --- easybuild/framework/application.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/easybuild/framework/application.py b/easybuild/framework/application.py index a4c2fb9227..0e1524dd98 100644 --- a/easybuild/framework/application.py +++ b/easybuild/framework/application.py @@ -1116,7 +1116,7 @@ def make_module(self, fake=False): return modpath - def vim _module(self, create_in_builddir=False): + def make_devel_module(self, create_in_builddir=False): """ Create a develop module file which sets environment based on the build Usage: module load name, which loads the module you want to use. $EBDEVELNAME should then be the full path From f90f2ec0ca520bd50bf68542d415a7d50e29f11a Mon Sep 17 00:00:00 2001 From: Kenneth Hoste Date: Wed, 22 Aug 2012 16:43:30 +0200 Subject: [PATCH 780/798] don't raise GitCommandError, just try to acces it --- easybuild/tools/repository.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/easybuild/tools/repository.py b/easybuild/tools/repository.py index 9d051dd3ea..e69bc2d154 100644 --- a/easybuild/tools/repository.py +++ b/easybuild/tools/repository.py @@ -215,7 +215,7 @@ def setupRepo(self): Set up git repository. """ try: - raise git.GitCommandError + git.GitCommandError except NameError, err: log.exception("It seems like GitPython is not available: %s" % err) self.wc = tempfile.mkdtemp(prefix='git-wc-') From e5a3ab8ea53a89a2ecab38c808ca31c698148a3c Mon Sep 17 00:00:00 2001 From: Kenneth Hoste Date: Wed, 22 Aug 2012 18:09:53 +0200 Subject: [PATCH 781/798] minor code style fixes for BiSearch and Primer3 --- easybuild/easyblocks/b/bisearch.py | 4 ++-- easybuild/easyblocks/p/primer3.py | 6 +++--- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/easybuild/easyblocks/b/bisearch.py b/easybuild/easyblocks/b/bisearch.py index 2c5ea227f8..4f4272efb2 100644 --- a/easybuild/easyblocks/b/bisearch.py +++ b/easybuild/easyblocks/b/bisearch.py @@ -51,7 +51,7 @@ def make_install(self): qanda = { 'Please enter the BiSearch root directory: ': self.installdir, 'Please enter the path of c++ compiler [/usr/bin/g++]: ': os.getenv('CXX') - } + } run_cmd_qa(cmd, qanda, log_all=True, simple=True) @@ -61,7 +61,7 @@ def sanitycheck(self): if not self.getcfg('sanityCheckPaths'): self.setcfg('sanityCheckPaths', {'files':["bin/%s" % x for x in ["fpcr", "indexing_cdna", "indexing_genome", "makecomp"]], - 'dirs':[] + 'dirs':[] } ) diff --git a/easybuild/easyblocks/p/primer3.py b/easybuild/easyblocks/p/primer3.py index f552eecf23..8c3b2b1424 100644 --- a/easybuild/easyblocks/p/primer3.py +++ b/easybuild/easyblocks/p/primer3.py @@ -37,7 +37,7 @@ class EB_Primer3(Application): """ def __init__(self, *args, **kwargs): - """Specify that Primer3 should be built in install directory, and set correct startfrom dir.""" + """Custom initialization for Primer3: build in install dir, set correct bin dir, specify to start from 'src'.""" Application.__init__(self, *args, **kwargs) @@ -68,7 +68,7 @@ def sanitycheck(self): "ntdpal", "oligotm", "long_seq_tm_test"]], - 'dirs':[] + 'dirs':[] } ) @@ -81,6 +81,6 @@ def make_module_req_guess(self): guesses = Application.make_module_req_guess(self) - guesses.update({'PATH':[self.bindir]}) + guesses.update({'PATH': [self.bindir]}) return guesses From ec1f7e4a7fe63aa353fde9c921c2477627661004 Mon Sep 17 00:00:00 2001 From: Kenneth Hoste Date: Thu, 23 Aug 2012 07:32:45 +0200 Subject: [PATCH 782/798] hotfix for goalf easyconfig --- easybuild/easyconfigs/g/goalf/goalf-1.1.0-no-OFED.eb | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/easybuild/easyconfigs/g/goalf/goalf-1.1.0-no-OFED.eb b/easybuild/easyconfigs/g/goalf/goalf-1.1.0-no-OFED.eb index 5275c01ca8..804f4462d0 100644 --- a/easybuild/easyconfigs/g/goalf/goalf-1.1.0-no-OFED.eb +++ b/easybuild/easyconfigs/g/goalf/goalf-1.1.0-no-OFED.eb @@ -6,7 +6,7 @@ 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.""" +OpenMPI for MPI support, ATLAS (BLAS and LAPACK support), FFTW and ScaLAPACK.""" toolkit = {'name': 'dummy', 'version': 'dummy'} @@ -35,7 +35,7 @@ dependencies = [ (blaslib, blasver, '-%s-%s' % (comp_mpi_tk, blassuff)), ('FFTW', '3.3.1', "-%s" % comp_mpi_tk), ('BLACS', blacsver, "-%s" % comp_mpi_tk), - ('ScaLAPACK','1.8.0', '-%s-%s-%s-BLACS-%s' % (comp_mpi_tk, blas, lapack, blacsver)) + ('ScaLAPACK','1.8.0', '-%s-%s-%s-BLACS-%s' % (comp_mpi_tk, blas, blassuff, blacsver)) ] moduleclass = 'compiler' From 5305ed82e23ac3e9580277cb249fb1e17eceab51 Mon Sep 17 00:00:00 2001 From: Jens Timmerman Date: Thu, 23 Aug 2012 10:39:55 +0200 Subject: [PATCH 783/798] fixes in Pasha and tbb + apply patch for recent libstdc++ with intel compilers aswell (closes issue #142) --- easybuild/easyblocks/p/pasha.py | 6 +++--- easybuild/easyblocks/t/tbb.py | 5 ++++- easybuild/easyconfigs/p/Pasha/Pasha-1.0.3-ictce-4.0.6.eb | 6 +++++- 3 files changed, 12 insertions(+), 5 deletions(-) diff --git a/easybuild/easyblocks/p/pasha.py b/easybuild/easyblocks/p/pasha.py index 28583fabd2..7d271d1b6b 100644 --- a/easybuild/easyblocks/p/pasha.py +++ b/easybuild/easyblocks/p/pasha.py @@ -39,9 +39,9 @@ def configure(self): if not tbb: self.log.error("TBB module not loaded.") - self.updatecfg('makeopts', "TBB_DIR=%s/tbb MPI_DIR='' MPI_INC=''") - self.updatecfg('makeopts', "MPI_CXX=$MPICXX OPM_FLAG=%s" % (tbb, self.toolkit().get_openmp_flag())) - self.updatecfg('makeopts', "MPI_LIB='' MY_CXX=$CXX MPICH_IGNORE_CXX_SEEK=1") + self.updatecfg('makeopts', "TBB_DIR=%s/tbb MPI_DIR='' MPI_INC='' " % tbb) + self.updatecfg('makeopts', 'MPI_CXX="%s" OPM_FLAG="%s"' % (os.getenv('MPICXX'), self.toolkit().get_openmp_flag())) + self.updatecfg('makeopts', 'MPI_LIB="" MY_CXX="%s" MPICH_IGNORE_CXX_SEEK=1' % os.getenv('CXX')) def make_install(self): """Install by copying everything from 'bin' subdir in build dir to install dir""" diff --git a/easybuild/easyblocks/t/tbb.py b/easybuild/easyblocks/t/tbb.py index cf7d3af2d0..a85ee2b186 100644 --- a/easybuild/easyblocks/t/tbb.py +++ b/easybuild/easyblocks/t/tbb.py @@ -42,16 +42,19 @@ def make_install(self): # save libdir os.chdir(self.installdir) - libglob = 'tbb/libs/intel64/cc*libc*_kernel*' + libglob = 'tbb/lib/intel64/cc*libc*_kernel*' libs = glob.glob(libglob) if len(libs): libdir = libs[-1] # take the last one, should be ordered by cc version. + # we're only interested in the last bit + libdir = libdir.split('/')[-1] else: self.log.error("No libs found using %s in %s" % (libglob, self.installdir)) self.libdir = libdir self.libpath = "%s/tbb/libs/intel64/%s/" % (self.installdir, libdir) + self.log.debug("self.libpath: %s" % self.libpath) # applications go looking into tbb/lib so we move what's in there to libs # and symlink the right lib from /tbb/libs/intel64/... to lib install_libpath = os.path.join(self.installdir, 'tbb', 'lib') diff --git a/easybuild/easyconfigs/p/Pasha/Pasha-1.0.3-ictce-4.0.6.eb b/easybuild/easyconfigs/p/Pasha/Pasha-1.0.3-ictce-4.0.6.eb index d417442d44..9a856bbe5a 100644 --- a/easybuild/easyconfigs/p/Pasha/Pasha-1.0.3-ictce-4.0.6.eb +++ b/easybuild/easyconfigs/p/Pasha/Pasha-1.0.3-ictce-4.0.6.eb @@ -12,7 +12,11 @@ dependencies = [('tbb', '4.0.5.339', '', True)] sourceURLs = ['http://downloads.sourceforge.net/pasha'] sources = ['%s-%s.tar.gz' % (name, version)] -patches = ['intelmpi.patch'] +patches = [ + 'intelmpi.patch', + # needed since this still relies on gnu specific includes from libstdc++ which changed in latest version + 'gcc-hash_fun-map-set.patch', + ] # Pasha's makefile is not suited for parallel execution parallel = 1 From 56f45705731135351f2db8e0898c6959a9f84277 Mon Sep 17 00:00:00 2001 From: Jens Timmerman Date: Thu, 23 Aug 2012 10:44:52 +0200 Subject: [PATCH 784/798] Fix refactoring of setting MPIxxx, it had some quoting issues --- easybuild/tools/toolkit.py | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/easybuild/tools/toolkit.py b/easybuild/tools/toolkit.py index e64d98ac87..89a2d65345 100644 --- a/easybuild/tools/toolkit.py +++ b/easybuild/tools/toolkit.py @@ -701,10 +701,10 @@ def prepareIMPI(self): else: # other compilers (e.g. GCC) with Intel MPI - self.vars['MPICC'] = 'mpicc -cc=%s %s ' % (self.vars['CC'], self.m32flag) - self.vars['MPICXX'] = 'mpicxx -cxx=%s %s ' % (self.vars['CXX'], self.m32flag) - self.vars['MPIF77'] = 'mpif77 -fc=%s %s ' % (self.vars['F77'], self.m32flag) - self.vars['MPIF90'] = 'mpif90 -fc=%s %s ' % (self.vars['F90'], self.m32flag) + self.vars['MPICC'] = "mpicc -cc='%s %s' " % (self.vars['CC'], self.m32flag) + self.vars['MPICXX'] = "mpicxx -cxx='%s %s' " % (self.vars['CXX'], self.m32flag) + self.vars['MPIF77'] = "mpif77 -fc='%s %s' " % (self.vars['F77'], self.m32flag) + self.vars['MPIF90'] = "mpif90 -fc='%s %s' " % (self.vars['F90'], self.m32flag) impiroot = get_software_root('IMPI') if self.opts['32bit']: @@ -764,10 +764,10 @@ def prepareMPICH2(self): """ if "vSMP" in get_software_version('MPICH2'): # ScaleMP MPICH specific - self.vars['MPICC'] = 'mpicc -cc="%s %s"' % (self.vars['CC'], self.m32flag) - self.vars['MPICXX'] = 'mpicxx -CC="%s %s"' % (self.vars['CXX'], self.m32flag) - self.vars['MPIF77'] = 'mpif77 -fc="%s %s"' % (self.vars['F77'], self.m32flag) - self.vars['MPIF90'] = 'mpif90 -f90="%s %s"' % (self.vars['F90'], self.m32flag) + self.vars['MPICC'] = "mpicc -cc='%s %s'" % (self.vars['CC'], self.m32flag) + self.vars['MPICXX'] = "mpicxx -CC='%s %s'" % (self.vars['CXX'], self.m32flag) + self.vars['MPIF77'] = "mpif77 -fc='%s %s'" % (self.vars['F77'], self.m32flag) + self.vars['MPIF90'] = "mpif90 -f90='%s %s'" % (self.vars['F90'], self.m32flag) if self.opts['cciscxx']: self.vars['MPICXX'] = self.vars['MPICC'] From 6841a1eb00613bc5d97919c347c26148fcc35de4 Mon Sep 17 00:00:00 2001 From: Kenneth Hoste Date: Thu, 23 Aug 2012 13:38:54 +0200 Subject: [PATCH 785/798] fix making full OpenFOAM installation dir accessible to others (everything readable, dirs executable) --- easybuild/easyblocks/o/openfoam.py | 20 +++++++++----------- easybuild/tools/filetools.py | 6 ++++-- 2 files changed, 13 insertions(+), 13 deletions(-) diff --git a/easybuild/easyblocks/o/openfoam.py b/easybuild/easyblocks/o/openfoam.py index c4ace2dce3..9300675f22 100644 --- a/easybuild/easyblocks/o/openfoam.py +++ b/easybuild/easyblocks/o/openfoam.py @@ -118,23 +118,21 @@ def make(self): run_cmd(cmd,log_all=True,simple=True,log_output=True) def make_install(self): - """Building was performed in install dir, so just fix permissions.""" + """Building was performed in install dir, so just fix broken permissions.""" - # fix permissions of various OpenFOAM-x subdirectories (only known to be required for v1.x) - if LooseVersion(self.version()) <= LooseVersion('2'): - installPath = "%s/%s-%s"%(self.installdir, self.name(), self.version()) - - for d in ["applications", "bin", "doc", "etc", "lib", "src", "tutorials"]: - # Make directories readable and executable for others - fullpath = os.path.join(installPath, d) - adjust_permissions(fullpath, stat.S_IROTH|stat.S_IXOTH, add=True) + # fix permissions of OpenFOAM dir + fullpath = os.path.join(self.installdir, "%s-%s" % (self.name(), self.version())) + adjust_permissions(fullpath, stat.S_IROTH, add=True, recursive=False) + adjust_permissions(fullpath, stat.S_IXOTH, add=True, recursive=False, onlydirs=True) # fix permissions of ThirdParty dir and subdirs (also for 2.x) fullpath = os.path.join(self.installdir, self.thrdpartydir) - adjust_permissions(fullpath, stat.S_IROTH|stat.S_IXOTH, add=True, recursive=False) + adjust_permissions(fullpath, stat.S_IROTH, add=True, recursive=False) + adjust_permissions(fullpath, stat.S_IXOTH, add=True, recursive=False, onlydirs=True) for d in ["etc", "platforms"]: fullpath = os.path.join(self.installdir, self.thrdpartydir, d) - adjust_permissions(fullpath, stat.S_IROTH|stat.S_IXOTH, add=True) + adjust_permissions(fullpath, stat.S_IROTH, add=True) + adjust_permissions(fullpath, stat.S_IXOTH, add=True, onlydirs=True) def sanitycheck(self): """Custom sanity check for OpenFOAM""" diff --git a/easybuild/tools/filetools.py b/easybuild/tools/filetools.py index d79638e206..ddb9164ec0 100644 --- a/easybuild/tools/filetools.py +++ b/easybuild/tools/filetools.py @@ -662,7 +662,7 @@ def parselogForError(txt, regExp=None, stdout=True, msg=None): return res -def adjust_permissions(name, permissionBits, add=True, onlyFiles=False, recursive=True): +def adjust_permissions(name, permissionBits, add=True, onlyfiles=False, onlydirs=False, recursive=True): """ Add or remove (if add is False) permissionBits from all files and directories (if onlyFiles is False) in path @@ -673,7 +673,9 @@ def adjust_permissions(name, permissionBits, add=True, onlyFiles=False, recursiv if recursive: log.info("Adjusting permissions recursively for %s" % name) for root, dirs, files in os.walk(name): - paths = files + paths = [] + if not onlyDirs: + paths += files if not onlyFiles: paths += dirs From 287b36b24077a1cfbaa5e7a4a1fa660249b600de Mon Sep 17 00:00:00 2001 From: Jens Timmerman Date: Thu, 23 Aug 2012 16:33:40 +0300 Subject: [PATCH 786/798] fixed indentation --- easybuild/easyconfigs/p/Pasha/Pasha-1.0.3-ictce-4.0.6.eb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/easybuild/easyconfigs/p/Pasha/Pasha-1.0.3-ictce-4.0.6.eb b/easybuild/easyconfigs/p/Pasha/Pasha-1.0.3-ictce-4.0.6.eb index 9a856bbe5a..1d995d7619 100644 --- a/easybuild/easyconfigs/p/Pasha/Pasha-1.0.3-ictce-4.0.6.eb +++ b/easybuild/easyconfigs/p/Pasha/Pasha-1.0.3-ictce-4.0.6.eb @@ -14,7 +14,7 @@ sources = ['%s-%s.tar.gz' % (name, version)] patches = [ 'intelmpi.patch', - # needed since this still relies on gnu specific includes from libstdc++ which changed in latest version + # needed since this still relies on gnu specific includes from libstdc++ which changed in latest version 'gcc-hash_fun-map-set.patch', ] From d8db376ca2b6b632fcf8f63a35a964f2b29233c2 Mon Sep 17 00:00:00 2001 From: Jens Timmerman Date: Thu, 23 Aug 2012 15:38:54 +0200 Subject: [PATCH 787/798] renamed patch to be more descriptive --- .../easyconfigs/p/Pasha/Pasha-1.0.3-goalf-1.1.0-no-OFED.eb | 2 +- easybuild/easyconfigs/p/Pasha/Pasha-1.0.3-ictce-4.0.6.eb | 2 +- ...h_fun-map-set.patch => old-libstdc++-hash_fun-map-set.patch} | 0 3 files changed, 2 insertions(+), 2 deletions(-) rename easybuild/easyconfigs/p/Pasha/{gcc-hash_fun-map-set.patch => old-libstdc++-hash_fun-map-set.patch} (100%) diff --git a/easybuild/easyconfigs/p/Pasha/Pasha-1.0.3-goalf-1.1.0-no-OFED.eb b/easybuild/easyconfigs/p/Pasha/Pasha-1.0.3-goalf-1.1.0-no-OFED.eb index 25f90bf065..d3b7d343a6 100644 --- a/easybuild/easyconfigs/p/Pasha/Pasha-1.0.3-goalf-1.1.0-no-OFED.eb +++ b/easybuild/easyconfigs/p/Pasha/Pasha-1.0.3-goalf-1.1.0-no-OFED.eb @@ -12,7 +12,7 @@ dependencies = [('tbb', '4.0.5.339', '', True)] sourceURLs = ['http://downloads.sourceforge.net/pasha'] sources = ['%s-%s.tar.gz' % (name, version)] -patches = ['gcc-hash_fun-map-set.patch'] +patches = ['old-libstdc++-hash_fun-map-set.patch'] # Pasha's makefile is not suited for parallel execution parallel = 1 diff --git a/easybuild/easyconfigs/p/Pasha/Pasha-1.0.3-ictce-4.0.6.eb b/easybuild/easyconfigs/p/Pasha/Pasha-1.0.3-ictce-4.0.6.eb index 1d995d7619..8f14c77d1f 100644 --- a/easybuild/easyconfigs/p/Pasha/Pasha-1.0.3-ictce-4.0.6.eb +++ b/easybuild/easyconfigs/p/Pasha/Pasha-1.0.3-ictce-4.0.6.eb @@ -15,7 +15,7 @@ sources = ['%s-%s.tar.gz' % (name, version)] patches = [ 'intelmpi.patch', # needed since this still relies on gnu specific includes from libstdc++ which changed in latest version - 'gcc-hash_fun-map-set.patch', + 'old-libstdc++-hash_fun-map-set.patch', ] # Pasha's makefile is not suited for parallel execution diff --git a/easybuild/easyconfigs/p/Pasha/gcc-hash_fun-map-set.patch b/easybuild/easyconfigs/p/Pasha/old-libstdc++-hash_fun-map-set.patch similarity index 100% rename from easybuild/easyconfigs/p/Pasha/gcc-hash_fun-map-set.patch rename to easybuild/easyconfigs/p/Pasha/old-libstdc++-hash_fun-map-set.patch From 615a7b16649221a57b7384c67d48e2f8c5881f57 Mon Sep 17 00:00:00 2001 From: Kenneth Hoste Date: Thu, 23 Aug 2012 18:06:07 +0200 Subject: [PATCH 788/798] use adjust_permissions function in Application.postproc to set permissions; both when a group is specified (no access for others), and without (remove write permissions for group/others); add stub config parameter for specifying that install dir should be made read-only after installation, and make that changes if the EasyBuild config dictates so --- easybuild/easyblocks/o/openfoam.py | 2 +- easybuild/framework/application.py | 51 +++++++++++++++--------------- easybuild/tools/config.py | 8 +++++ easybuild/tools/filetools.py | 36 ++++++++++++++++----- 4 files changed, 63 insertions(+), 34 deletions(-) diff --git a/easybuild/easyblocks/o/openfoam.py b/easybuild/easyblocks/o/openfoam.py index c4ace2dce3..d220a49168 100644 --- a/easybuild/easyblocks/o/openfoam.py +++ b/easybuild/easyblocks/o/openfoam.py @@ -134,7 +134,7 @@ def make_install(self): adjust_permissions(fullpath, stat.S_IROTH|stat.S_IXOTH, add=True, recursive=False) for d in ["etc", "platforms"]: fullpath = os.path.join(self.installdir, self.thrdpartydir, d) - adjust_permissions(fullpath, stat.S_IROTH|stat.S_IXOTH, add=True) + adjust_permissions(fullpath, stat.S_IROTH|stat.S_IXOTH, add=True, ignore_errors=True) def sanitycheck(self): """Custom sanity check for OpenFOAM""" diff --git a/easybuild/framework/application.py b/easybuild/framework/application.py index 0e1524dd98..0e9e7a7b90 100644 --- a/easybuild/framework/application.py +++ b/easybuild/framework/application.py @@ -34,6 +34,7 @@ import os import re import shutil +import stat import time import urllib from distutils.version import LooseVersion @@ -43,8 +44,9 @@ import easybuild.tools.environment as env from easybuild.framework.easyconfig import EasyConfig from easybuild.tools.build_log import EasyBuildError, initLogger, removeLogHandler,print_msg -from easybuild.tools.config import source_path, buildPath, installPath -from easybuild.tools.filetools import unpack, patch, run_cmd, convertName, encode_class_name +from easybuild.tools.config import source_path, buildPath, installPath, read_only_installdir +from easybuild.tools.filetools import adjust_permissions, convertName, encode_class_name +from easybuild.tools.filetools import patch, run_cmd, unpack from easybuild.tools.module_generator import ModuleGenerator from easybuild.tools.modules import Modules, get_software_root from easybuild.tools.systemtools import get_core_count @@ -626,6 +628,8 @@ def build(self): - test - make install location - install + - install packages + - do post-processing """ try: print_msg("preparing...", self.log) @@ -734,31 +738,28 @@ def postproc(self): Installing user must be member of the group that it is changed to """ if self.getcfg('group'): + gid = grp.getgrnam(self.getcfg('group'))[2] - chngsuccess = [] - chngfailure = [] - for (root, _, files) in os.walk(self.installdir): - try: - os.chown(root, -1, gid) - os.chmod(root, 0750) - chngsuccess.append(root) - except OSError, err: - self.log.error("Failed to change group for %s: %s" % (root, err)) - chngfailure.append(root) - for f in files: - absfile = os.path.join(root, f) - try: - os.chown(absfile, -1, gid) - os.chmod(root, 0750) - chngsuccess.append(absfile) - except OSError, err: - self.log.debug("Failed to chown/chmod %s (but ignoring it): %s" % (absfile, err)) - chngfailure.append(absfile) + # rwx for owner, r-x for group, --- for other + try: + adjust_permissions(self.installdir, 0750, recursive=True, group_id=gid, relative=False) + except EasyBuildError, err: + self.log.error("Unable to change group permissions of file(s). " \ + "Are you a member of this group?\n%s" % err) + self.log.info("Successfully made software only available for group %s" % self.getcfg('group')) - if len(chngfailure) > 0: - self.log.error("Unable to change group permissions of file(s). Are you a member of this group?:\n --> %s" % "\n --> ".join(chngfailure)) - else: - self.log.info("Successfully made software only available for group %s" % self.getcfg('group')) + else: + # remove write permissions for group and other + perms = stat.S_IWGRP | stat.S_IWOTH + adjust_permissions(self.installdir, perms, add=False, recursive=True, + group_id=gid, relative=True) + self.log.info("Successfully removed write permissions recursively for group/other on install dir.") + + if read_only_installdir(): + # remove write permissions for everyone + perms = stat.S_IWUSR | stat.S_IWGRP | stat.S_IWOTH + adjust_permissions(self.installdir, perms, add=False, recursive=True, group_id=gid, relative=True) + self.log.info("Successfully removed write permissions recursively for *EVERYONE* on install dir.") def cleanup(self): """ diff --git a/easybuild/tools/config.py b/easybuild/tools/config.py index b0d815b7c0..f0a535e5fd 100644 --- a/easybuild/tools/config.py +++ b/easybuild/tools/config.py @@ -182,3 +182,11 @@ def get_build_log_path(): """ return variables.get('logDir', tempfile.gettempdir()) +def read_only_installdir(): + """ + Return whether installation dir should be fully read-only after installation. + """ + # FIXME (see issue #): add a config option to set this, should be True by default (?) + # this also needs to be checked when --force is used; + # install dir will have to (temporarily) be made writeable again for owner in that case + return False diff --git a/easybuild/tools/filetools.py b/easybuild/tools/filetools.py index d79638e206..4df3949a39 100644 --- a/easybuild/tools/filetools.py +++ b/easybuild/tools/filetools.py @@ -662,16 +662,18 @@ def parselogForError(txt, regExp=None, stdout=True, msg=None): return res -def adjust_permissions(name, permissionBits, add=True, onlyFiles=False, recursive=True): +def adjust_permissions(name, permissionBits, add=True, onlyFiles=False, recursive=True, + group_id=None, relative=True, ignore_errors=False): """ Add or remove (if add is False) permissionBits from all files and directories (if onlyFiles is False) in path """ - allpaths = [] + name = os.path.abspath(name) if recursive: log.info("Adjusting permissions recursively for %s" % name) + allpaths = [name] for root, dirs, files in os.walk(name): paths = files if not onlyFiles: @@ -684,19 +686,37 @@ def adjust_permissions(name, permissionBits, add=True, onlyFiles=False, recursiv log.info("Adjusting permissions for %s" % name) allpaths = [name] + failed_paths = [] for path in allpaths: log.info("Adjusting permissions for %s" % path) - # ignore errors while adjusting permissions (for example caused by bad links) + try: - perms = os.stat(path)[stat.ST_MODE] + if relative: + + # relative permissions (add or remove) + perms = os.stat(path)[stat.ST_MODE] + + if add: + os.chmod(path, perms | permissionBits) + else: + os.chmod(path, perms & ~permissionBits) - if add: - os.chmod(path, perms | permissionBits) else: - os.chmod(path, perms & ~permissionBits) + # hard permissions bits (not relative) + os.chmod(path, permissionBits) + + if group_id: + os.chown(path, -1, group_id) + except OSError, err: - log.info("Failed to chmod %s (but ignoring it): %s" % (path, err)) + if ignore_errors: + # ignore errors while adjusting permissions (for example caused by bad links) + log.info("Failed to chmod/chown %s (but ignoring it): %s" % (path, err)) + else: + failed_paths.append(path) + if failed_paths: + log.exception("Failed to chmod/chown several paths: %s (last error: %s)" % (failed_paths, err)) def patch_perl_script_autoflush(path): # patch Perl script to enable autoflush, From 0b3ff85053938730ac66f6af2fd19d8f0eb4d1b2 Mon Sep 17 00:00:00 2001 From: Kenneth Hoste Date: Fri, 24 Aug 2012 07:37:04 +0200 Subject: [PATCH 789/798] fix issues with adjust_permissions optional arguments --- easybuild/tools/filetools.py | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/easybuild/tools/filetools.py b/easybuild/tools/filetools.py index 88aaa58350..60282936f7 100644 --- a/easybuild/tools/filetools.py +++ b/easybuild/tools/filetools.py @@ -662,11 +662,11 @@ def parselogForError(txt, regExp=None, stdout=True, msg=None): return res -def adjust_permissions(name, permissionBits, add=True, onlyFiles=False, recursive=True, +def adjust_permissions(name, permissionBits, add=True, onlyfiles=False, onlydirs=False, recursive=True, group_id=None, relative=True, ignore_errors=False): """ - Add or remove (if add is False) permissionBits from all files - and directories (if onlyFiles is False) in path + Add or remove (if add is False) permissionBits from all files (if onlydirs is False) + and directories (if onlyfiles is False) in path """ name = os.path.abspath(name) @@ -676,9 +676,9 @@ def adjust_permissions(name, permissionBits, add=True, onlyFiles=False, recursiv allpaths = [name] for root, dirs, files in os.walk(name): paths = [] - if not onlyDirs: + if not onlydirs: paths += files - if not onlyFiles: + if not onlyfiles: paths += dirs for path in paths: From d44800376b93279aedcd211226bea017c8a24104 Mon Sep 17 00:00:00 2001 From: Jens Timmerman Date: Fri, 24 Aug 2012 10:28:46 +0200 Subject: [PATCH 790/798] added all easyblocks to easybuild.easyblocks namespace and fixed all imports --- easybuild/easyblocks/0/__init__.py | 26 -------------------- easybuild/easyblocks/__init__.py | 5 ++++ easybuild/easyblocks/a/__init__.py | 26 -------------------- easybuild/easyblocks/a/armadillo.py | 2 +- easybuild/easyblocks/b/__init__.py | 26 -------------------- easybuild/easyblocks/c/__init__.py | 26 -------------------- easybuild/easyblocks/c/cgal.py | 2 +- easybuild/easyblocks/c/cmakepythonpackage.py | 4 +-- easybuild/easyblocks/c/cplex.py | 4 +-- easybuild/easyblocks/d/__init__.py | 26 -------------------- easybuild/easyblocks/d/dolfin.py | 4 +-- easybuild/easyblocks/e/__init__.py | 26 -------------------- easybuild/easyblocks/f/__init__.py | 26 -------------------- easybuild/easyblocks/g/__init__.py | 26 -------------------- easybuild/easyblocks/h/__init__.py | 26 -------------------- easybuild/easyblocks/i/__init__.py | 26 -------------------- easybuild/easyblocks/i/icc.py | 2 +- easybuild/easyblocks/i/ifort.py | 2 +- easybuild/easyblocks/i/imkl.py | 2 +- easybuild/easyblocks/i/impi.py | 2 +- easybuild/easyblocks/i/ipp.py | 2 +- easybuild/easyblocks/i/itac.py | 2 +- easybuild/easyblocks/j/__init__.py | 26 -------------------- easybuild/easyblocks/k/__init__.py | 26 -------------------- easybuild/easyblocks/l/__init__.py | 26 -------------------- easybuild/easyblocks/m/__init__.py | 26 -------------------- easybuild/easyblocks/m/mtl4.py | 4 +-- easybuild/easyblocks/n/__init__.py | 26 -------------------- easybuild/easyblocks/o/__init__.py | 26 -------------------- easybuild/easyblocks/p/__init__.py | 26 -------------------- easybuild/easyblocks/p/packedbinary.py | 2 +- easybuild/easyblocks/q/__init__.py | 26 -------------------- easybuild/easyblocks/r/__init__.py | 26 -------------------- easybuild/easyblocks/s/__init__.py | 26 -------------------- easybuild/easyblocks/s/scalapack.py | 18 +++++++------- easybuild/easyblocks/t/__init__.py | 26 -------------------- easybuild/easyblocks/t/tbb.py | 2 +- easybuild/easyblocks/t/trilinos.py | 2 +- easybuild/easyblocks/u/__init__.py | 26 -------------------- easybuild/easyblocks/u/ufc.py | 2 +- easybuild/easyblocks/v/__init__.py | 26 -------------------- easybuild/easyblocks/w/__init__.py | 26 -------------------- easybuild/easyblocks/w/wps.py | 8 +++--- easybuild/easyblocks/w/wrf.py | 18 +++++++------- easybuild/easyblocks/x/__init__.py | 26 -------------------- easybuild/easyblocks/y/__init__.py | 26 -------------------- easybuild/easyblocks/z/__init__.py | 26 -------------------- 47 files changed, 47 insertions(+), 744 deletions(-) delete mode 100644 easybuild/easyblocks/0/__init__.py delete mode 100644 easybuild/easyblocks/a/__init__.py delete mode 100644 easybuild/easyblocks/b/__init__.py delete mode 100644 easybuild/easyblocks/c/__init__.py delete mode 100644 easybuild/easyblocks/d/__init__.py delete mode 100644 easybuild/easyblocks/e/__init__.py delete mode 100644 easybuild/easyblocks/f/__init__.py delete mode 100644 easybuild/easyblocks/g/__init__.py delete mode 100644 easybuild/easyblocks/h/__init__.py delete mode 100644 easybuild/easyblocks/i/__init__.py delete mode 100644 easybuild/easyblocks/j/__init__.py delete mode 100644 easybuild/easyblocks/k/__init__.py delete mode 100644 easybuild/easyblocks/l/__init__.py delete mode 100644 easybuild/easyblocks/m/__init__.py delete mode 100644 easybuild/easyblocks/n/__init__.py delete mode 100644 easybuild/easyblocks/o/__init__.py delete mode 100644 easybuild/easyblocks/p/__init__.py delete mode 100644 easybuild/easyblocks/q/__init__.py delete mode 100644 easybuild/easyblocks/r/__init__.py delete mode 100644 easybuild/easyblocks/s/__init__.py delete mode 100644 easybuild/easyblocks/t/__init__.py delete mode 100644 easybuild/easyblocks/u/__init__.py delete mode 100644 easybuild/easyblocks/v/__init__.py delete mode 100644 easybuild/easyblocks/w/__init__.py delete mode 100644 easybuild/easyblocks/x/__init__.py delete mode 100644 easybuild/easyblocks/y/__init__.py delete mode 100644 easybuild/easyblocks/z/__init__.py diff --git a/easybuild/easyblocks/0/__init__.py b/easybuild/easyblocks/0/__init__.py deleted file mode 100644 index 841038b2fa..0000000000 --- a/easybuild/easyblocks/0/__init__.py +++ /dev/null @@ -1,26 +0,0 @@ -## -# Copyright 2009-2012 Stijn De Weirdt -# Copyright 2010 Dries Verdegem -# Copyright 2010-2012 Kenneth Hoste -# Copyright 2011 Pieter De Baets -# Copyright 2011-2012 Jens Timmerman -# -# This file is part of EasyBuild, -# originally created by the HPC team of the University of Ghent (http://ugent.be/hpc). -# -# http://github.com/hpcugent/easybuild -# -# EasyBuild is free software: you can redistribute it and/or modify -# it under the terms of the GNU General Public License as published by -# the Free Software Foundation v2. -# -# EasyBuild is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU General Public License for more details. -# -# You should have received a copy of the GNU General Public License -# along with EasyBuild. If not, see . -## -from pkgutil import extend_path -__path__ = extend_path(__path__, __name__) diff --git a/easybuild/easyblocks/__init__.py b/easybuild/easyblocks/__init__.py index 71d40fecf2..c673a5e104 100644 --- a/easybuild/easyblocks/__init__.py +++ b/easybuild/easyblocks/__init__.py @@ -22,3 +22,8 @@ # You should have received a copy of the GNU General Public License # along with EasyBuild. If not, see . ## +import os +from pkgutil import extend_path + +__path__.extend([os.path.join(__path__[0],chr(y)) for y in range(ord('a'),ord('z')+1) + [ord('0')] ]) +__path__ = extend_path(__path__, __name__) diff --git a/easybuild/easyblocks/a/__init__.py b/easybuild/easyblocks/a/__init__.py deleted file mode 100644 index 841038b2fa..0000000000 --- a/easybuild/easyblocks/a/__init__.py +++ /dev/null @@ -1,26 +0,0 @@ -## -# Copyright 2009-2012 Stijn De Weirdt -# Copyright 2010 Dries Verdegem -# Copyright 2010-2012 Kenneth Hoste -# Copyright 2011 Pieter De Baets -# Copyright 2011-2012 Jens Timmerman -# -# This file is part of EasyBuild, -# originally created by the HPC team of the University of Ghent (http://ugent.be/hpc). -# -# http://github.com/hpcugent/easybuild -# -# EasyBuild is free software: you can redistribute it and/or modify -# it under the terms of the GNU General Public License as published by -# the Free Software Foundation v2. -# -# EasyBuild is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU General Public License for more details. -# -# You should have received a copy of the GNU General Public License -# along with EasyBuild. If not, see . -## -from pkgutil import extend_path -__path__ = extend_path(__path__, __name__) diff --git a/easybuild/easyblocks/a/armadillo.py b/easybuild/easyblocks/a/armadillo.py index 47e231d0a7..7ec117ec39 100644 --- a/easybuild/easyblocks/a/armadillo.py +++ b/easybuild/easyblocks/a/armadillo.py @@ -22,7 +22,7 @@ """ import os -from easybuild.easyblocks.c.cmake import EB_CMake +from easybuild.easyblocks.cmake import EB_CMake from easybuild.tools.modules import get_software_root diff --git a/easybuild/easyblocks/b/__init__.py b/easybuild/easyblocks/b/__init__.py deleted file mode 100644 index 841038b2fa..0000000000 --- a/easybuild/easyblocks/b/__init__.py +++ /dev/null @@ -1,26 +0,0 @@ -## -# Copyright 2009-2012 Stijn De Weirdt -# Copyright 2010 Dries Verdegem -# Copyright 2010-2012 Kenneth Hoste -# Copyright 2011 Pieter De Baets -# Copyright 2011-2012 Jens Timmerman -# -# This file is part of EasyBuild, -# originally created by the HPC team of the University of Ghent (http://ugent.be/hpc). -# -# http://github.com/hpcugent/easybuild -# -# EasyBuild is free software: you can redistribute it and/or modify -# it under the terms of the GNU General Public License as published by -# the Free Software Foundation v2. -# -# EasyBuild is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU General Public License for more details. -# -# You should have received a copy of the GNU General Public License -# along with EasyBuild. If not, see . -## -from pkgutil import extend_path -__path__ = extend_path(__path__, __name__) diff --git a/easybuild/easyblocks/c/__init__.py b/easybuild/easyblocks/c/__init__.py deleted file mode 100644 index 841038b2fa..0000000000 --- a/easybuild/easyblocks/c/__init__.py +++ /dev/null @@ -1,26 +0,0 @@ -## -# Copyright 2009-2012 Stijn De Weirdt -# Copyright 2010 Dries Verdegem -# Copyright 2010-2012 Kenneth Hoste -# Copyright 2011 Pieter De Baets -# Copyright 2011-2012 Jens Timmerman -# -# This file is part of EasyBuild, -# originally created by the HPC team of the University of Ghent (http://ugent.be/hpc). -# -# http://github.com/hpcugent/easybuild -# -# EasyBuild is free software: you can redistribute it and/or modify -# it under the terms of the GNU General Public License as published by -# the Free Software Foundation v2. -# -# EasyBuild is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU General Public License for more details. -# -# You should have received a copy of the GNU General Public License -# along with EasyBuild. If not, see . -## -from pkgutil import extend_path -__path__ = extend_path(__path__, __name__) diff --git a/easybuild/easyblocks/c/cgal.py b/easybuild/easyblocks/c/cgal.py index b3d539bc30..5719836870 100644 --- a/easybuild/easyblocks/c/cgal.py +++ b/easybuild/easyblocks/c/cgal.py @@ -24,7 +24,7 @@ """ import os -from easybuild.easyblocks.c.cmake import EB_CMake +from easybuild.easyblocks.cmake import EB_CMake from easybuild.tools.modules import get_software_root diff --git a/easybuild/easyblocks/c/cmakepythonpackage.py b/easybuild/easyblocks/c/cmakepythonpackage.py index f19e63ef72..00a2fcaa51 100644 --- a/easybuild/easyblocks/c/cmakepythonpackage.py +++ b/easybuild/easyblocks/c/cmakepythonpackage.py @@ -25,8 +25,8 @@ """ EasyBuild support for Python packages that are configured with CMake, implemented as an easyblock """ -from easybuild.easyblocks.c.cmake import EB_CMake -from easybuild.easyblocks.p.pythonpackage import EB_PythonPackage +from easybuild.easyblocks.cmake import EB_CMake +from easybuild.easyblocks.pythonpackage import EB_PythonPackage class EB_CMakePythonPackage(EB_CMake, EB_PythonPackage): diff --git a/easybuild/easyblocks/c/cplex.py b/easybuild/easyblocks/c/cplex.py index f9cd7dcc70..f58a1ffa32 100644 --- a/easybuild/easyblocks/c/cplex.py +++ b/easybuild/easyblocks/c/cplex.py @@ -30,7 +30,7 @@ import stat import easybuild.tools.environment as env -from easybuild.easyblocks.b.binary import EB_Binary +from easybuild.easyblocks.binary import EB_Binary from easybuild.tools.filetools import run_cmd_qa @@ -80,7 +80,7 @@ def make_install(self): run_cmd_qa(cmd, qanda, no_qa=noqanda, log_all=True, simple=True) try: - os.chmod(self.installdir, stat.S_IRWXU|stat.S_IXOTH|stat.S_IXGRP|stat.S_IROTH|stat.S_IRGRP) + os.chmod(self.installdir, stat.S_IRWXU | stat.S_IXOTH | stat.S_IXGRP | stat.S_IROTH | stat.S_IRGRP) except OSError, err: self.log.exception("Can't set permissions on %s: %s" % (self.installdir, err)) diff --git a/easybuild/easyblocks/d/__init__.py b/easybuild/easyblocks/d/__init__.py deleted file mode 100644 index 841038b2fa..0000000000 --- a/easybuild/easyblocks/d/__init__.py +++ /dev/null @@ -1,26 +0,0 @@ -## -# Copyright 2009-2012 Stijn De Weirdt -# Copyright 2010 Dries Verdegem -# Copyright 2010-2012 Kenneth Hoste -# Copyright 2011 Pieter De Baets -# Copyright 2011-2012 Jens Timmerman -# -# This file is part of EasyBuild, -# originally created by the HPC team of the University of Ghent (http://ugent.be/hpc). -# -# http://github.com/hpcugent/easybuild -# -# EasyBuild is free software: you can redistribute it and/or modify -# it under the terms of the GNU General Public License as published by -# the Free Software Foundation v2. -# -# EasyBuild is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU General Public License for more details. -# -# You should have received a copy of the GNU General Public License -# along with EasyBuild. If not, see . -## -from pkgutil import extend_path -__path__ = extend_path(__path__, __name__) diff --git a/easybuild/easyblocks/d/dolfin.py b/easybuild/easyblocks/d/dolfin.py index 954ffd62f6..c05a21a81e 100644 --- a/easybuild/easyblocks/d/dolfin.py +++ b/easybuild/easyblocks/d/dolfin.py @@ -26,7 +26,7 @@ import re import easybuild.tools.toolkit as toolkit -from easybuild.easyblocks.c.cmakepythonpackage import EB_CMakePythonPackage +from easybuild.easyblocks.cmakepythonpackage import EB_CMakePythonPackage from easybuild.tools.modules import get_software_root, get_software_version @@ -123,7 +123,7 @@ def configure(self): '-DCCOLAMD_LIBRARY:PATH="%(sp)s/CCOLAMD/lib/libccolamd.a"', '-DCOLAMD_LIBRARY:PATH="%(sp)s/COLAMD/lib/libcolamd.a"' ] - + self.updatecfg('configopts', ' '.join(umfpack_params) % {'sp':suitesparse}) # ParMETIS and SCOTCH diff --git a/easybuild/easyblocks/e/__init__.py b/easybuild/easyblocks/e/__init__.py deleted file mode 100644 index 841038b2fa..0000000000 --- a/easybuild/easyblocks/e/__init__.py +++ /dev/null @@ -1,26 +0,0 @@ -## -# Copyright 2009-2012 Stijn De Weirdt -# Copyright 2010 Dries Verdegem -# Copyright 2010-2012 Kenneth Hoste -# Copyright 2011 Pieter De Baets -# Copyright 2011-2012 Jens Timmerman -# -# This file is part of EasyBuild, -# originally created by the HPC team of the University of Ghent (http://ugent.be/hpc). -# -# http://github.com/hpcugent/easybuild -# -# EasyBuild is free software: you can redistribute it and/or modify -# it under the terms of the GNU General Public License as published by -# the Free Software Foundation v2. -# -# EasyBuild is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU General Public License for more details. -# -# You should have received a copy of the GNU General Public License -# along with EasyBuild. If not, see . -## -from pkgutil import extend_path -__path__ = extend_path(__path__, __name__) diff --git a/easybuild/easyblocks/f/__init__.py b/easybuild/easyblocks/f/__init__.py deleted file mode 100644 index 841038b2fa..0000000000 --- a/easybuild/easyblocks/f/__init__.py +++ /dev/null @@ -1,26 +0,0 @@ -## -# Copyright 2009-2012 Stijn De Weirdt -# Copyright 2010 Dries Verdegem -# Copyright 2010-2012 Kenneth Hoste -# Copyright 2011 Pieter De Baets -# Copyright 2011-2012 Jens Timmerman -# -# This file is part of EasyBuild, -# originally created by the HPC team of the University of Ghent (http://ugent.be/hpc). -# -# http://github.com/hpcugent/easybuild -# -# EasyBuild is free software: you can redistribute it and/or modify -# it under the terms of the GNU General Public License as published by -# the Free Software Foundation v2. -# -# EasyBuild is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU General Public License for more details. -# -# You should have received a copy of the GNU General Public License -# along with EasyBuild. If not, see . -## -from pkgutil import extend_path -__path__ = extend_path(__path__, __name__) diff --git a/easybuild/easyblocks/g/__init__.py b/easybuild/easyblocks/g/__init__.py deleted file mode 100644 index 841038b2fa..0000000000 --- a/easybuild/easyblocks/g/__init__.py +++ /dev/null @@ -1,26 +0,0 @@ -## -# Copyright 2009-2012 Stijn De Weirdt -# Copyright 2010 Dries Verdegem -# Copyright 2010-2012 Kenneth Hoste -# Copyright 2011 Pieter De Baets -# Copyright 2011-2012 Jens Timmerman -# -# This file is part of EasyBuild, -# originally created by the HPC team of the University of Ghent (http://ugent.be/hpc). -# -# http://github.com/hpcugent/easybuild -# -# EasyBuild is free software: you can redistribute it and/or modify -# it under the terms of the GNU General Public License as published by -# the Free Software Foundation v2. -# -# EasyBuild is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU General Public License for more details. -# -# You should have received a copy of the GNU General Public License -# along with EasyBuild. If not, see . -## -from pkgutil import extend_path -__path__ = extend_path(__path__, __name__) diff --git a/easybuild/easyblocks/h/__init__.py b/easybuild/easyblocks/h/__init__.py deleted file mode 100644 index 841038b2fa..0000000000 --- a/easybuild/easyblocks/h/__init__.py +++ /dev/null @@ -1,26 +0,0 @@ -## -# Copyright 2009-2012 Stijn De Weirdt -# Copyright 2010 Dries Verdegem -# Copyright 2010-2012 Kenneth Hoste -# Copyright 2011 Pieter De Baets -# Copyright 2011-2012 Jens Timmerman -# -# This file is part of EasyBuild, -# originally created by the HPC team of the University of Ghent (http://ugent.be/hpc). -# -# http://github.com/hpcugent/easybuild -# -# EasyBuild is free software: you can redistribute it and/or modify -# it under the terms of the GNU General Public License as published by -# the Free Software Foundation v2. -# -# EasyBuild is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU General Public License for more details. -# -# You should have received a copy of the GNU General Public License -# along with EasyBuild. If not, see . -## -from pkgutil import extend_path -__path__ = extend_path(__path__, __name__) diff --git a/easybuild/easyblocks/i/__init__.py b/easybuild/easyblocks/i/__init__.py deleted file mode 100644 index 841038b2fa..0000000000 --- a/easybuild/easyblocks/i/__init__.py +++ /dev/null @@ -1,26 +0,0 @@ -## -# Copyright 2009-2012 Stijn De Weirdt -# Copyright 2010 Dries Verdegem -# Copyright 2010-2012 Kenneth Hoste -# Copyright 2011 Pieter De Baets -# Copyright 2011-2012 Jens Timmerman -# -# This file is part of EasyBuild, -# originally created by the HPC team of the University of Ghent (http://ugent.be/hpc). -# -# http://github.com/hpcugent/easybuild -# -# EasyBuild is free software: you can redistribute it and/or modify -# it under the terms of the GNU General Public License as published by -# the Free Software Foundation v2. -# -# EasyBuild is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU General Public License for more details. -# -# You should have received a copy of the GNU General Public License -# along with EasyBuild. If not, see . -## -from pkgutil import extend_path -__path__ = extend_path(__path__, __name__) diff --git a/easybuild/easyblocks/i/icc.py b/easybuild/easyblocks/i/icc.py index 7976b2c171..2f4df32813 100644 --- a/easybuild/easyblocks/i/icc.py +++ b/easybuild/easyblocks/i/icc.py @@ -29,7 +29,7 @@ import os from distutils.version import LooseVersion -from easybuild.easyblocks.i.intelbase import EB_IntelBase +from easybuild.easyblocks.intelbase import EB_IntelBase class EB_icc(EB_IntelBase): diff --git a/easybuild/easyblocks/i/ifort.py b/easybuild/easyblocks/i/ifort.py index 5e6e6eac75..7d82cc07d5 100644 --- a/easybuild/easyblocks/i/ifort.py +++ b/easybuild/easyblocks/i/ifort.py @@ -28,7 +28,7 @@ from distutils.version import LooseVersion -from easybuild.easyblocks.i.icc import Icc, EB_IntelBase +from easybuild.easyblocks.icc import EB_Icc, EB_IntelBase class EB_ifort(Icc): diff --git a/easybuild/easyblocks/i/imkl.py b/easybuild/easyblocks/i/imkl.py index 9e06aad511..4f00fa278e 100644 --- a/easybuild/easyblocks/i/imkl.py +++ b/easybuild/easyblocks/i/imkl.py @@ -33,7 +33,7 @@ import easybuild.tools.environment as env import easybuild.tools.toolkit as toolkit -from easybuild.easyblocks.i.intelbase import EB_IntelBase +from easybuild.easyblocks.intelbase import EB_IntelBase from easybuild.framework.easyconfig import CUSTOM from easybuild.tools.filetools import run_cmd from easybuild.tools.modules import Modules diff --git a/easybuild/easyblocks/i/impi.py b/easybuild/easyblocks/i/impi.py index da63992a98..438db8919f 100644 --- a/easybuild/easyblocks/i/impi.py +++ b/easybuild/easyblocks/i/impi.py @@ -29,7 +29,7 @@ import os from distutils.version import LooseVersion -from easybuild.easyblocks.i.intelbase import EB_IntelBase +from easybuild.easyblocks.intelbase import EB_IntelBase from easybuild.tools.filetools import run_cmd diff --git a/easybuild/easyblocks/i/ipp.py b/easybuild/easyblocks/i/ipp.py index 11b65c1f87..8534e34e7d 100644 --- a/easybuild/easyblocks/i/ipp.py +++ b/easybuild/easyblocks/i/ipp.py @@ -26,7 +26,7 @@ EasyBuild support for installing the Intel Performance Primitives (IPP) library, implemented as an easyblock """ -from easybuild.easyblocks.i.intelbase import EB_IntelBase +from easybuild.easyblocks.intelbase import EB_IntelBase class EB_ipp(EB_IntelBase): diff --git a/easybuild/easyblocks/i/itac.py b/easybuild/easyblocks/i/itac.py index d9240c5d7e..939c8c2ee3 100644 --- a/easybuild/easyblocks/i/itac.py +++ b/easybuild/easyblocks/i/itac.py @@ -29,7 +29,7 @@ import os from easybuild.framework.easyconfig import CUSTOM -from easybuild.easyblocks.i.intelbase import EB_IntelBase +from easybuild.easyblocks.intelbase import EB_IntelBase from easybuild.tools.filetools import run_cmd diff --git a/easybuild/easyblocks/j/__init__.py b/easybuild/easyblocks/j/__init__.py deleted file mode 100644 index 841038b2fa..0000000000 --- a/easybuild/easyblocks/j/__init__.py +++ /dev/null @@ -1,26 +0,0 @@ -## -# Copyright 2009-2012 Stijn De Weirdt -# Copyright 2010 Dries Verdegem -# Copyright 2010-2012 Kenneth Hoste -# Copyright 2011 Pieter De Baets -# Copyright 2011-2012 Jens Timmerman -# -# This file is part of EasyBuild, -# originally created by the HPC team of the University of Ghent (http://ugent.be/hpc). -# -# http://github.com/hpcugent/easybuild -# -# EasyBuild is free software: you can redistribute it and/or modify -# it under the terms of the GNU General Public License as published by -# the Free Software Foundation v2. -# -# EasyBuild is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU General Public License for more details. -# -# You should have received a copy of the GNU General Public License -# along with EasyBuild. If not, see . -## -from pkgutil import extend_path -__path__ = extend_path(__path__, __name__) diff --git a/easybuild/easyblocks/k/__init__.py b/easybuild/easyblocks/k/__init__.py deleted file mode 100644 index 841038b2fa..0000000000 --- a/easybuild/easyblocks/k/__init__.py +++ /dev/null @@ -1,26 +0,0 @@ -## -# Copyright 2009-2012 Stijn De Weirdt -# Copyright 2010 Dries Verdegem -# Copyright 2010-2012 Kenneth Hoste -# Copyright 2011 Pieter De Baets -# Copyright 2011-2012 Jens Timmerman -# -# This file is part of EasyBuild, -# originally created by the HPC team of the University of Ghent (http://ugent.be/hpc). -# -# http://github.com/hpcugent/easybuild -# -# EasyBuild is free software: you can redistribute it and/or modify -# it under the terms of the GNU General Public License as published by -# the Free Software Foundation v2. -# -# EasyBuild is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU General Public License for more details. -# -# You should have received a copy of the GNU General Public License -# along with EasyBuild. If not, see . -## -from pkgutil import extend_path -__path__ = extend_path(__path__, __name__) diff --git a/easybuild/easyblocks/l/__init__.py b/easybuild/easyblocks/l/__init__.py deleted file mode 100644 index 841038b2fa..0000000000 --- a/easybuild/easyblocks/l/__init__.py +++ /dev/null @@ -1,26 +0,0 @@ -## -# Copyright 2009-2012 Stijn De Weirdt -# Copyright 2010 Dries Verdegem -# Copyright 2010-2012 Kenneth Hoste -# Copyright 2011 Pieter De Baets -# Copyright 2011-2012 Jens Timmerman -# -# This file is part of EasyBuild, -# originally created by the HPC team of the University of Ghent (http://ugent.be/hpc). -# -# http://github.com/hpcugent/easybuild -# -# EasyBuild is free software: you can redistribute it and/or modify -# it under the terms of the GNU General Public License as published by -# the Free Software Foundation v2. -# -# EasyBuild is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU General Public License for more details. -# -# You should have received a copy of the GNU General Public License -# along with EasyBuild. If not, see . -## -from pkgutil import extend_path -__path__ = extend_path(__path__, __name__) diff --git a/easybuild/easyblocks/m/__init__.py b/easybuild/easyblocks/m/__init__.py deleted file mode 100644 index 841038b2fa..0000000000 --- a/easybuild/easyblocks/m/__init__.py +++ /dev/null @@ -1,26 +0,0 @@ -## -# Copyright 2009-2012 Stijn De Weirdt -# Copyright 2010 Dries Verdegem -# Copyright 2010-2012 Kenneth Hoste -# Copyright 2011 Pieter De Baets -# Copyright 2011-2012 Jens Timmerman -# -# This file is part of EasyBuild, -# originally created by the HPC team of the University of Ghent (http://ugent.be/hpc). -# -# http://github.com/hpcugent/easybuild -# -# EasyBuild is free software: you can redistribute it and/or modify -# it under the terms of the GNU General Public License as published by -# the Free Software Foundation v2. -# -# EasyBuild is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU General Public License for more details. -# -# You should have received a copy of the GNU General Public License -# along with EasyBuild. If not, see . -## -from pkgutil import extend_path -__path__ = extend_path(__path__, __name__) diff --git a/easybuild/easyblocks/m/mtl4.py b/easybuild/easyblocks/m/mtl4.py index 224850df78..e875a28537 100644 --- a/easybuild/easyblocks/m/mtl4.py +++ b/easybuild/easyblocks/m/mtl4.py @@ -22,7 +22,7 @@ """ import os -from easybuild.easyblocks.t.tarball import EB_Tarball +from easybuild.easyblocks.tarball import EB_Tarball class EB_MTL4(EB_Tarball): @@ -33,7 +33,7 @@ def sanitycheck(self): if not self.getcfg('sanityCheckPaths'): - incpref = os.path.join('include','boost', 'numeric') + incpref = os.path.join('include', 'boost', 'numeric') self.setcfg('sanityCheckPaths', { 'files':[], diff --git a/easybuild/easyblocks/n/__init__.py b/easybuild/easyblocks/n/__init__.py deleted file mode 100644 index 841038b2fa..0000000000 --- a/easybuild/easyblocks/n/__init__.py +++ /dev/null @@ -1,26 +0,0 @@ -## -# Copyright 2009-2012 Stijn De Weirdt -# Copyright 2010 Dries Verdegem -# Copyright 2010-2012 Kenneth Hoste -# Copyright 2011 Pieter De Baets -# Copyright 2011-2012 Jens Timmerman -# -# This file is part of EasyBuild, -# originally created by the HPC team of the University of Ghent (http://ugent.be/hpc). -# -# http://github.com/hpcugent/easybuild -# -# EasyBuild is free software: you can redistribute it and/or modify -# it under the terms of the GNU General Public License as published by -# the Free Software Foundation v2. -# -# EasyBuild is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU General Public License for more details. -# -# You should have received a copy of the GNU General Public License -# along with EasyBuild. If not, see . -## -from pkgutil import extend_path -__path__ = extend_path(__path__, __name__) diff --git a/easybuild/easyblocks/o/__init__.py b/easybuild/easyblocks/o/__init__.py deleted file mode 100644 index 841038b2fa..0000000000 --- a/easybuild/easyblocks/o/__init__.py +++ /dev/null @@ -1,26 +0,0 @@ -## -# Copyright 2009-2012 Stijn De Weirdt -# Copyright 2010 Dries Verdegem -# Copyright 2010-2012 Kenneth Hoste -# Copyright 2011 Pieter De Baets -# Copyright 2011-2012 Jens Timmerman -# -# This file is part of EasyBuild, -# originally created by the HPC team of the University of Ghent (http://ugent.be/hpc). -# -# http://github.com/hpcugent/easybuild -# -# EasyBuild is free software: you can redistribute it and/or modify -# it under the terms of the GNU General Public License as published by -# the Free Software Foundation v2. -# -# EasyBuild is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU General Public License for more details. -# -# You should have received a copy of the GNU General Public License -# along with EasyBuild. If not, see . -## -from pkgutil import extend_path -__path__ = extend_path(__path__, __name__) diff --git a/easybuild/easyblocks/p/__init__.py b/easybuild/easyblocks/p/__init__.py deleted file mode 100644 index 5259a3a6e1..0000000000 --- a/easybuild/easyblocks/p/__init__.py +++ /dev/null @@ -1,26 +0,0 @@ -## -# Copyright 2009-2012 Stijn De Weirdt -# Copyright 2010 Dries Verdegem -# Copyright 2010-2012 Kenneth Hoste -# Copyright 2011 Pieter De Baets -# Copyright 2011-2012 Jens Timmerman -# -# This file is part of EasyBuild, -# originally created by the HPC team of the University of Ghent (http://ugent.be/hpc). -# -# http://github.com/hpcugent/easybuild -# -# EasyBuild is free software: you can redistribute it and/or modify -# it under the terms of the GNU General Public License as published by -# the Free Software Foundation v2. -# -# EasyBuild is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU General Public License for more details. -# -# You should have received a copy of the GNU General Public License -# along with EasyBuild. If not, see . -## -from pkgutil import extend_path -__path__ = extend_path(__path__, __name__) #@ReservedAssignment diff --git a/easybuild/easyblocks/p/packedbinary.py b/easybuild/easyblocks/p/packedbinary.py index ceb985275f..b18e290956 100644 --- a/easybuild/easyblocks/p/packedbinary.py +++ b/easybuild/easyblocks/p/packedbinary.py @@ -24,7 +24,7 @@ """ from easybuild.framework.application import Application -from easybuild.easyblocks.b.binary import EB_Binary +from easybuild.easyblocks.binary import EB_Binary class EB_PackedBinary(EB_Binary, Application): diff --git a/easybuild/easyblocks/q/__init__.py b/easybuild/easyblocks/q/__init__.py deleted file mode 100644 index 841038b2fa..0000000000 --- a/easybuild/easyblocks/q/__init__.py +++ /dev/null @@ -1,26 +0,0 @@ -## -# Copyright 2009-2012 Stijn De Weirdt -# Copyright 2010 Dries Verdegem -# Copyright 2010-2012 Kenneth Hoste -# Copyright 2011 Pieter De Baets -# Copyright 2011-2012 Jens Timmerman -# -# This file is part of EasyBuild, -# originally created by the HPC team of the University of Ghent (http://ugent.be/hpc). -# -# http://github.com/hpcugent/easybuild -# -# EasyBuild is free software: you can redistribute it and/or modify -# it under the terms of the GNU General Public License as published by -# the Free Software Foundation v2. -# -# EasyBuild is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU General Public License for more details. -# -# You should have received a copy of the GNU General Public License -# along with EasyBuild. If not, see . -## -from pkgutil import extend_path -__path__ = extend_path(__path__, __name__) diff --git a/easybuild/easyblocks/r/__init__.py b/easybuild/easyblocks/r/__init__.py deleted file mode 100644 index 841038b2fa..0000000000 --- a/easybuild/easyblocks/r/__init__.py +++ /dev/null @@ -1,26 +0,0 @@ -## -# Copyright 2009-2012 Stijn De Weirdt -# Copyright 2010 Dries Verdegem -# Copyright 2010-2012 Kenneth Hoste -# Copyright 2011 Pieter De Baets -# Copyright 2011-2012 Jens Timmerman -# -# This file is part of EasyBuild, -# originally created by the HPC team of the University of Ghent (http://ugent.be/hpc). -# -# http://github.com/hpcugent/easybuild -# -# EasyBuild is free software: you can redistribute it and/or modify -# it under the terms of the GNU General Public License as published by -# the Free Software Foundation v2. -# -# EasyBuild is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU General Public License for more details. -# -# You should have received a copy of the GNU General Public License -# along with EasyBuild. If not, see . -## -from pkgutil import extend_path -__path__ = extend_path(__path__, __name__) diff --git a/easybuild/easyblocks/s/__init__.py b/easybuild/easyblocks/s/__init__.py deleted file mode 100644 index 841038b2fa..0000000000 --- a/easybuild/easyblocks/s/__init__.py +++ /dev/null @@ -1,26 +0,0 @@ -## -# Copyright 2009-2012 Stijn De Weirdt -# Copyright 2010 Dries Verdegem -# Copyright 2010-2012 Kenneth Hoste -# Copyright 2011 Pieter De Baets -# Copyright 2011-2012 Jens Timmerman -# -# This file is part of EasyBuild, -# originally created by the HPC team of the University of Ghent (http://ugent.be/hpc). -# -# http://github.com/hpcugent/easybuild -# -# EasyBuild is free software: you can redistribute it and/or modify -# it under the terms of the GNU General Public License as published by -# the Free Software Foundation v2. -# -# EasyBuild is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU General Public License for more details. -# -# You should have received a copy of the GNU General Public License -# along with EasyBuild. If not, see . -## -from pkgutil import extend_path -__path__ = extend_path(__path__, __name__) diff --git a/easybuild/easyblocks/s/scalapack.py b/easybuild/easyblocks/s/scalapack.py index a41a7d7a24..7357ea875b 100644 --- a/easybuild/easyblocks/s/scalapack.py +++ b/easybuild/easyblocks/s/scalapack.py @@ -32,8 +32,8 @@ from distutils.version import LooseVersion import easybuild.tools.toolkit as toolkit -from easybuild.easyblocks.b.blacs import det_interface -from easybuild.easyblocks.l.lapack import get_blas_lib +from easybuild.easyblocks.blacs import det_interface +from easybuild.easyblocks.lapack import get_blas_lib from easybuild.framework.application import Application from easybuild.tools.modules import get_software_root @@ -58,7 +58,7 @@ def configure(self): try: shutil.copy(src, dest) except OSError, err: - self.log.error("Symlinking %s to % failed: %s"%(src, dest, err)) + self.log.error("Symlinking %s to % failed: %s" % (src, dest, err)) self.loosever = LooseVersion(self.version()) @@ -88,7 +88,7 @@ def make(self): # set BLAS and LAPACK libs extra_makeopts = [ - 'BLASLIB="%s -lpthread"' % get_blas_lib(self.log), + 'BLASLIB="%s -lpthread"' % get_blas_lib(self.log), 'LAPACKLIB=%s/lib/liblapack.a' % get_software_root('LAPACK') ] @@ -137,7 +137,7 @@ def make(self): # set compilers and options extra_makeopts += [ - 'FC="%s"' % mpif90, + 'FC="%s"' % mpif90, 'CC="%s"' % mpicc ] @@ -154,8 +154,8 @@ def make_install(self): # include files and libraries for (srcdir, destdir, ext) in [ - ("SRC", "include", ".h"), # include files - ("", "lib", ".a"), # libraries + ("SRC", "include", ".h"), # include files + ("", "lib", ".a"), # libraries ]: src = os.path.join(self.getcfg('startfrom'), srcdir) @@ -173,13 +173,13 @@ def make_install(self): self.log.debug("Copied %s to %s" % (lib, dest)) except OSError, err: - self.log.error("Copying %s/*.%s to installation dir %s failed: %s"%(src, ext, dest, err)) + self.log.error("Copying %s/*.%s to installation dir %s failed: %s" % (src, ext, dest, err)) def sanitycheck(self): """Custom sanity check for ScaLAPACK.""" if not self.getcfg('sanityCheckPaths'): - self.setcfg('sanityCheckPaths',{ + self.setcfg('sanityCheckPaths', { 'files': ["lib/libscalapack.a"], 'dirs': [] }) diff --git a/easybuild/easyblocks/t/__init__.py b/easybuild/easyblocks/t/__init__.py deleted file mode 100644 index 841038b2fa..0000000000 --- a/easybuild/easyblocks/t/__init__.py +++ /dev/null @@ -1,26 +0,0 @@ -## -# Copyright 2009-2012 Stijn De Weirdt -# Copyright 2010 Dries Verdegem -# Copyright 2010-2012 Kenneth Hoste -# Copyright 2011 Pieter De Baets -# Copyright 2011-2012 Jens Timmerman -# -# This file is part of EasyBuild, -# originally created by the HPC team of the University of Ghent (http://ugent.be/hpc). -# -# http://github.com/hpcugent/easybuild -# -# EasyBuild is free software: you can redistribute it and/or modify -# it under the terms of the GNU General Public License as published by -# the Free Software Foundation v2. -# -# EasyBuild is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU General Public License for more details. -# -# You should have received a copy of the GNU General Public License -# along with EasyBuild. If not, see . -## -from pkgutil import extend_path -__path__ = extend_path(__path__, __name__) diff --git a/easybuild/easyblocks/t/tbb.py b/easybuild/easyblocks/t/tbb.py index a85ee2b186..48c9783265 100644 --- a/easybuild/easyblocks/t/tbb.py +++ b/easybuild/easyblocks/t/tbb.py @@ -30,7 +30,7 @@ import shutil import glob -from easybuild.easyblocks.i.intelbase import EB_IntelBase +from easybuild.easyblocks.intelbase import EB_IntelBase class EB_tbb(EB_IntelBase): diff --git a/easybuild/easyblocks/t/trilinos.py b/easybuild/easyblocks/t/trilinos.py index 9fdf5fa5d3..111d84fc14 100644 --- a/easybuild/easyblocks/t/trilinos.py +++ b/easybuild/easyblocks/t/trilinos.py @@ -24,7 +24,7 @@ import re import easybuild.tools.toolkit as toolkit -from easybuild.easyblocks.c.cmake import EB_CMake +from easybuild.easyblocks.cmake import EB_CMake from easybuild.framework.easyconfig import CUSTOM from easybuild.tools.modules import get_software_root diff --git a/easybuild/easyblocks/u/__init__.py b/easybuild/easyblocks/u/__init__.py deleted file mode 100644 index 841038b2fa..0000000000 --- a/easybuild/easyblocks/u/__init__.py +++ /dev/null @@ -1,26 +0,0 @@ -## -# Copyright 2009-2012 Stijn De Weirdt -# Copyright 2010 Dries Verdegem -# Copyright 2010-2012 Kenneth Hoste -# Copyright 2011 Pieter De Baets -# Copyright 2011-2012 Jens Timmerman -# -# This file is part of EasyBuild, -# originally created by the HPC team of the University of Ghent (http://ugent.be/hpc). -# -# http://github.com/hpcugent/easybuild -# -# EasyBuild is free software: you can redistribute it and/or modify -# it under the terms of the GNU General Public License as published by -# the Free Software Foundation v2. -# -# EasyBuild is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU General Public License for more details. -# -# You should have received a copy of the GNU General Public License -# along with EasyBuild. If not, see . -## -from pkgutil import extend_path -__path__ = extend_path(__path__, __name__) diff --git a/easybuild/easyblocks/u/ufc.py b/easybuild/easyblocks/u/ufc.py index 56b4d77eed..3b9233d82e 100644 --- a/easybuild/easyblocks/u/ufc.py +++ b/easybuild/easyblocks/u/ufc.py @@ -22,7 +22,7 @@ """ from distutils.version import LooseVersion -from easybuild.easyblocks.c.cmakepythonpackage import EB_CMakePythonPackage +from easybuild.easyblocks.cmakepythonpackage import EB_CMakePythonPackage from easybuild.tools.modules import get_software_root, get_software_version diff --git a/easybuild/easyblocks/v/__init__.py b/easybuild/easyblocks/v/__init__.py deleted file mode 100644 index 841038b2fa..0000000000 --- a/easybuild/easyblocks/v/__init__.py +++ /dev/null @@ -1,26 +0,0 @@ -## -# Copyright 2009-2012 Stijn De Weirdt -# Copyright 2010 Dries Verdegem -# Copyright 2010-2012 Kenneth Hoste -# Copyright 2011 Pieter De Baets -# Copyright 2011-2012 Jens Timmerman -# -# This file is part of EasyBuild, -# originally created by the HPC team of the University of Ghent (http://ugent.be/hpc). -# -# http://github.com/hpcugent/easybuild -# -# EasyBuild is free software: you can redistribute it and/or modify -# it under the terms of the GNU General Public License as published by -# the Free Software Foundation v2. -# -# EasyBuild is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU General Public License for more details. -# -# You should have received a copy of the GNU General Public License -# along with EasyBuild. If not, see . -## -from pkgutil import extend_path -__path__ = extend_path(__path__, __name__) diff --git a/easybuild/easyblocks/w/__init__.py b/easybuild/easyblocks/w/__init__.py deleted file mode 100644 index 841038b2fa..0000000000 --- a/easybuild/easyblocks/w/__init__.py +++ /dev/null @@ -1,26 +0,0 @@ -## -# Copyright 2009-2012 Stijn De Weirdt -# Copyright 2010 Dries Verdegem -# Copyright 2010-2012 Kenneth Hoste -# Copyright 2011 Pieter De Baets -# Copyright 2011-2012 Jens Timmerman -# -# This file is part of EasyBuild, -# originally created by the HPC team of the University of Ghent (http://ugent.be/hpc). -# -# http://github.com/hpcugent/easybuild -# -# EasyBuild is free software: you can redistribute it and/or modify -# it under the terms of the GNU General Public License as published by -# the Free Software Foundation v2. -# -# EasyBuild is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU General Public License for more details. -# -# You should have received a copy of the GNU General Public License -# along with EasyBuild. If not, see . -## -from pkgutil import extend_path -__path__ = extend_path(__path__, __name__) diff --git a/easybuild/easyblocks/w/wps.py b/easybuild/easyblocks/w/wps.py index e2eb7a9b42..acd759d53e 100644 --- a/easybuild/easyblocks/w/wps.py +++ b/easybuild/easyblocks/w/wps.py @@ -36,7 +36,7 @@ import easybuild.tools.environment as env import easybuild.tools.toolkit as toolkit -from easybuild.easyblocks.n.netcdf import set_netcdf_env_vars, get_netcdf_module_set_cmds +from easybuild.easyblocks.netcdf import set_netcdf_env_vars, get_netcdf_module_set_cmds from easybuild.framework.application import Application from easybuild.framework.easyconfig import CUSTOM, MANDATORY from easybuild.tools.filetools import patch_perl_script_autoflush, run_cmd, run_cmd_qa, unpack @@ -115,7 +115,7 @@ def configure(self): self.log.error("JasPer module not loaded?") # patch ungrib Makefile so that JasPer is found - fn = os.path.join("ungrib","src","Makefile") + fn = os.path.join("ungrib", "src", "Makefile") jasperlibs = "-L%s -ljasper -L%s -lpng" % (jasperlibdir, libpnglibdir) try: for line in fileinput.input(fn, inplace=1, backup='.orig.JasPer'): @@ -196,8 +196,8 @@ def configure(self): 'CC': os.getenv('MPICC'), } fn = 'configure.wps' - for line in fileinput.input(fn, inplace=1,backup='.orig.comps'): - for (k,v) in comps.items(): + for line in fileinput.input(fn, inplace=1, backup='.orig.comps'): + for (k, v) in comps.items(): line = re.sub(r"^(%s\s*=\s*).*$" % k, r"\1 %s" % v, line) sys.stdout.write(line) diff --git a/easybuild/easyblocks/w/wrf.py b/easybuild/easyblocks/w/wrf.py index 8e083ae789..42db75a4a0 100644 --- a/easybuild/easyblocks/w/wrf.py +++ b/easybuild/easyblocks/w/wrf.py @@ -33,7 +33,7 @@ import easybuild.tools.environment as env import easybuild.tools.toolkit as toolkit -from easybuild.easyblocks.n.netcdf import set_netcdf_env_vars, get_netcdf_module_set_cmds +from easybuild.easyblocks.netcdf import set_netcdf_env_vars, get_netcdf_module_set_cmds from easybuild.framework.application import Application from easybuild.framework.easyconfig import CUSTOM, MANDATORY from easybuild.tools.filetools import patch_perl_script_autoflush, run_cmd, run_cmd_qa @@ -43,7 +43,7 @@ class EB_WRF(Application): """Support for building/installing WRF.""" - def __init__(self,*args,**kwargs): + def __init__(self, *args, **kwargs): """Add extra config options specific to WRF.""" Application.__init__(self, *args, **kwargs) @@ -75,7 +75,7 @@ def configure(self): hdf5 = get_software_root('HDF5') if hdf5: # check if this is parallel HDF5 - phdf5_bins = ['h5pcc','ph5diff'] + phdf5_bins = ['h5pcc', 'ph5diff'] parallel_hdf5 = True for f in phdf5_bins: if not os.path.exists(os.path.join(hdf5, 'bin', f)): @@ -121,7 +121,7 @@ def configure(self): # fetch selected build type (and make sure it makes sense) known_build_types = ['serial', 'smpar', 'dmpar', 'dm+sm'] - self.parallel_build_types = ["dmpar","smpar","dm+sm"] + self.parallel_build_types = ["dmpar", "smpar", "dm+sm"] bt = self.getcfg('buildtype') if not bt in known_build_types: @@ -145,7 +145,7 @@ def configure(self): run_cmd_qa(cmd, qa, no_qa=no_qa, std_qa=std_qa, log_all=True, simple=True) - cfgfile= 'configure.wrf' + cfgfile = 'configure.wrf' # make sure correct compilers are being used comps = { @@ -190,7 +190,7 @@ def make(self): p = self.getcfg('parallel') self.par = "" if p: - self.par="-j %s"%p + self.par = "-j %s" % p # build wrf cmd = "./compile %s wrf" % self.par @@ -285,7 +285,7 @@ def run_test(): self.log.debug("Building and running test %s" % test) # build - cmd = "./compile %s %s"%(self.par, test) + cmd = "./compile %s %s" % (self.par, test) run_cmd(cmd, log_all=True, simple=True) # run test @@ -331,12 +331,12 @@ def sanitycheck(self): if not self.getcfg('sanityCheckPaths'): mainver = self.version().split('.')[0] - self.wrfsubdir = "WRFV%s"%mainver + self.wrfsubdir = "WRFV%s" % mainver fs = ["libwrflib.a", "wrf.exe", "ideal.exe", "real.exe", "ndown.exe", "nup.exe", "tc.exe"] ds = ["main", "run"] - self.setcfg('sanityCheckPaths',{ + self.setcfg('sanityCheckPaths', { 'files': [os.path.join(self.wrfsubdir, "main", x) for x in fs], 'dirs': [os.path.join(self.wrfsubdir, x) for x in ds] }) diff --git a/easybuild/easyblocks/x/__init__.py b/easybuild/easyblocks/x/__init__.py deleted file mode 100644 index 841038b2fa..0000000000 --- a/easybuild/easyblocks/x/__init__.py +++ /dev/null @@ -1,26 +0,0 @@ -## -# Copyright 2009-2012 Stijn De Weirdt -# Copyright 2010 Dries Verdegem -# Copyright 2010-2012 Kenneth Hoste -# Copyright 2011 Pieter De Baets -# Copyright 2011-2012 Jens Timmerman -# -# This file is part of EasyBuild, -# originally created by the HPC team of the University of Ghent (http://ugent.be/hpc). -# -# http://github.com/hpcugent/easybuild -# -# EasyBuild is free software: you can redistribute it and/or modify -# it under the terms of the GNU General Public License as published by -# the Free Software Foundation v2. -# -# EasyBuild is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU General Public License for more details. -# -# You should have received a copy of the GNU General Public License -# along with EasyBuild. If not, see . -## -from pkgutil import extend_path -__path__ = extend_path(__path__, __name__) diff --git a/easybuild/easyblocks/y/__init__.py b/easybuild/easyblocks/y/__init__.py deleted file mode 100644 index 841038b2fa..0000000000 --- a/easybuild/easyblocks/y/__init__.py +++ /dev/null @@ -1,26 +0,0 @@ -## -# Copyright 2009-2012 Stijn De Weirdt -# Copyright 2010 Dries Verdegem -# Copyright 2010-2012 Kenneth Hoste -# Copyright 2011 Pieter De Baets -# Copyright 2011-2012 Jens Timmerman -# -# This file is part of EasyBuild, -# originally created by the HPC team of the University of Ghent (http://ugent.be/hpc). -# -# http://github.com/hpcugent/easybuild -# -# EasyBuild is free software: you can redistribute it and/or modify -# it under the terms of the GNU General Public License as published by -# the Free Software Foundation v2. -# -# EasyBuild is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU General Public License for more details. -# -# You should have received a copy of the GNU General Public License -# along with EasyBuild. If not, see . -## -from pkgutil import extend_path -__path__ = extend_path(__path__, __name__) diff --git a/easybuild/easyblocks/z/__init__.py b/easybuild/easyblocks/z/__init__.py deleted file mode 100644 index 841038b2fa..0000000000 --- a/easybuild/easyblocks/z/__init__.py +++ /dev/null @@ -1,26 +0,0 @@ -## -# Copyright 2009-2012 Stijn De Weirdt -# Copyright 2010 Dries Verdegem -# Copyright 2010-2012 Kenneth Hoste -# Copyright 2011 Pieter De Baets -# Copyright 2011-2012 Jens Timmerman -# -# This file is part of EasyBuild, -# originally created by the HPC team of the University of Ghent (http://ugent.be/hpc). -# -# http://github.com/hpcugent/easybuild -# -# EasyBuild is free software: you can redistribute it and/or modify -# it under the terms of the GNU General Public License as published by -# the Free Software Foundation v2. -# -# EasyBuild is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU General Public License for more details. -# -# You should have received a copy of the GNU General Public License -# along with EasyBuild. If not, see . -## -from pkgutil import extend_path -__path__ = extend_path(__path__, __name__) From bd8e36ea9a43fca4e3aa1380db2417be682eeb8c Mon Sep 17 00:00:00 2001 From: Kenneth Hoste Date: Fri, 24 Aug 2012 11:12:43 +0200 Subject: [PATCH 791/798] add qt4-devel as os dependency for CGAL --- .../c/CGAL/CGAL-4.0-goalf-1.1.0-no-OFED-Python-2.7.3.eb | 3 +++ .../easyconfigs/c/CGAL/CGAL-4.0-ictce-4.0.6-Python-2.7.3.eb | 4 +++- 2 files changed, 6 insertions(+), 1 deletion(-) diff --git a/easybuild/easyconfigs/c/CGAL/CGAL-4.0-goalf-1.1.0-no-OFED-Python-2.7.3.eb b/easybuild/easyconfigs/c/CGAL/CGAL-4.0-goalf-1.1.0-no-OFED-Python-2.7.3.eb index 526c956b00..d99a019b18 100644 --- a/easybuild/easyconfigs/c/CGAL/CGAL-4.0-goalf-1.1.0-no-OFED-Python-2.7.3.eb +++ b/easybuild/easyconfigs/c/CGAL/CGAL-4.0-goalf-1.1.0-no-OFED-Python-2.7.3.eb @@ -19,3 +19,6 @@ dependencies = [ ('Boost','1.49.0', versionsuffix), ('MPFR','3.1.0'), ] + +osdependencies = ['qt4-devel'] + diff --git a/easybuild/easyconfigs/c/CGAL/CGAL-4.0-ictce-4.0.6-Python-2.7.3.eb b/easybuild/easyconfigs/c/CGAL/CGAL-4.0-ictce-4.0.6-Python-2.7.3.eb index cae08379bb..d1c8a786f6 100644 --- a/easybuild/easyconfigs/c/CGAL/CGAL-4.0-ictce-4.0.6-Python-2.7.3.eb +++ b/easybuild/easyconfigs/c/CGAL/CGAL-4.0-ictce-4.0.6-Python-2.7.3.eb @@ -19,4 +19,6 @@ dependencies = [ ('Boost','1.49.0', versionsuffix), ('MPFR','3.1.0'), ] - \ No newline at end of file + +osdependencies = ['qt4-devel'] + From f01ec8f46307c356ab3dd0998db1f9404d6098fb Mon Sep 17 00:00:00 2001 From: Jens Timmerman Date: Fri, 24 Aug 2012 11:13:29 +0200 Subject: [PATCH 792/798] removed first letter from the module_path_for_easyblock function, since everything is in the easybuild.easyblocks namespace now --- easybuild/framework/application.py | 16 +++++----------- 1 file changed, 5 insertions(+), 11 deletions(-) diff --git a/easybuild/framework/application.py b/easybuild/framework/application.py index 0e1524dd98..86bd931927 100644 --- a/easybuild/framework/application.py +++ b/easybuild/framework/application.py @@ -42,7 +42,7 @@ import easybuild.tools.config as config import easybuild.tools.environment as env from easybuild.framework.easyconfig import EasyConfig -from easybuild.tools.build_log import EasyBuildError, initLogger, removeLogHandler,print_msg +from easybuild.tools.build_log import EasyBuildError, initLogger, removeLogHandler, print_msg from easybuild.tools.config import source_path, buildPath, installPath from easybuild.tools.filetools import unpack, patch, run_cmd, convertName, encode_class_name from easybuild.tools.module_generator import ModuleGenerator @@ -708,7 +708,7 @@ def print_environ(self): env = copy.deepcopy(os.environ) - changed = [(k,env[k]) for k in env if k not in self.orig_environ] + changed = [(k, env[k]) for k in env if k not in self.orig_environ] for k in env: if k in self.orig_environ and env[k] != self.orig_environ[k]: changed.append((k, env[k])) @@ -1158,7 +1158,7 @@ def make_devel_module(self, create_in_builddir=False): if not key.endswith(convertName(self.name(), upper=True)): path = os.environ[key] if os.path.isfile(path): - name, version = path.rsplit('/', 1) + name, version = path.rsplit('/', 1) load_txt += mod_gen.loadModule(name, version) if create_in_builddir: @@ -1546,14 +1546,8 @@ def module_path_for_easyblock(easyblock): if easyblock.startswith(class_prefix): easyblock = easyblock[len(class_prefix):] - modname = easyblock.replace('-','_') - - first_char = easyblock[0].lower() - - if first_char in letters: - return "easybuild.easyblocks.%s.%s" % (first_char, modname) - else: - return "easybuild.easyblocks.0.%s" % modname + modname = easyblock.replace('-', '_') + return "easybuild.easyblocks.%s" % (modname) def get_paths_for(log, subdir="easyblocks"): """ From b7950670602074fe7c01dfb54336cb0cffda6bd3 Mon Sep 17 00:00:00 2001 From: Jens Timmerman Date: Fri, 24 Aug 2012 11:16:05 +0200 Subject: [PATCH 793/798] fixed documentation + removed unneeded code --- easybuild/framework/application.py | 8 +------- 1 file changed, 1 insertion(+), 7 deletions(-) diff --git a/easybuild/framework/application.py b/easybuild/framework/application.py index 86bd931927..2def77dada 100644 --- a/easybuild/framework/application.py +++ b/easybuild/framework/application.py @@ -1529,14 +1529,8 @@ def get_class_for(modulepath, class_name): def module_path_for_easyblock(easyblock): """ Determine the module path for a given easyblock name, - based on first character: - - easybuild.easyblocks.a - - ... - - easybuild.easyblocks.z - - easybuild.easyblocks.0 + based on the encoded class name. """ - letters = [chr(ord('a') + x) for x in range(0, 26)] # a-z - if not easyblock: return None From 0f01f8b211549b2e76c319a5cf511b258615434f Mon Sep 17 00:00:00 2001 From: Jens Timmerman Date: Fri, 24 Aug 2012 11:22:53 +0200 Subject: [PATCH 794/798] added some extra explanations about our easyblock locations --- easybuild/easyblocks/__init__.py | 3 +++ 1 file changed, 3 insertions(+) diff --git a/easybuild/easyblocks/__init__.py b/easybuild/easyblocks/__init__.py index c673a5e104..c40f109bb2 100644 --- a/easybuild/easyblocks/__init__.py +++ b/easybuild/easyblocks/__init__.py @@ -25,5 +25,8 @@ import os from pkgutil import extend_path +# Extend path so python finds our easyblocks in the subdirectories where they are located __path__.extend([os.path.join(__path__[0],chr(y)) for y in range(ord('a'),ord('z')+1) + [ord('0')] ]) +# And let python know this is not the only place to look for them, +# so we can have 2 easybuild/easyblock paths in your pythonpath, one for public, one for private easyblocks. __path__ = extend_path(__path__, __name__) From 51abb397fe341aea9b9ec1fd417c358e1f74e567 Mon Sep 17 00:00:00 2001 From: Jens Timmerman Date: Fri, 24 Aug 2012 16:56:30 +0200 Subject: [PATCH 795/798] Removed check on exisiting easyblock path from application We will just try to import the easyblock when none is defined, if this fails, fall back to application. Since we can't know where the easyblock is actually located, it could be anywhere in __path__ So let python figure this out. --- easybuild/framework/application.py | 62 ++++++++++-------------------- 1 file changed, 21 insertions(+), 41 deletions(-) diff --git a/easybuild/framework/application.py b/easybuild/framework/application.py index 2def77dada..488740f481 100644 --- a/easybuild/framework/application.py +++ b/easybuild/framework/application.py @@ -1523,7 +1523,10 @@ def get_class_for(modulepath, class_name): # >>> c = getattr(d,'Likwid') # >>> c() m = __import__(modulepath, globals(), locals(), ['']) - c = getattr(m, class_name) + try: + c = getattr(m, class_name) + except AttributeError: + raise ImportError return c def module_path_for_easyblock(easyblock): @@ -1541,7 +1544,7 @@ def module_path_for_easyblock(easyblock): easyblock = easyblock[len(class_prefix):] modname = easyblock.replace('-', '_') - return "easybuild.easyblocks.%s" % (modname) + return "easybuild.easyblocks.%s" % (modname.lower()) def get_paths_for(log, subdir="easyblocks"): """ @@ -1567,57 +1570,34 @@ def get_class(easyblock, log, name=None): app_mod_class = ("easybuild.framework.application", "Application") - #TODO: create proper factory for this, as explained here - #http://stackoverflow.com/questions/456672/class-factory-in-python try: + # if no easyblock specified, try to find if one exists if not easyblock: if not name: name = "UNKNOWN" - + # modulepath will be the namespace + encoded modulename (from the classname) modulepath = module_path_for_easyblock(name) # The following is a generic way to calculate unique class names for any funny package title class_name = encode_class_name(name) # try and find easyblock - easyblock_found = False - easyblock_path = '' - easyblock_paths = [modulepath.lower()] - for path in get_paths_for(log, "easyblocks"): - for possible_path in easyblock_paths: - easyblock_path = os.path.join(path, "%s.py" % possible_path.replace('.', os.path.sep)) - log.debug("Checking easyblocks path %s..." % easyblock_path) - if os.path.exists(easyblock_path): - easyblock_found = True - log.debug("Found easyblock for %s at %s" % (name, easyblock_path)) - modulepath = possible_path - break - if easyblock_found: - break - - # only try to import derived easyblock if it exists - if easyblock_found: - - try: - - cls = get_class_for(modulepath, class_name) - - log.info("Successfully obtained %s class instance from %s" % (class_name, modulepath)) - - return cls - - except Exception, err: - log.error("Failed to use easyblock at %s for class %s: %s" % (modulepath, class_name, err)) - raise EasyBuildError(str(err)) - - else: + try: + log.debug("getting class for %s.%s" % (modulepath, class_name)) + cls = get_class_for(modulepath, class_name) + log.info("Successfully obtained %s class instance from %s" % (class_name, modulepath)) + return cls + except ImportError, err: + # No easyblock could be found, so fall back to default class. + + log.error("Failed to import easyblock for %s, falling back to default %s class: erro: %s" % \ + (class_name, app_mod_class, err)) (modulepath, class_name) = app_mod_class - log.debug("Easyblock path %s does not exist, so falling back to default %s class from %s" % (easyblock_path, class_name, modulepath)) - + # If Application was specified, use the framework namespace elif easyblock == "Application": (modulepath, class_name) = app_mod_class - log.debug("Easyblock %s specified, so using default class %s from %s" % (easyblock, - class_name, - modulepath)) + log.debug("Easyblock %s specified, so using default class %s from %s" % \ + (easyblock, class_name, modulepath)) + # Something was specified, lets parse it else: class_name = easyblock.split('.')[-1] # figure out if full path was specified or not From 1b0d2fe1ae65237ee4e117b7875b5c1add93ed02 Mon Sep 17 00:00:00 2001 From: Kenneth Hoste Date: Fri, 24 Aug 2012 23:41:51 +0200 Subject: [PATCH 796/798] fix typos in postproc w.r.t. use of group_id argument --- easybuild/framework/application.py | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/easybuild/framework/application.py b/easybuild/framework/application.py index e9bd52291e..c65a2e560f 100644 --- a/easybuild/framework/application.py +++ b/easybuild/framework/application.py @@ -751,14 +751,13 @@ def postproc(self): else: # remove write permissions for group and other perms = stat.S_IWGRP | stat.S_IWOTH - adjust_permissions(self.installdir, perms, add=False, recursive=True, - group_id=gid, relative=True) + adjust_permissions(self.installdir, perms, add=False, recursive=True, relative=True) self.log.info("Successfully removed write permissions recursively for group/other on install dir.") if read_only_installdir(): # remove write permissions for everyone perms = stat.S_IWUSR | stat.S_IWGRP | stat.S_IWOTH - adjust_permissions(self.installdir, perms, add=False, recursive=True, group_id=gid, relative=True) + adjust_permissions(self.installdir, perms, add=False, recursive=True, relative=True) self.log.info("Successfully removed write permissions recursively for *EVERYONE* on install dir.") def cleanup(self): From 31db5f69d0f335611c5469c19e2fca75119a5716 Mon Sep 17 00:00:00 2001 From: Kenneth Hoste Date: Sat, 25 Aug 2012 13:21:44 +0200 Subject: [PATCH 797/798] complete issue number in comment for read_only_installdir function --- easybuild/tools/config.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/easybuild/tools/config.py b/easybuild/tools/config.py index f0a535e5fd..54b38bb603 100644 --- a/easybuild/tools/config.py +++ b/easybuild/tools/config.py @@ -186,7 +186,7 @@ def read_only_installdir(): """ Return whether installation dir should be fully read-only after installation. """ - # FIXME (see issue #): add a config option to set this, should be True by default (?) + # FIXME (see issue #123): add a config option to set this, should be True by default (?) # this also needs to be checked when --force is used; # install dir will have to (temporarily) be made writeable again for owner in that case return False From 0968a0345305c099a5ac8b32e56b9a2d27e664b7 Mon Sep 17 00:00:00 2001 From: Kenneth Hoste Date: Sat, 25 Aug 2012 20:12:11 +0200 Subject: [PATCH 798/798] hotfixes for bugs in develop: EB_ifort was using incorrect class for icc, EasyBuild was exiting when no easyblock was found instead of falling back to Application class as a default --- easybuild/easyblocks/i/ifort.py | 4 ++-- easybuild/framework/application.py | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/easybuild/easyblocks/i/ifort.py b/easybuild/easyblocks/i/ifort.py index 7d82cc07d5..9ef89634b3 100644 --- a/easybuild/easyblocks/i/ifort.py +++ b/easybuild/easyblocks/i/ifort.py @@ -28,10 +28,10 @@ from distutils.version import LooseVersion -from easybuild.easyblocks.icc import EB_Icc, EB_IntelBase +from easybuild.easyblocks.icc import EB_icc, EB_IntelBase -class EB_ifort(Icc): +class EB_ifort(EB_icc): """ Class that can be used to install ifort - tested with 11.1.046 diff --git a/easybuild/framework/application.py b/easybuild/framework/application.py index c65a2e560f..442d4d1f26 100644 --- a/easybuild/framework/application.py +++ b/easybuild/framework/application.py @@ -1589,7 +1589,7 @@ def get_class(easyblock, log, name=None): except ImportError, err: # No easyblock could be found, so fall back to default class. - log.error("Failed to import easyblock for %s, falling back to default %s class: erro: %s" % \ + log.debug("Failed to import easyblock for %s, falling back to default %s class: erro: %s" % \ (class_name, app_mod_class, err)) (modulepath, class_name) = app_mod_class # If Application was specified, use the framework namespace