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

Allow user to define the default compiler optimsation level #1565

Merged
merged 6 commits into from Jan 23, 2016

Conversation

ocaisa
Copy link
Member

@ocaisa ocaisa commented Jan 22, 2016

No description provided.

@hpcugentbot
Copy link
Contributor

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)",
Copy link
Member

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 ;)

Copy link
Member

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),

Copy link
Member Author

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

@boegel
Copy link
Member

boegel commented Jan 22, 2016

Jenkins: ok to test

@hpcugentbot
Copy link
Contributor

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.

@boegel boegel added this to the v2.7.0 milestone Jan 22, 2016
else:
raise EasyBuildError("Unknown value for default optimisation: %s (possibilities are %s)" %
(default_opt_level, self.COMPILER_OPT_FLAGS))

Copy link
Member Author

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?

Copy link
Member

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

@boegel boegel modified the milestones: v2.6.0, v2.7.0 Jan 22, 2016
@hpcugentbot
Copy link
Contributor

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.

@boegel
Copy link
Member

boegel commented Jan 22, 2016

@ocaisa: fix for the failing tests in ocaisa#28

fix default value for 'default_opt_level' build option
@hpcugentbot
Copy link
Contributor

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.

@boegel
Copy link
Member

boegel commented Jan 23, 2016

Going in, thanks a lot @ocaisa!

boegel added a commit that referenced this pull request Jan 23, 2016
Allow user to define the default compiler optimsation level
@boegel boegel merged commit 1a33d35 into easybuilders:develop Jan 23, 2016
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants