From 089d4deb400da65017db6e23f68bfbf83dd0be3a Mon Sep 17 00:00:00 2001 From: Christian Glusa Date: Sat, 28 Oct 2023 19:14:41 -0600 Subject: [PATCH] attempt to fix Mac build --- .github/workflows/build.yml | 8 ++++---- .github/workflows/mac.yml | 14 ++++++++++---- nl/PyNucleus_nl/nonlocalAssembly.pyx | 1 + nl/PyNucleus_nl/nonlocalAssembly_{SCALAR}.pxi | 5 +++++ 4 files changed, 20 insertions(+), 8 deletions(-) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 21a2c23..f4cff64 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -1,10 +1,10 @@ name: CI on: - push: - branches: [ "master" ] - pull_request: - branches: [ "master" ] + # push: + # branches: [ "master" ] + # pull_request: + # branches: [ "master" ] workflow_dispatch: jobs: diff --git a/.github/workflows/mac.yml b/.github/workflows/mac.yml index 4882e44..26cc0ac 100644 --- a/.github/workflows/mac.yml +++ b/.github/workflows/mac.yml @@ -2,6 +2,8 @@ name: CI MacOS on: + pull_request: + branches: [ "master" ] workflow_dispatch: jobs: @@ -33,7 +35,7 @@ jobs: id: ccache-restore uses: actions/cache/restore@v3 with: - path: /home/runner/.cache/ccache + path: /Users/runner/Library/Caches/ccache key: ccache-mac-${{ matrix.py-version }} - name: Setup GNU Fortran @@ -73,7 +75,7 @@ jobs: if: always() uses: actions/cache/save@v3 with: - path: /home/runner/.cache/ccache + path: /Users/runner/Library/Caches/ccache key: ccache-mac-${{ matrix.py-version }} - name: Ccache report @@ -82,11 +84,15 @@ jobs: - name: Run tests if: always() - run: drivers/runFractional.py --hdf5Output=data.hdf5 --skipPlots --saveOperators + run: | + drivers/runFractional.py --hdf5Output=dense.hdf5 --skipPlots --saveOperators --matrixFormat=dense + drivers/runFractional.py --hdf5Output=h2.hdf5 --skipPlots --saveOperators - name: Archive test results uses: actions/upload-artifact@v3 if: always() with: name: Test results - path: data.hdf5 + path: | + dense.hdf5 + h2.hdf5 diff --git a/nl/PyNucleus_nl/nonlocalAssembly.pyx b/nl/PyNucleus_nl/nonlocalAssembly.pyx index bac5a6c..a1886c3 100644 --- a/nl/PyNucleus_nl/nonlocalAssembly.pyx +++ b/nl/PyNucleus_nl/nonlocalAssembly.pyx @@ -506,6 +506,7 @@ cdef INDEX_t[:, ::1] boundaryVertices(INDEX_t[:, ::1] cells, indexSet cellIds): while it.step(): i = it.i c0, c1 = cells[i, 0], cells[i, 1] + print(i, c0, c1) try: bvertices.remove(c0) except KeyError: diff --git a/nl/PyNucleus_nl/nonlocalAssembly_{SCALAR}.pxi b/nl/PyNucleus_nl/nonlocalAssembly_{SCALAR}.pxi index a26b714..e990688 100644 --- a/nl/PyNucleus_nl/nonlocalAssembly_{SCALAR}.pxi +++ b/nl/PyNucleus_nl/nonlocalAssembly_{SCALAR}.pxi @@ -1813,6 +1813,10 @@ cdef class {SCALAR_label}nonlocalBuilder: # surface of the union of clusters n1 and n2 if self.mesh.dim == 1: surface_cells = boundaryVertices(cells, cluster.cellsUnion) + print() + print(cluster.n1.id, cluster.n2.id, cluster.cellsUnion.toSet()) + print(np.array(surface_cells)) + # assert surface_cells.shape[0] == 2 elif self.mesh.dim == 2: surface_cells = boundaryEdges(cells, cluster.cellsUnion) else: @@ -1832,6 +1836,7 @@ cdef class {SCALAR_label}nonlocalBuilder: self.local_matrix_zeroExterior.setCell2(cellNo2) panel = self.local_matrix_zeroExterior.getPanelType() self.local_matrix_zeroExterior.eval(contribZeroExterior, panel, mask) + # print(cellNo1, cellNo2, panel, np.array(contribZeroExterior)) if self.local_matrix_zeroExterior.symmetricLocalMatrix: iM.addToMatrixElemSymMasked(contribZeroExterior, 1., mask) else: