Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

WIP: Use HPC for CI #386

Merged
merged 94 commits into from
Apr 22, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
94 commits
Select commit Hold shift + click to select a range
37ebce5
Updated github action to mirror to JSC-Gitlab
jakob-fritz Dec 4, 2023
c29bbb8
Added tag for Gitlab-CI job
jakob-fritz Dec 4, 2023
e21db75
No scheduled runs on fork
jakob-fritz Dec 4, 2023
7a56c88
Mirror only if lint succeeded
jakob-fritz Dec 4, 2023
a256146
Added job for juwels to check if it runs
jakob-fritz Dec 6, 2023
fced7bf
Added job from jacamar-example
jakob-fritz Dec 6, 2023
bf43379
Forgot to add used stage
jakob-fritz Dec 6, 2023
5872275
Added scheduler parameters
jakob-fritz Dec 6, 2023
fe077b1
Updated to a single line
jakob-fritz Dec 6, 2023
8f1b094
Commented more jobs in github
jakob-fritz Dec 6, 2023
208413f
Checking other position of variables
jakob-fritz Dec 6, 2023
cd4dad7
First try to run pytest on juwels
jakob-fritz Dec 8, 2023
6f06382
Running on HPC-CI on Login-Node and submitting job
jakob-fritz Dec 14, 2023
2a482d6
Corrected path for installing pySDC
jakob-fritz Dec 14, 2023
94aeeac
Wrong command-line-argument for stdout to file
jakob-fritz Dec 14, 2023
2fdf56c
Hard-coded the used account for quota
jakob-fritz Dec 14, 2023
35d87b6
Use srun and always provide artifact of benchmark
jakob-fritz Dec 15, 2023
cb54f15
Reverted initial changes
jakob-fritz Dec 15, 2023
187a2ae
Changed Gitlab-repo to where it is mirrored
jakob-fritz Dec 18, 2023
49ed6f0
Use an updated version of github2lab-action
jakob-fritz Jan 3, 2024
db0d086
Added comments to trigger another CI
jakob-fritz Jan 3, 2024
83bc236
Another commit to trigger the CI
jakob-fritz Jan 3, 2024
7faf29d
Changed used secret
jakob-fritz Jan 3, 2024
88de46b
Another comment to trigger CI
jakob-fritz Jan 3, 2024
adad00d
Trying Project Access Token
jakob-fritz Jan 3, 2024
53db841
Merge branch 'master' into master
pancetta Jan 3, 2024
e2f9e83
Update ci_pipeline.yml
pancetta Jan 3, 2024
c54cad6
Update ci_pipeline.yml
pancetta Jan 3, 2024
100fc18
Use PAT from gitlab
jakob-fritz Jan 3, 2024
8cb989c
Check only is secrets are available
jakob-fritz Jan 4, 2024
0d97b94
Another try to check if vars are set
jakob-fritz Jan 4, 2024
0e03f88
Env vars seem to be set (why?). Check if mirror works
jakob-fritz Jan 4, 2024
e196140
Another try using pull_request_target
jakob-fritz Jan 4, 2024
8998564
Revert back to pul_request
jakob-fritz Jan 4, 2024
c38dd45
Run mirror only from main repo
jakob-fritz Jan 4, 2024
d6bcf7d
Exhibit secret (if not masked)
jakob-fritz Jan 4, 2024
c215fd0
Another try at checking secrets
jakob-fritz Jan 4, 2024
9692bed
incorrect expansion
jakob-fritz Jan 4, 2024
2725ca5
Another try of expansion
jakob-fritz Jan 4, 2024
07cc84c
showing test secret
jakob-fritz Jan 4, 2024
2b8fc35
Another try
jakob-fritz Jan 4, 2024
970f84e
Reverted to original config of GH-CI
jakob-fritz Jan 8, 2024
ca91516
Added trailing newline in md-file
jakob-fritz Jan 15, 2024
d2a7e07
Merge branch 'create_gitlab_ci' into master
jakob-fritz Jan 15, 2024
f391b92
Added a trailing newline in another md-file
jakob-fritz Jan 15, 2024
fc09e7d
Some more md-formatting
jakob-fritz Jan 15, 2024
4eb95dd
More md-formatting
jakob-fritz Jan 15, 2024
9e63c0a
even more md-formatting
jakob-fritz Jan 15, 2024
930f505
Checkout the latest version of the pull-request
jakob-fritz Jan 22, 2024
78b62ee
Minor formatting to trigger CI
jakob-fritz Jan 29, 2024
c2a0595
Updated which code to checkout
jakob-fritz Jan 29, 2024
5521e7e
Formatted with black
jakob-fritz Jan 30, 2024
d4b366d
Some minor md-formatting to trigger CI
jakob-fritz Feb 5, 2024
8d2177f
Added info on how to proceed after job failed due to lacking permissions
jakob-fritz Feb 19, 2024
9e12306
Updated filenames to merge coverages from
jakob-fritz Feb 19, 2024
2024e9a
Added test for cupy on HPC
jakob-fritz Feb 22, 2024
e96ca11
Corrected bug in gitlab-ci file
jakob-fritz Feb 22, 2024
e508a21
Corrected variable substitution
jakob-fritz Feb 22, 2024
5b46f9c
Corrected partition for cupy
jakob-fritz Feb 23, 2024
1dc5a3b
Print sbatch even for failures
jakob-fritz Feb 23, 2024
74588f1
Corrected partition-name
jakob-fritz Feb 23, 2024
0b5f380
Forgot to install coverage
jakob-fritz Feb 23, 2024
609c62e
Splitted cupy-test and benchmark into two jobs
jakob-fritz Feb 23, 2024
f3cfdde
Run coverage combine, even if there is no coverage
jakob-fritz Feb 26, 2024
376b44a
Adding empty coverage-file
jakob-fritz Feb 26, 2024
b8838bd
Update to trigger CI
jakob-fritz Apr 16, 2024
42279da
More formatting to trigger CI
jakob-fritz Apr 16, 2024
3f7da4d
Reformatting to trigger CI
jakob-fritz Apr 16, 2024
fabea5f
Just to trigger CI
jakob-fritz Apr 16, 2024
8f20f5e
Change to trigger CI
jakob-fritz Apr 16, 2024
4f4eab9
Another trigger for CI
jakob-fritz Apr 16, 2024
682101e
Change to trigger CI
jakob-fritz Apr 17, 2024
0964d18
Triggering CI
jakob-fritz Apr 17, 2024
27a66ef
Trigger CI again
jakob-fritz Apr 17, 2024
c0740ab
Commit to trigger CI
jakob-fritz Apr 17, 2024
9308d0a
Trigger CI
jakob-fritz Apr 17, 2024
1f61e67
Trigger CI again
jakob-fritz Apr 17, 2024
76fd32c
Trigger pipeline
jakob-fritz Apr 18, 2024
8961707
Trigger CI
jakob-fritz Apr 18, 2024
b1d1b82
Trigger pipeline again
jakob-fritz Apr 18, 2024
0de652b
Trigger CI again
jakob-fritz Apr 18, 2024
2a9e061
Again trigger CI
jakob-fritz Apr 18, 2024
3a90226
CI should fail now
jakob-fritz Apr 22, 2024
aab3b87
Removed ls from CI-Jobs
jakob-fritz Apr 22, 2024
7137094
Removed forced failure of tests
jakob-fritz Apr 22, 2024
27f517e
Added info on CI in documentation
jakob-fritz Apr 22, 2024
6f6737f
Reverted changelog (to avoid merge-conflicts
jakob-fritz Apr 22, 2024
3e4539a
File not needed
jakob-fritz Apr 22, 2024
279c16b
Update 02_continuous_integration.md
jakob-fritz Apr 22, 2024
462dca9
Include changes to documentation (done by T.Baumann)
jakob-fritz Apr 22, 2024
49cab56
Resolve merge-conflict where doc was changed
jakob-fritz Apr 22, 2024
573321b
Reverted some formatting in changelog
jakob-fritz Apr 22, 2024
b7d60db
Added trailing newline at end of file
jakob-fritz Apr 22, 2024
0cec1f3
Formatted code of conduct
jakob-fritz Apr 22, 2024
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 1 addition & 3 deletions .github/workflows/ci_pipeline.yml
Original file line number Diff line number Diff line change
Expand Up @@ -151,8 +151,6 @@ jobs:
# run: |
# pytest --continue-on-collection-errors -v --durations=0 pySDC/tests -m ${{ matrix.env }}



# # - name: Get and prepare artifacts
# # run: |
# # pipeline_id=$(curl --header "PRIVATE-TOKEN: ${{ secrets.GITLAB_SECRET_H }}" --silent "https://gitlab.hzdr.de/api/v4/projects/3525/repository/commits/${{ github.head_ref || github.ref_name }}" | jq '.last_pipeline.id')
Expand Down Expand Up @@ -196,7 +194,7 @@ jobs:
run: |
ls -artl cpu-test-artifacts
cp cpu-test-artifacts/data_3.10/* data/.
python -m coverage combine cpu-test-artifacts/coverage_*_3.10.dat
python -m coverage combine cpu-test-artifacts/coverage_*.dat
python -m coverage xml
python -m coverage html

Expand Down
19 changes: 16 additions & 3 deletions .github/workflows/gitlab_ci.yml
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
---

name: Mirror to Gitlab to trigger CI

on:
Expand Down Expand Up @@ -37,7 +39,7 @@ jobs:
echo 'Permissions granted'
exit 0
else
echo 'Not enough permissions'
echo 'Not enough permissions. Please ask a member of Parallel-in-Time to rerun the job.'
exit 1
fi
- name: Pass if workflow from push or schedule
Expand Down Expand Up @@ -65,15 +67,26 @@ jobs:
needs:
- check_permission
steps:
- name: set proper sha
run: |
echo "${{ github.event_name }}"
if [ "${{ github.event_name }}" == 'push' ] || [ "${{ github.event_name }}" == 'schedule' ]
then
echo "USED_SHA=${{ github.sha }}" >> "$GITHUB_ENV"
fi
if [ "${{ github.event_name }}" == 'pull_request_target' ]
then
echo "USED_SHA=${{ github.event.pull_request.head.sha }}" >> "$GITHUB_ENV"
fi
- name: Checkout
uses: actions/checkout@v3
with:
ref: "${{ github.event.pull_request.merge_commit_sha }}"
ref: "${{ env.USED_SHA }}"
persist-credentials: false
- name: Mirror and wait for Gitlab-CI
uses: jakob-fritz/github2lab_action@Iss35_mirror_pr
env:
MODE: 'all' # Either 'mirror', 'get_status', 'get_artifact', or 'all'
MODE: 'all' # Either 'mirror', 'get_status', 'get_artifact', or 'all'
GITLAB_TOKEN: ${{ secrets.GITLAB_SECRET }}
FORCE_PUSH: "true"
GITLAB_HOSTNAME: "gitlab.jsc.fz-juelich.de"
Expand Down
84 changes: 80 additions & 4 deletions .gitlab-ci.yml
Original file line number Diff line number Diff line change
@@ -1,9 +1,82 @@
---

stages:
- test
- benchmark
- execute
- upload

#test_kit:

# job_juwels_compute:
# stage: execute
# variables:
# SCHEDULER_PARAMETERS: '--account=cstma --nodes=1 --partition=devel'
# tags:
# - juwels
# - jacamar
# - compute
# - slurm
# artifacts:
# paths:
# - test.file
# script:
# - echo $SYSTEMNAME
# - touch test.file
# after_script:
# - hostname
# - id


variables:
JUWELS_ACCOUNT: "cstma"


test_JUWELS:
stage: benchmark
rules:
- if: $CI_COMMIT_MESSAGE !~ /.*\[CI-no-benchmarks\]/
tags:
- jacamar
- juwels
- login
- shell
parallel:
matrix:
- SHELL_SCRIPT: ['benchmark', 'cupy']
artifacts:
when: always
paths:
- coverage_*.dat
- sbatch.err
- sbatch.out
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Could we also have a directory where all job scripts can post their output? It would be neat to allow multiple job scripts. Not really needed, though.

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yes sure we can have a directory for the outputs. Each job in Gitlab spawns in a separate directory. Therefore, multiple jobs (from Gitlab) won't put files in the same directory. If multiple tasks from slurm are spawned from a single Job in Gitlab, having this directory might make sense.

before_script:
- mkdir -p benchmarks
# load the latest Python module (currently 3.11)
- module --force purge
- module load Stages/2024
- module load GCC
- module load OpenMPI
- module load FFTW
- module load mpi4py
- module load SciPy-Stack
- module load CuPy
- pip install -e .
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Do you need to pip install in the CI? User installation with pip is persistent, afaik. Is the gitlab not associated with any user?
I would prefer to put the module load commands in the job scripts. But if you need to repeat the pip installs every time, it's better here.

Copy link
Collaborator Author

@jakob-fritz jakob-fritz Dec 16, 2023

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'm not sure, if we need pip install each time. The jobs are run as a predefined user (the one who triggers the CI in Gitlab). As mirroring is done with a personal access token, that user is impersonated and the CI will always run as this specific user. So if pip install is persistent, it will be available in all runs, as these runs are executed as the same user

Regarding module load: We can put them in the script. I find it easier/nicer if the scripts are as short as possible. Therefore, I moved the module load into the YAML-file. Furthermore, these steps (as module load or pip install) are executed on a login-node. The content of the sh-file is executed on a compute-node. In term of quota, it is "cheaper" if we don't spend compute-time for module load (although it does not take too long).

If you want to, feel free to move the pip install and module load into the script. If I shall do that, feel free to ping me!

- pip install pytest-benchmark coverage
script:
# - touch benchmarks/output.json
- echo $SYSTEMNAME
- sbatch --wait etc/juwels_${SHELL_SCRIPT}.sh
- touch .coverage.empty
- python -m coverage combine
- mv .coverage coverage_${SHELL_SCRIPT}.dat
after_script:
- echo "Following Errors occured:"
- cat sbatch.err
- echo "Following was written to stdout:"
- cat sbatch.out


# test_kit:
# image: rcaspart/micromamba-cuda
# stage: benchmark
# variables:
Expand Down Expand Up @@ -34,7 +107,7 @@ stages:
# - mv data data_${PYTHON}


#test_kit_bare:
# test_kit_bare:
# stage: test
# rules:
# - if: $CI_COMMIT_MESSAGE !~ /.*\[CI-no-GPU\].*/
Expand Down Expand Up @@ -64,6 +137,9 @@ stages:
benchmark:
image: mambaorg/micromamba
stage: benchmark
when: manual
tags:
- docker
rules:
- if: $CI_COMMIT_MESSAGE !~ /.*\[CI-no-benchmarks\]/
artifacts:
Expand All @@ -79,7 +155,7 @@ benchmark:
- mkdir -p benchmarks
- pytest --continue-on-collection-errors -v pySDC/tests -m "benchmark" --benchmark-json=benchmarks/output.json

#benchmark_kit:
# benchmark_kit:
# image: rcaspart/micromamba
# stage: benchmark
# variables:
Expand All @@ -104,7 +180,7 @@ benchmark:
# - pytest --continue-on-collection-errors -v pySDC/tests -m "benchmark" --benchmark-json=benchmarks/output.json


#bundle:
# bundle:
# image: mambaorg/micromamba
# stage: upload
# artifacts:
Expand Down
14 changes: 7 additions & 7 deletions CODE_OF_CONDUCT.md
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,7 @@ representative at an online or offline event.
## Enforcement

Instances of abusive, harassing, or otherwise unacceptable behavior may be
reported to the community leaders responsible for enforcement
reported to the community leaders responsible for enforcement
[here](mailto:[email protected]).
All complaints will be reviewed and investigated promptly and fairly.

Expand Down Expand Up @@ -118,15 +118,15 @@ the community.

This Code of Conduct is adapted from the [Contributor Covenant][homepage],
version 2.0, available at
https://www.contributor-covenant.org/version/2/0/code_of_conduct.html.
<https://www.contributor-covenant.org/version/2/0/code_of_conduct.html>.

Community Impact Guidelines were inspired by [Mozilla's code of conduct
enforcement ladder](https://github.com/mozilla/diversity).
enforcement ladder](<https://github.com/mozilla/diversity>).

[homepage]: https://www.contributor-covenant.org
[homepage]: <https://www.contributor-covenant.org>

For answers to common questions about this code of conduct, see the FAQ at
https://www.contributor-covenant.org/faq. Translations are available at
https://www.contributor-covenant.org/translations.
<https://www.contributor-covenant.org/faq>. Translations are available at
<https://www.contributor-covenant.org/translations>.

:arrow_left: [Back to main page](./README.md)
:arrow_left: [Back to main page](./README.md)
2 changes: 1 addition & 1 deletion CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -16,4 +16,4 @@ This follows a specific OOP framework, you can look at the page on [custom imple
5. [Custom Implementations](./docs/contrib/04_custom_implementations.md)
6. [Documenting Code](./docs/contrib/05_documenting_code.md)

:arrow_left: [Back to main page](./README.md)
:arrow_left: [Back to main page](./README.md)
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@
[![zenodo](https://zenodo.org/badge/26165004.svg)](https://zenodo.org/badge/latestdoi/26165004)
[![fair-software.eu](https://img.shields.io/badge/fair--software.eu-%E2%97%8F%20%20%E2%97%8F%20%20%E2%97%8F%20%20%E2%97%8F%20%20%E2%97%8F-green)](https://fair-software.eu)
[![SQAaaS badge shields.io](https://img.shields.io/badge/sqaaas%20software-silver-lightgrey)](https://api.eu.badgr.io/public/assertions/aS8J0NDTTjCyYP6iVufviQ "SQAaaS silver badge achieved")

# Welcome to pySDC!

The `pySDC` project is a Python implementation of the
Expand Down Expand Up @@ -96,7 +97,6 @@ Checkout the [Changelog](./CHANGELOG.md) to see pySDC's evolution since 2016.
Any contribution is dearly welcome ! If you want to take part of this, please take the time to read our [Contribution Guidelines](./CONTRIBUTING.md)
(and don't forget to take a peek at our nice [Code of Conduct](./CODE_OF_CONDUCT.md) :wink:).


## Acknowledgements

This project has received funding from the [European High-Performance
Expand Down
31 changes: 31 additions & 0 deletions docs/contrib/02_continuous_integration.md
Original file line number Diff line number Diff line change
Expand Up @@ -103,6 +103,37 @@ pytest -v pySDC/tests
> pytest -v pySDC/tests/test_nodes.py # only test nodes generation
> ```

## Running CI on HPC from pull requests

By syncing the GitHub repository to a certain Gitlab instance, CI-Jobs can be run on HPC machines. This can be helpful for benchmarks or when running on accelerators that are not available as GitHub runners.

For security and accounting reasons, a few extra steps are needed in order to run the contents of a pull request on HPC:

- The pull request needs to have the tag "gitlab-mirror" assigned to it.
- A person with write-permission for the Parallel-in-Time pySDC repository needs to trigger the workflow. Ask for someone with the required permissions to rerun the workflow if needed.
- The workflow checks if the code can be merged. If this is not the case, the code is not mirrored and the workflow fails. In this case, please merge upstream changes, fix all conflicts, and rerun the workflow.

> :bell: Note that direct pushes to Parallel-in-Time/pySDC will always trigger the HPC pipeline on Gitlab

Regardless of why the Gitlab pipeline was triggered, the following holds true:

- The return-state from Gitlab is transmitted to GitHub (Success/Failure) leading to the same result in GitHub
- Logs from Gitlab are also transferred. The full logs of all jobs can be read from within GitHub. For better overview, these are folded, so unfolding is needed before reading.
- Artifacts from Gitlab jobs are also transferred back to GitHub
- Information, such as coverage is transferred to GitHub, but not yet merged across multiple GitHub workflows. Therefore, there is no complete summary of e.g. coverage-reports across all jobs in all workflows.

> :warning: The coverage report from the HPC tests is not yet merged with other reports. The test coverage will not show up on the respective website or in the badge. We are working on this.

### HPC test environments

In order to run tests on GPUs, please use the pytest marker `cupy`.

If you want to create a new HPC test environment, the following steps need to be completed:

- Create a new slurm job-script in `etc/juwels_*.sh`. The name and location of the file is important.
- Adapt `.gitlab-ci.yml` to include the new job-script. For this, add a name in the job "test_JUWELS" in the section `parallel: matrix: SHELL_SCRIPT`. The name there must match the name of the newly created file.
As a starting point it is recommended to copy and adapt an existing file (e.g. `etc/juwels_cupy.sh`).

## Code coverage

This stage allows to checks how much of the `pySDC` code is tested by the previous stage. It is based on the [coverage](https://pypi.org/project/coverage/) library and currently applied to the following directories :
Expand Down
9 changes: 9 additions & 0 deletions etc/juwels_benchmark.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
#!/bin/bash -x
#SBATCH --account=cstma
#SBATCH --nodes=1
#SBATCH --time=00:10:00
#SBATCH --partition=devel
#SBATCH --output=sbatch.out
#SBATCH --error=sbatch.err

srun python -m pytest --continue-on-collection-errors -v pySDC/tests -m "benchmark" --benchmark-json=benchmarks.json
9 changes: 9 additions & 0 deletions etc/juwels_cupy.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
#!/bin/bash -x
#SBATCH --account=cstma
#SBATCH --nodes=1
#SBATCH --time=00:10:00
#SBATCH --partition=develgpus
#SBATCH --output=sbatch.out
#SBATCH --error=sbatch.err

srun python -m coverage run -m pytest --continue-on-collection-errors -v pySDC/tests -m "cupy"
8 changes: 2 additions & 6 deletions pySDC/implementations/problem_classes/AllenCahn_1D_FD.py
Original file line number Diff line number Diff line change
Expand Up @@ -762,9 +762,7 @@ def eval_f(self, u, t):
f = self.dtype_f(self.init)
f.impl[:] = self.A.dot(u)
f.expl[:] = (
-2.0 / self.eps**2 * u * (1.0 - u) * (1.0 - 2.0 * u)
- 6.0 * self.dw * u * (1.0 - u)
+ 0.0 / self.eps**2 * u
-2.0 / self.eps**2 * u * (1.0 - u) * (1.0 - 2.0 * u) - 6.0 * self.dw * u * (1.0 - u) + 0.0 / self.eps**2 * u
)
self.work_counters['rhs']()
return f
Expand Down Expand Up @@ -849,9 +847,7 @@ def eval_f(self, u, t):
f = self.dtype_f(self.init)
f.comp1[:] = self.A.dot(u)
f.comp2[:] = (
-2.0 / self.eps**2 * u * (1.0 - u) * (1.0 - 2.0 * u)
- 6.0 * self.dw * u * (1.0 - u)
+ 0.0 / self.eps**2 * u
-2.0 / self.eps**2 * u * (1.0 - u) * (1.0 - 2.0 * u) - 6.0 * self.dw * u * (1.0 - u) + 0.0 / self.eps**2 * u
)
self.work_counters['rhs']()
return f
Expand Down
2 changes: 2 additions & 0 deletions pySDC/implementations/problem_classes/Battery.py
Original file line number Diff line number Diff line change
Expand Up @@ -329,6 +329,7 @@ class battery(battery_n_capacitors):
----
This class has the same attributes as the class it inherits from.
"""

dtype_f = imex_mesh

def __init__(self, ncapacitors=1, Vs=5.0, Rs=0.5, C=None, R=1.0, L=1.0, alpha=1.2, V_ref=None):
Expand Down Expand Up @@ -455,6 +456,7 @@ class battery_implicit(battery):
work_counters : WorkCounter
Counts different things, here: Number of Newton iterations is counted.
"""

dtype_f = mesh

def __init__(
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -132,9 +132,7 @@ def formJacobian(self, snes, X, J, P):
row.field = 1
col.field = 1
val = 1.0 - self.factor * (
self.prob.Dv * (-2.0 / self.dx**2 - 2.0 / self.dy**2)
+ 2.0 * x[i, j, 0] * x[i, j, 1]
- self.prob.B
self.prob.Dv * (-2.0 / self.dx**2 - 2.0 / self.dy**2) + 2.0 * x[i, j, 0] * x[i, j, 1] - self.prob.B
)
P.setValueStencil(row, col, val)
row.field = 1
Expand Down
1 change: 1 addition & 0 deletions pySDC/implementations/problem_classes/GrayScott_MPIFFT.py
Original file line number Diff line number Diff line change
Expand Up @@ -590,6 +590,7 @@ class grayscott_mi_linear(grayscott_imex_linear):
The problem in this class will be treated in a *multi-implicit* way for time-stepping, i.e., for the system containing
the diffusion part will be solved by FFT, and for the linear part a Newton solver is used.
"""

dtype_f = comp2_mesh

def __init__(
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -302,6 +302,7 @@ class heatNd_unforced(heatNd_forced):

The implementation is this class uses the ``CuPy`` package in order to make ``pySDC`` available for GPUs.
"""

dtype_f = cupy_mesh

def eval_f(self, u, t):
Expand Down
1 change: 1 addition & 0 deletions pySDC/implementations/problem_classes/LogisticEquation.py
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,7 @@ class logistics_equation(ptype):
stop_at_nan : bool, optional
Indicates if the Newton solver stops when nan values arise.
"""

dtype_u = mesh
dtype_f = mesh

Expand Down
5 changes: 1 addition & 4 deletions pySDC/implementations/problem_classes/PenningTrap_3D.py
Original file line number Diff line number Diff line change
Expand Up @@ -122,10 +122,7 @@ def fast_interactions(N, pos, sig, q):

for j in range(N):
dist2 = (
(pos[0, i] - pos[0, j]) ** 2
+ (pos[1, i] - pos[1, j]) ** 2
+ (pos[2, i] - pos[2, j]) ** 2
+ sig**2
(pos[0, i] - pos[0, j]) ** 2 + (pos[1, i] - pos[1, j]) ** 2 + (pos[2, i] - pos[2, j]) ** 2 + sig**2
)
contrib += q[j] * (pos[:, i] - pos[:, j]) / dist2**1.5

Expand Down
1 change: 1 addition & 0 deletions pySDC/implementations/problem_classes/generic_ND_FD.py
Original file line number Diff line number Diff line change
Expand Up @@ -76,6 +76,7 @@ class GenericNDimFinDiff(ptype):
xvalues : np.1darray
Values of spatial grid.
"""

dtype_u = mesh
dtype_f = mesh

Expand Down
Loading
Loading