Version 26 (modified by hfinkel, 4 years ago)

--

Welcome to using LLVM/clang on the BG/Q

ANL Vesta, Mira and Cetus

If you have access to ANL's Vesta, Mira and Cetus systems, this BG/Q-enhanced LLVM/Clang is installed for you. You can use the softenv keys:

    +mpiwrapper-bgclang            bgclang wrappers and toolchain
    +mpiwrapper-bgclang.legacy     bgclang.legacy wrappers and toolchain

to have the corresponding MPI wrappers added to your path.

For the benefit of those without access, a copy of the bgclang wrapper script is available in the latest archive. For use on other systems, you'll need to change some of the paths, but this will let you see what optimization settings are used by default. You should symlink this to bgclang++ and bgclang++11 to create the C++ wrappers.

Similarly, the archive contains the MPI wrapper scripts (modified from the corresponding gcc wrapper scripts).

Repository Information

I have yet to figure out how to best mirror my local repositories. Here's why:

  • LLVM uses subversion, and I've been using git-svn to manage local BG/Q changes.
  • git-svn uses rebasing to apply local changes on top of upstream changes; this amounts to history rewriting (dangerous but effective). I cannot simply push from the git-svn-managed repository to the public one because doing so would confuse copies cloned from the public version.
  • LLVM uses separate repositories for LLVM and clang, it is not clear how to best combine them into one public repository.

Thus, for the time being, we'll just need to use patches. Maybe I should push into separate (new) branches every time I commit? I'm certainly open to suggestions.

Patches

r185769-20130706 (v2)

r185769-20130706

r185415-20130701 (v3)

r185415-20130701 (v2)

r185415-20130701

r184137-20130617

r181589-20130510

r180241-20130423

r157929-20120603

Significant improvements include:

  • Support for type-safety attributes (clang feature developed by Dmitri Gribenko for type checking calls to MPI functions).
  • LLVM now generates pre-increment load/store instructions (only r+imm form supported so far, r+r form, necessary for QPX pre-increment, is still under development).

r155766-20120426

Note: the date tag on the clang patch regressed compared to the previous version because upstream commits rendered later local changes irrelevant.

r154948-20120422

Building

Follow the normal directions for checking out llvm and clang from the llvm.org repositories (using the revision number specified in the archive name). Then apply the provided patches. Run configure (I recommend building from a directory different from the source directory). See the build scripts for how to compile everything.

For a better C++11 environment, you'll want to use libc++ as the C++ standard library implementation. The attached build script patches and builds libc++ so that it can correctly interoperate (be linked with) the libstdc++ which the MPI/PAMI implementation requires. The bgclang++11 (and corresponding MPI wrappers) setup this environment.

Attachments