# Tests after make install fail

**URL:** <https://precice.discourse.group/t/tests-after-make-install-fail/606>\
**Category:** Installing preCICE\
**Tags:** mpi\
**Created:** [May 25, 2021, 7:55am UTC](https://precice.discourse.group/t/tests-after-make-install-fail/606 "2021-05-25T07:55:08Z")\
**Posts on this page:** 10\
**Page:** 1

<div class="post-metadata">

**Author:** ![alicezanella](https://yyz2.discourse-cdn.com/free1/user_avatar/precice.discourse.group/alicezanella/32/589_2.png) [@alicezanella](https://precice.discourse.group/u/alicezanella)\
**Post date:** [May 25, 2021, 7:55am UTC](https://precice.discourse.group/t/tests-after-make-install-fail/606/1 "2021-05-25T07:55:08Z")

</div>

Hi,

I’m trying to install preCICE on a server. I installed everything from source.  
`make` and `make install` do not report errors.  
Then I do `ctest` and it seems that all the tests fail. Here I’ve attached the log.  
[precice\_tests\_failed.txt](https://precice.discourse.group/uploads/short-url/4IApTivbP9XLud3A0BOryvt6CJJ.txt) (33.1 KB)

I think it’s related to MPI but I cannot understand what’s the problem.

Thank you for your help,

_Alice_

---

<div class="post-metadata">

**Author:** ![DavidSCN](https://avatars.discourse-cdn.com/v4/letter/d/c37758/32.png) [@DavidSCN](https://precice.discourse.group/u/DavidSCN)\
**Post date:** [May 25, 2021, 8:07am UTC](https://precice.discourse.group/t/tests-after-make-install-fail/606/2 "2021-05-25T08:07:16Z")

</div>

Hi Alice,

yes, it seems like an mpi problem.

What do you get when running `command -v mpiexec`?  
The first shown path should give you the executed mpi binary and it seems like your system detects the wrong one.

Maybe you need to load mpi on your system via a module or you have some custom mpi executable unintentionally in your path (e.g. the paraView mpi exectuable).

You can always edit the mpi bindary used for the tested by running `ccmake .` in your build directory, pressing `t` for advanced mode and looking for the `MPIEXEC_EXECUTABLE`.

Hope this helps,  
David

---

<div class="post-metadata">

**Author:** ![alicezanella](https://yyz2.discourse-cdn.com/free1/user_avatar/precice.discourse.group/alicezanella/32/589_2.png) [@alicezanella](https://precice.discourse.group/u/alicezanella)\
**Post date:** [May 25, 2021, 8:15am UTC](https://precice.discourse.group/t/tests-after-make-install-fail/606/3 "2021-05-25T08:15:09Z")

</div>

> [@DavidSCN](#):
>
> What do you get when running `command -v mpiexec` ?

I get `/usr/local/bin/mpiexec`  
The other problem is that even if in my `.bashrc` I have correctly added the PATH to a more recent version of OpenMPI installed from source, it doesn’t see it.

What do you mean by “load mpi via module”?

---

<div class="post-metadata">

**Author:** ![DavidSCN](https://avatars.discourse-cdn.com/v4/letter/d/c37758/32.png) [@DavidSCN](https://precice.discourse.group/u/DavidSCN)\
**Post date:** [May 25, 2021, 8:33am UTC](https://precice.discourse.group/t/tests-after-make-install-fail/606/4 "2021-05-25T08:33:18Z")

</div>

> [@alicezanella](#):
>
> I get `/usr/local/bin/mpiexec`

Hm this seems to be fine.

> [@alicezanella](#):
>
> The other problem is that even if in my `.bashrc` I have correctly added the PATH to a more recent version of OpenMPI installed from source, it doesn’t see it

How do you add it in your `PATH`. Make sure you prepend the custom location instead of append, i.e. `PATH=/my/path/:$PATH`. Which mpi version was picked up by cmake, is it the same?

> [@alicezanella](#):
>
> What do you mean by “load mpi via module”?

I was not sure if you are working on a cluster where module are available, so that you can ask for pre-installed mpi versionsm but I guess the answer is now obsolete.

---

<div class="post-metadata">

**Author:** ![alicezanella](https://yyz2.discourse-cdn.com/free1/user_avatar/precice.discourse.group/alicezanella/32/589_2.png) [@alicezanella](https://precice.discourse.group/u/alicezanella)\
**Post date:** [May 25, 2021, 8:56am UTC](https://precice.discourse.group/t/tests-after-make-install-fail/606/5 "2021-05-25T08:56:46Z")

</div>

> [@DavidSCN](#):
>
> How do you add it in your `PATH` . Make sure you prepend the custom location instead of append, i.e. `PATH=/my/path/:$PATH` . Which mpi version was picked up by cmake, is it the same?

Yes I added the PATH in the correct way, I presume:

```
export PATH="/home/softwares/openmpi-4.0.3/bin:$PATH"
export LD_LIBRARY_PATH="$LD_LIBRARY_PATH:/home/softwares/openmpi-4.0.3/lib"

```

But it still sees the `/usr/local/bin/mpicc` for some reason.

---

<div class="post-metadata">

**Author:** ![alicezanella](https://yyz2.discourse-cdn.com/free1/user_avatar/precice.discourse.group/alicezanella/32/589_2.png) [@alicezanella](https://precice.discourse.group/u/alicezanella)\
**Post date:** [May 25, 2021, 9:04am UTC](https://precice.discourse.group/t/tests-after-make-install-fail/606/6 "2021-05-25T09:04:51Z")

</div>

Ok I succesfully added the latest version of OpenMPI on my bashrc.  
I assume that I have to recompile both PETSc and preCICE because they have to be linked to the same MPI. Right?

---

<div class="post-metadata">

**Author:** ![DavidSCN](https://avatars.discourse-cdn.com/v4/letter/d/c37758/32.png) [@DavidSCN](https://precice.discourse.group/u/DavidSCN)\
**Post date:** [May 25, 2021, 9:11am UTC](https://precice.discourse.group/t/tests-after-make-install-fail/606/7 "2021-05-25T09:11:14Z")

</div>

That’s right. Do you see any differences in the utilized mpi version when running cmake? You might need to delete your cmake cache (or set the new path manually), otherwise cmake will be happy with other mpi version?

---

<div class="post-metadata">

**Author:** ![alicezanella](https://yyz2.discourse-cdn.com/free1/user_avatar/precice.discourse.group/alicezanella/32/589_2.png) [@alicezanella](https://precice.discourse.group/u/alicezanella)\
**Post date:** [May 25, 2021, 9:24am UTC](https://precice.discourse.group/t/tests-after-make-install-fail/606/8 "2021-05-25T09:24:45Z")

</div>

I’ll let you know if it works! For now I completely removed petsc and precice folders, just to be sure 😂

Thank you for your help, I hope it works.

---

<div class="post-metadata">

**Author:** ![alicezanella](https://yyz2.discourse-cdn.com/free1/user_avatar/precice.discourse.group/alicezanella/32/589_2.png) [@alicezanella](https://precice.discourse.group/u/alicezanella)\
**Post date:** [May 26, 2021, 2:27pm UTC](https://precice.discourse.group/t/tests-after-make-install-fail/606/9 "2021-05-26T14:27:39Z")

</div>

Hi @DavidSCN

I just wanted to let you know that all the tests passed. Thank you for your help!

---

<div class="post-metadata">

**Author:** ![system](https://global.discourse-cdn.com/free1/uploads/precice/original/1X/67d2a5fa6f80e597e2267ff17fa8c1673cd11caa.svg) [@system](https://precice.discourse.group/u/system)\
**Post date:** [May 29, 2021, 2:27pm UTC](https://precice.discourse.group/t/tests-after-make-install-fail/606/10 "2021-05-29T14:27:41Z")

</div>

Closed on May 29, 2021, 2:27pm UTC

This topic was automatically closed 3 days after the last reply. New replies are no longer allowed.
