From 7f3ffe3b208fdf3ec8ad80587e411d276a28690f Mon Sep 17 00:00:00 2001 From: Alexis Montoison Date: Wed, 10 Jul 2024 16:18:19 -0400 Subject: [PATCH 01/15] Test GALAHAD with PASTIX --- .github/meson/action.yml | 15 +++++++++++++++ 1 file changed, 15 insertions(+) diff --git a/.github/meson/action.yml b/.github/meson/action.yml index 59c6bd9733..ab294ac790 100644 --- a/.github/meson/action.yml +++ b/.github/meson/action.yml @@ -202,6 +202,19 @@ runs: wget https://github.com/JuliaBinaryWrappers/METIS_jll.jl/releases/download/METIS-v${VERSION_METIS}%2B0/METIS.v${VERSION_METIS}.$PLATFORM.tar.gz tar -xzvf METIS.v${VERSION_METIS}.$PLATFORM.tar.gz -C deps + - name: Install PASTIX + if: inputs.int == '32' && inputs.os == 'ubuntu-latest' && inputs.compiler == 'gcc' + shell: bash + run: | + cd .. + mkdir -p deps + VERSION_SCOTCH="7.4.0" + VERSION_PASTIX="6.3.0" + wget https://github.com/JuliaBinaryWrappers/SCOTCH_jll.jl/releases/download/SCOTCH-v${VERSION_SCOTCH}%2B0/SCOTCH.v${VERSION_SCOTCH}.$PLATFORM.tar.gz + tar -xzvf SCOTCH.v${VERSION_SCOTCH}.$PLATFORM.tar.gz -C deps + wget https://github.com/JuliaBinaryWrappers/PaStiX_jll.jl/releases/download/PaStiX-v${VERSION_PASTIX}%2B0/PaStiX.v${VERSION_PASTIX}.$PLATFORM-libgfortran5.tar.gz + tar -xzvf PaStiX.v${VERSION_PASTIX}.$PLATFORM-libgfortran5.tar.gz -C deps + - name: Install MKL if: inputs.os == 'ubuntu-latest' && inputs.compiler == 'intel' shell: bash @@ -297,6 +310,8 @@ runs: -Dliblapack=${LAPACK} \ -Dfortran_link_args=${LD_CLASSIC} \ -Dc_link_args=${LD_CLASSIC} \ + -Dlibspmf_path=$DEPS/deps/${LIBDIR} \ + -Dlibpastixf_path=$DEPS/deps/${LIBDIR} \ -Dlibsmumps=${MUMPS_SINGLE} \ -Dlibdmumps=${MUMPS_DOUBLE} \ -Dlibmumps_path=$DEPS/deps/${LIBDIR} \ From 313d83f2c0e28c4f9f9209cd9e66a1038ba93a21 Mon Sep 17 00:00:00 2001 From: Alexis Montoison Date: Wed, 10 Jul 2024 16:23:37 -0400 Subject: [PATCH 02/15] Test GALAHAD with PASTIX --- .github/meson/action.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/meson/action.yml b/.github/meson/action.yml index ab294ac790..f5ac6335fe 100644 --- a/.github/meson/action.yml +++ b/.github/meson/action.yml @@ -208,7 +208,7 @@ runs: run: | cd .. mkdir -p deps - VERSION_SCOTCH="7.4.0" + VERSION_SCOTCH="7.0.4" VERSION_PASTIX="6.3.0" wget https://github.com/JuliaBinaryWrappers/SCOTCH_jll.jl/releases/download/SCOTCH-v${VERSION_SCOTCH}%2B0/SCOTCH.v${VERSION_SCOTCH}.$PLATFORM.tar.gz tar -xzvf SCOTCH.v${VERSION_SCOTCH}.$PLATFORM.tar.gz -C deps From eca97799dbc2a71fdd1cb30df6a15abdf3d3a9da Mon Sep 17 00:00:00 2001 From: Alexis Montoison Date: Wed, 10 Jul 2024 17:04:57 -0400 Subject: [PATCH 03/15] Test GALAHAD with PASTIX --- .github/meson/action.yml | 2 ++ README.meson | 6 ++++-- meson.build | 10 ++++++---- meson_options.txt | 10 ++++++++++ 4 files changed, 22 insertions(+), 6 deletions(-) diff --git a/.github/meson/action.yml b/.github/meson/action.yml index f5ac6335fe..9b136f61f9 100644 --- a/.github/meson/action.yml +++ b/.github/meson/action.yml @@ -311,7 +311,9 @@ runs: -Dfortran_link_args=${LD_CLASSIC} \ -Dc_link_args=${LD_CLASSIC} \ -Dlibspmf_path=$DEPS/deps/${LIBDIR} \ + -Dlibspmf_modules=../deps/include/spm \ -Dlibpastixf_path=$DEPS/deps/${LIBDIR} \ + -Dlibpastixf_modules=../deps/include/pastix \ -Dlibsmumps=${MUMPS_SINGLE} \ -Dlibdmumps=${MUMPS_DOUBLE} \ -Dlibmumps_path=$DEPS/deps/${LIBDIR} \ diff --git a/README.meson b/README.meson index 296d4515dd..da7d1b801f 100644 --- a/README.meson +++ b/README.meson @@ -86,7 +86,7 @@ Currently supported options with their default value: * `-Dlibwsmp=wsmp`: WSMP library against which to link; * `-Dlibpardiso=pardiso`: PARDISO library against which to link; * `-Dlibspmf=spmf`: SPMF library against which to link; -* `-Dlibpastix=pastix`: PASTIX library against which to link; +* `-Dlibpastixf=pastixf`: PASTIXF library against which to link; * `-Dlibsmumps=smumps`: Single-precision MUMPS library against which to link; * `-Dlibdmumps=dmumps`: Double-precision MUMPS library against which to link; * `-Dlibampl=ampl`: AMPL library against which to link; @@ -98,13 +98,15 @@ Currently supported options with their default value: * `-Dlibwsmp_path=[]`: additional directories to search for the WSMP library; * `-Dlibpardiso_path=[]`: additional directories to search for the PARDISO library; * `-Dlibspmf_path=[]`: additional directories to search for the SPMF library; -* `-Dlibpastix_path=[]`: additional directories to search for the PASTIX library; +* `-Dlibpastixf_path=[]`: additional directories to search for the PASTIXF library; * `-Dlibmumps_path=[]`: additional directories to search for the MUMPS libraries; * `-Dlibampl_path=[]`: additional directories to search for the AMPL library library; * `-Dlibhwloc_path=[]`: additional directories to search for the HWLOC library; * `-Dlibhwloc_include=[]`: additional directories to search for the HWLOC header files; * `-Dlibhsl_modules[]`: additional directories to search for the HSL modules; * `-Dlibcutest_modules[]`: additional directories to search for the CUTEst modules; +* `-Dlibspmf_modules=[]`: additional directories to search for the SPMF modules; +* `-Dlibpastixf_modules=[]`: additional directories to search for the PASTIXF modules; * `-Dint64=false`: compile GALAHAD with 64-bit integer. Non-default compilers can be selected by setting the `CC`, `CXX` and diff --git a/meson.build b/meson.build index d757e4811d..93875c010b 100644 --- a/meson.build +++ b/meson.build @@ -115,6 +115,8 @@ libhwloc_path = get_option('libhwloc_path') libhwloc_include = include_directories(get_option('libhwloc_include')) libhsl_modules = include_directories(get_option('libhsl_modules')) libcutest_modules = include_directories(get_option('libcutest_modules')) +libspmf_modules = include_directories(get_option('libspmf_modules')) +libpastixf_modules = include_directories(get_option('libpastixf_modules')) # Dependencies libblas = fc.find_library(libblas_name, dirs : libblas_path, required : false) @@ -245,10 +247,10 @@ galahad_c_tests = [] galahad_python_tests = [] # Folders that contain headers and Fortran modules -libgalahad_include = [include_directories('include'), - include_directories('src/dum/include'), - include_directories('src/metis/include'), - include_directories('src/ampl')] + libhsl_modules + libcutest_modules + libhwloc_include +libgalahad_include = [include_directories('include'), include_directories('src/dum/include'), + include_directories('src/metis/include'), include_directories('src/ampl')] +libgalahad_include = libgalahad_include + libhwloc_include + libhsl_modules + + libcutest_modules + libspmf_modules + libpastixf_modules if host_machine.system() == 'linux' add_global_arguments('-DSPRAL_HAVE_SCHED_GETCPU', language : 'cpp') diff --git a/meson_options.txt b/meson_options.txt index 07f6cc4ffe..462da50fbc 100644 --- a/meson_options.txt +++ b/meson_options.txt @@ -188,6 +188,16 @@ option('libcutest_modules', value : [], description : 'Additional directories to search for the CUTEST modules') +option('libspmf_modules', + type : 'array', + value : [], + description : 'Additional directories to search for the SPMF modules') + +option('libpastixf_modules', + type : 'array', + value : [], + description : 'Additional directories to search for the PASTIXF modules') + option('int64', type : 'boolean', value : false, From 6bd9a4c12ed00d68bb38d930bca636a53fe2ec60 Mon Sep 17 00:00:00 2001 From: Alexis Montoison Date: Wed, 10 Jul 2024 17:15:54 -0400 Subject: [PATCH 04/15] Test GALAHAD with PASTIX --- .github/meson/action.yml | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/.github/meson/action.yml b/.github/meson/action.yml index 9b136f61f9..91885b3832 100644 --- a/.github/meson/action.yml +++ b/.github/meson/action.yml @@ -233,6 +233,7 @@ runs: mkdir -p ../deps/${LIBDIR} mkdir -p ../deps/modules mkdir -p ../CUTEst/modules + mkdir -p ../deps/include CSTD="c99" CPPSTD="c++11" INT64="false" @@ -311,9 +312,9 @@ runs: -Dfortran_link_args=${LD_CLASSIC} \ -Dc_link_args=${LD_CLASSIC} \ -Dlibspmf_path=$DEPS/deps/${LIBDIR} \ - -Dlibspmf_modules=../deps/include/spm \ + -Dlibspmf_modules=../deps/include \ -Dlibpastixf_path=$DEPS/deps/${LIBDIR} \ - -Dlibpastixf_modules=../deps/include/pastix \ + -Dlibpastixf_modules=../deps/include \ -Dlibsmumps=${MUMPS_SINGLE} \ -Dlibdmumps=${MUMPS_DOUBLE} \ -Dlibmumps_path=$DEPS/deps/${LIBDIR} \ From 90227cb105b8e1d3a7f22ccef8efface543a1356 Mon Sep 17 00:00:00 2001 From: Alexis Montoison Date: Wed, 10 Jul 2024 17:24:02 -0400 Subject: [PATCH 05/15] Test GALAHAD with PASTIX --- .github/meson/action.yml | 3 +++ 1 file changed, 3 insertions(+) diff --git a/.github/meson/action.yml b/.github/meson/action.yml index 91885b3832..36b5460a0a 100644 --- a/.github/meson/action.yml +++ b/.github/meson/action.yml @@ -210,10 +210,13 @@ runs: mkdir -p deps VERSION_SCOTCH="7.0.4" VERSION_PASTIX="6.3.0" + VERSION_HWLOC="2.11.0" wget https://github.com/JuliaBinaryWrappers/SCOTCH_jll.jl/releases/download/SCOTCH-v${VERSION_SCOTCH}%2B0/SCOTCH.v${VERSION_SCOTCH}.$PLATFORM.tar.gz tar -xzvf SCOTCH.v${VERSION_SCOTCH}.$PLATFORM.tar.gz -C deps wget https://github.com/JuliaBinaryWrappers/PaStiX_jll.jl/releases/download/PaStiX-v${VERSION_PASTIX}%2B0/PaStiX.v${VERSION_PASTIX}.$PLATFORM-libgfortran5.tar.gz tar -xzvf PaStiX.v${VERSION_PASTIX}.$PLATFORM-libgfortran5.tar.gz -C deps + wget https://github.com/JuliaBinaryWrappers/Hwloc_jll.jl/releases/download/Hwloc-v${VERSION_HWLOC}%2B0/Hwloc.v${VERSION_HWLOC}.$PLATFORM.tar.gz + tar -xzvf Hwloc.v${VERSION_HWLOC}.$PLATFORM.tar.gz -C deps - name: Install MKL if: inputs.os == 'ubuntu-latest' && inputs.compiler == 'intel' From da0bdaa53a337b14f31a80942d42205bd7b1bab0 Mon Sep 17 00:00:00 2001 From: Alexis Montoison Date: Thu, 11 Jul 2024 12:43:15 -0400 Subject: [PATCH 06/15] Update action.yml --- .github/meson/action.yml | 19 +++++++++++++++++-- 1 file changed, 17 insertions(+), 2 deletions(-) diff --git a/.github/meson/action.yml b/.github/meson/action.yml index 36b5460a0a..4aa5c51b4b 100644 --- a/.github/meson/action.yml +++ b/.github/meson/action.yml @@ -213,10 +213,25 @@ runs: VERSION_HWLOC="2.11.0" wget https://github.com/JuliaBinaryWrappers/SCOTCH_jll.jl/releases/download/SCOTCH-v${VERSION_SCOTCH}%2B0/SCOTCH.v${VERSION_SCOTCH}.$PLATFORM.tar.gz tar -xzvf SCOTCH.v${VERSION_SCOTCH}.$PLATFORM.tar.gz -C deps - wget https://github.com/JuliaBinaryWrappers/PaStiX_jll.jl/releases/download/PaStiX-v${VERSION_PASTIX}%2B0/PaStiX.v${VERSION_PASTIX}.$PLATFORM-libgfortran5.tar.gz - tar -xzvf PaStiX.v${VERSION_PASTIX}.$PLATFORM-libgfortran5.tar.gz -C deps wget https://github.com/JuliaBinaryWrappers/Hwloc_jll.jl/releases/download/Hwloc-v${VERSION_HWLOC}%2B0/Hwloc.v${VERSION_HWLOC}.$PLATFORM.tar.gz tar -xzvf Hwloc.v${VERSION_HWLOC}.$PLATFORM.tar.gz -C deps + # wget https://github.com/JuliaBinaryWrappers/PaStiX_jll.jl/releases/download/PaStiX-v${VERSION_PASTIX}%2B0/PaStiX.v${VERSION_PASTIX}.$PLATFORM-libgfortran5.tar.gz + # tar -xzvf PaStiX.v${VERSION_PASTIX}.$PLATFORM-libgfortran5.tar.gz -C deps + git clone https://gitlab.inria.fr/solverstack/pastix.git + cd pastix + git submodule update --init --recursive + mkdir build + cd build + cmake .. \ + -DBUILD_SHARED_LIBS=ON \ + -DBUILD_DOCUMENTATION=OFF \ + -DCMAKE_INSTALL_PREFIX=$DEPS/deps \ + -DCMAKE_BUILD_TYPE=Release \ + -DPASTIX_INT64=OFF \ + -DPASTIX_ORDERING_SCOTCH=ON \ + -DPASTIX_ORDERING_METIS=ON + make -j4 + make install - name: Install MKL if: inputs.os == 'ubuntu-latest' && inputs.compiler == 'intel' From 8790b3b7e6b917222bdee74369d8b7218d74afbb Mon Sep 17 00:00:00 2001 From: Alexis Montoison Date: Thu, 11 Jul 2024 12:54:36 -0400 Subject: [PATCH 07/15] Update action.yml --- .github/meson/action.yml | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/.github/meson/action.yml b/.github/meson/action.yml index 4aa5c51b4b..81618d35e4 100644 --- a/.github/meson/action.yml +++ b/.github/meson/action.yml @@ -213,10 +213,11 @@ runs: VERSION_HWLOC="2.11.0" wget https://github.com/JuliaBinaryWrappers/SCOTCH_jll.jl/releases/download/SCOTCH-v${VERSION_SCOTCH}%2B0/SCOTCH.v${VERSION_SCOTCH}.$PLATFORM.tar.gz tar -xzvf SCOTCH.v${VERSION_SCOTCH}.$PLATFORM.tar.gz -C deps - wget https://github.com/JuliaBinaryWrappers/Hwloc_jll.jl/releases/download/Hwloc-v${VERSION_HWLOC}%2B0/Hwloc.v${VERSION_HWLOC}.$PLATFORM.tar.gz - tar -xzvf Hwloc.v${VERSION_HWLOC}.$PLATFORM.tar.gz -C deps + # wget https://github.com/JuliaBinaryWrappers/Hwloc_jll.jl/releases/download/Hwloc-v${VERSION_HWLOC}%2B0/Hwloc.v${VERSION_HWLOC}.$PLATFORM.tar.gz + # tar -xzvf Hwloc.v${VERSION_HWLOC}.$PLATFORM.tar.gz -C deps # wget https://github.com/JuliaBinaryWrappers/PaStiX_jll.jl/releases/download/PaStiX-v${VERSION_PASTIX}%2B0/PaStiX.v${VERSION_PASTIX}.$PLATFORM-libgfortran5.tar.gz # tar -xzvf PaStiX.v${VERSION_PASTIX}.$PLATFORM-libgfortran5.tar.gz -C deps + brew install hwloc git clone https://gitlab.inria.fr/solverstack/pastix.git cd pastix git submodule update --init --recursive From 59bcf9836c98ed487e67b9519a7929c618f8ef06 Mon Sep 17 00:00:00 2001 From: Alexis Montoison Date: Thu, 11 Jul 2024 12:58:02 -0400 Subject: [PATCH 08/15] Update action.yml --- .github/meson/action.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/meson/action.yml b/.github/meson/action.yml index 81618d35e4..4e18975d39 100644 --- a/.github/meson/action.yml +++ b/.github/meson/action.yml @@ -217,7 +217,7 @@ runs: # tar -xzvf Hwloc.v${VERSION_HWLOC}.$PLATFORM.tar.gz -C deps # wget https://github.com/JuliaBinaryWrappers/PaStiX_jll.jl/releases/download/PaStiX-v${VERSION_PASTIX}%2B0/PaStiX.v${VERSION_PASTIX}.$PLATFORM-libgfortran5.tar.gz # tar -xzvf PaStiX.v${VERSION_PASTIX}.$PLATFORM-libgfortran5.tar.gz -C deps - brew install hwloc + sudo apt-get -y install libhwloc-dev git clone https://gitlab.inria.fr/solverstack/pastix.git cd pastix git submodule update --init --recursive From dd04b8a35f507fc1fb230af17507e369a25ea30b Mon Sep 17 00:00:00 2001 From: Alexis Montoison Date: Thu, 11 Jul 2024 13:05:55 -0400 Subject: [PATCH 09/15] Update action.yml --- .github/meson/action.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/meson/action.yml b/.github/meson/action.yml index 4e18975d39..3ce132dd64 100644 --- a/.github/meson/action.yml +++ b/.github/meson/action.yml @@ -331,9 +331,9 @@ runs: -Dfortran_link_args=${LD_CLASSIC} \ -Dc_link_args=${LD_CLASSIC} \ -Dlibspmf_path=$DEPS/deps/${LIBDIR} \ - -Dlibspmf_modules=../deps/include \ + -Dlibspmf_modules=../deps/include/spm \ -Dlibpastixf_path=$DEPS/deps/${LIBDIR} \ - -Dlibpastixf_modules=../deps/include \ + -Dlibpastixf_modules=../deps/include/pastix \ -Dlibsmumps=${MUMPS_SINGLE} \ -Dlibdmumps=${MUMPS_DOUBLE} \ -Dlibmumps_path=$DEPS/deps/${LIBDIR} \ From 9816a5333ecbe2e5da7c05c0f5c44bef18c109d6 Mon Sep 17 00:00:00 2001 From: Alexis Montoison Date: Thu, 11 Jul 2024 13:18:46 -0400 Subject: [PATCH 10/15] Update action.yml --- .github/meson/action.yml | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/.github/meson/action.yml b/.github/meson/action.yml index 3ce132dd64..4a264d97d5 100644 --- a/.github/meson/action.yml +++ b/.github/meson/action.yml @@ -252,7 +252,8 @@ runs: mkdir -p ../deps/${LIBDIR} mkdir -p ../deps/modules mkdir -p ../CUTEst/modules - mkdir -p ../deps/include + mkdir -p ../deps/include/spm + mkdir -p ../deps/include/pastix CSTD="c99" CPPSTD="c++11" INT64="false" From 020350eff7846017f3b9b66e88758a6122d75310 Mon Sep 17 00:00:00 2001 From: Alexis Montoison Date: Sun, 26 Jan 2025 20:37:06 -0600 Subject: [PATCH 11/15] Compile SCOTCH with CI --- .github/meson/action.yml | 10 ++-------- 1 file changed, 2 insertions(+), 8 deletions(-) diff --git a/.github/meson/action.yml b/.github/meson/action.yml index 4a264d97d5..45ead5a56e 100644 --- a/.github/meson/action.yml +++ b/.github/meson/action.yml @@ -202,21 +202,15 @@ runs: wget https://github.com/JuliaBinaryWrappers/METIS_jll.jl/releases/download/METIS-v${VERSION_METIS}%2B0/METIS.v${VERSION_METIS}.$PLATFORM.tar.gz tar -xzvf METIS.v${VERSION_METIS}.$PLATFORM.tar.gz -C deps - - name: Install PASTIX + - name: Install PASTIX and SPM if: inputs.int == '32' && inputs.os == 'ubuntu-latest' && inputs.compiler == 'gcc' shell: bash run: | cd .. mkdir -p deps - VERSION_SCOTCH="7.0.4" - VERSION_PASTIX="6.3.0" - VERSION_HWLOC="2.11.0" + VERSION_SCOTCH="7.0.6" wget https://github.com/JuliaBinaryWrappers/SCOTCH_jll.jl/releases/download/SCOTCH-v${VERSION_SCOTCH}%2B0/SCOTCH.v${VERSION_SCOTCH}.$PLATFORM.tar.gz tar -xzvf SCOTCH.v${VERSION_SCOTCH}.$PLATFORM.tar.gz -C deps - # wget https://github.com/JuliaBinaryWrappers/Hwloc_jll.jl/releases/download/Hwloc-v${VERSION_HWLOC}%2B0/Hwloc.v${VERSION_HWLOC}.$PLATFORM.tar.gz - # tar -xzvf Hwloc.v${VERSION_HWLOC}.$PLATFORM.tar.gz -C deps - # wget https://github.com/JuliaBinaryWrappers/PaStiX_jll.jl/releases/download/PaStiX-v${VERSION_PASTIX}%2B0/PaStiX.v${VERSION_PASTIX}.$PLATFORM-libgfortran5.tar.gz - # tar -xzvf PaStiX.v${VERSION_PASTIX}.$PLATFORM-libgfortran5.tar.gz -C deps sudo apt-get -y install libhwloc-dev git clone https://gitlab.inria.fr/solverstack/pastix.git cd pastix From e033472e854d79bcc128b620d8d40a450c92628b Mon Sep 17 00:00:00 2001 From: Alexis Montoison Date: Sun, 26 Jan 2025 20:42:02 -0600 Subject: [PATCH 12/15] Update meson.build --- meson.build | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/meson.build b/meson.build index 93875c010b..25c67fbeab 100644 --- a/meson.build +++ b/meson.build @@ -249,8 +249,7 @@ galahad_python_tests = [] # Folders that contain headers and Fortran modules libgalahad_include = [include_directories('include'), include_directories('src/dum/include'), include_directories('src/metis/include'), include_directories('src/ampl')] -libgalahad_include = libgalahad_include + libhwloc_include + libhsl_modules + - libcutest_modules + libspmf_modules + libpastixf_modules +libgalahad_include = libgalahad_include + libhwloc_include + libhsl_modules + libcutest_modules + libspmf_modules + libpastixf_modules if host_machine.system() == 'linux' add_global_arguments('-DSPRAL_HAVE_SCHED_GETCPU', language : 'cpp') From 30af0eb5490d01cdaca395bd1457993db23774e9 Mon Sep 17 00:00:00 2001 From: Alexis Montoison Date: Sun, 26 Jan 2025 21:03:11 -0600 Subject: [PATCH 13/15] Improve the Meson build system --- meson.build | 36 ++++++++++++++++++++++++++---------- src/dum/meson.build | 16 ++++------------ src/external/meson.build | 3 +-- 3 files changed, 31 insertions(+), 24 deletions(-) diff --git a/meson.build b/meson.build index 25c67fbeab..9d5215071e 100644 --- a/meson.build +++ b/meson.build @@ -285,47 +285,63 @@ endif extra_args_single = ['-DREAL_32'] extra_args_double = [] -extra_args_quadruple = ['-DREAL_128', '-DGALAHAD_BLAS', '-DGALAHAD_LAPACK', '-DDUMMY_QMUMPS'] +extra_args_quadruple = ['-DREAL_128'] +# BLAS if not libblas.found() extra_args_single += '-DGALAHAD_BLAS' extra_args_double += '-DGALAHAD_BLAS' endif +extra_args_quadruple += '-DGALAHAD_BLAS' + +# LAPACK if not liblapack.found() extra_args_single += '-DGALAHAD_LAPACK' extra_args_double += '-DGALAHAD_LAPACK' endif +extra_args_quadruple += '-DGALAHAD_LAPACK' + +# MUMPS if not libsmumps.found() extra_args_single += '-DDUMMY_SMUMPS' endif if not libdmumps.found() extra_args_double += '-DDUMMY_DMUMPS' endif +extra_args_quadruple += '-DDUMMY_QMUMPS' + +# MKL PARDISO if not (libblas_name == 'mkl_rt' or liblapack_name == 'mkl_rt') extra_args_single += '-DDUMMY_MKL_PARDISO' extra_args_double += '-DDUMMY_MKL_PARDISO' - extra_args_quadruple += '-DDUMMY_MKL_PARDISO' endif +extra_args_quadruple += '-DDUMMY_MKL_PARDISO' + +# PARDISO if not libpardiso.found() extra_args_single += '-DDUMMY_PARDISO' extra_args_double += '-DDUMMY_PARDISO' - extra_args_quadruple += '-DDUMMY_PARDISO' endif -if not libpastixf.found() +extra_args_quadruple += '-DDUMMY_PARDISO' + +# PASTIX and SPM +if not (libspmf.found() and libpastixf.found()) extra_args_single += '-DDUMMY_PASTIXF' - extra_args_double += '-DDUMMY_PASTIXF' - extra_args_quadruple += '-DDUMMY_PASTIXF' -endif -if not libspmf.found() extra_args_single += '-DDUMMY_SPMF' + extra_args_double += '-DDUMMY_PASTIXF' extra_args_double += '-DDUMMY_SPMF' - extra_args_quadruple += '-DDUMMY_SPMF' endif +extra_args_quadruple += '-DDUMMY_PASTIXF' +extra_args_quadruple += '-DDUMMY_SPMF' + +# WSMP if not libwsmp.found() extra_args_single += '-DDUMMY_WSMP' extra_args_double += '-DDUMMY_WSMP' - extra_args_quadruple += '-DDUMMY_WSMP' endif +extra_args_quadruple += '-DDUMMY_WSMP' + +# HSL if not libhsl.found() extra_args_single += '-DDUMMY_HSL' extra_args_double += '-DDUMMY_HSL' diff --git a/src/dum/meson.build b/src/dum/meson.build index d76bf71bfc..8d18f41ff3 100644 --- a/src/dum/meson.build +++ b/src/dum/meson.build @@ -13,28 +13,20 @@ if not libpardiso.found() endif libgalahad_quadruple_src += files('pardiso.F90') -if not libspmf.found() - libgalahad_single_src += files('spmf.F90', 'spmf_enums.F90') - libgalahad_double_src += files('spmf.F90', 'spmf_enums.F90') +if not (libpastixf.found() and libspmf.found()) + libgalahad_single_src += files('spmf.F90', 'spmf_enums.F90', 'pastixf.F90', 'pastixf_enums.F90') + libgalahad_double_src += files('spmf.F90', 'spmf_enums.F90', 'pastixf.F90', 'pastixf_enums.F90') endif -libgalahad_quadruple_src += files('spmf.F90', 'spmf_enums.F90') - -if not libpastixf.found() - libgalahad_single_src += files('pastixf.F90', 'pastixf_enums.F90') - libgalahad_double_src += files('pastixf.F90', 'pastixf_enums.F90') -endif -libgalahad_quadruple_src += files('pastixf.F90', 'pastixf_enums.F90') +libgalahad_quadruple_src += files('spmf.F90', 'spmf_enums.F90', 'pastixf.F90', 'pastixf_enums.F90') if not libsmumps.found() libgalahad_single_src += files('mumps.F90') galahad_headers += files('include/smumps_struc.h') endif - if not libdmumps.found() libgalahad_double_src += files('mumps.F90') galahad_headers += files('include/dmumps_struc.h') endif - libgalahad_quadruple_src += files('mumps.F90') galahad_headers += files('include/qmumps_struc.h') diff --git a/src/external/meson.build b/src/external/meson.build index 1dd03c5c70..36562deb2e 100644 --- a/src/external/meson.build +++ b/src/external/meson.build @@ -5,8 +5,7 @@ libgalahad_src += files('mkl_pardiso/mkl_pardiso_interface.F90', 'pastix/spmf_interfaces.F90', 'pastix/pastixf_interfaces.F90') -galahad_tests += [['mkl_pardiso', 'mkl_pardisot', - files('mkl_pardiso/mkl_pardisot.F90')], +galahad_tests += [['mkl_pardiso', 'mkl_pardisot', files('mkl_pardiso/mkl_pardisot.F90')], ['mumps', 'mumpst', files('mumps/mumpst.F90')], ['pardiso', 'pardisot', files('pardiso/pardisot.F90')], ['wsmp', 'wsmpt', files('wsmp/wsmpt.F90')], From 5f5af9f9a601cfd9edea7a759db87ea227e94358 Mon Sep 17 00:00:00 2001 From: Alexis Montoison Date: Sun, 26 Jan 2025 21:44:12 -0600 Subject: [PATCH 14/15] Fortran macros should be only in header files... --- include/galahad_modules.h | 2 -- src/external/pastix/pastixf_interfaces.F90 | 25 ---------------------- src/external/pastix/spmf_interfaces.F90 | 24 --------------------- 3 files changed, 51 deletions(-) diff --git a/include/galahad_modules.h b/include/galahad_modules.h index 11df19acbf..29a53808ca 100644 --- a/include/galahad_modules.h +++ b/include/galahad_modules.h @@ -17,9 +17,7 @@ #define MKL_PARDISO_PRIVATE MKL_PARDISO_PRIVATE_64 #define MKL_PARDISO MKL_PARDISO_64 #define galahad_metis galahad_metis_64 -#define spmf_interfaces spmf_interfaces_64 #define spmf_enums spmf_enums_64 -#define pastixf_interfaces pastixf_interfaces_64 #define pastixf_enums pastixf_enums_64 #endif diff --git a/src/external/pastix/pastixf_interfaces.F90 b/src/external/pastix/pastixf_interfaces.F90 index 8a210491c5..c2d7cdbf30 100644 --- a/src/external/pastix/pastixf_interfaces.F90 +++ b/src/external/pastix/pastixf_interfaces.F90 @@ -18,31 +18,6 @@ !> @author Selmane Lebdaoui !> @date 2023-07-21 -#ifdef INTEGER_64 -#define pastixf_enums pastixf_enums_64 -#define spmf_enums spmf_enums_64 -#endif - -#ifdef REAL_32 -#ifdef INTEGER_64 -#define pastixf_interfaces_precision pastixf_interfaces_single_64 -#else -#define pastixf_interfaces_precision pastixf_interfaces_single -#endif -#elif REAL_128 -#ifdef INTEGER_64 -#define pastix_interfaces_precision pastix_interfaces_quadruple_64 -#else -#define pastix_interfaces_precision pastix_interfaces_quadruple -#endif -#else -#ifdef INTEGER_64 -#define pastixf_interfaces_precision pastixf_interfaces_double_64 -#else -#define pastixf_interfaces_precision pastixf_interfaces_double -#endif -#endif - MODULE pastixf_interfaces_precision INTERFACE pastixInitParam diff --git a/src/external/pastix/spmf_interfaces.F90 b/src/external/pastix/spmf_interfaces.F90 index 3885d3cfb5..f5e9428286 100644 --- a/src/external/pastix/spmf_interfaces.F90 +++ b/src/external/pastix/spmf_interfaces.F90 @@ -17,30 +17,6 @@ !> @author Tony Delarue !> @date 2023-12-06 -#ifdef INTEGER_64 -#define spmf_enums spmf_enums_64 -#endif - -#ifdef REAL_32 -#ifdef INTEGER_64 -#define spmf_interfaces_precision spmf_interfaces_single_64 -#else -#define spmf_interfaces_precision spmf_interfaces_single -#endif -#elif REAL_128 -#ifdef INTEGER_64 -#define spmf_interfaces_precision spmf_interfaces_quadruple_64 -#else -#define spmf_interfaces_precision spmf_interfaces_quadruple -#endif -#else -#ifdef INTEGER_64 -#define spmf_interfaces_precision spmf_interfaces_double_64 -#else -#define spmf_interfaces_precision spmf_interfaces_double -#endif -#endif - MODULE spmf_interfaces_precision USE iso_c_binding, ONLY : c_float, c_double, c_ptr, & From 1f67c4c4209a2448d65ba6b33c4c6df599c690dd Mon Sep 17 00:00:00 2001 From: Alexis Montoison Date: Sun, 26 Jan 2025 22:35:53 -0600 Subject: [PATCH 15/15] Check that GALAHAD + PASTIX works without Float128 --- .github/meson/action.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/meson/action.yml b/.github/meson/action.yml index 45ead5a56e..d148995a16 100644 --- a/.github/meson/action.yml +++ b/.github/meson/action.yml @@ -318,7 +318,7 @@ runs: -Dssids=${SSIDS} \ -Dpythoniface=${PYTHON_INTERFACE} \ -Dint64=${INT64} \ - -Dquadruple=${QUADRUPLE} \ + -Dquadruple=false \ -Dlibblas_path=${BLAS_PATH} \ -Dliblapack_path=${LAPACK_PATH} \ -Dlibblas=${BLAS} \