Skip to content

Commit 025d942

Browse files
committed
Merge branch '41-implement-ci-for-unitests' into 'master'
Resolve "Implement CI for unitests" Closes #41 See merge request chase/chase-library/ChASE!62
2 parents 7a94ddc + abc0170 commit 025d942

3 files changed

Lines changed: 109 additions & 22 deletions

File tree

.gitlab-ci.yml

Lines changed: 104 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -1,24 +1,111 @@
1-
default:
2-
tags: [ public-docker ]
1+
variables:
2+
SCHEDULER_PARAMETERS: '-Aslai -N1'
3+
4+
stages:
5+
- build
6+
- test
7+
- coverage
8+
9+
build_cpu:
10+
stage: build
11+
tags: [ docker-proton ]
312
image:
4-
name: gitlab.version.fz-juelich.de:5555/sharedrunner/opensuse
13+
name: opensuse:jsc-gcc12
514

6-
build:
7-
stage: build
815
script:
9-
- cmake --version
10-
- mkdir -p build
11-
- cd build
12-
- FC=gfortran CC=gcc CXX=g++ cmake -DENABLE_TESTS=ON -DMPI_RUN_ARGS="--allow-run-as-root" ..
13-
- make VERBOSE=1
16+
- cmake --version
17+
- mkdir -p build_cpu
18+
- cd build_cpu
19+
- export CFLAGS='-Wextra -Wall -pedantic'
20+
- export CXXFLAGS='-Wextra -Wall -pedantic'
21+
- export FFLAGS='-Wextra -Wall -pedantic'
22+
- env CFLAGS="$CFLAGS --coverage" CXXFLAGS="$CXXFLAGS --coverage" FFLAGS="$FFLAGS --coverage" FC=gfortran CC=gcc CXX=g++ cmake -DENABLE_TESTS=ON -DMPI_RUN_ARGS="--allow-run-as-root" .. -DCMAKE_EXE_LINKER_FLAGS="--coverage"
23+
- make VERBOSE=1
1424
artifacts:
1525
paths:
16-
- build/Makefile
17-
- build/chase_driver
18-
- build/CTestTestfile.cmake
19-
- build/tests
20-
test:
26+
- build_cpu/Makefile
27+
- build_cpu/CTestTestfile.cmake
28+
- build_cpu/tests
29+
expire_in: 1 week
30+
31+
test_cpu:
2132
stage: test
33+
dependencies:
34+
- build_cpu
35+
tags: [ docker-proton ]
36+
image:
37+
name: opensuse:jsc-gcc12
38+
script:
39+
- cd build_cpu
40+
- CTEST_OUTPUT_ON_FAILURE=1 make test
41+
- rm -rf _deps
42+
artifacts:
43+
paths:
44+
- build_cpu/*
45+
expire_in: 1 week
46+
47+
build_gpu:
48+
stage: build
49+
tags:
50+
- juwels_booster
51+
- jacamar
52+
- login
53+
- shell
54+
id_tokens:
55+
SITE_ID_TOKEN:
56+
aud: https://gitlab.jsc.fz-juelich.de
57+
script:
58+
- echo $SYSTEMNAME
59+
- module load Stages/2024 GCC/12.3.0 OpenMPI imkl CMake CUDA
60+
- cmake --version
61+
- mkdir -p build_gpu
62+
- cd build_gpu
63+
- export CFLAGS='-Wextra -Wall -pedantic'
64+
- export CXXFLAGS='-Wextra -Wall -pedantic'
65+
- export FFLAGS='-Wextra -Wall -pedantic'
66+
- env CFLAGS="$CFLAGS --coverage" CXXFLAGS="$CXXFLAGS --coverage" FFLAGS="$FFLAGS --coverage" cmake -DENABLE_TESTS=ON -DMPI_RUN="srun" .. -DCMAKE_EXE_LINKER_FLAGS="--coverage"
67+
- make VERBOSE=1
68+
artifacts:
69+
paths:
70+
- build_gpu/Makefile
71+
- build_gpu/CTestTestfile.cmake
72+
- build_gpu/tests
73+
74+
test_gpu:
75+
stage: test
76+
dependencies:
77+
- build_gpu
78+
tags:
79+
- juwels_booster
80+
- jacamar
81+
- compute
82+
- slurm
83+
id_tokens:
84+
SITE_ID_TOKEN:
85+
aud: https://gitlab.jsc.fz-juelich.de
86+
script:
87+
- echo $SYSTEMNAME
88+
- module load Stages/2024 GCC/12.3.0 OpenMPI imkl CMake CUDA
89+
- export CUDA_VISIBLE_DEVICES=0,1,2,3
90+
- cd build_gpu
91+
- CTEST_OUTPUT_ON_FAILURE=1 make test
92+
- rm -rf _deps
93+
artifacts:
94+
paths:
95+
- build_gpu/*
96+
97+
coverage:
98+
stage: coverage
99+
coverage: '/lines......: (\d+[.]\d+)/'
100+
dependencies:
101+
- test_cpu
102+
- test_gpu
103+
tags: [ docker-proton ]
104+
image:
105+
name: opensuse:jsc-gcc12
22106
script:
23-
- cd build
24-
- CTEST_OUTPUT_ON_FAILURE=1 make test
107+
# Merge the two coverage files
108+
- lcov --capture --directory ./build_cpu --output-file coverage_cpu.info
109+
- lcov --capture --directory ./build_gpu --output-file coverage_gpu.info
110+
- lcov --add-tracefile coverage_cpu.info --add-tracefile coverage_gpu.info --output-file coverage.info
111+
- lcov --summary coverage.info

README.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
[![License](https://img.shields.io/github/license/ChASE-library/ChASE)](https://github.com/ChASE-library/ChASE/blob/master/LICENSE) [![DOI](https://zenodo.org/badge/349075288.svg)](https://zenodo.org/badge/latestdoi/349075288) [![Latest Version](https://img.shields.io/github/v/release/ChASE-library/ChASE)](https://github.com/ChASE-library/ChASE/releases/latest) [![DOI](https://img.shields.io/badge/DOI-10.1145%2F3313828%20-orange)](https://doi.org/10.1145/3313828) [![DOI](https://img.shields.io/badge/DOI-10.1002%2Fcpe.3394%20-orange)](https://doi.org/10.1002/cpe.3394)
1+
[![License](https://img.shields.io/github/license/ChASE-library/ChASE)](https://github.com/ChASE-library/ChASE/blob/master/LICENSE) [![DOI](https://zenodo.org/badge/349075288.svg)](https://zenodo.org/badge/latestdoi/349075288) [![Latest Version](https://img.shields.io/github/v/release/ChASE-library/ChASE)](https://github.com/ChASE-library/ChASE/releases/latest) [![DOI](https://img.shields.io/badge/DOI-10.1145%2F3313828%20-orange)](https://doi.org/10.1145/3313828) [![DOI](https://img.shields.io/badge/DOI-10.1002%2Fcpe.3394%20-orange)](https://doi.org/10.1002/cpe.3394) [![coverage](https://gitlab.jsc.fz-juelich.de/chase/chase-library/ChASE/badges/master/coverage.svg?job=coverage)](https://gitlab.jsc.fz-juelich.de/chase/chase-library/ChASE/badges/master/coverage.svg)
22
<img src="docs/images/ChASE_Logo_RGB.png" alt="Matrix Generation Pattern" style="zoom:40%;" />
33
# ChASE: a Chebyshev Accelerated Subspace Eigensolver for Dense Eigenproblems
44

@@ -114,7 +114,7 @@ cmake .. -DBUILD_WITH_EXAMPLES=ON
114114
### Current contributors
115115
116116
- Davor Davidović – Advanced parallel GPU implementation and optimization
117-
- Nenad Mijić – ARM-based implementation and optimization
117+
- Nenad Mijić – ARM-based implementation and optimization, CholeskyQR, unitests, parallel IO
118118
119119
120120
### Past contributors

tests/QR/CMakeLists.txt

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,11 @@
11
file(COPY QR_matrices DESTINATION ${CMAKE_BINARY_DIR}/tests/QR)
22

3-
setup_test(QRTest QR_test.cpp LIBRARIES chase_mpi)
43
setup_test(QRTestIntegration QR_integration.cpp LIBRARIES chase_mpi GTest::gmock)
54

6-
setup_test_serial(QRTestSerial QR_test.cpp LIBRARIES chase_seq)
7-
85
if(TARGET chase_cuda )
96
setup_test(QRTestCuda QR_test.cpp LIBRARIES chase_mpi chase_cuda)
107
setup_test_serial(QRTestCudaSerial QR_test.cpp LIBRARIES chase_seq chase_cuda)
8+
else()
9+
setup_test(QRTest QR_test.cpp LIBRARIES chase_mpi)
10+
setup_test_serial(QRTestSerial QR_test.cpp LIBRARIES chase_seq)
1111
endif()

0 commit comments

Comments
 (0)