Siesta depends mainly on BLAS, LAPACK, Scalapack, OpenMPI, and some other libraries.
I know that Gentoo has migrated to Flexiblas library to change BLAS/LAPACK implementation (https://www.gentoo.org/support/news-ite ... ation.html). I want to use OpenBLAS.
So i have installed all required dependencies:
Code: Select all
emerge --pretend --verbose openblas openmpi scalapack netcdf netcdf-fortran hdf5 libxc flexiblas lapack
These are the packages that would be merged, in order:
Calculating dependencies... done!
Dependency resolution took 1.46 s (backtrack: 0/20).
[ebuild R ] sci-libs/openblas-0.3.31::gentoo USE="openmp -cpudetection -index64 -pthread -relapack -test" 0 KiB
[ebuild R ] sys-cluster/openmpi-5.0.9::gentoo USE="fortran romio -cma -cuda -peruse -valgrind" OPENMPI_FABRICS="-knem -ofed" OPENMPI_RM="-pbs (-slurm)" 0 KiB
[ebuild R ] sci-libs/libxc-5.1.7::gentoo USE="fortran -test" 0 KiB
[ebuild R ] sci-libs/hdf5-1.14.6-r2:0/310-cmake::gentoo USE="fortran hl mpi szip zlib -cxx -debug -test -threads -unsupported" 0 KiB
[ebuild R ] sci-libs/netcdf-4.9.3-r2:0/22::gentoo USE="bzip2 dap examples hdf5 mpi szip -blosc -doc -hdf -test -zstd" 0 KiB
[ebuild R ] sci-libs/netcdf-fortran-4.6.1:0/7::gentoo USE="examples -doc -test -zstd" 0 KiB
[ebuild R ] sci-libs/lapack-3.12.1-r2::gentoo USE="deprecated flexiblas lapacke -doc -eselect-ldso -index64 -test" 0 KiB
[ebuild R ] sci-libs/flexiblas-3.5.0::gentoo USE="openblas openmp system-blas -blis -index64 -mkl -tbb -test" 0 KiB
[ebuild R ] sci-libs/scalapack-2.2.0_p20240704::gentoo USE="-static-libs -test" 0 KiB
Total: 9 packages (9 reinstalls), Size of downloads: 0 KiB
* IMPORTANT: 28 news items need reading for repository 'gentoo'.
* Use eselect news read to view new items.
This is my toolchain:
Code: Select all
emerge -pv gcc glibc binutils
These are the packages that would be merged, in order:
Calculating dependencies... done!
Dependency resolution took 1.45 s (backtrack: 0/20).
[ebuild R ] sys-devel/binutils-2.45.1:2.45::gentoo USE="(cet) nls plugins zstd -debuginfod -doc -gprofng -hardened -multitarget -pgo -static-libs -test -vanilla -xxhash" 0 KiB
[ebuild R ] sys-devel/gcc-15.2.1_p20251122:15::gentoo USE="cet (cxx) (default-stack-clash-protection) (default-znow) fortran (multilib) nls openmp (pie) sanitize ssp zstd -ada -cobol (-custom-cflags) -d -debug -doc (-fixed-point) -go -graphite -hardened (-ieee-long-double) -jit -libgdiagnostics (-libssp) -lto -modula2 -objc -objc++ -objc-gc (-pch) -pgo -rust -systemtap -test (-time64) -valgrind -vanilla -vtv" 0 KiB
[ebuild R ] sys-libs/glibc-2.42-r4:2.2::gentoo USE="cet multiarch (multilib) ssp stack-realign (static-libs) -audit -caps -compile-locales (-custom-cflags) -doc -gd -hash-sysv-compat -headers-only -multilib-bootstrap -nscd -perl -profile (-selinux) -sframe -suid -systemd -systemtap -test (-vanilla) -verify-sig" 0 KiB
Total: 3 packages (3 reinstalls), Size of downloads: 0 KiB
* IMPORTANT: 28 news items need reading for repository 'gentoo'.
* Use eselect news read to view new items.
The error message:
Code: Select all
cmake --build _build -j 8
[ 50%] Building Fortran object Util/TS/tscontour/CMakeFiles/SIESTA.tscontour.dir/__/__/__/Src/m_ts_sparse.F90.o
[ 50%] Building Fortran object Util/TS/tscontour/CMakeFiles/SIESTA.tscontour.dir/__/__/__/Src/m_ts_weight.F90.o
[ 50%] Building Fortran object Util/TS/tscontour/CMakeFiles/SIESTA.tscontour.dir/__/__/__/Src/m_ts_contour.f90.o
[ 50%] Building Fortran object Util/TS/tscontour/CMakeFiles/SIESTA.tscontour.dir/__/__/__/Src/ts_dq.F90.o
[ 50%] Building Fortran object Util/TS/tscontour/CMakeFiles/SIESTA.tscontour.dir/__/__/__/Src/m_ts_options.F90.o
[ 50%] Building Fortran object Util/TS/tscontour/CMakeFiles/SIESTA.tscontour.dir/tscontour.F90.o
[ 51%] Linking Fortran executable tscontour
/usr/lib/gcc/x86_64-pc-linux-gnu/15/../../../../x86_64-pc-linux-gnu/bin/ld: skipping incompatible /usr/lib/libm.so when searching for -lm
/usr/lib/gcc/x86_64-pc-linux-gnu/15/../../../../x86_64-pc-linux-gnu/bin/ld: skipping incompatible /usr/lib/libm.a when searching for -lm
/usr/lib/gcc/x86_64-pc-linux-gnu/15/../../../../x86_64-pc-linux-gnu/bin/ld: skipping incompatible /usr/lib/libm.so when searching for -lm
/usr/lib/gcc/x86_64-pc-linux-gnu/15/../../../../x86_64-pc-linux-gnu/bin/ld: skipping incompatible /usr/lib/libm.a when searching for -lm
/usr/lib/gcc/x86_64-pc-linux-gnu/15/../../../../x86_64-pc-linux-gnu/bin/ld: skipping incompatible /usr/lib/libm.so when searching for -lm
/usr/lib/gcc/x86_64-pc-linux-gnu/15/../../../../x86_64-pc-linux-gnu/bin/ld: skipping incompatible /usr/lib/libm.a when searching for -lm
/usr/lib/gcc/x86_64-pc-linux-gnu/15/../../../../x86_64-pc-linux-gnu/bin/ld: skipping incompatible /usr/lib/libc.so when searching for -lc
/usr/lib/gcc/x86_64-pc-linux-gnu/15/../../../../x86_64-pc-linux-gnu/bin/ld: skipping incompatible /usr/lib/libc.a when searching for -lc
/usr/lib/gcc/x86_64-pc-linux-gnu/15/../../../../x86_64-pc-linux-gnu/bin/ld: CMakeFiles/SIESTA.tscontour.dir/__/__/__/Src/kpoint_t.F90.o: in function `__kpoint_t_m_MOD_kpoint_read':
kpoint_t.F90:(.text+0x3606): undefined reference to `process_k_cell_'
/usr/lib/gcc/x86_64-pc-linux-gnu/15/../../../../x86_64-pc-linux-gnu/bin/ld: kpoint_t.F90:(.text+0x3ada): undefined reference to `process_k_cell_'
/usr/lib/gcc/x86_64-pc-linux-gnu/15/../../../../x86_64-pc-linux-gnu/bin/ld: kpoint_t.F90:(.text+0x3d27): undefined reference to `process_k_cell_'
collect2: error: ld returned 1 exit status
gmake[2]: *** [Util/TS/tscontour/CMakeFiles/SIESTA.tscontour.dir/build.make:2345: Util/TS/tscontour/tscontour] Error 1
gmake[1]: *** [CMakeFiles/Makefile2:7472: Util/TS/tscontour/CMakeFiles/SIESTA.tscontour.dir/all] Error 2
gmake: *** [Makefile:146: all] Error 2
I got the compilation error. I don't know if this is the bug in siesta, or it is related to migration to Flexiblas?
As i understand, the compilation is done using Flexiblas headers instead of OpenBLAS.
I have also tried version 5.4.1, and got the same error.
[/code]
In Debian trixie using older versions of libraries and toolchain i can successfully compile siesta-5.4.1 (with OpenBLAS).

