"Did not find a BLAS library." in building PSI3


I tried to compile PSI3 from the github repository GitHub - psi4/psi3: Psi3 source code.. The operation system is CentOS Linux release 7.8.2003 (Core). The system from our computer center loads MKL by ml intel/2019.03 .

According to according to psi3/INSTALL at master · psi4/psi3 · GitHub

In $objdir, run the configure script found in the $PSI3 top-level source
directory. ```

I run
../configure at $objdir, and got

checking build system type... x86_64-unknown-linux-gnu
checking host system type... x86_64-unknown-linux-gnu
checking target system type... x86_64-unknown-linux-gnu
checking whether make sets $(MAKE)... yes
checking for gcc... gcc
checking whether the C compiler works... yes
checking for C compiler default output file name... a.out
checking for suffix of executables...
checking whether we are cross compiling... no
checking for suffix of object files... o
checking whether we are using the GNU C compiler... yes
checking whether gcc accepts -g... yes
checking for gcc option to accept ISO C89... none needed
checking for g++... g++
checking whether we are using the GNU C++ compiler... yes
checking whether g++ accepts -g... yes
checking for g77... no
checking for xlf... no
checking for f77... f77
checking whether we are using the GNU Fortran 77 compiler... yes
checking whether f77 accepts -g... yes
checking if fortran compiler works... yes
checking fortran symbols... lowercase with underscore
checking for ranlib... ranlib
checking how to run the C preprocessor... gcc -E
checking how to run the C++ preprocessor... g++ -E
checking for flex... flex
checking lex output file root... lex.yy
checking lex library... none needed
checking whether yytext is a pointer... no
checking for bison... bison -y
checking for a BSD-compatible install... /usr/bin/install -c
checking whether ln -s works... yes
checking for ar... ar
checking for perl... perl
checking for latex... latex
checking for latex2html... no
checking for dvips... no
checking for bibtex... bibtex
checking for doxygen... no
checking for dot... YES
checking how to get verbose linking output from f77... -v
checking for Fortran 77 libraries of f77...  -L/opt/software/libffi/3.2.1-GCCcore-8.3.0/lib64/../lib64 -L/opt/software/libffi/3.2.1-GCCcore-8.3.0/lib/../lib64 -L/opt/software/GCCcore/8.3.0/lib64/../lib64 -L/opt/software/GCCcore/8.3.0/lib/../lib64 -L/opt/software/GCCcore/8.3.0/lib/gcc/x86_64-pc-linux-gnu/8.3.0 -L/opt/software/GCCcore/8.3.0/lib/gcc/x86_64-pc-linux-gnu/8.3.0/../../../../lib64 -L/lib/../lib64 -L/usr/lib/../lib64 -L/opt/software/FFTW/3.3.8-intel-2019.03/lib -L/opt/software/imkl/2019.3.199-iimpi-2019.03/mkl/lib/intel64 -L/opt/software/imkl/2019.3.199-iimpi-2019.03/lib/intel64 -L/opt/software/impi/2019.3.199-iccifort-2019.3.199-GCC-8.3.0-2.32/intel64/libfabric/lib -L/opt/software/impi/2019.3.199-iccifort-2019.3.199-GCC-8.3.0-2.32/intel64/lib -L/opt/software/impi/2019.3.199-iccifort-2019.3.199-GCC-8.3.0-2.32/intel64/lib/release -L/opt/software/impi/2019.3.199-iccifort-2019.3.199-GCC-8.3.0-2.32/intel64/lib/release_mt -L/opt/software/libffi/3.2.1-GCCcore-8.3.0/lib64 -L/opt/software/libffi/3.2.1-GCCcore-8.3.0/lib -L/opt/software/GMP/6.1.2-GCCcore-8.3.0/lib -L/opt/software/Boost/1.67.0/lib -L/opt/software/zlib/1.2.11-GCCcore-8.3.0/lib -L/opt/software/bzip2/1.0.6/lib -L/opt/software/icc/2019.3.199-GCC-8.3.0-2.32/compilers_and_libraries_2019.3.199/linux/tbb/lib/intel64/gcc4.4 -L/opt/software/icc/2019.3.199-GCC-8.3.0-2.32/compilers_and_libraries_2019.3.199/linux/compiler/lib/intel64 -L/opt/software/ifort/2019.3.199-GCC-8.3.0-2.32/compilers_and_libraries_2019.3.199/linux/compiler/lib/intel64 -L/opt/software/binutils/2.32-GCCcore-8.3.0/lib -L/opt/software/GCCcore/8.3.0/lib64 -L/opt/software/GCCcore/8.3.0/lib -L/opt/software/Java/1.8.0_152/lib -L/opt/software/GCCcore/8.3.0/lib/gcc/x86_64-pc-linux-gnu/8.3.0/../../.. -lgfortran -lm -lquadmath
checking for malloc in -lc... yes
checking for dgemm_ in -lessl... no
checking for dgemm_ in -lscs... no
checking for dgemm_ in -lgoto... no
checking for dgemm_ in -lf77blas... no
checking for dgemm_ in -lmkl... no
checking for dgemm_ in -lblas... no

:frowning: How to set BLAS properly let PSI3 find it? Thank you very much

This is detailed in the INSTALL file. You have to set everything with the configure command.
If you are not familiar with compiling software, maybe you can contact a system administrator?

Thank you very much for your prompt reply and suggestions. I contacted the system administrator and I used

../configure --with-blas=/opt/software/ScaLAPACK/2.1.0-gompi-2020a/lib/libscalapack.a --with-lapack=library/opt/software/ScaLAPACK/2.1.0-gompi-2020a/lib/libscalapack.a --with-ruby-lib=/opt/software/Ruby/3.0.0-GCCcore-9.3.0/lib/libruby-static.a

It seems the BLAS and LAPACK parts are fine now. Then, I got

configure: Unable to locate libruby-static.a will not link the psirb module.
configure: Unable to locate ruby.h will not link the psirb module.

It seems libruby-static.a is already inside /opt/software/Ruby/3.0.0-GCCcore-9.3.0/lib/ in the computer center.

If I proceed to III.B. Step 2: Compilation and then III.C. Step 3: Testing in the INSTALL, it led to psi4 failed something like that :frowning:

So far the questions are: is the ruby part essential in compiling PSI3? Is there any other issue with my steps?