On Mon, Apr 11, 2011 at 2:02 AM, Chen Shen <hashhsah at gmail.com> wrote:
> Hi all, > > Currently, there is an option to specify the blas/lapack library > files --with-scalapack-lib=[<list of .a files>]. This is indeed necessary, > because MKL provides a large choice of libraries to link against. > > However, MKL static libraries have object inter-dependencies, and requires > --start-group/--end-group linker options. All libraries in the group are > searched repeatedly until all inter-dependencies resolved. > For example, the following options is suggested for a configuration ( > http://software.intel.com/en-us/articles/intel-mkl-link-line-advisor/): > > $(MKLROOT)/lib/intel64/libmkl_scalapack_lp64.a -Wl,--start-group > $(MKLROOT)/lib/intel64/libmkl_intel_lp64.a > $(MKLROOT)/lib/intel64/libmkl_sequential.a > $(MKLROOT)/lib/intel64/libmkl_core.a > $(MKLROOT)/lib/intel64/libmkl_blacs_intelmpi_lp64.a -Wl,--end-group > -lpthread > > I'd like to propose an extension to the --with-scalapack-lib syntax to > support start/end group. Consider the following example: > --with-blas-lapack-lib=[ /xxx/scalapack_lp64.a, > [/xxx/libmkl_intel_lp64.a, /xxx/libmkl_sequential.a, libmkl_core.a, > /xxx/libmkl_blacs_intelmpi_lp64.a] ] > > The embedded list indicates a set of libraries to be grouped up. Would this > be possible? > Is there a problem with just including these options in the list of libraries? I think we keep anything that begins with a '-'. Thanks, Matt > This isn't a problem if we link to dynamic libraries, because -l for > dynamic libraries doesn't have to be ordered as in the case of static > libraries. > I hate the wicked order rule for .a libraries, but have to live with it... > > Further, I guess -Bstatic options are dropped somewhere (I haven't checked > it in detail). The final PACKAGES_LIBS macro never contains -Bstatic, so end > application will always link to the static libraries. > > > Regards, > Shen Chen > > > -- What most experimenters take for granted before they begin their experiments is infinitely more interesting than any results to which their experiments lead. -- Norbert Wiener -------------- next part -------------- An HTML attachment was scrubbed... URL: <http://lists.mcs.anl.gov/pipermail/petsc-dev/attachments/20110411/80e81b0e/attachment.html>
