1 # Build, test, and install variously configured GROMACS installations.
3 # This file contains job templates. Actual job configurations are inside gromacs.matrix/ directory.
5 .gromacs:base:configure:
11 KUBERNETES_CPU_LIMIT: 1
12 KUBERNETES_CPU_REQUEST: 1
13 KUBERNETES_MEMORY_REQUEST: 2Gi
14 CMAKE_COMPILER_SCRIPT: ""
15 CMAKE_EXTRA_OPTIONS: ""
16 CMAKE_SIMD_OPTIONS: "-DGMX_SIMD=AVX2_256"
17 CMAKE_MPI_OPTIONS: "-DGMX_THREAD_MPI=ON"
18 CMAKE_PRECISION_OPTIONS: "-DGMX_DOUBLE=OFF"
19 CMAKE_BUILD_TYPE_OPTIONS: "-DCMAKE_BUILD_TYPE=Debug"
20 CMAKE_GPU_OPTIONS: "-DGMX_GPU=OFF"
22 - CMAKE=${CMAKE:-$(which cmake)}
23 - echo $CMAKE_COMPILER_SCRIPT
24 - echo $CMAKE_EXTRA_OPTIONS
25 - echo $CMAKE_SIMD_OPTIONS
26 - echo $CMAKE_GPU_OPTIONS
27 - echo $CMAKE_MPI_OPTIONS
28 - echo $CMAKE_PRECISION_OPTIONS
29 - echo $CMAKE_BUILD_TYPE_OPTIONS
30 - echo $CMAKE_GMXAPI_OPTIONS
31 - if [[ -d $BUILD_DIR ]] ; then
32 rm -rf $BUILD_DIR && mkdir $BUILD_DIR ;
34 echo "Preparing new build directory" ;
39 -DCMAKE_C_COMPILER_LAUNCHER=ccache -DCMAKE_CXX_COMPILER_LAUNCHER=ccache
40 $CMAKE_COMPILER_SCRIPT
44 $CMAKE_PRECISION_OPTIONS
45 $CMAKE_BUILD_TYPE_OPTIONS
48 -DCMAKE_INSTALL_PREFIX=../$INSTALL_DIR -DGMX_COMPILER_WARNINGS=ON
49 2>&1 | tee cmakeLog.log
50 - awk '/CMake Warning/,/^--|^$/' cmakeLog.log | tee cmakeErrors.log
51 - if [ -s cmakeErrors.log ] ; then echo "Found CMake warning while processing build"; cat cmakeErrors.log ; exit 1; fi
58 .gromacs:base:release:configure:
61 stage: release-configure
64 KUBERNETES_CPU_LIMIT: 1
65 KUBERNETES_CPU_REQUEST: 1
66 KUBERNETES_MEMORY_REQUEST: 2Gi
67 CMAKE_COMPILER_SCRIPT: ""
68 CMAKE_EXTRA_OPTIONS: ""
69 CMAKE_SIMD_OPTIONS: "-DGMX_SIMD=AVX2_256"
70 CMAKE_MPI_OPTIONS: "-DGMX_THREAD_MPI=ON"
71 CMAKE_PRECISION_OPTIONS: "-DGMX_DOUBLE=OFF"
72 CMAKE_BUILD_TYPE_OPTIONS: "-DCMAKE_BUILD_TYPE=RelWithAssert"
73 CMAKE_GPU_OPTIONS: "-DGMX_GPU=OFF"
74 CMAKE_REGRESSIONTEST_OPTIONS: "-DREGRESSIONTEST_PATH=../\\$RELEASE_REGRESSIONTESTS"
75 RELEASE_BUILD_DIR: release-builds
76 RELEASE_SOURCE: release-source-from-tarball
77 RELEASE_REGRESSIONTESTS: release-regressiontests-from-tarball
79 - CMAKE=${CMAKE:-$(which cmake)}
80 - VERSION=`cat version.json |
81 python3 -c "import json,sys; print(json.load(sys.stdin)['version'])"`
82 - if [[ $GROMACS_RELEASE != "true" ]] ; then
83 VERSION=$VERSION-dev ;
85 - SOURCENAME=gromacs-$VERSION
86 - SOURCETARBALL=$SOURCENAME.tar.gz
87 - REGTESTNAME=regressiontests-$VERSION
88 - REGTESTTARBALL=$REGTESTNAME.tar.gz
89 - echo "$SOURCETARBALL"
90 - echo "$REGTESTTARBALL"
91 - RELEASE_TARBALLS=release-tarballs
92 - rm -rf $RELEASE_TARBALLS $RELEASE_SOURCE $RELEASE_REGRESSIONTESTS && mkdir $RELEASE_TARBALLS
93 - mv $SOURCETARBALL $RELEASE_TARBALLS
94 - mv $REGTESTTARBALL $RELEASE_TARBALLS
95 - cd $RELEASE_TARBALLS
96 # We rename the source and regressiontest directories
97 # to have names for them that don't change for different versions.
98 - tar -xf $SOURCETARBALL
99 - mv $SOURCENAME ../$RELEASE_SOURCE
100 - tar -xf $REGTESTTARBALL
101 - mv $REGTESTNAME ../$RELEASE_REGRESSIONTESTS
102 - rm $SOURCETARBALL $REGTESTTARBALL
104 - echo $CMAKE_COMPILER_SCRIPT
105 - echo $CMAKE_EXTRA_OPTIONS
106 - echo $CMAKE_SIMD_OPTIONS
107 - echo $CMAKE_GPU_OPTIONS
108 - echo $CMAKE_MPI_OPTIONS
109 - echo $CMAKE_PRECISION_OPTIONS
110 - echo $CMAKE_BUILD_TYPE_OPTIONS
111 - echo $CMAKE_GMXAPI_OPTIONS
112 - if [[ -d $RELEASE_BUILD_DIR ]] ; then
113 echo "Cleaning up build directory" ;
114 rm -rf $RELEASE_BUILD_DIR && mkdir $RELEASE_BUILD_DIR ;
116 echo "Preparing new build directory" ;
117 mkdir $RELEASE_BUILD_DIR ;
119 - cd $RELEASE_BUILD_DIR
120 - cmake ../$RELEASE_SOURCE/
121 -DCMAKE_C_COMPILER_LAUNCHER=ccache -DCMAKE_CXX_COMPILER_LAUNCHER=ccache
122 $CMAKE_COMPILER_SCRIPT
126 $CMAKE_PRECISION_OPTIONS
127 $CMAKE_BUILD_TYPE_OPTIONS
129 $CMAKE_GMXAPI_OPTIONS
130 $CMAKE_REGRESSIONTEST_OPTIONS
131 -DCMAKE_INSTALL_PREFIX=../$INSTALL_DIR
132 2>&1 | tee cmakeLog.log
133 - awk '/CMake Warning/,/^--|^$/' cmakeLog.log | tee cmakeErrors.log
134 - if [ -s cmakeErrors.log ] ; then echo "Found CMake warning while processing build"; cat cmakeErrors.log ; exit 1; fi
140 - $RELEASE_REGRESSIONTESTS
146 - CMAKE=${CMAKE:-$(which cmake)}
148 - $CMAKE --build . -- -j$KUBERNETES_CPU_LIMIT 2>&1 | tee buildLogFile.log
149 - $CMAKE --build . --target tests -- -j$KUBERNETES_CPU_LIMIT 2>&1 | tee testBuildLogFile.log
150 - awk '/warning/,/warning.*generated|^$/' buildLogFile.log testBuildLogFile.log
151 | grep -v "CMake" | tee buildErrors.log || true
152 - grep "cannot be built" buildLogFile.log testBuildLogFile.log | tee -a buildErrors.log || true
153 - $CMAKE --build . --target install 2>&1 | tee installBuildLogFile.log
154 - if [ -s buildErrors.log ] ; then echo "Found compiler warning during build"; cat buildErrors.log; exit 1; fi
155 - for file in `find . -mindepth 1 -name "*.o" ! -type l` ; do echo $file ; rm $file ; done 2>&1 > remove-build-objects.log
163 .gromacs:static-analyzer-build:
166 - CMAKE=${CMAKE:-$(which cmake)}
168 - scan-build -o scan_html $CMAKE --build . -- -j8 2>&1 | tee buildLogFile.log
169 - awk '/warning/,/warning.*generated|^$/' buildLogFile.log
170 | grep -v "CMake" | tee buildErrors.log || true
171 - grep "cannot be built" buildLogFile.log | tee -a buildErrors.log || true
172 - if [ -s buildErrors.log ] ; then echo "Found compiler warning during build"; cat buildErrors.log; exit 1; fi
177 - $BUILD_DIR/scan_html
187 CTEST_RUN_MODE: "ExperimentalTest"
189 - CMAKE=${CMAKE:-$(which cmake)}
191 - export UBSAN_OPTIONS=halt_on_error=1:print_stacktrace=1:suppressions=$CI_PROJECT_DIR/admin/ubsan-suppressions.txt
192 # Needed to run MPI enabled code in the docker images, until we set up different users
193 - export OMPI_ALLOW_RUN_AS_ROOT=1
194 - export OMPI_ALLOW_RUN_AS_ROOT_CONFIRM=1
195 - export ASAN_OPTIONS="check_initialization_order=1:detect_invalid_pointer_pairs=1:strict_init_order=true:strict_string_checks=true:detect_stack_use_after_return=true"
196 # If $GMX_TEST_REQUIRED_NUMBER_OF_DEVICES is not set and we have GPUs, set it
197 - if [ -z $GMX_TEST_REQUIRED_NUMBER_OF_DEVICES ] && [ -n $KUBERNETES_EXTENDED_RESOURCE_NAME ] ; then
198 if grep -q '/gpu$' <<< "$KUBERNETES_EXTENDED_RESOURCE_NAME"; then
199 echo "export GMX_TEST_REQUIRED_NUMBER_OF_DEVICES=\"0\"";
200 export GMX_TEST_REQUIRED_NUMBER_OF_DEVICES=0;
203 - if grep -qF 'nvidia.com/gpu' <<< "$KUBERNETES_EXTENDED_RESOURCE_NAME"; then
206 - if grep -qF 'intel.com/gpu' <<< "$KUBERNETES_EXTENDED_RESOURCE_NAME"; then
209 - ctest -D $CTEST_RUN_MODE --output-on-failure | tee ctestLog.log || true
210 - awk '/The following tests FAILED/,/^Errors while running CTest|^$/'
211 ctestLog.log | tee ctestErrors.log
212 - xsltproc $CI_PROJECT_DIR/scripts/CTest2JUnit.xsl Testing/`head -n 1 < Testing/TAG`/*.xml > JUnitTestResults.xml
213 - if [ -s ctestErrors.log ] ; then
214 echo "Error during running ctest";
220 junit: $BUILD_DIR/JUnitTestResults.xml
227 .gromacs:base:regressiontest:
231 KUBERNETES_CPU_LIMIT: 4
232 KUBERNETES_CPU_REQUEST: 4
233 KUBERNETES_MEMORY_REQUEST: 4Gi
234 REGRESSIONTEST_TOTAL_RANK_NUMBER: 4
235 REGRESSIONTEST_OMP_RANK_NUMBER: 2
236 REGRESSIONTEST_PME_RANK_NUMBER: 1
237 REGRESSIONTEST_MPI_RUN_COMMAND: ""
238 REGRESSIONTEST_DOUBLE: ""
239 REGRESSIONTEST_PARALLEL: "-nt"
245 - export LSAN_OPTIONS="suppressions=$CI_PROJECT_DIR/admin/lsan-suppressions.txt:print_suppressions=0"
246 - export ASAN_OPTIONS="check_initialization_order=1:detect_invalid_pointer_pairs=1:strict_init_order=true:strict_string_checks=true:detect_stack_use_after_return=true"
247 # Needed to run MPI enabled code in the docker images, until we set up different users
248 - export OMPI_ALLOW_RUN_AS_ROOT=1
249 - export OMPI_ALLOW_RUN_AS_ROOT_CONFIRM=1
250 - tar xzf gmx-regressiontests.tar.gz
251 - source $INSTALL_DIR/bin/GMXRC
253 - perl gmxtest.pl $REGRESSIONTEST_PARALLEL $REGRESSIONTEST_TOTAL_RANK_NUMBER -ntomp $REGRESSIONTEST_OMP_RANK_NUMBER -npme $REGRESSIONTEST_PME_RANK_NUMBER $REGRESSIONTEST_DOUBLE $REGRESSIONTEST_MPI_RUN_COMMAND -xml all
256 - regressiontests/gmxtest.xml
261 - local: '/admin/gitlab-ci/gromacs.matrix/gromacs.clang-8-cuda-11.0-release.gitlab-ci.yml'
262 - local: '/admin/gitlab-ci/gromacs.matrix/gromacs.clang-8.gitlab-ci.yml'
263 - local: '/admin/gitlab-ci/gromacs.matrix/gromacs.clang-12-mpi.gitlab-ci.yml'
264 - local: '/admin/gitlab-ci/gromacs.matrix/gromacs.clang-12-release.gitlab-ci.yml'
265 - local: '/admin/gitlab-ci/gromacs.matrix/gromacs.clang-11-cuda-11.4.gitlab-ci.yml'
266 - local: '/admin/gitlab-ci/gromacs.matrix/gromacs.clang-ASAN.gitlab-ci.yml'
267 - local: '/admin/gitlab-ci/gromacs.matrix/gromacs.clang-static-analyzer.gitlab-ci.yml'
268 - local: '/admin/gitlab-ci/gromacs.matrix/gromacs.clang-TSAN.gitlab-ci.yml'
269 - local: '/admin/gitlab-ci/gromacs.matrix/gromacs.clang-UBSAN.gitlab-ci.yml'
270 - local: '/admin/gitlab-ci/gromacs.matrix/gromacs.gcc-11.gitlab-ci.yml'
271 - local: '/admin/gitlab-ci/gromacs.matrix/gromacs.gcc-11-coverage.gitlab-ci.yml'
272 - local: '/admin/gitlab-ci/gromacs.matrix/gromacs.gcc-7-cuda-11.0.gitlab-ci.yml'
273 - local: '/admin/gitlab-ci/gromacs.matrix/gromacs.gcc-10-cuda-11.4.gitlab-ci.yml'
274 - local: '/admin/gitlab-ci/gromacs.matrix/gromacs.gcc-10-cuda-11.4-release.gitlab-ci.yml'
275 - local: '/admin/gitlab-ci/gromacs.matrix/gromacs.gcc-11-release.gitlab-ci.yml'
276 - local: '/admin/gitlab-ci/gromacs.matrix/gromacs.hipsycl-dev.gitlab-ci.yml'
277 - local: '/admin/gitlab-ci/gromacs.matrix/gromacs.oneapi-2021.1.1-opencl.gitlab-ci.yml'
278 - local: '/admin/gitlab-ci/gromacs.matrix/gromacs.oneapi-2021.1.1-opencl-release.gitlab-ci.yml'
279 - local: '/admin/gitlab-ci/gromacs.matrix/gromacs.oneapi-2021.1.1-sycl.gitlab-ci.yml'
280 - local: '/admin/gitlab-ci/gromacs.matrix/gromacs.oneapi-2021.2.0-sycl-nightly.gitlab-ci.yml'