Issues installation CS_2.1.1 with Salome 6.4

All questions about installation
Forum rules
Please read the forum usage recommendations before posting.
Damien Charreron

Re: Issues installation CS_2.1.1 with Salome 6.4

Post by Damien Charreron »

Hello, 
I have still the same problem when I run a case, yes. 
To be honest, I don't really know if I am using a batch system, I think yes. I have set the last Ubuntu on a virtual machine. Also, I am not quite sure to know the right command to do what you write me above. Should I run code saturne from my study case?
Thank you both,
 
Best regards,
 
Damien
Jacques Fontaine

Re: Issues installation CS_2.1.1 with Salome 6.4

Post by Jacques Fontaine »

Hello, You probably do not use a batch system (batch systems are usually used on clusters or supercomputers). Yvan suspects a problem with your Python install/version. So, could you check your Python version (python --version)? And could you attach the new config.log? Yes, you can run Code_Saturne from your study case (code_saturne run / code_saturne run --help for more options or SCRIPT/runcase or in the GUI). To be sure that there is no error in your study, you can follow the step by step tutotials distributed with the source code (if the latex guides are compiled run the command: code_saturne info -g tutorial; if not, you can download the documentation on the website: http://research.edf.com/research-and-the-scientific-community/software/code-saturne/download-code-saturne-80059.html).
Best regards,
JF
Damien Charreron

Re: Issues installation CS_2.1.1 with Salome 6.4

Post by Damien Charreron »

Well my python version is the 2.6, but I am not sure that I am using the one of Salome because I wasn't able to set it during the installation (problem such as version of python 2.6 >= "2.4" error: too old). S I attached you my config.log.
Also, I tried with the case from the code_saturne examples. After running code_saturne run, I got this:
 
damien@ubuntu:~$ code_saturne run --case=/home/damien/etudetest
Traceback (most recent call last):
  File "/home/damien/CodeSaturne/code_saturne-2.1.1/code_saturne-2.1.1/bin/code_saturne", line 49, in <module>
    retcode = cs.execute()
  File "/home/damien/CodeSaturne/code_saturne-2.1.1/code_saturne-2.1.1/lib/python2.6/site-packages/code_saturne/cs_script.py", line 62, in execute
    return self.commands[command](options)
  File "/home/damien/CodeSaturne/code_saturne-2.1.1/code_saturne-2.1.1/lib/python2.6/site-packages/code_saturne/cs_script.py", line 114, in run
    return cs_run.main(options, self.package)
  File "/home/damien/CodeSaturne/code_saturne-2.1.1/code_saturne-2.1.1/lib/python2.6/site-packages/code_saturne/cs_run.py", line 191, in main
    save_results=save_results)
  File "/home/damien/CodeSaturne/code_saturne-2.1.1/code_saturne-2.1.1/lib/python2.6/site-packages/code_saturne/cs_case.py", line 1718, in run
    mpi_environment)
  File "/home/damien/CodeSaturne/code_saturne-2.1.1/code_saturne-2.1.1/lib/python2.6/site-packages/code_saturne/cs_case.py", line 1244, in prepare_data
    self.set_result_dir(self.run_id)
  File "/home/damien/CodeSaturne/code_saturne-2.1.1/code_saturne-2.1.1/lib/python2.6/site-packages/code_saturne/cs_case.py", line 471, in set_result_dir
    if not os.path.isdir(self.result_dir):
  File "/home/damien/salome/Python-2.6.6/lib/python2.6/genericpath.py", line 41, in isdir
    st = os.stat(s)
TypeError: coercing to Unicode: need string or buffer, NoneType found
Attachments
config.txt
(220.76 KiB) Downloaded 193 times
Yvan Fournier

Re: Issues installation CS_2.1.1 with Salome 6.4

Post by Yvan Fournier »

Hello,
If you have a case directory inside your etudetest directory, try running:
code_saturne run --case=/home/damien/etudetest/<case> --param test.xml
instead of
code_saturne run --case=/home/damien/etudetest
This depends on whether you created the case with the --study or --case option, but is again related to providing the correct directory structure for Code_Saturne
Or better, simply "cd" inside your case's DATA or SCRIPTS directory, and run:
code_saturne run --param test.xml
In any case, if you have an xml file, you must indicate is using the --param or -p option when using "code_saturne run"
Best regards,
  Yvan
Damien Charreron

Re: Issues installation CS_2.1.1 with Salome 6.4

Post by Damien Charreron »

WOWW!!! Thank you, It's working well, you rock!
It took me so much time to understand everything!
Now I have my new game for 2012!
Merci encore!
Damien Charreron

Re: Issues installation CS_2.1.1 with Salome 6.4

Post by Damien Charreron »

Hello,
 
I am triying installing the last version of cs. However I have met a problem I didn't see before:
/usr/bin/ld: cannot find -lz
collect2: ld returned 1 exit status
I tried running this: ln -s /etc/ld.so.conf /usr/bin/  and then ldconfig but it didn't solve the pb
I have attached my installation.log. 
Attachments
install_saturne.log
(151.57 KiB) Downloaded 191 times
Yvan Fournier

Re: Issues installation CS_2.1.1 with Salome 6.4

Post by Yvan Fournier »

Hello,
It is strange that you encounter this issue, as a minor change was made so that the path oder in the link would be more logical (especially to avoid link issues with static builds, which need a stricter order).
Check that "libz" (or Zlib) is installed on your system, also with the "-devel" part of the package. If you have a mix of 32 and 64 bit packages, also check that the version you have is the correct one. In this case, the problem might be due to using prerequisites from SALOME, so you may either try to source the SALOME prerequisites environment file (salome.sh or "prerequis.sh" from the SALOME tree).
To have a build with CFDSTUDY, add --with-salome-<path to SALOME kernel> (though this is not related to this issue, as the SALOME prerequisites are sourced only for the SALOME packages, not the rest of the code).
Best regards,
  Yvan
Torben Andersen

Re: Issues installation CS_2.1.1 with Salome 6.4

Post by Torben Andersen »

This is how I got around installing code_saturne 2.1.4 with Salomé 6.4 (even if there may be more straight or elegant ways ...) on Linux Mint 9 (Ubuntu 10.04 Lucid Lynx based). Commands are in bold and may be copy-pasted to a shell command line for convenience. Doing so requires that your install paths are like mine and that you have write acces to these locations (su root if required):

1. Install Salome 6.40 (in /opt/Salome-V6_4_0-LGPL-i686)
2. Search and remove *.la files in the Salomé tree:  find /opt/Salome-V6_4_0-LGPL-i686 -name \*.la -exec rm {} \;
3. Install code_saturne using the install_saturne.py script and these settings in the setup file:

Code: Select all

download  Yes
# ....
prefix    /opt/saturne
# ....
cgns    None    yes  yes
hdf5    /opt/Salome-V6_4_0-LGPL-i686/prerequisites/Hdf5_184    auto  no
med    /opt/Salome-V6_4_0-LGPL-i686/tools/Medfichier_304    auto  no
mpi    None    auto  no
libxml2    None    auto  no
4. Test the saturne installation and the saturne gui. If it works modify to enable Salome integration:

5. Change working directory to code_saturne build root: cd /opt/saturne/installer/code_saturne-2.1.4.
6. Reconfigure code_saturne-2.1.4: ./configure --prefix=/opt/saturne/code_saturne-2.1.4 --with-cgns=/opt/saturne/cgnslib-2.5.5 --with-hdf5=/opt/Salome-V6_4_0-LGPL-i686/prerequisites/Hdf5_184 --with-med=/opt/Salome-V6_4_0-LGPL-i686/tools/Medfichier_304 --with-salome=/opt/Salome-V6_4_0-LGPL-i686 --cache-file=/dev/null --srcdir=/opt/saturne/installer/code_saturne-2.1.4/
7. Compile and install: make install
8. IF errors in compiling/installing the Python scripts of the CFDSTUDY are reported, this command may finish what went wrong: for f in /opt/saturne/installer/code_saturne-2.1.4/salome/cfd_study/src/CFDSTUDYGUI/ui_CFDSTUDYGUI_QProcessDialog.py /opt/saturne/installer/code_saturne-2.1.4/salome/cfd_study/src/CFDSTUDYGUI/ui_CopyDialog.py /opt/saturne/installer/code_saturne-2.1.4/salome/cfd_study/src/CFDSTUDYGUI/ui_ECSConversionDialog.py /opt/saturne/installer/code_saturne-2.1.4/salome/cfd_study/src/CFDSTUDYGUI/ui_EnvSettingsDialog.py /opt/saturne/installer/code_saturne-2.1.4/salome/cfd_study/src/CFDSTUDYGUI/ui_GUIActivationDialog.py /opt/saturne/installer/code_saturne-2.1.4/salome/cfd_study/src/CFDSTUDYGUI/ui_InfoDialog.py /opt/saturne/installer/code_saturne-2.1.4/salome/cfd_study/src/CFDSTUDYGUI/ui_RunCaseDialog.py /opt/saturne/installer/code_saturne-2.1.4/salome/cfd_study/src/CFDSTUDYGUI/ui_SetTreeLocationDialog.py ; do /usr/bin/install -c $f /opt/saturne/code_saturne-2.1.4/lib/python2.6/site-packages/salome/`basename $f` ; done ;
The special steps are 5, 6 and 7 I found no other way to enable my Salomé installation. Even with the environment parameter $ROOT_SALOME correctly set and exported.
My .bashrc was modified to include these lines:

Code: Select all

# set variables for Code_Saturne and Code_Aster #============================================================================
  CSPATH=/opt/saturne/code_saturne-2.1.4/bin
  CAPATH=/opt/aster/outils   ROOT_SALOME=/opt/Salome-V6_4_0-LGPL-i686
  HDF5HOME=${ROOT_SALOME}/prerequisites/Hdf5_184
  LD_LIBRARY_PATH=${HDF5HOME}/lib:${LD_LIBRARY_PATH}
  MED2HOME=${ROOT_SALOME}/tools/Medfichier_304
  LD_LIBRARY_PATH=${MED2HOME}/lib:${LD_LIBRARY_PATH}
  export LD_LIBRARY_PATH
#============================================================================
if [ -z `which code_saturne` ]
then
  export PATH=$PATH:$CSPATH
fi

if [ -z `which astk` ]
then
  export PATH=$PATH:$CAPATH
fi

The if's are necessary here in .bashrc to avoid the $PATH being extended on every new shell.
Post Reply