Skip to content

Commit

Permalink
copy paddle so instead of set LD_LIBRARY_PATH
Browse files Browse the repository at this point in the history
  • Loading branch information
HydrogenSulfate committed Jan 9, 2025
1 parent 8940bd9 commit 4bc5db3
Showing 1 changed file with 12 additions and 4 deletions.
16 changes: 12 additions & 4 deletions .github/workflows/test_cc.yml
Original file line number Diff line number Diff line change
Expand Up @@ -56,22 +56,30 @@ jobs:
CXXFLAGS: ${{ matrix.check_memleak && '-fsanitize=leak' || '' }}
LSAN_OPTIONS: suppressions=${{ github.workspace }}/.github/workflows/suppr.txt
# test lammps
- run: pytest --cov=deepmd source/lmp/tests
- run: |
cp ${{ github.workspace }}/source/build_tests/paddle_inference_install_dir/paddle/lib/*.so ${{ github.workspace }}/dp_test/lib/
cp ${{ github.workspace }}/source/build_tests/paddle_inference_install_dir/third_party/install/onednn/lib/* ${{ github.workspace }}/dp_test/lib/
cp ${{ github.workspace }}/source/build_tests/paddle_inference_install_dir/third_party/install/mklml/lib/* ${{ github.workspace }}/dp_test/lib/
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:${{ github.workspace }}/libtorch/lib:${{ github.workspace }}/source/build_tests/paddle_inference_install_dir/paddle/lib:${{ github.workspace }}/source/build_tests/paddle_inference_install_dir/third_party/install/onednn/lib:${{ github.workspace }}/source/build_tests/paddle_inference_install_dir/third_party/install/mklml/lib:${LD_LIBRARY_PATH}
LD_LIBRARY_PATH: ${{ github.workspace }}/dp_test/lib:${{ github.workspace }}/libtorch/lib
if: ${{ !matrix.check_memleak }}
# test ipi
- run: pytest --cov=deepmd source/ipi/tests
- run: |
cp ${{ github.workspace }}/source/build_tests/paddle_inference_install_dir/paddle/lib/*.so ${{ github.workspace }}/dp_test/lib/
cp ${{ github.workspace }}/source/build_tests/paddle_inference_install_dir/third_party/install/onednn/lib/* ${{ github.workspace }}/dp_test/lib/
cp ${{ github.workspace }}/source/build_tests/paddle_inference_install_dir/third_party/install/mklml/lib/* ${{ github.workspace }}/dp_test/lib/
pytest --cov=deepmd source/ipi/tests
env:
OMP_NUM_THREADS: 1
TF_INTRA_OP_PARALLELISM_THREADS: 1
TF_INTER_OP_PARALLELISM_THREADS: 1
PATH: ${{ github.workspace }}/dp_test/bin:$PATH
LD_LIBRARY_PATH: ${{ github.workspace }}/dp_test/lib:${{ github.workspace }}/libtorch/lib:${{ github.workspace }}/source/build_tests/paddle_inference_install_dir/paddle/lib:${{ github.workspace }}/source/build_tests/paddle_inference_install_dir/third_party/install/onednn/lib:${{ github.workspace }}/source/build_tests/paddle_inference_install_dir/third_party/install/mklml/lib:${LD_LIBRARY_PATH}
LD_LIBRARY_PATH: ${{ github.workspace }}/dp_test/lib:${{ github.workspace }}/libtorch/lib
if: ${{ !matrix.check_memleak }}
- uses: codecov/codecov-action@v5
env:
Expand Down

0 comments on commit 4bc5db3

Please sign in to comment.