Skip to content

Commit

Permalink
Merge branch 'main' of https://github.com/shac170/MCDC
Browse files Browse the repository at this point in the history
  • Loading branch information
shac170 committed Jan 30, 2024
2 parents a9ed5b5 + 4b63eeb commit c0671bc
Show file tree
Hide file tree
Showing 94 changed files with 5,062 additions and 634 deletions.
23 changes: 23 additions & 0 deletions .github/workflows/draft-pdf.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
on: [push]

jobs:
paper:
runs-on: ubuntu-latest
name: Paper Draft
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Build draft PDF
uses: openjournals/openjournals-draft-action@master
with:
journal: joss
# This should be the path to the paper within your repo.
paper-path: docs/paper.md
- name: Upload
uses: actions/upload-artifact@v1
with:
name: paper
# This is the output path where Pandoc will write the compiled
# PDF. Note, this should be the same directory as the input
# paper.md
path: docs/paper.pdf
35 changes: 35 additions & 0 deletions .github/workflows/mpi_numba_reg.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@
name: Regression Test - Numba and MPI (2 threads)

on: [push, pull_request]

jobs:
build:
runs-on: ${{ matrix.os }}
strategy:
fail-fast: false
matrix:
os: ["ubuntu-latest"] #, "macos-latest"
steps:
- uses: actions/checkout@v3
- name: Set up python 3.11
uses: actions/setup-python@v3
with:
python-version: "3.11"
- name: debug
run: |
pwd
ls
- uses: mpi4py/setup-mpi@v1
- name: Install dependencies
run: |
#sudo apt-get install libopenmpi-dev
#pip install numpy numba h5py matplotlib scipy pytest colorama mpi4py ngsolve distinctipy
pip list
pip install -e .
- name: Patch Numba
run : |
bash .github/workflows/patch.sh
- name: Regression Test - Numba and MPI
run: |
cd test/regression
python run.py --mode=numba --mpiexec=2
35 changes: 35 additions & 0 deletions .github/workflows/mpi_numba_regII.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@
name: Regression Test - Numba and MPI (4 threads)

on: [push, pull_request]

jobs:
build:
runs-on: ${{ matrix.os }}
strategy:
fail-fast: false
matrix:
os: ["ubuntu-latest"] #, "macos-latest"
steps:
- uses: actions/checkout@v3
- name: Set up python 3.11
uses: actions/setup-python@v3
with:
python-version: "3.11"
- name: debug
run: |
pwd
ls
- uses: mpi4py/setup-mpi@v1
- name: Install dependencies
run: |
#sudo apt-get install libopenmpi-dev
#pip install numpy numba h5py matplotlib scipy pytest colorama mpi4py ngsolve distinctipy
pip list
pip install -e .
- name: Patch Numba
run : |
bash .github/workflows/patch.sh
- name: Regression Test - Numba and MPI
run: |
cd test/regression
python run.py --mode=numba --mpiexec=2
36 changes: 36 additions & 0 deletions .github/workflows/mpi_reg.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,36 @@
name: Regression Test - MPI

on: [push, pull_request]

jobs:
build:
runs-on: ${{ matrix.os }}
strategy:
fail-fast: false
matrix:
os: ["ubuntu-latest"] #, "macos-latest"
steps:
- uses: actions/checkout@v3
- name: Set up python 3.11
uses: actions/setup-python@v3
with:
python-version: "3.11"
- name: debug
run: |
pwd
ls
- uses: mpi4py/setup-mpi@v1
- name: Install dependencies
run: |
#sudo apt-get install libopenmpi-dev
#pip install numpy numba h5py matplotlib scipy pytest colorama mpi4py ngsolve distinctipy
pip list
pip install -e .
- name: Patch Numba
run : |
bash .github/workflows/patch.sh
- name: Regression Test - MPI
run: |
cd test/regression
python run.py --mpiexec=4
python run.py --mpiexec=2
35 changes: 35 additions & 0 deletions .github/workflows/numba_reg.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@
name: Regression Test - Numba

on: [push, pull_request]

jobs:
build:
runs-on: ${{ matrix.os }}
strategy:
fail-fast: false
matrix:
os: ["ubuntu-latest"]
steps:
- uses: actions/checkout@v3
- name: Set up python 3.11
uses: actions/setup-python@v3
with:
python-version: "3.11"
- name: debug
run: |
pwd
ls
- uses: mpi4py/setup-mpi@v1
- name: Install dependencies
run: |
#sudo apt-get install libopenmpi-dev
#pip install numpy numba h5py matplotlib scipy pytest colorama mpi4py ngsolve distinctipy
pip list
pip install -e .
- name: Patch Numba
run : |
bash .github/workflows/patch.sh
- name: Regression Test - Numba
run: |
cd test/regression
python run.py --mode=numba
45 changes: 45 additions & 0 deletions .github/workflows/python-publish.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,45 @@
# This workflow will upload a Python Package using Twine when a release is created
# For more information see: https://docs.github.com/en/actions/automating-builds-and-tests/building-and-testing-python#publishing-to-package-registries

# This workflow uses actions that are not certified by GitHub.
# They are provided by a third-party and are governed by
# separate terms of service, privacy policy, and support
# documentation.

name: Upload Python Package

on:
release:
types: [published]

permissions:
contents: read

jobs:
deploy:

runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v3
- name: Set up Python 3.11
uses: actions/setup-python@v3
with:
python-version: '3.11'
- uses: mpi4py/setup-mpi@v1
- name: Install dependencies
run: |
python --version
python -m pip install --upgrade pip
pip install .
pip install build
- name: Patch Numba
run : |
bash .github/workflows/patch.sh
- name: Build package
run: python -m build
- name: Publish package
uses: pypa/gh-action-pypi-publish@27b31702a0e7fc50959f5ad993c78deac1bdfc29
with:
user: __token__
password: ${{ secrets.PYPI_API_TOKEN }}
35 changes: 35 additions & 0 deletions .github/workflows/python_reg.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@
name: Regression Test - Python

on: [push, pull_request]

jobs:
build:
runs-on: ${{ matrix.os }}
strategy:
fail-fast: false
matrix:
os: ["ubuntu-latest"]
steps:
- uses: actions/checkout@v3
- name: Set up python 3.11
uses: actions/setup-python@v3
with:
python-version: "3.11"
- name: debug
run: |
pwd
ls
- uses: mpi4py/setup-mpi@v1
- name: Install dependencies
run: |
#sudo apt-get install libopenmpi-dev
#pip install numpy numba h5py matplotlib scipy pytest colorama mpi4py ngsolve distinctipy
pip list
pip install -e .
- name: Patch Numba
run : |
bash .github/workflows/patch.sh
- name: Regression Test - Python
run: |
cd test/regression
python run.py
48 changes: 0 additions & 48 deletions .github/workflows/tests.yml

This file was deleted.

34 changes: 34 additions & 0 deletions .github/workflows/unit_tests.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
name: Unit Test

on: [push, pull_request]

jobs:
build:
runs-on: ${{ matrix.os }}
strategy:
fail-fast: false
matrix:
os: ["ubuntu-latest"]
steps:
- uses: actions/checkout@v3
- name: Set up python 3.11
uses: actions/setup-python@v3
with:
python-version: "3.11"
- name: debug
run: |
pwd
ls
- uses: mpi4py/setup-mpi@v1
- name: Install dependencies
run: |
#sudo apt-get install libopenmpi-dev
pip install numpy numba h5py matplotlib scipy pytest colorama mpi4py ngsolve distinctipy
pip list
pip install -e .
- name: Patch Numba
run : |
bash .github/workflows/patch.sh
- name: Unit Test
run : |
pytest
5 changes: 5 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,10 @@ build
.eggs
mcdc.egg-info

# Material Data
mcdc_xs
MCDC-Xsec

# Python cache
__pycache__
*.pyc
Expand All @@ -12,6 +16,7 @@ __pycache__
# Editor
.spyproject
*.swp
.vscode/

# Output
*output.h5
Expand Down
Loading

0 comments on commit c0671bc

Please sign in to comment.