[petsc-dev] Configure problem on Titan

Satish Balay balay at mcs.anl.gov
Wed Mar 11 23:54:00 CDT 2015


On Wed, 11 Mar 2015, Jed Brown wrote:

> > zsh 10219  (git)-[master]-% gfortran -Wl,-v foo.f90
> 
> This can be done, but it's really low level.

We do this on all machines. But the code is hacky - and previously
didn't work well with cray compilers - where all MODULES get
auotomatically linked in.

We normally do:

${(C/CXX/F)LINKER) $(CLIBS) $(FLIBS) $(CXXLIBS)

[Jed has been advocating removing some of the combinations here. Or one can look at
improving this complicated piece of code - not sure if thats possible.]. 

With Cray compilers this results in a huge [repeated] library list of
all the module libraries loaded in the link command. Previously this
caused problems [i.e link errors] - and using the following was
simpler and worked.

--with-clib-autodetect=0 --with-cxxlib-autodetect=0 --with-fortranlib-autodetect=0

Looks like with the newer compilers this doesn't work anymore - and requires:
--with-clib-autodetect=0 --with-cxxlib-autodetect=0 --with-fortranlib-autodetect=0 LIBS=-lstdc++

Or we should look at improving the default mode:
--with-clib-autodetect=1 --with-cxxlib-autodetect=1 --with-fortranlib-autodetect=1

Satish



More information about the petsc-dev mailing list