EDIT:
I realize now that I had reported this error previously and that it has been answered here:
https://aur.archlinux.org/packages/petsc?O=10#comment-884260
Sorry for the noise!
Unfortunately I have not been able to find a workaround other than uninstalling the old version.
Latest version compiles fine but errors out on tests:
==> Starting check()...
Running check examples to verify correct installation
Using PETSC_DIR=/home/jr/.cache/yay/petsc/src/petsc-3.19.0 and PETSC_ARCH=arch-linux-c-opt
C/C++ example src/snes/tutorials/ex19 run successfully with 1 MPI process
C/C++ example src/snes/tutorials/ex19 run successfully with 2 MPI processes
C/C++ example src/snes/tutorials/ex19 run successfully with suitesparse
Possible error running C/C++ Python src/ksp/ksp/tutorials/ex100 with 1 MPI process
See https://petsc.org/release/faq/
[0]PETSC ERROR: --------------------- Error Message --------------------------------------------------------------
[0]PETSC ERROR:
[0]PETSC ERROR: WARNING! There are option(s) set that were not used! Could be the program crashed before they were used or a spelling mistake, etc!
[0]PETSC ERROR: Option left: name:-nox (no value) source: environment
[0]PETSC ERROR: Option left: name:-nox_warning (no value) source: environment
[0]PETSC ERROR: See https://petsc.org/release/faq/ for trouble shooting.
[0]PETSC ERROR: Petsc Release Version 3.19.0, Mar 30, 2023
[0]PETSC ERROR: ./ex100 on a named jr-xps13 by jr Sat Apr 8 17:12:04 2023
[0]PETSC ERROR: Configure options --prefix=/opt/petsc/linux-c-opt --with-shared-libraries=1 --with-petsc4py=1 --with-mpi-f90module-visibility=0 --with-cc=/usr/bin/mpicc --with-cxx=/usr/bin/mpicxx --with-fc=/usr/bin/mpifort --with-fftw=1 --with-metis=1 --with-suitesparse=1 --COPTFLAGS=-O3 -march=native --CXXOPTFLAGS=-O3 -march=native --FOPTFLAGS=-O3 -march=native
[0]PETSC ERROR: #1 MatPythonSetType() at /home/jr/.cache/yay/petsc/src/petsc-3.19.0/src/mat/impls/python/pythonmat.c:24
[0]PETSC ERROR: #2 RunTest() at ex100.c:24
[0]PETSC ERROR: #3 main() at ex100.c:83
[0]PETSC ERROR: Reached the main program with an out-of-range error code -1. This should never happen
[0]PETSC ERROR: PETSc Option Table entries:
[0]PETSC ERROR: -checkfunctionlist (source: environment)
[0]PETSC ERROR: -nox (source: environment)
[0]PETSC ERROR: -nox_warning (source: environment)
[0]PETSC ERROR: -test (source: command line)
[0]PETSC ERROR: ----------------End of Error Message -------send entire error message to petsc-maint@mcs.anl.gov----------
Fortran example src/snes/tutorials/ex5f run successfully with 1 MPI process
Completed test examples
Error while running make check
make[1]: *** [makefile:123: check] Error 1
make: *** [GNUmakefile:17: check] Error 2
==> ERROR: A failure occurred in check().
Aborting...
-> error making: petsc
Pinned Comments
MartinDiehl commented on 2022-10-06 10:26 (UTC)
@jrohwer
When building PETSc (more specifically, petsc4py), one test (ex100 from ksp) will fail if a previous (major) version is installed. I could not figure out why this happens. The solution would be to build in a clean root (which is a little bit complicated due to dependency on other AUR packages) or simply uninstall the old version before.
Any help to solve this issue is welcomed.