CS 2.0rc2 MEI compiling warning -> no user law in fluid prop
Forum rules
Please read the forum usage recommendations before posting.
Please read the forum usage recommendations before posting.
Re: CS 2.0rc2 MEI compiling warning -> no user law in fluid
Hello,
No, he meant the file name "code_saturne" (main script), which is installed in <install_prefix>/bin
This main script is used to launch the GUI, so the MEI import must be solved at this level.
Regards,
Yvan
No, he meant the file name "code_saturne" (main script), which is installed in <install_prefix>/bin
This main script is used to launch the GUI, so the MEI import must be solved at this level.
Regards,
Yvan
Re: CS 2.0rc2 MEI compiling warning -> no user law in fluid
Hi Yvan,
I have found the script and changed the path. I tried both /usr/local/lib/ and /usr/local/lib64/.
Is this correct?
After a restart the same problem: Code Saturne disabled the option "user law" in the "fluid properties" menu in the GUI and it is not possible to select it.
Thanks and regards,
Peter
I have found the script and changed the path. I tried both /usr/local/lib/ and /usr/local/lib64/.
Code: Select all
#-------------------------------------------------------------------------------
import os
import sys
# Trick so that one doesn't have to set the PYTHONPATH variable
cspath = '/usr/local/lib/python2.6/site-packages/ncs'
# Similar trick for the MEI library
# (consistent with autoconf/automake behavior for MEI)
try:
from distutils import sysconfig
meipath = os.path.join(sysconfig.get_python_lib(0, 0, prefix=' /usr/local/lib64/python2.6/site-packages/mei '),
'mei')
except Exception:
meipath = ''
for p in [meipath, cspath]:
if os.path.isdir(p) and not p in sys.path:
sys.path.insert(0, p)
#-------------------------------------------------------------------------------
After a restart the same problem: Code Saturne disabled the option "user law" in the "fluid properties" menu in the GUI and it is not possible to select it.
Thanks and regards,
Peter
Re: CS 2.0rc2 MEI compiling warning -> no user law in fluid
Hello Peter,
You're almost there, but I noticed a small error:
Replace:
With:
As os.path.join already appends 'mei' to the path (I do not known whether lib64 or lib is the correct path in your installation, I'll let you check that).
Once the path is correct and the script can import MEI, the GUI should enable user laws.
Best regards,
Yvan
You're almost there, but I noticed a small error:
Replace:
Code: Select all
os.path.join(sysconfig.get_python_lib(0, 0, prefix=' /usr/local/lib64/python2.6/site-packages/mei '),
'mei')
Code: Select all
os.path.join(sysconfig.get_python_lib(0, 0, prefix=' /usr/local/lib64/python2.6/site-packages '),
'mei')
Once the path is correct and the script can import MEI, the GUI should enable user laws.
Best regards,
Yvan
Re: CS 2.0rc2 MEI compiling warning -> no user law in fluid
Hello guys,
thanks for the informations, the probelm is solved.
The problem was:
the files mei.py mei.pyc mei.pyo are in /usr/local/lib/python2.6/site-packages/mei/ and the files _mei.a _mei.la _mei.so _mei.so.0 are in /usr/local/lib64/python2.6/site-packages/mei/
I linked the 4 files (_mei.a _mei.la _mei.so _mei.so.0) to /usr/local/lib/python2.6/site-packages/mei/ and now it works.
I don't know but is this correct that the mei-files are in different diretories?
Thanks and regards,
Peter
thanks for the informations, the probelm is solved.
The problem was:
the files mei.py mei.pyc mei.pyo are in /usr/local/lib/python2.6/site-packages/mei/ and the files _mei.a _mei.la _mei.so _mei.so.0 are in /usr/local/lib64/python2.6/site-packages/mei/
I linked the 4 files (_mei.a _mei.la _mei.so _mei.so.0) to /usr/local/lib/python2.6/site-packages/mei/ and now it works.
I don't know but is this correct that the mei-files are in different diretories?
Thanks and regards,
Peter
Re: CS 2.0rc2 MEI compiling warning -> no user law in fluid
Hello,
One or two users have encountered a similar issue before you, but unfortunately, we have not reproduced this issue on our machines, so it is difficult to find and test a solution (it probably depends on how default 32/64 bit directories are set up, and thus on your Linux distribution).
It seem related to an inconsistency in the paths the GNU autotools choose to install Python and library files (I just checked mei-1.0.2/swig/Makefile.am and found no fancy path handling in there, so that part is probably internal to automake, so finding a correction for the next patch release may not be easy, though we'll check on the web if there are known solutions to this issue).
Best regards,
Yvan
One or two users have encountered a similar issue before you, but unfortunately, we have not reproduced this issue on our machines, so it is difficult to find and test a solution (it probably depends on how default 32/64 bit directories are set up, and thus on your Linux distribution).
It seem related to an inconsistency in the paths the GNU autotools choose to install Python and library files (I just checked mei-1.0.2/swig/Makefile.am and found no fancy path handling in there, so that part is probably internal to automake, so finding a correction for the next patch release may not be easy, though we'll check on the web if there are known solutions to this issue).
Best regards,
Yvan
Re: CS 2.0rc2 MEI compiling warning -> no user law in fluid
Hi everyone,
I have installed recently Saturne on a Fedora - 64 bit platform.
While doing the tutorials, I realised that I have the problem mentionned in this post : no user law available in the fluid properties panel.
So I tried to follow what was written before...but, I don't want to make mistakes.
So, first, to give you information :
if I launch python, I have this:
but if I do :
I don't have any /lib/python2.6 directory
neither /lib/python2.7
I have no mei directory in /usr/local/lib/python2.7/site-packages
and no /usr/local/lib/python2.6 directory ..
the _mei.so is located here :
/home/leroy/software/saturne/cs-203/lib64/python2.6/site-packages/mei/_mei.so
/home/leroy/software/saturne/cs-203/lib64/python2.6/site-packages/mei/_mei.so.0
/home/leroy/software/saturne/cs-203/lib64/python2.6/site-packages/mei/_mei.so.0.0.0
when installing the code, for the ncs module, I had to give the path : --with-python_exec=/usr/bin and in /usr/bin, there's only python2.6, no python2.7
As I don't want to complicate and add any mistake, I prefer asking you what you think of this and what I should do.
Thank you very much
Christine
I have installed recently Saturne on a Fedora - 64 bit platform.
While doing the tutorials, I realised that I have the problem mentionned in this post : no user law available in the fluid properties panel.
So I tried to follow what was written before...but, I don't want to make mistakes.
So, first, to give you information :
if I launch python, I have this:
[root@mediceo6NB site-packages]# python Python 2.7.2 (default, Nov 10 2011, 17:15:20)
but if I do :
so it seems that I have 2 version of python in my pc...[root@mediceo6NB site-packages]# yum install python
Loaded plugins: presto, refresh-packagekit
Setting up Install Process
Package python-2.6.2-8.fc12.x86_64 already installed and latest version
Nothing to do
I don't have any /lib/python2.6 directory
neither /lib/python2.7
I have no mei directory in /usr/local/lib/python2.7/site-packages
and no /usr/local/lib/python2.6 directory ..
the _mei.so is located here :
/home/leroy/software/saturne/cs-203/lib64/python2.6/site-packages/mei/_mei.so
/home/leroy/software/saturne/cs-203/lib64/python2.6/site-packages/mei/_mei.so.0
/home/leroy/software/saturne/cs-203/lib64/python2.6/site-packages/mei/_mei.so.0.0.0
when installing the code, for the ncs module, I had to give the path : --with-python_exec=/usr/bin and in /usr/bin, there's only python2.6, no python2.7
As I don't want to complicate and add any mistake, I prefer asking you what you think of this and what I should do.
Thank you very much
Christine
Re: CS 2.0rc2 MEI compiling warning -> no user law in fluid
hi !!
I give more information about my problem, that maybe could help in finding solution (previous post) :
I have launched Python 2.6 instead of 2.7 that runs by default and I tried to do what I read before in these posts :
In lib/python2.6/site-packages/mei
I have mei.py, mei.pyc and mei.pyo
and in lib64/python2.6/site-packages/mei
I have mei.a, mei.la, _mei.so, _mei.so.0 and _mei.so.0.0.0
do I have to change
sys.path.insert(0, '/home/leroy/software/saturne/cs-203/lib64/python2.6/site-packages/mei')
in
sys.path.insert(0, '/home/leroy/software/saturne/cs-203/lib/python2.6/site-packages/mei') ?
Thank you for any advice.
Christine
Previously Christine Leroy wrote:
I give more information about my problem, that maybe could help in finding solution (previous post) :
I have launched Python 2.6 instead of 2.7 that runs by default and I tried to do what I read before in these posts :
[root@mediceo6NB bin]# python2.6
Python 2.6.2 (r262:71600, Jun 4 2010, 18:28:58)
[GCC 4.4.3 20100127 (Red Hat 4.4.3-4)] on linux2
Type "help", "copyright", "credits" or "license" for more information.
>>> import sys
>>> sys.path.insert(0, '/home/leroy/software/saturne/cs-203/lib64/python2.6/site-packages/mei') >>> import mei
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
ImportError: No module named mei
>>>
In lib/python2.6/site-packages/mei
I have mei.py, mei.pyc and mei.pyo
and in lib64/python2.6/site-packages/mei
I have mei.a, mei.la, _mei.so, _mei.so.0 and _mei.so.0.0.0
do I have to change
sys.path.insert(0, '/home/leroy/software/saturne/cs-203/lib64/python2.6/site-packages/mei')
in
sys.path.insert(0, '/home/leroy/software/saturne/cs-203/lib/python2.6/site-packages/mei') ?
Thank you for any advice.
Christine
Previously Christine Leroy wrote:
Hi everyone,
I have installed recently Saturne on a Fedora - 64 bit platform.
While doing the tutorials, I realised that I have the problem mentionned in this post : no user law available in the fluid properties panel.
So I tried to follow what was written before...but, I don't want to make mistakes.
So, first, to give you information :
if I launch python, I have this:[root@mediceo6NB site-packages]# python
Python 2.7.2 (default, Nov 10 2011, 17:15:20)
but if I do :
[root@mediceo6NB site-packages]# yum install python
Loaded plugins: presto, refresh-packagekit
Setting up Install Process
Package python-2.6.2-8.fc12.x86_64 already installed and latest version
Nothing to do
so it seems that I have 2 version of python in my pc...
I don't have any /lib/python2.6 directory
neither /lib/python2.7
I have no mei directory in /usr/local/lib/python2.7/site-packages
and no /usr/local/lib/python2.6 directory ..
the _mei.so is located here :
/home/leroy/software/saturne/cs-203/lib64/python2.6/site-packages/mei/_mei.so /home/leroy/software/saturne/cs-203/lib64/python2.6/site-packages/mei/_mei.so.0 /home/leroy/software/saturne/cs-203/lib64/python2.6/site-packages/mei/_mei.so.0.0.0
when installing the code, for the ncs module, I had to give the path : --with-python_exec=/usr/bin and in /usr/bin, there's only python2.6, no python2.7
As I don't want to complicate and add any mistake, I prefer asking you what you think of this and what I should do.
Thank you very much
Christine
Re: CS 2.0rc2 MEI compiling warning -> no user law in fluid
Hello,
The best solution is to add --with-python_exec=/usr/bin to the configure for the MEI library (same syntax as for NCS), and not change the configuration of NCS. This will ensure both extension libraries (GUI and MEI) use the same Python version.
If you simply reinstall MEI this way, things should work.
Best regards,
Yvan
The best solution is to add --with-python_exec=/usr/bin to the configure for the MEI library (same syntax as for NCS), and not change the configuration of NCS. This will ensure both extension libraries (GUI and MEI) use the same Python version.
If you simply reinstall MEI this way, things should work.
Best regards,
Yvan
Re: CS 2.0rc2 MEI compiling warning -> no user law in fluid
Hi Yvan,
thank you for the reply.
I should have thought of that...but instead, I did much more better and now...it's a disaster !!!
I thought: ok I have 2 versions of Python (in fact more than that) ...I cancel them and reinstall the last one...and Saturne again if needed...
Consequence of this great idea : I have no "yum" anymore ( python-dependent ?) and when I reinstalled Python, it semed to be ok since I could launch it...but it's not recognized...
Of course, for Saturne, it's now over :
[leroy@mediceo6NB ~]$ code_saturne
bash: /home/leroy/software/saturne/cs-2/bin/code_saturne: /usr/bin/python: bad interpreter: No such file or directory
and
[leroy@mediceo6NB ~]$ yum install python
bash: /usr/bin/yum: /usr/bin/python: bad interpreter: No such file or directory
Python is installed as can be seen here : 2 versions ????
[leroy@mediceo6NB ~]$ python Python 2.7.2 (default, Dec 15 2011, 18:21:15)
[GCC 4.4.4 20100630 (Red Hat 4.4.4-10)] on linux2
Type "help", "copyright", "credits" or "license" for more information.
[leroy@mediceo6NB ~]$ rpm -q python
python-2.6.2-8.fc12.x86_64
now I don't even know what is installed in my pc and what is not !!!
PS: I can't print anymore, can it be linked to all the mess I did???
any idea how I can deal with that even if, of course, it's not anymore a Saturne problem?
I'm trying to find a solution on the net, but not easy. I also put some post on the Fedora forum and pc-facile...but no answer so far...
Christine
thank you for the reply.
I should have thought of that...but instead, I did much more better and now...it's a disaster !!!
I thought: ok I have 2 versions of Python (in fact more than that) ...I cancel them and reinstall the last one...and Saturne again if needed...
Consequence of this great idea : I have no "yum" anymore ( python-dependent ?) and when I reinstalled Python, it semed to be ok since I could launch it...but it's not recognized...
Of course, for Saturne, it's now over :
[leroy@mediceo6NB ~]$ code_saturne
bash: /home/leroy/software/saturne/cs-2/bin/code_saturne: /usr/bin/python: bad interpreter: No such file or directory
and
[leroy@mediceo6NB ~]$ yum install python
bash: /usr/bin/yum: /usr/bin/python: bad interpreter: No such file or directory
Python is installed as can be seen here : 2 versions ????
[leroy@mediceo6NB ~]$ python Python 2.7.2 (default, Dec 15 2011, 18:21:15)
[GCC 4.4.4 20100630 (Red Hat 4.4.4-10)] on linux2
Type "help", "copyright", "credits" or "license" for more information.
[leroy@mediceo6NB ~]$ rpm -q python
python-2.6.2-8.fc12.x86_64
now I don't even know what is installed in my pc and what is not !!!
PS: I can't print anymore, can it be linked to all the mess I did???
any idea how I can deal with that even if, of course, it's not anymore a Saturne problem?
I'm trying to find a solution on the net, but not easy. I also put some post on the Fedora forum and pc-facile...but no answer so far...
Christine
Re: CS 2.0rc2 MEI compiling warning -> no user law in fluid
PS :
When I installed the last time Saturne, I already did that link with the prefix /usr/bin for python_exec when compiling MEI, but this time, I don't know how I can do it because python is not there anymore. I've installed the python2.7 but I don't know how I can do to localise its position, when I do "locate python2.7" there's no result.
When I installed the last time Saturne, I already did that link with the prefix /usr/bin for python_exec when compiling MEI, but this time, I don't know how I can do it because python is not there anymore. I've installed the python2.7 but I don't know how I can do to localise its position, when I do "locate python2.7" there's no result.