diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 38fbabaa..5294d45f 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -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() @@ -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() diff --git a/.github/workflows/container.yml b/.github/workflows/container.yml index f06fa38f..16415300 100644 --- a/.github/workflows/container.yml +++ b/.github/workflows/container.yml @@ -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/checkout@v4.1.5 - with: - fetch-depth: 0 - - # - uses: hadolint/hadolint-action@v3.1.0 - # 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/checkout@v4.1.5 - - - 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/checkout@v4.1.5 - 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/checkout@v4.1.5 + # with: + # fetch-depth: 0 + + # # - uses: hadolint/hadolint-action@v3.1.0 + # # 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/checkout@v4.1.5 + + # - 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/checkout@v4.1.5 + # 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 diff --git a/.github/workflows/documentation-ci.yml b/.github/workflows/documentation-ci.yml index 2f270f59..581bc5a4 100644 --- a/.github/workflows/documentation-ci.yml +++ b/.github/workflows/documentation-ci.yml @@ -26,49 +26,49 @@ jobs: - name: Check out repo uses: actions/checkout@v4.1.5 - - 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' diff --git a/multilevelSolver/PyNucleus_multilevelSolver/multigrid_{SCALAR}.pxi b/multilevelSolver/PyNucleus_multilevelSolver/multigrid_{SCALAR}.pxi index 9fa76948..b8ccf628 100644 --- a/multilevelSolver/PyNucleus_multilevelSolver/multigrid_{SCALAR}.pxi +++ b/multilevelSolver/PyNucleus_multilevelSolver/multigrid_{SCALAR}.pxi @@ -242,6 +242,8 @@ cdef class {SCALAR_label}multigrid({SCALAR_label_lc_}iterative_solver): str label = str(lvlNo) FakeTimer Timer = self.PLogger.Timer(label, manualDataEntry=True) {SCALAR_label}levelMemory lvl, lvlCoarse + print('RHS on ', lvlNo, 'rank', self.overlap.comm.rank, np.linalg.norm(np.asarray(b))) + print('X pre on ', lvlNo, 'rank', self.overlap.comm.rank, np.linalg.norm(np.asarray(x))) if lvlNo == 0: Timer.start() if isinstance(self.coarse_solver, {SCALAR_label_lc_}iterative_solver): @@ -289,6 +291,7 @@ cdef class {SCALAR_label}multigrid({SCALAR_label_lc_}iterative_solver): lvl.smoother.eval(b, x, postsmoother=True) Timer.end() Timer.enterData() + print('X post on ', lvlNo, 'rank', self.overlap.comm.rank, np.linalg.norm(np.asarray(x))) def asPreconditioner(self, INDEX_t maxIter=1, CycleType cycle=V): return {SCALAR_label}multigridPreconditioner(self, cycle, maxIter)