[petsc-dev] [Suggestion] Configure QOL Improvements

Jed Brown jed at jedbrown.org
Sat Nov 9 18:09:34 CST 2019


Matthew Knepley <knepley at gmail.com> writes:

> On Wed, Oct 23, 2019 at 4:59 PM Jed Brown <jed at jedbrown.org> wrote:
>
>> Matthew Knepley <knepley at gmail.com> writes:
>>
>> > That is an unreliable check for Z. You would not eliminate the case
>> > where you give --with-Z, but the check fails, so Z is not available,
>> > but you do not find out until checking X or Y.
>>
>> You can verify that Z works in a fraction of a second, but building X
>> may take minutes.  Work bottom up, verify everything that is given
>> before building anything.
>>
>
> That is exactly what we do now. What are you talking about?

No, it does not.  See how libceed is built before determining that
libpng does not have its required dependency of zlib?

$ time ./configure PETSC_ARCH=ompi-png --download-libceed --download-libpng --with-fortran-interfaces=0
===============================================================================
             Configuring PETSc to compile on your system                       
===============================================================================
===============================================================================                                                                                                                
      Warning: PETSC_ARCH from environment does not match command-line or name of script.                                                                                                      
      Warning: Using from command-line or name of script: ompi-png, ignoring environment: ompi-optg                                                                                            
===============================================================================                                                                                                                
===============================================================================                                                                                                                
      Trying to download git://https://github.com/CEED/libceed.git for LIBCEED                                                                                                                 
===============================================================================                                                                                                                
===============================================================================                                                                                                                
      Compiling libceed; this may take several minutes                                                                                                                                         
===============================================================================                                                                                                                
===============================================================================                                                                                                                
      Installing libceed; this may take several minutes                                                                                                                                        
===============================================================================                                                                                                                
TESTING: checkDependencies from config.packages.libpng(config/BuildSystem/config/package.py:834)                                                                                               
*******************************************************************************
         UNABLE to CONFIGURE with GIVEN OPTIONS    (see configure.log for details):
-------------------------------------------------------------------------------
Did not find package ZLIB needed by libpng.
Enable the package using --with-zlib or --download-zlib
*******************************************************************************

38.987 real   29.069 user   8.760 sys   97.03 cpu


Note that this is most of the way through the configure before
recognizing that anything is missing.  In contrast, spack can tell me in
a fraction of a second that libpng needs zlib.  We should work out the
dependency graph first to make sure it has no unsatisfied nodes, then
check bottom-up that provided stuff works before building.

$ time spack spec libpng
Input spec
--------------------------------
libpng

Concretized
--------------------------------
libpng at 1.6.34%gcc at 9.2.0 arch=linux-arch-skylake
    ^zlib at 1.2.11%gcc at 9.2.0+optimize+pic+shared arch=linux-arch-skylake

0.407 real   0.358 user   0.034 sys   96.44 cpu


More information about the petsc-dev mailing list