Skip to content

Commit

Permalink
made ctest_spinone
Browse files Browse the repository at this point in the history
  • Loading branch information
三澤貴宏 authored and 三澤貴宏 committed May 15, 2024
1 parent a783840 commit 59e6ac7
Show file tree
Hide file tree
Showing 4 changed files with 85 additions and 10 deletions.
77 changes: 76 additions & 1 deletion .github/workflows/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -75,4 +75,79 @@ jobs:
- name: ctest
working-directory: ${{runner.workspace}}/build
shell: bash
run: ctest -V
run: ctest -V -E spinone

ctest_spinone:
runs-on: ${{ matrix.os }}

strategy:
matrix:
os: [ubuntu-22.04]
mpisize: [1, 3, 9]
ompsize: [1, 3]
include:
- os: macos-13
mpisize: 1
ompsize: 1
- os: macos-latest
mpisize: 1
ompsize: 1
- os: ubuntu-20.04
mpisize: 1
ompsize: 1
exclude:
- mpisize: 9
ompsize: 3
- mpisize: 3
ompsize: 3
fail-fast: false

env:
MPIRUN: "mpiexec --oversubscribe -np ${{ matrix.mpisize }}"
OMP_NUM_THREADS: ${{ matrix.ompsize }}

steps:
- uses: actions/checkout@v4

- name: apt
if: ${{ runner.os == 'Linux' }}
run: |
sudo apt update
sudo apt install liblapack-dev openmpi-bin libopenmpi-dev libscalapack-openmpi-dev
- name: brew
if: ${{ runner.os == 'macOS' }}
run: |
brew install openmpi scalapack
- name: Setup Python
uses: actions/setup-python@v5
with:
python-version: "3.11"

- name: pip
run: |
python3 -m pip install numpy
- name: make workspace
run: cmake -E make_directory ${{runner.workspace}}/build

- name: cmake
working-directory: ${{runner.workspace}}/build
shell: bash
run: |
if [ ${{ runner.os }} = "macOS" ] ; then
export FC=gfortran-12
fi
cmake -DCMAKE_VERBOSE_MAKEFILE=ON $GITHUB_WORKSPACE
- name: build
working-directory: ${{runner.workspace}}/build
shell: bash
run: cmake --build ./ -j4

- name: ctest
working-directory: ${{runner.workspace}}/build
shell: bash
run: ctest -V -R spinone

4 changes: 2 additions & 2 deletions test/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -262,8 +262,8 @@ add_test(
#three body for spin 1 Heisenberg chain
#
add_test(
NAME lobcg_genspin_chain_threebody
COMMAND ${CMAKE_SOURCE_DIR}/test/lobcg_genspin_chain_threebody.sh ${CMAKE_SOURCE_DIR}
NAME lobcg_spinone_chain_threebody
COMMAND ${CMAKE_SOURCE_DIR}/test/lobcg_spinone_chain_threebody.sh ${CMAKE_SOURCE_DIR}
)


Expand Down
File renamed without changes.
Original file line number Diff line number Diff line change
@@ -1,13 +1,13 @@
#!/bin/sh -e

mkdir -p lobcg_genspin_chain_threebody/
cp $1/test/GenSpinThreeBody.py ./lobcg_genspin_chain_threebody
cd ./lobcg_genspin_chain_threebody
python3 GenSpinThreeBody.py generate
mkdir -p lobcg_spinone_chain_threebody/
cp $1/test/SpinOneThreeBody.py ./lobcg_spinone_chain_threebody
cd ./lobcg_spinone_chain_threebody
python3 SpinOneThreeBody.py generate
../../src/HPhi -sdry stan.in
# ${MPIRUN} ../../src/HPhi -e open_namelist.def
../../src/HPhi -e open_namelist.def
python3 GenSpinThreeBody.py aft
${MPIRUN} ../../src/HPhi -e open_namelist.def
#../../src/HPhi -e open_namelist.def
python3 SpinOneThreeBody.py aft

cat > reference.dat <<EOF
1.000000000000
Expand Down

0 comments on commit 59e6ac7

Please sign in to comment.