Hi Fokko,
I've worked on a couple of fixes for --module-only, which will soon be
part of a bugfix release EasyBuild v2.1.1.
See the following PRs which have been merged into the develop branches:
* https://github.com/hpcugent/easybuild-framework/pull/1276
* https://github.com/hpcugent/easybuild-easyblocks/pull/610
I'm not sure the prepend-path issue is covered as well though, I'll need
to look into that.
Long story short: be very careful with --module-only for now, the
modules you're getting are broken in the sense that won't include
'module load' statements for dependencies.
Do note that when only generating the modules, it's inevitable that the
module file you obtained is going to be a partial one, if you're
skipping the actual installation.
EasyBuild only includes prepend-paths statements for *existing*
directories...
If you're trying to migrate from a flat module naming scheme, you
shouldn't be using --force, but rather employ a 'wrapper' module naming
scheme to migrate, see the module naming scheme that is included in the
tests (which should probably be moved into the framework itself):
https://github.com/hpcugent/easybuild-framework/blob/master/test/framework/sandbox/easybuild/tools/module_naming_scheme/migrate_from_eb_to_hmns.py
.
regards,
Kenneth
On 12/05/15 12:24, Fokko Masselink wrote:
When trying to rebuild modules only for VTune, it fails on an unset
self.license_file.
VTune uses IntelBase as the base EasyBlock. The license information is setup
in the configure step, which is skipped by the --module-only commandline
option. That is to me the cause of this issue.
It also misses out on the make_module_req_guess function it seems.
The resulting modulefile misses the prepend-path statements.
Original full build:
#---------------------------- 8< ------------------------------------
conflict VTune
prepend-path CPATH $root/vtune_amplifier_xe/include
prepend-path FPATH $root/vtune_amplifier_xe/include
prepend-path LD_LIBRARY_PATH $root/vtune_amplifier_xe/lib64
prepend-path LIBRARY_PATH $root/vtune_amplifier_xe/lib64
prepend-path MANPATH $root/vtune_amplifier_xe/man
prepend-path PATH $root/vtune_amplifier_xe/bin64
setenv EBROOTVTUNE "$root"
setenv EBVERSIONVTUNE "2015_update2"
setenv EBDEVELVTUNE "$root/easybuild/VTune-2015_update2-easybuild-
devel"
#---------------------------- 8< ------------------------------------
WIth rebuild-module-only option:
#---------------------------- 8< ------------------------------------
conflict VTune
setenv EBROOTVTUNE "$root"
setenv EBVERSIONVTUNE "2015_update2"
setenv EBDEVELVTUNE "$root/easybuild/Core-VTune-2015_update2-
easybuild-devel"
#---------------------------- 8< ------------------------------------
In addition VTune seems to need the env variable:
VTUNE_AMPLIFIER_XE_<VERSION>_DIR, where VERSION is 2014, 2015, 2016, etc...
Here's the diff for my vtune.py file:
$ diff -ur vtune.py.orig vtune.py
--- vtune.py.orig 2015-05-12 12:22:44.477968429 +0200
+++ vtune.py 2015-05-12 12:12:50.568989289 +0200
@@ -61,21 +61,21 @@
if self.cfg['m32']:
guesses.update({
- 'PATH': ['bin32'],
- 'LD_LIBRARY_PATH': ['lib32'],
- 'LIBRARY_PATH': ['lib32'],
+ 'PATH': ['bin32', 'vtune_amplifier_xe/bin32'],
+ 'LD_LIBRARY_PATH': ['lib32', 'vtune_amplifier_xe/lib32'],
+ 'LIBRARY_PATH': ['lib32', 'vtune_amplifier_xe/lib32'],
})
else:
guesses.update({
- 'PATH': ['bin64'],
- 'LD_LIBRARY_PATH': ['lib64'],
- 'LIBRARY_PATH': ['lib64'],
+ 'PATH': ['bin64', 'vtune_amplifier_xe/bin64'],
+ 'LD_LIBRARY_PATH': ['lib64', 'vtune_amplifier_xe/lib64'],
+ 'LIBRARY_PATH': ['lib64', 'vtune_amplifier_xe/lib64'],
})
guesses.update({
- 'CPATH': ['include'],
- 'FPATH': ['include'],
- 'MANPATH': ['man'],
+ 'CPATH': ['include', 'vtune_amplifier_xe/include'],
+ 'FPATH': ['include', 'vtune_amplifier_xe/include'],
+ 'MANPATH': ['man', 'vtune_amplifier_xe/man'],
})
return guesses
@@ -83,8 +83,26 @@
def make_module_extra(self):
"""Custom variable definitions in module file."""
+ VTUNE_VERSION=None
+ if LooseVersion(self.version) >= LooseVersion("2013") and
LooseVersion(self.version) < LooseVersion("2014"):
+ VTUNE_VERSION='2013'
+ elif LooseVersion(self.version) >= LooseVersion("2014") and
LooseVersion(self.version) < LooseVersion("2015"):
+ VTUNE_VERSION='2014'
+ elif LooseVersion(self.version) >= LooseVersion("2015") and
LooseVersion(self.version) < LooseVersion("2016"):
+ VTUNE_VERSION='2015'
+ elif LooseVersion(self.version) >= LooseVersion("2016") and
LooseVersion(self.version) < LooseVersion("2017"):
+ VTUNE_VERSION='2016'
+ elif LooseVersion(self.version) >= LooseVersion("2017") and
LooseVersion(self.version) < LooseVersion("2018"):
+ VTUNE_VERSION='2017'
+ VTUNE_DIR_VAR = 'VTUNE_AMPLIFIER_XE_%s_DIR' % VTUNE_VERSION
+
+ if self.license_file is None and self.cfg['license_file'] is not
None:
+ self.license_file = self.cfg['license_file']
+ if self.license_env_var is None:
+ self.license_env_var = 'INTEL_LICENSE_FILE'
txt = super(EB_VTune, self).make_module_extra()
txt += self.module_generator.prepend_paths(self.license_env_var,
self.license_file, allow_abs=True)
+ txt += self.module_generator.set_environment(VTUNE_DIR_VAR,
self.installdir)
return txt
kind regards,
Fokko