Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

enhance IntelBase easyblock to avoid crash when $USER is not set #2642

Merged

Conversation

branfosj
Copy link
Member

@branfosj branfosj commented Dec 21, 2021

(created using eb --new-pr)

This sets a default for the case where USER is not set. The alternative would be to check that USER is set and give a better error if it is not.

Error, from slack:

== 2021-12-20 01:28:39,758 build_log.py:169 ERROR EasyBuild crashed with an error (at easybuild/base/exceptions.py:124 in __init__): Traceback (most recent call last):
  File "/store/software/EasyBuild/4.4.2/lib/python2.7/site-packages/easybuild/main.py", line 118, in build_and_install_software
    (ec_res['success'], app_log, err) = build_and_install_one(ec, init_env)
  File "/store/software/EasyBuild/4.4.2/lib/python2.7/site-packages/easybuild/framework/easyblock.py", line 3676, in build_and_install_one
    app = app_class(ecdict['ec'])
  File "/store/software/EasyBuild/4.4.2/lib/python2.7/site-packages/easybuild/easyblocks/i/intel_compilers.py", line 48, in __init__
    super(EB_intel_minus_compilers, self).__init__(*args, **kwargs)
  File "/store/software/EasyBuild/4.4.2/lib/python2.7/site-packages/easybuild/easyblocks/generic/intelbase.py", line 110, in __init__
    self.home_subdir_local = os.path.join(common_tmp_dir, os.getenv('USER'), 'easybuild_intel')
  File "/usr/lib64/python2.7/posixpath.py", line 75, in join
    if b.startswith('/'):
AttributeError: 'NoneType' object has no attribute 'startswith'
 (at easybuild/main.py:151 in build_and_install_software)

@branfosj branfosj added this to the next release (4.5.2?) milestone Dec 21, 2021
@boegel boegel changed the title avoid fail when USER is not set when using intelbase enhance IntelBase easyblock to avoid crash when $USER is not set Dec 23, 2021
Copy link
Member

@boegel boegel left a comment

Choose a reason for hiding this comment

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

lgtm

@boegel
Copy link
Member

boegel commented Dec 23, 2021

Test report by @boegel

Overview of tested easyconfigs (in order)

  • SUCCESS intel-compilers-2021.4.0.eb
  • SUCCESS impi-2021.4.0-intel-compilers-2021.4.0.eb

Build succeeded for 2 out of 2 (2 easyconfigs in total)
node3104.skitty.os - Linux centos linux 7.9.2009, x86_64, Intel(R) Xeon(R) Gold 6140 CPU @ 2.30GHz (skylake_avx512), Python 3.6.8
See https://gist.github.com/f914b2358f0142d0b3f3ccb8ebf20895 for a full test report.

@boegel boegel merged commit f880dbd into easybuilders:develop Dec 23, 2021
@branfosj branfosj deleted the 20211221095044_new_pr_intelbase branch December 23, 2021 12:44
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants