Closed yizeyi18 closed 5 months ago
I can confirm the same finding, with gnu environment on version 3.4.0.
The following is the first few lines of my output where errors happen:
[ 64%] Building CXX object source/module_basis/module_ao/test/CMakeFiles/ORB_nonlocal_test.dir/ORB_nonlocal_test.cpp.o
In file included from /home/kluo/Documents/repos/abacus/source/module_hsolver/test/diago_elpa_utils.h:18,
from /home/kluo/Documents/repos/abacus/source/module_hsolver/test/diago_lcao_test.cpp:1:
/home/kluo/Documents/repos/abacus/source/module_hsolver/my_elpa.h:22:17: error: expected identifier before ‘_Complex’
22 | #define complex _Complex
| ^~~~~~~~
In file included from /home/kluo/Documents/repos/abacus/source/module_hsolver/my_elpa.h:23:
/usr/include/elpa/elpa/elpa_generated.h:176:90: error: expected ‘,’ or ‘...’ before ‘<’ token
176 | void elpa_hermitian_multiply_a_h_a_dc(elpa_t handle, char uplo_a, char uplo_c, int ncb, double_complex *a, double_complex *b, int nrows_b, int ncols_b, double_complex *c, int nrows_c, int ncols_c, int *error);
| ^~~~~~~~~~~~~~
I have to turn off ELPA usage by
cmake .. -DBUILD_TESTING=ON -DUSE_ELPA=OFF
@yizeyi18 and @kluophysics, could you have a try with develop branch after PR #3774?
Describe the Testing Issue
source/module_hsolver/test/diago_lcao_test.cpp includes myelpa.h instead of elpa/elpa.h, and fails to be compiled.
Error message
``` In file included from /home/yizeyi18/soft/abacus-develop-3.4.3/source/module_hsolver/test/diago_elpa_utils.h:18, from /home/yizeyi18/soft/abacus-develop-3.4.3/source/module_hsolver/test/diago_lcao_test.cpp:1: /home/yizeyi18/soft/abacus-develop-3.4.3/source/module_hsolver/my_elpa.h:22:17: error: expected identifier before '_Complex' 22 | #define complex _Complex | ^~~~~~~~ In file included from /home/yizeyi18/soft/abacus-develop-3.4.3/source/module_hsolver/my_elpa.h:23: /home/yizeyi18/soft/spack/opt/spack/linux-ubuntu22.04-zen3/gcc-13.1.0/elpa-2023.05.001-vhmgozarnpu2xjhb4qzbgd3qcromwygb/include/elpa_openmp-2023.05.001/elpa/elpa_generated.h:176:90: error: expected ',' or '..' before '<' token 176 | void elpa_hermitian_multiply_a_h_a_dc(elpa_t handle, char uplo_a, char uplo_c, int ncb, double_complex *a, double_complex *b, int nrows_b, int ncols_b, double_complex *c, int nrows_c, int ncols_c, int *error); | ^~~~~~~~~~~~~~ /home/yizeyi18/soft/abacus-develop-3.4.3/source/module_hsolver/my_elpa.h:22:17: error: expected identifier before '_Complex' 22 | #define complex _Complex | ^~~~~~~~ /home/yizeyi18/soft/spack/opt/spack/linux-ubuntu22.04-zen3/gcc-13.1.0/elpa-2023.05.001-vhmgozarnpu2xjhb4qzbgd3qcromwygb/include/elpa_openmp-2023.05.001/elpa/elpa_generated.h:177:90: error: expected ',' or '..' before '<' token 177 | void elpa_hermitian_multiply_a_h_a_fc(elpa_t handle, char uplo_a, char uplo_c, int ncb, float_complex *a, float_complex *b, int nrows_b, int ncols_b, float_complex *c, int nrows_c, int ncols_c, int *error); | ^~~~~~~~~~~~~ /home/yizeyi18/soft/abacus-develop-3.4.3/source/module_hsolver/my_elpa.h:22:17: error: expected identifier before '_Complex' 22 | #define complex _Complex | ^~~~~~~~ /home/yizeyi18/soft/spack/opt/spack/linux-ubuntu22.04-zen3/gcc-13.1.0/elpa-2023.05.001-vhmgozarnpu2xjhb4qzbgd3qcromwygb/include/elpa_openmp-2023.05.001/elpa/elpa_generated.h:180:90: error: expected ',' or '..' before '<' token 180 | void elpa_hermitian_multiply_d_ptr_dc(elpa_t handle, char uplo_a, char uplo_c, int ncb, double_complex *a, double_complex *b, int nrows_b, int ncols_b, double_complex *c, int nrows_c, int ncols_c, int *error); | ^~~~~~~~~~~~~~ /home/yizeyi18/soft/abacus-develop-3.4.3/source/module_hsolver/my_elpa.h:22:17: error: expected identifier before '_Complex' 22 | #define complex _Complex | ^~~~~~~~ /home/yizeyi18/soft/spack/opt/spack/linux-ubuntu22.04-zen3/gcc-13.1.0/elpa-2023.05.001-vhmgozarnpu2xjhb4qzbgd3qcromwygb/include/elpa_openmp-2023.05.001/elpa/elpa_generated.h:181:90: error: expected ',' or '..' before '<' token 181 | void elpa_hermitian_multiply_d_ptr_fc(elpa_t handle, char uplo_a, char uplo_c, int ncb, float_complex *a, float_complex *b, int nrows_b, int ncols_b, float_complex *c, int nrows_c, int ncols_c, int *error); | ^~~~~~~~~~~~~ /home/yizeyi18/soft/abacus-develop-3.4.3/source/module_hsolver/my_elpa.h:22:17: error: expected identifier before '_Complex' 22 | #define complex _Complex | ^~~~~~~~ /home/yizeyi18/soft/spack/opt/spack/linux-ubuntu22.04-zen3/gcc-13.1.0/elpa-2023.05.001-vhmgozarnpu2xjhb4qzbgd3qcromwygb/include/elpa_openmp-2023.05.001/elpa/elpa_generated.h:184:45: error: expected ',' or '..' before '<' token 184 | void elpa_cholesky_a_h_a_dc(elpa_t handle, double_complex *a, int *error); | ^~~~~~~~~~~~~~ /home/yizeyi18/soft/abacus-develop-3.4.3/source/module_hsolver/my_elpa.h:22:17: error: expected identifier before '_Complex' 22 | #define complex _Complex | ^~~~~~~~ /home/yizeyi18/soft/spack/opt/spack/linux-ubuntu22.04-zen3/gcc-13.1.0/elpa-2023.05.001-vhmgozarnpu2xjhb4qzbgd3qcromwygb/include/elpa_openmp-2023.05.001/elpa/elpa_generated.h:185:45: error: expected ',' or '..' before '<' token 185 | void elpa_cholesky_a_h_a_fc(elpa_t handle, float_complex *a, int *error); | ^~~~~~~~~~~~~ /home/yizeyi18/soft/abacus-develop-3.4.3/source/module_hsolver/my_elpa.h:22:17: error: expected identifier before '_Complex' 22 | #define complex _Complex | ^~~~~~~~ /home/yizeyi18/soft/spack/opt/spack/linux-ubuntu22.04-zen3/gcc-13.1.0/elpa-2023.05.001-vhmgozarnpu2xjhb4qzbgd3qcromwygb/include/elpa_openmp-2023.05.001/elpa/elpa_generated.h:188:45: error: expected ',' or '..' before '<' token 188 | void elpa_cholesky_d_ptr_dc(elpa_t handle, double_complex *a, int *error); | ^~~~~~~~~~~~~~ /home/yizeyi18/soft/abacus-develop-3.4.3/source/module_hsolver/my_elpa.h:22:17: error: expected identifier before '_Complex' 22 | #define complex _Complex | ^~~~~~~~ /home/yizeyi18/soft/spack/opt/spack/linux-ubuntu22.04-zen3/gcc-13.1.0/elpa-2023.05.001-vhmgozarnpu2xjhb4qzbgd3qcromwygb/include/elpa_openmp-2023.05.001/elpa/elpa_generated.h:189:45: error: expected ',' or '..' before '<' token 189 | void elpa_cholesky_d_ptr_fc(elpa_t handle, float_complex *a, int *error); | ^~~~~~~~~~~~~ /home/yizeyi18/soft/abacus-develop-3.4.3/source/module_hsolver/my_elpa.h:22:17: error: expected identifier before '_Complex' 22 | #define complex _Complex | ^~~~~~~~ /home/yizeyi18/soft/spack/opt/spack/linux-ubuntu22.04-zen3/gcc-13.1.0/elpa-2023.05.001-vhmgozarnpu2xjhb4qzbgd3qcromwygb/include/elpa_openmp-2023.05.001/elpa/elpa_generated.h:192:47: error: expected ',' or '..' before '<' token 192 | void elpa_invert_trm_a_h_a_dc(elpa_t handle, double_complex *a, int *error); | ^~~~~~~~~~~~~~ /home/yizeyi18/soft/abacus-develop-3.4.3/source/module_hsolver/my_elpa.h:22:17: error: expected identifier before '_Complex' 22 | #define complex _Complex | ^~~~~~~~ /home/yizeyi18/soft/spack/opt/spack/linux-ubuntu22.04-zen3/gcc-13.1.0/elpa-2023.05.001-vhmgozarnpu2xjhb4qzbgd3qcromwygb/include/elpa_openmp-2023.05.001/elpa/elpa_generated.h:193:47: error: expected ',' or '..' before '<' token 193 | void elpa_invert_trm_a_h_a_fc(elpa_t handle, float_complex *a, int *error); | ^~~~~~~~~~~~~ /home/yizeyi18/soft/abacus-develop-3.4.3/source/module_hsolver/my_elpa.h:22:17: error: expected identifier before '_Complex' 22 | #define complex _Complex | ^~~~~~~~ /home/yizeyi18/soft/spack/opt/spack/linux-ubuntu22.04-zen3/gcc-13.1.0/elpa-2023.05.001-vhmgozarnpu2xjhb4qzbgd3qcromwygb/include/elpa_openmp-2023.05.001/elpa/elpa_generated.h:196:47: error: expected ',' or '..' before '<' token 196 | void elpa_invert_trm_d_ptr_dc(elpa_t handle, double_complex *a, int *error); | ^~~~~~~~~~~~~~ /home/yizeyi18/soft/abacus-develop-3.4.3/source/module_hsolver/my_elpa.h:22:17: error: expected identifier before '_Complex' 22 | #define complex _Complex | ^~~~~~~~ /home/yizeyi18/soft/spack/opt/spack/linux-ubuntu22.04-zen3/gcc-13.1.0/elpa-2023.05.001-vhmgozarnpu2xjhb4qzbgd3qcromwygb/include/elpa_openmp-2023.05.001/elpa/elpa_generated.h:197:47: error: expected ',' or '..' before '<' token 197 | void elpa_invert_trm_d_ptr_fc(elpa_t handle, float_complex *a, int *error); | ^~~~~~~~~~~~~ /home/yizeyi18/soft/abacus-develop-3.4.3/source/module_hsolver/my_elpa.h:22:17: error: expected identifier before '_Complex' 22 | #define complex _Complex | ^~~~~~~~ /home/yizeyi18/soft/spack/opt/spack/linux-ubuntu22.04-zen3/gcc-13.1.0/elpa-2023.05.001-vhmgozarnpu2xjhb4qzbgd3qcromwygb/include/elpa_openmp-2023.05.001/elpa/elpa_generated.h:203:49: error: expected ',' or '..' before '<' token 203 | void elpa_eigenvectors_a_h_a_dc(elpa_t handle, double_complex *a, double *ev, double_complex *q, int *error); | ^~~~~~~~~~~~~~ /home/yizeyi18/soft/abacus-develop-3.4.3/source/module_hsolver/my_elpa.h:22:17: error: expected identifier before '_Complex' 22 | #define complex _Complex | ^~~~~~~~ /home/yizeyi18/soft/spack/opt/spack/linux-ubuntu22.04-zen3/gcc-13.1.0/elpa-2023.05.001-vhmgozarnpu2xjhb4qzbgd3qcromwygb/include/elpa_openmp-2023.05.001/elpa/elpa_generated.h:204:49: error: expected ',' or '..' before '<' token 204 | void elpa_eigenvectors_a_h_a_fc(elpa_t handle, float_complex *a, float *ev, float_complex *q, int *error); | ^~~~~~~~~~~~~ /home/yizeyi18/soft/abacus-develop-3.4.3/source/module_hsolver/my_elpa.h:22:17: error: expected identifier before '_Complex' 22 | #define complex _Complex | ^~~~~~~~ /home/yizeyi18/soft/spack/opt/spack/linux-ubuntu22.04-zen3/gcc-13.1.0/elpa-2023.05.001-vhmgozarnpu2xjhb4qzbgd3qcromwygb/include/elpa_openmp-2023.05.001/elpa/elpa_generated.h:207:49: error: expected ',' or '..' before '<' token 207 | void elpa_eigenvectors_d_ptr_dc(elpa_t handle, double_complex *a, double *ev, double_complex *q, int *error); | ^~~~~~~~~~~~~~ /home/yizeyi18/soft/abacus-develop-3.4.3/source/module_hsolver/my_elpa.h:22:17: error: expected identifier before '_Complex' 22 | #define complex _Complex | ^~~~~~~~ /home/yizeyi18/soft/spack/opt/spack/linux-ubuntu22.04-zen3/gcc-13.1.0/elpa-2023.05.001-vhmgozarnpu2xjhb4qzbgd3qcromwygb/include/elpa_openmp-2023.05.001/elpa/elpa_generated.h:208:49: error: expected ',' or '..' before '<' token 208 | void elpa_eigenvectors_d_ptr_fc(elpa_t handle, float_complex *a, float *ev, float_complex *q, int *error); | ^~~~~~~~~~~~~ /home/yizeyi18/soft/abacus-develop-3.4.3/source/module_hsolver/my_elpa.h:22:17: error: expected identifier before '_Complex' 22 | #define complex _Complex | ^~~~~~~~ /home/yizeyi18/soft/spack/opt/spack/linux-ubuntu22.04-zen3/gcc-13.1.0/elpa-2023.05.001-vhmgozarnpu2xjhb4qzbgd3qcromwygb/include/elpa_openmp-2023.05.001/elpa/elpa_generated.h:215:48: error: expected ',' or '..' before '<' token 215 | void elpa_eigenvalues_a_h_a_dc(elpa_t handle, double_complex *a, double *ev, int *error); | ^~~~~~~~~~~~~~ /home/yizeyi18/soft/abacus-develop-3.4.3/source/module_hsolver/my_elpa.h:22:17: error: expected identifier before '_Complex' 22 | #define complex _Complex | ^~~~~~~~ /home/yizeyi18/soft/spack/opt/spack/linux-ubuntu22.04-zen3/gcc-13.1.0/elpa-2023.05.001-vhmgozarnpu2xjhb4qzbgd3qcromwygb/include/elpa_openmp-2023.05.001/elpa/elpa_generated.h:216:48: error: expected ',' or '..' before '<' token 216 | void elpa_eigenvalues_a_h_a_fc(elpa_t handle, float_complex *a, float *ev, int *error); | ^~~~~~~~~~~~~ /home/yizeyi18/soft/abacus-develop-3.4.3/source/module_hsolver/my_elpa.h:22:17: error: expected identifier before '_Complex' 22 | #define complex _Complex | ^~~~~~~~ /home/yizeyi18/soft/spack/opt/spack/linux-ubuntu22.04-zen3/gcc-13.1.0/elpa-2023.05.001-vhmgozarnpu2xjhb4qzbgd3qcromwygb/include/elpa_openmp-2023.05.001/elpa/elpa_generated.h:219:48: error: expected ',' or '..' before '<' token 219 | void elpa_eigenvalues_d_ptr_dc(elpa_t handle, double_complex *a, double *ev, int *error); | ^~~~~~~~~~~~~~ /home/yizeyi18/soft/abacus-develop-3.4.3/source/module_hsolver/my_elpa.h:22:17: error: expected identifier before '_Complex' 22 | #define complex _Complex | ^~~~~~~~ /home/yizeyi18/soft/spack/opt/spack/linux-ubuntu22.04-zen3/gcc-13.1.0/elpa-2023.05.001-vhmgozarnpu2xjhb4qzbgd3qcromwygb/include/elpa_openmp-2023.05.001/elpa/elpa_generated.h:220:48: error: expected ',' or '..' before '<' token 220 | void elpa_eigenvalues_d_ptr_fc(elpa_t handle, float_complex *a, float *ev, int *error); | ^~~~~~~~~~~~~ /home/yizeyi18/soft/abacus-develop-3.4.3/source/module_hsolver/my_elpa.h:22:17: error: expected identifier before '_Complex' 22 | #define complex _Complex | ^~~~~~~~ /home/yizeyi18/soft/spack/opt/spack/linux-ubuntu22.04-zen3/gcc-13.1.0/elpa-2023.05.001-vhmgozarnpu2xjhb4qzbgd3qcromwygb/include/elpa_openmp-2023.05.001/elpa/elpa_generated.h:230:55: error: expected ',' or '..' before '<' token 230 | void elpa_generalized_eigenvectors_dc(elpa_t handle, double_complex *a, double_complex *b, double *ev, double_complex *q, | ^~~~~~~~~~~~~~ /home/yizeyi18/soft/abacus-develop-3.4.3/source/module_hsolver/my_elpa.h:22:17: error: expected identifier before '_Complex' 22 | #define complex _Complex | ^~~~~~~~ /home/yizeyi18/soft/spack/opt/spack/linux-ubuntu22.04-zen3/gcc-13.1.0/elpa-2023.05.001-vhmgozarnpu2xjhb4qzbgd3qcromwygb/include/elpa_openmp-2023.05.001/elpa/elpa_generated.h:232:55: error: expected ',' or '..' before '<' token 232 | void elpa_generalized_eigenvectors_fc(elpa_t handle, float_complex *a, float_complex *b, float *ev, float_complex *q, | ^~~~~~~~~~~~~ /home/yizeyi18/soft/abacus-develop-3.4.3/source/module_hsolver/my_elpa.h:22:17: error: expected identifier before '_Complex' 22 | #define complex _Complex | ^~~~~~~~ /home/yizeyi18/soft/spack/opt/spack/linux-ubuntu22.04-zen3/gcc-13.1.0/elpa-2023.05.001-vhmgozarnpu2xjhb4qzbgd3qcromwygb/include/elpa_openmp-2023.05.001/elpa/elpa_generated.h:238:54: error: expected ',' or '..' before '<' token 238 | void elpa_generalized_eigenvalues_dc(elpa_t handle, double_complex *a, double_complex *b, double *ev, | ^~~~~~~~~~~~~~ /home/yizeyi18/soft/abacus-develop-3.4.3/source/module_hsolver/my_elpa.h:22:17: error: expected identifier before '_Complex' 22 | #define complex _Complex | ^~~~~~~~ /home/yizeyi18/soft/spack/opt/spack/linux-ubuntu22.04-zen3/gcc-13.1.0/elpa-2023.05.001-vhmgozarnpu2xjhb4qzbgd3qcromwygb/include/elpa_openmp-2023.05.001/elpa/elpa_generated.h:240:54: error: expected ',' or '..' before '<' token 240 | void elpa_generalized_eigenvalues_fc(elpa_t handle, float_complex *a, float_complex *b, float *ev, | ^~~~~~~~~~~~~ In file included from /home/yizeyi18/soft/abacus-develop-3.4.3/source/module_hsolver/my_elpa.h:25: /home/yizeyi18/soft/spack/opt/spack/linux-ubuntu22.04-zen3/gcc-13.1.0/elpa-2023.05.001-vhmgozarnpu2xjhb4qzbgd3qcromwygb/include/elpa_openmp-2023.05.001/elpa/elpa_generic.h:17:13: error: conflicting declaration of C function 'void elpa_set(elpa_t, const char*, double, int*)' 17 | inline void elpa_set(elpa_t handle, const char *name, double value, int *error) | ^~~~~~~~ /home/yizeyi18/soft/spack/opt/spack/linux-ubuntu22.04-zen3/gcc-13.1.0/elpa-2023.05.001-vhmgozarnpu2xjhb4qzbgd3qcromwygb/include/elpa_openmp-2023.05.001/elpa/elpa_generic.h:13:13: note: previous declaration 'void elpa_set(elpa_t, const char*, int, int*)' 13 | inline void elpa_set(elpa_t handle, const char *name, int value, int *error) | ^~~~~~~~ /home/yizeyi18/soft/spack/opt/spack/linux-ubuntu22.04-zen3/gcc-13.1.0/elpa-2023.05.001-vhmgozarnpu2xjhb4qzbgd3qcromwygb/include/elpa_openmp-2023.05.001/elpa/elpa_generic.h:45:13: error: conflicting declaration of C function 'void elpa_get(elpa_t, const char*, double*, int*)' 45 | inline void elpa_get(elpa_t handle, const char *name, double *value, int *error) | ^~~~~~~~ /home/yizeyi18/soft/spack/opt/spack/linux-ubuntu22.04-zen3/gcc-13.1.0/elpa-2023.05.001-vhmgozarnpu2xjhb4qzbgd3qcromwygb/include/elpa_openmp-2023.05.001/elpa/elpa_generic.h:41:13: note: previous declaration 'void elpa_get(elpa_t, const char*, int*, int*)' 41 | inline void elpa_get(elpa_t handle, const char *name, int *value, int *error) | ^~~~~~~~ /home/yizeyi18/soft/spack/opt/spack/linux-ubuntu22.04-zen3/gcc-13.1.0/elpa-2023.05.001-vhmgozarnpu2xjhb4qzbgd3qcromwygb/include/elpa_openmp-2023.05.001/elpa/elpa_generic.h:75:13: error: conflicting declaration of C function 'void elpa_eigenvectors(elpa_t, float*, float*, float*, int*)' 75 | inline void elpa_eigenvectors(const elpa_t handle, float *a, float *ev, float *q, int *error) | ^~~~~~~~~~~~~~~~~ /home/yizeyi18/soft/spack/opt/spack/linux-ubuntu22.04-zen3/gcc-13.1.0/elpa-2023.05.001-vhmgozarnpu2xjhb4qzbgd3qcromwygb/include/elpa_openmp-2023.05.001/elpa/elpa_generic.h:70:13: note: previous declaration 'void elpa_eigenvectors(elpa_t, double*, double*, double*, int*)' 70 | inline void elpa_eigenvectors(const elpa_t handle, double *a, double *ev, double *q, int *error) | ^~~~~~~~~~~~~~~~~ /home/yizeyi18/soft/spack/opt/spack/linux-ubuntu22.04-zen3/gcc-13.1.0/elpa-2023.05.001-vhmgozarnpu2xjhb4qzbgd3qcromwygb/include/elpa_openmp-2023.05.001/elpa/elpa_generic.h:80:13: error: conflicting declaration of C function 'void elpa_eigenvectors(elpa_t, std::complexAdditional Context
It seems that the issue comes from 2 points:
For compatibility to ELPA-2023.05.001
That make the test pass compile and ctest.
Task list for Issue attackers (only for developers)