CFD Online Discussion Forums

CFD Online Discussion Forums (https://www.cfd-online.com/Forums/)
-   OpenFOAM Installation (https://www.cfd-online.com/Forums/openfoam-installation/)
-   -   Compiling ParaView (https://www.cfd-online.com/Forums/openfoam-installation/91426-compiling-paraview.html)

pfinlay1 August 10, 2011 07:55

Compiling ParaView
 
1 Attachment(s)
Hi,

I am able to run OpenFOAM 2.0.0, but am unable to get Paraview working. When I run ./makeParaView, it says the configuration is incomplete and quits. Not sure what is going wrong, but have attached the .log file of what occurs.

I also do not have an internet connection, so I cannot use apt-get, etc. Thanks!

wyldckat August 10, 2011 10:06

Greetings pfinlay1,

It's missing the OpenGL libraries and definitions...

OK, let us try this first - open Synaptic Package Manager and pick the packages listed here: http://www.openfoam.com/download/source.php#x5-21000
But instead of trying to install them right away, go to Synaptic's menu and pick "File->Generate package download script". Then use that script for downloading the necessary files!

For installing them, if I'm not mistaken, run:
Code:

dpkg -i *.deb
Good luck!
Bruno

pfinlay1 August 10, 2011 13:25

Hi Bruno,

Thanks for the quick reply! After looking up all of those packages with synaptic manager, I found that I have already installed them all. Namely, build-essential, flex, cmake, zlib1g-dev, qt4-dev-tools, libqt4-dev, gnuplot, libreadline-dev, libxt-dev, libscotch-dev, and libopenmpi-dev. Any other suggestions on what to do? Thank you.

Best Regards,
pfinlay1

wyldckat August 10, 2011 13:51

Hi pfinlay1,

Here is a more complete list of packages: http://www.cfd-online.com/Forums/ope...tml#post268828

From there, I think you are missing these:
Code:

libxi-dev libxrender-dev libxrandr-dev libxcursor-dev libxinerama-dev libfreetype6-dev libfontconfig1-dev libglib2.0-dev freeglut3-dev
The one in bold is the critical one and the other ones I can't remember if they are still necessary for newer Ubuntu versions...

Another thing you're probably missing is the drivers for the graphics card, which should also carry necessary OpenGL stuff.

Best regards,
Bruno

pfinlay1 August 11, 2011 03:42

Hi Bruno,

Ok, I will install the packages you mentioned and give it a go. As for the driver for the graphics card, how would I go about finding that? Thanks.

Regards,
pfinlay1

wyldckat August 11, 2011 06:01

Hi pfinlay1,

This should help: How to Add Proprietary Drivers to Ubuntu 10.04

Although since it might need internet connection, check this blog post: Linux find out graphics card installed in my system

And when you find out which card your machine has... search with Google? ;)

Best regards,
Bruno

pfinlay1 August 12, 2011 04:23

Hi Bruno,

Awesome. Paraview installed and I could run it, but then I restarted. Now when I type paraview into the command line it says that it isn't installed.. Do I need to reinstall? Thanks.

Regards,
pfinlay1

wyldckat August 12, 2011 09:44

Hi pfinlay1,

Mmm... is the paraview binary the only one that stopped working, or other OpenFOAM commands also stopped working?

pfinlay1 August 16, 2011 06:58

Hi Bruno,

It's just paraview... openfoam still runs.

wyldckat August 16, 2011 07:14

Hi pfinlay1,

Well that's odd... OK, if I remember correctly, you compiled ParaView from source, correct? Then what do the following commands output :confused::
Code:

echo $ParaView_DIR
ls -l $ParaView_DIR

If the second doesn't output anything, then something went wrong somewhere along the way :( Possibly you accidentally removed the folder or something else happened.

You can try to find where it might have gone to, by running:
Code:

find / -name paraview
This will take a while to complete, since it will look for the file named "paraview" in the whole system. At least this way you can verify if the ParaView you built went accidentally somewhere else...
If you want it to be faster, then run like this:
Code:

find $HOME -name paraview
Best regards,
Bruno

pfinlay1 August 16, 2011 10:18

1 Attachment(s)
Hi Bruno,

echo $ParaView_DIR does not output anything (guessing that means I was in the wrong directory?)
I have attached the outputs from ls -l $ParaView_DIR and find $HOME -name paraview. Thanks!

Regards,
pfinlay1

wyldckat August 16, 2011 10:31

Hi pinflay1,

Interesting... it looks like before you rebooted your machine, you had the OpenFOAM environment set to 32bit, under which you built ParaView. But after rebooting, it probably went back to the default 64bit, therefore not finding the other version you built!

Try running this:
Code:

wm32
which paraview

The first line will activate the 32bit environment and hopefully pick up on the ParaView version you built!

If this works, do you remember if you tried or did build both 32 and 64bit versions of OpenFOAM? If so, you might also need to build the respective 64bit version of ParaView.

Best regards,
Bruno

pfinlay1 August 17, 2011 05:47

Hi Bruno,

When I type in 'wm32', it doesn't even recognize it as a command... Just fyi, I remember when I installed Ubuntu 10.04 I chose 32 bit, so not sure if it can even run in 64 bit. Thanks.

Regards,
pfinlay1

wyldckat August 17, 2011 07:41

Hi pfinlay1,

This is starting to look very strange indeed! OK, the only thing that comes to my mind right now is that you have more than one OpenFOAM installation in your machine.

So I would advise you to check the "~/.bashrc" file and see what lines you might have added for OpenFOAM. If there is more than one line there, then leave active only the one that has your own build!

If you want to have more than one OpenFOAM installation, then use aliases. For example:
Code:

alias of17x='source $HOME/OpenFOAM/OpenFOAM-1.7.x/etc/bashrc'
alias of20x='source $HOME/OpenFOAM/OpenFOAM-2.0.x/etc/bashrc'

Then call the respective alias for the desired OpenFOAM version; for example, when you want the 2.0.x version, simply run of20x. Keep in mind that you can only run one of them for each new terminal window/tab. Changing environments in the same terminal is not supported in versions prior to 2.0.

But, if you only have one OpenFOAM installation, then something is definitely going wrong here. The wm32 command should have worked as intended! If indeed you only have one installation, then you can try and edit OpenFOAM's "etc/bashrc" file and change the following entry:
Code:

export WM_ARCH_OPTION=64
To this:
Code:

export WM_ARCH_OPTION=32
Save the file. Then start a new terminal, just to make sure you start with a clean environment and then check if all is working as intended!

Best regards,
Bruno

pfinlay1 August 17, 2011 07:58

1 Attachment(s)
Hi Bruno,

Tricky problem indeed, isn't it! I looked at the ./bashrc file and only found the one source line I added. I attached it just in case I missed something. As well, changing the one line didn't do anything... OpenFOAM still runs, but when I go to post process with 'paraFoam', it says paraview isn't installed. Thanks!

Regards,
pfinlay1

wyldckat August 17, 2011 08:59

Hi pfinlay1,

Good thing you attached your bashrc file! There is a misunderstanding about the differences between OpenFOAM's "bashrc" file and your home's ".bashrc" file! Let me explain:
  1. Remove that line you added on the end of the "bashrc" file. It's not meant to be there. Being there should in fact block your machine inside an infinite loop!
  2. Now, OpenFOAM's bashrc file is "$HOME/OpenFOAM/OpenFOAM-2.0.0/etc/bashrc" and has all of the necessary details for setting up OpenFOAM's environment.
  3. Then there is "$HOME/.bashrc" file. Notice the dot "." after the slash "/". This is the file I was talking about earlier, which should indeed have this line:
    Code:

    source $HOME/OpenFOAM/OpenFOAM-2.0.0/etc/bashrc
  4. Once things are in their proper place and saved, start a new terminal and check if all is running as expected!
Good luck!
Bruno

pfinlay1 August 18, 2011 08:45

Hi Bruno,

Oh... whoops. It all makes sense now. Everything is working perfectly! Thank you so much for your help!

Regards,
pfinlay1


All times are GMT -4. The time now is 11:15.