Skip to content

Commit

Permalink
debug
Browse files Browse the repository at this point in the history
  • Loading branch information
cgcgcg committed Jul 16, 2024
1 parent 3418783 commit 29f1252
Show file tree
Hide file tree
Showing 6 changed files with 171 additions and 174 deletions.
4 changes: 2 additions & 2 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -107,7 +107,7 @@ jobs:

- name: Run tests
if: always()
run: python3 -m pytest --junit-xml=test-results-${{ env.BUILD_IDENTIFIER }}.xml tests/
run: python3 -m pytest --junit-xml=test-results-${{ env.BUILD_IDENTIFIER }}.xml -k "testParallelGMG[4-interval-P3-false]" tests/

- name: Run flake8
if: always()
Expand Down Expand Up @@ -221,7 +221,7 @@ jobs:

- name: Run tests
if: always()
run: python3 -m pytest --junit-xml=test-results-${{ runner.os }}-${{ matrix.py-version }}.xml tests/
run: python3 -m pytest --junit-xml=test-results-${{ runner.os }}-${{ matrix.py-version }}.xml -k "testParallelGMG[4-interval-P3-false]" tests/

- name: Run flake8
if: always()
Expand Down
222 changes: 111 additions & 111 deletions .github/workflows/container.yml
Original file line number Diff line number Diff line change
Expand Up @@ -32,114 +32,114 @@ jobs:
echo "IMAGE_TAGS=pr-${{ github.event.number }}" >> $GITHUB_ENV
echo "TEST_IMAGE_TAG=pr-${{ github.event.number }}" >> $GITHUB_ENV
- name: Check out
if: always()
uses: actions/[email protected]
with:
fetch-depth: 0

# - uses: hadolint/[email protected]
# with:
# dockerfile: Dockerfile
# ignore: 'DL3008,DL3013'
# verbose: true

- name: Build Image
id: build_image
uses: redhat-actions/buildah-build@v2
with:
image: ${{ env.IMAGE_NAME }}
tags: ${{ env.IMAGE_TAGS }}
containerfiles: |
./Dockerfile
build-args: |
PYNUCLEUS_BUILD_PARALLELISM=4
- name: Push To GHCR
if: (github.event_name == 'pull_request') && (github.actor != 'dependabot[bot]')
uses: redhat-actions/push-to-registry@v2
id: push-pr
with:
image: ${{ steps.build_image.outputs.image }}
tags: ${{ env.IMAGE_TAGS }}
registry: ${{ env.IMAGE_REGISTRY }}
username: ${{ env.REGISTRY_USER }}
password: ${{ env.REGISTRY_PASSWORD }}
extra-args: |
--disable-content-trust
- name: Run tests
run: |
podman run \
-e MPIEXEC_FLAGS="--allow-run-as-root --oversubscribe" \
--workdir /pynucleus \
--rm \
--entrypoint='["python3", "-m", "pytest", "--junit-xml", "test-results.xml"]' \
${{ steps.build_image.outputs.image }}:${{ env.TEST_IMAGE_TAG }}
- name: Push To GHCR
if: github.event_name == 'push'
uses: redhat-actions/push-to-registry@v2
id: push
with:
image: ${{ steps.build_image.outputs.image }}
tags: ${{ steps.build_image.outputs.tags }}
registry: ${{ env.IMAGE_REGISTRY }}
username: ${{ env.REGISTRY_USER }}
password: ${{ env.REGISTRY_PASSWORD }}
extra-args: |
--disable-content-trust
- name: Echo outputs
if: github.event_name == 'push'
run: |
echo "${{ toJSON(steps.push.outputs) }}"
container-test:
needs: container

strategy:
matrix:
include:
- runner: 'ubuntu-latest'

name: Container test ${{ matrix.runner }}
runs-on: ${{ matrix.runner }}

steps:
- name: Check out
uses: actions/[email protected]

- name: Install podman-compose
run: pip install podman-compose

- name: Run container test
run: podman-compose run quick-test

update-binder-image:
needs: container
if: github.event_name == 'push'

runs-on: ubuntu-latest

steps:
- name: Checkout binder branch
uses: actions/[email protected]
with:
ref: binder

- name: Modify Dockerfile
run: |
python generateDockerfile.py ${{ env.IMAGE_REGISTRY }}/${{ env.IMAGE_NAME }}:${{ env.TEST_IMAGE_TAG }}
- name: Create PR
uses: peter-evans/create-pull-request@v6
with:
token: ${{ secrets.GITHUB_TOKEN }}
commit-message: "Update Dockerfile"
title: "Update Dockerfile"
body: |
This PR updates the Dockerfile for binder.
branch: binder-update
base: binder
delete-branch: true
# - name: Check out
# if: always()
# uses: actions/[email protected]
# with:
# fetch-depth: 0

# # - uses: hadolint/[email protected]
# # with:
# # dockerfile: Dockerfile
# # ignore: 'DL3008,DL3013'
# # verbose: true

# - name: Build Image
# id: build_image
# uses: redhat-actions/buildah-build@v2
# with:
# image: ${{ env.IMAGE_NAME }}
# tags: ${{ env.IMAGE_TAGS }}
# containerfiles: |
# ./Dockerfile
# build-args: |
# PYNUCLEUS_BUILD_PARALLELISM=4

# - name: Push To GHCR
# if: (github.event_name == 'pull_request') && (github.actor != 'dependabot[bot]')
# uses: redhat-actions/push-to-registry@v2
# id: push-pr
# with:
# image: ${{ steps.build_image.outputs.image }}
# tags: ${{ env.IMAGE_TAGS }}
# registry: ${{ env.IMAGE_REGISTRY }}
# username: ${{ env.REGISTRY_USER }}
# password: ${{ env.REGISTRY_PASSWORD }}
# extra-args: |
# --disable-content-trust

# - name: Run tests
# run: |
# podman run \
# -e MPIEXEC_FLAGS="--allow-run-as-root --oversubscribe" \
# --workdir /pynucleus \
# --rm \
# --entrypoint='["python3", "-m", "pytest", "--junit-xml", "test-results.xml"]' \
# ${{ steps.build_image.outputs.image }}:${{ env.TEST_IMAGE_TAG }}

# - name: Push To GHCR
# if: github.event_name == 'push'
# uses: redhat-actions/push-to-registry@v2
# id: push
# with:
# image: ${{ steps.build_image.outputs.image }}
# tags: ${{ steps.build_image.outputs.tags }}
# registry: ${{ env.IMAGE_REGISTRY }}
# username: ${{ env.REGISTRY_USER }}
# password: ${{ env.REGISTRY_PASSWORD }}
# extra-args: |
# --disable-content-trust

# - name: Echo outputs
# if: github.event_name == 'push'
# run: |
# echo "${{ toJSON(steps.push.outputs) }}"

# container-test:
# needs: container

# strategy:
# matrix:
# include:
# - runner: 'ubuntu-latest'

# name: Container test ${{ matrix.runner }}
# runs-on: ${{ matrix.runner }}

# steps:
# - name: Check out
# uses: actions/[email protected]

# - name: Install podman-compose
# run: pip install podman-compose

# - name: Run container test
# run: podman-compose run quick-test

# update-binder-image:
# needs: container
# if: github.event_name == 'push'

# runs-on: ubuntu-latest

# steps:
# - name: Checkout binder branch
# uses: actions/[email protected]
# with:
# ref: binder

# - name: Modify Dockerfile
# run: |
# python generateDockerfile.py ${{ env.IMAGE_REGISTRY }}/${{ env.IMAGE_NAME }}:${{ env.TEST_IMAGE_TAG }}

# - name: Create PR
# uses: peter-evans/create-pull-request@v6
# with:
# token: ${{ secrets.GITHUB_TOKEN }}
# commit-message: "Update Dockerfile"
# title: "Update Dockerfile"
# body: |
# This PR updates the Dockerfile for binder.
# branch: binder-update
# base: binder
# delete-branch: true
76 changes: 38 additions & 38 deletions .github/workflows/documentation-ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -26,49 +26,49 @@ jobs:
- name: Check out repo
uses: actions/[email protected]

- name: Pull ccache cache
id: ccache-restore
uses: actions/cache/restore@v4
with:
path: /home/runner/.cache/ccache
key: ccache-documentation-ci
# - name: Pull ccache cache
# id: ccache-restore
# uses: actions/cache/restore@v4
# with:
# path: /home/runner/.cache/ccache
# key: ccache-documentation-ci

- uses: actions/setup-python@v5
with:
python-version: '3.11'
# - uses: actions/setup-python@v5
# with:
# python-version: '3.11'

- name: Install Ubuntu packages
run: |
sudo apt-get update
sudo apt-get install mpi-default-bin mpi-default-dev libmetis-dev libparmetis-dev libsuitesparse-dev ccache
# - name: Install Ubuntu packages
# run: |
# sudo apt-get update
# sudo apt-get install mpi-default-bin mpi-default-dev libmetis-dev libparmetis-dev libsuitesparse-dev ccache

- name: Install Python dependencies
run: make prereq && make prereq-extra
# - name: Install Python dependencies
# run: make prereq && make prereq-extra

- name: Install
run: make dev
# - name: Install
# run: make dev

- name: Remove ccache cache
if: ${{ steps.ccache-restore.outputs.cache-hit }}
shell: bash
env:
GH_TOKEN: ${{ github.token }}
run: |
gh extension install actions/gh-actions-cache
gh actions-cache delete ccache --confirm
continue-on-error: true
# - name: Remove ccache cache
# if: ${{ steps.ccache-restore.outputs.cache-hit }}
# shell: bash
# env:
# GH_TOKEN: ${{ github.token }}
# run: |
# gh extension install actions/gh-actions-cache
# gh actions-cache delete ccache --confirm
# continue-on-error: true

- name: Push ccache cache
uses: actions/cache/save@v4
with:
path: /home/runner/.cache/ccache
key: ccache-documentation-ci
# - name: Push ccache cache
# uses: actions/cache/save@v4
# with:
# path: /home/runner/.cache/ccache
# key: ccache-documentation-ci

- name: Build documentation
run: |
make docs
# - name: Build documentation
# run: |
# make docs

- name: Upload artifact
uses: actions/upload-artifact@v4
with:
path: 'docs/build'
# - name: Upload artifact
# uses: actions/upload-artifact@v4
# with:
# path: 'docs/build'
5 changes: 4 additions & 1 deletion fem/PyNucleus_fem/algebraicOverlaps.pyx
Original file line number Diff line number Diff line change
Expand Up @@ -86,6 +86,7 @@ cdef class algebraicOverlap:
INDEX_t[::1] shared_dofs = self.shared_dofs
for j in range(self.num_shared_dofs):
self.myExchangeOut[j] = vec[shared_dofs[j]]
assert np.all(np.isfinite(self.exchangeOut))
self.tagNoSend += 1
return self.comm.Isend(self.myExchangeOut,
dest=self.otherSubdomainNo,
Expand All @@ -108,6 +109,7 @@ cdef class algebraicOverlap:
INDEX_t[::1] shared_dofs = self.shared_dofs
for j in range(self.num_shared_dofs):
vec[shared_dofs[j]] += self.myExchangeIn[j]
assert np.all(np.isfinite(self.exchangeIn))

cdef MPI.Request sendComplex(self,
const COMPLEX_t[::1] vec,
Expand Down Expand Up @@ -553,7 +555,7 @@ cdef class algebraicOverlapManager:
shared_dofs = set()
for otherSubdomain in self.overlaps:
shared_dofs |= set(list(np.array(self.overlaps[otherSubdomain].shared_dofs)))
return np.array(list(shared_dofs), dtype=INDEX)
return np.array(sorted(shared_dofs), dtype=INDEX)

def prepareDistribute(self):
cdef:
Expand Down Expand Up @@ -1082,6 +1084,7 @@ cdef class algebraicOverlapManager:
algebraicOverlapOneSidedPutLockAll ov1SPLA
MPI.Request.Waitall(requestsSend)
del requestsSend[:]
assert np.all(np.isfinite(vec))
requestsOneSidedGet = []
requestsOneSidedPut = []
requestsOneSidedPutLockAll = []
Expand Down
Loading

0 comments on commit 29f1252

Please sign in to comment.