CFD Online Discussion Forums

CFD Online Discussion Forums (https://www.cfd-online.com/Forums/)
-   OpenFOAM (https://www.cfd-online.com/Forums/openfoam/)
-   -   New user needs help (https://www.cfd-online.com/Forums/openfoam/74172-new-user-needs-help.html)

h0y5840 March 25, 2010 14:46

New user needs help
 
Hi Everyone,
I am a new user of OpenFOAM and currently stuck at the first test run. I downloaded OpenFOAM-1.6.General.gtgz and ThirdParty-1.6.General.gtgz from http://www.openfoam.com/download/linux64.php and did the installation following the README online http://www.openfoam.com/docs/README.php. I didn't do Building from Sources (Optional). At the step "Getting Started" , I tried run "blockMesh" but got "bash: blockMesh: command not found".
Anyone can tell me what I am missing and how to fix? Many thanks.

wyldckat March 25, 2010 15:28

Greetings h0y5840,

OK, according to the files you listed, you didn't unpack the binary files too! Namely OpenFOAM-1.6.linux64GccDPOpt.gtgz and ( OpenFOAM-1.6.linux64GccSPOpt.gtgz edit: sorry, this one is optional, you'll need this one ->) ThirdParty-1.6.linux64Gcc.gtgz. Therefore, you don't have any applications to run!

Hopefully, you did do what Sebastian said on the other thread, i.e., source the bashrc file, like it is explained in the readme:
Quote:

if running bash or ksh (if in doubt type echo $SHELL), source the etc/bashrc file by adding the following line to the end of your $HOME/.bashrc file:
  • . $HOME/OpenFOAM/OpenFOAM-1.6/etc/bashrc
Then update the environment variables by sourcing the $HOME/.bashrc file by typing in the terminal:
  • . $HOME/.bashrc

Additionally, depending on your installed Linux distribution, you will hit some issues with it, which could require a simple solution or a full rebuild of the OpenFOAM solvers and utilities, as well as the Third Party applications that comes with it! So, if you're unable to get it going, please state the Linux version you're using so we can guide you to a thread that is dedicated to that version. There are already some scripts ready to use for various distributions, such as OpenSUSE and Ubuntu!
Of course you could also search for it yourself, but since it seems you posted so promptly, I suppose you aren't yet very familiar with the forum ;)

Best regards,
Bruno

h0y5840 March 25, 2010 15:44

Quote:

Originally Posted by wyldckat (Post 251706)

OK, according to the files you listed, you didn't unpack the binary files too! Namely OpenFOAM-1.6.linux64GccDPOpt.gtgz and ( OpenFOAM-1.6.linux64GccSPOpt.gtgz edit: sorry, this one is optional, you'll need this one ->) ThirdParty-1.6.linux64Gcc.gtgz. Therefore, you don't have any applications to run!

Hopefully, you did do what Sebastian said on the other thread, i.e., source the bashrc file, like it is explained in the readme:
Additionally, depending on your installed Linux distribution, you will hit some issues with it, which could require a simple solution or a full rebuild of the OpenFOAM solvers and utilities, as well as the Third Party applications that comes with it! So, if you're unable to get it going, please state the Linux version you're using so we can guide you to a thread that is dedicated to that version. There are already some scripts ready to use for various distributions, such as OpenSUSE and Ubuntu!
Of course you could also search for it yourself, but since it seems you posted so promptly, I suppose you aren't yet very familiar with the forum ;)

Best regards,
Bruno

Yes, I am new with OpenFOAM and this forum:o but will become a fan soon. Any help will be highly appreciated!
I checked the Linux version: 2.6.18-164.11.1.el5 (brewbuilder@norob.fnal.gov) (gcc version 4.1.2 20080704 (Red Hat 4.1.2-46)) #1 SMP Wed Jan 20 00:57:09 EST 2010
And can you tell me where to find the binary files you mentioned above? I followed the online README and never got the step to unpack OpenFOAM-1.6.linux64GccDPOpt.gtgz and ( OpenFOAM-1.6.linux64GccSPOpt.gtgz edit: sorry, this one is optional, you'll need this one ->) ThirdParty-1.6.linux64Gcc.gtgz.

Many thanks,

HY

sega March 25, 2010 15:50

Quote:

Originally Posted by h0y5840 (Post 251709)
And can you tell me where to find the binary files you mentioned above? I followed the online README and never got the step to unpack OpenFOAM-1.6.linux64GccDPOpt.gtgz and ( OpenFOAM-1.6.linux64GccSPOpt.gtgz edit: sorry, this one is optional, you'll need this one ->) ThirdParty-1.6.linux64Gcc.gtgz.

Many thanks,

HY

You really should improve your reading. http://www.openfoam.com/download/linux32.php
Look out for "Download files". Take all but the optional one and unpack.

It's all in the README.

h0y5840 March 25, 2010 16:33

Quote:

Originally Posted by sega (Post 251713)
You really should improve your reading. http://www.openfoam.com/download/linux32.php
Look out for "Download files". Take all but the optional one and unpack.
It's all in the README.

Sorry, Sega. I should have been more careful to read the context :o.
Now I have downloaded OpenFOAM-1.6.linuxGccDPOpt.gtgz and ThirdParty-1.6.linuxGcc.gtgz and unpacked them too. I actually deleted the previous directories and went through the whole installation steps with the four downloaded files following README. However, when I do "blockMesh" it is still "bash: blockMesh: command not found".

One thing I was not sure if I did right because the README is not clear when it says "Create a project directory within the $HOME/OpenFOAM directory named $LOGNAME-1.6 (e.g. ‘chris-1.6’ for user chris and OpenFOAM version 1.6) and create a directory named run within it, e.g. by typing: mkdir -p $FOAM_RUN/run".

I did "mkdir LOGNAME-1.6" in $HOME/OpenFOAM directory and did "mkdir -p $FOAM_RUN/run" in $HOME/OpenFOAM/LOGNAME-1.6". I assumed "it" in above context is LOGNAME-1.6. Am I correct? If yes, why I am still getting "bash: blockMesh: command not found"?

Thank you very much for your patience and guidance.

HY

wyldckat March 25, 2010 17:54

Hello again h0y5840,

Uhm, the names of the files already had the links straight to the files at sourceforge, because I copied them directly from the www.openfoam.com web site, from the third link you provided:
Additionally, from what you've listed, I'm unable to guess what specific architecture you're Red Hat is built for:
Quote:

I checked the Linux version: 2.6.18-164.11.1.el5 (brewbuilder@norob.fnal.gov) (gcc version 4.1.2 20080704 (Red Hat 4.1.2-46)) #1 SMP Wed Jan 20 00:57:09 EST 2010
Namely, if it's i386/486/686 (32bit) or x86_64 (64bit).

So, I'll try to explain both solutions. There are 2 architectures of OpenFOAM: 32 and 64 bit. Now, the packages that state:
Now, after unpacking the OpenFOAM and ThirdParty sources (General packages) and the desired architecture (linuxGcc or linux64Gcc, also for OpenFOAM and ThirdParty), the steps are very similar between both, as you've already done... except an additional tweak for the 32bit is required, namely:
  1. you must edit the file ~/OpenFOAM/OpenFOAM-1.6/etc/bashrc with your favorite text editor
  2. Search for the line (around 96) that says
    Code:

    : ${WM_ARCH_OPTION:=64}; export WM_ARCH_OPTION
    and change 64 to 32.
  3. Save and close the file+editor.
  4. source once again OpenFOAM's bashrc file
    Code:

    .  $HOME/OpenFOAM/OpenFOAM-1.6/etc/bashrc
    If you've already added this command line to the ~/.bashrc file, then you're good to go :)
If (this happened to me) sourcing the bashrc file doesn't do the trick, just start a new terminal, which will "boot" OpenFOAM's environment properly :)

The Red Hat version you have seems a little bit old to me, so OpenFOAM and/or Paraview might not work 100% as intended. Well, Paraview is the one most likely not to work ;)

Ah, the trick to know if blockMesh does actually exist, to the eyes of bash, type in the terminal:
Code:

which blockMesh
And don't forget the Linux is case sensitive ;) blockMesh is Not the same as blockmesh :D

Now, IF the "which" command lists the path to blockMesh, but blockMesh still won't run, then it is likely your Linux installation is missing some libraries... and will likely mean the near absolute need to rebuild OpenFOAM.

If blockMesh runs well and icoFoam too, but paraFoam croaks with a
Code:

can't find symbol #!"$#"#!%#$%#"$
then you'll need (at the very least) to build Qt 4.3.5. OpenFOAM's web site has instructions on how to do that here: http://www.openfoam.com/docs/README.php#Qt and http://www.openfoam.com/docs/README.php#x3-20000
Download the Qt package they refer in the first link to and unpack it inside the ThirdParty folder. Then run:
Code:

./makeQt
Bah, I'll make your life simple ;) here's the commands:
Code:

cd $WM_THIRD_PARTY_DIR
wget ftp://ftp.trolltech.com/qt/source/qt-x11-opensource-src-4.3.5.tar.bz2
tar -xjf qt-x11-opensource-src-4.3.5.tar.bz2
./makeQt

edit:yesterday I forgot about the tar command :( edit2: it's -xjf, not -xzf :(
NOTE: it is implied that the OpenFOAM's bashrc ran successfully.

OOOK... and that should keep you busy for a few hours ;)

Come back if you've got more problems... or even if you got it all to work:cool:

Best regards,
Bruno

h0y5840 March 26, 2010 09:42

Hi Bruno,
Thank you so much for your time and patience. I tried again but it is still not working. I am gonna give you more details about the installation to see if you can diagnose the problem. There seems a long journey to go through to get the system work. My intention is to get blockMesh and icoFoam working first and leave paraFoam for furure struggling.

[QUOTE=wyldckat;251737]
Additionally, from what you've listed, I'm unable to guess what specific architecture you're Red Hat is built for:Namely, if it's i386/486/686 (32bit) or x86_64 (64bit).[QUOTE]

My Red Hat is built for x86_64 (64bit).

[QUOTE=wyldckat;251737]
Now, after unpacking the OpenFOAM and ThirdParty sources (General packages) and the desired architecture (linuxGcc or linux64Gcc, also for OpenFOAM and ThirdParty), the steps are very similar between both, as you've already done...
If (this happened to me) sourcing the bashrc file doesn't do the trick, just start a new terminal, which will "boot" OpenFOAM's environment properly :) [QUOTE=wyldckat;251737]
What I did for the installationwas as follows:
1. unpack OpenFOAM-1.6.General.gtgz and ThirdParty-1.6.General.gtgz in the directory of $HOME/OpenFOAM, which generated two subdirectories OpenFOAM-1.6 and ThirdParty-1.6.
2. unpack OpenFOAM-1.6.linux64GccDPOpt.gtgz and ThirdParty-1.6.linux64Gcc.gtgz in the directories $HOME/OpenFOAM/OpenFOAM-1.6 and $HOME/OpenFOAM/ThirdParty-1.6 respectively.
3. add . $HOME/OpenFOAM/OpenFOAM-1.6/etc/bashrc to the end of $HOME/.bashrc file and do . $HOME/.bashrc
4. do "mkdir LOGNAME-1.6" in the directory $HOME/OpenFOAM/ and do "mkdir -p $FOAM_RUN/run" in the directory $HOME/OpenFOAM/LOGNAME-1.6
5. do "cp -r $WM_PROJECT_DIR/tutorials $FOAM_RUN"
6. do "cd $FOAM_RUN/tutorials/incompressible/icoFoam/cavity"
7. run "blockMesh" and I got "bash: blockMesh: command not found"

[QUOTE=wyldckat;251737]The Red Hat version you have seems a little bit old to me, so OpenFOAM and/or Paraview might not work 100% as intended. Well, Paraview is the one most likely not to work ;)[QUOTE]

This is not good news and I'll talk to the machine adminstrator to see if the version can be updated. Would this be the reason that why blockMesh is not working

[QUOTE=wyldckat;251737] Ah, the trick to know if blockMesh does actually exist, to the eyes of bash, type in the terminal:
Code:

which blockMesh
And don't forget the Linux is case sensitive ;) blockMesh is Not the same as blockmesh :D
[QUOTE]

"which blockMesh" gives "/usr/bin/which: no blockMesh in ($HOME/OpenFOAM/ThirdParty-1.6/openmpi-1.3.3/platforms/linux64GccDPOpt/bin:$HOME/OpenFOAM/huidan-1.6/applications/bin/linux64GccDPOpt:$HOME/OpenFOAM/site/1.6/bin/linux64GccDPOpt:$HOME/OpenFOAM/OpenFOAM-1.6/applications/bin/linux64GccDPOpt:/home/huidan/OpenFOAM/OpenFOAM-1.6/wmake:$HOME/OpenFOAM/OpenFOAM-1.6/bin:/opt/mpich2-1.1-ifort/bin:/opt/tec360_2009/bin:/opt/smartcvs-7.1.1/bin:/opt/matlab/bin:/opt/intel/Compiler/11.0/083/bin/intel64:/usr/local/cuda/bin:/opt/smartcvs-7.1/bin:/usr/lib64/qt-3.3/bin:/usr/kerberos/bin:/usr/local/bin:/bin:/usr/bin:/opt/scitools/bin/pc-linux_elf:$HOME/bin)"

Can I do anything further to dignose the problem? Many Thanks.

HY

wyldckat March 26, 2010 09:51

Hello again HY,

Quote:

Originally Posted by h0y5840 (Post 251843)
My Red Hat is built for x86_64 (64bit).

OK, so far so good. Most of your steps are OK, except for step 2:
Quote:

Originally Posted by h0y5840 (Post 251843)
2. unpack OpenFOAM-1.6.linux64GccDPOpt.gtgz and ThirdParty-1.6.linux64Gcc.gtgz in the directories $HOME/OpenFOAM/OpenFOAM-1.6 and $HOME/OpenFOAM/ThirdParty-1.6 respectively.

You should also unpack these two packages in $HOME/OpenFOAM/, because the packages already have the desired paths already in them, like the General packages had!

Quote:

Originally Posted by h0y5840 (Post 251843)
This is not good news and I'll talk to the machine adminstrator to see if the version can be updated. Would this be the reason that why blockMesh is not working.

Mind you that the Red Hat version you're using only has a downside that it will require more packages to be built, like Qt, and might me missing some libraries! Other than that, it should be OK. Even with a more modern distribution, you'll still need to install applications/packages, depending on how much you need to do with OpenFOAM ;)

Best regards,
Bruno

h0y5840 March 26, 2010 11:07

Hello Bruno, I am little confused by this.
[QUOTE=wyldckat;251845]
OK, so far so good. Most of your steps are OK, except for step 2:

2. unpack OpenFOAM-1.6.linux64GccDPOpt.gtgz and ThirdParty-1.6.linux64Gcc.gtgz in the directories $HOME/OpenFOAM/OpenFOAM-1.6 and $HOME/OpenFOAM/ThirdParty-1.6 respectively.

You should also unpack these two packages in $HOME/OpenFOAM/, because the packages already have the desired paths already in them, like the General packages had![QUOTE]

On the web (http://www.openfoam.com/download/linux64.php), in the paragraph of "Unpack files", it says "Decompress each file with GNU gtar and gzip using the command ”tar xzf <filename>”, beginning with the source files (OpenFOAM-1.6.General.gtgz and ThirdParty.General.gtgz - these source files must be present for OpenFOAM to be operational). The OpenFOAM source and (any) binary files unpack into a $HOME/OpenFOAM/OpenFOAM-1.6 directory. The third-party software unpacks into a $HOME/OpenFOAM/ThirdParty directory." I understood that OpenFOAM-1.6.linux64GccDPOpt.gtgz and ThirdParty-1.6.linux64Gcc.gtgz are binary files and they should be unpacked into $HOME/OpenFOAM/OpenFOAM-1.6 directory and $HOME/OpenFOAM/ThirdParty directory respectively.

Can you clarify this?


Quote:

Originally Posted by wyldckat (Post 251845)
Mind you that the Red Hat version you're using only has a downside that it will require more packages to be built, like Qt, and might me missing some libraries! Other than that, it should be OK. Even with a more modern distribution, you'll still need to install applications/packages, depending on how much you need to do with OpenFOAM

As a beginner, the current version might be enough :o. Thank you for this comment.

Best,

HY

sega March 26, 2010 11:23

Quote:

Originally Posted by h0y5840 (Post 251852)
.
Can you clarify this?

Put all files into $HOME/OpenFOAM and unpack from there!!!

wyldckat March 26, 2010 11:33

Quote:

The OpenFOAM source and (any) binary files unpack into a $HOME/OpenFOAM/OpenFOAM-1.6 directory. The third-party software unpacks into a $HOME/OpenFOAM/ThirdParty directory.
Like Sebastian said, just unpack the packages at $HOME/OpenFOAM and tar will do the rest for you :)

h0y5840 March 26, 2010 12:31

:):):), guys, you know what? It worked! The "unpack files" instruction on the web is really misleading.

However, it's not done yet. blockMesh and icoFoam both work with massive text outputs but paraFoam give error as " created temporary 'cavity.OpenFOAM'
/home/huidan/OpenFOAM/ThirdParty-1.6/paraview-3.6.1/platforms/linux64Gcc/bin/paraview-real: error while loading shared libraries: libQtAssistantClient.so.4: cannot open shared object file: No such file or directory. This error seems exactly the same as what in thread http://www.cfd-online.com/Forums/ope...-paraview.html from ka1184. I see many responses there but ka1184 didn't feedback if he has fixed the problem. Sounds like a version problem. I was wondering if it can be fixed without system update.

Thank you, Bruno and Sega, very much. You are very patient and helpful.

HY

wyldckat March 26, 2010 12:37

Great!
Quote:

created temporary 'cavity.OpenFOAM'
/home/huidan/OpenFOAM/ThirdParty-1.6/paraview-3.6.1/platforms/linux64Gcc/bin/paraview-real: error while loading shared libraries: libQtAssistantClient.so.4: cannot open shared object file: No such file or directory.
Remember back in my post #6:
Quote:

If blockMesh runs well and icoFoam too, but paraFoam croaks with a:
Code:

can't find symbol #!"$#"#!%#$%#"$

Well... the text that follows that, also answers your recent problem! :cool:

h0y5840 March 26, 2010 12:53

Hi Bruno,
I didn't get an error like
can't find symbol #!"$#"#!%#$%#"$ but something I described in my post #12. Do you think I should still try what you mentioned in post #6?

Thanks,

HY

wyldckat March 26, 2010 13:01

Short answer: Yes.

Long Answer:
  • The "can't find symbol" statement usually occurs when the library is found, but is missing some functions that were expected to exist. This would happen if you installed Red Hat's Qt version, which is probably lower than 4.3.5.
  • Since you didn't install Red Hat's Qt version, no Qt libraries were found. That's why you got the "error while loading shared libraries: libQtAssistantClient.so.4: cannot open shared object file: No such file or directory."
Therefore, in both cases, you will have to build Qt on your own... by following what I said in post #6! :cool:

Best regards,
Bruno

h0y5840 March 26, 2010 13:12

Quote:

Originally Posted by wyldckat (Post 251869)
Great!
Remember back in my post #6:
Well... the text that follows that, also answers your recent problem! :cool:

Quote:

Originally Posted by wyldckat (Post 251871)
Short answer: Yes.

Long Answer:
  • The "can't find symbol" statement usually occurs when the library is found, but is missing some functions that were expected to exist. This would happen if you installed Red Hat's Qt version, which is probably lower than 4.3.5.
  • Since you didn't install Red Hat's Qt version, no Qt libraries were found. That's why you got the "error while loading shared libraries: libQtAssistantClient.so.4: cannot open shared object file: No such file or directory."
Therefore, in both cases, you will have to build Qt on your own... by following what I said in post #6! :cool:

Best regards,
Bruno

Very clear! Thanks.
I did what you said. But when I did "tar -xzf qt-x11-opensource-src-4.3.5.tar.bz2 ", an error appeared as "gzip: stdin: not in gzip format
tar: Child returned status 1
tar: Error exit delayed from previous errors". Is this a simple problem to resolve?

HY

wyldckat March 26, 2010 13:16

Arg, sorry about that! I've just fixed the post, just in case. The correct command is:
Code:

tar -xjf qt-x11-opensource-src-4.3.5.tar.bz2
FYI the z is for gzip, the j for bzip2...

h0y5840 March 26, 2010 13:42

Quote:

Download the Qt package they refer in the first link to and unpack it inside the ThirdParty folder. Bah, I'll make your life simple ;) here's the commands:
Code:

cd $WM_THIRD_PARTY_DIR
wget ftp://ftp.trolltech.com/qt/source/qt-x11-opensource-src-4.3.5.tar.bz2
tar -xjf qt-x11-opensource-src-4.3.5.tar.bz2
./makeQt


Hi, Bruno,
I downloaded and Qmaked the Qt package. But the error message is the same when I run paraFoam as "created temporary 'cavity.OpenFOAM'
$HOME/OpenFOAM/ThirdParty-1.6/paraview-3.6.1/platforms/linux64Gcc/bin/paraview-real: error while loading shared libraries: libQtAssistantClient.so.4: cannot open shared object file: No such file or directory".

I then did "Compiling Paraview 3.6.1 and the PV3FoamReader module" and "Compiling Paraview with a local version of Qt" following the instructions on http://www.openfoam.com/docs/README.php.

Now I run paraFoam again in directory $FOAM_RUN/tutorials/incompressible/icoFoam/cavity and got a new error like "created temporary 'cavity.OpenFOAM'
$HOME/OpenFOAM/OpenFOAM-1.6/bin/paraFoam: line 129: paraview: command not found". I did checked the paraFoam file and line 129 is " paraview --data="$caseFile".

Is it easy to be fixed?

Many thanks,

HY

wyldckat March 26, 2010 14:21

Hi HY,

Uhm, I thought the coders of OpenFOAM had that covered :(
OK, edit the file $HOME/OpenFOAM/OpenFOAM-1.6/etc/settings.sh and go to the end of the file. Now, just before this (it's near the end):
Code:

# cleanup environment:
# ~~~~~~~~~~~~~~~~~~~~
unset _foamAddPath _foamAddLib minBufferSize

# -----------------------------------------------------------------------------

Add this (before the code above!):
Code:

# Add Qt to path and library path
# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
QT_VERSION=4.3.5
QT_HOME=${WM_THIRD_PARTY_DIR}/qt-x11-opensource-src-${QT_VERSION}
if [ -d "$QT_HOME" ]
then
    QT_ARCH_PATH=${QT_HOME}/platforms/${WM_OPTIONS}
    _foamAddPath $QT_ARCH_PATH/bin
    _foamAddLib  $QT_ARCH_PATH/lib
fi

Now source the bashrc file or start a new terminal and try to just run paraview. If it says the same thing as before, edit the file settings.sh again, and change the line:
Code:

    _foamAddLib  $QT_ARCH_PATH/lib
to
Code:

    _foamAddLib  $QT_ARCH_PATH/lib64
Source the bashrc file again or start a new terminal. Now try running paraview again. I'm giving these two options, because I haven't tested it yet.


Best regards,
Bruno

wyldckat March 26, 2010 14:27

Just saw your edit about paraview not being there...

OK, without erasing the folders, unpack again the ThirdParty-1.6.linux64Gcc.tgz at $HOME/OpenFOAM.

Now source the bashrc file or start a new terminal and try to just run paraview again. Take into account whether you've already changed lib to lib64 thing and try one or the other!

h0y5840 March 26, 2010 15:32

Hi Bruno,
I am a little confused. Post #19 and #20 give two different actions. Which one should I try? or both?
I guess post #19 is for the error message "created temporary 'cavity.OpenFOAM'
$HOME/OpenFOAM/ThirdParty-1.6/paraview-3.6.1/platforms/linux64Gcc/bin/paraview-real: error while loading shared libraries: libQtAssistantClient.so.4: cannot open shared object file: No such file or directory"
and post #20 is for the updated error "created temporary 'cavity.OpenFOAM'
$HOME/OpenFOAM/OpenFOAM-1.6/bin/paraFoam: line 129: paraview: command not found".
Am I right?

Should I just try what you said in post #20 but take into account about lib and lib64 thing? Sorry you have to spend extra time to answer my questions.

Many thanks,

HY

wyldckat March 26, 2010 17:08

Hi HY,

Do #20 first then #19. Both are needed.

My guess is that when you did "./makeParaview", the existing Paraview version got (pardon the expression) nuked, and didn't build properly with the Qt that you built.

So, #20 gets you Paraview back to what it was, and #19 should make Qt visible to Paraview, thus finally working. At least, that's my estimate!

Best regards,
Bruno

h0y5840 March 26, 2010 17:48

Hi Bruno,
I really appreciate your patience and the willingness to spend time on my problems. Your help is very improtant to me.
What I did is as follows:
1. tar xzf ThirdParty-1.6.linux64Gcc.gtgz in directory $HOME/OpenFOAM
2. . $HOME/.bashrc
3. edit the file $HOME/OpenFOAM/OpenFOAM-1.6/etc/settings.sh as instructed
in post #19
4. . $HOME/.bashrc
When I run paraview, the error is "$HOME/OpenFOAM/ThirdParty-1.6/paraview-3.6.1/platforms/linux64Gcc/bin/paraview-real: error while loading shared libraries: libQtAssistantClient.so.4: cannot open shared object file: No such file or directory". It seems that the error before I install Qt came back, right?
What am I still missing?

HY


Quote:

Originally Posted by wyldckat (Post 251902)

Do #20 first then #19. Both are needed.

My guess is that when you did "./makeParaview", the existing Paraview version got (pardon the expression) nuked, and didn't build properly with the Qt that you built.

So, #20 gets you Paraview back to what it was, and #19 should make Qt visible to Paraview, thus finally working. At least, that's my estimate!


wyldckat March 26, 2010 21:55

Hi HY,

Well, after simulating your installation conditions with Ubuntu 8.04 x86_64, my conclusion is that you have two possible solutions:
Solution 1: you'll need to install cmake 2.6, and your Red Hat has either a cmake < 2.6 or none at all. You'll have to request your system's administrator to install it.

Solution 2: if cmake 2.6 isn't readily available for Red Hat, you can unpack the ThirdParty-1.6.linuxGcc.gtgz package, which has a prebuilt cmake-2.6.4. You'll also need to add to settings.sh, right after that Qt code I've posted about, the following code:
Code:

_foamAddPath ${WM_THIRD_PARTY_DIR}/cmake-2.6.4/platforms/linux/bin
Source bashrc and run:
Code:

cmake --version
If you get "cmake version 2.6-patch 4", then you're good to go. If not, you'll need to ask your system's administrator to install Linux 32bit libraries "ia32-libs" (not sure what it's called in Red Hat) for your Red Hat system, and then you'll be able to run cmake.

About Qt, my initial code with lib works properly. So for completeness, here is how my settings.sh now ends:
Code:

# Add Qt to path and library path
# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
QT_VERSION=4.3.5
QT_HOME=${WM_THIRD_PARTY_DIR}/qt-x11-opensource-src-${QT_VERSION}
if [ -d "$QT_HOME" ]
then
    QT_ARCH_PATH=${QT_HOME}/platforms/${WM_OPTIONS}
    _foamAddPath $QT_ARCH_PATH/bin
    _foamAddLib  $QT_ARCH_PATH/lib
fi
_foamAddPath ${WM_THIRD_PARTY_DIR}/cmake-2.6.4/platforms/linux/bin

# cleanup environment:
# ~~~~~~~~~~~~~~~~~~~~
unset _foamAddPath _foamAddLib minBufferSize

# -----------------------------------------------------------------------------

The bolden code is the end part of the original settings.sh file ;)


Now, you've got Qt, CMake, and you're just missing Paraview. With your current setup, and assuming your running a new terminal or have already sourced once more the bashrc file (the one in OpenFOAM's folder), just run:
Code:

cd $WM_THIRD_PARTY_DIR                                                                                                                                                               
rm -rf  paraview-3.6.1/platforms
./makeParaView

During the building of Paraview, you should see a looooooong list of something like this:
Code:

[  1%] Building C object VTK/Utilities/vtkfreetype/CMakeFiles/vtkfreetype.dir/src/base/ftmm.o
[  1%] Building C object VTK/Utilities/vtklibxml2/CMakeFiles/vtklibxml2.dir/SAX.o
[  1%] Building C object VTK/Utilities/vtkfreetype/CMakeFiles/vtkfreetype.dir/src/bdf/bdf.o
[  1%] Building C object VTK/Utilities/vtklibxml2/CMakeFiles/vtklibxml2.dir/SAX2.o

With the percentage of how much has been compiled. When it reaches 100%, it'll wrap up the installation and you should be good to go!! Or so I hope :rolleyes:


Well, this is cool, because this way I also get a bit more code for an installation script I'm helping out, whose thread is -> here <-. I haven't proposed you to follow it, because I assumed you were limited to your Red Hat system... and only just now have I finished the steps here on this very same post on your thread, on how to build Paraview for OpenFOAM.

By the way, after testing if the paraview command works, and if it does, and before you run paraFoam... don't forget to run the missing commands, namely:
Code:

cd $FOAM_UTILITIES/postProcessing/graphics/PV3FoamReader     
./Allwclean     
./Allwmake

Ooof... I hope it works now.. I'm tired... :D

Best regards,
Bruno

h0y5840 March 27, 2010 20:42

Hello Bruno,
The instruction to build up paraview is very clear. I followed ""Solution 2" and here is what I went through.
1. I got "cmake version 2.6-patch 4"
2. I compared the lines regarding to path of library path for Qt in settings.sh. The only difference is in the line _foamAddLib $QT_ARCH_PATH/lib, I have "lib64" not "lib". Actually I made the change from lib to lib64 following Post #19. Should I change back to lib?
3. I did ./makeParaView and it reached 100%
4. I tried "paraview", but got an error message "/home/huidan/OpenFOAM/ThirdParty-1.6/paraview-3.6.1/platforms/linux64Gcc/bin/paraview-real: error while loading shared libraries: libQtAssistantClient.so.4: cannot open shared object file: No such file or directory"
5. Although paraview was not successful, I did ./Allwclean and ./Allwmake anyway. The error is the same.

Looks I am still missing this "libQtAssistantClient.so.4 " after so many efforts, are we close to the final success? I feel sorry to have you spent so much time and energy on me. I want to let you know that you help is extremely improtant to me. As you have noticed that I am not familiar Unix system. Without your kind help, it is impossible for me to make OpenFoam practical. Many heartedful thanks.

HY

wyldckat March 28, 2010 07:01

Greetings HY,

Quote:

2. I compared the lines regarding to path of library path for Qt in settings.sh. The only difference is in the line _foamAddLib $QT_ARCH_PATH/lib, I have "lib64" not "lib". Actually I made the change from lib to lib64 following Post #19. Should I change back to lib?
Yes, change it back to lib. I thought Qt would have a lib64 folder, but after testing, I saw that it doesn't. I should have emphasized that issue.
Hopefully this will do the trick.

If it still reports "can't find library", run:
Code:

ls $HOME/OpenFOAM/ThirdParty-1.6/qt-x11-opensource-src-4.3.5/platforms/linux64GccDPOpt/lib
If this command says that nothing has been found, then Qt didn't build properly. If it does list the Qt libraries that were built, find the missing library by running:
Quote:

ls $HOME/OpenFOAM/ThirdParty-1.6/qt-x11-opensource-src-4.3.5/platforms/linux64GccDPOpt/lib | grep libQtAssistantClient.so.4
I get this:
Code:

libQtAssistantClient.so.4
libQtAssistantClient.so.4.3
libQtAssistantClient.so.4.3.5
libQtAssistantClient.so.4.3.5.debug

So, if you don't get these or similar, then Qt didn't build properly. If you do get these, then the libraries aren't visible, which means that either the settings.sh is misconfigured, or that sourcing the bashrc script isn't working properly. To make sure that the bashrc gets executed properly, is to start a new terminal/console and try from there!

Best regards,
Bruno

h0y5840 March 28, 2010 14:11

Hi Bruno,
You know what? Both paraview and paraFoam work after I change bit64 back to bit. I think I am ready to learn OpenFOAM now.
I would like to sincerely express my gratitude to you for the time and energy you put on to guide me to the installation and test for OpenFOAM. Your support was professional and effective and your help was kind and friendly.
Thank you very much.

Cheers,

HY

sega March 28, 2010 14:15

Quote:

Originally Posted by h0y5840 (Post 252046)
I change bit64 back to bit.

You did what?

h0y5840 March 28, 2010 14:27

Sorry, a big typo. I changed lib64 back to lib.

HY

wyldckat March 28, 2010 17:17

Greetings HY,

You're most welcome :) I'm glad to hear that finally you've got the whole thing up and running :D

Best regards,
Bruno

windy.lizzy May 5, 2010 13:03

Hi there,
I ran into the exact same problem that was described above here and, prior to seeing this post, I tried recompiling ParaView (several times, actually) but to no avail... it was still telling me that it couldn't find the libQtAssistantClient.so.4.

I saw your advice to edit the settings.sh such that the path to the Qt library is specified. I made the changes, opened a new terminal... crossed my fingers but then it said "error while loading shared libraries: libssl.so.0.9.8: cannot open shared object file: No such file or directory" :mad:

Any suggestions? This is getting super frustrating!
Thanks,
Liz

wyldckat May 5, 2010 13:10

Greetings Liz and welcome to the forum,

Well, you are very close to having it work :) Check this thread for the missing step (it's the fix for that same exact issue): [solved] Issue Involving Paraview

Best regards,
Bruno

windy.lizzy May 5, 2010 13:35

Thank you so much for the quick response!:)
I searched for this file in my user/lib folder and found that I have libssl.so

So it seems that this is an older version that what is being looked for. Do you think creating the symbolic link to use this older version would work?

Thanks,
Liz
:)

wyldckat May 5, 2010 13:41

Hi Liz,

I can only guess that if it's too old, it won't work. But hey, give it a try and see if it works... if not, try to update it!

But I think the libssl.so that you should link to, should be a system version, not a user version.

Best regards,
Bruno

windy.lizzy May 5, 2010 13:42

Hi again,
I tried the symbolic link trick and it seemed to work but now I'm getting this error:
symbol lookup error: /home/ewalls/OpenFOAM/ThirdParty-1.6/paraview-3.6.1/platforms/linuxGcc/bin/libvtkQtChart.so.pv3.6: undefined symbol: _ZN14QGraphicsScene11eventFilterEP7QObjectP6QEvent

Should I recompile Paraview?

Liz

wyldckat May 5, 2010 13:51

Hi Liz,

Uhm, now I'm lost. What steps did you take to get to where you are?

Because by what you describe, it seems to me that either:
  • you are using the pre-compiled Paraview that comes with the ThirdParty package and the system's Qt;
  • or that you build Paraview with the system's Qt version, and then built Qt 4.3.5 and you are now trying to use the "system Qt+Paraview" to use the 4.3.5 Qt.
Best regards,
Bruno

windy.lizzy May 5, 2010 14:08

Ok... here are the steps that I took.

I downloaded and unpacked the (32-bit version) zipped tar files.

I saw that Qt was required to run OpenFOAM and when I typed qmake --version, it told me that Qt was not installed on my system.

I ftp'd qt-x11-opensource-src-4.3.5.tar.bz2, unzipped and untarred it and ran ./makeQt

Then I ran the foamInstallationTest and it said everything was ok.

Then I tried the first tutorial (icoFoam/cavity) and blockMesh ran, icoFoam ran but paraFoam said that I was missing the libQtAssistantClient.so.4.

I saw your tip on modifying the settings.sh file so I did that and reopened a terminal.

Then I tried the tutorial run again but then when I ran paraFoam, it said that it couldn't find libssl.so.0.9.8.

Taking your advice, I created a symbolic link in /lib from my libssl.so.0.9.8b to the one it was looking for.

I ran the tutorial again, but it gave another error: undefined symbol: _ZN14QGraphicsScene11eventFilterEP7QObjectP6QEvent

I saw in a previous thread that you wrote saying that if you get an error like this then there's probably something up with Qt. So I deleted the unpacked Third_Party folder then unzipped and untarred it again. Then I ftp'd the Qt tar file again and I'm now in the process of running ./makeQt again.

Am I on the right track??

Thanks,
Liz

wyldckat May 5, 2010 14:15

I should have asked it sooner, so you wouldn't be now recompiling Qt again :(

OK, don't despair, because you are on the right track. The pre-built Paraview version that comes with the ThirdParty package was built with Qt 4.4.3, if I'm not mistaken, thus Qt 4.3.5 is too old for the pre-built Paraview to work with it.

Now, what you'll need to do is to continue to follow the remainder steps that I've posted on this very same thread, that explain on how to build Paraview with Qt 4.3.5!

Best regards,
Bruno

windy.lizzy May 5, 2010 16:49

Yay! It is now up and running!
Thank you so much for your help!
:D
Liz

wyldckat May 5, 2010 16:57

Hi Liz,

You're welcome and I'm glad that it's fully working now :)

Best regards,
Bruno


All times are GMT -4. The time now is 23:00.