gridap / GridapSolvers.jl

Solvers and preconditioners for the Gridap ecosystem.
https://gridap.github.io/GridapSolvers.jl/
MIT License
11 stars 1 forks source link

It seems this package cannot be installed without PETSc? #70

Open PetrKryslUCSD opened 2 weeks ago

PetrKryslUCSD commented 2 weeks ago
        Info Packages marked with ⌅ have new versions available but compatibility constraints restrict them from upgrading. To see why use `status --outdated -m`
    Building P4est_wrapper → `~/.julia/scratchspaces/44cfe95a-1eb2-52ea-b672-e2afdf69b78f/d3730f758f8364d734dd35506ea3639db301d87a/build.log`
    Building GridapPETSc ──→ `~/.julia/scratchspaces/44cfe95a-1eb2-52ea-b672-e2afdf69b78f/549d0dce1a8051e6cd2c6dc4edcf0422d48ceecb/build.log`
ERROR: Error building `GridapPETSc`:
┌ Info:  Non-empty JULIA_PETSC_LIBRARY environment variable NOT found.
└ Trying to use the PETSc installation provided by PETSc_jll.
ERROR: LoadError: UndefVarError: `libpetsc_path` not defined
Stacktrace:
 [1] getproperty(x::Module, f::Symbol)
   @ Base ./Base.jl:31
 [2] top-level scope
   @ ~/.julia/packages/GridapPETSc/MNuuG/deps/build.jl:23
 [3] include(fname::String)
   @ Base.MainInclude ./client.jl:489
 [4] top-level scope
   @ none:5
in expression starting at /Users/pkrysl/.julia/packages/GridapPETSc/MNuuG/deps/build.jl:3
JordiManyer commented 1 week ago

I assume you are using an Apple M-processor machine, right? Yes, this is indeed a problem we currently have.

A rundown of the issue: Through GridapPETSc, we provide an interface to PETSc. This is quite handy, since we can use their solvers with ours, and combine them in any way we want. Modularity is quite key.

The package actually does not depend on PETSc at all, but we do import it for a single reason: We provide a couple extensions for specialized solvers. In particular, we provide a linear elasticity solver which creates the NullSpace object PETSc needs to be efficient.

So we require GridapPETSc to be compiled, which requires PETSc to be linked. There are two ways you can link PETSc to Julia, which are explained in GridapPETSc's README:

I am aware I am not providing a solution here. I'm afraid the TLDR is that for the moment we do not fully support Apple laptops, but this is a problem coming from down the line (not the package itself). That said, if you do not use PETSc the library should work just fine. Any of our solvers is built in pure Julia, and you should be able to run them. Just ignore the build error. Alternatively, use a linux machine.

PetrKryslUCSD commented 1 week ago

No worries, I will use a Linux workstation to test the package.