Skip to content

Conversation

@geimer
Copy link
Contributor

@geimer geimer commented May 16, 2018

Minimal-toolchain versions (hierarchical MNS) for gompi/2018a.

@easybuilders easybuilders deleted a comment from boegelbot May 17, 2018
# Python bindings (optional)
('Python', '2.7.14', '-bare'),
('future', '0.16.0', '-Python-2.7.14-bare'),
('Six', '1.11.0', '-Python-2.7.14-bare'),
Copy link
Member

Choose a reason for hiding this comment

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

@geimer By using a -bare Python here, you're effectively making this incompatible with anything that depends on a full Python, which is quite common... Isn't that a concern?

Maybe it makes sense to make the Python that gets built with GCCcore a trimmed down version of the one we have with a full toolchain, i.e. still include common dependencies like six, future, setuptools, pip, etc into it?

Copy link
Member

Choose a reason for hiding this comment

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

On second though, not using some versionsuffix for a Python built with GCCcore is probably going to create issues too, especially when EasyBuild is configured with --minimal-toolchains.
Yet, create a -base or -minimal variant that includes a bunch of extensions makes more sense? See also #5072

Copy link
Contributor Author

Choose a reason for hiding this comment

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

@boegel There doesn't seem to be any consensus how to deal with Python on the GCCcore level, cfr. the discussion I raised two or three weeks ago on the mailing list. I'm doing something here to make progress, but the Python stuff needs to be fixed first, and then I can adjust this PR accordingly. But I'm not the one who is going to take a lead on this, as there are too many dark corners I don't understand...

Copy link
Contributor Author

Choose a reason for hiding this comment

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

@boegel Thinking about it, things are even worse... To support both Python2 and Python3, I would need to build two different OTF2 installations (with different dependencies). But which one should I then use to build Score-P (which doesn't need Python at all)? Whichever choice I make may be wrong, as a user may need "the other Python" for his code...

Maybe I'll just ignore the Python bindings for now and leave them disabled...

Copy link
Member

Choose a reason for hiding this comment

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

Good point... Maybe you can consider building the Python bindings in a separate module, which can be loaded as needed?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Not sure our build system supports this right now. Is there any support in EB for building things twice into the same prefix but with different build dependencies (like with a list of configopts)? This may work too, but I would immediately admit that this is a rather strange feature request ;-)

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Wait... This won't work either due to PYTHONPATH having to point to one or the other site-packages directory...

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Talking to the OTF2 core devs, this currently seems to be the only option: building OTF2 twice into the same prefix with the different Python's as build dependencies, and then providing Python binding modules that simply depend on the common OTF2 installation and only set PYTHONPATH accordingly. But I don't think this is currently possible with EB...

Copy link
Member

Choose a reason for hiding this comment

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

Not in a clean way, no, but it relates closely to the way in which the ComputeCanada folks install Python packages, so we should come up with a clean way of doing that anyway...

@bartoldeman @mboisson Do you have your approach clearly documented somewhere? Maybe it's time to start implementing this...

Copy link
Contributor

Choose a reason for hiding this comment

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

What our approach boils down to:

  1. Let the Python module set PYTHONPATH to a location with a file sitecustomize.py
  2. this file has the following contents:
import sys
import os
import site

# use prefixes from EBPYTHONPREFIXES, so they have lower priority than
# virtualenv-installed packages

if "EBPYTHONPREFIXES" in os.environ:
    postfix = os.path.join('lib', 'python'+sys.version[:3], 'site-packages')
    for prefix in os.environ["EBPYTHONPREFIXES"].split(os.pathsep):
        sitedir = os.path.join(prefix, postfix)
        if os.path.isdir(sitedir):
            site.addsitedir(sitedir)
  1. modules that use Python set EBPYTHONPREFIXES. We now do it as follows:
modextrapaths = {
    'EBPYTHONPREFIXES': [''],
}
  1. module have to load different python modules for builds. We now do this as follows:
prebuildopts = ['module load python/2.7 && ',
                'module load python/3.5 && ',
                'module load python/3.6 && ']

but that's a hack. It would be better to allow builddependencies to be a list of lists.
5. we have this for some modules that absolutely need python (for some it is optional):
modluafooter = """
depends_on("python")
"""
this basically will load the default python if none is loaded and otherwise keep whatever python module is already loaded.

Hope that helps.

@@ -0,0 +1,34 @@
easyblock = 'PythonPackage'

name = 'Six'
Copy link
Member

Choose a reason for hiding this comment

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

Should be six, cfr. http://six.readthedocs.io/: The name, “six”, comes from the fact that 2*3 equals 6.

@boegel
Copy link
Member

boegel commented May 17, 2018

@geimer This PR is getting quite big, are all of these inter-dependent? Is it worth fleshing out the Python built with GCCcore in a separate PR?

@boegel
Copy link
Member

boegel commented May 9, 2019

@geimer How do we proceed with this? Bump to 2019a where we have Python and Qt5 built with GCCcore?

@boegel boegel added this to the 3.x milestone May 9, 2019
@geimer
Copy link
Contributor Author

geimer commented May 9, 2019

@boegel Yes, my idea is to use 2019a with Qt5 from #8201 and bump versions to the latest Score-P/Scalasca/Cube releases. I will start working on this once my Qt5 build has finished...

@geimer geimer changed the title {perf}[gompi/2018a] Score-P 4.0 + Scalasca 2.4 + deps (WIP) {perf}[gompi/2019a] Score-P 5.0 + Scalasca 2.5 + deps (WIP) May 10, 2019
@geimer
Copy link
Contributor Author

geimer commented May 10, 2019

@boegel As outlined yesterday, I've updated this PR to the latest tool versions for 2019a. Installations are fairly feature-complete, except for:

  • OTF2 can be built with Python bindings. I haven't included Python as a dependency yet, as I'm not quite sure how to use the multi_deps thing introduced recently. Any pointer?
  • Score-P's library wrapping feature is not enabled, as it requires LLVM + Clang libraries (built as one blob). The LLVM configs currently available are not sufficient, and Clang is of moduleclass compiler and thus conflicts with GCC. That is, it would require a redesign of how LLVM and Clang are provided in EasyBuild.
  • Other optional Score-P features such as OpenACC, OpenCL, and CUDA support have to be enabled on demand.

@geimer
Copy link
Contributor Author

geimer commented May 10, 2019

Hmm... Isn't the Travis test too strict here? IMO a "pure" bundle that only depends on other packages shouldn't be required to specify sanity_check_paths. One way to work around this would be to re- check things that have already been checked in the underlying packages, but this is (a) redundant and (b) error-prone. Any comments?

@boegelbot
Copy link
Collaborator

Travis test report: 2/2 runs failed - see https://travis-ci.org/easybuilders/easybuild-easyconfigs/builds/530716128

Only showing partial log for 1st failed test suite run 14970.1;
full log at https://travis-ci.org/easybuilders/easybuild-easyconfigs/jobs/530716129

...
FAIL: Specific checks only done for the (easyconfig) files that were changed in a pull request.
----------------------------------------------------------------------
Traceback (most recent call last):
  File "/home/travis/build/easybuilders/easybuild-easyconfigs/test/easyconfigs/easyconfigs.py", line 505, in test_changed_files_pull_request
    self.check_sanity_check_paths(changed_ecs)
  File "/home/travis/build/easybuilders/easybuild-easyconfigs/test/easyconfigs/easyconfigs.py", line 450, in check_sanity_check_paths
    self.assertFalse(failing_checks, '\n'.join(failing_checks))
AssertionError: No custom sanity_check_paths found in Cube-20190321-GCCcore-8.2.0.eb

----------------------------------------------------------------------
Ran 11385 tests in 1266.558s

FAILED (failures=1)
ERROR: Not all tests were successful.

*bleep, bloop, I'm just a bot (boegelbot v20180813.01)*Please talk to my owner @boegel if you notice you me acting stupid),or submit a pull request to https://github.com/boegel/boegelbot fix the problem.

@boegel
Copy link
Member

boegel commented May 15, 2019

@geimer You're absolutely right, we should whitelist easyconfigs that use Bundle (and don't have extensions listed), much like we whitelisted Toolchain in #8216 .

Are you up for looking into that yourself?
This should be helpful: c56010e

Note that it's a bit more involved than just checking for the use of Bundle, since we also have bundles of extensions (where having a custom sanity_check_paths is still very much desired).

dependencies = [
('CubeWriter', '4.4.2'),
('CubeLib', '4.4.3'),
('CubeGUI', '4.4.3'),
Copy link
Member

Choose a reason for hiding this comment

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

@geimer Does it actually make sense to have these as separate installations?

If not, you could use the components support in Bundle to simply pack them together in a single installation prefix/module, much like we do with X11, see https://github.com/easybuilders/easybuild-easyconfigs/blob/master/easybuild/easyconfigs/x/X11/X11-20190311-GCCcore-8.2.0.eb

easyblock = 'Bundle'

name = 'Cube'
version = '20190321'
Copy link
Member

Choose a reason for hiding this comment

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

Maybe clarify how this was picked? Is it the release date of the most recent component included in this bundle?

Does it make sense to use the version of the "main" component instead (4.4.3), which is much closer to what people would expect when installing Cube?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

There is no "main" component. The former Cube package has been split into three disjoint componts: CubeWriter, CubeLib, and CubeGUI. They now evolve somewhat independently and version numbers may diverge more over time. In this case, the three components have been released on the same date (chosen as version), but this doesn't have to be the case in the future. Dependent packages may require only some of them or in different use cases (dependency vs. builddependency, see the Score-P easyconfig), thus I would really prefer to keep them separate.

In principle, the Cube bundle isn't required at all -- I've just added it as a convenience for people who are used to the old Cube package. While we also provide a convenience bundle tarball including all components on our web page, its version is a simple count that has very little to do with the versions included (as the versions are allowed to diverge, it is hard to come up with a common version). Having said all this, I'm also OK with removing the bundle if you think it causes too much confusion. (This would also magically "fix" the failing Travis check 😉)

sanity_check_paths = {
'files': ['bin/cube', 'bin/cubegui-config',
('lib/libcube4gui.a', 'lib64/libcube4gui.a'),
('lib/libcube4gui.%s' % SHLIB_EXT, 'lib64/libcube4gui.%s' % SHLIB_EXT)],
Copy link
Member

Choose a reason for hiding this comment

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

@geimer You can drop the "lib or lib64" bit here, and just specify the paths using lib/.

Since EasyBuild v3.6.1, there's an automatic fallback to checking for lib64/x if lib/x was not found (and vice versa if lib64/x was specified), see easybuilders/easybuild-framework#2477.
It's enabled by default (and disabling it requires configuring EasyBuild with --disable-lib64-fallback-sanity-check`, which I doubt anyone does, allowing that was just a safety measure we put in place in case surprises popped up).

sanity_check_paths = {
'files': ['bin/cubelib-config',
('lib/libcube4.a', 'lib64/libcube4.a'),
('lib/libcube4.%s' % SHLIB_EXT, 'lib64/libcube4.%s' % SHLIB_EXT)],
Copy link
Member

Choose a reason for hiding this comment

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

only lib/ is fine

sanity_check_paths = {
'files': ['bin/cubew-config',
('lib/libcube4w.a', 'lib64/libcube4w.a'),
('lib/libcube4w.%s' % SHLIB_EXT, 'lib64/libcube4w.%s' % SHLIB_EXT)],
Copy link
Member

Choose a reason for hiding this comment

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

only lib/ is fine

sanity_check_paths = {
'files': ['bin/otf2-config', 'include/otf2/otf2.h',
('lib/libotf2.a', 'lib64/libotf2.a'),
('lib/libotf2.%s' % SHLIB_EXT, 'lib64/libotf2.%s' % SHLIB_EXT)],
Copy link
Member

Choose a reason for hiding this comment

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

only lib/ is fine

]

sanity_check_paths = {
'files': ['bin/scalasca', ('lib/libpearl.replay.a', 'lib64/libpearl.replay.a')],
Copy link
Member

Choose a reason for hiding this comment

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

only lib/ is fine

# http://apps.fz-juelich.de/unite/
##

easyblock = 'EB_Score_minus_P'
Copy link
Member

Choose a reason for hiding this comment

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

You can actually remove this, since it matches the software name?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Wasn't there a policy change at some point in the past to make the easyblock explicit?

Copy link
Member

Choose a reason for hiding this comment

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

A (long) time, we dropped the automagic fallback to trying with ConfigureMake (which was confusing since that always left you wondering which easyblock was actually being used if none was specified).

But as long as the software name matches the easyblock, there's no point in specifying it, since there's no ambiguity.

sanity_check_paths = {
'files': ['bin/scorep', 'include/scorep/SCOREP_User.h',
('lib/libscorep_adapter_mpi_event.a', 'lib64/libscorep_adapter_mpi_event.a'),
('lib/libscorep_adapter_mpi_event.%s' % SHLIB_EXT, 'lib64/libscorep_adapter_mpi_event.%s' % SHLIB_EXT)],
Copy link
Member

Choose a reason for hiding this comment

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

only lib/ is fine

@geimer
Copy link
Contributor Author

geimer commented May 15, 2019

@boegel W.r.t. the CI check: I don't have the complete picture yet when the check is desired and when it's not. If it comes down to whitelisting Bundles with an empty exts_list I can probably tackle this. If it is more complicated than that, I might be out of the game...

@geimer
Copy link
Contributor Author

geimer commented Aug 2, 2019

Test report by @geimer
SUCCESS
Build succeeded for 10 out of 10 (10 easyconfigs in this PR)
swat - Linux debian 9.9, Intel(R) Xeon(R) CPU X5550 @ 2.67GHz, Python 2.7.13
See https://gist.github.com/9915275afb38032ace9b6a4fd3158ae1 for a full test report.

@geimer geimer changed the title {perf}[gompi/2019a] Score-P 5.0 + Scalasca 2.5 + deps (WIP) {perf}[gompi/2019a] Score-P 6.0 + Scalasca 2.5 + deps Aug 2, 2019
@geimer
Copy link
Contributor Author

geimer commented Aug 2, 2019

This PR has been pending for so long that I could incorporate yet another version bump to the packages released yesterday 😃 I think it's now (finally) ready for prime time...

@boegel
Copy link
Member

boegel commented Aug 9, 2019

Test report by @boegel
SUCCESS
Build succeeded for 10 out of 10 (10 easyconfigs in this PR)
node3103.skitty.os - Linux centos linux 7.6.1810, Intel(R) Xeon(R) Gold 6140 CPU @ 2.30GHz, Python 2.7.5
See https://gist.github.com/7fe6bb549c118da7cc8013167d5157cc for a full test report.

@boegel
Copy link
Member

boegel commented Aug 9, 2019

Test report by @boegel
SUCCESS
Build succeeded for 10 out of 10 (10 easyconfigs in this PR)
node2425.golett.os - Linux centos linux 7.6.1810, Intel(R) Xeon(R) CPU E5-2680 v3 @ 2.50GHz, Python 2.7.5
See https://gist.github.com/17d21f2e0b70b84b5514f9495def5cb8 for a full test report.

@boegel
Copy link
Member

boegel commented Aug 9, 2019

Going in, thanks @geimer!

@boegel boegel merged commit ab85d17 into easybuilders:develop Aug 9, 2019
@geimer geimer deleted the scorep_scalasca_update_hmns_mintc branch August 9, 2019 12:49
@boegel boegel modified the milestones: 3.x, 3.9.4 Aug 21, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants