LAMMPS with OMP

Dear LAMMPS Users

I was successul in installing LAMMPS with MPI alone as well as GPU. But while I was trying to install the latest stable version of LAMMPS with OMP, the following errors come up

comm.o: In function LAMMPS_NS::Comm::Comm(LAMMPS_NS::LAMMPS*)': /panfs/roc/groups/13/dorfmank/vsethura/mylammps/src/Obj_intel/../comm.cpp:99: undefined reference to omp_set_num_threads’
/panfs/roc/groups/13/dorfmank/vsethura/mylammps/src/Obj_intel/…/comm.cpp:93: undefined reference to omp_get_max_threads' /panfs/roc/groups/13/dorfmank/vsethura/mylammps/src/Obj_intel/../comm.cpp:99: undefined reference to omp_set_num_threads’
/panfs/roc/groups/13/dorfmank/vsethura/mylammps/src/Obj_intel/…/comm.cpp:93: undefined reference to omp_get_max_threads' kspace.o: In function LAMMPS_NS::KSpace::qsum_qsq()’:
/panfs/roc/groups/13/dorfmank/vsethura/mylammps/src/Obj_intel/…/kspace.cpp:278: undefined reference to __kmpc_global_thread_num' /panfs/roc/groups/13/dorfmank/vsethura/mylammps/src/Obj_intel/../kspace.cpp:278: undefined reference to __kmpc_ok_to_fork’
/panfs/roc/groups/13/dorfmank/vsethura/mylammps/src/Obj_intel/…/kspace.cpp:278: undefined reference to __kmpc_fork_call' /panfs/roc/groups/13/dorfmank/vsethura/mylammps/src/Obj_intel/../kspace.cpp:278: undefined reference to __kmpc_serialized_parallel’
/panfs/roc/groups/13/dorfmank/vsethura/mylammps/src/Obj_intel/…/kspace.cpp:278: undefined reference to __kmpc_end_serialized_parallel' kspace.o: In function L__ZN9LAMMPS_NS6KSpace8qsum_qsqEv_278__par_loop0_2_49’:
/panfs/roc/groups/13/dorfmank/vsethura/mylammps/src/Obj_intel/…/kspace.cpp:278: undefined reference to __kmpc_for_static_init_4' /panfs/roc/groups/13/dorfmank/vsethura/mylammps/src/Obj_intel/../kspace.cpp:278: undefined reference to __kmpc_for_static_fini’
/panfs/roc/groups/13/dorfmank/vsethura/mylammps/src/Obj_intel/…/kspace.cpp:278: undefined reference to __kmpc_reduce_nowait' /panfs/roc/groups/13/dorfmank/vsethura/mylammps/src/Obj_intel/../kspace.cpp:278: undefined reference to __kmpc_end_reduce_nowait’
/panfs/roc/groups/13/dorfmank/vsethura/mylammps/src/Obj_intel/…/kspace.cpp:278: undefined reference to __kmpc_atomic_float8_add' /panfs/roc/groups/13/dorfmank/vsethura/mylammps/src/Obj_intel/../kspace.cpp:278: undefined reference to __kmpc_atomic_float8_add’
main.o: In function main': /panfs/roc/groups/13/dorfmank/vsethura/mylammps/src/Obj_intel/../main.cpp:32: undefined reference to __kmpc_begin’
/panfs/roc/groups/13/dorfmank/vsethura/mylammps/src/Obj_intel/…/main.cpp:65: undefined reference to `__kmpc_end’

Am I missing something obvious. Any help will be greatly appreciated

Supercomputer system - MESABI (University of Minnesota)

Flags in Compiler

CC = mpiicc
#MIC_OPT = -offload-option,mic,compiler,"-fp-model fast=2 -mGLOB_default_function_attrs=“gather_scatter_loop_unroll=4"”
OPTFLAGS = -xHost -O2 -fp-model fast=2 -no-prec-div -qoverride-limits
CCFLAGS = -O3 -qopenmp -g -DLAMMPS_MEMALIGN=64 -no-offload -fno-alias -ansi-alias -restrict $(OPTFLAGS) -ip -unroll0 -I/panfs/roc/intel/x86_64/2016/parallel_studio_xe_msi/compilers_and_libraries_2016.3.210/linux/mkl/include/
SHFLAGS = -fPIC
DEPFLAGS = -M

Thanks

Vaidyanathan M S

Dear LAMMPS Users

I was successul in installing LAMMPS with MPI alone as well as GPU. But
while I was trying to install the latest stable version of LAMMPS with OMP,
the following errors come up

comm.o: In function `LAMMPS_NS::Comm::Comm(LAMMPS_NS::LAMMPS*)':
/panfs/roc/groups/13/dorfmank/vsethura/mylammps/src/Obj_intel/../comm.cpp:99:
undefined reference to `omp_set_num_threads'
/panfs/roc/groups/13/dorfmank/vsethura/mylammps/src/Obj_intel/../comm.cpp:93:
undefined reference to `omp_get_max_threads'
/panfs/roc/groups/13/dorfmank/vsethura/mylammps/src/Obj_intel/../comm.cpp:99:
undefined reference to `omp_set_num_threads'
/panfs/roc/groups/13/dorfmank/vsethura/mylammps/src/Obj_intel/../comm.cpp:93:
undefined reference to `omp_get_max_threads'
kspace.o: In function `LAMMPS_NS::KSpace::qsum_qsq()':
/panfs/roc/groups/13/dorfmank/vsethura/mylammps/src/Obj_intel/../kspace.cpp:278:
undefined reference to `__kmpc_global_thread_num'
/panfs/roc/groups/13/dorfmank/vsethura/mylammps/src/Obj_intel/../kspace.cpp:278:
undefined reference to `__kmpc_ok_to_fork'
/panfs/roc/groups/13/dorfmank/vsethura/mylammps/src/Obj_intel/../kspace.cpp:278:
undefined reference to `__kmpc_fork_call'
/panfs/roc/groups/13/dorfmank/vsethura/mylammps/src/Obj_intel/../kspace.cpp:278:
undefined reference to `__kmpc_serialized_parallel'
/panfs/roc/groups/13/dorfmank/vsethura/mylammps/src/Obj_intel/../kspace.cpp:278:
undefined reference to `__kmpc_end_serialized_parallel'
kspace.o: In function `L__ZN9LAMMPS_NS6KSpace8qsum_
qsqEv_278__par_loop0_2_49':
/panfs/roc/groups/13/dorfmank/vsethura/mylammps/src/Obj_intel/../kspace.cpp:278:
undefined reference to `__kmpc_for_static_init_4'
/panfs/roc/groups/13/dorfmank/vsethura/mylammps/src/Obj_intel/../kspace.cpp:278:
undefined reference to `__kmpc_for_static_fini'
/panfs/roc/groups/13/dorfmank/vsethura/mylammps/src/Obj_intel/../kspace.cpp:278:
undefined reference to `__kmpc_reduce_nowait'
/panfs/roc/groups/13/dorfmank/vsethura/mylammps/src/Obj_intel/../kspace.cpp:278:
undefined reference to `__kmpc_end_reduce_nowait'
/panfs/roc/groups/13/dorfmank/vsethura/mylammps/src/Obj_intel/../kspace.cpp:278:
undefined reference to `__kmpc_atomic_float8_add'
/panfs/roc/groups/13/dorfmank/vsethura/mylammps/src/Obj_intel/../kspace.cpp:278:
undefined reference to `__kmpc_atomic_float8_add'
main.o: In function `main':
/panfs/roc/groups/13/dorfmank/vsethura/mylammps/src/Obj_intel/../main.cpp:32:
undefined reference to `__kmpc_begin'
/panfs/roc/groups/13/dorfmank/vsethura/mylammps/src/Obj_intel/../main.cpp:65:
undefined reference to `__kmpc_end'

Am I missing something obvious. Any help will be greatly appreciated

Supercomputer system - MESABI (University of Minnesota)

Flags in Compiler

CC = mpiicc
#MIC_OPT = -offload-option,mic,compiler,"-fp-model fast=2
-mGLOB_default_function_attrs=\"gather_scatter_loop_unroll=4\""
OPTFLAGS = -xHost -O2 -fp-model fast=2 -no-prec-div -qoverride-limits
CCFLAGS = -O3 -qopenmp -g -DLAMMPS_MEMALIGN=64 -no-offload
-fno-alias -ansi-alias -restrict $(OPTFLAGS) -ip -unroll0
-I/panfs/roc/intel/x86_64/2016/parallel_studio_xe_msi/
compilers_and_libraries_2016.3.210/linux/mkl/include/
SHFLAGS = -fPIC
DEPFLAGS = -M

​this is incomplete. the error is likely in the (linker) flags, which you
are not showing.

axel.​