I have an error when I try to compute Mesh processing or solver with CS 7.2, I use Ubuntu 22.04 via a Virtual machine
The Mesh is done with Salome 9.9 export in Med format.
I have the following message in the console:
/home/julien/code_saturne/7.2.0/code_saturne-7.2.0/arch/Linux_x86_64/libexec/code_saturne/cs_solver: error while loading shared libraries: libple.so.2: cannot open shared object file: No such file or directory
solver script exited with status 127.
Thank you for your answer.
It is a fresh installation. I use VMware machine on a Windows 10 OS. Host is Ubuntu 22.04.
Code Saturne is 7.2 and Salome version is 9.9.
Below is my config.log file from this code saturne 7.2 build folder
I have the same problem. CS-7.2.0 in Ubuntu 22.04 native, hdf5/med/medcoupling from SALOME installation.
Besides libple, CS claims medcoupling library not found either. Now I am using it by
I’m not sure why there is this behavior on Ubuntu. I have noticed over the years that Ubuntu seems to have specific low-level linker settings, which make everything more difficult (i.e. more users have issues on Ubuntu than on any other Linux distribution, as you can see if you search this Forum’s posts for Ubuntu).
One related factor may be that PLE was switched from using libtool to simpler Makefile rules in code_saturne 7.1, and this was done for the main part of code_saturne itself only after v7.2, and some “implicit” expectations may not work on Ubuntu.
Depending on the library used, some “rpath” settings were or were not given. This should be more systematic in code_saturne v7.3, and can probably further be improved/automated.
I’ll run tests at least for code_saturne v7.3 on Ubuntu in the future.
In the meantime, the suggested workaround is a good solution.
Could you be more precise niuniuaba?
I have to modify the bashrc file in adding a path towards what?
Sorry I am not an experienced user of Linux.
Could you write a clear example of what you mean? Thank you
In your $HOME directory (/home/julien) there is a shell script named ‘.bashrc’. Add a line
alias code_saturne='LD_LIBRARY_PATH=/home/julien/code_saturne/7.2.0/code_saturne-7.2.0/arch/Linux_x86_64/lib:$LD_LIBRARY_PATH /home/julien/code_saturne/7.2.0/code_saturne-7.2.0/arch/Linux_x86_64/bin/code_saturne'
to this file, logout and login again, then you can use code_saturne command as usual.
Run failed in calculation stage.
"
Here is the run solver log file.
How can I resolve that?
I don’t have install Scotch and Parametis because I have some errors
MPI should work on Ubuntu also. You need to make sure some MPI library is installed, then help the “configure” script either with the ‘–with-mpi’ option (to provide a path), or use “CC=mpixx CXX=mpicxx” (no need to change to use an MPI wrapper for Fortran, which does not directly call MPI).
On a relatively recent Debian system with OpenMPI packages installed, I need to add ‘–with-mpi=/usr/lib/x86_64-linux-gnu/openmpi’ for MPI to be detected. The path is probably similar on Ubuntu.
/cs_solver was built without MPI support,
so option “–mpi” may not be used.
solver script exited with status 1.
Error running the calculation.
Check run_solver.log and error* files for details.
Domain None (code_saturne):
run_solver.log, error*.
No, you didn’t. Otherwise you have uploaded a wrong config.log.
make
make install (in admin mode)
Don’t install as root. Not necessary because you install to your own home directory
(-- refix=/home/julien/code_saturne/7.2.0/code_saturne-7.2.0/arch/Linux_x86_64) nor a good idea because there may be some side effects when you launch as ordinary user.
configure:4952: error: in `/home/julien/Code_Saturne/code_saturne-7.2.0.build':
configure:4954: error: C compiler cannot create executables
See `config.log' for more details
With, a few lines earlier:
configure:4883: checking whether the C compiler works
configure:4905: /usr/bin/mpicc conftest.c >&5
/usr/bin/ld: cannot find -lmpi: No such file or directory
/usr/bin/ld: cannot find -lopen-rte: No such file or directory
/usr/bin/ld: cannot find -lopen-pal: No such file or directory
/usr/bin/ld: cannot find -lhwloc: No such file or directory
/usr/bin/ld: cannot find -levent_core: No such file or directory
/usr/bin/ld: cannot find -levent_pthreads: No such file or directory
So it seems your “/usr/bin/mpicc” wrapper is not working. You may want to reinstall the Ubuntu MPI wrappers / packages.
Otherwise, try compiling any simple “hello world” C program (MPI or not) with it, and if it fails, this might be an Ubuntu packaging bug…
Did you try Step1~Step3 in my previous post? It should work for Ubuntu 22.04. But from your latest config.log it seems you didn’t. Without Step1, you won’t have compiler wrappers (/usr/bin/mpicc and /usr/bin/mpicxx) and mpi header files; withou setting ‘–with-mpi=/usr/lib/x86_64-linux-gnu/openmpi’ in Step3 the mpi library and header files won’t be found.
As a “I have the same” comment, on Ubuntu I see the same problem. While not that big of a deal, if there was a general solution that fit into the install stage, it would be preferred; for now I just run “export LD_LIBRARY_PATH…” each time in a new shell, as I keep multiple versions on my machine, and anyway don’t like messing with bashrc unless necessary. With older code_saturne, it was never an issue.