# FreeFem installation on a cluster

**URL:** <https://community.freefem.org/t/freefem-installation-on-a-cluster/3210>\
**Category:** FreeFEM installation\
**Created:** [May 3, 2024, 10:03pm UTC](https://community.freefem.org/t/freefem-installation-on-a-cluster/3210 "2024-05-03T22:03:31Z")\
**Posts on this page:** 11\
**Page:** 1

<div class="post-metadata">

**Author:** ![aszaboa](https://yyz2.discourse-cdn.com/flex030/user_avatar/community.freefem.org/aszaboa/32/2918_2.png) [@aszaboa](https://community.freefem.org/u/aszaboa)\
**Post date:** [May 3, 2024, 10:03pm UTC](https://community.freefem.org/t/freefem-installation-on-a-cluster/3210/1 "2024-05-03T22:03:31Z")

</div>

Dear FreeFem users,

I am trying to use FreeFem on a HPC cluster. FreeFem was installed by my colleague, he tested the installation and it works.  
When I test it by using FreeFem compiled in the HPC project library, the real version of PETSc works fine. However, when I try running the complex version, it does not work properly. Running the code with `-v 10000` reveals that the real PETSc version is loaded. FreeFem claims that the complex version is not found in the referenced folder; however, the file is clearly there.

I attach the output file. Any clues are appreciated.  
[nsC.log](https://community.freefem.org/uploads/short-url/8kTwnpExLVRXoMiDrmoQIVeIHZ6.log) (3.8 MB)

---

<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:** [May 4, 2024, 6:46am UTC](https://community.freefem.org/t/freefem-installation-on-a-cluster/3210/2 "2024-05-04T06:46:34Z")

</div>

Try `ldd /home/c_mvgsa/c_mvgopt03/FreeFem/FreeFem-sources/plugin/mpi/PETSc-complex.so` and send the output.

---

<div class="post-metadata">

**Author:** ![aszaboa](https://yyz2.discourse-cdn.com/flex030/user_avatar/community.freefem.org/aszaboa/32/2918_2.png) [@aszaboa](https://community.freefem.org/u/aszaboa)\
**Post date:** [May 4, 2024, 11:03am UTC](https://community.freefem.org/t/freefem-installation-on-a-cluster/3210/3 "2024-05-04T11:03:52Z")

</div>

Thanks for the prompt reply. I attach the output.[ldd\_PETSc\_complex.log](https://community.freefem.org/uploads/short-url/v2ekIXwF399satKjQU1Q7PqUBOR.log) (5.5 KB)

---

<div class="post-metadata">

**Author:** ![aszaboa](https://yyz2.discourse-cdn.com/flex030/user_avatar/community.freefem.org/aszaboa/32/2918_2.png) [@aszaboa](https://community.freefem.org/u/aszaboa)\
**Post date:** [May 4, 2024, 11:13am UTC](https://community.freefem.org/t/freefem-installation-on-a-cluster/3210/4 "2024-05-04T11:13:11Z")

</div>

One additional comment: the real version of `ff-mpirun` missed the _libspqr.so.2_ file. I fixed this by adding the corresponding directory to the `LD_LIBRARY_PATH` variable in my .bashrc file. However, the output of `ldd /home/c_mvgsa/c_mvgopt03/FreeFem/FreeFem-sources/plugin/mpi/PETSc.so` shows that this file is linked to the correct location.

---

<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:** [May 4, 2024, 2:09pm UTC](https://community.freefem.org/t/freefem-installation-on-a-cluster/3210/5 "2024-05-04T14:09:38Z")

</div>

This is not the proper fix, because now you can see the following:

```auto
	libslepc.so.3.20 => /project/c_mvgopt03/FreeFem/petsc/arch-FreeFem/lib/libslepc.so.3.20 (0x00007f456ba2f000)
	libpetsc.so.3.20 => /project/c_mvgopt03/FreeFem/petsc/arch-FreeFem/lib/libpetsc.so.3.20 (0x00007f456a0c4000)

```

I.e., `PETSc-complex` is using the real libraries, and so you script does not work.

---

<div class="post-metadata">

**Author:** ![aszaboa](https://yyz2.discourse-cdn.com/flex030/user_avatar/community.freefem.org/aszaboa/32/2918_2.png) [@aszaboa](https://community.freefem.org/u/aszaboa)\
**Post date:** [May 4, 2024, 3:10pm UTC](https://community.freefem.org/t/freefem-installation-on-a-cluster/3210/6 "2024-05-04T15:10:25Z")

</div>

I see. Do you have any suggestions regarding a proper fix?

---

<div class="post-metadata">

**Author:** ![aszaboa](https://yyz2.discourse-cdn.com/flex030/user_avatar/community.freefem.org/aszaboa/32/2918_2.png) [@aszaboa](https://community.freefem.org/u/aszaboa)\
**Post date:** [May 4, 2024, 3:24pm UTC](https://community.freefem.org/t/freefem-installation-on-a-cluster/3210/7 "2024-05-04T15:24:32Z")

</div>

These are the `ldd` outputs for the real and complex petsc.so files without the `export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:/home/c_mvgsa/c_mvgopt03/FreeFem/petsc/arch-FreeFem/lib` command. It shows that the complex one references to the real PETSc, while the real one has missing references.  
[ldd-petsc-complex.log](https://community.freefem.org/uploads/short-url/b0c2qSCfITpqaYW7YO8DaePfBcX.log) (5.5 KB)  
[ldd-petsc.log](https://community.freefem.org/uploads/short-url/yNnJ76ygpNkaBxWGSrPtUoiakU1.log) (3.9 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:** [May 4, 2024, 5:41pm UTC](https://community.freefem.org/t/freefem-installation-on-a-cluster/3210/8 "2024-05-04T17:41:45Z")

</div>

You’ll need to share PETSc `configure.log` for the real and complex builds, as well as FreeFEM `config.log`.

---

<div class="post-metadata">

**Author:** ![aszaboa](https://yyz2.discourse-cdn.com/flex030/user_avatar/community.freefem.org/aszaboa/32/2918_2.png) [@aszaboa](https://community.freefem.org/u/aszaboa)\
**Post date:** [May 5, 2024, 3:23pm UTC](https://community.freefem.org/t/freefem-installation-on-a-cluster/3210/9 "2024-05-05T15:23:10Z")

</div>

Here are the config files, thanks for taking a look into them.  
[configure\_PETSc.log](https://community.freefem.org/uploads/short-url/c6l185PF5JI6gKkKiMjO9Mh2AHa.log) (6.4 MB)  
[configure\_PETSc\_complex.log](https://community.freefem.org/uploads/short-url/mHa5IPtykzXDsgnPXXn3TZlD4xN.log) (1.3 MB)  
[config\_FreeFem.log](https://community.freefem.org/uploads/short-url/lbi80nXeQMJsOawCEb6222HWJpJ.log) (367.3 KB)

---

<div class="post-metadata">

**Author:** ![aszaboa](https://yyz2.discourse-cdn.com/flex030/user_avatar/community.freefem.org/aszaboa/32/2918_2.png) [@aszaboa](https://community.freefem.org/u/aszaboa)\
**Post date:** [May 6, 2024, 10:15am UTC](https://community.freefem.org/t/freefem-installation-on-a-cluster/3210/10 "2024-05-06T10:15:28Z")

</div>

In the meantime, I managed to compile my own version of FreeFEM on the HPC cluster, and it seems to work. However, I would be interested in learning what was the issue.

---

<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:** [May 6, 2024, 2:57pm UTC](https://community.freefem.org/t/freefem-installation-on-a-cluster/3210/11 "2024-05-06T14:57:08Z")

</div>

Could you please try with the latest PETSc version? This may be the issue with the previous installation.
