# PETSc not detected on cluster with mpirun = mpiexec

**URL:** <https://community.freefem.org/t/petsc-not-detected-on-cluster-with-mpirun-mpiexec/829>\
**Category:** FreeFEM installation\
**Created:** [February 26, 2021, 4:41pm UTC](https://community.freefem.org/t/petsc-not-detected-on-cluster-with-mpirun-mpiexec/829 "2021-02-26T16:41:12Z")\
**Posts on this page:** 9\
**Page:** 1

<div class="post-metadata">

**Author:** ![zcwang6](https://yyz2.discourse-cdn.com/flex030/user_avatar/community.freefem.org/zcwang6/32/371_2.png) [@zcwang6](https://community.freefem.org/u/zcwang6)\
**Post date:** [February 26, 2021, 4:41pm UTC](https://community.freefem.org/t/petsc-not-detected-on-cluster-with-mpirun-mpiexec/829/1 "2021-02-26T16:41:12Z")

</div>

Hey there, since the DM plex features requires FreeFem higher than 4.5; I tired to reinstall the FreeFem++ on my school’s cluster; The 4.5 version installation is good; But when I change it to 4.8 version, the PETSc can not be detected; The PETSc is installed correctly; From the config.log file, it seems like my MPI also can not be detected; I have no idea why 4.5 is working but 4.8 is not; I am putting the config.log file for your information here; Thx.[config.log](https://community.freefem.org/uploads/short-url/tszH70PnlCIFHAcqvPZe8OGaVF1.log) (430.2 KB)

---

<div class="post-metadata">

**Author:** ![prj](https://avatars.discourse-cdn.com/v4/letter/p/ecae2f/32.png) [@prj](https://community.freefem.org/u/prj)\
**Post date:** [February 26, 2021, 5:15pm UTC](https://community.freefem.org/t/petsc-not-detected-on-cluster-with-mpirun-mpiexec/829/2 "2021-02-26T17:15:30Z")

</div>

This is not related to PETSc, but FreeFEM configure which doesn’t detect your MPI. What happens if you don’t use the flag `MPIRUN=mpiexec` in your command line?

---

<div class="post-metadata">

**Author:** ![zcwang6](https://yyz2.discourse-cdn.com/flex030/user_avatar/community.freefem.org/zcwang6/32/371_2.png) [@zcwang6](https://community.freefem.org/u/zcwang6)\
**Post date:** [February 26, 2021, 6:06pm UTC](https://community.freefem.org/t/petsc-not-detected-on-cluster-with-mpirun-mpiexec/829/3 "2021-02-26T18:06:48Z")

</div>

The same thing happened if I am not using it;

---

<div class="post-metadata">

**Author:** ![zcwang6](https://yyz2.discourse-cdn.com/flex030/user_avatar/community.freefem.org/zcwang6/32/371_2.png) [@zcwang6](https://community.freefem.org/u/zcwang6)\
**Post date:** [February 26, 2021, 6:12pm UTC](https://community.freefem.org/t/petsc-not-detected-on-cluster-with-mpirun-mpiexec/829/4 "2021-02-26T18:12:19Z")

</div>

wait for second; should I re run ./configure --enable-download --enable-optim --prefix=/home1/wangz6/ instead of ./reconfigure without MPIRUN = mpiexec ?

---

<div class="post-metadata">

**Author:** ![zcwang6](https://yyz2.discourse-cdn.com/flex030/user_avatar/community.freefem.org/zcwang6/32/371_2.png) [@zcwang6](https://community.freefem.org/u/zcwang6)\
**Post date:** [February 26, 2021, 6:18pm UTC](https://community.freefem.org/t/petsc-not-detected-on-cluster-with-mpirun-mpiexec/829/5 "2021-02-26T18:18:50Z")

</div>

without MPIRUN = mpiexec the MPI can be detected, but PETSc still not.

---

<div class="post-metadata">

**Author:** ![prj](https://avatars.discourse-cdn.com/v4/letter/p/ecae2f/32.png) [@prj](https://community.freefem.org/u/prj)\
**Post date:** [February 26, 2021, 7:34pm UTC](https://community.freefem.org/t/petsc-not-detected-on-cluster-with-mpirun-mpiexec/829/6 "2021-02-26T19:34:28Z")

</div>

> without MPIRUN = mpiexec the MPI can be detected, but PETSc still not.

Please send the `config.log`.

---

<div class="post-metadata">

**Author:** ![zcwang6](https://yyz2.discourse-cdn.com/flex030/user_avatar/community.freefem.org/zcwang6/32/371_2.png) [@zcwang6](https://community.freefem.org/u/zcwang6)\
**Post date:** [February 26, 2021, 7:51pm UTC](https://community.freefem.org/t/petsc-not-detected-on-cluster-with-mpirun-mpiexec/829/7 "2021-02-26T19:51:29Z")

</div>

I think I find out the problem, I add the MPIRUN = mpiexec on the .bash\_profile; which is ok with 4.5 version; But with 4.8, freefem can not detect the mpi for me; So with ./configure I deleted that MPIRUN = mpiexec, use it in the ./reconfigure stage; Now the FreeFem can find the mpi and petsc together; I am not sure if this is the reason; Here is the new config.log file;[config.log](https://community.freefem.org/uploads/short-url/9UKc0DVaup4mbs2yoZTwdlgMjys.log) (391.6 KB)

---

<div class="post-metadata">

**Author:** ![prj](https://avatars.discourse-cdn.com/v4/letter/p/ecae2f/32.png) [@prj](https://community.freefem.org/u/prj)\
**Post date:** [February 26, 2021, 8:03pm UTC](https://community.freefem.org/t/petsc-not-detected-on-cluster-with-mpirun-mpiexec/829/8 "2021-02-26T20:03:03Z")

</div>

That is the problem, because that variable is used by FreeFEM `./configure` and it looks like it is messing things up on your machine.

---

<div class="post-metadata">

**Author:** ![zcwang6](https://yyz2.discourse-cdn.com/flex030/user_avatar/community.freefem.org/zcwang6/32/371_2.png) [@zcwang6](https://community.freefem.org/u/zcwang6)\
**Post date:** [February 26, 2021, 8:09pm UTC](https://community.freefem.org/t/petsc-not-detected-on-cluster-with-mpirun-mpiexec/829/9 "2021-02-26T20:09:50Z")

</div>

After this correction, 4.8 is installed correctly; Thanks for your quick replay and suggestions. Thx.
