From c51dad1097bbb6b52189d0f64b60e1d0acc11a65 Mon Sep 17 00:00:00 2001 From: Max Mignolet Date: Fri, 16 Jan 2026 15:35:04 +0100 Subject: [PATCH 01/13] Set default build optim to 3, changed bin location to match the build_things script --- meson.build | 25 +++++++++++++++++++-- src/anharmonic_free_energy/meson.build | 5 +++-- src/atomic_distribution/meson.build | 5 +++-- src/canonical_configuration/meson.build | 5 +++-- src/crystal_structure_info/meson.build | 5 +++-- src/dump_dynamical_matrices/meson.build | 5 +++-- src/extract_forceconstants/meson.build | 5 +++-- src/generate_structure/meson.build | 5 +++-- src/lineshape/meson.build | 5 +++-- src/pack_simulation/meson.build | 5 +++-- src/phasespace_surface/meson.build | 5 +++-- src/phonon_dispersion_relations/meson.build | 5 +++-- src/refine_structure/meson.build | 5 +++-- src/samples_from_md/meson.build | 5 +++-- src/thermal_conductivity/meson.build | 5 +++-- src/thermal_conductivity_2023/meson.build | 5 +++-- 16 files changed, 68 insertions(+), 32 deletions(-) diff --git a/meson.build b/meson.build index 2b225ff3..8fa7a0fe 100644 --- a/meson.build +++ b/meson.build @@ -1,16 +1,37 @@ -project('tdep', 'fortran', 'c', 'cpp') +project('tdep', + 'fortran', 'c', 'cpp', + meson_version: '>=1.1', + default_options: ['buildtype=custom', 'debug=true', 'optimization=3']) add_project_arguments('-cpp', language: 'fortran') add_project_arguments('-ffree-line-length-none', language: 'fortran') # add_project_arguments('-std=f2008', language: 'fortran') add_project_arguments('-fallow-argument-mismatch', language: 'fortran') # global dependencies: + +# mpi dep_mpi = dependency('mpi', language: 'fortran') -dep_blas = dependency('blas') + +# linear algebra +dep_blas = dependency('blas', required: false) +if not dep_blas.found() + message('Did not find the blas library. Trying with openblas') + dep_blas = dependency('openblas', required: true) # required as it is the last try +endif dep_lapack = dependency('lapack') +# # add some common path to pkg-config search path +# env = environ() +# env.prepend('PKG_CONFIG_PATH', '/usr/lib/x86_64-linux-gnu') + +# message(get_option('linalg_flavor')) + +# fft dep_fftw = dependency('fftw3') + +# hdf5 + netcdf dep_hdf5 = dependency('hdf5', language: 'fortran', version: '>1.10.7') dep_netcdf = dependency('netcdf', language: 'fortran') + dep_all = [dep_mpi, dep_blas, dep_lapack, dep_fftw, dep_hdf5, dep_netcdf] subdir('src/libolle') diff --git a/src/anharmonic_free_energy/meson.build b/src/anharmonic_free_energy/meson.build index 7916c366..2397e7e7 100644 --- a/src/anharmonic_free_energy/meson.build +++ b/src/anharmonic_free_energy/meson.build @@ -1,4 +1,5 @@ -executable('anharmonic_free_energy', +exec_name='anharmonic_free_energy' +executable(exec_name, 'energy.f90', 'epot.f90', 'main.f90', @@ -9,4 +10,4 @@ executable('anharmonic_free_energy', install: true, install_dir: meson.project_build_root() / 'bin') -install_symlink('anharmonic_free_energy', pointing_to: meson.project_build_root() / 'bin/anharmonic_free_energy', install_dir: meson.project_source_root() / 'bin') +install_symlink(exec_name, pointing_to: meson.project_build_root() / 'src' / exec_name / exec_name, install_dir: meson.project_source_root() / 'bin') diff --git a/src/atomic_distribution/meson.build b/src/atomic_distribution/meson.build index 21839da2..5d666c2b 100644 --- a/src/atomic_distribution/meson.build +++ b/src/atomic_distribution/meson.build @@ -1,4 +1,5 @@ -executable('atomic_distribution', +exec_name='atomic_distribution' +executable(exec_name, 'correlationfunction.f90', 'diffraction.f90', 'main.f90', @@ -13,4 +14,4 @@ executable('atomic_distribution', install: true, install_dir: meson.project_build_root() / 'bin') -install_symlink('atomic_distribution', pointing_to: meson.project_build_root() / 'bin/atomic_distribution', install_dir: meson.project_source_root() / 'bin') +install_symlink(exec_name, pointing_to: meson.project_build_root() / 'src' / exec_name / exec_name, install_dir: meson.project_source_root() / 'bin') diff --git a/src/canonical_configuration/meson.build b/src/canonical_configuration/meson.build index 57226928..3c1f4612 100644 --- a/src/canonical_configuration/meson.build +++ b/src/canonical_configuration/meson.build @@ -1,4 +1,5 @@ -executable('canonical_configuration', +exec_name='canonical_configuration' +executable(exec_name, 'main.f90', 'options.f90', 'semirandom.f90', @@ -8,4 +9,4 @@ executable('canonical_configuration', install: true, install_dir: meson.project_build_root() / 'bin') -install_symlink('canonical_configuration', pointing_to: meson.project_build_root() / 'bin/canonical_configuration', install_dir: meson.project_source_root() / 'bin') +install_symlink(exec_name, pointing_to: meson.project_build_root() / 'src' / exec_name / exec_name, install_dir: meson.project_source_root() / 'bin') diff --git a/src/crystal_structure_info/meson.build b/src/crystal_structure_info/meson.build index 1ce986b0..1f823cde 100644 --- a/src/crystal_structure_info/meson.build +++ b/src/crystal_structure_info/meson.build @@ -1,4 +1,5 @@ -executable('crystal_structure_info', +exec_name='crystal_structure_info' +executable(exec_name, 'main.f90', 'options.f90', link_with: [libolle, libflap], @@ -7,4 +8,4 @@ executable('crystal_structure_info', install: true, install_dir: meson.project_build_root() / 'bin') -install_symlink('crystal_structure_info', pointing_to: meson.project_build_root() / 'bin/crystal_structure_info', install_dir: meson.project_source_root() / 'bin') +install_symlink(exec_name, pointing_to: meson.project_build_root() / 'src' / exec_name / exec_name, install_dir: meson.project_source_root() / 'bin') diff --git a/src/dump_dynamical_matrices/meson.build b/src/dump_dynamical_matrices/meson.build index 9466d935..9b4a86da 100644 --- a/src/dump_dynamical_matrices/meson.build +++ b/src/dump_dynamical_matrices/meson.build @@ -1,4 +1,5 @@ -executable('dump_dynamical_matrices', +exec_name='dump_dynamical_matrices' +executable(exec_name, 'main.f90', 'options.f90', link_with: [libolle, libflap], @@ -7,4 +8,4 @@ executable('dump_dynamical_matrices', install: true, install_dir: meson.project_build_root() / 'bin') -install_symlink('dump_dynamical_matrices', pointing_to: meson.project_build_root() / 'bin/dump_dynamical_matrices', install_dir: meson.project_source_root() / 'bin') +install_symlink(exec_name, pointing_to: meson.project_build_root() / 'src' / exec_name / exec_name, install_dir: meson.project_source_root() / 'bin') diff --git a/src/extract_forceconstants/meson.build b/src/extract_forceconstants/meson.build index 654d19ea..1fc50468 100644 --- a/src/extract_forceconstants/meson.build +++ b/src/extract_forceconstants/meson.build @@ -1,4 +1,5 @@ -executable('extract_forceconstants', +exec_name='extract_forceconstants' +executable(exec_name, 'main.f90', 'options.f90', link_with: [libolle, libflap], @@ -7,4 +8,4 @@ executable('extract_forceconstants', install: true, install_dir: meson.project_build_root() / 'bin') -install_symlink('extract_forceconstants', pointing_to: meson.project_build_root() / 'bin/extract_forceconstants', install_dir: meson.project_source_root() / 'bin') +install_symlink(exec_name, pointing_to: meson.project_build_root() / 'src' / exec_name / exec_name, install_dir: meson.project_source_root() / 'bin') diff --git a/src/generate_structure/meson.build b/src/generate_structure/meson.build index 60127f53..778e7b14 100644 --- a/src/generate_structure/meson.build +++ b/src/generate_structure/meson.build @@ -1,4 +1,5 @@ -executable('generate_structure', +exec_name='generate_structure' +executable(exec_name, 'autocell.f90', 'main.f90', 'options.f90', @@ -8,4 +9,4 @@ executable('generate_structure', install: true, install_dir: meson.project_build_root() / 'bin') -install_symlink('generate_structure', pointing_to: meson.project_build_root() / 'bin/generate_structure', install_dir: meson.project_source_root() / 'bin') +install_symlink(exec_name, pointing_to: meson.project_build_root() / 'src' / exec_name / exec_name, install_dir: meson.project_source_root() / 'bin') diff --git a/src/lineshape/meson.build b/src/lineshape/meson.build index fb5f6e6b..3d017814 100644 --- a/src/lineshape/meson.build +++ b/src/lineshape/meson.build @@ -1,4 +1,5 @@ -executable('lineshape', +exec_name='lineshape' +executable(exec_name, 'dielscatter.f90', 'dielscatter_helper.f90', # 'dielscatter_matrixelement.f90', @@ -20,4 +21,4 @@ executable('lineshape', install: true, install_dir: meson.project_build_root() / 'bin') -install_symlink('lineshape', pointing_to: meson.project_build_root() / 'bin/lineshape', install_dir: meson.project_source_root() / 'bin') +install_symlink(exec_name, pointing_to: meson.project_build_root() / 'src' / exec_name / exec_name, install_dir: meson.project_source_root() / 'bin') diff --git a/src/pack_simulation/meson.build b/src/pack_simulation/meson.build index f29c96e2..c3b4ec36 100644 --- a/src/pack_simulation/meson.build +++ b/src/pack_simulation/meson.build @@ -1,4 +1,5 @@ -executable('pack_simulation', +exec_name='pack_simulation' +executable(exec_name, 'main.f90', 'options.f90', link_with: [libolle, libflap], @@ -7,4 +8,4 @@ executable('pack_simulation', install: true, install_dir: meson.project_build_root() / 'bin') -install_symlink('pack_simulation', pointing_to: meson.project_build_root() / 'bin/pack_simulation', install_dir: meson.project_source_root() / 'bin') +install_symlink(exec_name, pointing_to: meson.project_build_root() / 'src' / exec_name / exec_name, install_dir: meson.project_source_root() / 'bin') diff --git a/src/phasespace_surface/meson.build b/src/phasespace_surface/meson.build index 3a867b1b..03d6b1c4 100644 --- a/src/phasespace_surface/meson.build +++ b/src/phasespace_surface/meson.build @@ -1,4 +1,5 @@ -executable('phasespace_surface', +exec_name='phasespace_surface' +executable(exec_name, 'main.f90', 'options.f90', 'type_phasespacesurface.f90', @@ -8,4 +9,4 @@ executable('phasespace_surface', install: true, install_dir: meson.project_build_root() / 'bin') -install_symlink('phasespace_surface', pointing_to: meson.project_build_root() / 'bin/phasespace_surface', install_dir: meson.project_source_root() / 'bin') +install_symlink(exec_name, pointing_to: meson.project_build_root() / 'src' / exec_name / exec_name, install_dir: meson.project_source_root() / 'bin') diff --git a/src/phonon_dispersion_relations/meson.build b/src/phonon_dispersion_relations/meson.build index c7de5506..cc55833d 100644 --- a/src/phonon_dispersion_relations/meson.build +++ b/src/phonon_dispersion_relations/meson.build @@ -1,4 +1,5 @@ -executable('phonon_dispersion_relations', +exec_name='phonon_dispersion_relations' +executable(exec_name, 'activity.f90', 'densityplots.f90', 'densityplots_stuntscattering.f90', @@ -13,4 +14,4 @@ executable('phonon_dispersion_relations', install: true, install_dir: meson.project_build_root() / 'bin') -install_symlink('phonon_dispersion_relations', pointing_to: meson.project_build_root() / 'bin/phonon_dispersion_relations', install_dir: meson.project_source_root() / 'bin') +install_symlink(exec_name, pointing_to: meson.project_build_root() / 'src' / exec_name / exec_name, install_dir: meson.project_source_root() / 'bin') diff --git a/src/refine_structure/meson.build b/src/refine_structure/meson.build index 1cf29c17..137c5caa 100644 --- a/src/refine_structure/meson.build +++ b/src/refine_structure/meson.build @@ -1,4 +1,5 @@ -executable('refine_structure', +exec_name='refine_structure' +executable(exec_name, 'lo_spacegroup_applyoperation.f90', 'lo_spacegroup_charactertable.f90', 'lo_spacegroup.f90', @@ -13,4 +14,4 @@ executable('refine_structure', install: true, install_dir: meson.project_build_root() / 'bin') -install_symlink('refine_structure', pointing_to: meson.project_build_root() / 'bin/refine_structure', install_dir: meson.project_source_root() / 'bin') +install_symlink(exec_name, pointing_to: meson.project_build_root() / 'src' / exec_name/ exec_name, install_dir: meson.project_source_root() / 'bin') diff --git a/src/samples_from_md/meson.build b/src/samples_from_md/meson.build index 7f9d82b5..be887b45 100644 --- a/src/samples_from_md/meson.build +++ b/src/samples_from_md/meson.build @@ -1,4 +1,5 @@ -executable('samples_from_md', +exec_name='samples_from_md' +executable(exec_name, 'main.f90', 'options.f90', link_with: [libolle, libflap], @@ -7,4 +8,4 @@ executable('samples_from_md', install: true, install_dir: meson.project_build_root() / 'bin') -install_symlink('samples_from_md', pointing_to: meson.project_build_root() / 'bin/samples_from_md', install_dir: meson.project_source_root() / 'bin') +install_symlink(exec_name, pointing_to: meson.project_build_root() / 'src' / exec_name / exec_name, install_dir: meson.project_source_root() / 'bin') diff --git a/src/thermal_conductivity/meson.build b/src/thermal_conductivity/meson.build index ef3c74ec..baaa267e 100644 --- a/src/thermal_conductivity/meson.build +++ b/src/thermal_conductivity/meson.build @@ -1,4 +1,5 @@ -executable('thermal_conductivity', +exec_name='thermal_conductivity' +executable(exec_name, 'cumulative_kappa.f90', 'kappa.f90', 'main.f90', @@ -10,4 +11,4 @@ executable('thermal_conductivity', install: true, install_dir: meson.project_build_root() / 'bin') -install_symlink('thermal_conductivity', pointing_to: meson.project_build_root() / 'bin/thermal_conductivity', install_dir: meson.project_source_root() / 'bin') +install_symlink(exec_name, pointing_to: meson.project_build_root() / 'src' / exec_name / exec_name, install_dir: meson.project_source_root() / 'bin') diff --git a/src/thermal_conductivity_2023/meson.build b/src/thermal_conductivity_2023/meson.build index 39f7bcd8..68012423 100644 --- a/src/thermal_conductivity_2023/meson.build +++ b/src/thermal_conductivity_2023/meson.build @@ -1,4 +1,5 @@ -executable('thermal_conductivity_2023', +exec_name='thermal_conductivity_2023' +executable(exec_name, 'main.f90', 'mfp.f90', 'options.f90', @@ -11,4 +12,4 @@ executable('thermal_conductivity_2023', install: true, install_dir: meson.project_build_root() / 'bin') -install_symlink('thermal_conductivity_2023', pointing_to: meson.project_build_root() / 'bin/thermal_conductivity_2023', install_dir: meson.project_source_root() / 'bin') +install_symlink(exec_name, pointing_to: meson.project_build_root() / 'src' / exec_name / exec_name, install_dir: meson.project_source_root() / 'bin') From d16b8b08aa4be75797a04c9e6b6a898fdb7f048b Mon Sep 17 00:00:00 2001 From: Max Mignolet Date: Fri, 16 Jan 2026 15:58:02 +0100 Subject: [PATCH 02/13] Moved Meson documentation to another file for improved clarity --- INSTALL.md | 30 ++++++------------------------ INSTALL_Meson.md | 23 +++++++++++++++++++++++ meson.build | 5 ++--- 3 files changed, 31 insertions(+), 27 deletions(-) create mode 100644 INSTALL_Meson.md diff --git a/INSTALL.md b/INSTALL.md index c983e11a..658716df 100644 --- a/INSTALL.md +++ b/INSTALL.md @@ -13,7 +13,7 @@ Installation - python should be installed - gnuplot should be installed -**Note: The `build_things.sh` script assumes that TDEP was cloned and lives in a git repository. If you wish obtain TDEP in another you have to adjust the script.** +**Note: The `build_things.sh` script assumes that TDEP was cloned and lives in a git repository. If you wish obtain TDEP in another way you have to adjust the script.** **If you have a package manager, `homebrew`, `apt-get`, `yay`, `pacman`, you name it, getting these dependencies should be straightforward.** @@ -78,29 +78,6 @@ i.e., add the respective lines to your `.bashrc` and you are all set up! **If problems occur, please look at the [Troubleshooting section below](#Troubleshooting). If you cannot fix the error, please reach out, e.g., via the [issue tracker](https://github.com/tdep-developers/tdep/issues).** -## Meson build system - -Alternativaly to the `build_things.sh` script, there is also the possibility to use [Meson](https://mesonbuild.com/). It is a build automation tool, and it supports incremental builds. The dependencies should be installed in standard locations (e.g. `/usr/local/`) or specified in the `PKG_CONFIG_PATH`. - -First setup the git version for the code: -```setup_git_version.sh``` -Then you can run the configuration step: -```meson setup build``` -And finally compile the code: -``` -cd build -meson compile -meson install -``` - -If some dependencies are not found, please make sure that they are in your PKG_CONFIG_PATH. For example, put something of the form in your `.bashrc` / `.bash_profile` : -```export PKG_CONFIG_PATH="/path/to/your/netcdf/:${PKG_CONFIG_PATH}"``` -Depending on the method used to install the required libraries, they may not be automatically put inside the search path (Homebrew is known to not always do it). -You can make sure that `pkg-config` is able to find the dependencies by running: `pkg-config --libs hdf5` -Meson will first try to find dependencies via `pkg-config`. If it does not find them, it will try to use CMake (if installed/loaded). - -Once the configuration step is done, everything should go smoothly. The binaries will be in build/bin/executable_name. - ## Check your installation We advise to run the tests in [`./tests`](./tests) to check your installation. @@ -122,6 +99,7 @@ where `FC` and `CC` should point to the same Fortran/C compilers you are using t - [macOS](#macOS) - [Supercomputers](#Supercomputers) - [Platform-agnostic installation using Anaconda](#Anaconda) +- [Platform-agnostic installation using the Meson build system](#Meson) ## macOS @@ -146,6 +124,10 @@ There are two template settings files you can look into: One convenient, (mostly) platform-agnostic way to install TDEP is to use [Anaconda](https://anaconda.org/). +## Meson build system + +To use the Meson build system instead of the `build_things.sh` script, see [INSTALL_Meson.md](INSTALL_Meson.md). + ### Prepare environment diff --git a/INSTALL_Meson.md b/INSTALL_Meson.md new file mode 100644 index 00000000..dc8241ce --- /dev/null +++ b/INSTALL_Meson.md @@ -0,0 +1,23 @@ +Installation with the Meson build system +=== + +Alternativaly to the `build_things.sh` script, there is also the possibility to use [Meson](https://mesonbuild.com/). It is a build automation tool, and it supports incremental builds. The dependencies should be installed in standard locations (e.g. `/usr/local/`) or specified in the `PKG_CONFIG_PATH`. + +First setup the git version for the code: +```setup_git_version.sh``` +Then you can run the configuration step: +```meson setup build``` +And finally compile the code: +``` +cd build +meson compile +meson install +``` + +If some dependencies are not found, please make sure that they are in your PKG_CONFIG_PATH. For example, put a line of the form in your `.bashrc` / `.bash_profile` : +```export PKG_CONFIG_PATH="/path/to/your/hdf5/:${PKG_CONFIG_PATH}"``` +Depending on the method used to install the required libraries, they may not be automatically put inside the search path (Homebrew is known to not always do it). +You can make sure that `pkg-config` is able to find the dependencies by running: `pkg-config --libs hdf5` +Meson will first try to find dependencies via `pkg-config`. If it does not find them, it will try to use CMake (if installed/loaded). + +Once the configuration step is done, everything should go smoothly. The binaries will be in build/bin/executable_name. diff --git a/meson.build b/meson.build index 8fa7a0fe..ec3e9ead 100644 --- a/meson.build +++ b/meson.build @@ -28,11 +28,10 @@ dep_lapack = dependency('lapack') # fft dep_fftw = dependency('fftw3') -# hdf5 + netcdf +# hdf5 dep_hdf5 = dependency('hdf5', language: 'fortran', version: '>1.10.7') -dep_netcdf = dependency('netcdf', language: 'fortran') -dep_all = [dep_mpi, dep_blas, dep_lapack, dep_fftw, dep_hdf5, dep_netcdf] +dep_all = [dep_mpi, dep_blas, dep_lapack, dep_fftw, dep_hdf5] subdir('src/libolle') subdir('src/libflap') From 654e6334b9c6ff1bc890d2ff6ac781afca7ab8da Mon Sep 17 00:00:00 2001 From: Max Mignolet Date: Fri, 16 Jan 2026 15:59:46 +0100 Subject: [PATCH 03/13] typo --- INSTALL.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/INSTALL.md b/INSTALL.md index 658716df..b0fc54c6 100644 --- a/INSTALL.md +++ b/INSTALL.md @@ -99,7 +99,7 @@ where `FC` and `CC` should point to the same Fortran/C compilers you are using t - [macOS](#macOS) - [Supercomputers](#Supercomputers) - [Platform-agnostic installation using Anaconda](#Anaconda) -- [Platform-agnostic installation using the Meson build system](#Meson) +- [Platform-agnostic installation using the Meson build system](#Meson-build-system) ## macOS From fe1a2508e726f7ba87045cd1d23de049b5a68438 Mon Sep 17 00:00:00 2001 From: Max Mignolet Date: Sun, 18 Jan 2026 18:21:19 +0100 Subject: [PATCH 04/13] add support for apple accelerate framework --- meson.build | 24 ++++++++++++++++++------ meson.options | 4 ++++ 2 files changed, 22 insertions(+), 6 deletions(-) create mode 100644 meson.options diff --git a/meson.build b/meson.build index ec3e9ead..f35a7201 100644 --- a/meson.build +++ b/meson.build @@ -13,12 +13,23 @@ add_project_arguments('-fallow-argument-mismatch', language: 'fortran') dep_mpi = dependency('mpi', language: 'fortran') # linear algebra -dep_blas = dependency('blas', required: false) -if not dep_blas.found() - message('Did not find the blas library. Trying with openblas') - dep_blas = dependency('openblas', required: true) # required as it is the last try +dep_linalg_found = false +# 1) try accelerate framework for macos (if wanted) +if build_machine.system() == 'darwin' and get_option('accfrmwrk') == true + dep_linalg = dependency('appleframeworks', modules : 'accelerate', required: false) + dep_linalg_found = dep_linalg.found() +endif + +# 2) try blas/openblas + lapack otherwise +if not dep_linalg_found + dep_blas = dependency('blas', required: false) + if not dep_blas.found() + message('Did not find the blas library. Trying with openblas') + dep_blas = dependency('openblas', required: true) # required as it is the last try + endif + dep_lapack = dependency('lapack', required: true) + dep_linalg = [dep_blas, dep_lapack] endif -dep_lapack = dependency('lapack') # # add some common path to pkg-config search path # env = environ() # env.prepend('PKG_CONFIG_PATH', '/usr/lib/x86_64-linux-gnu') @@ -31,7 +42,8 @@ dep_fftw = dependency('fftw3') # hdf5 dep_hdf5 = dependency('hdf5', language: 'fortran', version: '>1.10.7') -dep_all = [dep_mpi, dep_blas, dep_lapack, dep_fftw, dep_hdf5] +# dep_all = [dep_mpi, dep_blas, dep_lapack, dep_fftw, dep_hdf5] +dep_all = [dep_mpi, dep_linalg, dep_fftw, dep_hdf5] subdir('src/libolle') subdir('src/libflap') diff --git a/meson.options b/meson.options new file mode 100644 index 00000000..aef259e9 --- /dev/null +++ b/meson.options @@ -0,0 +1,4 @@ +# wether to use the apple accelerate framework on macos +option('accfrmwrk', type : 'boolean', value : false) +# option('linalg_flavor', type : 'combo', choices : ['auto', 'lapack', 'mkl']) +# option('fft_flavor', type : 'combo', choices : ['auto', 'fftw', 'mkl_dfti']) From c0c2af72386c1bcfbe33d1aa038421a2e8e51bc5 Mon Sep 17 00:00:00 2001 From: Max Mignolet Date: Wed, 28 Jan 2026 13:34:42 +0100 Subject: [PATCH 05/13] add github CI integration --- .github/workflows/ci_simple_compilation_and_test.yml | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) diff --git a/.github/workflows/ci_simple_compilation_and_test.yml b/.github/workflows/ci_simple_compilation_and_test.yml index 42786aea..b973d248 100644 --- a/.github/workflows/ci_simple_compilation_and_test.yml +++ b/.github/workflows/ci_simple_compilation_and_test.yml @@ -48,8 +48,18 @@ jobs: cat .github/important_settings.fastcompile >> important_settings cat .github/important_settings.x86_64_debugflags >> important_settings bash build_things.sh --nthreads_make ${{ env.N_THREADS }} - - name: compile TDEP production + rm -r build # clean build dir + - name: compile TDEP with meson if: steps.compile_debug.outcome == 'success' + id: compile_meson + run: | + meson setup build + cd build + meson compile + meson install + rm -r build # clean build dir + - name: compile TDEP production + if: steps.compile_meson.outcome == 'success' id: compile_production run: | cd ${{ github.workspace }} From 2e14a284e3cd766fe0571349001808b01125e2f3 Mon Sep 17 00:00:00 2001 From: Max Mignolet Date: Wed, 28 Jan 2026 13:52:22 +0100 Subject: [PATCH 06/13] add meson to installed packages --- .github/workflows/ci_simple_compilation_and_test.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/.github/workflows/ci_simple_compilation_and_test.yml b/.github/workflows/ci_simple_compilation_and_test.yml index b973d248..3e796fa3 100644 --- a/.github/workflows/ci_simple_compilation_and_test.yml +++ b/.github/workflows/ci_simple_compilation_and_test.yml @@ -40,6 +40,7 @@ jobs: libopenmpi-dev \ libfftw3-dev \ libscalapack-openmpi-dev + sudo pip3 install --upgrade meson - name: compile TDEP with debug flags id: compile_debug run: | From 1c8005329388226875c1203ee086380bce103479 Mon Sep 17 00:00:00 2001 From: Max Mignolet Date: Sat, 31 Jan 2026 20:41:40 +0100 Subject: [PATCH 07/13] modif ci to fix meson compilation --- .github/workflows/ci_simple_compilation_and_test.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/.github/workflows/ci_simple_compilation_and_test.yml b/.github/workflows/ci_simple_compilation_and_test.yml index 3e796fa3..02a70cc7 100644 --- a/.github/workflows/ci_simple_compilation_and_test.yml +++ b/.github/workflows/ci_simple_compilation_and_test.yml @@ -40,6 +40,7 @@ jobs: libopenmpi-dev \ libfftw3-dev \ libscalapack-openmpi-dev + export PKG_CONFIG_PATH="/usr/lib/x86_64-linux-gnu/pkgconfig:${PKG_CONFIG_PATH}" sudo pip3 install --upgrade meson - name: compile TDEP with debug flags id: compile_debug From d368c211baf3b0754126640f2be7133f384057ad Mon Sep 17 00:00:00 2001 From: Max Mignolet Date: Sat, 31 Jan 2026 22:39:02 +0100 Subject: [PATCH 08/13] solve issue with meson/pkg-config/system paths --- .github/workflows/ci_simple_compilation_and_test.yml | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/.github/workflows/ci_simple_compilation_and_test.yml b/.github/workflows/ci_simple_compilation_and_test.yml index 02a70cc7..b3232a2e 100644 --- a/.github/workflows/ci_simple_compilation_and_test.yml +++ b/.github/workflows/ci_simple_compilation_and_test.yml @@ -40,8 +40,13 @@ jobs: libopenmpi-dev \ libfftw3-dev \ libscalapack-openmpi-dev - export PKG_CONFIG_PATH="/usr/lib/x86_64-linux-gnu/pkgconfig:${PKG_CONFIG_PATH}" + sudo pip3 install --upgrade meson + # to circumvent meson issue with system path & pkg-config + # https://github.com/mesonbuild/meson/issues/12993 + # https://github.com/mesonbuild/meson/issues/11088 + export PKG_CONFIG_ALLOW_SYSTEM_LIBS=1 + export PKG_CONFIG_ALLOW_SYSTEM_CFLAGS=1 - name: compile TDEP with debug flags id: compile_debug run: | From 53e85aaf77e75e3409df389a0f2742cb9c71874f Mon Sep 17 00:00:00 2001 From: Max Mignolet Date: Sat, 31 Jan 2026 23:00:51 +0100 Subject: [PATCH 09/13] fix meson CI issue --- .github/workflows/ci_simple_compilation_and_test.yml | 2 ++ 1 file changed, 2 insertions(+) diff --git a/.github/workflows/ci_simple_compilation_and_test.yml b/.github/workflows/ci_simple_compilation_and_test.yml index b3232a2e..96e7d4ce 100644 --- a/.github/workflows/ci_simple_compilation_and_test.yml +++ b/.github/workflows/ci_simple_compilation_and_test.yml @@ -47,6 +47,8 @@ jobs: # https://github.com/mesonbuild/meson/issues/11088 export PKG_CONFIG_ALLOW_SYSTEM_LIBS=1 export PKG_CONFIG_ALLOW_SYSTEM_CFLAGS=1 + # this is only supported by pkgconf and not by pkg-config (default on Ubuntu) + sudo apt-get install -y pkgconf - name: compile TDEP with debug flags id: compile_debug run: | From d106788c7ef11602d82cd4f2770d25823f443b9b Mon Sep 17 00:00:00 2001 From: Max Mignolet Date: Fri, 27 Feb 2026 22:16:16 +0100 Subject: [PATCH 10/13] attempt at fixing github CI --- .github/workflows/ci_simple_compilation_and_test.yml | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/.github/workflows/ci_simple_compilation_and_test.yml b/.github/workflows/ci_simple_compilation_and_test.yml index 96e7d4ce..f9af9f05 100644 --- a/.github/workflows/ci_simple_compilation_and_test.yml +++ b/.github/workflows/ci_simple_compilation_and_test.yml @@ -48,7 +48,8 @@ jobs: export PKG_CONFIG_ALLOW_SYSTEM_LIBS=1 export PKG_CONFIG_ALLOW_SYSTEM_CFLAGS=1 # this is only supported by pkgconf and not by pkg-config (default on Ubuntu) - sudo apt-get install -y pkgconf + # sudo apt-get install -y pkgconf # too old, have to use brew's version + brew install pkgconf - name: compile TDEP with debug flags id: compile_debug run: | From 75a5cbce389ae64df08987d68902b11c2ed2ef9a Mon Sep 17 00:00:00 2001 From: Max Mignolet Date: Fri, 27 Feb 2026 22:29:50 +0100 Subject: [PATCH 11/13] attempt at fixing github CI --- .github/workflows/ci_simple_compilation_and_test.yml | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/.github/workflows/ci_simple_compilation_and_test.yml b/.github/workflows/ci_simple_compilation_and_test.yml index f9af9f05..3958e7c8 100644 --- a/.github/workflows/ci_simple_compilation_and_test.yml +++ b/.github/workflows/ci_simple_compilation_and_test.yml @@ -47,9 +47,7 @@ jobs: # https://github.com/mesonbuild/meson/issues/11088 export PKG_CONFIG_ALLOW_SYSTEM_LIBS=1 export PKG_CONFIG_ALLOW_SYSTEM_CFLAGS=1 - # this is only supported by pkgconf and not by pkg-config (default on Ubuntu) - # sudo apt-get install -y pkgconf # too old, have to use brew's version - brew install pkgconf + sudo apt-get install -y pkg-config - name: compile TDEP with debug flags id: compile_debug run: | From fc1559b28b8ba36ec4298d17f37c3afcc9665591 Mon Sep 17 00:00:00 2001 From: Max Mignolet Date: Fri, 27 Feb 2026 23:07:21 +0100 Subject: [PATCH 12/13] attempt at fixing github CI --- .github/workflows/ci_simple_compilation_and_test.yml | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/.github/workflows/ci_simple_compilation_and_test.yml b/.github/workflows/ci_simple_compilation_and_test.yml index 3958e7c8..168ba585 100644 --- a/.github/workflows/ci_simple_compilation_and_test.yml +++ b/.github/workflows/ci_simple_compilation_and_test.yml @@ -47,7 +47,13 @@ jobs: # https://github.com/mesonbuild/meson/issues/11088 export PKG_CONFIG_ALLOW_SYSTEM_LIBS=1 export PKG_CONFIG_ALLOW_SYSTEM_CFLAGS=1 - sudo apt-get install -y pkg-config + # sudo apt-get install -y pkg-config # this version is too old... manual install + wget https://distfiles.ariadne.space/pkgconf/pkgconf-2.5.1.tar.xz + tar -xf pkgconf-2.5.1.tar.xz + cd pkgconf-2.5.1 + ./configure --prefix=/usr + make + sudo make install - name: compile TDEP with debug flags id: compile_debug run: | From abebc03fda16d06465434b8d79038267f9cdd272 Mon Sep 17 00:00:00 2001 From: Max Mignolet Date: Sat, 28 Feb 2026 13:45:41 +0100 Subject: [PATCH 13/13] fix CI --- .../ci_simple_compilation_and_test.yml | 19 ++++++++++++------- 1 file changed, 12 insertions(+), 7 deletions(-) diff --git a/.github/workflows/ci_simple_compilation_and_test.yml b/.github/workflows/ci_simple_compilation_and_test.yml index 168ba585..515d8c2d 100644 --- a/.github/workflows/ci_simple_compilation_and_test.yml +++ b/.github/workflows/ci_simple_compilation_and_test.yml @@ -47,13 +47,16 @@ jobs: # https://github.com/mesonbuild/meson/issues/11088 export PKG_CONFIG_ALLOW_SYSTEM_LIBS=1 export PKG_CONFIG_ALLOW_SYSTEM_CFLAGS=1 - # sudo apt-get install -y pkg-config # this version is too old... manual install - wget https://distfiles.ariadne.space/pkgconf/pkgconf-2.5.1.tar.xz - tar -xf pkgconf-2.5.1.tar.xz - cd pkgconf-2.5.1 - ./configure --prefix=/usr - make - sudo make install + export PKG_CONFIG_PATH="/usr/lib/x86_64-linux-gnu/pkgconfig:${PKG_CONFIG_PATH}" + sudo apt-get install -y pkg-config # this version is too old... manual install + # wget https://distfiles.ariadne.space/pkgconf/pkgconf-2.5.1.tar.xz + # tar -xf pkgconf-2.5.1.tar.xz + # cd pkgconf-2.5.1 + # ./configure --prefix=/usr + # make + # sudo make install + # sudo ln -s pkgconf /usr/bin/pkg-config + # cd .. - name: compile TDEP with debug flags id: compile_debug run: | @@ -67,10 +70,12 @@ jobs: if: steps.compile_debug.outcome == 'success' id: compile_meson run: | + ./setup_git_version.sh meson setup build cd build meson compile meson install + cd .. rm -r build # clean build dir - name: compile TDEP production if: steps.compile_meson.outcome == 'success'