First of all, you should make sure that Intel Parallel Studio has been installed on the server.And the fftw package must be installed.

wget http://www.fftw.org/fftw-3.3.8.tar.gz
tar zxvf fftw-3.3.8.tar.gz
cd fftw-3.3.8/
./configure  --prefix=/opt/fftw3  --enable-shared=yes
make
make install

Search the mpicxx and confirm the path of it and lib.

which mpicxx

Confirm the path of mpicxx and lib on the basis of the screen output.

mpicxx path: /opt/intel/compilers_and_libraries_2019.2.187/linux/mpi/intel64/bin/mpicxx
libmpicxx path:  /opt/intel/compilers_and_libraries_2019.2.187/linux/mpi/intel64/lib

Download the LAMMPS and edit the makefile.

git clone https://github.com/lammps/lammps.git
cd lammps/src/MAKE
vi Makefile.mpi

Append these information behind these tags.

------------append these-------------
MPI_INC = -I/opt/intel/compilers_and_libraries_2019.2.187/linux/mpi/intel64/include/ -DMPICH_SKIP_MPICXX -DOMPI_SKIP_MPICXX=1
MPI_PATH =
MPI_LIB = /opt/intel/compilers_and_libraries_2019.2.187/linux/mpi/intel64/lib/libmpicxx.a

FFT_INC = -I/opt/fftw3/include  -DFFT_FFTW3
FFT_PATH =
FFT_LIB = /opt/fftw3/lib/libfftw3.a
-------------------------------------

Hereto, we can start to compile the mpi version of LAMMPS.

cd ..
make yes-all
make no-lib
make mpi

Some errors:

  • fatal error: fftw3.h: No such file or directory
7/linux/mkl/fftw/ -DFFT_FFTW3      -c ../pppm_disp.cpp
In file included from ../fft3d_wrap.h:18:0,
                 from ../pppm_disp.cpp:35:
../fft3d.h:94:19: fatal error: fftw3.h: No such file or directory
 #include "fftw3.h"
                   ^
compilation terminated.
make[1]: *** [pppm_disp.o] Error 1
make[1]: Leaving directory `/home/dell/lammps/src/Obj_mpi'
make: *** [mpi] Error 2

This warning imply that fftw-dev is absent and can be installed by 'yum'

yum search fftw

Screen output:

Loaded plugins: fastestmirror, langpacks
Loading mirror speeds from cached hostfile
 * epel: epel.scopesky.iq
 * nux-dextop: li.nux.ro
============================== N/S matched: fftw ===============================
fftw-devel.i686 : Headers, libraries and docs for the FFTW library
fftw-devel.x86_64 : Headers, libraries and docs for the FFTW library
fftw-doc.noarch : FFTW library manual
fftw-libs.i686 : FFTW run-time library
fftw-libs.x86_64 : FFTW run-time library
fftw-libs-double.i686 : FFTW library, double precision
fftw-libs-double.x86_64 : FFTW library, double precision
fftw-libs-long.i686 : FFTW library, long double precision
fftw-libs-long.x86_64 : FFTW library, long double precision
fftw-libs-single.i686 : FFTW library, single precision
fftw-libs-single.x86_64 : FFTW library, single precision
fftw-static.i686 : Static versions of the FFTW libraries
fftw-static.x86_64 : Static versions of the FFTW libraries
fftw2-devel.x86_64 : Headers, libraries and docs for the FFTW library (version
                   : 2)
fftw2-static.x86_64 : Static version of the FFTW library (version 2)
root-fftw.x86_64 : FFTW library for ROOT
fftw.i686 : A Fast Fourier Transform library
fftw.x86_64 : A Fast Fourier Transform library
fftw2.x86_64 : Fast Fourier Transform library (version 2)

  Name and summary matches only, use "search all" for everything.

Find the package on the basis of your machine and install it, such as:

yum install fftw-devel.x86_64
  • fftw_plan_guru64_dft.c:(.text+0xca): undefined reference to `DftiCreateDescriptor_d_md'

Originally, I wanna use the build-in fftw package of intel parallel studio, but find this error at the final compiling step. I recommand that the independent fftw package from www.fftw.org can be used to solve this error.

and_libraries_2019.2.187/linux/mpi/intel64/lib/libmpicxx.a /opt/intel/compilers_and_libraries_2019.2.187/linux/mkl/interfaces/fftw3xc/libfftw3xc_intel.a        -o ../lmp_mpi
/opt/intel/compilers_and_libraries_2019.2.187/linux/mkl/interfaces/fftw3xc/libfftw3xc_intel.a(fftw_plan_guru64_dft.o): In function `fftw_plan_guru64_dft':
fftw_plan_guru64_dft.c:(.text+0xca): undefined reference to `DftiCreateDescriptor_d_md'
fftw_plan_guru64_dft.c:(.text+0x111): undefined reference to `DftiSetValue'
fftw_plan_guru64_dft.c:(.text+0x14b): undefined reference to `DftiSetValue'
fftw_plan_guru64_dft.c:(.text+0x1af): undefined reference to `DftiSetValue'
fftw_plan_guru64_dft.c:(.text+0x1d8): undefined reference to `DftiSetValue'
fftw_plan_guru64_dft.c:(.text+0x215): undefined reference to `DftiSetValue'
fftw_plan_guru64_dft.c:(.text+0x236): undefined reference to `DftiCommitDescriptor'
fftw_plan_guru64_dft.c:(.text+0x272): undefined reference to `DftiErrorClass'
fftw_plan_guru64_dft.c:(.text+0x2b8): undefined reference to `DftiErrorClass'
fftw_plan_guru64_dft.c:(.text+0x2dc): undefined reference to `DftiErrorClass'
fftw_plan_guru64_dft.c:(.text+0x310): undefined reference to `DftiSetValue'
fftw_plan_guru64_dft.c:(.text+0x33b): undefined reference to `DftiSetValue'
fftw_plan_guru64_dft.c:(.text+0x362): undefined reference to `DftiSetValue'
fftw_plan_guru64_dft.c:(.text+0x385): undefined reference to `DftiErrorClass'
fftw_plan_guru64_dft.c:(.text+0x3ad): undefined reference to `DftiErrorClass'
fftw_plan_guru64_dft.c:(.text+0x3d2): undefined reference to `DftiErrorClass'
fftw_plan_guru64_dft.c:(.text+0x3fa): undefined reference to `DftiErrorClass'
fftw_plan_guru64_dft.c:(.text+0x422): undefined reference to `DftiErrorClass'
/opt/intel/compilers_and_libraries_2019.2.187/linux/mkl/interfaces/fftw3xc/libfftw3xc_intel.a(fftw_plan_guru64_dft.o):fftw_plan_guru64_dft.c:(.text+0x4bd): more undefined references to `DftiErrorClass' follow
/opt/intel/compilers_and_libraries_2019.2.187/linux/mkl/interfaces/fftw3xc/libfftw3xc_intel.a(fftw_plan_guru64_dft.o): In function `fftw_plan_guru64_dft':
fftw_plan_guru64_dft.c:(.text+0x532): undefined reference to `DftiCreateDescriptor_d_1d'
fftw_plan_guru64_dft.c:(.text+0x55e): undefined reference to `DftiCreateDescriptor_d_1d'
/opt/intel/compilers_and_libraries_2019.2.187/linux/mkl/interfaces/fftw3xc/libfftw3xc_intel.a(fftw_plan_guru64_dft.o): In function `execute_fi':
fftw_plan_guru64_dft.c:(.text+0x57d): undefined reference to `DftiComputeForward'
/opt/intel/compilers_and_libraries_2019.2.187/linux/mkl/interfaces/fftw3xc/libfftw3xc_intel.a(fftw_plan_guru64_dft.o): In function `execute_bi':
fftw_plan_guru64_dft.c:(.text+0x59d): undefined reference to `DftiComputeBackward'
/opt/intel/compilers_and_libraries_2019.2.187/linux/mkl/interfaces/fftw3xc/libfftw3xc_intel.a(fftw_plan_guru64_dft.o): In function `execute_fo':
fftw_plan_guru64_dft.c:(.text+0x5c1): undefined reference to `DftiComputeForward'
/opt/intel/compilers_and_libraries_2019.2.187/linux/mkl/interfaces/fftw3xc/libfftw3xc_intel.a(fftw_plan_guru64_dft.o): In function `execute_bo':
fftw_plan_guru64_dft.c:(.text+0x5e1): undefined reference to `DftiComputeBackward'
/opt/intel/compilers_and_libraries_2019.2.187/linux/mkl/interfaces/fftw3xc/libfftw3xc_intel.a(fftw_version.o): In function `delete_plan':
fftw_version.c:(.text+0x3e): undefined reference to `DftiFreeDescriptor'
/opt/intel/compilers_and_libraries_2019.2.187/linux/mkl/interfaces/fftw3xc/libfftw3xc_intel.a(fftw_free.o): In function `fftw_free':
fftw_free.c:(.text+0x1): undefined reference to `MKL_free'
/opt/intel/compilers_and_libraries_2019.2.187/linux/mkl/interfaces/fftw3xc/libfftw3xc_intel.a(fftw_malloc.o): In function `fftw_malloc':
fftw_malloc.c:(.text+0x7): undefined reference to `MKL_malloc'
collect2: error: ld returned 1 exit status
make[1]: *** [../lmp_mpi] Error 1
make[1]: Leaving directory `/home/dell/lammps/src/Obj_mpi'
make: *** [mpi] Error 2
Last modified: 2020年3月30日

Comments

Write a Reply or Comment

Your email address will not be published.