Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Debug flags #169

Open
wants to merge 26 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
26 commits
Select commit Hold shift + click to select a range
0867434
Fix text interface for determinants
scemama Nov 10, 2024
9459377
Changes after review
scemama Nov 11, 2024
9204ecb
Retry tests
scemama Nov 11, 2024
ff8e44d
Add -g to compiler flags
scemama Nov 11, 2024
cda0ad7
Removed many warnings + added more checks
scemama Nov 11, 2024
d14b98b
More checks
scemama Nov 11, 2024
debee61
No warnings in trexio.c
scemama Nov 11, 2024
c902929
Fix a typo in the comment
q-posev Nov 11, 2024
e8ac919
Removed O2 from default fortran configuration
scemama Nov 12, 2024
4bd1474
Merge branch 'det-checks' into debug_flags
scemama Nov 12, 2024
2c7d8ea
Fixed bug in test_f.f90
scemama Nov 12, 2024
d9e56c5
Merge branch 'det-checks' into debug_flags
scemama Nov 12, 2024
fad2df8
Added sanitizer flags for fortran
scemama Nov 12, 2024
38a4b60
Added missing prototypes in the text backend
scemama Nov 12, 2024
8d534d8
Fixed unused parameters in hdf5
scemama Nov 12, 2024
1a07e65
Added download link of tar.gz in documentation
scemama Nov 20, 2024
e5a3061
Merge branch 'master' into debug_flags
scemama Dec 4, 2024
66bb1e9
Fixed bug for arrays of strings in text backend
scemama Dec 5, 2024
3638513
Fixed strncpy
scemama Dec 5, 2024
770b136
Revert "Fixed strncpy"
scemama Dec 5, 2024
a5d39ac
Replaced some strnlen by memcpy
scemama Dec 5, 2024
72619db
Removed strnlen
scemama Dec 5, 2024
cd369bd
Fix previous commit
scemama Dec 5, 2024
c7d5d42
Fixed valgrind test_f.f90
scemama Dec 6, 2024
751b3c9
Fixed valgrind issue with trim
scemama Dec 6, 2024
d2c5dc7
Merge branch 'master' into debug_flags
scemama Dec 12, 2024
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions .github/workflows/actions.yml
Original file line number Diff line number Diff line change
Expand Up @@ -65,13 +65,13 @@ jobs:
- name: configure with autotools
run: |
./autogen.sh
./configure --enable-silent-rules
./configure --enable-silent-rules --enable-debug --enable-sanitizer

- name: compile TREXIO
run: make -j2

- name: check TREXIO
run: make -j2 check
run: make -j1 check # Non-parallel run

- name: Archive test log file
if: failure()
Expand Down
24 changes: 20 additions & 4 deletions configure.ac
Original file line number Diff line number Diff line change
Expand Up @@ -43,6 +43,7 @@ AC_SUBST([UNAME])

# Fortran API [default: --with-fortran], do not disable in the dev mode
AC_PROG_FC

AC_ARG_WITH(fortran, [AS_HELP_STRING([--without-fortran],[do not test and install the Fortran API])], ok=$withval, ok=yes)
AS_IF([test "$ok" = "yes"],[
AC_FC_FREEFORM
Expand All @@ -52,9 +53,9 @@ AS_IF([test "$ok" = "yes"],[

# Specific options required with some compilers
AS_CASE([$FC],
[*gfortran*], [FCFLAGS="$FCFLAGS -fPIC"],
[*flang*], [FCFLAGS="$FCFLAGS -fPIC"],
[*ifort*], [FCFLAGS="$FCFLAGS -fPIC"],
[*gfortran*], [FCFLAGS="$FCFLAGS -g -fPIC"],
[*flang*], [FCFLAGS="$FCFLAGS -g -fPIC"],
[*ifort*], [FCFLAGS="$FCFLAGS -g -fPIC"],
[])

])
Expand Down Expand Up @@ -130,7 +131,7 @@ AC_ARG_WITH([hdf5],
AS_HELP_STRING([--with-hdf5=PATH], [Path to HDF5 library and headers]), [
with_hdf5="$withval"], [with_hdf5="yes"])

AS_IF([test "x$with_hdf5" == "xno"], [],
AS_IF([test "x$with_hdf5" == "xno"], [],
[test "x$with_hdf5" != "xyes"], [
HDF5_LIBS="-lhdf5"
HDF5_PATH="$with_hdf5"
Expand Down Expand Up @@ -311,6 +312,21 @@ AC_CHECK_HEADERS([math.h])
AC_SEARCH_LIBS([pthread_create], [pthread], [], AC_MSG_ERROR([The pthread library is required]))
AC_CHECK_HEADERS([pthread.h])

# Debug flags

AC_ARG_ENABLE(debug, [AS_HELP_STRING([--enable-debug],[enable gcc and gfortran debug flags])], ok=$enableval, ok=no)
if test "$ok" = "yes"; then
CFLAGS="${CFLAGS} -Wall -Wextra -Wpedantic -Werror -Wshadow -Wformat -Wfloat-equal -Wconversion -Wcast-align -Wnull-dereference -Wstrict-aliasing -Winline -Wmissing-prototypes -Wunreachable-code -fstack-protector-strong -fdiagnostics-show-option -Wfloat-conversion -Wcast-qual -fno-inline -fno-omit-frame-pointer -Wno-sign-conversion -Wno-cast-qual -Wno-float-conversion" # -Wno-unused-variable"
FCFLAGS="${FCFLAGS} -g -fcheck=all -Waliasing -Wampersand -Wconversion -Wsurprising -Wintrinsics-std -Wno-tabs -Wintrinsic-shadow -Wline-truncation -Wreal-q-constant -Wuninitialized -fbacktrace -ffpe-trap=zero,overflow -finit-real=nan"
fi


AC_ARG_ENABLE(sanitizer, [AS_HELP_STRING([--enable-sanitizer],[enable sanitizer debug flags])], ok=$enableval, ok=no)
if test "$ok" = "yes"; then
CFLAGS="${CFLAGS} -fsanitize=address -fsanitize=undefined -fsanitize=leak -fsanitize=pointer-compare -fsanitize=pointer-subtract -fsanitize=bounds -fsanitize=bounds-strict"
FCFLAGS="${FCFLAGS} -fsanitize=address -fsanitize=undefined -fsanitize=leak -fsanitize=pointer-compare -fsanitize=pointer-subtract -fsanitize=bounds -fsanitize=bounds-strict"
fi


AC_CONFIG_FILES([Makefile
pkgconfig/trexio.pc])
Expand Down
Loading
Loading