Hi all, I am trying to compile the newest vesrion of ELK with mpif90. Everything goes smoothly until it reaches the linking stage where a bunch of errors appear that look like :
odomp.o: In function __modomp_MOD_freethd':
modomp.f90:(.text+0x5): undefined reference toomp_get_level_'
modomp.o: In function __modomp_MOD_holdthd':
modomp.f90:(.text+0x5d): undefined reference toomp_get_level_'
modomp.o: In function __modomp_MOD_omp_init':
modomp.f90:(.text+0x17e): undefined reference toomp_set_num_threads_'
modomp.f90:(.text+0x1ab): undefined reference to omp_set_dynamic_'
modomp.f90:(.text+0x1b5): undefined reference toomp_set_nested_'
modomp.f90:(.text+0x1bf): undefined reference to omp_set_max_active_levels_'
modomp.f90:(.text+0x271): undefined reference toomp_get_max_threads_'
modomp.f90:(.text+0x2a9): undefined reference to omp_get_num_procs_'
modomp.f90:(.text+0x2d9): undefined reference toomp_set_num_threads_'
mkl_init.o: In function mkl_init_':
mkl_init.f90:(.text+0xc): undefined reference tomkl_set_num_threads_'
mkl_init.f90:(.text+0x3e): undefined reference to mkl_set_dynamic_'
mkl_init.f90:(.text+0x60): undefined reference tomkl_set_dynamic_'
mkl_init.f90:(.text+0x91): undefined reference to mkl_set_dynamic_'
oblas_init.o: In functionoblas_init_':
oblas_init.f90:(.text+0x8): undefined reference to openblas_set_num_threads_'
blis_init.o: In functionblis_init_':
blis_init.f90:(.text+0x8): undefined reference to bli_thread_set_num_threads_'
genjprk.o: In functiongenjprk_':
genjprk.f90:(.text+0xb5f): undefined reference to omp_set_lock_'
genjprk.f90:(.text+0xbc2): undefined reference toomp_unset_lock_'
genjpr.o: In function genjpr_':
genjpr.f90:(.text+0x1ca): undefined reference toomp_init_lock_'
genjpr.f90:(.text+0x27a): undefined reference to omp_destroy_lock_'
eveqnfvr.o: In functioneveqnfvr_':
.
.
.kmesh.F90:(.text+0x23e6): undefined reference to dgesvd_'
libwannier.a(kmesh.o): In function__w90_kmesh_MOD_kmesh_shell_fixed':
kmesh.F90:(.text+0x4378): undefined reference to dgesvd_'
libwannier.a(kmesh.o): In function__w90_kmesh_MOD_kmesh_shell_automatic':
kmesh.F90:(.text+0x6e90): undefined reference to dgesvd_'
libwannier.a(disentangle.o): In function__w90_disentangle_MOD_dis_extract_gamma':
disentangle.F90:(.text+0x2f79): undefined reference to dspevx_'
disentangle.F90:(.text+0x55c3): undefined reference todspevx_'
disentangle.F90:(.text+0x659e): undefined reference to dspevx_'
libwannier.a(disentangle.o): In functioninternal_find_u_gamma.7094':
disentangle.F90:(.text+0x1e506): undefined reference to dgesvd_'
libwannier.a(wannierise.o): In functioninternal_new_u_and_m.6820':
wannierise.F90:(.text+0x15cb7): undefined reference to zgees_'
libwannier.a(transport.o): In function__w90_transport_MOD_tran_lcr':
transport.F90:(.text+0x237b1): undefined reference to zgbsv_'
collect2: error: ld returned 1 exit status
make[1]: *** [elk] Error 1
make[1]: Leaving directory/home/eamoujaes/elk-7.2.42/src'
make: *** [all] Error 2
What is the source of this error: My make file looks like:
The packages I have loaded before strating the compilation are:
module use /app/utils/modules/
module load gcc-5.3.0
module load mpi/openmpi-3.0.0/gcc-5.3.0
module load lapack-3.7.1
Is it possible to include OPENMPI in the compilation
Regards
Elio
Uiversity of Rondonia
Brazil
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
The problem is the supercomputer where I am running the calculations have the gcc-5.3 version. Is there a workaround? I tried to download gcc-8.4.1 using 'conda install' but it failed.
How do I proceed? Any ideas?
Regards
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
Dear Elio, there is also chance that you actually have a newer compiler, but you have to "enable" it by using command like "module load gcc-8" (or maybe you have intel compiler and should "module load intel", try "module avail" and check the results).
For some cluster I have used this was the case: default gcc in the system was not the one recommended for real life. And it is pretty standard situation that MPI compilers are not enabled unless you explicitly say so.
M.
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
Thanks for your help and sorry for the late reply. @Mikhail, I have actually tried "module avail" at the very beginning before compilation :the newest they have is gcc-5.3.0! They even have not renewed the intel licence so I have to compile with mpif90 rather than mpiifort (which I personally prefer!)@Andrew ,I have downloaded gcc-8.4.0. I will still have to download the OPENMP compatible with it.
Thanks once again !
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
Hi all, I am trying to compile the newest vesrion of ELK with mpif90. Everything goes smoothly until it reaches the linking stage where a bunch of errors appear that look like :
odomp.o: In function
__modomp_MOD_freethd': modomp.f90:(.text+0x5): undefined reference to
omp_get_level_'modomp.o: In function
__modomp_MOD_holdthd': modomp.f90:(.text+0x5d): undefined reference to
omp_get_level_'modomp.o: In function
__modomp_MOD_omp_init': modomp.f90:(.text+0x17e): undefined reference to
omp_set_num_threads_'modomp.f90:(.text+0x1ab): undefined reference to
omp_set_dynamic_' modomp.f90:(.text+0x1b5): undefined reference to
omp_set_nested_'modomp.f90:(.text+0x1bf): undefined reference to
omp_set_max_active_levels_' modomp.f90:(.text+0x271): undefined reference to
omp_get_max_threads_'modomp.f90:(.text+0x2a9): undefined reference to
omp_get_num_procs_' modomp.f90:(.text+0x2d9): undefined reference to
omp_set_num_threads_'mkl_init.o: In function
mkl_init_': mkl_init.f90:(.text+0xc): undefined reference to
mkl_set_num_threads_'mkl_init.f90:(.text+0x3e): undefined reference to
mkl_set_dynamic_' mkl_init.f90:(.text+0x60): undefined reference to
mkl_set_dynamic_'mkl_init.f90:(.text+0x91): undefined reference to
mkl_set_dynamic_' oblas_init.o: In function
oblas_init_':oblas_init.f90:(.text+0x8): undefined reference to
openblas_set_num_threads_' blis_init.o: In function
blis_init_':blis_init.f90:(.text+0x8): undefined reference to
bli_thread_set_num_threads_' genjprk.o: In function
genjprk_':genjprk.f90:(.text+0xb5f): undefined reference to
omp_set_lock_' genjprk.f90:(.text+0xbc2): undefined reference to
omp_unset_lock_'genjpr.o: In function
genjpr_': genjpr.f90:(.text+0x1ca): undefined reference to
omp_init_lock_'genjpr.f90:(.text+0x27a): undefined reference to
omp_destroy_lock_' eveqnfvr.o: In function
eveqnfvr_':.
.
.kmesh.F90:(.text+0x23e6): undefined reference to
dgesvd_' libwannier.a(kmesh.o): In function
__w90_kmesh_MOD_kmesh_shell_fixed':kmesh.F90:(.text+0x4378): undefined reference to
dgesvd_' libwannier.a(kmesh.o): In function
__w90_kmesh_MOD_kmesh_shell_automatic':kmesh.F90:(.text+0x6e90): undefined reference to
dgesvd_' libwannier.a(disentangle.o): In function
__w90_disentangle_MOD_dis_extract_gamma':disentangle.F90:(.text+0x2f79): undefined reference to
dspevx_' disentangle.F90:(.text+0x55c3): undefined reference to
dspevx_'disentangle.F90:(.text+0x659e): undefined reference to
dspevx_' libwannier.a(disentangle.o): In function
internal_find_u_gamma.7094':disentangle.F90:(.text+0x1e506): undefined reference to
dgesvd_' libwannier.a(wannierise.o): In function
internal_new_u_and_m.6820':wannierise.F90:(.text+0x15cb7): undefined reference to
zgees_' libwannier.a(transport.o): In function
__w90_transport_MOD_tran_lcr':transport.F90:(.text+0x237b1): undefined reference to
zgbsv_' collect2: error: ld returned 1 exit status make[1]: *** [elk] Error 1 make[1]: Leaving directory
/home/eamoujaes/elk-7.2.42/src'make: *** [all] Error 2
What is the source of this error: My make file looks like:
MMAKE = make
F90 = mpif90
F90_OPTS = -g -Ofast -ffast-math -march=native -mtune=native -fomit-frame-pointer
F77 = mpif90
F77_OPTS =-g -Ofast -ffast-math -march=native -mtune=native -fomit-frame-pointer
LIB_libxc = libxcf90.a libxc.a
SRC_libxc = libxcf90.f90 libxcifc.f90
AR = ar
LIB_SYS =
LIB_LPK =lapack.a blas.a
LIB_FFT= fftlib.a
SRC_FFT=zfftifc.f90
SRC_W90S =
LIB_W90=libwannier.a
The packages I have loaded before strating the compilation are:
module use /app/utils/modules/
module load gcc-5.3.0
module load mpi/openmpi-3.0.0/gcc-5.3.0
module load lapack-3.7.1
Is it possible to include OPENMPI in the compilation
Regards
Elio
Uiversity of Rondonia
Brazil
Hi Elio,
You have to tell the compiler to enable OpenMP.
For gfortran this is done with the command line option "-fopenmp"
Regards,
Kay.
Dear J. K. ,
I have done that at my first attempt; however , the code stops at the very beginning with the error
!$OMP SIMD LASTPRIVATE(f1,f2,f3,f4)
1
Error: OpenMP directives at (1) may not appear in PURE or ELEMENTAL procedures
make: *** [splined.o] Error 1
Is there a way to circumvent this??
Regrds
Dear Elio, you seem to have very old gcc version. For me, with gcc 8.4.1 code compiles and works.
M.
The problem is the supercomputer where I am running the calculations have the gcc-5.3 version. Is there a workaround? I tried to download gcc-8.4.1 using 'conda install' but it failed.
How do I proceed? Any ideas?
Regards
Dear Elio,
If you can - ask the admins for a newer compiler.
If not - compile the newer compiler from scratch and keep it, as the code will need libraries from it.
The same goes for OpenMP.
Good luck!
Andrew
Dear Elio, there is also chance that you actually have a newer compiler, but you have to "enable" it by using command like "module load gcc-8" (or maybe you have intel compiler and should "module load intel", try "module avail" and check the results).
For some cluster I have used this was the case: default gcc in the system was not the one recommended for real life. And it is pretty standard situation that MPI compilers are not enabled unless you explicitly say so.
M.
Dear Andrew and Mikhail,
Thanks for your help and sorry for the late reply. @Mikhail, I have actually tried "module avail" at the very beginning before compilation :the newest they have is gcc-5.3.0! They even have not renewed the intel licence so I have to compile with mpif90 rather than mpiifort (which I personally prefer!)@Andrew ,I have downloaded gcc-8.4.0. I will still have to download the OPENMP compatible with it.
Thanks once again !