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

change Bundle easyblock to also collect altroot and altversion in the module step so they are set when running --module-only #2485

Merged

Conversation

branfosj
Copy link
Member

@branfosj branfosj commented Jun 21, 2021

(created using eb --new-pr)

fixes #2484

This maintains the current behaviour, but also checks for altroot and altversion in the module step if they are not already defined. This fixes the issue where they are not defined if we do a module only rebuild.

@branfosj branfosj added this to the next release (4.4.1) milestone Jun 21, 2021
@branfosj branfosj marked this pull request as draft June 21, 2021 13:29
@branfosj branfosj marked this pull request as ready for review June 21, 2021 13:44
@branfosj
Copy link
Member Author

Test report by @branfosj

Overview of tested easyconfigs (in order)

  • SUCCESS GCC-11.1.0.eb
  • SUCCESS GCC-10.3.0.eb
  • SUCCESS GCC-9.3.0.eb
  • SUCCESS GCC-7.3.0-2.30.eb

Build succeeded for 4 out of 4 (4 easyconfigs in total)
bear-pg0211u03a.bear.cluster - Linux RHEL 8.3, x86_64, Intel(R) Xeon(R) Gold 6248 CPU @ 2.50GHz (cascadelake), Python 3.6.8
See https://gist.github.com/1394d137ea572a614e536d3b2fadce38 for a full test report.

@branfosj
Copy link
Member Author

Test report by @branfosj

Overview of tested easyconfigs (in order)

  • SUCCESS CUDA-11.0.2-GCC-9.3.0.eb
  • SUCCESS CUDA-11.0.2-iccifort-2020.1.217.eb
  • SUCCESS CUDA-11.1.1-GCC-10.2.0.eb
  • SUCCESS CUDA-11.1.1-iccifort-2020.4.304.eb

Build succeeded for 4 out of 4 (4 easyconfigs in total)
bber0501u03a.bb2.cluster - Linux RHEL 8.3, x86_64, Intel(R) Xeon(R) CPU E5-2690 v3 @ 2.60GHz (haswell), Python 3.6.8
See https://gist.github.com/aee048619c2edc046f8f8735221abb8f for a full test report.

@boegel boegel changed the title collect altroot and altversion later so that they appear in the module when running --module-only change Bundle easyblcok to collect altroot and altversion later so that they appear in the module when running --module-only Jun 23, 2021
@branfosj branfosj changed the title change Bundle easyblcok to collect altroot and altversion later so that they appear in the module when running --module-only change Bundle easyblock to collect altroot and altversion later so that they appear in the module when running --module-only Jun 24, 2021
@migueldiascosta
Copy link
Member

wouldn't it make more sense to move to __init__ instead?

@branfosj
Copy link
Member Author

wouldn't it make more sense to move to __init__ instead?

The __init__ happens before the dependencies are loaded so get_software_root returns None.

@migueldiascosta
Copy link
Member

migueldiascosta commented Jun 30, 2021

prepare_step then? (after calling super's)

(edit: prepare_step is not skipped when running --module-only)

@ocaisa
Copy link
Member

ocaisa commented Jun 30, 2021

For this easyblock it has no impact and the change you suggested works. However, it's hard to ensure that any easyblock that derives from this (and that we may not even know about) may not be leveraging self.altroot in another step. For backwards compatability, it is probably best to add

self.altroot = None
self.altversion = None

to the init method and create an initialisation method that you can use both in the config and module methods. I did something similar recently for Tkinter (#2416)

@branfosj branfosj changed the title change Bundle easyblock to collect altroot and altversion later so that they appear in the module when running --module-only change Bundle easyblock to also collect altroot and altversion in the module step so they are set when running --module-only Jun 30, 2021
Copy link
Member

@ocaisa ocaisa left a comment

Choose a reason for hiding this comment

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

LGTM

@ocaisa
Copy link
Member

ocaisa commented Jul 1, 2021

Test report by @ocaisa

Overview of tested easyconfigs (in order)

  • SUCCESS GCC-10.2.0.eb

Build succeeded for 1 out of 1 (1 easyconfigs in total)
generoso - Linux centos linux 8.2.2004, x86_64, Intel(R) Xeon(R) CPU E5-2667 v3 @ 3.20GHz, Python 3.6.8
See https://gist.github.com/30131e8a77bc49fdc662070388168483 for a full test report.

@ocaisa
Copy link
Member

ocaisa commented Jul 1, 2021

Fixes the issue correctly (CMAKE_PREFIX_PATH was added to framework in a later EB release than the original build):

== comparing module file with backup /users/ocaisa/.local/easybuild/modules/all/GCC/10.2.0.bak_20210701090102_2518753; diff is:
--- /users/ocaisa/.local/easybuild/modules/all/GCC/10.2.0.bak_20210701090102_2518753
+++ /users/ocaisa/.local/easybuild/modules/all/GCC/10.2.0.lua
@@ -28,9 +28,10 @@
     load("binutils/2.35-GCCcore-10.2.0")
 end
 
+prepend_path("CMAKE_PREFIX_PATH", root)
 setenv("EBROOTGCC", "/users/ocaisa/.local/easybuild/software/GCCcore/10.2.0")
 setenv("EBVERSIONGCC", "10.2.0")
 setenv("EBDEVELGCC", pathJoin(root, "easybuild/GCC-10.2.0-easybuild-devel"))
 
--- Built with EasyBuild version 4.3.4.dev0-r00b1c75f775c9d423a3ff992c98e0b2c534e9f86
+-- Built with EasyBuild version 4.4.1.dev0-r76b6ab1773faf95f8bac64e2943b1e181d38bdaa
 

== ... (took 1 secs)

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.

--module-only does not respect altroot
3 participants