diff --git a/.github/workflows/test_cc.yml b/.github/workflows/test_cc.yml index 0c9b2ed487..37061658ab 100644 --- a/.github/workflows/test_cc.yml +++ b/.github/workflows/test_cc.yml @@ -11,18 +11,21 @@ jobs: - uses: actions/setup-python@v4 with: python-version: '3.11' + - name: Setup MPI + uses: mpi4py/setup-mpi@v1 + with: + mpi: mpich - run: python -m pip install tensorflow - run: source/install/test_cc_local.sh env: OMP_NUM_THREADS: 1 TF_INTRA_OP_PARALLELISM_THREADS: 1 TF_INTER_OP_PARALLELISM_THREADS: 1 - tensorflow_root: /usr/local + LMP_CXX11_ABI_0: 1 # test lammps - - run: source/install/build_lammps.sh - run: | python -m pip install -U pip - python -m pip install -e .[cpu,test] + python -m pip install -e .[cpu,test,lmp] env: DP_BUILD_TESTING: 1 - run: pytest --cov=deepmd source/lmp/tests diff --git a/source/lmp/plugin/CMakeLists.txt b/source/lmp/plugin/CMakeLists.txt index b76635e5f7..ce879764ee 100644 --- a/source/lmp/plugin/CMakeLists.txt +++ b/source/lmp/plugin/CMakeLists.txt @@ -64,7 +64,8 @@ if(DEFINED LAMMPS_SOURCE_ROOT OR DEFINED LAMMPS_VERSION) target_link_libraries(${libname} PUBLIC ${LIB_DEEPMD_C}) target_precompile_headers(${libname} PUBLIC [["deepmd.hpp"]]) remove_definitions(-D_GLIBCXX_USE_CXX11_ABI=${OP_CXX_ABI}) - if("$ENV{CIBUILDWHEEL}" STREQUAL "1") + if("$ENV{CIBUILDWHEEL}" STREQUAL "1" OR "$ENV{LMP_CXX11_ABI_0}" STREQUAL + "1") add_definitions(-D_GLIBCXX_USE_CXX11_ABI=0) endif() else()