Problem with libsaturne.so.0

Hi,
I have installed CS 2.0-rc1 on Ubuntu 9.10 manually following the procedure in http://code-saturne.blogspot.com/2010/03/installation-of-codesaturne-20-rc1-on.html .
Preprocessor runs fine but when I start calculations I get this message:
/home/norbert/tmp_Saturne/TJUNCTION.CAS.04261327/cs_solver: error while loading shared libraries: libsaturne.so.0: cannot open shared object file: No such file or directory Error running the calculation. Check Kernel log (listing) and error* files for details

What can be the reason for this?
Best regards
Norbert

Hello,
This is strange, as CS 2.0-rc1 runs fine on several Ubuntu 9.10 installs. It is possible that the install is incomplete, though I do not see why this would happen.
Could you post the compile.log file that should have appeared in your case’s RESU subdirectory, to see what the final link command looked like (especially relative to -rpath options). It would also be interesting to run “ldd” on the precompiled cs_solver (the one in the install directory’s bin subdirectory), and even run “./cs_solver --version” in that directory to see if the precompiled version is OK or not.
Best regards,
Yvan

Hi Yvan,
There is no compile.log in the RESU subdirectory. The only text files are summary.04261327 and listpre.(…). The second one doesn’t show any error. Summary file looks like this:

========================================================
    Start time       :  Mon Apr 26 13:27:21 CEST 2010
    ----------------------------------------------------
    Kernel          :  /usr/local
    Preprocessor    :  /usr/local/bin
    ------------------------------------------------
    HOMARD          :
    ------------------------------------------------
    CS_MPI_PATH     :  /usr/lib/openmpi/bin
    PATH            :  /opt/Code_Saturne/ncs-2.0.0-rc1/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games
    ------------------------------------------------
    User            :  norbert ========================================================
    Machine         :  Linux norbert-desktop 2.6.31-20-generic #58-Ubuntu SMP Fri Mar 12 04:38:19 UTC 2010 x86_64 GNU/Linux
    N Procs         :  1
    Processors      :  default ========================================================
    ----------------------------------------------------
    Case            :  CAS
      DATA          :  /home/norbert/TJUNCTION/CAS/DATA
      SRC           :  /home/norbert/TJUNCTION/CAS/SRC
      RESU          :  /home/norbert/TJUNCTION/CAS/RESU
    ----------------------------------------------------
    Exec. dir.      :  /home/norbert/tmp_Saturne/TJUNCTION.CAS.04261327
    ----------------------------------------------------
    Executable      :  cs_solver
    ----------------------------------------------------
    Preprocessing   :  yes
    Partitioning    :  no
    Calculation     :  failed
    ----------------------------------------------------
    Finish time      :  Mon Apr 26 13:27:21 CEST 2010
========================================================

PS Trying to run cs_solver gives the same: error while loading shared libraries: libsaturne.so.0…

Ldd on cs_solver gives:
linux-vdso.so.1 => (0x00007fffd77ff000)
libsaturne.so.0 => not found
libfvm.so.0 => /usr/local/lib/libfvm.so.0 (0x00007f776aa84000)
libhdf5-1.6.6.so.0 => /usr/lib/libhdf5-1.6.6.so.0 (0x00007f776a758000)
libfvm_coupl.so.0 => /usr/local/lib/libfvm_coupl.so.0 (0x00007f776a554000)
libmei.so.0 => not found
libbft.so.1 => /usr/local/lib/libbft.so.1 (0x00007f776a348000)
libz.so.1 => /lib/libz.so.1 (0x00007f776a131000)
libmpi.so.0 => /usr/lib/libmpi.so.0 (0x00007f7769e88000)
libibverbs.so.1 => /usr/lib/libibverbs.so.1 (0x00007f7769c7b000)
libpthread.so.0 => /lib/libpthread.so.0 (0x00007f7769a5f000)
libopen-rte.so.0 => /usr/lib/libopen-rte.so.0 (0x00007f7769817000)
libopen-pal.so.0 => /usr/lib/libopen-pal.so.0 (0x00007f77695a4000)
libnsl.so.1 => /lib/libnsl.so.1 (0x00007f776938a000)
libutil.so.1 => /lib/libutil.so.1 (0x00007f7769187000)
libxml2.so.2 => /usr/lib/libxml2.so.2 (0x00007f7768e37000)
libcblas.so.3gf => /usr/lib/libcblas.so.3gf (0x00007f7768c19000)
libatlas.so.3gf => /usr/lib/libatlas.so.3gf (0x00007f7768293000)
libgfortran.so.3 => /usr/lib/libgfortran.so.3 (0x00007f7767fa7000)
libm.so.6 => /lib/libm.so.6 (0x00007f7767d23000)
libdl.so.2 => /lib/libdl.so.2 (0x00007f7767b1f000)
libc.so.6 => /lib/libc.so.6 (0x00007f77677b0000)
/lib64/ld-linux-x86-64.so.2 (0x00007f776ad1e000)
libgcc_s.so.1 => /lib/libgcc_s.so.1 (0x00007f7767599000)

I have added “export PATH=/opt/Code_Saturne/ncs-2.0.0-rc1/bin:$PATH” line in the profile file.

Best regards,

Norbert

Hello,
It would seem that libsaturne.so.0 is not present in /usr/local/lib (you can always check), while “make install” should have put it there (unless something else failed). Can you try returning to the Code_Saturne kernel (ncs) build directory, and re-run “make install”, then check for libsaturne.so* in /usr/local/lib ? If it is still not there, run “make install > make.log 2>&1” and post the make.log here so that I can take a look at it.
You seem to have the same problem with libmei, so you should re-run “make && make install” in the libmei build tree first. A missing installation of MEI could explain your problem, though the ./configure stage of Code_Saturne should have failed (unless you ran “make uninstall” or did something similar between configure and make).

Best regards,
Yvan

Hi,
The think is libsaturne.so libraries are present in /usr/local/lib. They do not seem to be corrupted.
Best regards
Norbert

Hello,
Try:
export LD_LIBRARY_PATH=/usr/local/lib:$LD_LIBRARY_PATH
and then try re-running ./cs_solver
(/usr/local/lib should already be in the default library loader search path, but you may always check).
Also, in /usr/local/lib, you may compare: “file libsaturne.so.0” and “file libfvm.so.0” (if some files are symbolic links, try “file” in the file that is linked to, to get info on the file and see if anything is different).
Regards,
Yvan

Hi,
after adding “export LD_LIBRARY_PATH=/usr/local/lib:$LD_LIBRARY_PATH” ldd on cs_solver in /usr/local/bin shows libsaturne.so.0:
linux-vdso.so.1 => (0x00007fffc35ba000) libsaturne.so.0 => /usr/local/lib/libsaturne.so.0 (0x00007fc9cd364000) libfvm.so.0 => /usr/local/lib/libfvm.so.0 (0x00007fc9cd0c1000) (…)

Unfortunately when I run the calculations the problem appears again (home/norbert/tmp_Saturne/TJUNCTION.CAS.04261327/cs_solver: error while
loading shared libraries: libsaturne.so.0: cannot open shared object
file: No such file or directory Error running the calculation). After running cs_solver from the tmp_Saturne directory I get the following listing file:
CALCULATION PREPARATION
=======================

Reading file: preprocessor_output
@
@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
@
@ @@ WARNING: stop in data input
@ =======
@ The user subroutine ‘usipph’ must be completed
@ in file usini1.f90
@
@ The calculation will not be run.
@ @@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
@
Call stack:
1: 0x7f58fcff6be0 <usipph_+0x84> (libsaturne.so.0)
2: 0x7f58fcf323e2 <iniusi_+0x112> (libsaturne.so.0)
3: 0x7f58fcf31ea7 <initi1_+0x23> (libsaturne.so.0)
4: 0x7f58fcdcad3e <cs_run+0x9e> (libsaturne.so.0)
5: 0x7f58fcdcb7c5 <main+0x1f5> (libsaturne.so.0)
6: 0x7f58f936babd <__libc_start_main+0xfd> (libc.so.6)
7: 0x4007a9 ? (?)
End of stack

Thanks for the reply.

Regards

Norbert

Hello,
For some reason, it seems that the default library search path does not contain /usr/local/lib, or maybe you simply need to update the loader’s cache (having root run “ldconfig” might also solve the issue).
If the issue persists, exportin LD_LIBRARY_PATH before running the Code_Saturne script should help.
The error you obtain in the temporary execution directory is “normal”. Look at the contents of localexec to see the command line required, but you probably simply need to add the option --param <your_xml_file> the cs_solver to run normally.
Best regards,
Yvan

Hi again,
The problem has been solved by adding /usr/local/lib to /etc/ld.so.conf then runing ldconfig.
Thanks a lot Yvan for your time and help.
Best regards
Norbert

Hi Norbert, for the error about ‘usipph’ see: http://code-saturne.org/forum/viewtopic.php?f=9&t=802

Hello;
I have same problem but I doesn’t find solution.
/usr/local/bin/cs_preprocess: error while loading shared libraries: libbft.so.1: cannot open shared object file: No such file or directory
knowing that libbft.so.1 file is present in /usr/local/lib.
Regards.
Rezki.

when I re-ran “make install” for the the Code_Saturne kernel (ncs), I had this error

/usr/bin/ld: cannot find -lfvm_coupl
collect2: ld returned 1 exit status

make[3]: *** [cs_solver] Erreur 1
make[3]: quittant le répertoire « /home/rezki/saturne/ncs-2.0.0-rc1/src/apps »
make[2]: *** [all-recursive] Erreur 1
make[2]: quittant le répertoire « /home/rezki/saturne/ncs-2.0.0-rc1/src »
make[1]: *** [all-recursive] Erreur 1
make[1]: quittant le répertoire « /home/rezki/saturne/ncs-2.0.0-rc1 »
make: *** [all] Erreur 2

Regards

Rezki

Hello Rezki,

The solution to your problem is a couple of post before yours… here is an excerpt of Norbert’s post:

The problem has been solved by adding /usr/local/lib to /etc/ld.so.conf then runing ldconfig.

This should solve both of your issues. If that’s not the case, tell us. Another solution is also given a few post before (based on LD_LIBRARY_PATH).

David

Hello David,
I think that it works.
I want to install CFDSTUDY to coupled SALOME_5.1.3 with Saturne2.0-rc1, that is recommended for cavitation flows ?
Thank you very much.
Rezki

Hello Rezki,
Actually, you don’t need to have CFDSTUDY installed in order to develop a method for flows with cavitation. CFDSTUDY is only a plug-in to integrate Code_Saturne graphical interface within the SALOME platform.
Furthermore, this module can sometimes be difficult to install… We need to improve that point.
David

Thank you for this information David,
For this application, I am interested by the use of open source mesh generator, how you judge SALOME_5.1.3 ?
can you compare it with Start CCM+ which I can have license ?
Regards.
Rezki.

Hi Rezki,
It really depends on two factors: the geometry you want to mesh and your ability to use both tools. I think you will have to try by yourself, but keep in mind that you are trying to compare a free and open-source tool with a paying-licensed one… I’m not saying here that one is better than another!
You also need to know that Code_Saturne preprocessor can only read Star-CCM+ meshes if it is linked against the libccmio library (normally available on request via the CD-Adapco support, or maybe available on download on the ViSiT website).
If you go for the SALOME platform, be sure to read through their forum (see http://www.salome-platform.org) as we won’t be of much help on these topics.
David

Hi David,
OK, thank you very much for these informations.
For the moment I use SALOME and I try to create my geometry (Hydrofoil).
Thank you again.
Best regards.
Rezki

Hi everyone,

I am desintering that old post because I have a similar problem. I use code_saturne 2.0.2 that I have installed on Ubuntu 11 with the command apt-get. The installation seems fine. I have tested one case with the GUI and it works fine. But, when I launch a typical plasma case I have without GUI, which one I use usually to test the performance (so this case works fine on other machines), I get a similar error :

Reading file: preprocessor_output
@
@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
@
@ @@ WARNING: stop in data input
@ =======
@ The user subroutine ‘usipph’ must be completed
@ in file usini1.f90
@
@ The calculation will not be run.
@
@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
@

Call stack:
1: 0xe4c6f9 <cs_exit+0x99> (libsaturne.so.0)
2: 0xe4cead <csexit_+0x1d> (libsaturne.so.0)
3: 0x105a59e <usipph_+0x92> (libsaturne.so.0)
4: 0xf9c0c1 <iniusi_+0x119> (libsaturne.so.0)
5: 0xf9bc18 <initi1_+0x28> (libsaturne.so.0)
6: 0xe0ed83 <cs_run+0xa3> (libsaturne.so.0)
7: 0xe0ebfc <main+0x24c> (libsaturne.so.0)
8: 0xaa1113 <__libc_start_main+0xf3> (libc.so.6)
9: 0x80499c1 <> (cs_solver)
End of stack

I had a look at this post : https://code-saturne.info/products/code-saturne/forums/general-usage/915591566
but my usini1.f90 file is present, and i don’t have PARAM argument as I don’t use the GUI.

So, I tried the advice given below. I add “export LD_LIBRARY_PATH=/usr/local/lib:$LD_LIBRARY_PATH” to my .bashrc. The point is that my libsaturne.so.0 file is not present in /usr/local/lib but in /usr/lib. Anyway I created a symbolic link of this library in the /usr/local/lib folder, but it makes no different at the end, i got the same error message. I also tried to export directly /usr/lib.
I also added /usr/lib/ and /usr/local/lib/ to the /etc/ld.so.conf file and then run ldconfig with root permission, without success.

Any other idea?

Best Regards,

Alexandre

Hello,

This seems to be a packaging issue, and I was able to reproduce it, but not solve it.

Another user reported this problem as having dissapeared when switching to the Code_Saturne 2.1 package, so I would recommend either trying this, or using an unpackaged version of the code (version 2.0.5 or 2.2.1 depending if you prefer more validation or a more up-to-date version).

Best regards,

Yvan