clang on BGQ

Dear developers,

I recently compiled the git snapshot of clang on an IBM Blue Gene/Q
supercomputer, however the compiler produces executables for the
front-end node, while I should cross-compile to create executables for
the compute nodes. I tried to gather some information googling how
to set up a clang cross compiler but I couldn't figure it out. Does
anyone have suggestions?
Thanks!

Paolo

Hello,

there is a backend for BG/Q CNKs available here:
http://lists.alcf.anl.gov/pipermail/llvm-bgq-discuss/2013-March/000131.html
(The .bin file is a .tar.gz)

It contains a wrapper script "bgclang" that will link against the CNK
CRT. To run on Juqueen, you will need to patch the clang driver to put
the directory /usr/lib64 after the cross-compile specific library
search paths. Otherwise it will try to link the frontend CRT. Also you
will need to edit hard-coded paths in a lot of places.

For also using MPI on the nodes, there are MPI compiler wrappers
available with the older patches at
http://trac.alcf.anl.gov/projects/llvm-bgq

It also generates QPX intrinsics, but in my experience so far, it's buggy.

I have clang running on Juqueen. If you are interested, it might be
easier to copy my files.

Good luck,
Michael Kruse

From: "Michael Kruse" <cfe-dev@meinersbur.de>
To: "Paolo Crosetto" <p.crosetto@fz-juelich.de>
Cc: cfe-dev@cs.uiuc.edu
Sent: Wednesday, April 17, 2013 12:06:37 PM
Subject: Re: [cfe-dev] clang on BGQ

Hello,

there is a backend for BG/Q CNKs available here:
http://lists.alcf.anl.gov/pipermail/llvm-bgq-discuss/2013-March/000131.html
(The .bin file is a .tar.gz)

It contains a wrapper script "bgclang" that will link against the CNK
CRT. To run on Juqueen, you will need to patch the clang driver to
put
the directory /usr/lib64 after the cross-compile specific library
search paths. Otherwise it will try to link the frontend CRT. Also
you
will need to edit hard-coded paths in a lot of places.

For also using MPI on the nodes, there are MPI compiler wrappers
available with the older patches at
http://trac.alcf.anl.gov/projects/llvm-bgq

These older wrapper scripts don't match the V1R2 MPI release; I'll can send updated versions to the llvm-bgq-discuss list (https://lists.alcf.anl.gov/mailman/listinfo/llvm-bgq-discuss). Let me know once you've subscribed there. The wrapper scripts, etc. are system specific, and will likely never be submitted upstream.

It also generates QPX intrinsics, but in my experience so far, it's
buggy.

I intend to upstream the QPX support, but I might not get to it until after the 3.3 cutoff. I've been working this month and last on a long list of non-QPX specific improvements to the PowerPC backend, and these things have gone upstream first.

In any case, there are no QPX bugs of which I know, and there are several groups using my QPX-enabled builds. I'll fix whatever bugs Michael has found too, as soon as he tells me what they are :wink: We should move this discussion onto the llvm-bgq-discuss list as it does not involve upstream features.

-Hal

Dear Michal and Hal,
thanks for the replies! Michael if you already have a working backend
version for JUQUEEN could you share it?
Thanks!

Paolo