Update master Jenkins build configurations
GCC 4.8 and 4.9 should be added. TSAN should be added (when #1499 is fixed). Potentially UbSAN and MSAN could be added. Potentially older compilers should be removed (see #1500). Or we could increase the total number of tested configurations by building some after code-review.
I created this task so we can discuss which configurations we should be using for master.
#1 Updated by Szilárd Páll over 6 years ago
- adding weekly scheduled jenkins job to allow adding more/longer test configs (e.g. we have an ARM config ready to do regular build);
- add CUDA 6.0;
- consider adding MacOS and Windows builds that test the GPU code-path using GPU emulation kernels;
make installas part of (some/all?) jeknins builds;
#2 Updated by Roland Schulz over 6 years ago
The TSAN build now succeeds with 5-0 merged into master.
Running UbSAN is straight forward:
FLAGS="-fsanitize=undefined -fno-sanitize-recover" CFLAGS=$FLAGS CXXFLAGS=$FLAGS CC=clang CXX=clang++ cmake ..
It works also with gcc but it doesn't has the no-sanitize-recover flag. And without it the tests don't fail but only show the warning (which in the case of the regressiontests doesn't even get shown because the mdrun.out is deleted if the test passes. Currently UbSAN doesn't allow to add suppressions which makes it unfeasible to use the unsigned-integer-overflow test because it is used in some places on purpose. Some of the current detected problems are fixed by 3458 and the one remaining would be trivial to fix (already commented by it) if we want to add this to Jenkins. It does work with OpenMP if one uses the Clang version with OpenMP support.
Running MSAN is a bit more complicated. MSAN requires that all libraries are either compiled with MSAN or to use dynamic instrumentation. I couldn't get the later to work. Thus it requires at a minimum to compile libstdc++ with MSAN. The alternative to use libcxx doesn't work. To avoid false positives one needs to use GMX_SIMD<=SSE4.1 and use the build-in qsort (see the same msan issue). Also one doesn't want to use any external libraries (one would need to compile those also with MSAN).
FLAGS="-fsanitize=memory -O2 -fno-omit-frame-pointer -fsanitize-memory-track-origins -Wl,-R$LIBSTDCXX -Qunused-arguments" CFLAGS=$FLAGS CXXFLAGS=$FLAGS CC=clang CXX=clang++ cmake -DCMAKE_BUILD_TYPE=Debug -DGMX_EXTERNAL_BLAS=no -DGMX_EXTERNAL_LAPACK=no -DGMX_FFT_LIBRARY=fftpack -DTNG_BUILD_WITH_ZLIB=no ..
For 3.4 one also needs -DGMX_SYSTEM_XDR=no. It does work with OpenMP but requires iomp to be compiled with MSAN too. I'm not sure MSAN is really worth the effort because most our heap allocation is automatically zeroed (snew uses calloc) thus mainly uninitialized stack usage is an issue. And the static analysis might catch most of those. valgrind (which is easier to use but much slower) wouldn't help because it doesn't check stack AFAIK.