This is a clone of https://wiki.alcf.anl.gov/bgq-earlyaccess/index.php/LLVM because that page is not world-readable.
A special port of LLVM and clang (the C/C++ frontend) are available on our BG/Q. To make clang easier to use, special wrapper scripts are available:
* /home/projects/llvm/bin/bgclang (for C code) * /home/projects/llvm/bin/bgclang++ (for C++ code)
Please join the mailing list llvm-bgq-discuss. This list will receive notification when the compilers are updated, and can be used to discuss problems, questions, comments, etc. For bug reports, or to download copies of the LLVM and clang patches in use, visit the trac page.
See LLVM for more information.
On the ALCF Vesta system, one can use softenv keys to automatically setup the LLVM compiler paths.
+mpiwrapper-bgclang bgclang wrappers and toolchain +mpiwrapper-bgclang.legacy bgclang.legacy wrappers and toolchain
Using with MPI
To use bgclang with MPI, add the following directory to your path:
or, if you want the 'legacy' MPI library:
and then use mpicc and/or mpicxx.
C++11 MPI Wrappers
There are special C++11 wrapper scripts that give you libc++ as the C++ library for better C++11 support. These are called mpic++11.
bgclang supports using the same QPX intrinsics as bgxlc. This header implements the IBM-style QPX intrinsics in terms of bgclang-specific intrinsics. Note that this header is no longer required, but the documentation is preserved for posterity.
- long double support has been fixed.
- Inline assembly support has been fixed.
Some configure scripts what would normally define _GNU_SOURCE don't do this when using bgclang, and this sometimes causes linking errors. If _GNU_SOURCE is defined when building with gcc or xlc, it should probably also be defined when using bgclang. To fix this, add -D_GNU_SOURCE to your CPPFLAGS.