-
Notifications
You must be signed in to change notification settings - Fork 54
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
compile issues with undefined references to mkl commands (that appear in the relevant folders) #147
Comments
This looks like an issue with scalapack symbols. Running configure with --build-scalapack will download and build ScaLAPACK at configure time, but you are also providing MKL ScaLAPACK symbols. One or the other should be workable but not both together. I also cannot comment on the specific list of MKL symbols needed, as these are architecture dependent (would recommend MKL link line advisor, likely you are already using that). Also configuring with --no-static or --no-dynamic will build only dynamic (necessary for Python) or only static (sufficient for C++ without dynamic linking) libraries, which may simpplify things and avoid errors. |
Thanks, that seems to help, but then this error message rears its head, /Users/dgrin/ctf/scalapack/BLACS/SRC/igsum2d_.c:153:7: error: implicit declaration of function 'BI_imvcopy' is invalid in C99 [-Werror,-Wimplicit-function-declaration] I'm guessing this is a simple swap to a different compiler, but I'm not sure how to proceed. |
I would recommend to make sure ScaLAPACK built correctly when CTF's configure executed and to try to run some of the tests included in the ScaLAPACK package. There may be issues with missing libraries or the BLAS/MKL/OpenBLAS library ScaLAPACK is trying to use. You may ultimately need to build it separately (or can try the MKL ScaLAPACK). CTF also builds without ScaLAPACK, but will not include functionality related to interfacing to ScaLAPACK routines for solving systems of equations and eigenvalue computations, all sparse/dense tensor contraction functions should work without it. |
I was able to avoid this problem by running configure after installing fresh lapack, openblas, and scalapack, and leaving scalapack build off the configure. I was then able to run make, and make install. Now when I run my python calculation that uses ctf it behaves until I try to an SVD, at which point it seg faults (with an 8X8 matrix and no nans in it). When I try to generate make test, make python_test, or make svd, I get lots warnings about "Undefined symbols for architecture arm64: Ultimately, these makes crash of the form, clang: error: linker command failed with exit code 1 (use -v to see invocation) I think somehow the libraries are only partially pluigged in at this point. Thoughts? |
This is expected, using SVD requires Scalapack. |
Sorry if I was unclear - what I meant to say was that I built scalapack, separately but still included it via --with-scalapack in the config run. So in principle, SVD should work, no? |
I see, then yes, understood your post as leaving off scalapack altogether. Please send output from configure and make python_test. (accidentally clicked close and post, reopened) |
I tried two approaches -- ./configure CXX=mpicxx --build-scalapack --with-scalapack --with-lapack --install-dir=~/lib/ Then the configure gave the output Checking compiler type/version... Using Intel compilers. scalapack.tgz 100%[===================>] 5.06M 10.9MB/s in 0.5s 2022-10-11 01:04:24 (10.9 MB/s) - ‘scalapack.tgz’ saved [5307441/5307441] CMake Deprecation Warning at CMakeLists.txt:1 (cmake_minimum_required): Update the VERSION argument value or use a ... suffix to tell -- The C compiler identification is Intel 19.0.5.20190815 followed by many lines showing scalapack being built with no errors followed by the output Update the VERSION argument value or use a ... suffix to tell -- Found MPI_LIBRARY : TRUE followed by many more lines with cmake building scalapack followed by build completed in scalapack subdirectory. and successful make and make install commands After that I tried make python, which generated many of these warnings, ending the install Wondering if the issue was just with the python installation, I also tried make test, which yielded the message make test_suite -C test |
./configure CXX=mpicxx --with-lapack 'LD_LIB_PATH=-L/opt/intel/compilers_and_libraries_2019.5.281/linux/mkl/lib/intel64 -Wl,--no-as-needed' 'LD_LIBS=-lmkl_scalapack_lp64 -lmkl_gf_lp64 -lmkl_intel_thread -lmkl_core -lmkl_blacs_intelmpi_lp64 -lmkl_def -liomp5 -lpthread -lm -ldl' --install-dir=~/lib/ make and make install then ran without issue, as does make python but then when I run complex, int, double, int, int*, int, int*, int*, double*, int*)': |
I'm trying to install ctf on a linux box, first loading my openmpi module, then running this config command
./configure CXX=mpicxx --build-scalapack --build-hptt --with-hptt --with-scalapack --with-lapack 'LD_LIB_PATH=-L/opt/intel/compilers_and_libraries_2019.5.281/linux/mkl/lib/intel64 -Wl,--no-as-needed' 'LD_LIBS=-lmkl_scalapack_lp64 -lmkl_gf_lp64 -lmkl_intel_thread -lmkl_core -lmkl_blacs_intelmpi_lp64 -lmkl_def -liomp5 -lpthread -lm -ldl' --install-dir=~/lib/
Then removing all -ipo commands (they were causing compiling issues), then running make, and then make install. This all works, fine, but when I try to run make test or make test_python, the compiler crashes and gives errors liek these:
erbla_':
pxerbla.f:(.text+0x66): undefined reference to
for_write_seq_fmt' pxerbla.f:(.text+0x7f): undefined reference to
for_write_seq_fmt_xmit'pxerbla.f:(.text+0x9a): undefined reference to
for_write_seq_fmt_xmit' pxerbla.f:(.text+0xb3): undefined reference to
for_write_seq_fmt_xmit'/home/dgrin/ctf/scalapack/build/lib/libscalapack.a(pjlaenv.f.o): In function
pjlaenv_': pjlaenv.f:(.text+0x3e): undefined reference to
for_cpystr'I was able to get much further on my OS laptop, but the svd tests would not work there. Any tips?
The text was updated successfully, but these errors were encountered: