Error with gui scripts / python

Questions and remarks about code_saturne usage
Forum rules
Please read the forum usage recommendations before posting.
Post Reply
Support TGCC
Posts: 3
Joined: Thu Apr 25, 2013 10:41 am

Error with gui scripts / python

Post by Support TGCC »

Hi,

I'm a member of the support applicative team of TGCC (http://www-hpc.cea.fr/fr/complexe/tgcc.htm). An user with its own installation have an issue with the command "code_saturne gui".

We have reproduce the issue with version 3.0.0. and a print debug report this :

$ code_saturne gui
set_modules
pkg : <cs_package.package instance at 0x2b596a4f3b90>
pkg.env_modules :
pkg.env_modulescmd :
cmd_prefix :
Traceback (most recent call last):
File "[..]/code_saturne", line 77, in <module>
retcode = cs.execute()
File "[..]/saturne-3.0.0/lib/python2.7/site-packages/code_saturne/cs_script.py", line 73, in execute
return self.commands[command](options)
File "[..]/saturne-3.0.0/lib/python2.7/site-packages/code_saturne/cs_script.py", line 117, in gui
return cs_gui.main(options, self.package)
File "[..]/saturne-3.0.0/lib/python2.7/site-packages/code_saturne/cs_gui.py", line 122, in main
set_modules(pkg)
File "[..]l/saturne-3.0.0/lib/python2.7/site-packages/code_saturne/cs_exec_environment.py", line 250, in set_modules
stdout=subprocess.PIPE).communicate()
File "[..]/lib/python2.7/subprocess.py", line 679, in __init__
errread, errwrite)
File "[..]/lib/python2.7/subprocess.py", line 1249, in _execute_child
raise child_exception
OSError: [Errno 13] Permission denied

How to fix it ?

Regards,

Jérôme Esbrat
Yvan Fournier
Posts: 4080
Joined: Mon Feb 20, 2012 3:25 pm

Re: Error with gui scripts / python

Post by Yvan Fournier »

Hello,

Do you know if environment modules were loaded when the code was configured ? Code_Saturne tries to determine which modules are loaded at "configure" time, so as to record the and load the same modules when running, but this assumes a Python environment module API. This works on most machines, but has been know to fail on Curie, where the environment module script seems to be an older, tcl or shell only version (if I remember correctly; at least this seemed to be the case a year ago).

So it may be better to configure adding the "--with-modules=no", then load the modules either through the user's environment, or through a shell script sourced using the rcfile setting in the codes <install_prefix>/etc/code_saturne.cfg in the post-install stage (this is the same file in which "batch = CCC" should be set for the TGCC or CCRT systems, so it should already be present).

Regards,

Yvan Fournier
Support TGCC
Posts: 3
Joined: Thu Apr 25, 2013 10:41 am

Re: Error with gui scripts / python

Post by Support TGCC »

Hello,

Add the option "--with-module=no" works perfectly without any other modification.
Thanks a lot for your help

Regards,

Jérôme Esbrat
Post Reply