-
Notifications
You must be signed in to change notification settings - Fork 204
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
Add PGI compiler toolchain. #1342
Conversation
Automatic reply from Jenkins: Can I test this? |
@@ -0,0 +1,71 @@ | |||
## | |||
# Copyright 2015 Bart Oldeman |
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.
transfer copyright to Ghent University, or see https://github.com/hpcugent/easybuild-framework/blob/master/CONTRIBUTING.md
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.
nvm, triple-licensing also works
Jenkins: ok to test |
Refer to this link for build results (access rights to CI server needed): 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. |
I didn't get started on anything, but I ahve a need for this so will try to test. |
Refer to this link for build results (access rights to CI server needed): 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. |
I have tested this and didn't have any problems. @bartoldeman might want to rebase to develop |
COMPILER_UNIQUE_OPTION_MAP = { | ||
'i8': 'i8', | ||
'r8': 'r8', | ||
'optarch': '', # PGI by default generates code for the arch it is running on! |
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.
is there any way to disable this default behaviour, and specify the architecture to generate code for?
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.
The target architecture can be specified using the -tp=<arch>
option. PGI 14.1 supports the following architectures, newer versions may accept more (can't check atm):
px Generic x86 Processor
k8 AMD64 Processor
k8-64e AMD64 Processor rev E or later, 64-bit mode
barcelona AMD Barcelona processor
shanghai AMD Shanghai processor
istanbul AMD Istanbul processor
bulldozer AMD Bulldozer processor
piledriver AMD Piledriver processor
p7 Intel P7 Architecture (Pentium 4, Xeon, Centrino)
core2 Intel Core-2 Architecture
penryn Intel Penryn Architecture
nehalem Intel Nehalem processor
sandybridge Intel SandyBridge processor
haswell Intel Haswell processor
x64 Unified AMD/Intel mode; -tp=k8,p7
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.
@geimer: thanks for the feedback!
It would be interesting to somehow enforce picking one of these in case the optarch
toolchain option is set to False
.
The default is True
, which (apparently) corresponds to not specifying any specific flag with PGI, but every now and then False
is specified explicitly, so we should not just ignore that.
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.
Maybe we need to support a custom toolchain option for PGI-based toolchains, something like target-platform
?
Or, we should reuse optarch
for this? If optarch
is True
, we don't add any specific flags, if it's False
we complain to specify the name of a target platform 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.
target-platform
would be interesting for other compilers as well, however, I thought the recommended way of handling this is the --optarch=<arg>
command-line option. Why not simply use a generic target like px
or x64
if optarch
is False
? AFAIK, this is the default behavior of other compilers. For PGI you have to explicitly request it.
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.
OK, that makes sense too, indeed. x64
seems like a decent default indeed, and people can always override via --optarch
.
@bartoldeman: are you up for tackling this yourself, i.e. using -tp=x64
if optarch
is set to False
? See https://github.com/hpcugent/easybuild-framework/blob/master/easybuild/toolchains/compiler/craype.py#L100 for inspiration.
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.
Done below in _set_compiler_flags
, thanks @bartoldeman.
I spoke to someone from NVIDIA yesterday and he mentioned that C++ support in PGI depends on the underlying GCC. I think it might be wise to build up the PGI toolchain in the same way as the intel toolchain (bintuils -> GCC + bintuils -> PGI) to side step problems from the underlying OS (like RedHAt shipping an ancient GCC and a binutils that doesn't support modern architectures)...I guess this doesn't matter here but it does in the associated easyconfigs. |
@ocaisa: already done that way, see easybuilders/easybuild-easyconfigs#1833 |
eb --delete-lazy-comment |
@ocaisa: please make that a separate PR ;) |
Other stuff is coming in that is built on top of this (cfr. #1537), so we should really try and get this merged. @bartoldeman: we haven't heard from you in a while on this, are you still willing to follow up on this, or should we take it from here? |
I rebased this PR and updated with the change from @jhein32 so pgf77 is used for F77. |
EasyBuild framework unit test suite PASSed (see https://jenkins1.ugent.be/job/easybuild-framework-pr-builder/2927/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. |
@author: Bart Oldeman (McGill University, Calcul Quebec, Compute Canada) | ||
""" | ||
|
||
from easybuild.toolchains.compiler.pgi import Pgi |
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.
Shouldn't this import and use GCCcore as well? PGI compilers need an underlying GCC and I guess also binutils. Without GCCcore here any software installed there won't be available for PGI-based toolchains when using minimal toolchains.
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.
yes, this means just catching up with what is happening in easybuild... I put this in the same way as for iccifort.py.
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.
Thanks @bartoldeman!
EasyBuild framework unit test suite PASSed (see https://jenkins1.ugent.be/job/easybuild-framework-pr-builder/2929/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. |
EasyBuild framework unit test suite PASSed (see https://jenkins1.ugent.be/job/easybuild-framework-pr-builder/2932/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. |
Here is the story with numactl (I mentioned that at the conf call):
If the PGI installer detects /usr/lib64/libnuma.so.1 it will use that, if not, it will symlink linux86-64/16.3/lib/libnuma.so and ....so.1 to linux86-64/16.3/lib/libpgnuma.so. EB has its own numactl however. Perhaps we need numactl built with GCCcore? |
How is this toolchain coming along? Does it need some additional testing? |
@valtandor things are slowly aligning to get this merged, see also easybuilders/easybuild#211 A main issue on my end is that I need to set up the license that was provided to me by PGI, for testing purposes. That's less straightforward than I was hoping it would be, but I'm getting there... |
@bartoldeman do you mind updating this with latest Let me know if you need help with that, I can easily send you a PR for it and that's easier for you. |
…to iccifort.py.
EasyBuild framework unit test suite PASSed (see https://jenkins1.ugent.be/job/easybuild-framework-pr-builder/3009/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. |
All green, so this is good to go... I'd like to get easybuilders/easybuild-easyconfigs#2899 merge-ready first though. It pretty much should be, but we've hit a snag with the module naming scheme @bartoldeman is using, causing the OpenMPI sanity check to fail. I'd like to figure that out first... @ocaisa, @damianam: have you guys ever used PGI with |
#1754 fixes the bug that was holding this PR back, and is merged now, so this is good to go as well Thanks a lot for your work on this @bartoldeman, and for your patience in following this up; and of course also thanks to everyone else who providing feedback and testing! |
This adds a PGI compiler toolchain, see also pull request for easybuilders/easybuild-easyblocks#658