# Specfem3D Cartesian Installation on Macbook M2

**URL:** https://community.geodynamics.org/t/specfem3d-cartesian-installation-on-macbook-m2/3236
**Category:** General
**Tags:** installation, specfem3d
**Created:** [January 17, 2024, 5:16pm UTC](https://community.geodynamics.org/t/specfem3d-cartesian-installation-on-macbook-m2/3236 "2024-01-17T17:16:28Z")
**Posts on this page:** 2
**Page:** 1

<div class="post-metadata">

### Author: ![athira981](https://avatars.discourse-cdn.com/v4/letter/a/ad7895/32.png) [@athira981](https://community.geodynamics.org/u/athira981)
#### Post date: [January 17, 2024, 5:16pm UTC](https://community.geodynamics.org/t/specfem3d-cartesian-installation-on-macbook-m2/3236/1 "2024-01-17T17:16:28Z")

</div>

Hi,  
I am having the following error when trying to install Specfem3D Cartesian on MacOS M2 machine.

**bash-3.2$ ./configure FC=gfortran CC=gcc MPIFC=mpif90 --with-mpi**  
**.**  
**.**  
**.**

**checking for mpi.h… no**

**configure: error: MPI header not found; try setting MPI\_INC.**

## --------------------------------------------------------------------

I made it sure that all mpi libraries are installed.

**bash-3.2$ mpi**  
**mpic++ mpicc mpicxx mpiexec mpif77 mpif90 mpifort mpioutil mpirun**

The error persists, and I’m seeking assistance to understand the reason behind it. Additionally, I am looking for any suggested solutions that would enable me to successfully install it on my machine.

---

<div class="post-metadata">

### Author: ![bangerth](https://yyz2.discourse-cdn.com/flex036/user_avatar/community.geodynamics.org/bangerth/32/52_2.png) [@bangerth](https://community.geodynamics.org/u/bangerth)
#### Post date: [January 17, 2024, 6:03pm UTC](https://community.geodynamics.org/t/specfem3d-cartesian-installation-on-macbook-m2/3236/2 "2024-01-17T18:03:25Z")

</div>

@athira981  
`mpi.h` is often in a package called `mpi-dev` or `openmpi-dev` of `mpich-dev` or similar. You may want to check whether you have that installed. In fact, you should probably check first whether you really do have the `mpi.h` file or whether the error message is true: That there is no `mpi.h` file.  
Best  
W.
