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

Issues installation CS_2.1.1 with Salome 6.4

Post by Damien Charreron »

Hello,
I am trying to install Code Saturne 2.1.1 with Salome 6.4 on Ubuntu platform. I have problem doing it.
First of all, I tried doing it using the wizard whitch is the easiest way. Unfortunatly, the terminal reaches a problem opening the setup file. 
The setup file is attached bellow, I am not sure it comes from there.
As the wizard didn't worked out I tried the folowing command (I am new on Linux...): 
$ /home/damien/Code_Saturne/code_saturne-2.1.1/configure --with-hdf5=/home/damien/Salomebuild/hdf5-1.8.4 --with-med=/home/damien/Salomebuild/med-3.0.4 --with-libxml2=/home/damien/Salomebuild/libxml2-2.7.8 PYUIC4=/home/damien/Salomebuild/Python-2.6.6/bin/pyuic4 PYRCC4=/home/damien/Salomebuild/Python-2.6.6/bin/pyrcc4
I have now a problem of Python... The config file is also attached.
Thank you for helping me...
Attachments
setup.txt
(5.16 KiB) Downloaded 181 times
config-log.txt
(223.38 KiB) Downloaded 179 times
Yvan Fournier

Re: Issues installation CS_2.1.1 with Salome 6.4

Post by Yvan Fournier »

Hello,
It seems configure finished OK, so I assume that if you have an error, it occurs at a later stage, such as during "make" or "make install".
Could you post the file containing a log of the messages and of your error ?
Best regards,
  Yvan
Damien Charreron

Re: Issues installation CS_2.1.1 with Salome 6.4

Post by Damien Charreron »

ello, 
 
 
After many and many try, I finally came to something. But still, I have 3 main problems that I cannot solve. 
 
The first one is that everytime I install code Saturne with the wizard, the system doesn't reconize it when I start the virtual machine.
 
The second one is for launching Code Saturne with Salome, I have a problem of python path.
 
The  third one is appearing when I want to run a case:
 
/home/damien/test1/CASE1/SCRIPTS/runcase: line 690: [: too many arguments
Error running the partitioner.
Check partitioner log (listpart) for details.
 
Here is the lispart file:  /home/damien/test1/CASE1/SCRIPTS/runcase: line 706: /usr/bin/cs_partition: No such file or directory
 
Best regards and happy chrismas!
 
Damien
Yvan Fournier

Re: Issues installation CS_2.1.1 with Salome 6.4

Post by Yvan Fournier »

Hello,
Your problem with the partitioner sees to be due either:
to the presence of a Code_Saturne 2.0 install in default search paths (/usr or usr/local) to trying to run a case generated with Code_Saturne 2.0 with version 2.1. There have been many changes, and a case setup between the 2 versions is not compatible, and needs to be re-built.
Your problem with the code not being recognize when installed with the wizard/install script is probably due to the install path. With the script, your setup indicates you install to /home/damien/Code_Saturne/code_saturne-2.1.1, but as you added no --prefix=/home/damien/Code_Saturne/code_saturne-2.1.1 to the configure command in "manual" mode, the default install path is /usr/local.
When the code is installed under /usr/local, the the code_saturne script will be in /usr/local/bin, which is by default in your search path, but when installed under /home/damien/Code_Saturne/code_saturne-2.1.1, you need to either define:
export PATH=/home/damien/Code_Saturne/code_saturne-2.1.1/bin:$PATH
or:
alias code_saturne=/home/damien/Code_Saturne/code_saturne-2.1.1/bin/code_saturne
Your problem with the Python path when running with Salome is not very clear, but several issues are possible, as some builds of Salome include their own Python installation:
If you sourced the Salome environment prior to installing Code_Saturne (using env_producst.sh or salome.sh from the Salome install, or salome_prerequisites_V6_4_0.sh for the universal binaries type build), you will probably be using the Python interpreter from Salome, so you need to source the same environment before using Code_Saturne.
Even if this is not the case, as you used HDF5 and MED from Salome, if you used a relocatable install, you need to source the Salome environment, or some shared libraries will not be found. This is due to the Salome install being a relocatable install, requiring the definition of LD_LIBRARY_PATH for progams using its shared libraries to even start.
If you built Salome from sources, you should use the libraries from the installation directory, not the build directory, as libraries in the install directory also use wrappers and to source LD_LIBRARY_PATH.
Installation using prerequisites from Salome has been tested by other developers than myself, and has the advantage of not requiring an additional installation of Qt4, HDF5, MED, ..., but It has probably not been tested with the automatic installer, and can run into subtle issues such as those described above, the main thing being sourcing the Salome environment.
Best regards, and merry Christmas !
  Yvan
Damien Charreron

Re: Issues installation CS_2.1.1 with Salome 6.4

Post by Damien Charreron »

Hello,
 
Thank you for all your explaination, I understand better how everything is working.
I have some more questions. I have created a new virtual machine (you were right about the former version of the code). This time I have used only the wizard for the installation. The path of the installation is: /home/damien/CodeSaturne/code_saturne-2.1.1. The installation went well. 
 
But the first simulation ended to this: 
nohup: ignoring input and redirecting stderr to stdout
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 183, in main
    domains=d)
  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 144, in __init__
    d.set_case_dir(self.case_dir)
  File "/home/damien/CodeSaturne/code_saturne-2.1.1/code_saturne-2.1.1/lib/python2.6/site-packages/code_saturne/cs_case_domain.py", line 483, in set_case_dir
    version_str = version_str)
  File "/home/damien/CodeSaturne/code_saturne-2.1.1/code_saturne-2.1.1/lib/python2.6/site-packages/code_saturne/cs_xml_reader.py", line 124, in __init__
    raise XMLError('Error parsing XML file: ' + fileName)
cs_xml_reader.XMLError: Error parsing XML file: /DATA/test.xml
 
Also, I have still this problem of recognization when I start the virtual machine. I tried to change Path but it doens't seems to work. Moreover there is now a folder under "installer" whitch look pretty similar as the one choosed for the installation: /home/damien/CodeSaturne/installer/code_saturne-2.1.1/bin.
 Also I tried to source salome.sh but i's not working. Instead this appeared: 
Traceback (most recent call last):
  File "/home/damien/salome/sphinx-1.0.7/lib/python2.6/site-packages/site.py", line 73, in <module>
    __boot()
  File "/home/damien/salome/sphinx-1.0.7/lib/python2.6/site-packages/site.py", line 38, in __boot
    raise ImportError("Couldn't find the real 'site' module")
ImportError: Couldn't find the real 'site' module
 
I cannot define the errors but they look pretty similar to me. Thank you really much for the time you are giving me.
 
Best regards,
 
Damien
 
Jacques Fontaine

Re: Issues installation CS_2.1.1 with Salome 6.4

Post by Jacques Fontaine »

Hello,
Could you attach your .xml?
Best regards,
JF
Damien Charreron

Re: Issues installation CS_2.1.1 with Salome 6.4

Post by Damien Charreron »

Hello, 
Here it is!
Attachments
test.xml
(5.27 KiB) Downloaded 178 times
Damien Charreron

Re: Issues installation CS_2.1.1 with Salome 6.4

Post by Damien Charreron »

I solve my problem of recognization. I just needed to set the path to the good directory and to source salome....
Jacques Fontaine

Re: Issues installation CS_2.1.1 with Salome 6.4

Post by Jacques Fontaine »

If I understand well:
code_saturne is now recognized as command in your terminal (and if you write "type code_saturne" in terminal, you can see that Code_saturne is installed under /home/damien/Code_Saturne/code_saturne-2.1.1/bin/code_saturne). Could you tell me if the error "cs_xml_reader.XMLError: Error parsing XML file: /DATA/test.xml" is solved? concerning Salome, I don't know (maybe Yvan will be able to answer). A colleague have encountered the same problem and it is not solved yet. Which Ubuntu distribution are you using? By the way, the coupling Salome/Code_Saturne have been tested with the version 2.1.2 and not with the 2.1.1 version.
 
Best regards,
JF
Yvan Fournier

Re: Issues installation CS_2.1.1 with Salome 6.4

Post by Yvan Fournier »

Hello,
I have a possible explanation (and solution), but I am not sure it matches your installation (as you seem to be running on a virtual machine, it does not seem probable, but as it could explain things, here it is):
The code_saturne command which is run by the "runcase" script tries to detect from which directory it was run, and if this directory is a case directory or a subdirectory of a case, it assigns the correct paths (compared to the version 2.0 runcase, it makes a case movable relative to a given install).
If in your case you have done a post-install to run Code_Saturne on a system with a queuing system, you have batch parameters in the beginning of the runcase, and a "cd $<some_environment_variable>", with the variable environment being specific to each batch system type, and indicating the directory from which the case was submitted.
If you now try to run the code directly (without submitting it to batch), that variable will not be defined, so the "cd" will bring you to your root directory, and the paths are then false.
Code_Saturne does not test for the existence of the xml file, so the error "parsing" the file is actually due to an error finding the file.
Another solution to run directly is to comment the line in the runcase with "cd".
We will need to make things more robust (by simply testing for the existence of the variable before doing "cd"), but the solution is to submit the runcase through the batch system.
Now if you are not using a batch system, I do not reproduce the bug (the code starts, an fails on boundary conditions, but I may not have the matching mesh, so this does not worry me). In that case, I would suspect some problem with your Python install (such as missing packages, or using Python 3.x somewhere, for which the code is not quite ready yet).
Best regards,
  Yvan
Post Reply