dokken, I have installed petsc with the following method, 1. python3 ./configure --COPTFLAGS="${PETSC_SLEPC_OPTFLAGS}" --CXXOPTFLAGS="${PETSC_SLEPC_OPTFLAGS}" --FOPTFLAGS="${PETSC_SLEPC_OPTFLAGS}" --with-make-np=${PETSC_SLEPC_MAKE_NP} --with-64-bit-indices=no --with-debugging=${PETSC_SLEPC_DEBUGGING} --with-fortran-bindings=no --with-shared-libraries --download-hypre --download-metis --download-mumps --download-ptscotch --download-scalapack --download-suitesparse --download-superlu --download-superlu_dist --with-scalar-type=complex --download-cmake
Its result,
PETSc:
PETSC_ARCH: linux-gnu-complex-32
PETSC_DIR: /usr/local/petsc
Prefix: <inplace installation>
Scalar type: complex
Precision: double
Support for __float128
Integer size: 4 bytes
Single library: yes
Shared libraries: yes
Memory alignment from malloc(): 16 bytes
Using GNU make: /usr/bin/make
xxx=========================================================================xxx
Configure stage complete. Now build PETSc libraries with:
make PETSC_DIR=/usr/local/petsc PETSC_ARCH=linux-gnu-complex-32 all
xxx=========================================================================xxx
2. sudo make PETSC_DIR=/usr/local/petsc PETSC_ARCH=linux-gn
u-complex-32 all
Its result,
CC linux-gnu-complex-32/obj/mat/order/amd/amd.o
CC linux-gnu-complex-32/obj/mat/impls/aij/mpi/mumps/mumps.o
CC linux-gnu-complex-32/obj/dm/impls/da/hypre/mhyp.o
CC linux-gnu-complex-32/obj/ksp/pc/impls/hypre/hypre.o
CLINKER linux-gnu-complex-32/lib/libpetsc.so.3.16.0
=========================================
Now to check if the libraries are working do:
make PETSC_DIR=/usr/local/petsc PETSC_ARCH=linux-gnu-complex-32 check
$PETSC_DIR=/usr/local/petsc and $PETSC_ARCH=linux-gnu-complex-32
The echo results are /usr/local/petsc and linux-gnu-complex-32 respective. Now I used pip3 install . rather than sudo -E pip3 install ., and it works. I’ll test if I can import dolfinx.