Re: AMBER: compiling PMEMD with MKL10.0

From: Robert Duke <rduke.email.unc.edu>
Date: Tue, 26 Feb 2008 08:22:04 -0500

Hi Alessandro -
I am not up to date on my intel s/w subscriptions and have not built with the latest MKL libraries. However, here are three suggestions based on about 15 sec of thought; some of the other amber dev guys probably have very specific experience with MKL 10.0 and ifort 10.1.

The points:

1) Unless you are using generalized Born in pmemd, MKL will not help at all and is not worth the trouble. IF you do intend to use GB, it IS very much worth the trouble.

2) The messages are indicating that an object file in the svml library is having trouble (ie., not) finding threads routines. One thing to do is to simply rearrange the references to put -lpthread at the end of the link list (it is normally pretty near the end of the list). This is the usual thing to do - put libraries called by other libraries after them, as libraries references may be resolved in one pass (I am not sure just how advanced/unadvanced different current linkers are in this regard, but linkage order can be a problem, at least sometimes).

3) Check the MKL doc to see what libraries it says to include in the link line. I think typically there are some scripts showing what to do. PMEMD 9 was originally set up looking at the scripts provided with MKL 7 or 8 if I recollect correctly. Keeping all this stuff in sync can be a pain.

Good luck - Bob Duke
  ----- Original Message -----
  From: Alessandro Nascimento
  To: amber.scripps.edu
  Sent: Tuesday, February 26, 2008 5:20 AM
  Subject: AMBER: compiling PMEMD with MKL10.0


  Hi amber users/developers/gurus,

  I tried recently to compile amber 9 using icc (10.1), ifort (10.1) and mkl(10.0.1) and found the errors shown below.
  sander and other amber programs compile okay. However, PMEMD couldn't be compiled.

  It seems that mkl libraries are not being correctly used during compilation (the amber developers mailing list had something in this way)
  Wihtou MKL, I can compile PMEMD, but since it seems to improve the performance, it would be nice to have them compiled in.
  Any suggestion on how to fix it?

  thanks a lot

  (...)
  ifort -o pmemd gbl_constants.o gbl_datatypes.o state_info.o file_io_dat.o parallel_dat.o mdin_ctrl_dat.o mdin_ewald_dat.o prmtop_dat.o inpcrd_dat.o dynamics_dat.o img.o parallel.o pme_direct.o pme_recip.o pme_fft.o fft1d.o bspline.o pme_force.o pbc.o nb_pairlist.o cit.o dynamics.o bonds.o angles.o dihedrals.o runmd.o loadbal.o shake.o runmin.o constraints.o axis_optimize.o gb_ene.o veclib.o gb_force.o timers.o pmemd_lib.o runfiles.o file_io.o bintraj.o pmemd_clib.o pmemd.o random.o degcnt.o erfcfun.o nmr_calls.o nmr_lib.o get_cmdline.o master_setup.o alltasks_setup.o pme_setup.o ene_frc_splines.o nextprmtop_section.o -L/opt/intel/mkl/10.0.1.014
  /lib/em64t -lmkl_em64t -lpthread -limf -lsvml -Wl,-rpath=/opt/intel/cce/10.1.012/lib:/opt/intel/fce/10.1.012/lib
  /opt/intel/mkl/10.0.1.014/lib/em64t/libmkl_intel_thread.a(vml_threading_templates.o): In function `mkl_vml_service_threader_z_1i_c_1o':
  _tmp/treading_linux32e_intel_thread/vml_threading_templates.c:(.text+0x5a): undefined reference to `__kmpc_global_thread_num'
  _tmp/treading_linux32e_intel_thread/vml_threading_templates.c:(.text+0x131): undefined reference to `__kmpc_ok_to_fork'
  _tmp/treading_linux32e_intel_thread/vml_threading_templates.c:(.text+0x156): undefined reference to `__kmpc_push_num_threads'
  _tmp/treading_linux32e_intel_thread/vml_threading_templates.c:(.text+0x1b6): undefined reference to `__kmpc_fork_call'
  _tmp/treading_linux32e_intel_thread/vml_threading_templates.c:(.text+0x1d4): undefined reference to `__kmpc_serialized_parallel'
  _tmp/treading_linux32e_intel_thread/vml_threading_templates.c:(.text+0x251): undefined reference to `__kmpc_end_serialized_parallel'

  (...)

  /opt/intel/mkl/10.0.1.014/lib/em64t/libmkl_intel_thread.a(mkl_threading.o): In function `MKL_Get_Max_Threads':
  __tmp_mkl_threading.c:(.text+0x55): undefined reference to `omp_in_parallel'
  __tmp_mkl_threading.c:(.text+0x77): undefined reference to `omp_get_max_threads'
  /opt/intel/mkl/10.0.1.014/lib/em64t/libmkl_intel_thread.a(mkl_threading.o): In function `MKL_Domain_Get_Max_Threads':
  __tmp_mkl_threading.c:(.text+0x857): undefined reference to `omp_in_parallel'
  __tmp_mkl_threading.c:(.text+0x878): undefined reference to `omp_get_max_threads'
  make[1]: *** [pmemd] Error 1
  make[1]: Leaving directory `/usr/local/amber9/src/pmemd/src'
  make: *** [all] Error 2


  My architecture:

  ~ $ uname -a
  Linux protoss 2.6.20-gentoo-r8 #24 SMP Thu Jun 21 11:23:54 GMT 2007 x86_64 Intel(R) Core(TM)2 Quad CPU . 2.40GHz GenuineIntel GNU/Linux


  --
  [ ]s

  --alessandro
-----------------------------------------------------------------------
The AMBER Mail Reflector
To post, send mail to amber.scripps.edu
To unsubscribe, send "unsubscribe amber" to majordomo.scripps.edu
Received on Wed Feb 27 2008 - 06:07:39 PST
Custom Search