Skip to content

Arbor: version added: v0.9.0#39374

Merged
bernhardkaindl merged 3 commits intospack:developfrom
brenthuisman:brenthuisman-patch-9
Aug 24, 2023
Merged

Arbor: version added: v0.9.0#39374
bernhardkaindl merged 3 commits intospack:developfrom
brenthuisman:brenthuisman-patch-9

Conversation

@brenthuisman
Copy link
Copy Markdown
Contributor

  • New version
  • Maintainer updates
  • A most basic of Python tests

@spackbot-app
Copy link
Copy Markdown

spackbot-app bot commented Aug 10, 2023

@thorstenhater can you review this PR?

This PR modifies the following package(s), for which you are listed as a maintainer:

  • arbor

Copy link
Copy Markdown
Contributor

@tldahlgren tldahlgren left a comment

Choose a reason for hiding this comment

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

Confirmed the version sha256 and master branch but there is no develop branch AFAICT. Deferring to maintainers for merge decision.


version("master", branch="master", submodules=True)
version("master", branch="master")
version("develop")
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

This branch does not appear to exist in the repostory.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

There is no statement saying there is a "develop" branch?

There is a "develop" version, which is there to facilitate dev-builds.

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

When I attempt spack install arbor@develop the fetchers fail:

==> Installing arbor-develop-m6das64hvefg5ovcjtoa4slpudtiwmk6 [33/33]
==> No binary for arbor-develop-m6das64hvefg5ovcjtoa4slpudtiwmk6 found: installing from source
==> Error: FetchError: All fetchers failed for spack-stage-arbor-develop-m6das64hvefg5ovcjtoa4slpudtiwmk6

Adding level 1 debugging, I get:

==> [2023-08-10-13:34:05.554038] Checking existence of https://mirror.spack.io/arbor/arbor-develop.tar.gz
==> [2023-08-10-13:34:05.802567] Failure reading URL: HEAD https://mirror.spack.io/arbor/arbor-develop.tar.gz returned 404: Not Found
==> [2023-08-10-13:34:05.802830] URL does not exist: https://mirror.spack.io/arbor/arbor-develop.tar.gz
==> [2023-08-10-13:34:05.803168] FailedDownloadError: Failed to fetch file from URL: https://mirror.spack.io/arbor/arbor-develop.tar.gz
==> [2023-08-10-13:34:05.803358] Checking existence of https://github.com/arbor-sim/arbor/releases/download/vdevelop/arbor-vdevelop-full.tar.gz
==> [2023-08-10-13:34:06.053692] Failure reading URL: HEAD https://github.com/arbor-sim/arbor/releases/download/vdevelop/arbor-vdevelop-full.tar.gz returned 404: Not Found
==> [2023-08-10-13:34:06.053888] URL does not exist: https://github.com/arbor-sim/arbor/releases/download/vdevelop/arbor-vdevelop-full.tar.gz
==> [2023-08-10-13:34:06.054074] FailedDownloadError: Failed to fetch file from URL: https://github.com/arbor-sim/arbor/releases/download/vdevelop/arbor-vdevelop-full.tar.gz
==> [2023-08-10-13:34:06.054146] Fetching from https://mirror.spack.io/arbor/arbor-develop.tar.gz failed.
==> [2023-08-10-13:34:06.054198] Fetching from https://github.com/arbor-sim/arbor/releases/download/vdevelop/arbor-vdevelop-full.tar.gz failed.
==> [2023-08-10-13:34:06.074428] Error: FetchError: All fetchers failed for spack-stage-arbor-develop-m6das64hvefg5ovcjtoa4slpudtiwmk6
Traceback (most recent call last):
  File "SPACK_ROOT/lib/spack/spack/build_environment.py", line 1050, in _setup_pkg_and_run
    return_value = function(pkg, kwargs)
  File "SPACK_ROOT/lib/spack/spack/installer.py", line 2501, in build_process
    return installer.run()
  File "SPACK_ROOT/lib/spack/spack/installer.py", line 2342, in run
    self.pkg.do_patch()
  File "SPACK_ROOT/lib/spack/spack/package_base.py", line 1452, in do_patch
    self.do_stage()
  File "SPACK_ROOT/lib/spack/spack/package_base.py", line 1437, in do_stage
    self.do_fetch(mirror_only)
  File "SPACK_ROOT/lib/spack/spack/package_base.py", line 1421, in do_fetch
    self.stage.fetch(mirror_only, err_msg=err_msg)
  File "SPACK_ROOT/lib/spack/spack/util/pattern.py", line 16, in __call__
    return [getattr(item, self.name)(*args, **kwargs) for item in self.container]
  File "SPACK_ROOT/lib/spack/spack/util/pattern.py", line 16, in <listcomp>
    return [getattr(item, self.name)(*args, **kwargs) for item in self.container]
  File "SPACK_ROOT/lib/spack/spack/stage.py", line 525, in fetch
    raise FetchError(err_msg or default_msg, None)
spack.util.web.FetchError: All fetchers failed for spack-stage-arbor-develop-m6das64hvefg5ovcjtoa4slpudtiwmk6
==> [2023-08-10-13:34:06.074985] Flagging arbor-develop-m6das64hvefg5ovcjtoa4slpudtiwmk6 as failed: FetchError: All fetchers failed for spack-stage-arbor-develop-m6das64hvefg5ovcjtoa4slpudtiwmk6
==> [2023-08-10-13:34:06.127413] ChildError: FetchError: All fetchers failed for spack-stage-arbor-develop-m6das64hvefg5ovcjtoa4slpudtiwmk6

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

That's how I understood the develop tag is used: for local source builds (dev-builds). Since they don't have a version, they won't build otherwise, and you providing your own source is the point here.

Ideally, develop should be blocked when no local source is available. I can just hide the option after checking for source?

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

That's how I understood the develop tag is used: for local source builds (dev-builds). Since they don't have a version, they won't build otherwise, and you providing your own source is the point here.

Ideally, develop should be blocked when no local source is available. I can just hide the option after checking for source?

Do you mean the develop tag in the spack.yaml file for the developer workflow (https://spack-tutorial.readthedocs.io/en/latest/tutorial_developer_workflows.html.)?

There is more information on versions at https://spack.readthedocs.io/en/latest/packaging_guide.html#versions-and-fetching. The directive you're using is specifically mentioned in the Default Branch subsection of https://spack.readthedocs.io/en/latest/packaging_guide.html#git.

Copy link
Copy Markdown
Contributor Author

@brenthuisman brenthuisman Aug 15, 2023

Choose a reason for hiding this comment

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

I meant the workflow for building from source provided not through Spack. As of this change in Spack, a Spack version needs to be provided for any build. We use the dev-build command, see https://github.com/arbor-sim/arbor/blob/master/.github/workflows/test-spack.yml for our workflow (we test PRs before merger in particular.

Spack failing when one builds develop without providing source is intentional: there's no way for Spack to ever know which code we want to build.

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Yep, that's how spack dev-build is documented at https://spack-tutorial.readthedocs.io/en/lanl19/tutorial_developer_workflows.html:

$ spack dev-build --until configure hdf5@develop +hl ~mpi

@tldahlgren tldahlgren self-assigned this Aug 10, 2023
@brenthuisman
Copy link
Copy Markdown
Contributor Author

Can you tell my why black fails? Locally it passes, as does flake8.

@tldahlgren
Copy link
Copy Markdown
Contributor

Can you tell my why black fails? Locally it passes, as does flake8.

Sure. It doesn't like the reformatting you did on the assertions and vectorize variants.

==> Running black checks
--- var/spack/repos/builtin/packages/arbor/package.py	2023-08-10 14:53:10.280987 +0000
+++ var/spack/repos/builtin/packages/arbor/package.py	2023-08-10 14:53:26.881498 +0000
@@ -46,22 +46,16 @@
         "0.5.2",
         sha256="290e2ad8ca8050db1791cabb6b431e7c0409c305af31b559e397e26b300a115d",
         url="https://github.com/arbor-sim/arbor/releases/download/v0.5.2/arbor-v0.5.2-full.tar.gz",
     )
 
-    variant(
-        "assertions",
-        default=False,
-        description="Enable arb_assert() assertions in code.",
-    )
+    variant("assertions", default=False, description="Enable arb_assert() assertions in code.")
     variant("doc", default=False, description="Build documentation.")
     variant("mpi", default=False, description="Enable MPI support")
     variant("python", default=True, description="Enable Python frontend support")
     variant(
-        "vectorize",
-        default=False,
-        description="Enable vectorization of computational kernels",
+        "vectorize", default=False, description="Enable vectorization of computational kernels"
     )

@brenthuisman
Copy link
Copy Markdown
Contributor Author

brenthuisman commented Aug 11, 2023

Yeah I saw, but locally black doesn't report it, and I'm pretty sure black suggested the breakup in the first place :) If I rerun black on the proposed changes, I indeed get back to the state as in the PR (ie it undoes the proposal by your CI). Can you explain why your black does this?

@tldahlgren
Copy link
Copy Markdown
Contributor

Yeah I saw, but locally black doesn't report it, and I'm pretty sure black suggested the breakup in the first place :) If I rerun black on the proposed changes, I indeed get back to the state as in the PR (ie it undoes the proposal by your CI). Can you explain why your black does this?

I have similar differences with my local installation that I chalk up to different settings.

You can always run @spackbot fix style to have it automatically fixed for you.

@spackbot-app
Copy link
Copy Markdown

spackbot-app bot commented Aug 14, 2023

Let me see if I can fix that for you!

@spackbot-app
Copy link
Copy Markdown

spackbot-app bot commented Aug 14, 2023

I was able to run spack style --fix for you!

spack style --fix
==> Running style checks on spack
  selected: isort, black, flake8, mypy
==> Modified files
  var/spack/repos/builtin/packages/arbor/package.py
==> Running isort checks
  isort checks were clean
==> Running black checks
reformatted var/spack/repos/builtin/packages/arbor/package.py
All done! ✨ 🍰 ✨
1 file reformatted.
  black checks were clean
==> Running flake8 checks
  flake8 checks were clean
==> Running mypy checks
Success: no issues found in 583 source files
  mypy checks were clean
==> spack style checks were clean
Keep in mind that I cannot fix your flake8 or mypy errors, so if you have any you'll need to fix them and update the pull request. If I was able to push to your branch, if you make further changes you will need to pull from your updated branch before pushing again.

I've updated the branch with style fixes.


version("master", branch="master", submodules=True)
version("master", branch="master")
version("develop")
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Yep, that's how spack dev-build is documented at https://spack-tutorial.readthedocs.io/en/lanl19/tutorial_developer_workflows.html:

$ spack dev-build --until configure hdf5@develop +hl ~mpi

@bernhardkaindl bernhardkaindl merged commit af38d09 into spack:develop Aug 24, 2023
dyokelson pushed a commit to dyokelson/spack that referenced this pull request Aug 24, 2023
mpokorny pushed a commit to mpokorny/spack that referenced this pull request Sep 18, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants