Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Closed
PetrKryslUCSD opened this issue Sep 1, 2024 · 2 comments
Closed

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

PetrKryslUCSD opened this issue Sep 1, 2024 · 2 comments

Comments

@PetrKryslUCSD
Copy link

        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
Copy link
Member

JordiManyer commented Sep 2, 2024

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:

  • You can compile your binaries from scratch (which you would do in an HPC setting). This should always work as long as you manage to compile PETSc on your machine. Then just follow the instructions to link it to GridapPETSc.
  • You can use Julia's artifact. This is in theory easier, but currently does not work on Mac. The short version is that we are having issues updating to the newest version of PETSc_jll (see this issue), and the old version of the binaries are not available for Apple M1 and above. I am following closely the new releases of PETSc_jll, and we hope to resolve this issue soon.

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
Copy link
Author

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants