CFD Online Discussion Forums

CFD Online Discussion Forums (http://www.cfd-online.com/Forums/)
-   OpenFOAM Installation (http://www.cfd-online.com/Forums/openfoam-installation/)
-   -   Installation problem - calling blockMesh - libblockMesh.so (http://www.cfd-online.com/Forums/openfoam-installation/109776-installation-problem-calling-blockmesh-libblockmesh-so.html)

aylalisa November 26, 2012 13:35

Installation problem - calling blockMesh - libblockMesh.so
 
Hi!

I am a newbie with OpenSuse and OpenFOAM and probably ran in each possible problem.

I've created two users on a workstation (OpenSuse 12.2).
Subsequently I've installed OpenFoam. First in user1's file structure.
It was no problem to run first tutorial case cavity, loged in as user 1:
/home/user1/OpenFOAM/user1/run/tutorials/incompressible/icoFoam/cavity

Then I've tried to install OpenFOAM as root, to be a bit smarter, in /opt/OpenFOAM. The installation procedure worked well again. I logged in again as user1 and started blockMesh in the tutorial case cavity. Everything worked fine.
Then I've added another user to the system: user2, checked the rights and tried to start the mesher.
The installation folder /opt/OpenFOAM/user, where the tutorial case is saved, has following rights: drwxrwxrwx.
OpenFOAM-2.1.1 directory: /opt/OpenFOAM/OpenFOAM-2.1.1 has following rights:
drwxrwxr-x
The mesher does not start and I get following error message:
blockMesh: error while loading shared libraries: libblockMesh.so: cannot open shared object file: No such file or directory

libblockMesh.so exists in /opt/OpenFOAM/OpenFOAM-2.1.1/platforms/linux64GccDPOpt/lib

Why is it not possible for user2 to use OpenFOAM that was installed as root in /opt/OpenFOAM!

Do I have to manually adjust environment variables?
I ran /opt/OpenFOAM/OpenFOAM-2.1.1/bin --> foamInstallationTest and veriefied all environment variables to be sure that the official installation path to /opt/OpenFOAM was set correctly. Since I've first stupidly installed OpenFOAM in user1's file structure I wanted to control the correct settings of all e-variables. Their values seem to be all right.

Please help me! I've spent three weeks about that problem but I still could not solve it! Thanks a lot!

Aylalisa

wyldckat November 26, 2012 15:23

Greetings Aylalisa and welcome to the forum!

You could have asked sooner ;)
A compilation of the relevant information is presented here: Advanced tips for working with the OpenFOAM shell environment

As for the problem at hand, my guess is that you currently have two OpenFOAM installations: the personal one for "user1" and the global one made with the "root" account.
So, when you switched from root to user1, the personal installation was the one being used. You can confirm this by running:
Code:

which blockMesh
Therefore, at the very least, you're missing for the user2 the following command in his/her "~/.bashrc" file:
Code:

source /opt/OpenFOAM/OpenFOAM-2.1.1/etc/bashrc
Best regards,
Bruno

aylalisa November 27, 2012 10:44

Hallo Bruno,

thank you very much for your reply and that really helpful link!

I've sourced the OpenFOAM bashrc in both user's ~.bashrc files. I've had exactly add the line you suggested.
Yet it did not work.

The answer to 'which blockMesh':
which: no blockMesh in (/usr/NX/bin:/usr/lib64/mpi/gcc/openmpi/bin:/home/bee39476/bin:/usr/local/bin:/usr/bin:/bin:/usr/bin/X11:/usr/X11R6/bin:/usr/games)

I've checked the environment variables, logged in as user2 and figured out, that the adjusted values (path) are wrong.
e.g. WM_PROJECT_INST_DIR="/home/user2/OpenFOAM"
This should be : /opt/OpenFOAM

Could you maybe tell me if there is a possibility to set all concerned environment variables with help of a script or command or do I have to set them manually one by one as root?

My plan is to uninstall both OpenFoam packages (root, user1) completely, install again OpenFOAM as root and then try again to use it with user1 and user2 successively.

Best regards,
Aylalisa

aylalisa November 27, 2012 15:19

calling paraView - No protocol specified
 
Hallo Bruno,

thanks to your link I've managed to reach another level but now I face a new problem:

Error message:
created temporary 'cavity.OpenFOAM'
No protocol specified
paraview: cannot connect to X server :0

I've installed OpenFoam in the file structure of user1 and made a test:
blockMesh, icoFoam, paraFoam
Everything worked well.

I've sourced:
source /home/user1/OpenFOAM/OpenFOAM-2.1.1/etc/bashrc WM_NCOMPPROCS=12 WM_MPLIB=SYSTEMOPENMPI

Then I've copied the OpenFoam folder to /opt/ for group-wide installation and
adjusted OpenFOAM-*/etc/bashrc:
--> foamInstall=/opt/$WM_PROJECT

Next I've sourced:
source /opt/OpenFOAM/OpenFOAM-2.1.1/etc/bashrc WM_NCOMPPROCS=12 WM_MPLIB=SYSTEMOPENMPI
in the 2nd users $HOME/.bashrc

User2 can now start the mesher and the solver but not paraView (see error message above).

If I source:
source /opt/OpenFOAM/OpenFOAM-2.1.1/etc/bashrc WM_NCOMPPROCS=12 WM_MPLIB=SYSTEMOPENMPI
in the 1st users $HOME/.bashrc I receive the same error message if user1 now wants to start paraView by calling paraFoam.

Could you help me again?

:(:(:(


Best regards,
Aylalisa

wyldckat November 27, 2012 17:14

Hi Aylalisa,

Strange... although I've seen someone else with a similar problem in the last few days, but that person didn't reply back, if I remember correctly...

Anyway, there are several possibilities, which most depend on how you built ParaView and with which Qt library did you build it with.
Nonetheless, the two folders that need to be checked on whether the permissions are properly defined, are displayed with the following two commands:
Code:

ls -l ls -l $ParaView_DIR/bin
ls -l $ParaView_DIR/lib/paraview-3.12

Compare the permissions that the global and user1 installations have, because there might be libraries that are missing the necessary execution permissions.

Good luck!
Bruno

aylalisa November 28, 2012 09:55

start paraView with user2
 
Hallo Bruno,

now it works, BUT I can't really comprehend why!
I've compared the right as you've suggested and I could not see any differences.
I've copied one more time ThirdParty-2.1.1 folder from user1 folder structure to /opt/OpenFoam and adjusted the permissions (exactly like I did before) and/but now it works.

Of course I am happy and grateful that user2 can now start paraView too but on the other side I would really like to know where the difference is compoared to the situation I've had yesterday :confused:.

Anyway, thank you so much for your support!!!

Aylalisa


All times are GMT -4. The time now is 04:34.