Error while building lammps: dihedral_charmm_intel.cpp:(.text+0x2a0d): undefined reference to `rcpf'

I am trying to build lammps with oneapi intel compiler. I have downloaded the lammps-29Aug2024 version. The compilation is going upto the last stage the following error is thrown.

./liblammps_oneapi.a(dihedral_charmm_intel.o): In function void LAMMPS_NS::DihedralCharmmIntel::eval<0, 1, 1, float, double>(int, LAMMPS_NS::IntelBuffers<float, double>*, LAMMPS_NS::DihedralCharmmIntel::ForceConst<float> const&) [clone .extracted]': dihedral_charmm_intel.cpp:(.text+0x2a0d): undefined reference to rcpf’
dihedral_charmm_intel.cpp:(.text+0x2a35): undefined reference to rcpf' dihedral_charmm_intel.cpp:(.text+0x2a5f): undefined reference to rcpf’
dihedral_charmm_intel.cpp:(.text+0x2a86): undefined reference to rcpf' dihedral_charmm_intel.cpp:(.text+0x2abc): undefined reference to rcpf’
./liblammps_oneapi.a(dihedral_charmm_intel.o):dihedral_charmm_intel.cpp:(.text+0x2ae1): more undefined references to rcpf' follow ./liblammps_oneapi.a(dihedral_charmm_intel.o): In function void LAMMPS_NS::DihedralCharmmIntel::eval<0, 1, 1, double, double>(int, LAMMPS_NS::IntelBuffers<double, double>*, LAMMPS_NS::DihedralCharmmIntel::ForceConst const&) [clone .extracted]‘:
dihedral_charmm_intel.cpp:(.text+0x13487): undefined reference to rcp' dihedral_charmm_intel.cpp:(.text+0x134b1): undefined reference to rcp’
dihedral_charmm_intel.cpp:(.text+0x134ea): undefined reference to rcp' dihedral_charmm_intel.cpp:(.text+0x13514): undefined reference to rcp’
dihedral_charmm_intel.cpp:(.text+0x1354e): undefined reference to rcp' ./liblammps_oneapi.a(dihedral_charmm_intel.o):dihedral_charmm_intel.cpp:(.text+0x13578): more undefined references to rcp’ follow
./liblammps_oneapi.a(dihedral_charmm_intel.o): In function void LAMMPS_NS::DihedralCharmmIntel::eval<0, 1, 1, float, float>(int, LAMMPS_NS::IntelBuffers<float, float>*, LAMMPS_NS::DihedralCharmmIntel::ForceConst<float> const&) [clone .extracted]': dihedral_charmm_intel.cpp:(.text+0x21130): undefined reference to rcpf’
dihedral_charmm_intel.cpp:(.text+0x21158): undefined reference to rcpf' dihedral_charmm_intel.cpp:(.text+0x21182): undefined reference to rcpf’
dihedral_charmm_intel.cpp:(.text+0x211ac): undefined reference to rcpf' dihedral_charmm_intel.cpp:(.text+0x211e5): undefined reference to rcpf’


./liblammps_oneapi.a(pair_tersoff_intel.o):pair_tersoff_intel.cpp:(.text.ZN18IntelKernelTersoffIffLN9lmp_intel15CalculationModeE0ELb1EE17attractive_vectorILb1EEEvPKN9LAMMPS_NS16PairTersoffIntel10ForceConstIfE9c_inner_tENS0_9ivec32x16Et8F32vec16SC_SC_SC_SC_SC_SC_SC_SC_PSC_SD_SD_SD_SD_SD_SD_SD_SD_SD[ZN18IntelKernelTersoffIffLN9lmp_intel15CalculationModeE0ELb1EE17attractive_vectorILb1EEEvPKN9LAMMPS_NS16PairTersoffIntel10ForceConstIfE9c_inner_tENS0_9ivec32x16Et8F32vec16SC_SC_SC_SC_SC_SC_SC_SC_PSC_SD_SD_SD_SD_SD_SD_SD_SD_SD]+0x1c2): more undefined references to rcpf' follow clang++: error: linker command failed with exit code 1 (use -v to see invocation) make[1]: *** [../lmp_oneapi] Error 1 make[1]: Leaving directory /apps/LAMMPS/lammps-29Aug2024/src/Obj_oneapi’
make: *** [oneapi] Error 2

When I type make ps the package INTEL shows the following:
Installed YES: package INTEL
src/dihedral_fourier_intel.cpp does not exist
src/npair_full_bin_intel.cpp does not exist
src/pair_dpd_intel.cpp does not exist
src/pppm_electrode_intel.cpp does not exist
src/dihedral_fourier_intel.h does not exist
src/fix_electrode_conp_intel.h does not exist
src/fix_electrode_conq_intel.h does not exist
src/fix_electrode_thermo_intel.h does not exist
src/pair_dpd_intel.h does not exist
src/pppm_electrode_intel.h does not exist

Is this causing an issue in compilation.

Kind request to help in resolving the issue.

Have you tried building with CMake?

No I have used traditional make command since I am familiar with it.

Perhaps it is time to try something new.

1 Like

yep. Thankyou. I will do that.