abacus-develop icon indicating copy to clipboard operation
abacus-develop copied to clipboard

Error while compiling elpa.

Open ignisfatuus28 opened this issue 2 years ago • 4 comments

Details

Dear developers and users,

I faced some problems when compiling elpa with toolchain on a cluster. The error information is as bellow:

make[1]: *** [src/elpa2/kernels/libelpa_openmp_private_la-real_simple_block4.lo] Error 1 manually_preprocessed_..src_helpers_mod_thread_affinity.F90-src_helpers.libs_libelpa_openmp_private_la-mod_thread_affinity.o.F90(160): error #6683: A kind type parameter must be a compile-time constant. [IK] integer(kind=ik) :: thread_cpu_id -----------------^ manually_preprocessed_..src_helpers_mod_thread_affinity.F90-src_helpers.libs_libelpa_openmp_private_la-mod_thread_affinity.o.F90(161): error #6683: A kind type parameter must be a compile-time constant. [IK] integer(kind=ik) :: i, actuall_num -----------------^ manually_preprocessed_..src_helpers_mod_thread_affinity.F90-src_helpers.libs_libelpa_openmp_private_la-mod_thread_affinity.o.F90(184): error #6683: A kind type parameter must be a compile-time constant. [IK] integer(kind=ik) :: i -----------------^ manually_preprocessed_..src_helpers_mod_thread_affinity.F90-src_helpers.libs_libelpa_openmp_private_la-mod_thread_affinity.o.F90(185): error #6683: A kind type parameter must be a compile-time constant. [IK] integer(kind=ik), intent(in) :: mype -----------------^ manually_preprocessed_..src_helpers_mod_thread_affinity.F90-src_helpers.libs_libelpa_openmp_private_la-mod_thread_affinity.o.F90(186): error #6683: A kind type parameter must be a compile-time constant. [IK] integer(kind=ik) :: pid, ppid -----------------^ manually_preprocessed_..src_helpers_mod_thread_affinity.F90-src_helpers.libs_libelpa_openmp_private_la-mod_thread_affinity.o.F90(104): error #6683: A kind type parameter must be a compile-time constant. [IK] cpu_id = int(cpu_id_c, kind=ik) --------------------------------^ manually_preprocessed_..src_helpers_mod_thread_affinity.F90-src_helpers.libs_libelpa_openmp_private_la-mod_thread_affinity.o.F90(104): warning #7319: This argument's data type is incompatible with this intrinsic procedure; procedure assumed EXTERNAL. [INT] cpu_id = int(cpu_id_c, kind=ik) --------------------------------^ manually_preprocessed_..src_helpers_mod_thread_affinity.F90-src_helpers.libs_libelpa_openmp_private_la-mod_thread_affinity.o.F90(104): error #6404: This name does not have a type, and must have an explicit type. [INT] cpu_id = int(cpu_id_c, kind=ik) -------------^ manually_preprocessed_..src_helpers_mod_thread_affinity.F90-src_helpers.libs_libelpa_openmp_private_la-mod_thread_affinity.o.F90(112): error #6683: A kind type parameter must be a compile-time constant. [IK] cpu_id = int(cpu_id_c, kind=ik) --------------------------------^ manually_preprocessed_..src_helpers_mod_thread_affinity.F90-src_helpers.libs_libelpa_openmp_private_la-mod_thread_affinity.o.F90(112): warning #7319: This argument's data type is incompatible with this intrinsic procedure; procedure assumed EXTERNAL. [INT] cpu_id = int(cpu_id_c, kind=ik) --------------------------------^ manually_preprocessed_..src_helpers_mod_thread_affinity.F90-src_helpers.libs_libelpa_openmp_private_la-mod_thread_affinity.o.F90(112): error #6404: This name does not have a type, and must have an explicit type. [INT] cpu_id = int(cpu_id_c, kind=ik) -------------^ manually_preprocessed_..src_helpers_mod_thread_affinity.F90-src_helpers.libs_libelpa_openmp_private_la-mod_thread_affinity.o.F90(120): error #6683: A kind type parameter must be a compile-time constant. [IK] process_id = int(process_id_c, kind=ik) ------------------------------------------^ manually_preprocessed_..src_helpers_mod_thread_affinity.F90-src_helpers.libs_libelpa_openmp_private_la-mod_thread_affinity.o.F90(120): warning #7319: This argument's data type is incompatible with this intrinsic procedure; procedure assumed EXTERNAL. [INT] process_id = int(process_id_c, kind=ik) ------------------------------------------^ manually_preprocessed_..src_helpers_mod_thread_affinity.F90-src_helpers.libs_libelpa_openmp_private_la-mod_thread_affinity.o.F90(120): error #6404: This name does not have a type, and must have an explicit type. [INT] process_id = int(process_id_c, kind=ik) ------------------^ manually_preprocessed_..src_helpers_mod_thread_affinity.F90-src_helpers.libs_libelpa_openmp_private_la-mod_thread_affinity.o.F90(121): error #6632: Keyword arguments are invalid without an explicit interface. [KIND] pprocess_id = int(pprocess_id_c, kind=ik) -------------------------------------^ manually_preprocessed_..src_helpers_mod_thread_affinity.F90-src_helpers.libs_libelpa_openmp_private_la-mod_thread_affinity.o.F90(121): error #6404: This name does not have a type, and must have an explicit type. [IK] pprocess_id = int(pprocess_id_c, kind=ik) ------------------------------------------^ make[1]: *** [src/elpa2/kernels/libelpa_openmp_private_la-real_simple_block6.lo] Error 1 compilation aborted for manually_preprocessed_..src_helpers_mod_thread_affinity.F90-src_helpers.libs_libelpa_openmp_private_la-mod_thread_affinity.o.F90 (code 1) Traceback (most recent call last): File "/scratch/guest/gst23-23/test/abacus-develop/toolchain/build/elpa-2023.05.001/build_cpu/../manual_cpp", line 64, in check_call(args + [tmp_filename]) File "/scratch/guest/gst23-23/test/abacus-develop/toolchain/build/elpa-2023.05.001/build_cpu/../manual_cpp", line 18, in check_call return subprocess.check_call(args, **kwargs) File "/opt/intel-2022/oneapi/intelpython/latest/lib/python3.9/subprocess.py", line 373, in check_call raise CalledProcessError(retcode, cmd) subprocess.CalledProcessError: Command '['/scratch/opt/intel-2022/oneapi/mpi/2021.5.0/bin/mpiifort', '-DHAVE_CONFIG_H', '-I.', '-I..', '-module', 'private_modules', '-Imodules', '-Iprivate_modules', '-O2', '-fPIC', '-fp-model=precise', '-funroll-loops', '-g', '-qopenmp', '-qopenmp-simd', '-traceback', '-xHost', '-m64', '-I/scratch/opt/intel-2022/oneapi/mkl/2022.0.1/include', '-I/scratch/opt/intel-2022/oneapi/mkl/2022.0.1/include/fftw', '-ffree-line-length-none', '-mavx2', '-mfma', '-msse4', '-fno-lto', '-c', '-fPIC', '-o', 'src/helpers/.libs/libelpa_openmp_private_la-mod_thread_affinity.o', 'manually_preprocessed_..src_helpers_mod_thread_affinity.F90-src_helpers.libs_libelpa_openmp_private_la-mod_thread_affinity.o.F90']' returned non-zero exit status 1. make[1]: *** [src/helpers/libelpa_openmp_private_la-mod_thread_affinity.lo] Error 1 mv: cannot move '.Tpo' to '.Plo': No such file or directory make[1]: *** [src/elpa2/kernels/real_avx_2hv_double_precision.lo] Error 1

The cpu is Intel(R) Xeon(R) CPU E5-2680 v3 with intel oneapi 2022.1 and gcc-9.4.0. Does anyone know how to fix it?

Sincerely

Have you read FAQ on the online manual http://abacus.deepmodeling.com/en/latest/community/faq.html

  • [X] Yes, I have read the FAQ part on online manual.

Task list for Issue attackers (only for developers)

  • [ ] Understand the problem or question described by the user.
  • [ ] Check if the issue is a known problem or has been addressed in the documentation.
  • [ ] Test the issue or problem on a similar system or environment, if possible.
  • [ ] Identify the root cause or provide clarification on the user's question.
  • [ ] Provide a step-by-step guide, including any necessary resources, to resolve the issue or answer the question.
  • [ ] If the issue is related to documentation, update the documentation to prevent future confusion (optional).
  • [ ] If the issue is related to code, consider implementing a fix or improvement (optional).
  • [ ] Review and incorporate any relevant feedback from users or developers.
  • [ ] Ensure the user's issue is resolved or their question is answered and close the ticket.

ignisfatuus28 avatar Jan 09 '24 11:01 ignisfatuus28

Try compiling with mpifort or gfortran? GCC compiler should work with ELPA, the developers did tested it. The toolchain contains nothing about Fortran compiler, maybe you should specify it manually, i. e. export FC=/path/to/mpifort -march=native -mtune=native -O3 before installation.

Further investigation may take some time, since ELPA developers recommand using "Intel compiler" in their document; maybe it's new problem encounterd to ifort while swiching to llvm.

yizeyi18 avatar Jan 12 '24 08:01 yizeyi18

@ignisfatuus28 default compiler for intel-toolchain is icx and icpx, which may cause problem. You can change it to traditional icc and icpc by specify --with-intel-classic=yes in toolchain_intel.sh. Also you can try the method above by @yizeyi18 .

QuantumMisaka avatar Jan 13 '24 14:01 QuantumMisaka

@ignisfatuus28 default compiler for intel-toolchain is icx and icpx, which may cause problem. You can change it to traditional icc and icpc by specify --with-intel-classic=yes in toolchain_intel.sh. Also you can try the method above by @yizeyi18 .

@QuantumMisaka Have you tried ifx?

caic99 avatar Jan 23 '24 07:01 caic99

I just compiled elpa 2023.05.001 with intel oneapi 2022.2.1 and gcc 9.3.0 on an intel xeon e5-2620v4 server. Although the compiler gave a lot of warnings like "The Intel(R) C++ Compiler Classic (ICC) is deprecated..." or "Global name too long, shortened from:...", it finally compiled the code successfully.

Here is my config script, FYI:

CXX=mpiicpc CC=mpiicc FC=mpiifort \
./configure --prefix=$HOME/program/elpa/2023.05.001/oneapi_gcc9 \
               CFLAGS="-Ofast -xHost -qmkl=parallel" \
               CXXFLAGS="-Ofast -xHost -qmkl=parallel" \
               FCFLAGS="-Ofast -xHost -qmkl=parallel " \
               LIBS=" -qmkl=parallel  -lmkl_scalapack_lp64 -lmkl_blacs_intelmpi_lp64"

pplab avatar Apr 15 '24 15:04 pplab