Re: [AMBER] Compiling AmberTools 1.2 with intel compilers for Mac Osx in 64 bits

From: David Watson <dewatson.olemiss.edu>
Date: Wed, 29 Jul 2009 17:21:50 +0100

On Jul 29, 2009, at 11:00 AM, Alan wrote:

> Dear all,
> I use Fink in 64 bits mode and intel compilers 11.1 (058) on Mac OSX
> 10.5.7.
>
> I am studying "amber10/src/configure_at" because I also want to use
> intel
> MKL library.
>

Until Snow Leopard comes out, and perhaps even then, you will need to
compile and link in 32-bit mode for library compatibility.
Make sure that you source the appropriate scripts in /opt/intel/
Compiler/11.1/0.58/bin in your ~/.bash_profile.
You also need to source /Library/Frameworks/Intel_MKL.framework/
Versions/Current/tools/environment/mklvars32.sh

> I see things that I likely need to do like setting:
>
> processor='x86_64' # because `uname -m` in my mac will return
> 'i386'
>
> And then, looking at case icc) for $mkl: I set 'export
> MKL_HOME=/opt/intel/Compiler/11.1/058/Frameworks/mkl'.
>
> Looking at: tree $MKL_HOME/lib/
> /opt/intel/Compiler/11.1/058/Frameworks/mkl/lib/
> |-- 32
> | |-- libmkl_blas95.a
> | |-- libmkl_core.a
> | |-- libmkl_core.dylib
> | |-- libmkl_intel.a
> | |-- libmkl_intel.dylib
> | |-- libmkl_intel_thread.a
> | |-- libmkl_intel_thread.dylib
> | |-- libmkl_lapack.dylib
> | |-- libmkl_lapack95.a
> | |-- libmkl_p4m.dylib
> | |-- libmkl_p4m3.dylib
> | |-- libmkl_p4p.dylib
> | |-- libmkl_pgi_thread.a
> | |-- libmkl_sequential.a
> | |-- libmkl_sequential.dylib
> | |-- libmkl_solver.a
> | |-- libmkl_solver_sequential.a
> | |-- libmkl_vml_p4m.dylib
> | |-- libmkl_vml_p4m2.dylib
> | |-- libmkl_vml_p4m3.dylib
> | |-- libmkl_vml_p4p.dylib
> | `-- locale
> | `-- en_US
> | `-- mkl_msg.cat
> |-- em64t
> | |-- libmkl_blas95_ilp64.a
> | |-- libmkl_blas95_lp64.a
> | |-- libmkl_core.a
> | |-- libmkl_core.dylib
> | |-- libmkl_intel_ilp64.a
> | |-- libmkl_intel_ilp64.dylib
> | |-- libmkl_intel_lp64.a
> | |-- libmkl_intel_lp64.dylib
> | |-- libmkl_intel_sp2dp.a
> | |-- libmkl_intel_sp2dp.dylib
> | |-- libmkl_intel_thread.a
> | |-- libmkl_intel_thread.dylib
> | |-- libmkl_lapack.dylib
> | |-- libmkl_lapack95_ilp64.a
> | |-- libmkl_lapack95_lp64.a
> | |-- libmkl_mc.dylib
> | |-- libmkl_mc3.dylib
> | |-- libmkl_pgi_thread.a
> | |-- libmkl_sequential.a
> | |-- libmkl_sequential.dylib
> | |-- libmkl_solver_ilp64.a
> | |-- libmkl_solver_ilp64_sequential.a
> | |-- libmkl_solver_lp64.a
> | |-- libmkl_solver_lp64_sequential.a
> | |-- libmkl_vml_mc.dylib
> | |-- libmkl_vml_mc2.dylib
> | |-- libmkl_vml_mc3.dylib
> | `-- locale
> | `-- en_US
> | `-- mkl_msg.cat
> `-- universal
> |-- libmkl_core.a
> |-- libmkl_core.dylib
> |-- libmkl_intel_ilp64.a
> |-- libmkl_intel_ilp64.dylib
> |-- libmkl_intel_lp64.a
> |-- libmkl_intel_lp64.dylib
> |-- libmkl_intel_sp2dp.a
> |-- libmkl_intel_sp2dp.dylib
> |-- libmkl_intel_thread.a
> |-- libmkl_intel_thread.dylib
> |-- libmkl_lapack.dylib
> |-- libmkl_mc.dylib
> |-- libmkl_mc3.dylib
> |-- libmkl_p4m.dylib
> |-- libmkl_p4m3.dylib
> |-- libmkl_p4p.dylib
> |-- libmkl_pgi_thread.a
> |-- libmkl_sequential.a
> |-- libmkl_sequential.dylib
> |-- libmkl_solver_ilp64.a
> |-- libmkl_solver_ilp64_sequential.a
> |-- libmkl_solver_lp64.a
> |-- libmkl_solver_lp64_sequential.a
> |-- libmkl_vml_mc.dylib
> |-- libmkl_vml_mc2.dylib
> |-- libmkl_vml_mc3.dylib
> |-- libmkl_vml_p4m.dylib
> |-- libmkl_vml_p4m2.dylib
> |-- libmkl_vml_p4m3.dylib
> `-- libmkl_vml_p4p.dylib
>
> 7 directories, 80 files
>
> And I cannot see any file called "libmkl_lapack.a" or
> "libmkl_em64t.a" and I
> don't know, either, there's in an equivalent since, e.g., for lapack
> I have:
>

You should definitely see the following to determine which link line
you need to use in the FLIBS variable in config.h:
     http://software.intel.com/en-us/articles/intel-mkl-link-line-advisor/

I found it so useful I bookmarked it!

> | |-- libmkl_lapack.dylib
> | |-- libmkl_lapack95_ilp64.a
> | |-- libmkl_lapack95_lp64.a
>
> but not "libmkl_lapack.a".
>
> I was wondering if someone here could give a tip about how to
> proceed in
> changing configure_at (or even Makefile_at) in order to try to make
> it work
> with intel compilers and intel MKL libs.
>

I was able to get it to work with gcc and MKL, but not icc and MKL.
Perhaps you will have better luck.

> NOTE:
> If I don't touch configure_at and don't set MKL_HOME, simply doing:
> ./configure_at icc
> make -f Makefile_at
> cd $AMBERHOME/test; make -f Makefile_at test
>
> It compiled fine, and all test worked except for nab, that gives:
> cd $AMBERHOME/test; make -f Makefile_at test
> ( cd nab; make test )
> =====================================================
> Running test to make dna duplex:
>
> /bin/sh: line 1: 28400 Segmentation fault ./duplex < duplex.in
> make[1]: *** [duplex_test] Error 139
>
> NOTE2:
> I didn't find more documentation about './configure_at -h' for options
> '-mpi' or '-openmp'. It would enable some programmes in ambertools
> to use
> multi-cores? Which programmes could take advantage of these options?
>
> Many thanks in advance,
>
> Alan


_______________________________________________
AMBER mailing list
AMBER.ambermd.org
http://lists.ambermd.org/mailman/listinfo/amber
Received on Wed Aug 19 2009 - 19:41:22 PDT
Custom Search