Skip to content

add support for installing Intel tools that do not require license at installation time, incl. impi and imkl 2017.2.174#1117

Merged
boegel merged 13 commits intoeasybuilders:developfrom
ocaisa:intelbase_nolicence
Mar 3, 2017
Merged

add support for installing Intel tools that do not require license at installation time, incl. impi and imkl 2017.2.174#1117
boegel merged 13 commits intoeasybuilders:developfrom
ocaisa:intelbase_nolicence

Conversation

@ocaisa
Copy link
Copy Markdown
Member

@ocaisa ocaisa commented Feb 24, 2017

Just add a new variable licensed to the intelbase to switch off licence related stuff

@ocaisa
Copy link
Copy Markdown
Member Author

ocaisa commented Feb 24, 2017

Hopes to solve #1116

'license_file': self.license_file,
}
else:
silent = '\n'
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

print a debug message that you are not going to use any license?

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],
Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Is this name potentially misleading, of course it is still licenced but doesn't require a runtime licence, how about runtime_license?

Copy link
Copy Markdown
Member Author

@ocaisa ocaisa Feb 24, 2017

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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)

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thoughts @boegel

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I had a WIP branch where I named this requires_license, but I guess requires_runtime_license would be more accurate...

@ocaisa
Copy link
Copy Markdown
Member Author

ocaisa commented Feb 24, 2017

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']:
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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']:
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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']:
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

if self.cfg['license_file']: ?

@boegel boegel added this to the 3.2.0 milestone Feb 24, 2017
@ocaisa
Copy link
Copy Markdown
Member Author

ocaisa commented Feb 24, 2017

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
Copy link
Copy Markdown
Member

@boegel boegel Feb 24, 2017

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

how about

self.requires_runtime_license = self.cfg['requires_runtime_license'] or requires_runtime_license

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Isn't this always True regardless of the easyconfig setting since the default value of requires_runtime_license is True

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Rather than or, shouldn't it be and

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

👍 on and

@ocaisa
Copy link
Copy Markdown
Member Author

ocaisa commented Feb 24, 2017

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
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

please initialise self.requires_runtime_license in the constructor __init__, probably to True; this is import for --module-only for example

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Done


txt += self.module_generator.prepend_paths(self.license_env_var, [self.license_file],
allow_abs=True, expand_relpaths=False)
if self.requires_runtime_license:
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

we need to think about what this does under --module-only, although it may be OK since prepare_step isn't skipped then?

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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)

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

ok

)
silent = '\n'

silent = silent.join([
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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'
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

this should be

silent = ''

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'])
)
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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:
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

ok

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",
Copy link
Copy Markdown
Member

@boegel boegel Feb 25, 2017

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

maybe use "Boolean indicating whether or not a runtime license is required" ?

@boegel
Copy link
Copy Markdown
Member

boegel commented Feb 25, 2017

@ocaisa shall we also include an update to the imkl easyblock, where we call prepare_step with requires_runtime_license=False for recent imkl versions, to resolve #1116?

@ocaisa
Copy link
Copy Markdown
Member Author

ocaisa commented Feb 25, 2017

Just tested again, works for me

@boegel boegel added this to the 3.1.1 milestone Mar 3, 2017
@boegel boegel removed this from the 3.2.0 milestone Mar 3, 2017

def prepare_step(self):
if LooseVersion(self.version) >= LooseVersion('2017.2.174'):
super(EB_impi, self).prepare_step(requires_runtime_license=False)
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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?

@DanielTosello?

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

For MKL, impi, TBB, DAAL, IPP your licence is now only getting you premium support

Copy link
Copy Markdown
Member Author

@ocaisa ocaisa Mar 3, 2017

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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.

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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).

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yes, we can provide the option, but it shouldn't be done automagically...

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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!

@boegel boegel mentioned this pull request Mar 3, 2017
@boegel boegel changed the title Add support for unlicenced Intel products add support for installing Intel tools that do not require license at installation time, incl. impi and imkl 2017.2.174 Mar 3, 2017
@boegel
Copy link
Copy Markdown
Member

boegel commented Mar 3, 2017

verified with easybuilders/easybuild-easyconfigs#4248, good to go, thanks @ocaisa!

@boegel boegel merged commit 4b21e79 into easybuilders:develop Mar 3, 2017
bartoldeman added a commit to ComputeCanada/easybuild-easyblocks that referenced this pull request Apr 13, 2017
@ocaisa ocaisa deleted the intelbase_nolicence branch October 27, 2021 10:40
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants