marekandreas / elpa

A scalable eigensolver for dense, symmetric (hermitian) matrices (fork of https://gitlab.mpcdf.mpg.de/elpa/elpa.git)
Other
27 stars 13 forks source link

How to run c test? #37

Closed amitharitan-google closed 1 year ago

amitharitan-google commented 1 year ago

Hi, I know it may seem as a novice question but I am having difficulties running the C tests. If I am not mistaken I need to compile the tests inside the /test/C folder right? how do I compile them? I have installed elpa using https://xconfigure.readthedocs.io/en/latest/elpa/

I would really love the help. thanks in advance!

marekandreas commented 1 year ago

Hello @amitharitan-google,

I am not sure about xconfigure, since this is a third-party tool for ELPA. Normally you build ELPA with

"make check" will then build & run the tests (including the C tests). After calling make check, you can also run the test binaries individually

amitharitan-google commented 1 year ago

Hi @marekandreas Thank you for the quick answer. when I try to run the "make check" with Intel's oneAPI DPC++/C++ Compiler (ICX), I get the following errors:

make[2]: Entering directory '/private/elpa2023' CC test/C/validate_c_version_complex_double_eigenvalues_1stageanalytic explicit-test.o icx: command line warning #10430: Unsupported command line options encountered These options as listed are not supported. For more information, use '-qnextgen-diag'. option list: -complex-limited-range icx: warning: overriding '-ffp-model=fast=2' option with '-ffp-model=fast' [-Wov erriding-t-option] CCLD validate_c_version_complex_double_eigenvalues_1stage_analytic_explici t icx: command line warning #10430: Unsupported command line options encountered These options as listed are not supported. For more information, use '-qnextgen-diag'. option list: -complex-limited-range icx: error: unknown argument '-threads'; did you mean '-mthreads'? make[2]: [Makefile:69569: validate_c_version_complex_double_eigenvalues_1sta ge_analytic_explicit] Error 1 make[2]: Leaving directory '/private/elpa2023' make[1]: [Makefile:90892: check-am] Error 2 make[1]: Leaving directory '/private/elpa2023' make: *** [Makefile:90895: check] Error 2

The Flags I use while configuring ELPA are:

AR="xiar" FC="mpiifort" CC=icx CXX=icpx F77=ifx F90=ifx

MPICC="mpiicc -cc=icx" MPIFC="mpiifort -fc=ifx" MPIF77="mpiifort -fc=ifx" MPIF90="mpiifort -fc=ifx" MPICXX="mpiicpc -cxx=icpx"

and I also use "--enable-ifx-compiler".

When I try to run the "make check" with the old mpiicc, I seems to work, but I get many warnings such as: icc: remark #10441: The Intel(R) C++ Compiler Classic (ICC) is deprecated and will be removed from product release in the second half of 2023. The Intel(R) oneAPI DPC++/C++ Compiler (ICX) is the recommended compiler moving forward. Please transition to use this compiler. Use '-diag-disable=10441' to disable this message. icc: command line warning #10006: ignoring unknown option '-threads'

Does this mean that ELPA is not working with oneAPI DPC++/C++ Compilers, or am I doing something wrong?

Thanks so much, Amit

marekandreas commented 1 year ago

Dear @amitharitan-google,

no you can of course compile ELPA with Intel's new oneAPI compilers, actually this is madatory for the SYCL GPU build. Here is an example on how the configure should roughly look like (the details depend on your system):

../configure --enable-option-checking=fatal FC=mpiifx CC=mpiicx CXX=mpiicpx CFLAGS="-O2 -g -xCORE-AVX512" CXXFLAGS="-O2 -g -xCORE-AVX512 -fsycl -I${INTEL_HOME}/compiler/latest/linux/include/sycl -I${MKL_HOME}/include" FCFLAGS="-O2 -g -xCORE-AVX512 -fsycl -I${INTEL_HOME}/compiler/latest/linux/include/sycl" LIBS="-L${INTEL_HOME}/compiler/latest/linux/lib -L${INTEL_HOME}/compiler/latest/linux/compiler/lib/intel64_lin -lsycl -Wl,-rpath,${INTEL_HOME}/compiler/latest/linux/lib" SCALAPACK_FCFLAGS="-I${MKL_HOME}/include/intel64/lp64 -fsycl" SCALAPACK_LDFLAGS="-fsycl -Wc,-fsycl -L${MKL_HOME}/lib/intel64 -lmkl_sycl -lmkl_scalapack_lp64 -lmkl_intel_lp64 -lmkl_sequential -lmkl_core -lmkl_blacs_intelmpi_lp64 -lsycl -lOpenCL -lpthread -lm -ldl -lirng -lstdc++ -Wl,-rpath,${MKL_HOME}/lib/intel64" --enable-ifx-compiler --enable-single-precision --with-mpi=yes --enable-sse-kernels --enable-sse-assembly-kernels --enable-avx-kernels --enable-avx2-kernels --enable-avx512 --enable-intel-gpu-sycl-kernels --enable-intel-gpu-backend=sycl