add support for installing Intel tools that do not require license at installation time, incl. impi and imkl 2017.2.174#1117
Conversation
|
Hopes to solve #1116 |
| 'license_file': self.license_file, | ||
| } | ||
| else: | ||
| silent = '\n' |
There was a problem hiding this comment.
print a debug message that you are not going to use any license?
…we set `licensed = False`
| extra_vars = EasyBlock.extra_options(extra_vars) | ||
| extra_vars.update({ | ||
| 'license_activation': [ACTIVATION_LIC_SERVER, "License activation type", CUSTOM], | ||
| 'licensed': [True, "Set to False if Intel software does not require a runtime licence", CUSTOM], |
There was a problem hiding this comment.
Is this name potentially misleading, of course it is still licenced but doesn't require a runtime licence, how about runtime_license?
There was a problem hiding this comment.
Should I just be leveraging the existing license_activation variable, repurposing it to also handle a False value. (I tried this but it caused some weirdness)
There was a problem hiding this comment.
I had a WIP branch where I named this requires_license, but I guess requires_runtime_license would be more accurate...
|
This successfully builds the latest MKL for me |
| default_lic_env_var = 'INTEL_LICENSE_FILE' | ||
| lic_specs, self.license_env_var = find_flexlm_license(custom_env_vars=[default_lic_env_var], | ||
| lic_specs=[self.cfg['license_file']]) | ||
| if self.cfg['licensed']: |
There was a problem hiding this comment.
ideally, we would have an equivalent named argument to prepare_step, which we can leverage from easyblocks deriving from IntelBase:
something like this (logic may be a bit off, since the point of this is to avoid having to use requires_runtime_license = False in all future imkl easyconfigs):
def prepare_step(self, requires_runtime_license=True):
...
if self.cfg['requires_runtime_license'] or requires_runtime_license:
...| silent = '\n'.join([ | ||
| "%(activation_name)s=%(activation)s", | ||
| lic_file_entry, | ||
| if self.cfg['licensed']: |
There was a problem hiding this comment.
maybe it's better to use if self.runtime_license: here, which is set to something not None in prepare_step in case there is a runtime license?
|
|
||
| txt += self.module_generator.prepend_paths(self.license_env_var, [self.license_file], | ||
| allow_abs=True, expand_relpaths=False) | ||
| if self.cfg['licensed']: |
|
Ok, that still seems to be working for me, just did a rebuild |
| if not self.cfg['requires_runtime_license'] or not requires_runtime_license: | ||
| self.requires_runtime_license = False | ||
| else: | ||
| self.requires_runtime_license = True |
There was a problem hiding this comment.
how about
self.requires_runtime_license = self.cfg['requires_runtime_license'] or requires_runtime_licenseThere was a problem hiding this comment.
Isn't this always True regardless of the easyconfig setting since the default value of requires_runtime_license is True
There was a problem hiding this comment.
Rather than or, shouldn't it be and
|
Still works on latest MKL, I think this is good to go now |
| lic_specs, self.license_env_var = find_flexlm_license(custom_env_vars=[default_lic_env_var], | ||
| lic_specs=[self.cfg['license_file']]) | ||
| # Decide if we need a license or not (default is True because of defaults of individual Booleans) | ||
| self.requires_runtime_license = self.cfg['requires_runtime_license'] and requires_runtime_license |
There was a problem hiding this comment.
please initialise self.requires_runtime_license in the constructor __init__, probably to True; this is import for --module-only for example
|
|
||
| txt += self.module_generator.prepend_paths(self.license_env_var, [self.license_file], | ||
| allow_abs=True, expand_relpaths=False) | ||
| if self.requires_runtime_license: |
There was a problem hiding this comment.
we need to think about what this does under --module-only, although it may be OK since prepare_step isn't skipped then?
There was a problem hiding this comment.
Yes, should be fine, if it worked before it should still work now (otherwise you would be seeing UNKNOWN being defined in modules by the existing code)
| ) | ||
| silent = '\n' | ||
|
|
||
| silent = silent.join([ |
There was a problem hiding this comment.
this doesn't look right, this should be:
silent += '\n'.join([
Otherwise you'll be repeating the text that specifies the license several times.
See:
>>> 'x'.join(['a', 'b', 'c'])
'axbxc'| "Ignoring license checks: self.requires_runtime_license=%s self.cfg['requires_runtime_license']=%s" | ||
| % (self.requires_runtime_license, self.cfg['requires_runtime_license']) | ||
| ) | ||
| silent = '\n' |
| self.log.debug( | ||
| "Ignoring license checks: self.requires_runtime_license=%s self.cfg['requires_runtime_license']=%s" | ||
| % (self.requires_runtime_license, self.cfg['requires_runtime_license']) | ||
| ) |
There was a problem hiding this comment.
this looks overly verbose, I'd go with
self.log.debug("No license required, so not including license specifications in silent.cfg")|
|
||
| txt += self.module_generator.prepend_paths(self.license_env_var, [self.license_file], | ||
| allow_abs=True, expand_relpaths=False) | ||
| if self.requires_runtime_license: |
| extra_vars = EasyBlock.extra_options(extra_vars) | ||
| extra_vars.update({ | ||
| 'license_activation': [ACTIVATION_LIC_SERVER, "License activation type", CUSTOM], | ||
| 'requires_runtime_license': [True, "Set to False if Intel software does not require a runtime licence", |
There was a problem hiding this comment.
maybe use "Boolean indicating whether or not a runtime license is required" ?
|
Just tested again, works for me |
|
|
||
| def prepare_step(self): | ||
| if LooseVersion(self.version) >= LooseVersion('2017.2.174'): | ||
| super(EB_impi, self).prepare_step(requires_runtime_license=False) |
There was a problem hiding this comment.
wait... do you have a reference for this?
I know you can get the Intel MPI runtime for free, but also the full thing that allows you to build/link with/to it?
There was a problem hiding this comment.
There was a problem hiding this comment.
There is says free download at least, same as MKL, this link is maybe a bit more explicit:
https://registrationcenter.intel.com/en/forms/?productid=2558&licensetype=2
There was a problem hiding this comment.
For MKL, impi, TBB, DAAL, IPP your licence is now only getting you premium support
There was a problem hiding this comment.
Eek, abort, abort! That is a named user licence, not valid for HPC:
iii. NAMED-USER LICENSE: If You obtained the Materials under a named-user license, You may allow only one (1) individual to install and use the Materials on no more than three (3) computers provided that same individual is using the Materials only on one (1) computer at a time. If You obtained a time-limited named-user license, the term of Your license and your ability to use the Materials is limited to the time period of the obtained license, which is specified on Intel’s download website, specified in the applicable documentation or controlled by the license key for the Materials.
There was a problem hiding this comment.
I think we can leave the option to switch off checking the licence there for people who respect this license agreement but they should need to explicitly add this to their easyconfig (and since we know the restrictions, we should perhaps warn them if they use this option).
There was a problem hiding this comment.
Yes, we can provide the option, but it shouldn't be done automagically...
There was a problem hiding this comment.
Doesn't matter, download of impi download for v2017.2.174 is identical, and doesn't allow you to provide a license file anymore either, so this change is required
There was a problem hiding this comment.
Ok, so SHA256 sums on the 'licenced' downloads and the 'free' downloads are the same. Therefore it is no longer possible to provide your licence to these software packages and this PR can go in. People need to be careful about what they are agreeing to when they download the sources as the installation packages will no longer check your licencing during the install...so it is a case of Freeloader beware!
|
verified with easybuilders/easybuild-easyconfigs#4248, good to go, thanks @ocaisa! |
Just add a new variable
licensedto the intelbase to switch off licence related stuff