Skip to content

Meson build system#156

Merged
mjv500 merged 8 commits intotdep-developers:mainfrom
MaxMignolet:main
Sep 2, 2025
Merged

Meson build system#156
mjv500 merged 8 commits intotdep-developers:mainfrom
MaxMignolet:main

Conversation

@MaxMignolet
Copy link
Contributor

This PR contains a new build system based on Meson. It improves the detection of libraries which (almost) fully automated . It also supports incremental compilation. I tested it on an intel mac, Ubuntu 22, and MareNostrum 5 with minimal issues. Feedback and testing on a wider range of machines/installations would be welcome.

Installation instruction have been added to INSTALL.md.

@MaxMignolet
Copy link
Contributor Author

Small note: I had to comment a call to an interface which had no implementation (in src/libolle/type_symmetrylist.f90). I'm not sure if this a real issue or not since it was compiling fine with build_things.sh.

@mjv500
Copy link
Contributor

mjv500 commented Aug 29, 2025

Trying out now. Real time comments below:

  • does not recognize -framework accelerate on MacOS on init, but then uses it correctly during build. confusing
  • presumes openblas, I had to degrade to blas in meson.build
  • The position of the Meson section in the installation doc mixes it with some other sections which may not be appropriate. To be checked.
  • build works and runs super quickly on my laptop.
  • in ./tests I had to add a link to the bin directory - having a separate meson build dir is good, but some paths are missing.
  • 2 tests fail. One is thermal_conductivity_2023 which probably does not need to be run. It is in make_all_testfiles.sh but not in the main build tree (at least my build did not make it)

@MaxMignolet
Copy link
Contributor Author

List of improvements:

  • I added symlinks to the master bin directory instead of just inside build/bin.
  • I degraded openblas to simply blas (which should be provided by lapack).
  • I added thermal_conductivity_2023 to the build project.
    For the tests, dump_dynamical_matrices fails only on my mac. It does not produce any output file for some reasons. On my ubuntu all the test succeed.

And for the documentation, I will improve it in another iteration.

@mjv500 mjv500 self-assigned this Sep 2, 2025
@mjv500 mjv500 self-requested a review September 2, 2025 15:24
Copy link
Contributor

@mjv500 mjv500 left a comment

Choose a reason for hiding this comment

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

Looks correct and functional now. Might add examples for other machines, MPI checks and other stuff. I don't know Meson enough to confirm these other options are present/easy/possible

@mjv500
Copy link
Contributor

mjv500 commented Sep 2, 2025

The compile and test phase on GitHub times out after 20 min. @MaxMignolet you can increase the timeout duration by hand in .github/workflows/ci_simple_compilation_and_test.yml

@mjv500 mjv500 merged commit a9a1cca into tdep-developers:main Sep 2, 2025
1 of 3 checks passed
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.

3 participants

Comments