Cannot dynamically link against OpenBLAS
Is there a reason to require static linking for OpenBLAS? Not all platforms actually ship static libraries:
❯ make CONFIG=gcc-oblas-ompi BLAS_PATH=/usr
[BIN] build/gcc-oblas-ompi/bin/Cc4s
mkdir -p build/gcc-oblas-ompi/bin/
mpicxx -DATRIP_COMMIT=bbbfb30 -DATRIP_NO_OUTPUT -D_POSIX_C_SOURCE=200112L -D__STDC_LIMIT_MACROS -DFTN_UNDERSCORE=1 -DCC4S_VERSION=\"heads/master-0-g7a90c7a\" "-DCC4S_DATE=\"Fri Mar 4 14:10:49 2022 +0100\"" "-DCOMPILER_VERSION=\"g++ (GCC) 12.1.0\"" -fopenmp -std=c++11 -Wall -pedantic --all-warnings -fmax-errors=3 -Wno-vla -Wno-int-in-bool-context -Ofast -march=native -fno-lto -Isrc/main/algorithms/perturbative-triples/include/ build/gcc-oblas-ompi/obj/main/Cc4s.o build/gcc-oblas-ompi/obj/main/Options.o build/gcc-oblas-ompi/obj/main/Writer.o build/gcc-oblas-ompi/obj/main/Reader.o build/gcc-oblas-ompi/obj/main/Setting.o build/gcc-oblas-ompi/obj/main/Log.o build/gcc-oblas-ompi/obj/main/Timer.o build/gcc-oblas-ompi/obj/main/TensorIo.o build/gcc-oblas-ompi/obj/main/TensorSet.o build/gcc-oblas-ompi/obj/main/tcc/Tcc.o build/gcc-oblas-ompi/obj/main/engines/DryTensor.o build/gcc-oblas-ompi/obj/main/mixers/Mixer.o build/gcc-oblas-ompi/obj/main/mixers/LinearMixer.o build/gcc-oblas-ompi/obj/main/mixers/DiisMixer.o build/gcc-oblas-ompi/obj/main/algorithms/Algorithm.o build/gcc-oblas-ompi/obj/main/algorithms/Write.o build/gcc-oblas-ompi/obj/main/algorithms/Read.o build/gcc-oblas-ompi/obj/main/algorithms/TensorReader.o build/gcc-oblas-ompi/obj/main/algorithms/TensorWriter.o build/gcc-oblas-ompi/obj/main/algorithms/DefineHolesAndParticles.o build/gcc-oblas-ompi/obj/main/algorithms/SliceOperator.o build/gcc-oblas-ompi/obj/main/algorithms/DimensionProperty.o build/gcc-oblas-ompi/obj/main/algorithms/NonZeroCondition.o build/gcc-oblas-ompi/obj/main/algorithms/VertexCoulombIntegrals.o build/gcc-oblas-ompi/obj/main/algorithms/SecondOrderPerturbationTheory.o build/gcc-oblas-ompi/obj/main/algorithms/CoupledCluster.o build/gcc-oblas-ompi/obj/main/algorithms/coupledcluster/CoupledClusterMethod.o build/gcc-oblas-ompi/obj/main/algorithms/coupledcluster/Ccsd.o build/gcc-oblas-ompi/obj/main/algorithms/coupledcluster/CcsdReference.o build/gcc-oblas-ompi/obj/main/algorithms/coupledcluster/Drccd.o build/gcc-oblas-ompi/obj/main/algorithms/PerturbativeTriplesReference.o build/gcc-oblas-ompi/obj/main/algorithms/FiniteSizeCorrection.o build/gcc-oblas-ompi/obj/main/algorithms/BasisSetCorrection.o build/gcc-oblas-ompi/obj/main/algorithms/UegVertexGenerator.o build/gcc-oblas-ompi/obj/main/algorithms/PerturbativeTriples.o build/gcc-oblas-ompi/obj/main/algorithms/perturbative-triples/src/atrip/Atrip.o -Wl,-Bstatic -L/home/awvwgk/projects/src/git/cc4s/extern/build/gcc-oblas-ompi/yaml-cpp/c9460110e072df84b7dee3eb651f2ec5df75fb18 -lyaml-cpp -L/home/awvwgk/projects/src/git/cc4s/extern/build/gcc-oblas-ompi/ctf/f1d951de96c3f2fc5e76df2b0f6f6148e5216776/lib -lctf -L/usr/lib -lopenblas -lgfortran -lquadmath -Wl,-Bdynamic -o build/gcc-oblas-ompi/bin/Cc4s
/usr/bin/ld: cannot find -lopenblas: No such file or directory
/usr/bin/ld: cannot find -lgfortran: No such file or directory
/usr/bin/ld: cannot find -lquadmath: No such file or directory
collect2: error: ld returned 1 exit status
make: *** [Makefile:142: build/gcc-oblas-ompi/bin/Cc4s] Error 1
Also, note that if you need LAPACK, not on all platforms OpenBLAS actually includes the LAPACK symbols
❯ mpicxx -DATRIP_COMMIT=bbbfb30 -DATRIP_NO_OUTPUT -D_POSIX_C_SOURCE=200112L -D__STDC_LIMIT_MACROS -DFTN_UNDERSCORE=1 -DCC4S_VERSION=\"heads/master-0-g7a90c7a\" "-DCC4S_DATE=\"Fri Mar 4 14:10:49 2022 +0100\"" "-DCOMPILER_VERSION=\"g++ (GCC) 12.1.0\"" -fopenmp -std=c++11 -Wall -pedantic --all-warnings -fmax-errors=3 -Wno-vla -Wno-int-in-bool-context -Ofast -march=native -fno-lto -Isrc/main/algorithms/perturbative-triples/include/ build/gcc-oblas-ompi/obj/main/Cc4s.o build/gcc-oblas-ompi/obj/main/Options.o build/gcc-oblas-ompi/obj/main/Writer.o build/gcc-oblas-ompi/obj/main/Reader.o build/gcc-oblas-ompi/obj/main/Setting.o build/gcc-oblas-ompi/obj/main/Log.o build/gcc-oblas-ompi/obj/main/Timer.o build/gcc-oblas-ompi/obj/main/TensorIo.o build/gcc-oblas-ompi/obj/main/TensorSet.o build/gcc-oblas-ompi/obj/main/tcc/Tcc.o build/gcc-oblas-ompi/obj/main/engines/DryTensor.o build/gcc-oblas-ompi/obj/main/mixers/Mixer.o build/gcc-oblas-ompi/obj/main/mixers/LinearMixer.o build/gcc-oblas-ompi/obj/main/mixers/DiisMixer.o build/gcc-oblas-ompi/obj/main/algorithms/Algorithm.o build/gcc-oblas-ompi/obj/main/algorithms/Write.o build/gcc-oblas-ompi/obj/main/algorithms/Read.o build/gcc-oblas-ompi/obj/main/algorithms/TensorReader.o build/gcc-oblas-ompi/obj/main/algorithms/TensorWriter.o build/gcc-oblas-ompi/obj/main/algorithms/DefineHolesAndParticles.o build/gcc-oblas-ompi/obj/main/algorithms/SliceOperator.o build/gcc-oblas-ompi/obj/main/algorithms/DimensionProperty.o build/gcc-oblas-ompi/obj/main/algorithms/NonZeroCondition.o build/gcc-oblas-ompi/obj/main/algorithms/VertexCoulombIntegrals.o build/gcc-oblas-ompi/obj/main/algorithms/SecondOrderPerturbationTheory.o build/gcc-oblas-ompi/obj/main/algorithms/CoupledCluster.o build/gcc-oblas-ompi/obj/main/algorithms/coupledcluster/CoupledClusterMethod.o build/gcc-oblas-ompi/obj/main/algorithms/coupledcluster/Ccsd.o build/gcc-oblas-ompi/obj/main/algorithms/coupledcluster/CcsdReference.o build/gcc-oblas-ompi/obj/main/algorithms/coupledcluster/Drccd.o build/gcc-oblas-ompi/obj/main/algorithms/PerturbativeTriplesReference.o build/gcc-oblas-ompi/obj/main/algorithms/FiniteSizeCorrection.o build/gcc-oblas-ompi/obj/main/algorithms/BasisSetCorrection.o build/gcc-oblas-ompi/obj/main/algorithms/UegVertexGenerator.o build/gcc-oblas-ompi/obj/main/algorithms/PerturbativeTriples.o build/gcc-oblas-ompi/obj/main/algorithms/perturbative-triples/src/atrip/Atrip.o -Wl,-Bstatic -L/home/awvwgk/projects/src/git/cc4s/extern/build/gcc-oblas-ompi/yaml-cpp/c9460110e072df84b7dee3eb651f2ec5df75fb18 -lyaml-cpp -L/home/awvwgk/projects/src/git/cc4s/extern/build/gcc-oblas-ompi/ctf/f1d951de96c3f2fc5e76df2b0f6f6148e5216776/lib -lctf -Wl,-Bdynamic -L/usr/lib -lopenblas -lgfortran -lquadmath -o build/gcc-oblas-ompi/bin/Cc4s
/usr/bin/ld: build/gcc-oblas-ompi/obj/main/mixers/DiisMixer.o: in function `cc4s::DiisMixer<double, cc4s::DryTensorEngine<cc4s::CtfTensorEngine> >::inverse(std::vector<double, std::allocator<double> >, unsigned long)':
DiisMixer.cxx:(.text._ZN4cc4s9DiisMixerIdNS_15DryTensorEngineINS_15CtfTensorEngineEEEE7inverseESt6vectorIdSaIdEEm[_ZN4cc4s9DiisMixerIdNS_15DryTensorEngineINS_15CtfTensorEngineEEEE7inverseESt6vectorIdSaIdEEm]+0x15c): undefined reference to `dsysv_'
/usr/bin/ld: build/gcc-oblas-ompi/obj/main/mixers/DiisMixer.o: in function `cc4s::DiisMixer<double, cc4s::DryTensorEngine<cc4s::CtfTensorEngine> >::inverse(std::vector<std::complex<double>, std::allocator<std::complex<double> > >, unsigned long)':
DiisMixer.cxx:(.text._ZN4cc4s9DiisMixerIdNS_15DryTensorEngineINS_15CtfTensorEngineEEEE7inverseESt6vectorISt7complexIdESaIS7_EEm[_ZN4cc4s9DiisMixerIdNS_15DryTensorEngineINS_15CtfTensorEngineEEEE7inverseESt6vectorISt7complexIdESaIS7_EEm]+0x178): undefined reference to `zsysv_'
/usr/bin/ld: build/gcc-oblas-ompi/obj/main/mixers/DiisMixer.o: in function `cc4s::DiisMixer<std::complex<double>, cc4s::DryTensorEngine<cc4s::CtfTensorEngine> >::inverse(std::vector<double, std::allocator<double> >, unsigned long)':
DiisMixer.cxx:(.text._ZN4cc4s9DiisMixerISt7complexIdENS_15DryTensorEngineINS_15CtfTensorEngineEEEE7inverseESt6vectorIdSaIdEEm[_ZN4cc4s9DiisMixerISt7complexIdENS_15DryTensorEngineINS_15CtfTensorEngineEEEE7inverseESt6vectorIdSaIdEEm]+0x15c): undefined reference to `dsysv_'
/usr/bin/ld: build/gcc-oblas-ompi/obj/main/mixers/DiisMixer.o: in function `cc4s::DiisMixer<std::complex<double>, cc4s::DryTensorEngine<cc4s::CtfTensorEngine> >::inverse(std::vector<std::complex<double>, std::allocator<std::complex<double> > >, unsigned long)':
DiisMixer.cxx:(.text._ZN4cc4s9DiisMixerISt7complexIdENS_15DryTensorEngineINS_15CtfTensorEngineEEEE7inverseESt6vectorIS2_SaIS2_EEm[_ZN4cc4s9DiisMixerISt7complexIdENS_15DryTensorEngineINS_15CtfTensorEngineEEEE7inverseESt6vectorIS2_SaIS2_EEm]+0x178): undefined reference to `zsysv_'
/usr/bin/ld: build/gcc-oblas-ompi/obj/main/mixers/DiisMixer.o: in function `cc4s::DiisMixer<double, cc4s::CtfTensorEngine>::inverse(std::vector<double, std::allocator<double> >, unsigned long)':
DiisMixer.cxx:(.text._ZN4cc4s9DiisMixerIdNS_15CtfTensorEngineEE7inverseESt6vectorIdSaIdEEm[_ZN4cc4s9DiisMixerIdNS_15CtfTensorEngineEE7inverseESt6vectorIdSaIdEEm]+0x15c): undefined reference to `dsysv_'
/usr/bin/ld: build/gcc-oblas-ompi/obj/main/mixers/DiisMixer.o: in function `cc4s::DiisMixer<double, cc4s::CtfTensorEngine>::inverse(std::vector<std::complex<double>, std::allocator<std::complex<double> > >, unsigned long)':
DiisMixer.cxx:(.text._ZN4cc4s9DiisMixerIdNS_15CtfTensorEngineEE7inverseESt6vectorISt7complexIdESaIS5_EEm[_ZN4cc4s9DiisMixerIdNS_15CtfTensorEngineEE7inverseESt6vectorISt7complexIdESaIS5_EEm]+0x178): undefined reference to `zsysv_'
/usr/bin/ld: build/gcc-oblas-ompi/obj/main/mixers/DiisMixer.o: in function `cc4s::DiisMixer<std::complex<double>, cc4s::CtfTensorEngine>::inverse(std::vector<double, std::allocator<double> >, unsigned long)':
DiisMixer.cxx:(.text._ZN4cc4s9DiisMixerISt7complexIdENS_15CtfTensorEngineEE7inverseESt6vectorIdSaIdEEm[_ZN4cc4s9DiisMixerISt7complexIdENS_15CtfTensorEngineEE7inverseESt6vectorIdSaIdEEm]+0x15c): undefined reference to `dsysv_'
/usr/bin/ld: build/gcc-oblas-ompi/obj/main/mixers/DiisMixer.o: in function `cc4s::DiisMixer<std::complex<double>, cc4s::CtfTensorEngine>::inverse(std::vector<std::complex<double>, std::allocator<std::complex<double> > >, unsigned long)':
DiisMixer.cxx:(.text._ZN4cc4s9DiisMixerISt7complexIdENS_15CtfTensorEngineEE7inverseESt6vectorIS2_SaIS2_EEm[_ZN4cc4s9DiisMixerISt7complexIdENS_15CtfTensorEngineEE7inverseESt6vectorIS2_SaIS2_EEm]+0x178): undefined reference to `zsysv_'
/usr/bin/ld: /home/awvwgk/projects/src/git/cc4s/extern/build/gcc-oblas-ompi/ctf/f1d951de96c3f2fc5e76df2b0f6f6148e5216776/lib/libctf.a(blas_symbs.o): in function `void CTF_BLAS::syr<std::complex<float> >(char const*, int const*, std::complex<float> const*, std::complex<float> const*, int const*, std::complex<float>*, int const*)':
blas_symbs.cxx:(.text+0x61): undefined reference to `csyr_'
/usr/bin/ld: /home/awvwgk/projects/src/git/cc4s/extern/build/gcc-oblas-ompi/ctf/f1d951de96c3f2fc5e76df2b0f6f6148e5216776/lib/libctf.a(blas_symbs.o): in function `void CTF_BLAS::syr<std::complex<double> >(char const*, int const*, std::complex<double> const*, std::complex<double> const*, int const*, std::complex<double>*, int const*)':
blas_symbs.cxx:(.text+0x71): undefined reference to `zsyr_'
/usr/bin/ld: /home/awvwgk/projects/src/git/cc4s/extern/build/gcc-oblas-ompi/ctf/f1d951de96c3f2fc5e76df2b0f6f6148e5216776/lib/libctf.a(blas_symbs.o): in function `void CTF_BLAS::posv<float>(char*, int const*, int const*, float*, int const*, float*, int const*, int*)':
blas_symbs.cxx:(.text+0x81): undefined reference to `sposv_'
/usr/bin/ld: /home/awvwgk/projects/src/git/cc4s/extern/build/gcc-oblas-ompi/ctf/f1d951de96c3f2fc5e76df2b0f6f6148e5216776/lib/libctf.a(blas_symbs.o): in function `void CTF_BLAS::posv<double>(char*, int const*, int const*, double*, int const*, double*, int const*, int*)':
blas_symbs.cxx:(.text+0x91): undefined reference to `dposv_'
/usr/bin/ld: /home/awvwgk/projects/src/git/cc4s/extern/build/gcc-oblas-ompi/ctf/f1d951de96c3f2fc5e76df2b0f6f6148e5216776/lib/libctf.a(blas_symbs.o): in function `void CTF_BLAS::posv<std::complex<float> >(char*, int const*, int const*, std::complex<float>*, int const*, std::complex<float>*, int const*, int*)':
blas_symbs.cxx:(.text+0xa1): undefined reference to `cposv_'
/usr/bin/ld: /home/awvwgk/projects/src/git/cc4s/extern/build/gcc-oblas-ompi/ctf/f1d951de96c3f2fc5e76df2b0f6f6148e5216776/lib/libctf.a(blas_symbs.o): in function `void CTF_BLAS::posv<std::complex<double> >(char*, int const*, int const*, std::complex<double>*, int const*, std::complex<double>*, int const*, int*)':
blas_symbs.cxx:(.text+0xb1): undefined reference to `zposv_'
collect2: error: ld returned 1 exit status
To upload designs, you'll need to enable LFS and have an admin enable hashed storage. More information