This code in BuildSystem makes NO fucking sense

Barry Smith bsmith at mcs.anl.gov
Wed Dec 9 18:33:18 CST 2009


On Dec 9, 2009, at 6:29 PM, Matthew Knepley wrote:

> On Wed, Dec 9, 2009 at 6:24 PM, Barry Smith <bsmith at mcs.anl.gov>  
> wrote:
>
> in compilers.py it logs and error message but keeps on running if  
> the C libraries cannot be used from Fortran. Why is this? It seems  
> totally insane, it just delays the error until later when it is  
> confusing and unclear what the problem is. Is there a DAMN good  
> reason I shouldn't fix this?
>
> I believe we did this because
>
>   1) PETSc itself does not require it. We do all the linking with C

   LIE, LIE, LIE!!!!    The very test for Fortran name mangling uses  
gfortran to link!!!!! Thus Fortran name mangling test will ALWAYS fail  
if the C libraries fail. HENCE PETSc does require C libraries work  
from Fortran. So you need to either

1) generate a true error here. or
2) change the Fortran mangle test to not link with FC

I vote for 1

    Barry

>
>   2) Some Fortran linkers refused to handle the C libraries and we  
> had not work around
>
> By failing, we would have prevented some user from enjoying his  
> perversely isolationist
> Fortran compiler.
>
>   Matt
>
>   Barry
> -- 
> 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




More information about the petsc-dev mailing list