diff --git a/.github/workflows/gitlab_ci.yml b/.github/workflows/gitlab_ci.yml index bc98ee442f..4b319c4bfb 100644 --- a/.github/workflows/gitlab_ci.yml +++ b/.github/workflows/gitlab_ci.yml @@ -115,6 +115,22 @@ jobs: GITLAB_PROJECT_ID: "6029" GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} MIRROR_BRANCH: ${{ env.MIRROR_BRANCH }} + - name: Unzip downloaded artifacts + run: | + pwd + ls -lah + cd artifacts + find . -name "*.zip" -type f -exec unzip -o {} \; + ls -lah + rm *.zip + cd .. + ls -lah + - name: Uploading artifacts + uses: actions/upload-artifact@v4 + with: + name: Gitlab-Action_artifacts + path: | + ./artifacts/* get_artifacts_from_other_workflow: runs-on: ubuntu-latest @@ -125,6 +141,7 @@ jobs: uses: actions/download-artifact@v4 with: merge-multiple: true + path: ./github_ci_artifacts - name: Set env-var id: get_id uses: actions/github-script@v7 diff --git a/pySDC/implementations/datatype_classes/cupy_mesh.py b/pySDC/implementations/datatype_classes/cupy_mesh.py index 01b9dde1e8..0b27524f32 100644 --- a/pySDC/implementations/datatype_classes/cupy_mesh.py +++ b/pySDC/implementations/datatype_classes/cupy_mesh.py @@ -1,5 +1,4 @@ import cupy as cp -from pySDC.core.errors import DataError try: from mpi4py import MPI @@ -37,6 +36,7 @@ def __new__(cls, init, val=0.0, **kwargs): ): obj = cp.ndarray.__new__(cls, init[0], dtype=init[2], **kwargs) obj.fill(val) + cls.comm = init[1] else: raise NotImplementedError(type(init)) return obj diff --git a/pySDC/implementations/sweeper_classes/Runge_Kutta.py b/pySDC/implementations/sweeper_classes/Runge_Kutta.py index ac9f9d39a1..bc43e3dfbe 100644 --- a/pySDC/implementations/sweeper_classes/Runge_Kutta.py +++ b/pySDC/implementations/sweeper_classes/Runge_Kutta.py @@ -37,17 +37,24 @@ def __init__(self, weights, nodes, matrix): elif len(nodes) != matrix.shape[0]: raise ParameterError(f'Incompatible number of nodes! Need {matrix.shape[0]}, got {len(nodes)}') - # Set number of nodes, left and right interval boundaries - self.num_solution_stages = 1 - self.num_nodes = matrix.shape[0] + self.num_solution_stages + self.globally_stiffly_accurate = np.allclose(matrix[-1], weights) + self.tleft = 0.0 self.tright = 1.0 - - self.nodes = np.append(np.append([0], nodes), [1]) + self.num_solution_stages = 0 if self.globally_stiffly_accurate else 1 + self.num_nodes = matrix.shape[0] + self.num_solution_stages self.weights = weights - self.Qmat = np.zeros([self.num_nodes + 1, self.num_nodes + 1]) - self.Qmat[1:-1, 1:-1] = matrix - self.Qmat[-1, 1:-1] = weights # this is for computing the solution to the step from the previous stages + + if self.globally_stiffly_accurate: + # For globally stiffly accurate methods, the last row of the Butcher tableau is the same as the weights. + self.nodes = np.append([0], nodes) + self.Qmat = np.zeros([self.num_nodes + 1, self.num_nodes + 1]) + self.Qmat[1:, 1:] = matrix + else: + self.nodes = np.append(np.append([0], nodes), [1]) + self.Qmat = np.zeros([self.num_nodes + 1, self.num_nodes + 1]) + self.Qmat[1:-1, 1:-1] = matrix + self.Qmat[-1, 1:-1] = weights # this is for computing the solution to the step from the previous stages self.left_is_node = True self.right_is_node = self.nodes[-1] == self.tright @@ -277,7 +284,7 @@ def update_nodes(self): rhs += lvl.dt * self.QI[m + 1, j] * self.get_full_f(lvl.f[j]) # implicit solve with prefactor stemming from the diagonal of Qd, use previous stage as initial guess - if self.coll.implicit: + if self.QI[m + 1, m + 1] != 0: lvl.u[m + 1][:] = prob.solve_system( rhs, lvl.dt * self.QI[m + 1, m + 1], lvl.u[m], lvl.time + lvl.dt * self.coll.nodes[m + 1] ) diff --git a/pySDC/projects/Resilience/strategies.py b/pySDC/projects/Resilience/strategies.py index e080e90cc3..2d4edaa689 100644 --- a/pySDC/projects/Resilience/strategies.py +++ b/pySDC/projects/Resilience/strategies.py @@ -1242,7 +1242,7 @@ def get_reference_value(self, problem, key, op, num_procs=1): """ if problem.__name__ == "run_Lorenz": if key == 'work_newton' and op == sum: - return 1820 + return 1456 elif key == 'e_global_post_run' and op == max: return 0.00013730538358736055 @@ -1433,7 +1433,7 @@ def get_reference_value(self, problem, key, op, num_procs=1): """ if problem.__name__ == "run_Lorenz": if key == 'work_newton' and op == sum: - return 984 + return 820 elif key == 'e_global_post_run' and op == max: return 3.148061889390874e-06 diff --git a/pySDC/tests/test_sweepers/test_Runge_Kutta_sweeper.py b/pySDC/tests/test_sweepers/test_Runge_Kutta_sweeper.py index c1a3c65c26..35ed4f7150 100644 --- a/pySDC/tests/test_sweepers/test_Runge_Kutta_sweeper.py +++ b/pySDC/tests/test_sweepers/test_Runge_Kutta_sweeper.py @@ -357,5 +357,5 @@ def test_RK_sweepers_with_GPU(test_name, sweeper_name): if __name__ == '__main__': # test_rhs_evals('ARK54') - test_order('ARK548L2SAERK2') + test_order('CrankNicholson') # test_order('ARK54')