Thursday, November 26, 2009

Installing Salome platfrom on Fedora (12 x86_64)

The salome platform is a good open source platform for FEA/CFD etc. It includes a good preprocessor to easily create geometries, mesh them in a variety of ways and also import/export various types of formats. I generally use it with OpenFOAM, which is a FVM library and collection of programs to solve various types of flows and also structures and other problems.
Check them out at http://www.salome-platform.org/ and http://www.openfoam.com/features/
So the main thing i'm writing this is as a reminder to me and to save hoursof other people's time who try installing salome-platform on any of the modern linux distros.

Step 1 > Download the package. If the package is not available for you distro choose debian or mandriva whichever is closer to your distro (both work in case of fedora)
Step 2 > Extract (tar -xvf filename) to a convenient location (your home or anywhere else doesn't matter. u can delete this later)
Step 3 > Change the file config_files/gcc-common.sh to match your installation of gcc. I replaced gcc_root="/usr/bin".
Step 4 > Run ./runInstall. Choose appropriate options in the gui and finish the wizard.
Step 5 > To run salome type:
$ . KERNEL_<version>/salome.sh
$ runSalome
Thats it
Step 6 > Now steps 1 to 5 are simple, anyone can do it without any help. Here comes the main point which took me hours despite me already having installed and used various versions of salome in previous fedora installations.
If you see an error message like

Configure parser: Warning : could not find user configuration file
runSalome running on localhost
Configure parser: Warning : could not find user configuration file
Searching for a free port for naming service: 2810 2811 2812 2813 2814 2815 2816 2817 2818 2819 2820 2821 - OK
Searching Naming Service ++++++++++Failed to narrow the root naming context
Traceback (most recent call last):
  File "/opt/salome_5.1.2/KERNEL_5.1.2/bin/salome/runSalome.py", line 648, in useSalome
    clt = startSalome(args, modules_list, modules_root_dir)
  File "/opt/salome_5.1.2/KERNEL_5.1.2/bin/salome/runSalome.py", line 429, in startSalome
    clt=orbmodule.client(args)
  File "/opt/salome_5.1.2/KERNEL_5.1.2/bin/salome/orbmodule.py", line 48, in __init__
    self.initNS(args or {})
  File "/opt/salome_5.1.2/KERNEL_5.1.2/bin/salome/orbmodule.py", line 81, in initNS
    sys.exit(1)
SystemExit: 1

on running salome then here's what you need to do.

1 > edit /etc/hosts (of course you need root for that) and make sure you have a line such as

127.0.0.1 <hostname>

in there. Most probably on a desktop system <hostname> will be localhost

2 > If you still get the same error then
delete any lines in /etc/hosts corresponding to IPv6, i.e. of the type

::1 localhost

This is the part that took me hours to figure out. So now you know, omniorb probably does not support IPv6 as of yet. Someone should hopefully fix it soon.

No comments:

Post a Comment