Skip to content

ESPResSo easyblock#4066

Open
jngrad wants to merge 2 commits intoeasybuilders:developfrom
jngrad:eb_espresso
Open

ESPResSo easyblock#4066
jngrad wants to merge 2 commits intoeasybuilders:developfrom
jngrad:eb_espresso

Conversation

@jngrad
Copy link
Copy Markdown
Contributor

@jngrad jngrad commented Feb 16, 2026

Provide an easyblock to manage CMake flags for each minor release of ESPResSo and automatically download dependencies included via the FetchContent mechanism.

@jngrad
Copy link
Copy Markdown
Contributor Author

jngrad commented Feb 16, 2026

This easyblock was originally designed for the EESSI-dev bot: multixscale/dev.eessi.io-espresso#6

Here is a report for ESPResSo-4.2.2-foss-2023b.eb adapted for this easyblock:

--- a/easybuild/easyconfigs/e/ESPResSo/ESPResSo-4.2.2-foss-2023b.eb
+++ b/easybuild/easyconfigs/e/ESPResSo/ESPResSo-4.2.2-foss-2023b.eb
@@ -1,3 +1,3 @@
-easyblock = 'CMakeMake'
+easyblock = 'EB_ESPResSo'
 
 name = 'ESPResSo'
@@ -31,5 +31,5 @@ configopts = ' -DCMAKE_SKIP_RPATH=OFF -DWITH_TESTS=ON -DWITH_CUDA=OFF'
 configopts += ' -DPYTHON_EXECUTABLE=$EBROOTPYTHON/bin/python '
 
-runtest = 'check_unit_tests && make check_python'
+runtest = 'check_unit_tests && ninja check_python'
 
 _binaries = ['ipypresso',  'pypresso']

Test report by @jngrad
SUCCESS
Ubuntu 24.04, x86_64, AMD Ryzen 9 9950X 16-Core Processor (zen5)
See https://gist.github.com/jngrad/ca3f856272641493badb29e5b5d155b4 for a full test report.

@jngrad
Copy link
Copy Markdown
Contributor Author

jngrad commented Feb 20, 2026

The EESSI-dev bot successfully ingested the easyconfigs with this easyblock via include-easyblocks-from-commit: multixscale/dev.eessi.io-espresso#6

@boegel boegel added the update label Feb 23, 2026
@boegel boegel added this to the next release (5.2.2?) milestone Feb 23, 2026
Copy link
Copy Markdown
Member

@ocaisa ocaisa left a comment

Choose a reason for hiding this comment

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

Some suggestions to bring things more in line with other easyblocks

Comment on lines +50 to +53
if not tarball.endswith('.tar.gz'):
raise ValueError(tarball + ' is not a tar.gz file')
prefix = tarball.rsplit('.', 2)[0]
matches = [x for x in os.listdir(src['finalpath']) if x.startswith(prefix)]
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Isn't this assuming some very strict scenarios:

  • All sources are .tar.gz. I guess this is true in the easyconfig PRs related to this but I wonder if you really need to be so strict. Is there any scenario where you don't want to process a source?
  • All sources unpack to <prefix>.... Again this is likely true but you could be a little forgiving
Suggested change
if not tarball.endswith('.tar.gz'):
raise ValueError(tarball + ' is not a tar.gz file')
prefix = tarball.rsplit('.', 2)[0]
matches = [x for x in os.listdir(src['finalpath']) if x.startswith(prefix)]
if not tarball.endswith('.tar.gz'):
raise ValueError(tarball + ' is not a tar.gz file')
prefix = tarball.rsplit('.', 2)[0]
matches = [x for x in os.listdir(src['finalpath']) if x.lower().startswith(prefix.lower())]

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.

I've now expanded the code to check all commonly-used compression algorithms. This code finds the URI of the extracted tarball to overwrite the URL of the remote package (CMake will ignore the download and patch steps when an URI is provided). I would argue a mechanism like this one should be part of the CMakeMake/CMakeNinja easyblock, since we cannot download remote resources during the configure step.

The only use case for not processing a source is when it's a URI-based source. I'm not entirely sure how that would work, since paths to local files are platform-dependent. Pointing to an EESSI toolchain subdirectory wouldn't work, since that would prevent deploying ESPResSo to more than 1 toolchain. Pointing to a directory path passed as a CMake option could work, but I don't see any use case in ESPResSo.

Copy link
Copy Markdown
Member

@ocaisa ocaisa left a comment

Choose a reason for hiding this comment

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

I'm reasonably sure that we always use EasyBuildError

Co-authored-by: Alan O'Cais <alan.ocais@cecam.org>
@boegel
Copy link
Copy Markdown
Member

boegel commented Apr 8, 2026

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants