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

FEniCS Benchmark #222

Open
wants to merge 12 commits into
base: main
Choose a base branch
from

Conversation

chrisrichardson
Copy link

First draft of a benchmark for FEniCS, as sketched out at Excalibur Workshop in Bristol.

@tkoskela tkoskela linked an issue Oct 13, 2023 that may be closed by this pull request
@tkoskela
Copy link
Member

For reference:

I tried running this on csd3. The concretized spack spec is

==> Concretized fenics-benchmark@main
 -   lnmdxvd  fenics-benchmark@main%[email protected]~ipo build_system=cmake build_type=Release generator=make arch=linux-centos7-skylake_avx512

the build fails with.

[ 18%] Generating Elasticity.c
ffcx /tmp/dc-kosk1/spack-stage/spack-stage-fenics-benchmark-main-lnmdxvdntyj2rrujjpkieu3ay3xxjzuf/spack-src/src/Poisson.py
make[2]: ffcx: No such file or directory

Does the spack package need to depend on py-fenics-ffcx?

@chrisrichardson
Copy link
Author

chrisrichardson commented Oct 13, 2023

To be honest, I was surprised that it worked on my laptop without this dependency. I really thought it should need it, yes. Let's add. I guess I may have had ffcx in my path on my laptop.

@tkoskela
Copy link
Member

Looks like we are missing python packages

    File "/home/dc-kosk1/demo/excalibur-tests/benchmarks/spack/csd3-cascadelake/compute-node/opt/linux-centos7-skylake_avx512/gcc-11.2.0/py-setuptools-63.4.3-fedflxl54t3m4ba4r2mudcwmitlhybua/lib/python3.8/site-packages/setuptools/_distutils/dist.py", line 992, in run_command
      cmd_obj.run()
    File "<string>", line 47, in run
    File "<string>", line 63, in build_extension
  ModuleNotFoundError: No module named 'nanobind'
  error: subprocess-exited-with-error
  
  × Building wheel for fenics-basix (pyproject.toml) did not run successfully.
  │ exit code: 1
  ╰─> See above for output.
  
  note: This error originates from a subprocess, and is likely not a problem with pip.

@chrisrichardson
Copy link
Author

Looks like we are waiting for: spack/spack#40440

@tkoskela
Copy link
Member

The PR has been merged, does this work now?

@chrisrichardson
Copy link
Author

I believe it should now work, yes. We probably need to tune some parameters before merging, though.

@chrisrichardson
Copy link
Author

Unfortunately, some other changes in spack have now caused it to fail again. I might lock to a version to prevent this keeping on happening.

@giordano
Copy link
Member

What's the problem specifically?

@chrisrichardson
Copy link
Author

A bunch of new dependencies for py-fenics-basix@main - it needs py-scikit-build-core now...
I think more of this will keep happening, so probably best to stick to a release...

@giordano
Copy link
Member

Yeah, it's usually better to refer to fixed tags, rather than moving targets like branch names, which make reproducing benchmark runs at a different time much harder.

@tkoskela
Copy link
Member

tkoskela commented Feb 3, 2025

Works on my local machine!

@chrisrichardson
Copy link
Author

I need to tidy up the actuall tests that are being run.

@chrisrichardson chrisrichardson marked this pull request as ready for review February 25, 2025 18:21
@chrisrichardson
Copy link
Author

Maybe we can merge this, as it seems to be working. I can work on making better scaling tests in another PR.

@tkoskela tkoskela requested a review from giordano February 27, 2025 10:40
@tkoskela
Copy link
Member

Looks good to me, do you have any comments @giordano?

Copy link
Member

@giordano giordano left a comment

Choose a reason for hiding this comment

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

Haven't tested it myself, but looks overall good to me, thanks! Only a couple of minor comments.

Comment on lines +7 to +8
import os
import sys
Copy link
Member

Choose a reason for hiding this comment

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

At a quick glance these are unused?

Copy link
Member

Choose a reason for hiding this comment

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

This is simple and small enough that it isn't a big deal to keep it here, but is there any chance this could be upstreamed to Spack?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Add Fenics benchmarks
3 participants