# PETSc Error

**URL:** https://discourse.julialang.org/t/petsc-error/87081
**Category:** General Usage
**Tags:** question
**Created:** [September 11, 2022, 3:54pm UTC](https://discourse.julialang.org/t/petsc-error/87081 "2022-09-11T15:54:47Z")
**Posts on this page:** 3
**Page:** 1

<div class="post-metadata">

### Author: ![DEVASMIT\_DUTTA](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/devasmit_dutta/32/42566_2.png) [@DEVASMIT\_DUTTA](https://discourse.julialang.org/u/DEVASMIT_DUTTA)
#### Post date: [September 11, 2022, 3:54pm UTC](https://discourse.julialang.org/t/petsc-error/87081/1 "2022-09-11T15:54:47Z")

</div>

Hi, I am operating on macOS Monterey, version 12.5.1, and i am facing an issue when i try to run code using GridapPETSc, below is the error in stack-trace

```julia
PETSc Error --- Application was linked against both OpenMPI and MPICH based MPI libraries 
and will not run correctly

```

After i got this error, i have un-installed MPICH from my machine, and currently only have OPEN-MPI, but still it shows having linked with multiple MPI implementation. Any help in this regard will be very much appreciated …

---

<div class="post-metadata">

### Author: ![digital\_carver](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/digital_carver/32/33818_2.png) [@digital\_carver](https://discourse.julialang.org/u/digital_carver)
#### Post date: [September 14, 2022, 12:10pm UTC](https://discourse.julialang.org/t/petsc-error/87081/2 "2022-09-14T12:10:18Z")

</div>

I don’t know this specific library, but in general, this sounds like an issue that might be solved by:

```julia
import Pkg; Pkg.build("GridapPETSc")

```

---

<div class="post-metadata">

### Author: ![DEVASMIT\_DUTTA](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/devasmit_dutta/32/42566_2.png) [@DEVASMIT\_DUTTA](https://discourse.julialang.org/u/DEVASMIT_DUTTA)
#### Post date: [October 6, 2022, 9:16pm UTC](https://discourse.julialang.org/t/petsc-error/87081/3 "2022-10-06T21:16:32Z")

</div>

@digital_carver thanks for the reply. However, I did the following to sort out the error:

1. keep the `MPI.toml` file empty
2. then building `MPI.jl` and `GridapPETSc.jl`, worked perfectly fine.
