From fecdae40061948ed018463bb53d75c8c70dfbfb9 Mon Sep 17 00:00:00 2001 From: Jonathan Vandermause Date: Sat, 14 Sep 2024 19:01:55 -0400 Subject: [PATCH] try putting lammps tests back in --- .github/workflows/flare.yml | 142 ++++++++++++++++++------------------ 1 file changed, 73 insertions(+), 69 deletions(-) diff --git a/.github/workflows/flare.yml b/.github/workflows/flare.yml index 43fc93acd..36e7785d1 100644 --- a/.github/workflows/flare.yml +++ b/.github/workflows/flare.yml @@ -60,8 +60,6 @@ jobs: cmake .. cmake --build . -j4 cp _C_flare* ../flare/bffs/sgp - ls - ls ../flare/bffs/sgp cd ctests ./tests @@ -75,73 +73,79 @@ jobs: cd tests pytest - # - name: Install LAMMPS - # run: | - # git clone --depth 1 https://github.com/lammps/lammps.git lammps - - # cd lammps/src - # cp pair_hybrid.* pair_lj_cut.* .. - # rm pair_*.cpp pair_*.h - # mv ../pair_hybrid.* ../pair_lj_cut.* . - # cp MANYBODY/pair_tersoff.* . - # rm MANYBODY/pair_*.* - # rm MANYBODY/fix_*.* - # mv pair_tersoff.* MANYBODY/ - # cp KOKKOS/pair_kokkos.* . - # rm KOKKOS/pair_*.* - # mv pair_kokkos.* KOKKOS/ - # cd ../.. - - # cd lammps_plugins - # ./install.sh $(pwd)/../lammps - # cd .. - # sudo cp -r ${BUILD_DIR}/External/Eigen3/Eigen /usr/include - # cd lammps - # mkdir build - # cd build - # cmake ../cmake -DPKG_KOKKOS=ON -DKokkos_ENABLE_OPENMP=ON -DPKG_MANYBODY=ON - # make -j4 - - # - name: Patch ASE - # run: | - # ase_file="$(dirname $(python3 -c 'import ase; print(ase.__file__)'))/calculators/lammpsrun.py" - # sed -i 's/line.startswith(_custom_thermo_mark)/line.strip\(\).startswith\("Step"\)/g' $ase_file - - # - name: Run LAMMPS tests with Kokkos - # run: | - # export lmp="$(pwd)/lammps/build/lmp -k on t 4 -sf kk -pk kokkos newton on neigh full" - # cd tests - # pytest test_lammps.py - - # - name: Install Sphinx and Breathe - # run: | - # sudo apt-get update - # sudo apt-get install python3-sphinx python3-sphinx-rtd-theme python3-breathe python3-nbsphinx - - # - name: Run Doxygen - # uses: mattnotmitt/doxygen-action@v1.1.0 - # with: - # # Path to Doxyfile - # doxyfile-path: "./Doxyfile" # default is ./Doxyfile - # # Working directory - # working-directory: "./docs" # default is . - - # - name: Run Sphinx - # run: | - # export PYTHONPATH=$PYTHONPATH:$PWD/lammps/python - # cd docs - # pwd - # ls - # make html - - # - name: Publish the docs - # uses: peaceiris/actions-gh-pages@v3 - # with: - # github_token: ${{ secrets.GITHUB_TOKEN }} - # # Default Doxyfile build documentation to html directory. - # # Change the directory if changes in Doxyfile - # publish_dir: ./docs/build/html - # if: github.event_name == 'pull_request' && matrix.lapack == 'on' && matrix.omp == 'on' + - name: Install LAMMPS + run: | + git clone --depth 1 https://github.com/lammps/lammps.git lammps + + cd lammps/src + cp pair_hybrid.* pair_lj_cut.* .. + rm pair_*.cpp pair_*.h + mv ../pair_hybrid.* ../pair_lj_cut.* . + cp MANYBODY/pair_tersoff.* . + rm MANYBODY/pair_*.* + rm MANYBODY/fix_*.* + mv pair_tersoff.* MANYBODY/ + cp KOKKOS/pair_kokkos.* . + rm KOKKOS/pair_*.* + mv pair_kokkos.* KOKKOS/ + cd ../.. + + cd lammps_plugins + ./install.sh $(pwd)/../lammps + cd .. + sudo cp -r ${BUILD_DIR}/External/Eigen3/Eigen /usr/include + cd lammps + mkdir build + cd build + cmake ../cmake -DPKG_KOKKOS=ON -DKokkos_ENABLE_OPENMP=ON -DPKG_MANYBODY=ON + make -j4 + + - name: Patch ASE + run: | + ase_file="$(dirname $(python3 -c 'import ase; print(ase.__file__)'))/calculators/lammpsrun.py" + sed -i 's/line.startswith(_custom_thermo_mark)/line.strip\(\).startswith\("Step"\)/g' $ase_file + + - name: Run LAMMPS tests + run: | + export lmp=$(pwd)/lammps/build/lmp + cd tests + pytest test_lammps.py + + - name: Run LAMMPS tests with Kokkos + run: | + export lmp="$(pwd)/lammps/build/lmp -k on t 4 -sf kk -pk kokkos newton on neigh full" + cd tests + pytest test_lammps.py + + - name: Install Sphinx and Breathe + run: | + sudo apt-get update + sudo apt-get install python3-sphinx python3-sphinx-rtd-theme python3-breathe python3-nbsphinx + + - name: Run Doxygen + uses: mattnotmitt/doxygen-action@v1.1.0 + with: + # Path to Doxyfile + doxyfile-path: "./Doxyfile" # default is ./Doxyfile + # Working directory + working-directory: "./docs" # default is . + + - name: Run Sphinx + run: | + export PYTHONPATH=$PYTHONPATH:$PWD/lammps/python + cd docs + pwd + ls + make html + + - name: Publish the docs + uses: peaceiris/actions-gh-pages@v3 + with: + github_token: ${{ secrets.GITHUB_TOKEN }} + # Default Doxyfile build documentation to html directory. + # Change the directory if changes in Doxyfile + publish_dir: ./docs/build/html + if: github.event_name == 'pull_request' && matrix.lapack == 'on' && matrix.omp == 'on' # - name: Run tutorial # run: |