Skip to content

Commit e7998d9

Browse files
authored
eCLM-PDAF: Remove Intel-Debug-Flag "-check all" + Debug builds in CI (#70)
* SetBuildoptions: remove `-check all` from debug flags We are trying to fix the following problem and suspect that it comes from the `-check all` flags. ``` ==22279==WARNING: MemorySanitizer: use-of-uninitialized-value ``` In the future there could maybe be a more fine-grained handling of checks. * CI: Builds with build type "DEBUG"
1 parent 2cd146a commit e7998d9

2 files changed

Lines changed: 36 additions & 2 deletions

File tree

.github/workflows/CI.yml

Lines changed: 28 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,20 +13,47 @@ jobs:
1313
config:
1414
- {
1515
name: "eCLM-Standalone",
16+
build_type: "RELEASE",
17+
use_oasis: "False",
18+
coup_oas_icon: "False",
19+
coup_oas_pfl: "False",
20+
use_pdaf: "False"
21+
}
22+
- {
23+
name: "eCLM-Standalone_DEBUG",
24+
build_type: "DEBUG",
1625
use_oasis: "False",
1726
coup_oas_icon: "False",
1827
coup_oas_pfl: "False",
1928
use_pdaf: "False"
2029
}
2130
- {
2231
name: "eCLM-ParFlow-ICON",
32+
build_type: "RELEASE",
33+
use_oasis: "True",
34+
coup_oas_icon: "True",
35+
coup_oas_pfl: "True",
36+
use_pdaf: "False"
37+
}
38+
- {
39+
name: "eCLM-ParFlow-ICON_DEBUG",
40+
build_type: "DEBUG",
2341
use_oasis: "True",
2442
coup_oas_icon: "True",
2543
coup_oas_pfl: "True",
2644
use_pdaf: "False"
2745
}
2846
- {
2947
name: "eCLM-PDAF",
48+
build_type: "RELEASE",
49+
use_oasis: "False",
50+
coup_oas_icon: "False",
51+
coup_oas_pfl: "False",
52+
use_pdaf: "True"
53+
}
54+
- {
55+
name: "eCLM-PDAF_DEBUG",
56+
build_type: "DEBUG",
3057
use_oasis: "False",
3158
coup_oas_icon: "False",
3259
coup_oas_pfl: "False",
@@ -77,7 +104,7 @@ jobs:
77104
- name: Configure eCLM
78105
run: |
79106
cmake -S src -B $BUILD_DIR \
80-
-DCMAKE_BUILD_TYPE="RELEASE" \
107+
-DCMAKE_BUILD_TYPE=${{ matrix.config.build_type }} \
81108
-DCMAKE_INSTALL_PREFIX=$INSTALL_DIR \
82109
-DCMAKE_PREFIX_PATH="$HOME/.local" \
83110
-DCMAKE_C_COMPILER=$CC \

cmake/SetBuildOptions.cmake

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,14 @@ elseif(COMPILER STREQUAL "Intel" OR COMPILER STREQUAL "IntelLLVM")
3535
set(CMAKE_C_FLAGS_DEBUG "-O0 -g")
3636
set(CMAKE_C_FLAGS_RELEASE "-O2 -debug minimal")
3737
set(CMAKE_Fortran_FLAGS "-free -qno-opt-dynamic-align -ftz -traceback -convert big_endian -assume byterecl -assume realloc_lhs -fp-model source -qopenmp")
38-
set(CMAKE_Fortran_FLAGS_DEBUG "-O0 -g -fpe0 -check all")
38+
if(USE_PDAF)
39+
# PDAF does not pass all checks from "-check all"
40+
# TODO: Resolve the PDAF/non-PDAF difference by either adapting
41+
# the compile options or debugging the source code
42+
set(CMAKE_Fortran_FLAGS_DEBUG "-O0 -g -fpe0") #-check all
43+
else()
44+
set(CMAKE_Fortran_FLAGS_DEBUG "-O0 -g -fpe0 -check all")
45+
endif()
3946
set(CMAKE_Fortran_FLAGS_RELEASE "-O2 -debug minimal")
4047
else()
4148
message(FATAL_ERROR "COMPILER='${COMPILER}' is not supported.")

0 commit comments

Comments
 (0)