PETSC not found by configuration cmake

186 views
Skip to first unread message

thomas kosvic

unread,
Jul 13, 2021, 12:43:26 PM7/13/21
to deal.II User Group

I got past hdf5 config.
Issue now is petsc config. I have 15 libpetsc files installed with probably 50 more that are available in opensuse.
All installed ones are in /use/lib or usr/lib64; standard locations. But I get error messages below:

-- Include /home/tom/dealii/cmake/configure/configure_3_petsc.cmake -- PETSC_LIBRARY not found! Call: -- FIND_LIBRARY(PETSC_LIBRARY NAMES petsc libpetsc HINTS / PATH_SUFFIXES lib lib64 lib) -- PETSC_INCLUDE_DIR_ARCH not found! Call: -- FIND_PATH(PETSC_INCLUDE_DIR_ARCH petscconf.h HINTS / PATH_SUFFIXES petsc include include/petsc) -- PETSC_INCLUDE_DIR_COMMON not found! Call: -- FIND_PATH(PETSC_INCLUDE_DIR_COMMON petscversion.h HINTS / PATH_SUFFIXES petsc include include/petsc) -- PETSC_PETSCVARIABLES not found! Call: -- FIND_FILE(PETSC_PETSCVARIABLES NAMES petscvariables HINTS / PATH_SUFFIXES conf lib/petsc/conf) -- PETSC_LIBRARIES: *** Required variable "PETSC_LIBRARY" set to NOTFOUND *** -- PETSC_INCLUDE_DIRS: *** Required variable "PETSC_INCLUDE_DIR_COMMON" set to NOTFOUND *** -- PETSC_USER_INCLUDE_DIRS: *** Required variable "PETSC_INCLUDE_DIR_COMMON" set to NOTFOUND *** -- Could NOT find PETSC -- DEAL_II_WITH_PETSC has unmet external dependencies.
Any advice as to what to install additionally.

It would be helpful if the cmake system said what files it is looking for rather than that it can't find some unknown (to the user) file. Saying it can't find some unknown file gives no information to the user. This whole system looks backwards to me.

tom kosvic

Marc Fehling

unread,
Jul 13, 2021, 2:55:30 PM7/13/21
to deal.II User Group
Hello Tom!

If you have a closer look at the error message, you'll see which files our configuration is looking for:

-- FIND_LIBRARY(PETSC_LIBRARY NAMES petsc libpetsc HINTS / PATH_SUFFIXES lib lib64 lib)
-- FIND_PATH(PETSC_INCLUDE_DIR_ARCH petscconf.h HINTS / PATH_SUFFIXES petsc include include/petsc)
-- FIND_PATH(PETSC_INCLUDE_DIR_COMMON petscversion.h HINTS / PATH_SUFFIXES petsc include include/petsc)
-- FIND_FILE(PETSC_PETSCVARIABLES NAMES petscvariables HINTS / PATH_SUFFIXES conf lib/petsc/conf)

Also our README may offer you information you are looking for:
I never configured deal.II with a PETSc installation provided by my package manager, and always installed it manually. If you figure out where your package manager installed PETSc, you can provide a hint to the PETSc installation by setting the cmake variable `PETSC_DIR` to the corresponding path of your installation.

If you are having trouble with the installation of deal.II and external packages, I would like to suggest you to give candi a try:
Best,
Marc

thomas kosvic

unread,
Jul 14, 2021, 1:42:11 PM7/14/21
to deal.II User Group
Marc thanks for reply:

I tried adding assorted petsc paths to the cmake commandline to help cmake find system petsc.  Using the file name hints, I added each one of the variable name paths to cmake.  Petsc would not get found on system.  I tried adding them with the filename included in the path and without the file name (only directory) in the path.  Neither worked to get cmake to find the system petsc.
 f77 files and there is.  I have all versions of gfortran installed.  petsc error messages said it was using wrong compiler.  I found a suggestion under opensuse package file for an alter nate compiler package and sourcing that compiler did not work.

But, I changed dealii from v9.2.0 to 9.3.0 and skipped p4est and petsc and I got a cood compilation and I am further along.  I have to figure what I am missing w/o petsc and p4est.

thanks for help.  this compilation must present problems for many people or else candi would never have been developed.

thanks again,    tom kosvic
Reply all
Reply to author
Forward
0 new messages