cs 4.1.1 and kubuntu

All questions about installation
Forum rules
Please read the forum usage recommendations before posting.
Post Reply
filip2109
Posts: 12
Joined: Thu Nov 26, 2015 11:35 am

cs 4.1.1 and kubuntu

Post by filip2109 »

Hello everyone,

I'm sorry to bother you but I'm having some problems with the ubuntu package for cs_4.1.1 and I cannot seem to find the same error elsewhere in the forum.
I'm trying to replicate case6 tutorial to check if both cs and syrthes are correctly working on this installation.

The installation is a fresh kubuntu 15.10 on a virtual machine (I'm trying to determine the easiest way to get everything working before proceeding with a physical installation). It has the default packages, cs_4.1.1, syrthes and salome_meca (2015.2), and all the default packages that apt-get downloaded with these packages.

When I try to create the folder (step3 of the step by step guide) I get this error:

Code: Select all

$ code_saturne create -s 3disks2D -c fluid --syrthes solid
code-saturne 4.1 study/case generation
  o Creating study '3disks2D'...
  o Creating case  'fluid'...
Traceback (most recent call last):
  File "/usr/bin/code_saturne", line 76, in <module>
    retcode = cs.execute()
  File "/usr/lib/python2.7/dist-packages/code-saturne/cs_script.py", line 88, in execute
    return self.commands[command](options)
  File "/usr/lib/python2.7/dist-packages/code-saturne/cs_script.py", line 138, in create
    return cs_create.main(options, self.package)
  File "/usr/lib/python2.7/dist-packages/code-saturne/cs_create.py", line 651, in main
    study.create()
  File "/usr/lib/python2.7/dist-packages/code-saturne/cs_create.py", line 244, in create
    self.create_case(c)
  File "/usr/lib/python2.7/dist-packages/code-saturne/cs_create.py", line 575, in create_case
    casename = casename)
  File "/usr/lib/python2.7/dist-packages/code-saturne/cs_create.py", line 603, in build_batch_file
    case_name=casename)
  File "/usr/lib/python2.7/dist-packages/code-saturne/cs_runcase.py", line 77, in __init__
    self.get_run_command()
  File "/usr/lib/python2.7/dist-packages/code-saturne/cs_runcase.py", line 144, in get_run_command
    raise ValueError(err_str)
ValueError: Error: unable to determine the name of the script for /home/fil/cases/3disks2D/fluid/SCRIPTS/runcase
Also, when I try to start the gui i get the a similar error:

Code: Select all

$ code_saturne gui
Traceback (most recent call last):
  File "/usr/bin/code_saturne", line 76, in <module>
    retcode = cs.execute()
  File "/usr/lib/python2.7/dist-packages/code-saturne/cs_script.py", line 88, in execute
    return self.commands[command](options)
  File "/usr/lib/python2.7/dist-packages/code-saturne/cs_script.py", line 142, in gui
    return cs_gui.main(options, self.package)
  File "/usr/lib/python2.7/dist-packages/code-saturne/cs_gui.py", line 144, in main
    sys.path.insert(1, pkg.get_dir('cspythondir'))
  File "/usr/lib/python2.7/dist-packages/code-saturne/cs_package.py", line 108, in get_dir
    return self.dirs[installdir][1]
KeyError: 'cspythondir'
I think both errors have the same source but unfortunately my understanding of it is quite limited.
Would a manual installation from sources be a better option?

Thank you very much in advance for any help,
Kind Regards

Filip
filip2109
Posts: 12
Joined: Thu Nov 26, 2015 11:35 am

Re: cs 4.1.1 and kubuntu

Post by filip2109 »

Hello all,
I don't know if it helps, I just finished creating a new virtual machine with normal Ubuntu 15.10, only installed the code-saturne package (4.1.1) and its requirements, and it is showing the same issue.

Thank you very much in advance for any help,
Kind regards

Filip
Yvan Fournier
Posts: 4077
Joined: Mon Feb 20, 2012 3:25 pm

Re: cs 4.1.1 and kubuntu

Post by Yvan Fournier »

Hello,

I just reproduced the 2nd issue on a Debian virtual machine.

The bug is due to Debian (and downstream, Ubuntu) renaming the "code_saturne" package to "code-saturne", which breaks some tests. A quick fix would be to edit (as root/sudoer) the "self.name = code-saturne " to "self.name = code_saturne" (underscore instead of hyphen, line 45 (or close to 45) of file /usr/lib/python2.7/dist-packages/code-saturne/cs_package.py.

This should work, though any update/reinstall of the package willl break it again.

I have just submitted the issue to the Debian packager for Code_Saturne, with a suggested fix.

A non-packaged (manually installed) version of the code should not exhibit this bug.

I am not 100% sure the first bug you mention is related to the second one, but it is highly probable.

Bet regards,

Yvan
bajsi
Posts: 15
Joined: Wed Jul 18, 2012 12:51 pm

Re: cs 4.1.1 and kubuntu

Post by bajsi »

Hello,

I have a similar problem (running on Ubuntu 15.10).
I made a correction to cs_package.py ("self.name = code-saturne " to "self.name = code_saturne").
But now when I run SaturneGUI i get:

Code: Select all

Traceback (most recent call last):
  File "/usr/bin/code_saturne", line 76, in <module>
    retcode = cs.execute()
  File "/usr/lib/python2.7/dist-packages/code-saturne/cs_script.py", line 88, in execute
    return self.commands[command](options)
  File "/usr/lib/python2.7/dist-packages/code-saturne/cs_script.py", line 142, in gui
    return cs_gui.main(options, self.package)
  File "/usr/lib/python2.7/dist-packages/code-saturne/cs_gui.py", line 194, in main
    from code_saturne.Base.MainView import MainView
ImportError: No module named code_saturne.Base.MainView
Yvan Fournier
Posts: 4077
Joined: Mon Feb 20, 2012 3:25 pm

Re: cs 4.1.1 and kubuntu

Post by Yvan Fournier »

Hello,

You are right, the rename changes /usr/lib/python2.7/dist-packages/code_saturne to /usr/lib/python2.7/dist-packages/code-saturne. I tried renaming this after installation, but it seems not to be enough.

At this stage, waiting for a fix from Debian and Ubuntu is probably best (it should probably not take too long).

Installing the code yourself is less practical, but a sure solution also (and you can choose which versions you install).

Regards,

Yvan
filip2109
Posts: 12
Joined: Thu Nov 26, 2015 11:35 am

Re: cs 4.1.1 and kubuntu

Post by filip2109 »

Hello,

thank you for looking into it. I'll try the manual setup meanwhile.
Thank you very much again

Kind regards

Filip
Pisolino
Posts: 86
Joined: Thu Apr 26, 2012 1:55 pm

Re: cs 4.1.1 and kubuntu

Post by Pisolino »

I have this problem too, please every one that encountered this error report the bug here to increase its priority in resolution

https://bugs.launchpad.net/ubuntu/+sour ... ug/1528025

Thanks

Andrea
Andrea
CEO and R&D manager @ ARGO srl

mail: info@argosrl.eu
site: www.argosrl.eu
Yvan Fournier
Posts: 4077
Joined: Mon Feb 20, 2012 3:25 pm

Re: cs 4.1.1 and kubuntu

Post by Yvan Fournier »

Hello,

I have not re-tested recently, but this specific isue was reported to the Debian package maintainer a few months ago (in the fall), and fixed (at least in Debian testing) within a few days.

It seems that testing has moved to 4.2 recently (which is a good thing, though we should hurry to release 4.2.1, with a few bug fixes).

Regards,

Yvan
Post Reply