FreeFem installation on a cluster

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 (3.8 MB)

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

Thanks for the prompt reply. I attach the output.ldd_PETSc_complex.log (5.5 KB)

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.

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

	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.

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

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 (5.5 KB)
ldd-petsc.log (3.9 KB)

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

Here are the config files, thanks for taking a look into them.
configure_PETSc.log (6.4 MB)
configure_PETSc_complex.log (1.3 MB)
config_FreeFem.log (367.3 KB)

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.

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