diff --git a/CHANGELOG.md b/CHANGELOG.md index 1ba30cc..c080eb0 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -2,6 +2,10 @@ ## DLA-Future-Fortran X.Y.Z +### Changed + +* Name of the generalized eigenvalue solver from `*gvx` to `*gvd` [PR #16] + ### Fixed * Spack installation with `+test` variant by setting `-DMPIEXEC_MAX_NUMPROCS=6` [PR #10] diff --git a/ci/ci-common.yml b/ci/ci-common.yml index 941f342..07edd64 100644 --- a/ci/ci-common.yml +++ b/ci/ci-common.yml @@ -29,7 +29,7 @@ stages: reports: dotenv: build.env variables: - SPACK_SHA: develop-2024-06-02 + SPACK_SHA: 05c7ff4595a4e574cbcf45475c626b9b94c22af1 SPACK_BUILDCACHE: develop-2024-06-02 SPACK_DLAF_FORTRAN_REPO: ./spack DOCKER_BUILD_ARGS: '[ diff --git a/ci/docker/build.Dockerfile b/ci/docker/build.Dockerfile index db53793..e377e0b 100644 --- a/ci/docker/build.Dockerfile +++ b/ci/docker/build.Dockerfile @@ -59,7 +59,7 @@ RUN spack external find \ # Enable Spack build cache ARG SPACK_BUILDCACHE RUN spack mirror add ${SPACK_BUILDCACHE} https://binaries.spack.io/${SPACK_BUILDCACHE} -RUN spack buildcache keys --install --trust +RUN spack buildcache keys --install --trust --force # Add custom Spack repo ARG SPACK_DLAF_FORTRAN_REPO diff --git a/spack/packages/dla-future-fortran/package.py b/spack/packages/dla-future-fortran/package.py index 04f8b6f..29a555d 100644 --- a/spack/packages/dla-future-fortran/package.py +++ b/spack/packages/dla-future-fortran/package.py @@ -29,7 +29,8 @@ class DlaFutureFortran(CMakePackage): generator("ninja") depends_on("cmake@3.22:", type="build") - depends_on("dla-future@0.4.1: +scalapack") + depends_on("dla-future@0.4.1:0.5 +scalapack", when="@0.1.0") + depends_on("dla-future@0.6.0: +scalapack", when="@0.2.0:") depends_on("dla-future +shared", when="+shared") depends_on("mpi", when="+test") diff --git a/src/dlaf_fortran.f90 b/src/dlaf_fortran.f90 index b8756f0..747b97e 100644 --- a/src/dlaf_fortran.f90 +++ b/src/dlaf_fortran.f90 @@ -29,7 +29,7 @@ module dlaf_fortran public :: dlaf_create_grid_from_blacs, dlaf_free_grid public :: dlaf_pspotrf, dlaf_pdpotrf, dlaf_pcpotrf, dlaf_pzpotrf public :: dlaf_pssyevd, dlaf_pdsyevd, dlaf_pcheevd, dlaf_pzheevd - public :: dlaf_pssygvx, dlaf_pdsygvx, dlaf_pchegvx, dlaf_pzhegvx + public :: dlaf_pssygvd, dlaf_pdsygvd, dlaf_pchegvd, dlaf_pzhegvd contains @@ -337,7 +337,7 @@ end subroutine dlaf_pzheevd_c end subroutine dlaf_pzheevd - subroutine dlaf_pssygvx(uplo, n, a, ia, ja, desca, b, ib, jb, descb, w, z, iz, jz, descz, info) + subroutine dlaf_pssygvd(uplo, n, a, ia, ja, desca, b, ib, jb, descb, w, z, iz, jz, descz, info) character, intent(in) :: uplo integer, intent(in) :: n, ia, ja, ib, jb, iz, jz integer, dimension(9), intent(in) :: desca, descb, descz @@ -346,8 +346,8 @@ subroutine dlaf_pssygvx(uplo, n, a, ia, ja, desca, b, ib, jb, descb, w, z, iz, j real(kind=sp), dimension(:), target, intent(out) :: w interface - subroutine dlaf_pssygvx_c(uplo_, n_, a_, ia_, ja_, desca_, b_, ib_, jb_, descb_, w_, z_, iz_, jz_, descz_, info_) & - bind(C, name='dlaf_pssygvx') + subroutine dlaf_pssygvd_c(uplo_, n_, a_, ia_, ja_, desca_, b_, ib_, jb_, descb_, w_, z_, iz_, jz_, descz_, info_) & + bind(C, name='dlaf_pssygvd') import :: c_int, c_ptr, c_signed_char @@ -356,12 +356,12 @@ subroutine dlaf_pssygvx_c(uplo_, n_, a_, ia_, ja_, desca_, b_, ib_, jb_, descb_, type(c_ptr), value :: a_, b_, w_, z_ integer(kind=c_int), dimension(9) :: desca_, descb_, descz_ type(c_ptr), value :: info_ - end subroutine dlaf_pssygvx_c + end subroutine dlaf_pssygvd_c end interface info = -1 - call dlaf_pssygvx_c(iachar(uplo, c_signed_char), n, & + call dlaf_pssygvd_c(iachar(uplo, c_signed_char), n, & c_loc(a(1, 1)), ia, ja, desca, & c_loc(b(1, 1)), ib, jb, descb, & c_loc(w(1)), & @@ -369,9 +369,9 @@ end subroutine dlaf_pssygvx_c c_loc(info) & ) - end subroutine dlaf_pssygvx + end subroutine dlaf_pssygvd - subroutine dlaf_pdsygvx(uplo, n, a, ia, ja, desca, b, ib, jb, descb, w, z, iz, jz, descz, info) + subroutine dlaf_pdsygvd(uplo, n, a, ia, ja, desca, b, ib, jb, descb, w, z, iz, jz, descz, info) character, intent(in) :: uplo integer, intent(in) :: n, ia, ja, ib, jb, iz, jz integer, dimension(9), intent(in) :: desca, descb, descz @@ -380,8 +380,8 @@ subroutine dlaf_pdsygvx(uplo, n, a, ia, ja, desca, b, ib, jb, descb, w, z, iz, j real(kind=dp), dimension(:), target, intent(out) :: w interface - subroutine dlaf_pdsygvx_c(uplo_, n_, a_, ia_, ja_, desca_, b_, ib_, jb_, descb_, w_, z_, iz_, jz_, descz_, info_) & - bind(C, name='dlaf_pdsygvx') + subroutine dlaf_pdsygvd_c(uplo_, n_, a_, ia_, ja_, desca_, b_, ib_, jb_, descb_, w_, z_, iz_, jz_, descz_, info_) & + bind(C, name='dlaf_pdsygvd') import :: c_int, c_ptr, c_signed_char @@ -390,12 +390,12 @@ subroutine dlaf_pdsygvx_c(uplo_, n_, a_, ia_, ja_, desca_, b_, ib_, jb_, descb_, type(c_ptr), value :: a_, b_, w_, z_ integer(kind=c_int), dimension(9) :: desca_, descb_, descz_ type(c_ptr), value :: info_ - end subroutine dlaf_pdsygvx_c + end subroutine dlaf_pdsygvd_c end interface info = -1 - call dlaf_pdsygvx_c(iachar(uplo, c_signed_char), n, & + call dlaf_pdsygvd_c(iachar(uplo, c_signed_char), n, & c_loc(a(1, 1)), ia, ja, desca, & c_loc(b(1, 1)), ib, jb, descb, & c_loc(w(1)), & @@ -403,9 +403,9 @@ end subroutine dlaf_pdsygvx_c c_loc(info) & ) - end subroutine dlaf_pdsygvx + end subroutine dlaf_pdsygvd - subroutine dlaf_pchegvx(uplo, n, a, ia, ja, desca, b, ib, jb, descb, w, z, iz, jz, descz, info) + subroutine dlaf_pchegvd(uplo, n, a, ia, ja, desca, b, ib, jb, descb, w, z, iz, jz, descz, info) character, intent(in) :: uplo integer, intent(in) :: n, ia, ja, ib, jb, iz, jz integer, dimension(9), intent(in) :: desca, descb, descz @@ -414,8 +414,8 @@ subroutine dlaf_pchegvx(uplo, n, a, ia, ja, desca, b, ib, jb, descb, w, z, iz, j real(kind=sp), dimension(:), target, intent(out) :: w interface - subroutine dlaf_pchegvx_c(uplo_, n_, a_, ia_, ja_, desca_, b_, ib_, jb_, descb_, w_, z_, iz_, jz_, descz_, info_) & - bind(C, name='dlaf_pchegvx') + subroutine dlaf_pchegvd_c(uplo_, n_, a_, ia_, ja_, desca_, b_, ib_, jb_, descb_, w_, z_, iz_, jz_, descz_, info_) & + bind(C, name='dlaf_pchegvd') import :: c_int, c_ptr, c_signed_char @@ -424,12 +424,12 @@ subroutine dlaf_pchegvx_c(uplo_, n_, a_, ia_, ja_, desca_, b_, ib_, jb_, descb_, type(c_ptr), value :: a_, b_, w_, z_ integer(kind=c_int), dimension(9) :: desca_, descb_, descz_ type(c_ptr), value :: info_ - end subroutine dlaf_pchegvx_c + end subroutine dlaf_pchegvd_c end interface info = -1 - call dlaf_pchegvx_c(iachar(uplo, c_signed_char), n, & + call dlaf_pchegvd_c(iachar(uplo, c_signed_char), n, & c_loc(a(1, 1)), ia, ja, desca, & c_loc(b(1, 1)), ib, jb, descb, & c_loc(w(1)), & @@ -437,9 +437,9 @@ end subroutine dlaf_pchegvx_c c_loc(info) & ) - end subroutine dlaf_pchegvx + end subroutine dlaf_pchegvd - subroutine dlaf_pzhegvx(uplo, n, a, ia, ja, desca, b, ib, jb, descb, w, z, iz, jz, descz, info) + subroutine dlaf_pzhegvd(uplo, n, a, ia, ja, desca, b, ib, jb, descb, w, z, iz, jz, descz, info) character, intent(in) :: uplo integer, intent(in) :: n, ia, ja, ib, jb, iz, jz integer, dimension(9), intent(in) :: desca, descb, descz @@ -448,8 +448,8 @@ subroutine dlaf_pzhegvx(uplo, n, a, ia, ja, desca, b, ib, jb, descb, w, z, iz, j real(kind=dp), dimension(:), target, intent(out) :: w interface - subroutine dlaf_pzhegvx_c(uplo_, n_, a_, ia_, ja_, desca_, b_, ib_, jb_, descb_, w_, z_, iz_, jz_, descz_, info_) & - bind(C, name='dlaf_pzhegvx') + subroutine dlaf_pzhegvd_c(uplo_, n_, a_, ia_, ja_, desca_, b_, ib_, jb_, descb_, w_, z_, iz_, jz_, descz_, info_) & + bind(C, name='dlaf_pzhegvd') import :: c_int, c_ptr, c_signed_char @@ -458,12 +458,12 @@ subroutine dlaf_pzhegvx_c(uplo_, n_, a_, ia_, ja_, desca_, b_, ib_, jb_, descb_, type(c_ptr), value :: a_, b_, w_, z_ integer(kind=c_int), dimension(9) :: desca_, descb_, descz_ type(c_ptr), value :: info_ - end subroutine dlaf_pzhegvx_c + end subroutine dlaf_pzhegvd_c end interface info = -1 - call dlaf_pzhegvx_c(iachar(uplo, c_signed_char), n, & + call dlaf_pzhegvd_c(iachar(uplo, c_signed_char), n, & c_loc(a(1, 1)), ia, ja, desca, & c_loc(b(1, 1)), ib, jb, descb, & c_loc(w(1)), & @@ -471,6 +471,6 @@ end subroutine dlaf_pzhegvx_c c_loc(info) & ) - end subroutine dlaf_pzhegvx + end subroutine dlaf_pzhegvd end module dlaf_fortran diff --git a/test/CMakeLists.txt b/test/CMakeLists.txt index 07275ff..6b5a9e1 100644 --- a/test/CMakeLists.txt +++ b/test/CMakeLists.txt @@ -12,7 +12,7 @@ set(INIT_TEST_EXECUTABLES init) set(PXPOTRF_TEST_EXECUTABLES pspotrf pdpotrf pcpotrf pzpotrf) set(PXHEEVD_TEST_EXECUTABLES pssyevd pdsyevd pcheevd pzheevd) -set(PXHEGVX_TEST_EXECUTABLES pssygvx pdsygvx pchegvx pzhegvx) +set(PXHEGVX_TEST_EXECUTABLES pssygvd pdsygvd pchegvd pzhegvd) find_program(FYPP_PROGRAM fypp) @@ -60,4 +60,4 @@ endfunction() add_tests("${INIT_TEST_EXECUTABLES}" "") add_tests("${PXPOTRF_TEST_EXECUTABLES}" pxpotrf) add_tests("${PXHEEVD_TEST_EXECUTABLES}" pxheevd) -add_tests("${PXHEGVX_TEST_EXECUTABLES}" pxhegvx) +add_tests("${PXHEGVX_TEST_EXECUTABLES}" pxhegvd) diff --git a/test/helpers/CMakeLists.txt b/test/helpers/CMakeLists.txt index 99f7c84..4c8983c 100644 --- a/test/helpers/CMakeLists.txt +++ b/test/helpers/CMakeLists.txt @@ -8,7 +8,7 @@ # SPDX-License-Identifier: BSD-3-Clause # -set(fyppFiles pxpotrf.fypp pxheevd.fypp pxhegvx.fypp) +set(fyppFiles pxpotrf.fypp pxheevd.fypp pxhegvd.fypp) foreach(infileName IN LISTS fyppFiles) diff --git a/test/helpers/pxhegvx.fypp b/test/helpers/pxhegvd.fypp similarity index 97% rename from test/helpers/pxhegvx.fypp rename to test/helpers/pxhegvd.fypp index 2608f6f..5c26336 100644 --- a/test/helpers/pxhegvx.fypp +++ b/test/helpers/pxhegvd.fypp @@ -12,13 +12,13 @@ #:set types = ['real', 'complex'] #:set names = {('sp', 'real'): 'ssy', ('sp', 'complex'): 'che', ('dp', 'real'): 'dsy', ('dp', 'complex'): 'zhe'} #:set symbols = {('sp', 'real'): 's', ('sp', 'complex'): 'c', ('dp', 'real'): 'd', ('dp', 'complex'): 'z'} -module pxhegvx_tests +module pxhegvd_tests use iso_fortran_env, only: error_unit, sp => real32, dp => real64 use dlaf_fortran, only: dlaf_initialize, dlaf_finalize, dlaf_create_grid_from_blacs, dlaf_free_grid #:for dtype in precision #:for type in types #:set name = names[(dtype, type)] - use dlaf_fortran, only: dlaf_p${name}$gvx + use dlaf_fortran, only: dlaf_p${name}$gvd #:endfor #:endfor @@ -39,7 +39,7 @@ module pxhegvx_tests #:for dtype in precision #:for type in types #:set name = names[(dtype, type)] - public :: p${name}$gvx_test + public :: p${name}$gvd_test #:endfor #:endfor @@ -49,7 +49,7 @@ contains #:for type in types #:set name = names[(dtype, type)] #:set symbol = symbols[(dtype, type)] - subroutine p${name}$gvx_test + subroutine p${name}$gvd_test integer, parameter :: n = 4 @@ -142,7 +142,7 @@ contains ! Solve with DLAF call dlaf_initialize() call dlaf_create_grid_from_blacs(ictxt) - call dlaf_p${name}$gvx( & + call dlaf_p${name}$gvd( & 'L', & n, A_local_dlaf, 1, 1, desca_local_dlaf, & B_local_dlaf, 1, 1, descb_local_dlaf, & @@ -246,8 +246,8 @@ contains call blacs_gridexit(ictxt) call blacs_exit(1) call teardown_mpi() - end subroutine p${name}$gvx_test + end subroutine p${name}$gvd_test #:endfor #:endfor -end module pxhegvx_tests +end module pxhegvd_tests diff --git a/test/pzhegvx.f90 b/test/pchegvd.f90 similarity index 68% rename from test/pzhegvx.f90 rename to test/pchegvd.f90 index 593f10e..16c2534 100644 --- a/test/pzhegvx.f90 +++ b/test/pchegvd.f90 @@ -8,11 +8,11 @@ ! SPDX-License-Identifier: BSD-3-Clause ! -program test_pzhegvx - use pxhegvx_tests, only: pzhegvx_test +program test_pchegvd + use pxhegvd_tests, only: pchegvd_test implicit none - call pzhegvx_test() + call pchegvd_test() -end program test_pzhegvx +end program test_pchegvd diff --git a/test/pchegvx.f90 b/test/pdsygvd.f90 similarity index 68% rename from test/pchegvx.f90 rename to test/pdsygvd.f90 index ea59aa2..23ee743 100644 --- a/test/pchegvx.f90 +++ b/test/pdsygvd.f90 @@ -8,11 +8,11 @@ ! SPDX-License-Identifier: BSD-3-Clause ! -program test_pchegvx - use pxhegvx_tests, only: pchegvx_test +program test_pdsygvd + use pxhegvd_tests, only: pdsygvd_test implicit none - call pchegvx_test() + call pdsygvd_test() -end program test_pchegvx +end program test_pdsygvd diff --git a/test/pdsygvx.f90 b/test/pssygvd.f90 similarity index 68% rename from test/pdsygvx.f90 rename to test/pssygvd.f90 index 44507c4..9830bd0 100644 --- a/test/pdsygvx.f90 +++ b/test/pssygvd.f90 @@ -8,11 +8,11 @@ ! SPDX-License-Identifier: BSD-3-Clause ! -program test_pdsygvx - use pxhegvx_tests, only: pdsygvx_test +program test_pssygvd + use pxhegvd_tests, only: pssygvd_test implicit none - call pdsygvx_test() + call pssygvd_test() -end program test_pdsygvx +end program test_pssygvd diff --git a/test/pssygvx.f90 b/test/pzhegvd.f90 similarity index 68% rename from test/pssygvx.f90 rename to test/pzhegvd.f90 index 3a6a539..8812bf2 100644 --- a/test/pssygvx.f90 +++ b/test/pzhegvd.f90 @@ -8,11 +8,11 @@ ! SPDX-License-Identifier: BSD-3-Clause ! -program test_pssygvx - use pxhegvx_tests, only: pssygvx_test +program test_pzhegvd + use pxhegvd_tests, only: pzhegvd_test implicit none - call pssygvx_test() + call pzhegvd_test() -end program test_pssygvx +end program test_pzhegvd