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
Allow user to define the default compiler optimsation level #1565
Conversation
Automatic reply from Jenkins: Can I test this? |
@@ -213,6 +213,9 @@ def override_options(self): | |||
'cleanup-builddir': ("Cleanup build dir after successful installation.", None, 'store_true', True), | |||
'cleanup-tmpdir': ("Cleanup tmp dir after successful run.", None, 'store_true', True), | |||
'color': ("Allow color output", None, 'store_true', True), | |||
"default-optimisation": ("Set default optimization level, overriding easybuild optimization default " | |||
"(possibilities are: noopt, lowopt, defaultopt, opt)", |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
hmm, we shouldn't hardcode the options here, we should try and obtain them via easybuild.tools.toolchain.compiler
?
also, the option parser supports a choice
type of option, so do:
'default-opt-level': ("Specify default optimisation level", 'choice', 'store', 'defaultopt', known_opt_levels),
I like how you use different spelling for optimisation
vs optimization
in the option name and the help, so let's use opt
instead ;)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
better:
from easybuild.tools.toolchain.compiler import Compiler
...
'default-opt-level': ("Specify default optimisation level", 'choice', 'store', 'defaultopt', Compiler.COMPILER_OPT_FLAGS),
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
opt
it is, copy paste is the enemy
Jenkins: ok to test |
EasyBuild framework unit test suite PASSed (see https://jenkins1.ugent.be/job/easybuild-framework-pr-builder/2566/console for more details). This pull request is now ready for review/testing. Please try and find someone who can tackle this; contact @boegel if you're not sure what to do. |
else: | ||
raise EasyBuildError("Unknown value for default optimisation: %s (possibilities are %s)" % | ||
(default_opt_level, self.COMPILER_OPT_FLAGS)) | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Invalid option already picked up by the option parser...could remove the if/else?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Hmm, leave it there, it's pretty cheap, and we may change things later such that default_opt_level
comes from somewhere else
EasyBuild framework unit test suite FAILed. See https://jenkins1.ugent.be/job/easybuild-framework-pr-builder/2570/console for more details. Please fix the reported issues by pushing additional commits to the branch corresponding with this pull request; contact @boegel if you're not sure what to do. |
fix default value for 'default_opt_level' build option
EasyBuild framework unit test suite PASSed (see https://jenkins1.ugent.be/job/easybuild-framework-pr-builder/2574/console for more details). This pull request is now ready for review/testing. Please try and find someone who can tackle this; contact @boegel if you're not sure what to do. |
Going in, thanks a lot @ocaisa! |
Allow user to define the default compiler optimsation level
No description provided.