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

Implementation of --try-dependency and --try-builddependency #4097

Open
wants to merge 8 commits into
base: develop
Choose a base branch
from

Conversation

mboisson
Copy link
Contributor

@mboisson mboisson commented Oct 17, 2022

The goal of this PR is to let someone easily modify existing dependencies or add new ones without having to rewrite an EasyConfig. The use-case that triggered this is being able to recompile CUDA software with different versions of CUDA.

It works like this:

eb AutoDock-GPU-1.5.3-GCC-10.3.0-CUDA-11.3.1.eb --try-dependency="('CUDA','11.4')" 

Multiple dependencies can be updated by repeating the flag:

eb AutoDock-GPU-1.5.3-GCC-10.3.0-CUDA-11.3.1.eb --try-dependency="('CUDA','11.4')" --try-dependency="('CMake', '3.23.1')"

If a dependency with a matching name is found (i.e. CUDA 11.3.1) then the dependency is updated with the value specified. If no dependency with a matching name is found, then the dependency is added to the list.

@mboisson
Copy link
Contributor Author

Hum, I don't understand why there's already a test with dependencies and builddependencies when no options for --try-dependencies and --try-builddependencies existed before... 🤔

@boegel
Copy link
Member

boegel commented Oct 18, 2022

Hum, I don't understand why there's already a test with dependencies and builddependencies when no options for --try-dependencies and --try-builddependencies existed before... 🤔

Maybe via --try-amend?

@mboisson
Copy link
Contributor Author

maybe. I renamed the options to dependency rather than dependencies to work around the test. They can only take a single dependency at a time anyway...

@mboisson mboisson closed this Oct 18, 2022
@mboisson mboisson reopened this Oct 18, 2022
@ocaisa
Copy link
Member

ocaisa commented Oct 19, 2022

Does this act recursively with --robot?

@mboisson
Copy link
Contributor Author

Does this act recursively with --robot?

no idea, I don't use --robot and I don't know how it works :)

@boegelbot
Copy link

@mboisson: Tests failed in GitHub Actions, see https://github.com/easybuilders/easybuild-framework/actions/runs/3283047730
Output from first failing test suite run:

ERROR: test_get_source_tarball_from_git (test.framework.filetools.FileToolsTest)
Test get_source_tarball_from_git function.
----------------------------------------------------------------------
Traceback (most recent call last):
  File "/tmp/runner/f3e2fe88f7c0b3ab8fa6f54f3bdaf89e5b2a37af/lib/python2.7/site-packages/test/framework/filetools.py", line 2891, in test_get_source_tarball_from_git
    raise err
EasyBuildError: 'cmd "git clone --depth 1 --branch tag_for_tests https://github.com/easybuilders/testrepository.git" exited with exit code 128 and output:\nCloning into \'testrepository\'...\nerror: RPC failed; HTTP 500 curl 22 The requested URL returned error: 500\nfatal: expected flush after ref listing\n'

----------------------------------------------------------------------
Ran 819 tests in 1077.411s

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

bleep, bloop, I'm just a bot (boegelbot v20200716.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.

@mboisson mboisson closed this Oct 19, 2022
@mboisson mboisson reopened this Oct 19, 2022
@mboisson
Copy link
Contributor Author

mboisson commented Oct 19, 2022

Does this act recursively with --robot?

no idea, I don't use --robot and I don't know how it works :)

I guess a partial answer to that is: if --robot will tweak dependencies by calling tweak_one down the line, then yes. Note that tweak_one does not seem to be triggered when updating both toolchains and dependency unless you add --disable-map-toolchain (which we almost always do because we almost always run into issues updating toolchains without --disable-map-toolchain)

@mboisson mboisson changed the title first implementation of --try-dependencies and --try-builddependencies Implementation of --try-dependency and --try-builddependency Oct 20, 2022
@easybuilders easybuilders deleted a comment from boegelbot Oct 25, 2022
@boegel boegel added this to the 4.x milestone Oct 25, 2022
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.

None yet

4 participants