Skip to content

Commit

Permalink
Merge branch 'master' into gauge_invariant_helicity
Browse files Browse the repository at this point in the history
  • Loading branch information
smiet committed Dec 1, 2024
2 parents fd97ab3 + 962843c commit 2c7ae2b
Show file tree
Hide file tree
Showing 126 changed files with 8,917 additions and 2,827 deletions.
5 changes: 2 additions & 3 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,6 @@ jobs:
fail-fast: false
env:
SPEC_PATH: ${{ github.workspace }}
PYTHONPATH: ${{ github.workspace }}/Utilities/pythontools
OMPI_ALLOW_RUN_AS_ROOT: 1
OMPI_ALLOW_RUN_AS_ROOT_CONFIRM: 1
steps:
Expand All @@ -22,6 +21,8 @@ jobs:
sudo apt-get update
sudo apt-get install gfortran mpi-default-bin mpi-default-dev libhdf5-103 libhdf5-dev libfftw3-bin libfftw3-dev libopenblas0-openmp libopenblas-dev
pip3 install --user numpy f90nml scikit-build scipy h5py matplotlib
cd ${{ github.workspace }}/Utilities/pythontools
pip3 install -v .
- name: compile_xspec
run: |
cd ${SPEC_PATH}
Expand All @@ -33,14 +34,12 @@ jobs:
- name: run_fast_cartesian
run: |
cd ${SPEC_PATH}/ci/G1V03L2Fi
echo ${PYTHONPATH}
export OMP_NUM_THREADS=1
mpiexec -n 2 --allow-run-as-root ${SPEC_PATH}/xspec G1V03L2Fi.001.sp
python3 -m py_spec.ci.test compare.h5 G1V03L2Fi.001.sp.h5
- name: run_fast_cylinder
run: |
cd ${SPEC_PATH}/ci/G2V32L1Fi
echo ${PYTHONPATH}
export OMP_NUM_THREADS=1
mpiexec -n 2 --allow-run-as-root ${SPEC_PATH}/xspec G2V32L1Fi.001.sp
python3 -m py_spec.ci.test compare.h5 G2V32L1Fi.001.sp.h5
Expand Down
5 changes: 2 additions & 3 deletions .github/workflows/build_cmake.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,6 @@ jobs:
fail-fast: false
env:
SPEC_PATH: ${{ github.workspace }}
PYTHONPATH: ${{ github.workspace }}/Utilities/pythontools
OMPI_ALLOW_RUN_AS_ROOT: 1
OMPI_ALLOW_RUN_AS_ROOT_CONFIRM: 1
steps:
Expand All @@ -20,6 +19,8 @@ jobs:
pip3 install --upgrade pip
pip3 install --user ninja cmake scipy
pip3 install --user numpy f90nml scikit-build scipy h5py matplotlib
cd ${{ github.workspace }}/Utilities/pythontools
pip3 install -v .
- name: Build & Test
uses: ashutoshvarma/action-cmake-build@master
with:
Expand All @@ -39,14 +40,12 @@ jobs:
- name: run_fast_cartesian
run: |
cd ${SPEC_PATH}/ci/G1V03L2Fi
echo ${PYTHONPATH}
export OMP_NUM_THREADS=1
mpiexec -n 2 --allow-run-as-root $SPEC_PATH/install/bin/xspec G1V03L2Fi.001.sp
python3 -m py_spec.ci.test compare.h5 G1V03L2Fi.001.sp.h5
- name: run_fast_cylinder
run: |
cd ${SPEC_PATH}/ci/G2V32L1Fi
echo ${PYTHONPATH}
export OMP_NUM_THREADS=1
mpiexec -n 2 --allow-run-as-root $SPEC_PATH/install/bin/xspec G2V32L1Fi.001.sp
python3 -m py_spec.ci.test compare.h5 G2V32L1Fi.001.sp.h5
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/py_spec.yml
Original file line number Diff line number Diff line change
Expand Up @@ -18,8 +18,8 @@ jobs:
- name: Install dependencies
working-directory: ${{ env.PY_SPEC_DIR }}
run: |
pip3 install -r requirements.txt
pip3 install setuptools wheel twine
pip install --upgrade pip
pip3 install setuptools wheel twine
- name: Build py_spec
working-directory: ${{ env.PY_SPEC_DIR }}
Expand Down
17 changes: 8 additions & 9 deletions .github/workflows/python_wrapper.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,26 +6,25 @@ jobs:
name: python_wrapper build

steps:
- uses: actions/checkout@v2
- uses: actions/checkout@v4

# Python3 should be pre-installed on 'ubuntu-latest'
- name: Python version info
run: |
python3 --version
pip3 --version
python --version
pip --version
- name: Install dependencies
run: |
sudo apt-get update
sudo apt-get install gfortran mpi-default-bin mpi-default-dev libhdf5-103 libhdf5-dev libfftw3-bin libfftw3-dev libopenblas0-openmp libopenblas-dev cmake ninja-build
pip3 install --user numpy f90nml scikit-build
pip3 install --user git+https://github.com/zhucaoxiang/f90wrap
sudo apt-get install gfortran mpi-default-bin mpi-default-dev libhdf5-dev libfftw3-bin libfftw3-dev libopenblas-dev cmake ninja-build
pip install numpy f90nml scikit-build scipy meson meson-python
pip install f90wrap
- name: Build python_wrapper
run: |
python3 setup.py bdist_wheel
pip3 install --user dist/*.whl
pip install .
- name: Test if installation is ok
run: |
python3 -c "import spec; print('success')"
python -c "import spec; print('success')"
4 changes: 4 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -57,3 +57,7 @@ _skbuild/
# Temp fortran files
src/mxspech.f90
src/msphdf5.f90

# Apple Mac related
.DS_Store

21 changes: 16 additions & 5 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -49,6 +49,17 @@ else ()
endif ()
endif ()


if(CMAKE_Fortran_COMPILER_ID STREQUAL "Intel")
set(CMAKE_Fortran_FLAGS "${CMAKE_Fortran_FLAGS} -DIFORT")
endif()

if(CMAKE_Fortran_COMPILER_ID STREQUAL "GNU")
if(CMAKE_Fortran_COMPILER_VERSION VERSION_GREATER "10.0")
set(CMAKE_Fortran_FLAGS "${CMAKE_Fortran_FLAGS} -fallow-argument-mismatch")
endif()
endif()

find_program(AWK awk mawk gawk)

# Find LAPACK
Expand All @@ -60,11 +71,11 @@ find_program(AWK awk mawk gawk)
# If Intel MKL is not desired, change BLA_VENDOR variabale during configuration
#set(BLA_VENDOR Intel10_64lp CACHE STRING
# "Define BLAS vendor. Some of the popular options are Intel10_64lp OpenBLAS Apple Generic")
find_package (BLAS REQUIRED)
message(STATUS "BLAS vendor is ${BLA_VENDOR}")
if (NOT ${BLA_VENDOR} MATCHES "^Intel" AND NOT ${BLA_VENDOR} MATCHES "^OpenBLAS")
find_package (LAPACK REQUIRED)
endif()
# find_package (BLAS REQUIRED)
# message(STATUS "BLAS vendor is ${BLA_VENDOR}")
# if (NOT ${BLA_VENDOR} MATCHES "^Intel" AND NOT ${BLA_VENDOR} MATCHES "^OpenBLAS")
find_package (LAPACK REQUIRED)
#endif()

# Find FFTW3.
# Intel oneAPI has FFT3 available as part of MKL. Just linking against MKL gives FFTW functionality.
Expand Down
Loading

0 comments on commit 2c7ae2b

Please sign in to comment.