Skip to content

Commit

Permalink
skip lammps when checking memory leak
Browse files Browse the repository at this point in the history
Signed-off-by: Jinzhe Zeng <[email protected]>
  • Loading branch information
njzjz committed Feb 3, 2024
1 parent 0f52b35 commit 4f16406
Showing 1 changed file with 7 additions and 2 deletions.
9 changes: 7 additions & 2 deletions .github/workflows/test_cc.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,9 @@ jobs:
testcc:
name: Test C++
runs-on: ubuntu-latest
strategy:
matrix:
check_memleak: [true, false]
steps:
- uses: actions/checkout@v4
- uses: actions/setup-python@v5
Expand All @@ -31,7 +34,7 @@ jobs:
TF_INTER_OP_PARALLELISM_THREADS: 1
LMP_CXX11_ABI_0: 1
CMAKE_GENERATOR: Ninja
CXXFLAGS: "-fsanitize=leak"
CXXFLAGS: ${{ matrix.check_memleak && "-fsanitize=leak" || "" }}
# test lammps
# ASE issue: https://gitlab.com/ase/ase/-/merge_requests/2843
# TODO: remove ase version when ase has new release
Expand All @@ -40,14 +43,15 @@ jobs:
python -m pip install -e .[cpu,test,lmp] "ase @ https://gitlab.com/ase/ase/-/archive/8c5aa5fd6448c5cfb517a014dccf2b214a9dfa8f/ase-8c5aa5fd6448c5cfb517a014dccf2b214a9dfa8f.tar.gz"
env:
DP_BUILD_TESTING: 1
if: ${{ !matrix.check_memleak }}
- run: pytest --cov=deepmd source/lmp/tests
env:
OMP_NUM_THREADS: 1
TF_INTRA_OP_PARALLELISM_THREADS: 1
TF_INTER_OP_PARALLELISM_THREADS: 1
LAMMPS_PLUGIN_PATH: ${{ github.workspace }}/dp_test/lib/deepmd_lmp
LD_LIBRARY_PATH: ${{ github.workspace }}/dp_test/lib
LD_PRELOAD: /lib/x86_64-linux-gnu/liblsan.so.0
if: ${{ !matrix.check_memleak }}
# test ipi
- run: pytest --cov=deepmd source/ipi/tests
env:
Expand All @@ -56,6 +60,7 @@ jobs:
TF_INTER_OP_PARALLELISM_THREADS: 1
PATH: ${{ github.workspace }}/dp_test/bin:$PATH
LD_LIBRARY_PATH: ${{ github.workspace }}/dp_test/lib
if: ${{ !matrix.check_memleak }}
- uses: codecov/codecov-action@v3
with:
gcov: true
Expand Down

0 comments on commit 4f16406

Please sign in to comment.