From b37c3d85a8fb3e1eb84929c3c82fd3c2e91d5de5 Mon Sep 17 00:00:00 2001 From: Orient Date: Tue, 16 May 2023 15:23:56 +0200 Subject: [PATCH 01/10] adding easyconfigs: Yambo-5.2-intel-2021b.eb --- .../y/Yambo/Yambo-5.2-intel-2021b.eb | 77 +++++++++++++++++++ 1 file changed, 77 insertions(+) create mode 100644 easybuild/easyconfigs/y/Yambo/Yambo-5.2-intel-2021b.eb diff --git a/easybuild/easyconfigs/y/Yambo/Yambo-5.2-intel-2021b.eb b/easybuild/easyconfigs/y/Yambo/Yambo-5.2-intel-2021b.eb new file mode 100644 index 00000000000..5af8ef7cf8b --- /dev/null +++ b/easybuild/easyconfigs/y/Yambo/Yambo-5.2-intel-2021b.eb @@ -0,0 +1,77 @@ +easyblock = 'MakeCp' + +name = 'Yambo' +version = '5.2' +local_commit = '21109ae' + +homepage = 'http://www.yambo-code.org' +description = """Yambo is a FORTRAN/C code for Many-Body calculations in solid state and molecular physics. + Yambo relies on the Kohn-Sham wavefunctions generated by two DFT public codes: abinit, and PWscf.""" + +toolchain = {'name': 'intel', 'version': '2021b'} +toolchainopts = { + 'usempi': True, + 'openmp': True, +} + +local_copy_cmd_pattern = 'cp %s yambo-%(version)s/lib/archive/' + +source_urls = ['https://github.com/yambo-code/yambo/archive/'] +sources = [ + { 'filename': '%s.tar.gz' % local_commit, + 'download_filename': 'yambo-%(version)s.tar.gz', + 'extract_cmd': 'mkdir yambo-%(version)s && tar --strip-components=1 -xzf %s -C yambo-%(version)s' + }, # Yambo + { + 'source_urls': ['https://github.com/yambo-code/yambo-libraries/archive/'], + 'filename': '1.0.tar.gz', + 'extract_cmd': 'mkdir yambo-%(version)s/lib/yambo/ && tar --strip-components=1 -xzf %s -C yambo-%(version)s/lib/yambo/', + }, + { + 'source_urls': ['https://github.com/yambo-code/yambo/files/962173/'], + 'filename': 'iotk-y1.2.2.tar.gz', + 'extract_cmd': local_copy_cmd_pattern, + }, +] + +dependencies = [ + ('HDF5', '1.12.1'), + ('netCDF', '4.8.1'), + ('netCDF-Fortran', '4.5.3'), + ('PETSc', '3.18.4'), + ('SLEPc', '3.18.2'), + ('libxc', '5.1.6'), +] + +with_configure = True + +configopts = 'FC=mpiifort CC=mpiicc ' +configopts += '--prefix=%(builddir)s/%(namelower)s-%(version)s/ ' +configopts += '--enable-open-mp --enable-hdf5-par-io ' +configopts += '--with-blas-libs="$LIBBLAS" ' +configopts += '--with-lapack-libs="$LIBLAPACK" --with-blacs-libs=mkl ' +configopts += '--with-scalapack-libs=mkl ' +configopts += '--with-fft-libs="-mkl" --with-fft-includedir="$FFT_INC_DIR" ' +configopts += '--with-netcdf-lib=$EBROOTNETCDF/lib --with-netcdf-include="$EBROOTNETCDF\include" ' +configopts += '--with-netcdff-path="$EBROOTNETCDFMINFORTRAN" ' +configopts += '--with-hdf5-path="$EBROOTHDF5" --with-petsc-path="$EBROOTPETSC" ' +configopts += '--with-slepc-path="$EBROOTSLEPC" --with-libxc-path="$EBROOTLIBXC" ' +configopts += '--enable-par-linalg --enable-slepc-linalg ' + +prebuildopts = "export FPATH=$EBROOTPETSC/include:$EBROOTSLEPC/include:$FPATH && " +buildopts = 'all' + +files_to_copy = [ + (['bin/*'], 'bin'), + (['%(builddir)s/%(namelower)s-%(version)s/lib/external/intel/mpiifort/bin/*'], 'bin') +] + +sanity_check_paths = { + 'files': ['bin/' + x for x in ['a2y', 'p2y', 'yambo', 'yambo_ph', 'ypp', 'ypp_ph', + 'iotk', 'iotk.x']], + 'dirs': [] +} + +sanity_check_commands = ["yambo -h"] + +moduleclass = 'phys' From 77e292bb65c1582c3e2b57d78b4f1b5642213b90 Mon Sep 17 00:00:00 2001 From: Orient Date: Tue, 16 May 2023 15:31:48 +0200 Subject: [PATCH 02/10] Fixed typo - used backslash instead of slash + added checksums --- easybuild/easyconfigs/y/Yambo/Yambo-5.2-intel-2021b.eb | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/easybuild/easyconfigs/y/Yambo/Yambo-5.2-intel-2021b.eb b/easybuild/easyconfigs/y/Yambo/Yambo-5.2-intel-2021b.eb index 5af8ef7cf8b..7f08d457d9d 100644 --- a/easybuild/easyconfigs/y/Yambo/Yambo-5.2-intel-2021b.eb +++ b/easybuild/easyconfigs/y/Yambo/Yambo-5.2-intel-2021b.eb @@ -33,6 +33,11 @@ sources = [ 'extract_cmd': local_copy_cmd_pattern, }, ] +checksums = [ + {'21109ae.tar.gz': '19b909da970c70438d0a741a54008a2207abf1fca54b83c31529cec84d9b3ac7'}, + {'1.0.tar.gz': 'f25d86101cc9cead9f64f05181aab1f06eac8528fea5ba5c586b2b9512cb8492'}, + {'iotk-y1.2.2.tar.gz': 'c0a4eb19f3e885d83d7afa52eb90658fba7cb1cb6e66049866a98dcc980de543'}, +] dependencies = [ ('HDF5', '1.12.1'), @@ -52,7 +57,7 @@ configopts += '--with-blas-libs="$LIBBLAS" ' configopts += '--with-lapack-libs="$LIBLAPACK" --with-blacs-libs=mkl ' configopts += '--with-scalapack-libs=mkl ' configopts += '--with-fft-libs="-mkl" --with-fft-includedir="$FFT_INC_DIR" ' -configopts += '--with-netcdf-lib=$EBROOTNETCDF/lib --with-netcdf-include="$EBROOTNETCDF\include" ' +configopts += '--with-netcdf-lib=$EBROOTNETCDF/lib --with-netcdf-include="$EBROOTNETCDF/include" ' configopts += '--with-netcdff-path="$EBROOTNETCDFMINFORTRAN" ' configopts += '--with-hdf5-path="$EBROOTHDF5" --with-petsc-path="$EBROOTPETSC" ' configopts += '--with-slepc-path="$EBROOTSLEPC" --with-libxc-path="$EBROOTLIBXC" ' From bbdf095e5bf2c746b65918f69204685ca3249a85 Mon Sep 17 00:00:00 2001 From: Orient Date: Tue, 16 May 2023 17:57:20 +0200 Subject: [PATCH 03/10] Added requested changes --- ... => Yambo-5.2.dev-20230512-intel-2021b.eb} | 31 +++++++++---------- 1 file changed, 14 insertions(+), 17 deletions(-) rename easybuild/easyconfigs/y/Yambo/{Yambo-5.2-intel-2021b.eb => Yambo-5.2.dev-20230512-intel-2021b.eb} (71%) diff --git a/easybuild/easyconfigs/y/Yambo/Yambo-5.2-intel-2021b.eb b/easybuild/easyconfigs/y/Yambo/Yambo-5.2.dev-20230512-intel-2021b.eb similarity index 71% rename from easybuild/easyconfigs/y/Yambo/Yambo-5.2-intel-2021b.eb rename to easybuild/easyconfigs/y/Yambo/Yambo-5.2.dev-20230512-intel-2021b.eb index 7f08d457d9d..121760399be 100644 --- a/easybuild/easyconfigs/y/Yambo/Yambo-5.2-intel-2021b.eb +++ b/easybuild/easyconfigs/y/Yambo/Yambo-5.2.dev-20230512-intel-2021b.eb @@ -1,43 +1,40 @@ easyblock = 'MakeCp' name = 'Yambo' -version = '5.2' -local_commit = '21109ae' +version = '5.2.dev-20230512' +local_yambo_libs_ver = '1.0' +local_commit = 'dfa2752' homepage = 'http://www.yambo-code.org' description = """Yambo is a FORTRAN/C code for Many-Body calculations in solid state and molecular physics. Yambo relies on the Kohn-Sham wavefunctions generated by two DFT public codes: abinit, and PWscf.""" toolchain = {'name': 'intel', 'version': '2021b'} -toolchainopts = { - 'usempi': True, - 'openmp': True, -} +toolchainopts = {'usempi': True, 'openmp': True} -local_copy_cmd_pattern = 'cp %s yambo-%(version)s/lib/archive/' +local_yambo_ext_cmd = 'mkdir yambo-%(version)s && ' +local_yambo_ext_cmd += 'tar --strip-components=1 -xzf %s -C yambo-%(version)s' +local_yambo_lib_ext_cmd = 'mkdir yambo-%(version)s/lib/yambo/ && ' +local_yambo_lib_ext_cmd += 'tar --strip-components=1 -xzf %s -C yambo-%(version)s/lib/yambo/' source_urls = ['https://github.com/yambo-code/yambo/archive/'] sources = [ - { 'filename': '%s.tar.gz' % local_commit, - 'download_filename': 'yambo-%(version)s.tar.gz', - 'extract_cmd': 'mkdir yambo-%(version)s && tar --strip-components=1 -xzf %s -C yambo-%(version)s' + { + 'download_filename': '%s.tar.gz' % local_commit, + 'filename': 'yambo-%(version)s.tar.gz', + 'extract_cmd': local_yambo_ext_cmd, }, # Yambo { 'source_urls': ['https://github.com/yambo-code/yambo-libraries/archive/'], 'filename': '1.0.tar.gz', - 'extract_cmd': 'mkdir yambo-%(version)s/lib/yambo/ && tar --strip-components=1 -xzf %s -C yambo-%(version)s/lib/yambo/', + 'extract_cmd': local_yambo_lib_ext_cmd, }, { 'source_urls': ['https://github.com/yambo-code/yambo/files/962173/'], 'filename': 'iotk-y1.2.2.tar.gz', - 'extract_cmd': local_copy_cmd_pattern, + 'extract_cmd': 'cp %s yambo-%(version)s/lib/archive/', }, ] -checksums = [ - {'21109ae.tar.gz': '19b909da970c70438d0a741a54008a2207abf1fca54b83c31529cec84d9b3ac7'}, - {'1.0.tar.gz': 'f25d86101cc9cead9f64f05181aab1f06eac8528fea5ba5c586b2b9512cb8492'}, - {'iotk-y1.2.2.tar.gz': 'c0a4eb19f3e885d83d7afa52eb90658fba7cb1cb6e66049866a98dcc980de543'}, -] dependencies = [ ('HDF5', '1.12.1'), From 9fd424eb21423236585b680df5833107f6a85450 Mon Sep 17 00:00:00 2001 From: Orient Date: Tue, 16 May 2023 18:23:23 +0200 Subject: [PATCH 04/10] Added correct checksums --- .../y/Yambo/Yambo-5.2.dev-20230512-intel-2021b.eb | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/easybuild/easyconfigs/y/Yambo/Yambo-5.2.dev-20230512-intel-2021b.eb b/easybuild/easyconfigs/y/Yambo/Yambo-5.2.dev-20230512-intel-2021b.eb index 121760399be..355974ff289 100644 --- a/easybuild/easyconfigs/y/Yambo/Yambo-5.2.dev-20230512-intel-2021b.eb +++ b/easybuild/easyconfigs/y/Yambo/Yambo-5.2.dev-20230512-intel-2021b.eb @@ -35,6 +35,11 @@ sources = [ 'extract_cmd': 'cp %s yambo-%(version)s/lib/archive/', }, ] +checksums = [ + {'yambo-5.2.dev-20230512.tar.gz': '4a993b86543fec7c5fa79838ab699a9f4432a215f63eca537c0819335ab9981c'}, + {'1.0.tar.gz': 'f25d86101cc9cead9f64f05181aab1f06eac8528fea5ba5c586b2b9512cb8492'}, + {'iotk-y1.2.2.tar.gz': 'c0a4eb19f3e885d83d7afa52eb90658fba7cb1cb6e66049866a98dcc980de543'}, +] dependencies = [ ('HDF5', '1.12.1'), From a3f9162b81ad9084a23acc052bcacb3a273d8b0a Mon Sep 17 00:00:00 2001 From: Orient Date: Wed, 17 May 2023 20:10:43 +0200 Subject: [PATCH 05/10] Added the rest of requested changes + edited the format of checksums --- .../y/Yambo/Yambo-5.2.dev-20230512-intel-2021b.eb | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/easybuild/easyconfigs/y/Yambo/Yambo-5.2.dev-20230512-intel-2021b.eb b/easybuild/easyconfigs/y/Yambo/Yambo-5.2.dev-20230512-intel-2021b.eb index 355974ff289..756ed0906fc 100644 --- a/easybuild/easyconfigs/y/Yambo/Yambo-5.2.dev-20230512-intel-2021b.eb +++ b/easybuild/easyconfigs/y/Yambo/Yambo-5.2.dev-20230512-intel-2021b.eb @@ -26,7 +26,8 @@ sources = [ }, # Yambo { 'source_urls': ['https://github.com/yambo-code/yambo-libraries/archive/'], - 'filename': '1.0.tar.gz', + 'download_filename': '%s.tar.gz' % local_yambo_libs_ver, + 'filename': 'yambo-libraries-%s.tar.gz' % local_yambo_libs_ver, 'extract_cmd': local_yambo_lib_ext_cmd, }, { @@ -36,9 +37,9 @@ sources = [ }, ] checksums = [ - {'yambo-5.2.dev-20230512.tar.gz': '4a993b86543fec7c5fa79838ab699a9f4432a215f63eca537c0819335ab9981c'}, - {'1.0.tar.gz': 'f25d86101cc9cead9f64f05181aab1f06eac8528fea5ba5c586b2b9512cb8492'}, - {'iotk-y1.2.2.tar.gz': 'c0a4eb19f3e885d83d7afa52eb90658fba7cb1cb6e66049866a98dcc980de543'}, + ('4a993b86543fec7c5fa79838ab699a9f4432a215f63eca537c0819335ab9981c', + 'f25d86101cc9cead9f64f05181aab1f06eac8528fea5ba5c586b2b9512cb8492', + 'c0a4eb19f3e885d83d7afa52eb90658fba7cb1cb6e66049866a98dcc980de543') ] dependencies = [ From 2555a34d17f3a93f8cc14115e9f5aa519cb1813b Mon Sep 17 00:00:00 2001 From: ItIsI-Orient <62220698+ItIsI-Orient@users.noreply.github.com> Date: Thu, 18 May 2023 14:25:42 +0100 Subject: [PATCH 06/10] Fixed checksums --- .../y/Yambo/Yambo-5.2.dev-20230512-intel-2021b.eb | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/easybuild/easyconfigs/y/Yambo/Yambo-5.2.dev-20230512-intel-2021b.eb b/easybuild/easyconfigs/y/Yambo/Yambo-5.2.dev-20230512-intel-2021b.eb index 756ed0906fc..f6c67300dc0 100644 --- a/easybuild/easyconfigs/y/Yambo/Yambo-5.2.dev-20230512-intel-2021b.eb +++ b/easybuild/easyconfigs/y/Yambo/Yambo-5.2.dev-20230512-intel-2021b.eb @@ -37,9 +37,9 @@ sources = [ }, ] checksums = [ - ('4a993b86543fec7c5fa79838ab699a9f4432a215f63eca537c0819335ab9981c', - 'f25d86101cc9cead9f64f05181aab1f06eac8528fea5ba5c586b2b9512cb8492', - 'c0a4eb19f3e885d83d7afa52eb90658fba7cb1cb6e66049866a98dcc980de543') + {'yambo-5.2.dev-20230512.tar.gz': '4a993b86543fec7c5fa79838ab699a9f4432a215f63eca537c0819335ab9981c'}, + {'yambo-libraries-1.0.tar.gz': 'f25d86101cc9cead9f64f05181aab1f06eac8528fea5ba5c586b2b9512cb8492'}, + {'iotk-y1.2.2.tar.gz': 'c0a4eb19f3e885d83d7afa52eb90658fba7cb1cb6e66049866a98dcc980de543'}, ] dependencies = [ From 90153d66e3abd2475e286dabb9caa495e0c653f7 Mon Sep 17 00:00:00 2001 From: Orient Date: Mon, 24 Jul 2023 15:08:30 +0200 Subject: [PATCH 07/10] Moved version to 5.1.2 + added a patchfix for Yambo pre-5.2 SLEPc bug --- ...el-2021b.eb => Yambo-5.1.2-intel-2021b.eb} | 35 ++-- .../easyconfigs/y/Yambo/yambo_slepc_fix.patch | 169 ++++++++++++++++++ 2 files changed, 191 insertions(+), 13 deletions(-) rename easybuild/easyconfigs/y/Yambo/{Yambo-5.2.dev-20230512-intel-2021b.eb => Yambo-5.1.2-intel-2021b.eb} (63%) create mode 100644 easybuild/easyconfigs/y/Yambo/yambo_slepc_fix.patch diff --git a/easybuild/easyconfigs/y/Yambo/Yambo-5.2.dev-20230512-intel-2021b.eb b/easybuild/easyconfigs/y/Yambo/Yambo-5.1.2-intel-2021b.eb similarity index 63% rename from easybuild/easyconfigs/y/Yambo/Yambo-5.2.dev-20230512-intel-2021b.eb rename to easybuild/easyconfigs/y/Yambo/Yambo-5.1.2-intel-2021b.eb index f6c67300dc0..66f0b200671 100644 --- a/easybuild/easyconfigs/y/Yambo/Yambo-5.2.dev-20230512-intel-2021b.eb +++ b/easybuild/easyconfigs/y/Yambo/Yambo-5.1.2-intel-2021b.eb @@ -1,29 +1,29 @@ easyblock = 'MakeCp' name = 'Yambo' -version = '5.2.dev-20230512' +# see https://github.com/yambo-code/yambo/wiki/Releases-%28tar.gz-format%29 +version = '5.1.2' local_yambo_libs_ver = '1.0' -local_commit = 'dfa2752' homepage = 'http://www.yambo-code.org' description = """Yambo is a FORTRAN/C code for Many-Body calculations in solid state and molecular physics. Yambo relies on the Kohn-Sham wavefunctions generated by two DFT public codes: abinit, and PWscf.""" toolchain = {'name': 'intel', 'version': '2021b'} -toolchainopts = {'usempi': True, 'openmp': True} +toolchainopts = {'usempi': True} local_yambo_ext_cmd = 'mkdir yambo-%(version)s && ' local_yambo_ext_cmd += 'tar --strip-components=1 -xzf %s -C yambo-%(version)s' -local_yambo_lib_ext_cmd = 'mkdir yambo-%(version)s/lib/yambo/ && ' +local_yambo_lib_ext_cmd = 'mkdir -p yambo-%(version)s/lib/yambo/ && ' local_yambo_lib_ext_cmd += 'tar --strip-components=1 -xzf %s -C yambo-%(version)s/lib/yambo/' source_urls = ['https://github.com/yambo-code/yambo/archive/'] sources = [ { - 'download_filename': '%s.tar.gz' % local_commit, + 'download_filename': '%(version)s.tar.gz', 'filename': 'yambo-%(version)s.tar.gz', 'extract_cmd': local_yambo_ext_cmd, - }, # Yambo + }, { 'source_urls': ['https://github.com/yambo-code/yambo-libraries/archive/'], 'download_filename': '%s.tar.gz' % local_yambo_libs_ver, @@ -31,15 +31,18 @@ sources = [ 'extract_cmd': local_yambo_lib_ext_cmd, }, { + # see https://github.com/yambo-code/yambo/wiki/Libraries#external-libraries 'source_urls': ['https://github.com/yambo-code/yambo/files/962173/'], 'filename': 'iotk-y1.2.2.tar.gz', 'extract_cmd': 'cp %s yambo-%(version)s/lib/archive/', }, ] +patches = ['yambo_slepc_fix.patch'] checksums = [ - {'yambo-5.2.dev-20230512.tar.gz': '4a993b86543fec7c5fa79838ab699a9f4432a215f63eca537c0819335ab9981c'}, + {'yambo-5.1.2.tar.gz': '9625d8a96bd9a3ff3713ebe53228d5ac9be0a98adecbe2a2bad67234c0e26a2e'}, {'yambo-libraries-1.0.tar.gz': 'f25d86101cc9cead9f64f05181aab1f06eac8528fea5ba5c586b2b9512cb8492'}, {'iotk-y1.2.2.tar.gz': 'c0a4eb19f3e885d83d7afa52eb90658fba7cb1cb6e66049866a98dcc980de543'}, + {'yambo_slepc_fix.patch': '2653aeecb887c3919204da575d65e9d985b0b23608d5780dc8aa1bba02dc12c5'}, ] dependencies = [ @@ -53,20 +56,26 @@ dependencies = [ with_configure = True -configopts = 'FC=mpiifort CC=mpiicc ' +configopts = 'FC=mpiifort CC=mpiicc --enable-msgs-comps ' configopts += '--prefix=%(builddir)s/%(namelower)s-%(version)s/ ' configopts += '--enable-open-mp --enable-hdf5-par-io ' -configopts += '--with-blas-libs="$LIBBLAS" ' -configopts += '--with-lapack-libs="$LIBLAPACK" --with-blacs-libs=mkl ' -configopts += '--with-scalapack-libs=mkl ' -configopts += '--with-fft-libs="-mkl" --with-fft-includedir="$FFT_INC_DIR" ' -configopts += '--with-netcdf-lib=$EBROOTNETCDF/lib --with-netcdf-include="$EBROOTNETCDF/include" ' +configopts += '--with-blas-libs="-L${MKLROOT}/lib/intel64 -Wl,--no-as-needed -lmkl_gf_lp64 -lmkl_gnu_thread ' +configopts += '-lmkl_core -lgomp -lpthread -lm -ldl" ' +configopts += '--with-lapack-libs="-L${MKLROOT}/lib/intel64 -Wl,--no-as-needed -lmkl_gf_lp64 -lmkl_gnu_thread ' +configopts += '-lmkl_core -lgomp -lpthread -lm -ldl" --with-blacs-libs=mkl ' +configopts += '--with-scalapack-libs="-L${MKLROOT}/lib/intel64 -Wl,--no-as-needed -lmkl_gf_lp64 -lmkl_gnu_thread ' +configopts += '-lmkl_core -lgomp -lpthread -lm -ldl" ' +configopts += '--with-fft-libs="-L${MKLROOT}/lib/intel64 -Wl,--no-as-needed -lmkl_gf_lp64 -lmkl_gnu_thread ' +configopts += '-lmkl_core -lgomp -lpthread -lm -ldl" --with-fft-includedir="${MKLROOT}/include" ' +configopts += '--with-netcdf-path=$EBROOTNETCDF ' configopts += '--with-netcdff-path="$EBROOTNETCDFMINFORTRAN" ' configopts += '--with-hdf5-path="$EBROOTHDF5" --with-petsc-path="$EBROOTPETSC" ' configopts += '--with-slepc-path="$EBROOTSLEPC" --with-libxc-path="$EBROOTLIBXC" ' configopts += '--enable-par-linalg --enable-slepc-linalg ' prebuildopts = "export FPATH=$EBROOTPETSC/include:$EBROOTSLEPC/include:$FPATH && " + +prebuildopts = "export SHELL='sh -x' && " buildopts = 'all' files_to_copy = [ diff --git a/easybuild/easyconfigs/y/Yambo/yambo_slepc_fix.patch b/easybuild/easyconfigs/y/Yambo/yambo_slepc_fix.patch new file mode 100644 index 00000000000..6b305af1a41 --- /dev/null +++ b/easybuild/easyconfigs/y/Yambo/yambo_slepc_fix.patch @@ -0,0 +1,169 @@ +diff -ruN yambo-5.1.2.orig/src/bse/K_multiply_by_V_slepc.F yambo-5.1.2/src/bse/K_multiply_by_V_slepc.F +--- yambo-5.1.2.orig/src/bse/K_multiply_by_V_slepc.F 2023-07-24 14:31:48.203323300 +0200 ++++ yambo-5.1.2/src/bse/K_multiply_by_V_slepc.F 2023-07-24 14:35:13.933323300 +0200 +@@ -1,5 +1,5 @@ + ! +-! Copyright (C) 2000-2023 the YAMBO team ++! Copyright (C) 2000-2022 the YAMBO team + ! http://www.yambo-code.org + ! + ! Authors (see AUTHORS file for details): HM DS IMA +@@ -26,7 +26,7 @@ + ! Interface with the K_multiply_by_V from the Haydock method + ! This function has to take the same arguments as MatMult from PETSC + ! +- use pars, ONLY : SP ++ use pars, ONLY : SP,cI + use BS_solvers, ONLY : Slepc_v,BSS_Slepc_double_grp + use BS, ONLY : BS_T_grp,BS_nT_grps,BS_K_dim + use parallel_m, ONLY : PAR_IND_T_Haydock +@@ -45,7 +45,7 @@ + ! + implicit none + ! +- PetscScalar :: tmp_value(1) ++ PetscScalar :: tmp_value(1),tmp_value_star(1) + PetscInt :: H_pos(1), pet_one + PetscErrorCode :: ierr + ! +@@ -108,12 +108,13 @@ + do i_c=1,BS_T_grp(i_g)%size + H_pos=start_index+i_c + tmp_value=cmplx(Slepc_v%Vo(i_g)%fragment(i_c,1)) ++ tmp_value_star=real(Slepc_v%Vo(i_g)%fragment(i_c,1))-cI*aimag(Slepc_v%Vo(i_g)%fragment(i_c,1)) + !SLEPC funcitons expect C indexes both in Fortran and C + call VecSetValues( vo, pet_one, H_pos, tmp_value, INSERT_VALUES, ierr ) + if(BSS_slepc_double_grp) then + ! Expand vo to anti-resonant block + H_pos=start_index_dg+i_c +- call VecSetValues( vo, pet_one, H_pos, fac*conjg(tmp_value), INSERT_VALUES, ierr ) ++ call VecSetValues( vo, pet_one, H_pos, fac*tmp_value_star, INSERT_VALUES, ierr ) + endif + enddo + enddo +diff -ruN yambo-5.1.2.orig/src/bse/K_multiply_by_V_transpose_slepc.F yambo-5.1.2/src/bse/K_multiply_by_V_transpose_slepc.F +--- yambo-5.1.2.orig/src/bse/K_multiply_by_V_transpose_slepc.F 2023-07-24 14:31:48.203323300 +0200 ++++ yambo-5.1.2/src/bse/K_multiply_by_V_transpose_slepc.F 2023-07-24 14:34:40.413323300 +0200 +@@ -1,5 +1,5 @@ + ! +-! Copyright (C) 2000-2023 the YAMBO team ++! Copyright (C) 2000-2022 the YAMBO team + ! http://www.yambo-code.org + ! + ! Authors (see AUTHORS file for details): HM DS IMA +@@ -26,7 +26,7 @@ + ! Interface with the K_multiply_by_V from the Haydock method + ! This function has to take the same arguments as MatMult from PETSC + ! +- use pars, ONLY : SP ++ use pars, ONLY : SP,cI + use BS_solvers, ONLY : Slepc_v,BSS_Slepc_double_grp + use BS, ONLY : BS_T_grp,BS_nT_grps,BS_K_dim + use parallel_m, ONLY : PAR_IND_T_Haydock +@@ -45,7 +45,7 @@ + ! + implicit none + ! +- PetscScalar :: tmp_value(1) ++ PetscScalar :: tmp_value(1),tmp_value_star(1) + PetscInt :: H_pos(1), pet_one + PetscErrorCode :: ierr + ! +@@ -109,12 +109,13 @@ + do i_c=1,BS_T_grp(i_g)%size + H_pos=start_index+i_c + tmp_value=cmplx(Slepc_v%Vo(i_g)%fragment(i_c,1)) ++ tmp_value_star=real(Slepc_v%Vo(i_g)%fragment(i_c,1))-cI*aimag(Slepc_v%Vo(i_g)%fragment(i_c,1)) + !SLEPC funcitons expect C indexes both in Fortran and C + call VecSetValues( vo, pet_one, H_pos, tmp_value, INSERT_VALUES, ierr ) + if(BSS_slepc_double_grp) then + ! Expand vo to anti-resonant block + H_pos=start_index_dg+i_c +- call VecSetValues( vo, pet_one, H_pos, fac*conjg(tmp_value), INSERT_VALUES, ierr ) ++ call VecSetValues( vo, pet_one, H_pos, fac*tmp_value_star, INSERT_VALUES, ierr ) + endif + enddo + enddo +diff -ruN yambo-5.1.2.orig/src/bse/K_stored_in_a_slepc_matrix.F yambo-5.1.2/src/bse/K_stored_in_a_slepc_matrix.F +--- yambo-5.1.2.orig/src/bse/K_stored_in_a_slepc_matrix.F 2023-07-24 14:31:48.203323300 +0200 ++++ yambo-5.1.2/src/bse/K_stored_in_a_slepc_matrix.F 2023-07-24 14:35:46.923323300 +0200 +@@ -1,5 +1,5 @@ + ! +-! Copyright (C) 2000-2023 the YAMBO team ++! Copyright (C) 2000-2022 the YAMBO team + ! http://www.yambo-code.org + ! + ! Authors (see AUTHORS file for details): HM DS +@@ -53,7 +53,7 @@ + Mat, intent(out) :: slepc_mat + ! + integer :: i_c,i_r,i_Tk,i_Tp,i_B,H_shift(2) +- PetscScalar :: Mij ++ PetscScalar :: Mij,Mij_star + PetscInt :: H_pos(2),SL_K_dim(2),SL_H_dim + PetscErrorCode :: ierr + ! +@@ -95,14 +95,17 @@ + if (H_pos(1)+H_shift(1)>H_pos(2)+H_shift(2)) cycle + if (l_BS_ares_from_res.and.H_pos(1)>H_pos(2)) cycle + ! +- Mij=BS_blk(i_B)%mat(i_r,i_c) ++ Mij = BS_blk(i_B)%mat(i_r,i_c) ++ Mij_star= real(BS_blk(i_B)%mat(i_r,i_c))-cI*aimag(BS_blk(i_B)%mat(i_r,i_c)) + ! + ! Add energies to the diagonal + ! + if(H_pos(1)+H_shift(1)==H_pos(2)+H_shift(2)) then +- Mij=real(Mij)+BSS_eh_E(H_pos(1)+H_shift(1)+1)*cONE ++ Mij =real(Mij) +BSS_eh_E(H_pos(1)+H_shift(1)+1)*cONE ++ Mij_star=real(Mij_star)+BSS_eh_E(H_pos(1)+H_shift(1)+1)*cONE + if (allocated(BSS_eh_W).and..not.BSS_perturbative_width) then +- Mij=Mij+cI*BSS_eh_W(H_pos(1)+H_shift(1)+1) ++ Mij =Mij +cI*BSS_eh_W(H_pos(1)+H_shift(1)+1) ++ Mij_star=Mij_star -cI*BSS_eh_W(H_pos(1)+H_shift(1)+1) + endif + endif + ! +@@ -110,35 +113,35 @@ + case("R") + call MatSetValue( slepc_mat, H_pos(1), H_pos(2), Mij , INSERT_VALUES, ierr ) + ! The resonant block is hermitial +- call MatSetValue( slepc_mat, H_pos(2), H_pos(1), conjg(Mij), INSERT_VALUES, ierr ) ++ call MatSetValue( slepc_mat, H_pos(2), H_pos(1), Mij_star, INSERT_VALUES, ierr ) + if (l_BS_ares_from_res.and.BS_K_coupling) then + ! The anti-resonant block is A=-R* +- call MatSetValue( slepc_mat, H_pos(1)+SL_K_dim(1), H_pos(2)+SL_K_dim(1),-conjg(Mij), INSERT_VALUES, ierr ) ++ call MatSetValue( slepc_mat, H_pos(1)+SL_K_dim(1), H_pos(2)+SL_K_dim(1), -Mij_star, INSERT_VALUES, ierr ) + ! The anti-resonant block is hermitian + call MatSetValue( slepc_mat, H_pos(2)+SL_K_dim(1), H_pos(1)+SL_K_dim(1), -Mij, INSERT_VALUES, ierr ) + endif + case("C") + call MatSetValue( slepc_mat, H_pos(1), H_pos(2)+SL_K_dim(1), Mij , INSERT_VALUES, ierr ) + ! Anti-coupling from coupling: the whole BSE matrix is Pseudo-HErmitian +- call MatSetValue( slepc_mat, H_pos(2)+SL_K_dim(1), H_pos(1),-conjg(Mij), INSERT_VALUES, ierr ) ++ call MatSetValue( slepc_mat, H_pos(2)+SL_K_dim(1), H_pos(1), -Mij_star , INSERT_VALUES, ierr ) + if (l_BS_ares_from_res) then + ! The coupling block and the anti-coupling block are symmetric + call MatSetValue( slepc_mat, H_pos(2), H_pos(1)+SL_K_dim(1), Mij , INSERT_VALUES, ierr ) +- call MatSetValue( slepc_mat, H_pos(1)+SL_K_dim(1), H_pos(2),-conjg(Mij), INSERT_VALUES, ierr ) ++ call MatSetValue( slepc_mat, H_pos(1)+SL_K_dim(1), H_pos(2), -Mij_star , INSERT_VALUES, ierr ) + endif + case("A") + ! The anti-resonant block is hermitial + if(BS_res_ares_n_mat==1) then + call MatSetValue( slepc_mat, H_pos(1)+SL_K_dim(1), H_pos(2)+SL_K_dim(1), Mij , INSERT_VALUES, ierr ) +- call MatSetValue( slepc_mat, H_pos(2)+SL_K_dim(1), H_pos(1)+SL_K_dim(1), conjg(Mij), INSERT_VALUES, ierr ) ++ call MatSetValue( slepc_mat, H_pos(2)+SL_K_dim(1), H_pos(1)+SL_K_dim(1), Mij_star , INSERT_VALUES, ierr ) + else + call MatSetValue( slepc_mat, H_pos(1), H_pos(2), Mij , INSERT_VALUES, ierr ) +- call MatSetValue( slepc_mat, H_pos(2), H_pos(1), conjg(Mij), INSERT_VALUES, ierr ) ++ call MatSetValue( slepc_mat, H_pos(2), H_pos(1), Mij_star , INSERT_VALUES, ierr ) + endif + case("Q") + call MatSetValue( slepc_mat, H_pos(1)+SL_K_dim(1), H_pos(2), Mij , INSERT_VALUES, ierr ) + ! Coupling from anti-coupling: the whole BSE matrix is Pseudo-HErmitian +- call MatSetValue( slepc_mat, H_pos(2), H_pos(1)+SL_K_dim(1),-conjg(Mij), INSERT_VALUES, ierr ) ++ call MatSetValue( slepc_mat, H_pos(2), H_pos(1)+SL_K_dim(1), -Mij_star , INSERT_VALUES, ierr ) + end select + ! + enddo From 5ec33fc1c226274af4b38d823d9f903fbaa5e28b Mon Sep 17 00:00:00 2001 From: Orient Date: Mon, 24 Jul 2023 15:20:09 +0200 Subject: [PATCH 08/10] Added patch description --- easybuild/easyconfigs/y/Yambo/Yambo-5.1.2-intel-2021b.eb | 2 +- easybuild/easyconfigs/y/Yambo/yambo_slepc_fix.patch | 3 +++ 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/easybuild/easyconfigs/y/Yambo/Yambo-5.1.2-intel-2021b.eb b/easybuild/easyconfigs/y/Yambo/Yambo-5.1.2-intel-2021b.eb index 66f0b200671..e1c46a2245e 100644 --- a/easybuild/easyconfigs/y/Yambo/Yambo-5.1.2-intel-2021b.eb +++ b/easybuild/easyconfigs/y/Yambo/Yambo-5.1.2-intel-2021b.eb @@ -42,7 +42,7 @@ checksums = [ {'yambo-5.1.2.tar.gz': '9625d8a96bd9a3ff3713ebe53228d5ac9be0a98adecbe2a2bad67234c0e26a2e'}, {'yambo-libraries-1.0.tar.gz': 'f25d86101cc9cead9f64f05181aab1f06eac8528fea5ba5c586b2b9512cb8492'}, {'iotk-y1.2.2.tar.gz': 'c0a4eb19f3e885d83d7afa52eb90658fba7cb1cb6e66049866a98dcc980de543'}, - {'yambo_slepc_fix.patch': '2653aeecb887c3919204da575d65e9d985b0b23608d5780dc8aa1bba02dc12c5'}, + {'yambo_slepc_fix.patch': 'e44a0f85ec5eb55da7c7d42937b4c452bde2ed2c6d2f98fffca15696c82b7df6'}, ] dependencies = [ diff --git a/easybuild/easyconfigs/y/Yambo/yambo_slepc_fix.patch b/easybuild/easyconfigs/y/Yambo/yambo_slepc_fix.patch index 6b305af1a41..8f2810b4b80 100644 --- a/easybuild/easyconfigs/y/Yambo/yambo_slepc_fix.patch +++ b/easybuild/easyconfigs/y/Yambo/yambo_slepc_fix.patch @@ -1,3 +1,6 @@ +Fixes a bug with some parts of Yambo that use SLEPc +Applies most of this commit to this version +https://github.com/yambo-code/yambo/commit/1846c85fdd08ec80ecf90082821cf957a0c93747 diff -ruN yambo-5.1.2.orig/src/bse/K_multiply_by_V_slepc.F yambo-5.1.2/src/bse/K_multiply_by_V_slepc.F --- yambo-5.1.2.orig/src/bse/K_multiply_by_V_slepc.F 2023-07-24 14:31:48.203323300 +0200 +++ yambo-5.1.2/src/bse/K_multiply_by_V_slepc.F 2023-07-24 14:35:13.933323300 +0200 From c8d8eb720d4e010631a590a1519077688e830988 Mon Sep 17 00:00:00 2001 From: Orient Date: Mon, 24 Jul 2023 18:59:33 +0200 Subject: [PATCH 09/10] Removed unused prebuildopts --- easybuild/easyconfigs/y/Yambo/Yambo-5.1.2-intel-2021b.eb | 2 -- 1 file changed, 2 deletions(-) diff --git a/easybuild/easyconfigs/y/Yambo/Yambo-5.1.2-intel-2021b.eb b/easybuild/easyconfigs/y/Yambo/Yambo-5.1.2-intel-2021b.eb index e1c46a2245e..e29b903deef 100644 --- a/easybuild/easyconfigs/y/Yambo/Yambo-5.1.2-intel-2021b.eb +++ b/easybuild/easyconfigs/y/Yambo/Yambo-5.1.2-intel-2021b.eb @@ -73,8 +73,6 @@ configopts += '--with-hdf5-path="$EBROOTHDF5" --with-petsc-path="$EBROOTPETSC" ' configopts += '--with-slepc-path="$EBROOTSLEPC" --with-libxc-path="$EBROOTLIBXC" ' configopts += '--enable-par-linalg --enable-slepc-linalg ' -prebuildopts = "export FPATH=$EBROOTPETSC/include:$EBROOTSLEPC/include:$FPATH && " - prebuildopts = "export SHELL='sh -x' && " buildopts = 'all' From 18582cb47c26127ba6faebf937e81080bfb7c35b Mon Sep 17 00:00:00 2001 From: Kenneth Hoste Date: Thu, 17 Aug 2023 09:50:59 +0200 Subject: [PATCH 10/10] rename patch for Yambo 5.1.2 to fix compilation with SLEPc --- easybuild/easyconfigs/y/Yambo/Yambo-5.1.2-intel-2021b.eb | 4 ++-- .../{yambo_slepc_fix.patch => Yambo-5.1.2_fix-SLEPc.patch} | 0 2 files changed, 2 insertions(+), 2 deletions(-) rename easybuild/easyconfigs/y/Yambo/{yambo_slepc_fix.patch => Yambo-5.1.2_fix-SLEPc.patch} (100%) diff --git a/easybuild/easyconfigs/y/Yambo/Yambo-5.1.2-intel-2021b.eb b/easybuild/easyconfigs/y/Yambo/Yambo-5.1.2-intel-2021b.eb index e29b903deef..7f0073ff941 100644 --- a/easybuild/easyconfigs/y/Yambo/Yambo-5.1.2-intel-2021b.eb +++ b/easybuild/easyconfigs/y/Yambo/Yambo-5.1.2-intel-2021b.eb @@ -37,12 +37,12 @@ sources = [ 'extract_cmd': 'cp %s yambo-%(version)s/lib/archive/', }, ] -patches = ['yambo_slepc_fix.patch'] +patches = ['Yambo-5.1.2_fix-SLEPc.patch'] checksums = [ {'yambo-5.1.2.tar.gz': '9625d8a96bd9a3ff3713ebe53228d5ac9be0a98adecbe2a2bad67234c0e26a2e'}, {'yambo-libraries-1.0.tar.gz': 'f25d86101cc9cead9f64f05181aab1f06eac8528fea5ba5c586b2b9512cb8492'}, {'iotk-y1.2.2.tar.gz': 'c0a4eb19f3e885d83d7afa52eb90658fba7cb1cb6e66049866a98dcc980de543'}, - {'yambo_slepc_fix.patch': 'e44a0f85ec5eb55da7c7d42937b4c452bde2ed2c6d2f98fffca15696c82b7df6'}, + {'Yambo-5.1.2_fix-SLEPc.patch': 'e44a0f85ec5eb55da7c7d42937b4c452bde2ed2c6d2f98fffca15696c82b7df6'}, ] dependencies = [ diff --git a/easybuild/easyconfigs/y/Yambo/yambo_slepc_fix.patch b/easybuild/easyconfigs/y/Yambo/Yambo-5.1.2_fix-SLEPc.patch similarity index 100% rename from easybuild/easyconfigs/y/Yambo/yambo_slepc_fix.patch rename to easybuild/easyconfigs/y/Yambo/Yambo-5.1.2_fix-SLEPc.patch