Skip to content

Unknown symmertric solver "petsc"- Clariffy steps for correctly building and linking PETSc

Currently having issues getting up and running with petsc4foam

edit: this portion of the issue was due to the script looking for a hard link for petsc 3.15.0, where as I had 3.15.4.

New/subsequent issue is that solver "petsc" is not found. See reply 2

Specifically I don't seem to be correctly getting libpetscFoam.so.

configuration for petsc is: ./configure --with-64-bit-indices=0 --with-precision=double --with-debugging=0 --COPTFLAGS=-O3 --CXXOPTFLAGS=-O3 --FOPTFLAGS=-O3 --prefix=$WM_THIRD_PARTY_DIR/platforms/$WM_ARCH$WM_COMPILER$WM_PRECISION_OPTION$WM_LABEL_OPTION/petsc-git PETSC_ARCH=$WM_OPTIONS --download-openblas --download-mpich --with-fc=gfortran --prefix=$WM_THIRD_PARTY_DIR/platforms/$WM_ARCH$WM_COMPILER$WM_PRECISION_OPTION$WM_LABEL_OPTION/petsc-git PETSC_ARCH=$WM_OPTIONS --download-scotch --hip=1

after successfully building openfoam2106 from source

I've attempted to run the ./Allwmake script from this repository, which returned

/Allwmake 
========================================
2021-09-14 18:04:38 -0400
Starting compile of external-solver (petsc) with OpenFOAM-v2106
  Gcc system compiler
  linux64GccDPInt32Opt, with SYSTEMOPENMPI sys-openmpi
  prefix = default (user)

==> skip petsc (no header)

2021-09-14 18:04:38 -0400
========================================
  Finished compile of external-solver (petsc) with OpenFOAM-v2106
  Gcc system compiler
  linux64GccDPInt32Opt, with SYSTEMOPENMPI sys-openmpi

The external solver script does seem to detect petsc correctly, but the library itself is missing.

This leads me to suspect that the issue lies with the configuration in petsc not compiling the needed lib. Running find . -name "*oam.so" from the top of the petsc source directory and openfoam source directory returned no relevant hits.

Any advice is greatly appreciated

Edited by Felix LeClair
To upload designs, you'll need to enable LFS and have an admin enable hashed storage. More information