Conversation
lib/spack/spack/platforms/bgq.py
Outdated
| @@ -9,9 +11,22 @@ class Bgq(Platform): | |||
| default = 'powerpc' | |||
There was a problem hiding this comment.
@tgamblin : should be powerpc64 instead of just powerpc?
There was a problem hiding this comment.
This should be ppc64 to match the output of platform.machine()
There was a problem hiding this comment.
On the newer little-endian Power machines it's ppc64le
|
@pramodk I was able to build STAT for the BGQ frontend with this PR, thanks! I haven't tried to build anything for the compute nodes. |
|
@pramodk: This is awesome. Sorry for not getting back to you sooner and thanks for putting it together. I don't see anything wrong with the approach -- The platform setup looks similar to how Cray is set up. I had been looking to port what our BG/Q users were doing, but they're still on an old version of Spack and I think starting with just this makes more sense. So, I'm trying to get The concretization issue is because architecture is not handled the same way as compilers in One place where you may want to adjust that behavior is for build dependencies. I think build dependencies should default to have the architecture of the default frontend for the platform, and likewise they should pick a valid compiler for the frontend. So if you see something like I think this exposes a potential issue with the dependency model that I didn't think of. If something is a build/link dependency but also needs to be run at build time, then we may need another deptype for that, which would cause Spack to build both a front-end and a back-end version of the package (one to run at build time and one to link with). I think we can hold off on that for now, but it's something to keep in mind. |
|
@pramodk: one last thing -- I had been meaning to add additional configuration scoping to Spack so that in any config directory you could have a subdirectory with defaults for a specific platform. With that you would be able to add your various compiler settings (which AFAIK are pretty much the same across different BG/Q machines) to |
|
@tgamblin : I agree, build dependencies should default to architecture of front-end. I already see this issue while building some packages (in deep dependency hierarchy, if some package is specified as build dependency then in the current implementation there is no easy way to specify build for front-end architetcure) Would it be useful to also have "arch" or "os" option in packages.yaml for package? Currently I see only variants. I will try to look into concretize.py and see how it works. But if time permits and if you can update this PR, it will be great! |
|
I was looking through the It would be great if someone with more understanding of concretizer could update this PR. |
|
@pramodk: can we make CNK lowercase? Personally I would like the same thing for CNL on the Cray |
|
yeah, I would also prefer lowercase. Initially I made that consistent with Cray CNK. I am changing that. |
|
@robertdfrench @mpbelhorn: FYI this will change the Cray OS name to lowercase. If that is something that will cause you headaches, let me know. |
|
@tgamblin not a problem for us and I too prefer lowercase. |
@tgamblin : you mean bg-q? because we are just changing |
FYI, I am working on #2292 to provide this functionality. It is expected to merge soon: potentially tomorrow, although likely after 2261. |
|
@pramodk: now that #2292 is merged, I think we're good on this PR. Can you submit a separate PR with the default BG/Q compilers in `etc/spack/defaults/compilers.yaml? That should allow most people to have a decent back-end setup for BG/Q out of the box. I think it should include these compilers:
Although I notice that in your original |
yes, that was by mistake! (i am currently travelling, will see if I can look into default compiler PR over the weekend) |
|
Thanks @pramodk! Hope you have a good trip |
* fix for bluegene-q platform * change powerpc to ppc64 * change CNK to cnk
this will fix #1784 and #1689!
Today I looked into how Cray CNL is implemented and made corresponding changes for bg-q. This is based on my "minimal" understanding of spack internals, so feel free to suggest changes / update the patch.
I built 7-8 packages for bg-q (front-end and back-end) without any issue. I followed below steps:
compilers: - compiler: modules: [] operating_system: redhat6 paths: cc: /usr/lib64/ccache/gcc cxx: /usr/lib64/ccache/g++ f77: /usr/bin/gfortran fc: /usr/bin/gfortran spec: [email protected] - compiler: modules: [] operating_system: redhat6 paths: cc: /opt/ibmcmp/vacpp/bg/12.1/bin/xlc_r cxx: /opt/ibmcmp/vacpp/bg/12.1/bin/xlc++ f77: /opt/ibmcmp/xlf/bg/14.1/bin/xlf_r fc: /opt/ibmcmp/xlf/bg/14.1/bin/xlf2008 spec: [email protected] - compiler: modules: [] operating_system: CNK paths: cc: /usr/bin/bgxlc_r cxx: /usr/bin/bgxlc++ f77: /usr/bin/bgxlf_r fc: /usr/bin/bgxlf2008 spec: [email protected] - compiler: modules: [] operating_system: CNK paths: cc: /bgsys/drivers/ppcfloor/gnu-linux/bin/powerpc64-bgq-linux-gcc cxx: /bgsys/drivers/ppcfloor/gnu-linux/bin/powerpc64-bgq-linux-g++ f77: /bgsys/drivers/ppcfloor/gnu-linux/bin/powerpc64-bgq-linux-gfortran fc: /bgsys/drivers/ppcfloor/gnu-linux/bin/powerpc64-bgq-linux-gfortran spec: [email protected]On BG-Q, MPI is located under:
I added entry into packages.yaml as:
packages: mpich: paths: [email protected]%[email protected] arch=bgq-CNK-powerpc: /bgsys/drivers/ppcfloor/comm/xl [email protected]%[email protected] arch=bgq-CNK-powerpc: /bgsys/drivers/ppcfloor/comm/gcc buildable: False(initially I added dummy package for mpi env var setup, but it's not necessary)
To build a package for front-end:
To build package for back-end:
spack install package-xx #OR spack install package-xx os=CNKExample
parmetis for CNK (by-default), cmake for front-end (i.e. redhat6) :
$ spack spec parmetis ^mpich ^cmake os=redhat6 Input spec ------------------------------ parmetis ^cmake arch=bgq-redhat6-None ^mpich Normalized ------------------------------ parmetis ^[email protected]: arch=bgq-redhat6-None ^metis@5: ^mpich Concretized ------------------------------ [email protected]%[email protected]~debug~gdb+shared arch=bgq-CNK-powerpc ^[email protected]%[email protected]~doc+ncurses+openssl~ownlibs~qt arch=bgq-redhat6-powerpc ^[email protected]%[email protected] arch=bgq-CNK-powerpc ^[email protected]%[email protected] arch=bgq-CNK-powerpc ^[email protected]%[email protected] arch=bgq-CNK-powerpc ^[email protected]%[email protected] arch=bgq-CNK-powerpc ^[email protected]%[email protected] arch=bgq-CNK-powerpc ^[email protected]%[email protected] arch=bgq-CNK-powerpc ^[email protected]%[email protected]~python arch=bgq-CNK-powerpc ^[email protected]%[email protected] arch=bgq-CNK-powerpc ^lz4@131%[email protected] arch=bgq-CNK-powerpc ^[email protected]%[email protected] arch=bgq-CNK-powerpc ^[email protected]%[email protected] arch=bgq-CNK-powerpc ^[email protected]%[email protected] arch=bgq-CNK-powerpc ^[email protected]%[email protected] arch=bgq-CNK-powerpc ^[email protected]%[email protected]+sigsegv arch=bgq-CNK-powerpc ^[email protected]%[email protected] arch=bgq-CNK-powerpc ^[email protected]%[email protected] arch=bgq-CNK-powerpc ^[email protected]%[email protected]~debug~gdb~idx64~real64+shared arch=bgq-CNK-powerpc ^[email protected]%[email protected]+hydra+pmi~verbs arch=bgq-CNK-powerpc@tgamblin :