# 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:** 3

<div class="post-metadata">

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

</div>

Thank you so much @wiremoons !

> [@wiremoons](#):
>
> Hopefully someone else can help with your question about _mpi_ running correctly

I can confirm that the mpi works on M1 chip.

It is just seems that my code when using -O2, -O3, -Ofast the M1 chip compile file. But when it run is give a segment 11 error. (it has nothing to do with mpi)

> [@Does sometimes -O2, -O3, -Ofast flags cause segment 11 error on Mac M1 chip?](https://fortran-lang.discourse.group/t/does-sometimes-o2-o3-ofast-flags-cause-segment-11-error-on-mac-m1-chip/2962):
>
> Dear all, I have a code, -O0, -O2, -O3, -Ofast works fine on Ubuntu and windows. However, the same code, on M1 chip using gfortran 11.2.0, -O0 works, however with -O2, -O3, -Ofast flags it can compile and build fine, but when executing, it will soon have a segment 11 error. Since I do not have M1 chip to test myself. I just wanted to see if anyone have similar issue? If so, what kind of issues in the code may cause -O2, -O3, -Ofast lead to segment 11 error for M1 chip? By the way, will the…

But it runs fine on the same version 11.2.0 gfortran on ubuntu and windows.  
So I am not very sure if it is my code’s issue or some compatibility issue with gfortran and M1.

---

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