LAMMPS MKL

http://lammps.sandia.gov/threads/msg13222.html


LAMMPS WWW Site - LAMMPS Documentation - LAMMPS Mailing List Archives

[ Date Prev][ Date Next][ Thread Prev][ Thread Next][ Date Index][ Thread Index]

Re: [lammps-users] LAMMPS MKL


From:Axel Kohlmeyer <akohlmey@gmail.com>
Date:Fri, 11 Jun 2010 21:05:40 -0400

On Fri, 2010-06-11 at 18:34 -0600, Magdian Galan Vera wrote:

hi,

> I'm trying to build LAMMPS with MKL. I changed the makefile because
> the MKL version on this system is different but still get some errors.
> These are the errors and the makefile. Any idea
> 
> Thanks

[...]

> verlet.o write_restart.o -lreax
> -mt_mpi /packages/intel/mkl/10.0.2.018/lib/em64t/libfftw3xc_intel.a
> -lifcore -lsvml -lompstub -limf  -lstdc++ -libmkl_intel_thread
> -libmkl_em64t -libguide  -o ../lmp_mkl
> icc: command line error: invalid argument for option '-m'


ok, so you have a flag somewhere that starts 
with -m that is wrong. lets see...


> CC =            mpicc
> CCFLAGS =       -O3 -fno-alias -ip -unroll0

this set of flags makes no sense. -ip doesn't help
for a code as complex as lammps but -unroll does.
-O3 with icc turns on some too aggressive optimizations.

my best flags so far have been:
-O2 -fno-exceptions -fno-rtti -ansi-alias \
-march=core2 -mtune=core2 -pc64 -no-prec-div -no-prec-sqrt -unroll 

> DEPFLAGS =      -M
> LINK =          mpicc
> LINKFLAGS =     -O -L/packages/intel/mkl/10.0.2.018/lib/em64t
> LIB =           -lstdc++ -libmkl_intel_thread -libmkl_em64t -libguide

make sure that you define OMP_NUM_THREADS=1 
linking with threaded MKL will slow you down if you
don't do that as it by default threads across all
available processor and doesn't pay attention to 
MPI tasks. better to do:
       -lmkl_intel_lp64 -lmkl_sequential -lmkl_core -lstdc++

> ARCHIVE =       ar
> ARFLAGS =       -rc
> SIZE =          size
> 
> #
> ---------------------------------------------------------------------
> # LAMMPS-specific settings
> # specify settings for LAMMPS features you will use
> 
> # LAMMPS ifdef options, see doc/Section_start.html
> 
> LMP_INC =       -DLAMMPS_GZIP
> 
> # MPI library, can be src/STUBS dummy lib
> # INC = path for mpi.h, MPI compiler settings
> # PATH = path for MPI library
> # LIB = name of MPI library
> 
> MPI_INC =       -DMPICH_IGNORE_CXX_SEEK
> MPI_PATH =
> MPI_LIB =       -mt_mpi

...and here is your problem! -mt_mpi is putting the intel compiler off.
when you link with mpicc, you should not need to specify _any_ mpi
library. try setting this to empty.


> # FFT library, can be -DFFT_NONE if not using PPPM from KSPACE package
> # INC = -DFFT_FFTW, -DFFT_INTEL, -DFFT_NONE, etc, FFT compiler
> settings
> # PATH = path for FFT library
> # LIB = name of FFT library
> 
> FFT_INC =       -DFFT_FFTW
> -I/packages/intel/mkl/10.0.2.018/include/fftw
> FFT_PATH =
> FFT_LIB
> =       /packages/intel/mkl/10.0.2.018/lib/em64t/libfftw3xc_intel.a

this _cannot_ work. with -DFFT_FFTW only the fftw2 interface 
is supported. if you want to use the fftw3 interface you 
have to use the LAMMPS-ICMS version with -DFFT_FFTW3,
or you can use the MKL fft directly with -DFFT_MKL
http://sites.google.com/site/akohlmey/software/lammps-icms

but there is not a significant speed different between 
any of those three FFT libraries.

cheers,
   axel.

> 
> -- 
> M. Ulises Galan Vera, M.S. Student
> Mechanical and Aerospace Engineering
> Arizona State University
> mgalanve@asu.edu
> http://masslab.asu.edu/
> 
> Cell: (480) 452-9077 
> ------------------------------------------------------------------------------
> ThinkGeek and WIRED's GeekDad team up for the Ultimate 
> GeekDad Father's Day Giveaway. ONE MASSIVE PRIZE to the 
> lucky parental unit.  See the prize list and enter to win: 
> http://p.sf.net/sfu/thinkgeek-promo
> _______________________________________________ lammps-users mailing list lammps-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/lammps-users

-- 
Dr. Axel Kohlmeyer  akohlmey@gmail.com
http://sites.google.com/site/akohlmey/

Institute for Computational Molecular Science
Temple University, Philadelphia PA, USA.





  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值