You compiler (gnu 4.8.5) is *very* old. Please upgrade to a modern version. 

Best regards, 

Alberto 

----- El 6 de Junio de 2024, a las 19:09, Boubacar Traore 
<[email protected]> escribió: 

| I finally sorted out the issue of scalapack linking by adding its path to
| LIBRARY_PATH instead of LD_LIBRARY_PATH (more info here: [
| 
https://urldefense.com/v3/__https://stackoverflow.com/questions/47105835/ld-library-path-is-ignored-by-gcc__;!!D9dNQwwGXtA!UKXFsN93oU7fdjctS5itiA2CMH4YTUW-VUxSJl8f5ejE_wN2ffrRXxBautffKqwBfEnjMj-Kg2AAYGfMdi0$
| |
| 
https://urldefense.com/v3/__https://stackoverflow.com/questions/47105835/ld-library-path-is-ignored-by-gcc__;!!D9dNQwwGXtA!WikrDz3RbFwqReRTUxLQfCcPc8VFr9BlO-JUJkIQug1Z9u1DQHc_ER-m8pNnzqj6DLgZxZVP-L5VhTVb$
 
| ] ).

| I used this for cmake build stage:
| $ cmake -S. -B_build -DCMAKE_INSTALL_PREFIX=/home/boubacart/SIESTA/siesta/bin
| -DSIESTA_WITH_MPI=ON -DSIESTA_WITH_ELPA=ON
| -DSCALAPACK_LIBRARY_DIR=/usr/lib64/openmpi/lib
| -DSCALAPACK_LIBRARY="-lscalapack"

| The config steps then succeeds.

| However, I encounter other issues during the compilation stage and I am not 
sure
| what is the problem and from the start it issues errors regarding some
| deferred-length character :
| ===============
| [ 0%] Building Fortran object
| _deps/libfdf-build/CMakeFiles/libfdf-lib.dir/src/prec.F90.o
| [ 0%] Building Fortran object
| _deps/mctc-lib-build/CMakeFiles/mctc-lib-lib.dir/src/mctc/env/accuracy.f90.o
| [ 0%] Building Fortran object
| _deps/xmlf90-build/CMakeFiles/xmlf90-lib.dir/src/wxml/m_wxml_array_str.f90.o
| [ 0%] Building Fortran object
| _deps/libfdf-build/CMakeFiles/libfdf-lib.dir/src/utils.F90.o
| [ 0%] Building Fortran object
| _deps/libgridxc-build/CMakeFiles/libgridxc-lib.dir/src/alloc.F90.o
| [ 0%] Building Fortran object
| _deps/mctc-lib-build/CMakeFiles/mctc-lib-lib.dir/src/mctc/env/error.f90.o
| 
/home/boubacart/SIESTA/siesta-5.0.0/_build/_deps/mctc-lib-src/src/mctc/env/error.f90:46.46:

| character(len=:), allocatable :: message
| 1
| Error: Deferred-length character component 'message' at (1) is not yet 
supported
| 
/home/boubacart/SIESTA/siesta-5.0.0/_build/_deps/mctc-lib-src/src/mctc/env/error.f90:46.46:

| character(len=:), allocatable :: message
| 1
| Error: Deferred-length character component 'message' at (1) is not yet 
supported
| gmake[2]: ***
| [_deps/mctc-lib-build/CMakeFiles/mctc-lib-lib.dir/src/mctc/env/error.f90.o]
| Error 1
| gmake[1]: *** [_deps/mctc-lib-build/CMakeFiles/mctc-lib-lib.dir/all] Error 2
| gmake[1]: *** Waiting for unfinished jobs....
| [ 0%] Building Fortran object
| _deps/libgridxc-build/CMakeFiles/libgridxc-lib.dir/src/precision.F90.o
| [ 0%] Building Fortran object
| _deps/xmlf90-build/CMakeFiles/xmlf90-lib.dir/src/wxml/m_wxml_error.f90.o
| [ 0%] Building Fortran object
| _deps/libgridxc-build/CMakeFiles/libgridxc-lib.dir/src/sys.F90.o
| [ 0%] Building Fortran object
| _deps/xmlf90-build/CMakeFiles/xmlf90-lib.dir/src/wxml/m_wxml_escape.f90.o

| ..
| ..
| ..
| [ 2%] Building Fortran object
| _deps/xmlf90-build/CMakeFiles/xmlf90-lib.dir/src/dom/m_dom_parse.f90.o
| [ 2%] Building Fortran object
| _deps/libgridxc-build/CMakeFiles/libgridxc-lib.dir/src/debugxc.F90.o
| [ 3%] Building Fortran object
| _deps/xmlf90-build/CMakeFiles/xmlf90-lib.dir/src/xpath/xmlf90_xpath.f90.o
| [ 3%] Building Fortran object
| _deps/libgridxc-build/CMakeFiles/libgridxc-lib.dir/src/vv_vdwxc.F90.o
| [ 3%] Building Fortran object
| _deps/xmlf90-build/CMakeFiles/xmlf90-lib.dir/src/dom/xmlf90_dom.f90.o
| [ 3%] Linking Fortran static library libxmlf90.a
| [ 3%] Built target xmlf90-lib
| [ 3%] Building Fortran object
| _deps/libgridxc-build/CMakeFiles/libgridxc-lib.dir/src/fft3d.F90.o
| 
/home/boubacart/SIESTA/siesta-5.0.0/_build/_deps/libgridxc-src/src/fft3d.F90:234.25:

| call c_f_pointer(c_loc(aDat(:,:,:,1)),aux1,[aMesh(1)*aMesh(2)*aMesh(3)])
| 1
| Warning: Array section in 'c_loc' call at (1)
| 
/home/boubacart/SIESTA/siesta-5.0.0/_build/_deps/libgridxc-src/src/fft3d.F90:235.25:

| call c_f_pointer(c_loc(aDat(:,:,:,2)),aux2,[aMesh(1)*aMesh(2)*aMesh(3)])
| 1
| Warning: Array section in 'c_loc' call at (1)
| 
/home/boubacart/SIESTA/siesta-5.0.0/_build/_deps/libgridxc-src/src/fft3d.F90:249.28:

| call c_f_pointer(c_loc(aDat(:,:,i3,1)),aux1,[aMesh(1)*aMesh(2)])
| 1
| Warning: Array section in 'c_loc' call at (1)
| 
/home/boubacart/SIESTA/siesta-5.0.0/_build/_deps/libgridxc-src/src/fft3d.F90:250.28:

| call c_f_pointer(c_loc(aDat(:,:,i3,2)),aux2,[aMesh(1)*aMesh(2)])
| 1
| Warning: Array section in 'c_loc' call at (1)
| 
/home/boubacart/SIESTA/siesta-5.0.0/_build/_deps/libgridxc-src/src/fft3d.F90:263.25:

| call c_f_pointer(c_loc(aDat(:,:,:,1)),aux1,[aMesh(1)*aMesh(2)*aMesh(3)])
| 1
| Warning: Array section in 'c_loc' call at (1)
| 
/home/boubacart/SIESTA/siesta-5.0.0/_build/_deps/libgridxc-src/src/fft3d.F90:264.25:

| call c_f_pointer(c_loc(aDat(:,:,:,2)),aux2,[aMesh(1)*aMesh(2)*aMesh(3)])
| 1
| Warning: Array section in 'c_loc' call at (1)
| [ 3%] Building Fortran object
| _deps/libgridxc-build/CMakeFiles/libgridxc-lib.dir/src/vdwxc.F90.o
| [ 4%] Building Fortran object
| _deps/libgridxc-build/CMakeFiles/libgridxc-lib.dir/src/fftr.F90.o
| [ 4%] Building Fortran object
| _deps/libgridxc-build/CMakeFiles/libgridxc-lib.dir/src/xcmod.F90.o
| [ 4%] Building Fortran object
| _deps/libgridxc-build/CMakeFiles/libgridxc-lib.dir/src/cellxc.F90.o
| [ 4%] Building Fortran object
| _deps/libgridxc-build/CMakeFiles/libgridxc-lib.dir/src/atomxc.F90.o
| [ 4%] Building Fortran object
| _deps/libgridxc-build/CMakeFiles/libgridxc-lib.dir/src/gridxc.F90.o
| [ 4%] Linking Fortran static library libgridxc.a
| [ 4%] Built target libgridxc-lib
| gmake: *** [all] Error 2

| Time spent in user mode (CPU seconds) : 16.861s
| Time spent in kernel mode (CPU seconds) : 1.792s
| Total time : 0:07.27s
| CPU utilisation (percentage) : 256.5%
| Times the process was swapped : 0
| Times of major page faults : 1
| Times of minor page faults : 863847
| ===========================================

| Anyone have an idea about solutions to this ?

| Thanks,
| Boubacar

| On Thu, 6 Jun 2024 at 09:25, Boubacar Traore < [ mailto:[email protected] 
|
| [email protected] ] > wrote:

|| More specifically it stops at scalapack stage when :
|| "-- Performing Test scalapack_has_blacs_gridinit - Failed"

|| The config routine finds scalapack but it fails in "SiestaCheckLinalg.cmake"
|| routine.
|| All the dependencies were installed according to the doc. So, I am not sure 
if I
|| still missed something or if it is a bug ?

|| Thanks,
|| Boubacar

|| On Wed, 5 Jun 2024 at 21:54, Boubacar Traore < [ 
mailto:[email protected] |
|| [email protected] ] > wrote:

||| Hi,
||| I am trying to compile siesta with cmake but I encounter issues with 
scalapack
||| linking. I notice that the compilation process has changed compared to what 
I
||| was used to.

||| Here is my cmake build command:

||| $ cmake -S. -B_build 
-DCMAKE_INSTALL_PREFIX=/home/boubacart/SIESTA/siesta/bin
||| -DSIESTA_WITH_MPI=ON -DSIESTA_WITH_ELPA=ON -DSIESTA_WITH_LIBXC=ON
||| -DSCALAPACK_LIBRARY="-lscalapack-openmpi-devel"

||| It fails at with a linking error as shown below:
||| ===================================
||| -- The Fortran compiler identification is GNU 4.8.5
||| -- The C compiler identification is GNU 4.8.5
||| -- Detecting Fortran compiler ABI info
||| -- Detecting Fortran compiler ABI info - done
||| -- Check for working Fortran compiler: /bin/f95 - skipped
||| -- Detecting C compiler ABI info
||| -- Detecting C compiler ABI info - done
||| -- Check for working C compiler: /bin/cc - skipped
||| -- Detecting C compile features
||| -- Detecting C compile features - done
||| -- Check use of deprecated variables
||| -- All Siesta variables/options are prefixed with SIESTA_, e.g. 
SIESTA_WITH_MPI
||| -- Check use of deprecated variables - success
||| -- Using GNU compiler
||| -- Using toolchain: Config/cmake/toolchains/gnu.cmake
||| --
||| No build type selected. SIESTA will default to 'Release'.
||| To override pass -DCMAKE_BUILD_TYPE=<type> in order to configure SIESTA.
||| Available options are:
||| * -DCMAKE_BUILD_TYPE=Release - For an optimized build with no assertions or
||| debug info.
||| * -DCMAKE_BUILD_TYPE=Debug - For an unoptimized build with assertions and 
debug
||| info.
||| * -DCMAKE_BUILD_TYPE=Check - For an unoptimized build with assertions and 
debug
||| info + code checks.
||| * -DCMAKE_BUILD_TYPE=RelWithDebInfo - For an optimized build with no 
assertions
||| but with debug info.
||| * -DCMAKE_BUILD_TYPE=MinSizeRel - For a build optimized for size instead of
||| speed.

||| -- Flags for C-compiler (build type: Release): -O3 -march=native
||| -- Flags for Fortran-compiler (build type: Release): -O3 -march=native
||| -- Found PkgConfig: /bin/pkg-config (found version "0.27.1")
||| -- Checking Siesta version
||| -- SIESTA_VERSION: 5.1-MaX-28-gf3224d62e (err=3)
||| --
||| WARNING: This is *not* an official SIESTA release.
||| WARNING:
||| WARNING: Unless you are trying a feature or fix that has not
||| WARNING: been released yet, we strongly recommend the use of
||| WARNING: official releases of SIESTA, which can be downloaded from
||| WARNING: [
||| 
https://urldefense.com/v3/__https://gitlab.com/siesta-project/siesta/-/releases__;!!D9dNQwwGXtA!UKXFsN93oU7fdjctS5itiA2CMH4YTUW-VUxSJl8f5ejE_wN2ffrRXxBautffKqwBfEnjMj-Kg2AAMxgnUgg$
||| | 
https://urldefense.com/v3/__https://gitlab.com/siesta-project/siesta/-/releases__;!!D9dNQwwGXtA!WikrDz3RbFwqReRTUxLQfCcPc8VFr9BlO-JUJkIQug1Z9u1DQHc_ER-m8pNnzqj6DLgZxZVP-AFm6iAm$
  ]

||| -- Checking Siesta version - found development version
||| -- Parsing BLAS options
||| -- Locating BLAS library
||| -- Looking for Fortran sgemm
||| -- Looking for Fortran sgemm - not found
||| -- Performing Test CMAKE_HAVE_LIBC_PTHREAD
||| -- Performing Test CMAKE_HAVE_LIBC_PTHREAD - Failed
||| -- Looking for pthread_create in pthreads
||| -- Looking for pthread_create in pthreads - not found
||| -- Looking for pthread_create in pthread
||| -- Looking for pthread_create in pthread - found
||| -- Found Threads: TRUE
||| -- Looking for Fortran sgemm
||| -- Looking for Fortran sgemm - found
||| -- Found BLAS: /usr/lib64/libblas.so
||| -- Found CustomBlas: /usr/lib64/libblas.so
||| -- Locating BLAS library - found
||| -- BLAS library: /usr/lib64/libblas.so
||| -- BLAS link flags:
||| -- Parsing LAPACK options
||| -- Locating LAPACK library
||| -- Looking for Fortran cheev
||| -- Looking for Fortran cheev - not found
||| -- Looking for Fortran cheev
||| -- Looking for Fortran cheev - found
||| -- Found LAPACK: /usr/lib64/liblapack.so;/usr/lib64/libblas.so
||| -- Found CustomLapack: /usr/lib64/liblapack.so;/usr/lib64/libblas.so
||| -- Locating LAPACK library - found
||| -- LAPACK library: /usr/lib64/liblapack.so;/usr/lib64/libblas.so
||| -- LAPACK link flags:
||| -- Found MPI_C: /usr/lib64/openmpi/lib/libmpi.so (found version "3.0")
||| -- Found MPI_Fortran: /usr/lib64/openmpi/lib/libmpi_usempi.so (found version
||| "3.0")
||| -- Found MPI: TRUE (found version "3.0") found components: Fortran C
||| -- Parsing ScaLAPACK options
||| -- Locating ScaLAPACK library
||| -- Using user-defined variables
||| -- Found CustomScalapack: -lscalapack-openmpi-devel
||| -- Locating ScaLAPACK library - found
||| -- ScaLAPACK library: -lscalapack-openmpi-devel
||| -- ScaLAPACK link flags:
||| -- Checking that BLAS library works...
||| -- Performing Test blas_has_sgemm
||| -- Performing Test blas_has_sgemm - Success
||| -- Performing Test blas_cdotu_return_convention
||| -- Performing Test blas_cdotu_return_convention - Success
||| -- Checking that LAPACK library works...
||| -- Performing Test lapack_has_dsysv
||| -- Performing Test lapack_has_dsysv - Success
||| -- Checking that ScaLAPACK library works...
||| -- Performing Test scalapack_has_blacs_gridinit
||| -- Performing Test scalapack_has_blacs_gridinit - Failed
||| CMake Warning at Config/cmake/SiestaCheckLinalg.cmake:125 (message):
||| ---------------------------------------------

||| ScaLAPACK library cannot link properly Please check the library linking 
string
||| found or used by CMake---------------------------------------------
||| Call Stack (most recent call first):
||| CMakeLists.txt:189 (include)

||| CMake Error at Config/cmake/SiestaCheckLinalg.cmake:130 (message):
||| *** ScaLAPACK library does not link properly
||| Call Stack (most recent call first):
||| CMakeLists.txt:189 (include)

||| -- Configuring incomplete, errors occurred!
||| ===================================

||| Can anyone help me solve this issue? I tried but I so far did not find a
||| solution.

||| Thanks,
||| Boubacar

| --
| SIESTA is supported by the Spanish Research Agency (AEI) and by the European
| H2020 MaX Centre of Excellence
| 
(https://urldefense.com/v3/__http://www.max-centre.eu/__;!!D9dNQwwGXtA!Ur3mYMzmBYqYxB8SxtLvkDxXwBqLomhmZmzAYOZO1h3dx_Uxi6JP0997AuAsq7Y_eDKB5HWJjDkFyKgai97G$
| )
-- 
SIESTA is supported by the Spanish Research Agency (AEI) and by the European 
H2020 MaX Centre of Excellence (http://www.max-centre.eu/)

Responder a