Skip to content

Commit

Permalink
Toolchain: Remove valgrind
Browse files Browse the repository at this point in the history
  • Loading branch information
oschuett committed May 27, 2021
1 parent da5424e commit 849fc25
Show file tree
Hide file tree
Showing 8 changed files with 6 additions and 180 deletions.
17 changes: 0 additions & 17 deletions tools/docker/Dockerfile.test_valgrind-popt

This file was deleted.

17 changes: 0 additions & 17 deletions tools/docker/Dockerfile.test_valgrind-sopt

This file was deleted.

17 changes: 1 addition & 16 deletions tools/toolchain/install_cp2k_toolchain.sh
Original file line number Diff line number Diff line change
Expand Up @@ -154,9 +154,6 @@ The --with-PKG options follow the rules:
Default = system
--with-cmake Cmake utilities
Default = install
--with-valgrind Valgrind memory debugging tool, only used for
debugging purposes.
Default = no
--with-openmpi OpenMPI, important if you want parallel version
of CP2K.
Default = system
Expand Down Expand Up @@ -267,7 +264,7 @@ EOF
# PACKAGE LIST: register all new dependent tools and libs here. Order
# is important, the first in the list gets installed first
# ------------------------------------------------------------------------
tool_list="gcc cmake valgrind"
tool_list="gcc cmake"
mpi_list="mpich openmpi intelmpi"
math_list="mkl acml openblas reflapack"
lib_list="fftw libint libxc libsmm libxsmm cosma scalapack elpa plumed \
Expand Down Expand Up @@ -523,9 +520,6 @@ while [ $# -ge 1 ]; do
--with-cmake*)
with_cmake=$(read_with $1)
;;
--with-valgrind*)
with_valgrind=$(read_with $1)
;;
--with-mpich*)
with_mpich=$(read_with $1)
if [ $with_mpich != __DONTUSE__ ]; then
Expand Down Expand Up @@ -650,7 +644,6 @@ export ENABLE_CUDA=$enable_cuda
export ENABLE_CRAY=$enable_cray
[ "$enable_gcc_master" = "__TRUE__" ] && export gcc_ver=master
[ "$enable_libxsmm_master" = "__TRUE__" ] && export libxsmm_ver=master
[ "$with_valgrind" != "__DONTUSE__" ] && export ENABLE_VALGRIND="__TRUE__"

# ------------------------------------------------------------------------
# Check and solve known conflicts before installations proceed
Expand All @@ -667,14 +660,6 @@ if [ $ENABLE_TSAN = "__TRUE__" ]; then
with_libsmm="__DONTUSE__"
fi

# valgrind conflicts
if [ "$ENABLE_VALGRIND" = "__TRUE__" ]; then
if [ "$with_reflapack" = "__DONTUSE__" ]; then
echo "reflapack is automatically installed when valgrind is enabled"
with_reflapack="__INSTALL__"
fi
fi

# mpi library conflicts
if [ $MPI_MODE = no ]; then
if [ "$with_scalapack" != "__DONTUSE__" ]; then
Expand Down
1 change: 0 additions & 1 deletion tools/toolchain/scripts/common_vars.sh
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,6 @@ LIB_PATHS=${LIB_PATHS:-'LD_LIBRARY_PATH LIBRARY_PATH LD_RUN_PATH SYS_LIB_PATH'}
# mode flags
ENABLE_OMP=${ENABLE_OMP:-"__TRUE__"}
ENABLE_TSAN=${ENABLE_TSAN:-"__FALSE__"}
ENABLE_VALGRIND=${ENABLE_VALGRIND:-"__FALSE__"}
ENABLE_CUDA=${ENABLE_CUDA:-"__FALSE__"}
ENABLE_CRAY=${ENABLE_CRAY:-"__FALSE__"}
MPI_MODE=${MPI_MODE:-openmpi}
Expand Down
14 changes: 2 additions & 12 deletions tools/toolchain/scripts/generate_arch_files.sh
Original file line number Diff line number Diff line change
Expand Up @@ -88,8 +88,7 @@ WFLAGS="$WFLAGS_ERROR $WFLAGS_WARN IF_WARNALL(${WFLAGS_WARNALL}|)"
FCDEBFLAGS="$FCDEB_FLAGS IF_DEBUG($FCDEB_FLAGS_DEBUG|)"
DFLAGS="${CP_DFLAGS} IF_DEBUG($IEEE_EXCEPTIONS_DFLAGS -D__CHECK_DIAG|) IF_COVERAGE($COVERAGE_DFLAGS|)"
# language independent flags
# valgrind with avx can lead to spurious out-of-bound results
G_CFLAGS="$BASEFLAGS IF_VALGRIND(-mno-avx -mno-avx2|)"
G_CFLAGS="$BASEFLAGS"
G_CFLAGS="$G_CFLAGS IF_COVERAGE($COVERAGE_FLAGS|IF_DEBUG($NOOPT_FLAGS|$OPT_FLAGS))"
G_CFLAGS="$G_CFLAGS IF_DEBUG(|$PROFOPT_FLAGS)"
G_CFLAGS="$G_CFLAGS $CP_CFLAGS"
Expand Down Expand Up @@ -150,7 +149,7 @@ gen_arch_file() {
local __filename=$1
shift
local __flags=$@
local __full_flag_list="MPI DEBUG CUDA WARNALL VALGRIND COVERAGE"
local __full_flag_list="MPI DEBUG CUDA WARNALL COVERAGE"
local __flag=''
for __flag in $__full_flag_list; do
eval "local __${__flag}=off"
Expand Down Expand Up @@ -218,14 +217,6 @@ if [ "$ENABLE_CUDA" = __TRUE__ ]; then
fi
fi

# valgrind enabled arch files
if [ "$ENABLE_VALGRIND" = __TRUE__ ]; then
gen_arch_file "local_valgrind.ssmp" VALGRIND
if [ "$MPI_MODE" != no ]; then
gen_arch_file "local_valgrind.psmp" VALGRIND MPI
fi
fi

cd "${ROOTDIR}"

# -------------------------
Expand All @@ -245,7 +236,6 @@ To build CP2K you should change directory:
make -j $(get_nprocs) ARCH=local VERSION="${arch_vers}"
arch files for GPU enabled CUDA versions are named "local_cuda.*"
arch files for valgrind versions are named "local_valgrind.*"
arch files for coverage versions are named "local_coverage.*"
Note that these pre-built arch files are for the GNU compiler, users have to adapt them for other compilers.
Expand Down
1 change: 0 additions & 1 deletion tools/toolchain/scripts/stage1/install_stage1.sh
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,5 @@
./scripts/stage1/install_mpich.sh
./scripts/stage1/install_openmpi.sh
./scripts/stage1/install_intelmpi.sh
./scripts/stage1/install_valgrind.sh

#EOF
107 changes: 0 additions & 107 deletions tools/toolchain/scripts/stage1/install_valgrind.sh

This file was deleted.

12 changes: 3 additions & 9 deletions tools/toolchain/scripts/stage2/install_mathlibs.sh
Original file line number Diff line number Diff line change
Expand Up @@ -58,15 +58,9 @@ if [ "$with_reflapack" = "__DONTUSE__" ]; then
export REF_MATH_LIBS="${FAST_MATH_LIBS}"
fi

if [ $ENABLE_VALGRIND = "__TRUE__" ]; then
export MATH_CFLAGS="${REF_MATH_CFLAGS}"
export MATH_LDFLAGS="${REF_MATH_LDFLAGS}"
export MATH_LIBS="${REF_MATH_LIBS}"
else
export MATH_CFLAGS="${FAST_MATH_CFLAGS}"
export MATH_LDFLAGS="${FAST_MATH_LDFLAGS}"
export MATH_LIBS="${FAST_MATH_LIBS}"
fi
export MATH_CFLAGS="${FAST_MATH_CFLAGS}"
export MATH_LDFLAGS="${FAST_MATH_LDFLAGS}"
export MATH_LIBS="${FAST_MATH_LIBS}"

export CP_CFLAGS="${CP_CFLAGS} IF_DEBUG(${REF_MATH_CFLAGS}|IF_VALGRIND(${REF_MATH_CFLAGS}|${FAST_MATH_CFLAGS}))"
export CP_LDFLAGS="${CP_LDFLAGS} IF_DEBUG(${REF_MATH_LDFLAGS}|IF_VALGRIND(${REF_MATH_LDFLAGS}|${FAST_MATH_LDFLAGS}))"
Expand Down

0 comments on commit 849fc25

Please sign in to comment.