[petsc-dev] Unused macros in petscconf.h

Smith, Barry F. bsmith at mcs.anl.gov
Fri Jun 28 16:26:35 CDT 2019


  Some of the material collected could go into another file that is stored in the same location available to users but not included by PETSc source.

  Other material like PETSC_HAVE_LIBPNETCDF doesn't seem to be worthing putting in include files. We already have the macros PETSC_HAVE_PNETCDF for example, that are useful in the source so I don't think knowing about the specific libraries in the source is needed.

  Barry


> On Jun 28, 2019, at 4:13 PM, Matthew Knepley <knepley at gmail.com> wrote:
> 
> On Fri, Jun 28, 2019 at 2:04 PM Smith, Barry F. via petsc-dev <petsc-dev at mcs.anl.gov> wrote:
> 
>   You are right, these do not belong in petscconf.h
> 
> The problematic thing here is hiding information from users of PETSc. If you are a user that
> counts on PETSc configure to check something, but then we hide it because we do not use it,
> I would not be happy.
> 
>     Matt
>  
>  Barry
> 
> 
> > On Jun 28, 2019, at 12:37 PM, Jed Brown via petsc-dev <petsc-dev at mcs.anl.gov> wrote:
> > 
> > We have a lot of lines like this
> > 
> > $ grep -c HAVE_LIB $PETSC_ARCH/include/petscconf.h
> > 96
> > 
> > but only four of these are ever checked in src/.  Delete them?
> > 
> > IMO, unused stuff should not go into petscconf.h.  We have to scroll up
> > past these lines every time configure crashes.  These are apparently all
> > unused:
> > 
> > $ for name in $(grep '#define \w\+ ' $PETSC_ARCH/include/petscconf.h | cut -f 2 -d\ ); do rg -q -c $name include/ src/ || echo $name; done
> > STDC_HEADERS
> > HAVE_MATH_INFINITY
> > ANSI_DECLARATORS
> > PETSC_PATH_SEPARATOR
> > PETSC_HAVE_BLASLAPACK
> > PETSC_HAVE_PTHREAD
> > PETSC_HAVE_NETCDF
> > PETSC_HAVE_PNETCDF
> > PETSC_HAVE_METIS
> > PETSC_HAVE_MATHLIB
> > PETSC_HAVE_ZLIB
> > PETSC_TIME_WITH_SYS_TIME
> > PETSC_HAVE_MATH_H
> > PETSC_HAVE_ENDIAN_H
> > PETSC_HAVE_LIMITS_H
> > PETSC_HAVE_SEARCH_H
> > PETSC_HAVE_SCHED_H
> > PETSC_HAVE_PTHREAD_H
> > PETSC_HAVE_CXX_NAMESPACE
> > PETSC_HAVE_FORTRAN_TYPE_INITIALIZE
> > PETSC_HAVE_LIBDL
> > PETSC_HAVE_LIBQUADMATH
> > PETSC_HAVE_LIBX11
> > PETSC_HAVE_LIBZ
> > PETSC_HAVE_LIBTRIANGLE
> > PETSC_HAVE_LIBMETIS
> > PETSC_HAVE_LIBPARMETIS
> > PETSC_HAVE_LIBHDF5HL_FORTRAN
> > PETSC_HAVE_LIBHDF5_FORTRAN
> > PETSC_HAVE_LIBHDF5_HL
> > PETSC_HAVE_LIBHDF5
> > PETSC_HAVE_LIBPNETCDF
> > PETSC_HAVE_LIBNETCDF
> > PETSC_HAVE_LIBEXODUS
> > PETSC_HAVE_LIBBLAS
> > PETSC_HAVE_LIBLAPACK
> > PETSC_HAVE_LIBSTDC__
> > PETSC_HAVE_LIBMPI_USEMPIF08
> > PETSC_HAVE_LIBMPI_USEMPI_IGNORE_TKR
> > PETSC_HAVE_LIBMPI_MPIFH
> > PETSC_HAVE_LIBMPI
> > PETSC_HAVE_LIBGFORTRAN
> > PETSC_HAVE_LIBGCC_S
> > PETSC_HAVE_LIBPTHREAD
> > PETSC_HAVE_LIBSUNDIALS_CVODE
> > PETSC_HAVE_LIBSUNDIALS_NVECSERIAL
> > PETSC_HAVE_LIBSUNDIALS_NVECPARALLEL
> > PETSC_HAVE_LIBML
> > PETSC_HAVE_LIBSUPERLU_DIST
> > PETSC_HAVE_LIBSUPERLU
> > PETSC_HAVE_LIBUMFPACK
> > PETSC_HAVE_LIBKLU
> > PETSC_HAVE_LIBCHOLMOD
> > PETSC_HAVE_LIBBTF
> > PETSC_HAVE_LIBCCOLAMD
> > PETSC_HAVE_LIBCOLAMD
> > PETSC_HAVE_LIBCAMD
> > PETSC_HAVE_LIBAMD
> > PETSC_HAVE_LIBSUITESPARSECONFIG
> > PETSC_HAVE_LIBSCALAPACK
> > PETSC_HAVE_LIBCMUMPS
> > PETSC_HAVE_LIBDMUMPS
> > PETSC_HAVE_LIBSMUMPS
> > PETSC_HAVE_LIBZMUMPS
> > PETSC_HAVE_LIBMUMPS_COMMON
> > PETSC_HAVE_LIBPORD
> > PETSC_HAVE_LIBHYPRE
> > PETSC_USE_SCALAR_REAL
> > PETSC_HAVE_REAL___FLOAT128
> > PETSC_RETSIGTYPE
> > PETSC_SIZEOF_SHORT
> > PETSC_SIZEOF_MPI_COMM
> > PETSC_SIZEOF_MPI_FINT
> > PETSC_HAVE_VPRINTF
> > PETSC_HAVE_VFPRINTF
> > PETSC_HAVE_MKSTEMP
> > PETSC_HAVE_GETHOSTBYNAME
> > PETSC_HAVE_SOCKET
> > PETSC_HAVE_TIMES
> > PETSC_HAVE_SIGSET
> > PETSC_HAVE_GETTIMEOFDAY
> > PETSC_HAVE_SIGNAL
> > PETSC_HAVE_GET_NPROCS
> > PETSC_HAVE_SIGACTION
> > PETSC_HAVE__GFORTRAN_IARGC
> > PETSC_HAVE_SHARED_LIBRARIES
> > PETSC_USE_GDB_DEBUGGER
> > PETSC_VERSION_BRANCH_GIT
> > PETSC_HAVE_MPI_COMM_F2C
> > PETSC_HAVE_MPI_COMM_C2F
> > PETSC_HAVE_MPI_FINT
> > PETSC_HAVE_MPI_REPLACE
> > PETSC_HAVE_MPI_WIN_ALLOCATE_SHARED
> > PETSC_HAVE_MPI_WIN_SHARED_QUERY
> > PETSC_HAVE_MPI_ALLTOALLW
> > PETSC_HAVE_MPI_COMM_SPAWN
> > PETSC_HAVE_MPI_TYPE_GET_EXTENT
> > PETSC_HAVE_PTHREAD_BARRIER_T
> > PETSC_HAVE_SCHED_CPU_SET_T
> > PETSC_HAVE_SYS_SYSCTL_H
> > PETSC_LEVEL1_DCACHE_SIZE
> > PETSC_LEVEL1_DCACHE_ASSOC
> 
> 
> 
> -- 
> 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
> 
> https://www.cse.buffalo.edu/~knepley/



More information about the petsc-dev mailing list