g++ error (although not the stated compiler in makefile)

Dear all,

Attached please find my modified version of Makefile.intel_cpu_mpich.

I managed to compile it once (although with a slight modification having LIB = -ltbbmalloc -ltbbmalloc_proxy) but when I ran a script, I had the following error:
libtbbmalloc.so.2: cannot open shared object file: No such file or directory

Then, I removed the executable file lmp_intelmpich from src, modified the makefile such that I removed any mention of the library and included - DLMP_INTEL_NO_TBB in CCFLAGS. However, I got the following error:

make[1]: Entering directory ‘/home/admin/Documents/lammps-11Aug17/src/Obj_intelmpich’
make[1]: Leaving directory ‘/home/admin/Documents/lammps-11Aug17/src/Obj_intelmpich’
make[1]: Entering directory ‘/home/admin/Documents/lammps-11Aug17/src/Obj_intelmpich’
mpicxx -cxx=icc -g -qopenmp -DLAMMPS_MEMALIGN=64 -DLMP_INTEL_NO_TBB -no-offload -fno-alias -ansi-alias -restrict -xHOST -O2 -fp-model fast=2 -no-prec-div -qoverride-limits -DLAMMPS_GZIP -I…/…/lib/reax -I…/…/lib/meam -DLMP_USER_OMP -DLMP_USER_INTEL -DMPICH_SKIP_MPICXX -DOMPI_SKIP_MPICXX=1 -I/home/admin/Documents/mpich/include -I/home/admin/Documents/fftw3/include -c …/pppm_stagger.cpp
g++: error: fast=2: No such file or directory
g++: error: unrecognized command line option ‘-cxx=icc’
g++: error: unrecognized command line option ‘-qopenmp’
g++: error: unrecognized command line option ‘-no-offload’
g++: error: unrecognized command line option ‘-fno-alias’
g++: error: unrecognized command line option ‘-ansi-alias’
g++: error: unrecognized command line option ‘-restrict’
g++: error: unrecognized command line option ‘-fp-model’
g++: error: unrecognized command line option ‘-no-prec-div’
g++: error: unrecognized command line option ‘-qoverride-limits’
Makefile:105: recipe for target ‘pppm_stagger.o’ failed
make[1]: *** [pppm_stagger.o] Error 1
make[1]: Leaving directory ‘/home/admin/Documents/lammps-11Aug17/src/Obj_intelmpich’
Makefile:158: recipe for target ‘intelmpich’ failed
make: *** [intelmpich] Error 2

I still cannot understand what I’m doing wrong since I’m absolutely sure that I’m pointing towards the correct path for mpich.

Any help would be much appreciated.

Michael

Makefile.intelmpich (3.48 KB)

Dear all,

Attached please find my modified version of Makefile.intel_cpu_mpich.

I managed to compile it once (although with a slight modification having
LIB = -ltbbmalloc -ltbbmalloc_proxy) but when I ran a script, I had the
following error:
libtbbmalloc.so.2: cannot open shared object file: No such file or
directory

​which means, that you didn't set up LD_LIBRARY_PATH correctly. did you
forget to initialize the intel compiler environment?​

Then, I removed the executable file lmp_intelmpich from src, modified the
makefile such that I removed any mention of the library and included -
DLMP_INTEL_NO_TBB in CCFLAGS. However, I got the following error:

make[1]: Entering directory '/home/admin/Documents/lammps-
11Aug17/src/Obj_intelmpich'
make[1]: Leaving directory '/home/admin/Documents/lammps-
11Aug17/src/Obj_intelmpich'
make[1]: Entering directory '/home/admin/Documents/lammps-
11Aug17/src/Obj_intelmpich'
mpicxx -cxx=icc -g -qopenmp -DLAMMPS_MEMALIGN=64 -DLMP_INTEL_NO_TBB
-no-offload -fno-alias -ansi-alias -restrict -xHOST -O2 -fp-model fast=2
-no-prec-div -qoverride-limits -DLAMMPS_GZIP -I../../lib/reax
-I../../lib/meam -DLMP_USER_OMP -DLMP_USER_INTEL -DMPICH_SKIP_MPICXX
-DOMPI_SKIP_MPICXX=1 -I/home/admin/Documents/mpich/include
-I/home/admin/Documents/fftw3/include -c ../pppm_stagger.cpp
g++: error: fast=2: No such file or directory
g++: error: unrecognized command line option ‘-cxx=icc’
g++: error: unrecognized command line option ‘-qopenmp’
g++: error: unrecognized command line option ‘-no-offload’
g++: error: unrecognized command line option ‘-fno-alias’
g++: error: unrecognized command line option ‘-ansi-alias’
g++: error: unrecognized command line option ‘-restrict’
g++: error: unrecognized command line option ‘-fp-model’
g++: error: unrecognized command line option ‘-no-prec-div’
g++: error: unrecognized command line option ‘-qoverride-limits’
Makefile:105: recipe for target 'pppm_stagger.o' failed
make[1]: *** [pppm_stagger.o] Error 1
make[1]: Leaving directory '/home/admin/Documents/lammps-
11Aug17/src/Obj_intelmpich'
Makefile:158: recipe for target 'intelmpich' failed
make: *** [intelmpich] Error 2

I still cannot understand what I'm doing wrong since I'm absolutely sure
that I'm pointing towards the correct path for mpich.

​but it doesn't look like you are using the "mpicxx" from mpich. check your
path.
it should not be needed to set the include path or library path and
libraries for MPI when you use the correct mpicxx wrapper.

axel.​

Prof Kohlmeyer,

I think that I’ve fixed the issue with the shared library by including the following environment variable in ~/.bashrc:
export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:’/opt/intel/compilers_and_libraries_2018.0.128/linux/tbb/lib/intel64_lin/gcc4.1’

In the gcc4.1 folder, there are both libtbbmalloc.so.2 as well as libtbbmalloc_proxy.so.2

However, I’m still having trouble with compiling LAMMPS. I used exactly the same paths for the first compiling process and it worked so I simply cannot understand what may be the issue. All I could think of is a possible conflict between this mpich (which I’m pointing to) that was compiled with an Intel compiler and the other mpich compiled with gfortran.

Regards,

Michael

You are using a non-mpich mpicxx or else g++ would not complain about the -cxx=icc flag.

Axel

Then how should I solve the issue? Re-compile mpich?

Try: which mpicxx
To see from where you are picking up the mpicxx wrapper. Probably you need to adjust your path.
Axel.

Dear Prof Kohlmeyer,

Thank you. I have finally a working version now.

Regards,
Michael

Can you please share your final makefile?
I have similar issues in compiling with intel-package.

Thanks,
Afshin