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

Reply via email to