VASP.5.4.4 with Intel oneapi 2024

Questions regarding the compilation of VASP on various platforms: hardware, compilers and libraries, etc.


Moderators: Global Moderator, Moderator

Post Reply
Message
Author
alexandre_b.rocha1
Newbie
Newbie
Posts: 2
Joined: Tue Nov 19, 2019 7:55 pm

VASP.5.4.4 with Intel oneapi 2024

#1 Post by alexandre_b.rocha1 » Thu May 30, 2024 9:53 pm

Hi!

I am trying to install VASP.5.4.4 using Intel oneapi 2024 compilers. In the near past I was able to compile VASP.5.4.4 using the 2023 (or older) oneapi versions. But, now I am having trouble. I tried to adapt the makefile.include following these instructions:

https://www.vasp.at/wiki/index.php/Make ... ude.oneapi
https://www.intel.com/content/www/us/en ... ilers.html

My makefile.include:

# Precompiler options
CPP_OPTIONS= -DHOST=\"LinuxIFC\"\
-DMPI -DMPI_BLOCK=8000 -Duse_collective \
-DscaLAPACK \
-DCACHE_SIZE=4000 \
-Davoidalloc \
-Duse_bse_te \
-Dtbdyn \
-Duse_shmem \
-Dshmem_bcast_buffer \
-Dshmem_rproj

CPP = fpp -f_com=no -free -w0 $*$(FUFFIX) $*$(SUFFIX) $(CPP_OPTIONS)

FC = mpiifort -fc=ifx
FCL = mpiifort -fc=ifx

FREE = -free -names lowercase

FFLAGS = -assume byterecl -w

OFLAG = -O2
OFLAG_IN = $(OFLAG)
DEBUG = -O0

OBJECTS = fftmpiw.o fftmpi_map.o fftw3d.o fft3dlib.o
OBJECTS_O1 += fftw3d.o fftmpi.o fftmpiw.o
OBJECTS_O2 += fft3dlib.o

# For what used to be vasp.5.lib
CPP_LIB = $(CPP)
FC_LIB = $(FC)
CC_LIB = icx
CFLAGS_LIB = -O
FFLAGS_LIB = -O1
FREE_LIB = $(FREE)

OBJECTS_LIB = linpack_double.o getshmem.o

# For the parser library
CXX_PARS = icpx
LLIBS = -lstdc++

##
## Customize as of this point! Of course you may change the preceding
## part of this file as well if you like, but it should rarely be
## necessary ...
##

# When compiling on the target machine itself, change this to the
# relevant target when cross-compiling for another architecture
VASP_TARGET_CPU ?= -xHOST
FFLAGS += $(VASP_TARGET_CPU)

# Intel MKL (FFTW, BLAS, LAPACK, and scaLAPACK)
# (Note: for Intel Parallel Studio's MKL use -mkl instead of -qmkl)
FCL += -qmkl=sequential
MKLROOT ?= /opt/intel/oneapi/mkl/2024.1
MKL_PATH = $(MKLROOT)/lib/intel64 /opt/intel/oneapi/2024.1/lib
LLIBS += -L$(MKLROOT)/lib/intel64 -lmkl_scalapack_lp64 -lmkl_blacs_intelmpi_lp64
INCS = -I/opt/fftw-3.3.10 -I/opt/fftw-3.3.10/api -I/opt/fftw-3.3.10/mpi

My log from the compilation (only the final lines):

mpiifort -fc=ifx -qmkl=sequential -o vasp c2f_interface.o base.o profiling.o openmp.o mpi.o mpi_shmem.o smart_allocate.o xml.o constant.o jacobi.o main_mpi.o scala.o asa.o lattice.o poscar.o ini.o mgrid.o xclib.o vdw_nl.o xclib_grad.o radial.o pseudo.o gridq.o ebs.o mkpoints.o wave.o wave_mpi.o wave_high.o bext.o spinsym.o symlib.o symmetry.o lattlib.o random.o nonl.o nonlr.o nonl_high.o dfast.o choleski2.o mix.o hamil.o xcgrad.o xcspin.o potex1.o potex2.o constrmag.o cl_shift.o relativistic.o LDApU.o paw_base.o metagga.o egrad.o pawsym.o pawfock.o pawlhf.o rhfatm.o hyperfine.o paw.o mkpoints_full.o charge.o Lebedev-Laikov.o stockholder.o dipol.o solvation.o pot.o dos.o elf.o tet.o tetweight.o hamil_rot.o chain.o dyna.o k-proj.o sphpro.o us.o core_rel.o aedens.o wavpre.o wavpre_noio.o broyden.o dynbr.o reader.o writer.o tutor.o xml_writer.o brent.o stufak.o fileio.o opergrid.o stepver.o chgloc.o fast_aug.o fock_multipole.o fock.o fock_dbl.o mkpoints_change.o subrot_cluster.o sym_grad.o mymath.o npt_dynamics.o subdftd3.o internals.o dynconstr.o dimer_heyden.o dvvtrajectory.o vdwforcefield.o hamil_high.o nmr.o pead.o subrot.o subrot_scf.o paircorrection.o rpa_force.o force.o pwlhf.o gw_model.o optreal.o steep.o rmm-diis.o davidson.o david_inner.o lcao_bare.o locproj.o electron.o rot.o electron_all.o shm.o pardens.o optics.o constr_cell_relax.o stm.o finite_diff.o elpol.o hamil_lr.o rmm-diis_lr.o subrot_lr.o lr_helper.o hamil_lrf.o elinear_response.o ilinear_response.o linear_optics.o setlocalpp.o wannier.o electron_OEP.o electron_lhf.o twoelectron4o.o gauss_quad.o m_unirnk.o varpro.o minimax.o mlwf.o wnpr.o ratpol.o pade_fit.o screened_2e.o wave_cacher.o crpa.o chi_base.o wpot.o local_field.o ump2.o ump2kpar.o fcidump.o ump2no.o bse_te.o bse.o acfdt.o chi.o sydmat.o rmm-diis_mlr.o linear_response_NMR.o wannier_interpol.o linear_response.o dmft.o auger.o dmatrix.o elphon.o fftmpiw.o fftmpi_map.o fftw3d.o fft3dlib.o main.o -Llib -ldmy -lstdc++ -L/opt/intel/oneapi/mkl/2024.1/lib/intel64 -lmkl_scalapack_lp64 -lmkl_blacs_intelmpi_lp64
ld: locproj.o: na função "locproj_mp_lprj_reader_":
locproj.f90:(.text+0x99): referência não definida para "parse_file_C"
ld: locproj.f90:(.text+0x1da): referência não definida para "fill_basis_info_C"
ld: locproj.f90:(.text+0x1ef): referência não definida para "free_parser_C"
ld: locproj.f90:(.text+0x3bf): referência não definida para "free_parser_C"
make[2]: *** [makefile:145: vasp] Erro 1
make[2]: Saindo do diretório '/usr/local/vasp/vasp.5.4.4/build/std'

cp: não foi possível obter estado de 'vasp': Arquivo ou diretório inexistente
make[1]: *** [makefile:142: all] Erro 1
make[1]: Saindo do diretório '/usr/local/vasp/vasp.5.4.4/build/std'

make: *** [makefile:10: std] Erro 2



Translation:

referência não definida = reference not defined for
cp: não foi possível obter estado de 'vasp': Arquivo ou diretório inexistente = cp: unable to get status of 'vasp': No such file or directory

It seems that the problem is the C compiler with locproj.f90 source code. How can I solved it?

Thanks!

Ricardo Oliveira.

henrique_miranda
Global Moderator
Global Moderator
Posts: 505
Joined: Mon Nov 04, 2019 12:41 pm
Contact:

Re: VASP.5.4.4 with Intel oneapi 2024

#2 Post by henrique_miranda » Fri May 31, 2024 10:39 am

Hi Ricardo,

I think the problem is just that you are not including the parser libraries in the linking stage.
Adding the following lines to your `makefile.include` should do the trick:

Code: Select all

LIBS       += parser
LLIBS      += -Lparser -lparser -lstdc++
Let me know if that does not work!

PS: A tradução não é necessária para mim porque português é a minha língua nativa. Mas é bom para outros utilizadores que encontrem o mesmo problema :D

alexandre_b.rocha1
Newbie
Newbie
Posts: 2
Joined: Tue Nov 19, 2019 7:55 pm

Re: VASP.5.4.4 with Intel oneapi 2024

#3 Post by alexandre_b.rocha1 » Fri May 31, 2024 3:29 pm

Hi!

When I tried with:

LIBS += parser
LLIBS += -L$(MKLROOT)/lib/intel64 -lmkl_scalapack_lp64 -lmkl_blacs_intelmpi_lp64 -Lparser -lparser -lstdc++

I got the error:

icpx: warning: treating 'c' input as 'c++' when in C++ mode, this behavior is deprecated [-Wdeprecated]
lex.yy.c:691:2: error: ISO C++17 does not allow 'register' storage class specifier [-Wregister]
691 | register yy_state_type yy_current_state;
| ^~~~~~~~
lex.yy.c:692:2: error: ISO C++17 does not allow 'register' storage class specifier [-Wregister]
692 | register char *yy_cp, *yy_bp;
| ^~~~~~~~
lex.yy.c:692:2: error: ISO C++17 does not allow 'register' storage class specifier [-Wregister]
692 | register char *yy_cp, *yy_bp;
| ^~~~~~~~
lex.yy.c:693:2: error: ISO C++17 does not allow 'register' storage class specifier [-Wregister]
693 | register int yy_act;
| ^~~~~~~~
lex.yy.c:741:4: error: ISO C++17 does not allow 'register' storage class specifier [-Wregister]
741 | register YY_CHAR yy_c = yy_ec[YY_SC_TO_UI(*yy_cp)];
| ^~~~~~~~
lex.yy.c:1089:6: error: ISO C++17 does not allow 'register' storage class specifier [-Wregister]
1089 | register char *dest = YY_CURRENT_BUFFER_LVALUE->yy_ch_buf;
| ^~~~~~~~
lex.yy.c:1090:2: error: ISO C++17 does not allow 'register' storage class specifier [-Wregister]
1090 | register char *source = (yytext_ptr);
| ^~~~~~~~
lex.yy.c:1091:2: error: ISO C++17 does not allow 'register' storage class specifier [-Wregister]
1091 | register int number_to_move, i;
| ^~~~~~~~
lex.yy.c:1091:2: error: ISO C++17 does not allow 'register' storage class specifier [-Wregister]
1091 | register int number_to_move, i;
| ^~~~~~~~
lex.yy.c:1223:2: error: ISO C++17 does not allow 'register' storage class specifier [-Wregister]
1223 | register yy_state_type yy_current_state;
| ^~~~~~~~
lex.yy.c:1224:2: error: ISO C++17 does not allow 'register' storage class specifier [-Wregister]
1224 | register char *yy_cp;
| ^~~~~~~~
lex.yy.c:1230:3: error: ISO C++17 does not allow 'register' storage class specifier [-Wregister]
1230 | register YY_CHAR yy_c = (*yy_cp ? yy_ec[YY_SC_TO_UI(*yy_cp)] : 1);
| ^~~~~~~~
lex.yy.c:1255:2: error: ISO C++17 does not allow 'register' storage class specifier [-Wregister]
1255 | register int yy_is_jam;
| ^~~~~~~~
lex.yy.c:1256:6: error: ISO C++17 does not allow 'register' storage class specifier [-Wregister]
1256 | register char *yy_cp = (yy_c_buf_p);
| ^~~~~~~~
lex.yy.c:1258:2: error: ISO C++17 does not allow 'register' storage class specifier [-Wregister]
1258 | register YY_CHAR yy_c = 1;
| ^~~~~~~~
lex.yy.c:1276:33: error: ISO C++17 does not allow 'register' storage class specifier [-Wregister]
1276 | static void yyunput (int c, register char * yy_bp )
| ^~~~~~~~
lex.yy.c:1278:2: error: ISO C++17 does not allow 'register' storage class specifier [-Wregister]
1278 | register char *yy_cp;
| ^~~~~~~~
lex.yy.c:1288:3: error: ISO C++17 does not allow 'register' storage class specifier [-Wregister]
1288 | register yy_size_t number_to_move = (yy_n_chars) + 2;
| ^~~~~~~~
lex.yy.c:1289:3: error: ISO C++17 does not allow 'register' storage class specifier [-Wregister]
1289 | register char *dest = &YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[
| ^~~~~~~~
fatal error: too many errors emitted, stopping now [-ferror-limit=]
20 errors generated.
________________________________________________________________

When I removed the LIBS flag I have this error (ld: could not find -lparser):

mpiifort -fc=ifx -o vasp c2f_interface.o base.o profiling.o openmp.o mpi.o mpi_shmem.o smart_allocate.o xml.o constant.o jacobi.o main_mpi.o scala.o asa.o lattice.o poscar.o ini.o mgrid.o xclib.o vdw_nl.o xclib_grad.o radial.o pseudo.o gridq.o ebs.o mkpoints.o wave.o wave_mpi.o wave_high.o bext.o spinsym.o symlib.o symmetry.o lattlib.o random.o nonl.o nonlr.o nonl_high.o dfast.o choleski2.o mix.o hamil.o xcgrad.o xcspin.o potex1.o potex2.o constrmag.o cl_shift.o relativistic.o LDApU.o paw_base.o metagga.o egrad.o pawsym.o pawfock.o pawlhf.o rhfatm.o hyperfine.o paw.o mkpoints_full.o charge.o Lebedev-Laikov.o stockholder.o dipol.o solvation.o pot.o dos.o elf.o tet.o tetweight.o hamil_rot.o chain.o dyna.o k-proj.o sphpro.o us.o core_rel.o aedens.o wavpre.o wavpre_noio.o broyden.o dynbr.o reader.o writer.o tutor.o xml_writer.o brent.o stufak.o fileio.o opergrid.o stepver.o chgloc.o fast_aug.o fock_multipole.o fock.o fock_dbl.o mkpoints_change.o subrot_cluster.o sym_grad.o mymath.o npt_dynamics.o subdftd3.o internals.o dynconstr.o dimer_heyden.o dvvtrajectory.o vdwforcefield.o hamil_high.o nmr.o pead.o subrot.o subrot_scf.o paircorrection.o rpa_force.o force.o pwlhf.o gw_model.o optreal.o steep.o rmm-diis.o davidson.o david_inner.o lcao_bare.o locproj.o electron.o rot.o electron_all.o shm.o pardens.o optics.o constr_cell_relax.o stm.o finite_diff.o elpol.o hamil_lr.o rmm-diis_lr.o subrot_lr.o lr_helper.o hamil_lrf.o elinear_response.o ilinear_response.o linear_optics.o setlocalpp.o wannier.o electron_OEP.o electron_lhf.o twoelectron4o.o gauss_quad.o m_unirnk.o varpro.o minimax.o mlwf.o wnpr.o ratpol.o pade_fit.o screened_2e.o wave_cacher.o crpa.o chi_base.o wpot.o local_field.o ump2.o ump2kpar.o fcidump.o ump2no.o bse_te.o bse.o acfdt.o chi.o sydmat.o rmm-diis_mlr.o linear_response_NMR.o wannier_interpol.o linear_response.o dmft.o auger.o dmatrix.o elphon.o fftmpiw.o fftmpi_map.o fftw3d.o fft3dlib.o main.o -Llib -ldmy -L/opt/intel/oneapi/mkl/2024.1/lib/intel64 -lmkl_scalapack_lp64 -lmkl_blacs_intelmpi_lp64 -Lparser -lparser -lstdc++
ld: não foi possível localizar -lparser
make[2]: *** [makefile:145: vasp] Erro 1
make[2]: Saindo do diretório '/usr/local/vasp/vasp.5.4.4/build/std'

cp: não foi possível obter estado de 'vasp': Arquivo ou diretório inexistente
make[1]: *** [makefile:142: all] Erro 1
make[1]: Saindo do diretório '/usr/local/vasp/vasp.5.4.4/build/std'

make: *** [makefile:10: std] Erro 2
________________________________________________________________

Also, if I remove the "-lparser" flag, I got "undefined reference" errors concerning several objects.

What I am missing here?

Muito obrigado amigo! Saudações brasileiras!

henrique_miranda
Global Moderator
Global Moderator
Posts: 505
Joined: Mon Nov 04, 2019 12:41 pm
Contact:

Re: VASP.5.4.4 with Intel oneapi 2024

#4 Post by henrique_miranda » Fri May 31, 2024 8:48 pm

I have not tried compiling vasp.5.4.4 using oneapi 2024, and we don't officially support it. Sorry.

That being said, you might be able to compile the parser by removing all the occurrences of `register` from lex.yy.c manually or defining an empty preprocessor macro "#define register" or something like that.
If you have lex and bison you might also just regenerate lex.yy.c by uncommenting the lines in src/parser/makefile.

Espero ter ajudado! Saudações :)

Post Reply