# Does \`sudo apt install gfortran mpich\` support Apple M1 chip?

**URL:** <https://fortran-lang.discourse.group/t/does-sudo-apt-install-gfortran-mpich-support-apple-m1-chip/2950>\
**Category:** Uncategorized\
**Created:** [March 11, 2022, 2:59am UTC](https://fortran-lang.discourse.group/t/does-sudo-apt-install-gfortran-mpich-support-apple-m1-chip/2950 "2022-03-11T02:59:46Z")\
**Posts on this page:** 1\
**Showing post:** 2

<div class="post-metadata">

**Author:** ![wiremoons](https://yyz2.discourse-cdn.com/free1/user_avatar/fortran-lang.discourse.group/wiremoons/32/764_2.png) [@wiremoons](https://fortran-lang.discourse.group/u/wiremoons)\
**Post date:** [March 12, 2022, 9:44pm UTC](https://fortran-lang.discourse.group/t/does-sudo-apt-install-gfortran-mpich-support-apple-m1-chip/2950/2 "2022-03-12T21:44:00Z")

</div>

Hi @CRquantum

I can answer a few of your questions:

_what is the most easy way to use gfortran + mpi for M1 chip Mac?_

A lot of Apple computer users (both Apple M1 chip and Intel x86 chip) use [Homebrew](https://brew.sh/) or [MacPorts](https://www.macports.org/) to install and manage packages from the command line on their macOS computers.

I have tried both, and currently use _Homebrew_. Once setup, you can install _gfortran_ with the command: `brew install gfortran`. I have not used _mpich_ but a quick search with `brew info mpich` does show it exists at version: _stable 4.0.1_.

More details here: [Homebrew ‘mpich’](https://formulae.brew.sh/formula/mpich#default)

The command shown in you message using `apt` is to install the packages under Linux, where `apt` is package manager (ie similar to _Homebrew_) - but used on Linux distributions such as _Debian_ and _Ubuntu_, plus others. The equivalent command using _Homebrew_ would be:

```auto
brew install gfortran mpich

```

NB: the use of `sudo` is not required for _Homebrew_.

_does that gfortran and mpi run properly on M1 chip?_

I use `gfortran` on my M1 based Apple computers and it works well. The currently installed version via _Homebrew_ is:

```auto
GNU Fortran (Homebrew GCC 11.2.0_3) 11.2.0

```

There are other approaches available as well - but the above is probably the most common for _macOS_ computers.

Hopefully someone else can help with your question about _mpi_ running correctly 🙂

---

_[View the full topic](https://fortran-lang.discourse.group/t/does-sudo-apt-install-gfortran-mpich-support-apple-m1-chip/2950)._
