<div>Hi all,</div><div><br></div><div>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.</div>
<div><br></div><div>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.</div>
<div>For example, the following options is suggested for a configuration (<a href="http://software.intel.com/en-us/articles/intel-mkl-link-line-advisor/">http://software.intel.com/en-us/articles/intel-mkl-link-line-advisor/</a>):</div>
<div><br></div><div>$(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</div>
<div><br></div><div>I'd like to propose an extension to the --with-<meta charset="utf-8">scalapack-lib syntax to support start/end group. Consider the following example:</div><div>--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] ]  </div>
<div><br></div><div>The embedded list indicates a set of libraries to be grouped up. Would this be possible?</div><div><br></div><div>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.</div>
<div>I hate the wicked order rule for .a libraries, but have to live with it...</div><div><br></div><div>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.</div>
<div><br></div><div><br></div><div>Regards,</div><div>Shen Chen</div><div><br></div><div><br></div><meta charset="utf-8"><meta charset="utf-8"><meta charset="utf-8">