Skip to content

Default PETSc BLAS/LAPACK to vecLib on macOS#215

Open
boyceg wants to merge 1 commit into
masterfrom
codex/macos-petsc-veclib-default
Open

Default PETSc BLAS/LAPACK to vecLib on macOS#215
boyceg wants to merge 1 commit into
masterfrom
codex/macos-petsc-veclib-default

Conversation

@boyceg
Copy link
Copy Markdown
Contributor

@boyceg boyceg commented Apr 13, 2026

Add an option to set the PETSc BLAS/LAPACK backend to veclib on macOS, and make this the default if --lapack-library is not explicitly set.

@boyceg boyceg requested a review from drwells April 13, 2026 01:26
@boyceg
Copy link
Copy Markdown
Contributor Author

boyceg commented Apr 13, 2026

@drwells I think we want to default to using https://developer.apple.com/documentation/accelerate/veclib on MacOS.

Comment thread autoibamr.sh Outdated
@boyceg boyceg force-pushed the codex/macos-petsc-veclib-default branch from 1c33e67 to 8a9bca1 Compare April 16, 2026 19:38
@boyceg boyceg requested a review from drwells April 16, 2026 19:40
@boyceg
Copy link
Copy Markdown
Contributor Author

boyceg commented Apr 16, 2026

@drwells: see if this addresses your comments.

AFAIK, the official way to link to vecLib is to use -framework Accelerate, but I am not sure if we can use strings with spaces here.

@drwells
Copy link
Copy Markdown
Member

drwells commented Apr 21, 2026

It looks like PETSc can detect veclib in its configuration scripts, but it does basically the same thing as this so if this works I wouldn't worry about it.

Is veclib always installed on macs? We should add some documentation to the readme explaining that it is a dependency on macs (and users can get around it by specifying openblas instead).

@boyceg
Copy link
Copy Markdown
Contributor Author

boyceg commented Apr 21, 2026

AFAIK, Accelerate and vecLib have been around forever and are always installed. I am not sure why we haven't been using them already.

@drwells
Copy link
Copy Markdown
Member

drwells commented Apr 21, 2026

I'd expect that if we do nothing then PETSc will detect them on macs, so we may already be using them.

@boyceg
Copy link
Copy Markdown
Contributor Author

boyceg commented Apr 21, 2026

I'd expect that if we do nothing then PETSc will detect them on macs, so we may already be using them.

Unclear. I just tried recompiling the current PETSc release on my Mac, and I see:

BlasLapack:
  Libraries:  -llapack -lblas
  Unknown if this uses OpenMP (try export OMP_NUM_THREADS=<1-4> yourprogram -log_view)
  uses 4 byte integers

From what I've seen, I don't think that is how you link to vecLib.

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

Successfully merging this pull request may close these issues.

2 participants