[petsc-dev] [buildsystem] support for --start-group/--end-group

Satish Balay balay at mcs.anl.gov
Mon Apr 11 09:29:19 CDT 2011


Currently things specified with LIBS option remain untouched by
configure..

so you could try

LIBS="$(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 " --with-scalapack=1

Satish

On Mon, 11 Apr 2011, Chen Shen 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?
> 
> 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
> 




More information about the petsc-dev mailing list