Skip to content

Commit

Permalink
Centralize jemalloc logic
Browse files Browse the repository at this point in the history
  • Loading branch information
inducer committed Jan 14, 2025
1 parent 63fc0d6 commit 0f09eb2
Showing 1 changed file with 14 additions and 14 deletions.
28 changes: 14 additions & 14 deletions ci-support.sh
Original file line number Diff line number Diff line change
Expand Up @@ -65,6 +65,18 @@ rewrite_pyopencl_test()
}


set_up_jemalloc()
{
CONDA_JEMALLOC="$CONDA_PREFIX/lib/libjemalloc.so.2"
if test "$CONDA_PREFIX" != "" && test -f "$CONDA_JEMALLOC"; then
# echo "*** running with $CONDA_JEMALLOC in LD_PRELOAD"
# CI_SUPPORT_LD_PRELOAD="$CONDA_JEMALLOC"
echo "*** $CONDA_JEMALLOC installed, skipping because of crashes observed in January 2025"
fi
CI_SUPPORT_LD_PRELOAD="$LD_PRELOAD"
}


# {{{ utilities

function tomlsh {
Expand Down Expand Up @@ -484,13 +496,7 @@ test_py_project()
DOCTEST_MODULES_FLAG=""
fi
CONDA_JEMALLOC="$CONDA_PREFIX/lib/libjemalloc.so.2"
if test "$CONDA_PREFIX" != "" && test -f "$CONDA_JEMALLOC"; then
# echo "*** running with $CONDA_JEMALLOC in LD_PRELOAD"
# CI_SUPPORT_LD_PRELOAD="$CONDA_JEMALLOC"
echo "*** $CONDA_JEMALLOC installed, skipping because of crashes observed in January 2025"
fi
CI_SUPPORT_LD_PRELOAD="$LD_PRELOAD"
set_up_jemalloc
# Core dumps? Sure, take them.
ulimit -c unlimited || true
Expand Down Expand Up @@ -584,13 +590,7 @@ run_examples()
cwd=$(dirname "$i")
example_script=$(basename "$i")
CONDA_JEMALLOC="$CONDA_PREFIX/lib/libjemalloc.so.2"
if test "$CONDA_PREFIX" != "" && test -f "$CONDA_JEMALLOC"; then
# echo "*** running with $CONDA_JEMALLOC in LD_PRELOAD"
# CI_SUPPORT_LD_PRELOAD="$CONDA_JEMALLOC"
echo "*** $CONDA_JEMALLOC installed, skipping because of crashes observed in January 2025"
fi
CI_SUPPORT_LD_PRELOAD="$LD_PRELOAD"
set_up_jemalloc
if [[ $example_script == *mpi* ]]; then
# FIXME: This command line is OpenMPI-specific.)
Expand Down

0 comments on commit 0f09eb2

Please sign in to comment.