Package Details: petsc 3.22.2-2

Git Clone URL: https://aur.archlinux.org/petsc.git (read-only, click to copy)
Package Base: petsc
Description: Portable, extensible toolkit for scientific computation
Upstream URL: https://petsc.org
Keywords: computing scientific
Licenses: BSD-2-Clause
Provides: petsc4py
Submitter: heitzmann
Maintainer: MartinDiehl
Last Packager: MartinDiehl
Votes: 19
Popularity: 0.000000
First Submitted: 2018-02-24 11:36 (UTC)
Last Updated: 2025-01-03 06:29 (UTC)

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.

Latest Comments

1 2 3 4 5 6 .. 10 Next › Last »

MartinDiehl commented on 2025-01-03 13:54 (UTC)

@medaminezghal

thanks. Good to see that you fixed it. I can't reproduce the error here and will try on other setups later.

medaminezghal commented on 2025-01-03 07:35 (UTC)

@MartinDiehl I found a fix


  ./configure --prefix=${_install_dir} ${CONFOPTS} \
              "CFLAGS=$CFLAGS" \
              "CXXFLAGS=$CXXFLAGS" \
              "FFLAGS=$FFLAGS" \
              "LDFLAGS=$LDFLAGS -lstdc++" \
              "MAKEFLAGS=$MAKEFLAGS"

Just add the -lstdc++ to the LDFLAGS

medaminezghal commented on 2025-01-02 17:53 (UTC)

@MartinDiehl I’ve already done the rebuild for all packages in my system to python 3.13 but this module has an issue when I import it. I found it by accident when I try to install donfinx. For that, I tried to test an example using the library in python and found this error.

MartinDiehl commented on 2025-01-02 16:12 (UTC)

@medaminezghal: maybe you need to rebuild for Python 3.13

medaminezghal commented on 2024-12-27 14:13 (UTC)

when I try to import the library I get this error:


>>> import petsc4py
>>> from petsc4py import PETSc
Traceback (most recent call last):
  File "<python-input-2>", line 1, in <module>
    from petsc4py import PETSc
  File "/opt/petsc/linux-c-opt/lib/petsc4py/PETSc.py", line 4, in <module>
    PETSc = ImportPETSc(ARCH)
  File "/opt/petsc/linux-c-opt/lib/petsc4py/lib/__init__.py", line 30, in ImportPETSc
    return Import('petsc4py', 'PETSc', path, arch)
  File "/opt/petsc/linux-c-opt/lib/petsc4py/lib/__init__.py", line 97, in Import
    module = import_module(pkg, name, path, arch)
  File "/opt/petsc/linux-c-opt/lib/petsc4py/lib/__init__.py", line 74, in import_module
    module = importlib.util.module_from_spec(spec)
ImportError: /opt/petsc/linux-c-opt/lib/libpetsc.so.3.22: undefined symbol: _ZTVN10__cxxabiv117__class_type_infoE


lahwaacz commented on 2024-11-14 11:48 (UTC) (edited on 2024-11-14 11:53 (UTC) by lahwaacz)

The build with trilinos-ml fails because Trilinos 16 has deprecated the ML package:

In file included from /usr/include/ml_include.h:16,
                 from /tmp/petsc-lz1o27i4/config.headers/conftest.cc:3:
/usr/include/ml_common.h:189:2: warning: #warning "The ML package is deprecated" [-Wcpp]
  189 | #warning "The ML package is deprecated"
      |  ^~~~~~~
In file included from /usr/include/ml_defs.h:8,
                 from /usr/include/ml_include.h:17:
/usr/include/ml_common.h:189:2: warning: #warning "The ML package is deprecated" [-Wcpp]
  189 | #warning "The ML package is deprecated"
      |  ^~~~~~~
/usr/include/ml_defs.h:200:2: warning: #warning "The ML package is deprecated" [-Wcpp]
  200 | #warning "The ML package is deprecated"
      |  ^~~~~~~
In file included from /usr/include/ml_struct.h:26,
                 from /usr/include/ml_include.h:18:
/usr/include/ml_common.h:189:2: warning: #warning "The ML package is deprecated" [-Wcpp]
  189 | #warning "The ML package is deprecated"
      |  ^~~~~~~
In file included from /usr/include/ml_struct.h:27:
/usr/include/ml_defs.h:200:2: warning: #warning "The ML package is deprecated" [-Wcpp]
  200 | #warning "The ML package is deprecated"
      |  ^~~~~~~
...

These warnings are printed to stderr by the compiler and the Petsc build system treats it as an error when it checks if the #include <ml_include.h> include statement works.

MartinDiehl commented on 2024-10-08 19:01 (UTC)

@carlosal1015: I assume you solved it, at least I saw in your Kokkos package '' -DKokkos_ENABLE_OPENMP=OFF''

We could also try to enable openMP in PETSc, but I think that is normally not recommended.

carlosal1015 commented on 2024-10-05 04:24 (UTC)

I have the following message error

CC linux-c-opt/obj/src/vec/is/sf/interface/ftn-custom/zvscat.o
        CXX linux-c-opt/obj/src/sys/objects/kokkos/kinit.o
In file included from /usr/include/OpenMP/Kokkos_OpenMP.hpp:203,
                 from /usr/include/decl/Kokkos_Declare_OPENMP.hpp:21,
                 from /usr/include/KokkosCore_Config_DeclareBackend.hpp:22,
                 from /usr/include/Kokkos_Core.hpp:45,
                 from /tmp/makepkg/petsc/src/petsc-3.21.5/include/petsc/private/kokkosimpl.hpp:6,
                 from /tmp/makepkg/petsc/src/petsc-3.21.5/src/sys/objects/kokkos/kinit.kokkos.cxx:2:
/usr/include/OpenMP/Kokkos_OpenMP_Instance.hpp:23:2: error: #error "You enabled Kokkos OpenMP support without enabling OpenMP in the compiler!"
   23 | #error \
      |  ^~~~~
make[3]: *** [gmakefile:200: linux-c-opt/obj/src/sys/objects/kokkos/kinit.o] Error 1
make[3]: *** Waiting for unfinished jobs....
         CC linux-c-opt/obj/src/vec/is/section/interface/sectionhdf5.o
         CC linux-c-opt/obj/src/vec/is/sf/interface/ftn-custom/zsf.o
         CC linux-c-opt/obj/src/vec/is/sf/impls/basic/neighbor/sfneighbor.o
         CC linux-c-opt/obj/src/vec/is/sf/interface/sfregi.o
         CC linux-c-opt/obj/src/vec/is/sf/utils/f90-custom/zsfutilsf90.o
         CC linux-c-opt/obj/src/vec/is/is/impls/general/general.o
         CC linux-c-opt/obj/src/vec/is/sf/impls/basic/allgatherv/sfallgatherv.o
         CC linux-c-opt/obj/src/vec/is/sf/interface/sftype.o
         CC linux-c-opt/obj/src/vec/is/is/utils/iscoloring.o
         CC linux-c-opt/obj/src/vec/is/is/utils/isdiff.o
         CC linux-c-opt/obj/src/vec/is/sf/impls/basic/sfbasic.o
         CC linux-c-opt/obj/src/sys/objects/options.o
         CC linux-c-opt/obj/src/vec/is/sf/impls/window/sfwindow.o
         CC linux-c-opt/obj/src/vec/is/sf/interface/vscat.o
         CC linux-c-opt/obj/src/vec/is/is/interface/index.o
         CC linux-c-opt/obj/src/vec/is/sf/interface/sf.o
         CC linux-c-opt/obj/src/vec/is/section/interface/section.o
         CC linux-c-opt/obj/src/sys/logging/handler/impls/default/logdefault.o
         CC linux-c-opt/obj/src/vec/is/sf/impls/basic/sfpack.o
make[3]: Leaving directory '/tmp/makepkg/petsc/src/petsc-3.21.5'
make[2]: *** [/tmp/makepkg/petsc/src/petsc-3.21.5/lib/petsc/conf/rules_doc.mk:5: libs] Error 2
make[2]: Leaving directory '/tmp/makepkg/petsc/src/petsc-3.21.5'
**************************ERROR*************************************
  Error during compile, check linux-c-opt/lib/petsc/conf/make.log
  Send it and linux-c-opt/lib/petsc/conf/configure.log to petsc-maint@mcs.anl.gov
********************************************************************
make[1]: *** [makefile:44: all] Error 1
make: *** [GNUmakefile:9: all] Error 2
==> ERROR: A failure occurred in build().

full log: https://0x0.st/XEmY.bin

TLDR: I had kokkos installed before run makepkg. Something is wrong from kokkos's PKGBUILD side or PETSc configuration?

MartinDiehl commented on 2024-05-19 18:41 (UTC)

@carlosal1915: I get the same error in a non-Python code that uses OpenMPI and PETSc. I think it is an upstream issue in either OpenMPI or PETSc.

carlosal1015 commented on 2024-05-19 13:37 (UTC) (edited on 2024-05-19 13:49 (UTC) by carlosal1015)

Hi, I have the following warning/error? message

>>> from petsc4py.PETSc import ScalarType
[5161bd26d9fc:00008] shmem: mmap: an error occurred while determining whether or not /tmp/ompi.5161bd26d9fc.33333/jf.0/2252865536/shared_mem_cuda_pool.5161bd26d9fc could be created.
[5161bd26d9fc:00008] create_and_attach: unable to create shared memory BTL coordinating structure :: size 134217728 

Maybe related with https://github.com/open-mpi/ompi/issues/12307