elmerGUI installation on Debian Lenny (1)

Discussion about building and installing Elmer
Ahmed
Posts: 40
Joined: 31 Aug 2009, 20:10
Location: NY

elmerGUI installation on Debian Lenny (1)

Post by Ahmed »

I decided on a clean and fresh install for elmerGUI on my Debian Lenny partition.
I have uncommented the EG_OCC entry, but I get the following error messages
Project MESSAGE: EG_OCC has been defined, but BRepTools.hxx was not found
Project MESSAGE: check OCC_INCLUDEPATH or undefine EG_OCC in ElmerGUI.pri

before jumping to wrong conclusiones here is the output of the dpkg command

ahmed@debian:~$ dpkg -l | grep opencascade
ii libopencascade-dev 6.3.0.dfsg.1-2 OpenCASCADE CAE platform library development
ii libopencascade-foundation-6.3.0 6.3.0.dfsg.1-2 OpenCASCADE CAE platform shared library
ii libopencascade-foundation-dev 6.3.0.dfsg.1-2 OpenCASCADE CAE platform library development
ii libopencascade-modeling-6.3.0 6.3.0.dfsg.1-2 OpenCASCADE CAE platform shared library
ii libopencascade-modeling-dev 6.3.0.dfsg.1-2 OpenCASCADE CAE platform library development
ii libopencascade-ocaf-6.3.0 6.3.0.dfsg.1-2 OpenCASCADE CAE platform shared library
ii libopencascade-ocaf-dev 6.3.0.dfsg.1-2 OpenCASCADE CAE platform library development
ii libopencascade-ocaf-lite-6.3.0 6.3.0.dfsg.1-2 OpenCASCADE CAE platform shared library
ii libopencascade-ocaf-lite-dev 6.3.0.dfsg.1-2 OpenCASCADE CAE platform library development
ii libopencascade-visualization-6.3.0 6.3.0.dfsg.1-2 OpenCASCADE CAE platform shared library
ii libopencascade-visualization-dev 6.3.0.dfsg.1-2 OpenCASCADE CAE platform library development
ii libopencascade6.2 6.2-7 OpenCASCADE CAE platform shared library
ii opencascade-draw 6.3.0.dfsg.1-2 OpenCASCADE CAE platform shared library
ii opencascade-wok 6.3.0.dfsg.1-2 OpenCASCADE CAE platform shared library

I have downloaded every thing related to opencascade from the Debian repositories using the synaptics package manager that would take care of the proper installation and declarations.

where can I find the missing file
thank you for reading my post and good luck to all
mal
Site Admin
Posts: 54
Joined: 21 Aug 2009, 14:21

Re: elmerGUI installation on Debian Lenny (1)

Post by mal »

Project MESSAGE: check OCC_INCLUDEPATH or undefine EG_OCC in ElmerGUI.pri:

Code: Select all

#------------------------------------------------------------------------------
# OpenCASCADE library:
#------------------------------------------------------------------------------
unix {
   OCC_INCLUDEPATH = /usr/local/inc
   OCC_LIBPATH = /usr/local/lib
   OCC_LIBS = -lTKBRep -lTKSTL -lTKSTEP -lTKIGES
}
You might want to change the value of OCC_INCLUDEPATH and OCC_LIBPATH to match your setup.
Ahmed
Posts: 40
Joined: 31 Aug 2009, 20:10
Location: NY

Re: elmerGUI installation on Debian Lenny (1)

Post by Ahmed »

Hello There
I have modified the Open Cascade library entry on the ElmerGUI.pri to be as follows

# OpenCASCADE library:
#------------------------------------------------------------------------------
unix {
OCC_INCLUDEPATH = /usr/include/opencascade
OCC_LIBPATH = /usr/lib
OCC_LIBS = libopencascade-modeling-6.3.0
}

then qmake did not produce the previous message about the missing xxxx.hxx file or any message at all, except the ELMERGUI_HOME=/usr/local/bin.

When running the make command, it terminated with the following errors

cad/cadview.cpp:46:24: error: QVTKWidget.h: No such file or directory
cad/cadview.cpp:47:25: error: vtkRenderer.h: No such file or directory
cad/cadview.cpp:48:29: error: vtkRenderWindow.h: No such file or directory
cad/cadview.cpp:49:22: error: vtkActor.h: No such file or directory
cad/cadview.cpp:50:23: error: vtkPoints.h: No such file or directory
cad/cadview.cpp:51:25: error: vtkTriangle.h: No such file or directory
cad/cadview.cpp:52:30: error: vtkDataSetMapper.h: No such file or directory
cad/cadview.cpp:53:32: error: vtkPolyDataNormals.h: No such file or directory
cad/cadview.cpp:54:29: error: vtkFeatureEdges.h: No such file or directory
cad/cadview.cpp:55:25: error: vtkProperty.h: No such file or directory
cad/cadview.cpp:56:27: error: vtkPropPicker.h: No such file or directory
cad/cadview.cpp:57:32: error: vtkCallbackCommand.h: No such file or directory
cad/cadview.cpp:58:31: error: vtkPolyDataMapper.h: No such file or directory
cad/cadview.cpp:59:31: error: vtkAppendPolyData.h: No such file or directory
cad/cadview.cpp:60:27: error: vtkFloatArray.h: No such file or directory
cad/cadview.cpp:61:30: error: vtkCleanPolyData.h: No such file or directory
cad/cadview.cpp:84: error: variable or field ‘pickEventHandler’ declared void
cad/cadview.cpp:84: error: ‘vtkObject’ was not declared in this scope
cad/cadview.cpp:84: error: ‘caller’ was not declared in this scope
cad/cadview.cpp:84: error: expected primary-expression before ‘unsigned’
cad/cadview.cpp:85: error: expected primary-expression before ‘void’
cad/cadview.cpp:85: error: expected primary-expression before ‘void’
make[1]: *** [tmp/cadview.o] Error 1
make[1]: Leaving directory `/home/ahmed/elmer/trunk/ElmerGUI/Application'
make: *** [sub-Application-make_default] Error 2
ahmed@debian:~/elmer/trunk/ElmerGUI$

so what is missing now?

Please help and be patient till we get Elmer running on Debian Lenny

Thank you and good luck
mal
Site Admin
Posts: 54
Joined: 21 Aug 2009, 14:21

Re: elmerGUI installation on Debian Lenny (1)

Post by mal »

Please do not modify the OCC_LIBS variable. Only adjust OCC_INCLUDEPATH and OCC_LIBPATH to tell the compiler from where to look for OCC headers and libraries.

Next, you should do the same with the VTK block in the ElmerGUI.pri file. Modify the *PATH entries to tell the compiler from where to look for VTK headers and libraries.
Ahmed
Posts: 40
Joined: 31 Aug 2009, 20:10
Location: NY

Re: elmerGUI installation on Debian Lenny (1)

Post by Ahmed »

Hello There
My apologies for a long post, but If I follow your last instructions I would have produced a very long list of error messages that would not allow a reasonable post.
so please be patient and bear with me

I have remodified the ElmerGUI.pri,
Here is the entry for the Opencascade

# OpenCASCADE library:
#------------------------------------------------------------------------------
unix {
OCC_INCLUDEPATH = /usr/include/opencascade
OCC_LIBPATH = /usr/lib
OCC_LIBS = /usr/lib/libTKIGES-6.3.0.so \
/usr/lib/libTKSTEP-6.3.0.so \
/usr/lib/libTKBRep-6.3.0.so \
/usr/lib/libTKSTL-6.3.0.so
}

If I do not give the full name of the libraries as above, make gives a ton of error messages about not being able to find them.
based on this experience, I modified the entry for VTK, here it is


# VTK library:
#------------------------------------------------------------------------------
unix {
VTK_INCLUDEPATH = /usr/include/vtk-5.0
VTK_LIBPATH = /usr/lib
VTK_LIBS = /usr/lib/libvtkHybrid.so.5.0.4 \
/usr/lib/libvtkWidgets.so.5.0.4 \
/usr/lib/libQVTK.so.5.0.4
}

with these two modifications, make starts to complain about matc, etc.

Finally I modified the Optional components list, here it is

# Optional components (undefine or comment out to exclude from compilation):
#------------------------------------------------------------------------------
#DEFINES += EG_QWT # Use QWT for convergence monitor?
DEFINES += EG_VTK # Use VTK for postprocessing?
#DEFINES += EG_MATC # Use MATC for internal operations in postprocessing?
DEFINES += EG_OCC # Use OpenCASCADE 6.3 for importing CAD files? Needs VTK.
#DEFINES -= EG_PYTHONQT # Use PythonQt for scripting in post processor?

#------------------------------------------------------------------------------
Just the Open Cascade and the VTK components are active, here is a list of error messages that were produced by make

ahmed@debian:~/elmer/trunk/ElmerGUI$ make
cd matc/ && make -f Makefile
make[1]: Entering directory `/home/ahmed/elmer/trunk/ElmerGUI/matc'
/usr/bin/qmake -unix -o Makefile matc.pro
make[1]: Leaving directory `/home/ahmed/elmer/trunk/ElmerGUI/matc'
make[1]: Entering directory `/home/ahmed/elmer/trunk/ElmerGUI/matc'
make[1]: Nothing to be done for `first'.
make[1]: Leaving directory `/home/ahmed/elmer/trunk/ElmerGUI/matc'
cd netgen/ && make -f Makefile
make[1]: Entering directory `/home/ahmed/elmer/trunk/ElmerGUI/netgen'
/usr/bin/qmake -unix -o Makefile netgen.pro
make[1]: Leaving directory `/home/ahmed/elmer/trunk/ElmerGUI/netgen'
make[1]: Entering directory `/home/ahmed/elmer/trunk/ElmerGUI/netgen'
make[1]: Nothing to be done for `first'.
make[1]: Leaving directory `/home/ahmed/elmer/trunk/ElmerGUI/netgen'
cd Application/ && make -f Makefile
make[1]: Entering directory `/home/ahmed/elmer/trunk/ElmerGUI/Application'
/usr/bin/qmake -unix -o Makefile Application.pro
make[1]: Leaving directory `/home/ahmed/elmer/trunk/ElmerGUI/Application'
make[1]: Entering directory `/home/ahmed/elmer/trunk/ElmerGUI/Application'
g++ -o ElmerGUI tmp/bodypropertyeditor.o tmp/boundarydivision.o tmp/boundarypropertyeditor.o tmp/checkmpi.o tmp/dynamiceditor.o tmp/edfeditor.o tmp/egini.o tmp/generalsetup.o tmp/glcontrol.o tmp/glwidget.o tmp/helpers.o tmp/main.o tmp/mainwindow.o tmp/materiallibrary.o tmp/maxlimits.o tmp/meshcontrol.o tmp/meshingthread.o tmp/meshtype.o tmp/meshutils.o tmp/operation.o tmp/parallel.o tmp/projectio.o tmp/sifgenerator.o tmp/sifwindow.o tmp/solverparameters.o tmp/summaryeditor.o tmp/egconvert.o tmp/egmain.o tmp/egmesh.o tmp/egnative.o tmp/egutils.o tmp/elmergrid_api.o tmp/nglib_api.o tmp/tetlib_api.o tmp/renderarea.o tmp/twodview.o tmp/curveeditor.o tmp/axes.o tmp/featureedge.o tmp/vtkpost.o tmp/isosurface.o tmp/isocontour.o tmp/epmesh.o tmp/colorbar.o tmp/meshpoint.o tmp/meshedge.o tmp/surface.o tmp/preferences.o tmp/vector.o tmp/readepfile.o tmp/streamline.o tmp/timestep.o tmp/ecmaconsole.o tmp/text.o tmp/cadview.o tmp/cadpreferences.o tmp/moc_bodypropertyeditor.o tmp/moc_boundarydivision.o tmp/moc_boundarypropertyeditor.o tmp/moc_dynamiceditor.o tmp/moc_edfeditor.o tmp/moc_egini.o tmp/moc_generalsetup.o tmp/moc_glcontrol.o tmp/moc_glwidget.o tmp/moc_mainwindow.o tmp/moc_materiallibrary.o tmp/moc_meshcontrol.o tmp/moc_meshingthread.o tmp/moc_parallel.o tmp/moc_projectio.o tmp/moc_sifwindow.o tmp/moc_solverparameters.o tmp/moc_summaryeditor.o tmp/moc_renderarea.o tmp/moc_twodview.o tmp/moc_curveeditor.o tmp/moc_axes.o tmp/moc_featureedge.o tmp/moc_vtkpost.o tmp/moc_isosurface.o tmp/moc_isocontour.o tmp/moc_colorbar.o tmp/moc_meshpoint.o tmp/moc_meshedge.o tmp/moc_surface.o tmp/moc_preferences.o tmp/moc_vector.o tmp/moc_readepfile.o tmp/moc_streamline.o tmp/moc_timestep.o tmp/moc_ecmaconsole.o tmp/moc_text.o tmp/moc_cadview.o tmp/moc_cadpreferences.o tmp/qrc_ElmerGUI.o -L../netgen/ngcore -L/usr/lib -L/usr/X11R6/lib -lng /usr/lib/libvtkHybrid.so.5.0.4 /usr/lib/libvtkWidgets.so.5.0.4 /usr/lib/libQVTK.so.5.0.4 /usr/lib/libTKIGES-6.3.0.so /usr/lib/libTKSTEP-6.3.0.so /usr/lib/libTKBRep-6.3.0.so /usr/lib/libTKSTL-6.3.0.so -lQtScript -lQtXml -lQtOpenGL -lQtGui -lQtCore -lQtUiTools -lGLU -lGL -lpthread
tmp/mainwindow.o: In function `MainWindow::solverStdoutSlot()':
mainwindow.cpp:(.text+0x1aa89): undefined reference to `ConvergenceView::appendData(double, QString)'
mainwindow.cpp:(.text+0x1ab51): undefined reference to `ConvergenceView::appendData(double, QString)'
tmp/mainwindow.o: In function `MainWindow::meshSplitterFinishedSlot(int)':
mainwindow.cpp:(.text+0x26c5a): undefined reference to `ConvergenceView::removeData()'
tmp/mainwindow.o: In function `MainWindow::runsolverSlot()':
mainwindow.cpp:(.text+0x27597): undefined reference to `ConvergenceView::removeData()'
tmp/mainwindow.o: In function `MainWindow::MainWindow()':
mainwindow.cpp:(.text+0x31e78): undefined reference to `ConvergenceView::ConvergenceView(Limit*, QWidget*)'
tmp/mainwindow.o: In function `MainWindow::MainWindow()':
mainwindow.cpp:(.text+0x335d8): undefined reference to `ConvergenceView::ConvergenceView(Limit*, QWidget*)'
tmp/vtkpost.o: In function `VtkPost::addScalarField(QString, int, double*)':
vtkpost.cpp:(.text+0x227f): undefined reference to `var_check'
vtkpost.cpp:(.text+0x22ab): undefined reference to `var_new'
tmp/vtkpost.o: In function `VtkPost::domatcSlot()':
vtkpost.cpp:(.text+0x23d4): undefined reference to `Matc::domatc(VtkPost*)'
tmp/vtkpost.o: In function `VtkPost::VtkPost(QWidget*)':
vtkpost.cpp:(.text+0x8430): undefined reference to `Matc::Matc(QWidget*)'
tmp/vtkpost.o: In function `VtkPost::VtkPost(QWidget*)':
vtkpost.cpp:(.text+0xac00): undefined reference to `Matc::Matc(QWidget*)'
tmp/vtkpost.o: In function `VtkPost::redrawSlot()':
vtkpost.cpp:(.text+0xd6f8): undefined reference to `var_check'
vtkpost.cpp:(.text+0xd77a): undefined reference to `Matc::domatc(VtkPost*)'
vtkpost.cpp:(.text+0xd918): undefined reference to `var_new'
tmp/vtkpost.o: In function `VtkPost::addVectorField(QString, int)':
vtkpost.cpp:(.text+0xda1a): undefined reference to `var_check'
vtkpost.cpp:(.text+0xda4d): undefined reference to `var_new'
tmp/vtkpost.o: In function `VtkPost::ReadPostFile(QString)':
vtkpost.cpp:(.text+0xe672): undefined reference to `var_delete'
vtkpost.cpp:(.text+0xf6fd): undefined reference to `mtc_domath'
vtkpost.cpp:(.text+0xf74e): undefined reference to `var_check'
vtkpost.cpp:(.text+0xfb4e): undefined reference to `var_check'
collect2: ld returned 1 exit status
make[1]: *** [ElmerGUI] Error 1
make[1]: Leaving directory `/home/ahmed/elmer/trunk/ElmerGUI/Application'
make: *** [sub-Application-make_default] Error 2
ahmed@debian:~/elmer/trunk/ElmerGUI$

as you can see I am trying my best to compile the programme so it can run on my Debian partition, so I kindly ask you to be patient till we solve this situation.

Thank you and good luck.

NB 1: if you want, I can send you the errors produced if I do not write the full names of the libraries.
NB 2: I promise to write the result of my experience on the CFD-online forum, that will definitely help other Debian/Elmer would be's
and as I told you on my second post, The Elmer files on the opennovation repository are broken
mal
Site Admin
Posts: 54
Joined: 21 Aug 2009, 14:21

Re: elmerGUI installation on Debian Lenny (1)

Post by mal »

Please do not modify the *LIBS variables. Change only the *PATH variables to match your installation.

The defaults in ElmerGUI.pri (svn) should now comply with the 32-bit Debian 5.0 Linux distribution.

In case of 64-bit distributions, set BITS=64 in ElmerGUI.pri.

The following packages are prerequisites and should be installed before compiling ElmerGUI:

Code: Select all

# apt-get install build-essential libqt4-dev libqwt5-qt4-dev libvtk5-qt4-dev libopencascade-dev
Compile and install the program as follows:

Code: Select all

$ cd ElmerGUI
$ qmake
$ make
# make install
Finally, export the following environment variables (you might want to append the lines at the end of your ~/.bashrc file):

Code: Select all

export ELMER_HOME=/usr/local
export ELMERGUI_HOME=$ELMER_HOME/bin
export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:$ELMER_HOME/lib
Start the program by typing

Code: Select all

$ ElmerGUI
Ahmed
Posts: 40
Joined: 31 Aug 2009, 20:10
Location: NY

Re: elmerGUI installation on Debian Lenny (1)

Post by Ahmed »

Hello There
Finally it is running on my Debian Partition, Good news to start this post, now to the details

First: I deleted every thing that have been downloaded before and started a new download from the svn repository.
Second: Copied the Quick Start script from your web portal to the trunk folder created by the svn download.
When sourcing the file, I noticed a huge amount of error messages related to mpi, hypre,..etc.
After the initial shock, I checked my system to see if mpi is installed or not, finally I started to check the configuration files of each module
And there I found the culprit of all the problems, all modules downloaded from the svn are configured to produce 64 bits binaries (by default.)
So I modified the configuration flag, rerun the script and Voila. Every thing compiles nicely and here I have even the ElmerGUI running as healthy as you can imagine.

Here I print the modified Quick Start script for the benefit of all debian users in particular and everyone in general


#!/bin/sh -f
# Compile Elmer modules and install it
#

# replace these with your compilers:
export CC=gcc
export CXX=g++
export FC=gfortran
export F77=gfortran

# the original modules list has been commented, the one I use does not have the fem module
# it produced errors related to the Hypre library available on my computer.
# modules="matc umfpack mathlibs elmergrid meshgen2d eio hutiter fem"
modules="matc umfpack mathlibs elmergrid meshgen2d eio hutiter"
for m in $modules; do
cd $m
./configure --prefix=/home/ahmed/elmer --with-64bits=no
make
make install
cd ..
done

# This is my modification to install module fem. It is based on the convenience script available from your web portal

SRC=http://www.nic.funet.fi/pub/sci/physics/elmer/src
wget $SRC/fem-5.4.0.tar.gz
if test -e fem-5.4.0.tar.gz
then
echo Succesfully downloaded: fem-5.4.0.tar.gz
else
echo Unable to download: fem-5.4.0.tar.gz
return
fi

tar xvzf fem-5.4.0.tar.gz
cd fem-5.4.0
./configure --prefix=/home/ahmed/elmer --with-64bits=no
make
make install
make check
cd ..

you see, I am a stubborn man, and at my age I do not like to be called the town fool for no reason of mine, and when I start a job I finish it to the best of my ability and knowledge. I am not a professional programmer, just an old mechanical engineer.

I hope that you will confirm what I have written before and take whatever you deem suitable
I also hope that you give me a hand to install the tetgen library, I downloaded it and compiled as per the instructions and I have produced
a libtet.a file, my question is where Should I copy that file so that ElmerGUI can find it?

I thank you for your patience and collaboration

NB: When I ran the apt-get command, it reported that my system was up to date
NB: I plan to run one or two test cases of my choice then I will post every thing on the CFD online forum

Good luck to all and thank you for producing Elmer
Ahmed
Posts: 40
Joined: 31 Aug 2009, 20:10
Location: NY

Re: Compiling fem module on Debian Lenny (1)

Post by Ahmed »

Pilgrim
Are you ok? It has been a week now since my last post and no answer from you, I am worried about my partner in solving problems related to Elmer compilation on my Debian partition.
As I told you before, the configuration flag for producing 64 bits code has to be set to no, after that, the compilation went smooth and the programme runs fine (check the attached screen shot) Except the fem module.
The error messages produced during the compilation of the fem module refer to function calls to the MPI and Hypre libraries, I guess you can either
1- include these two libraries in the svn repositories and install them locally within the Elmer folder, or
2- Publish the exact version numbers you used, so one can try to install them
Any way you choose, please let me know your decision.
I hope you are well and enjoying the development of this interesting project.
Thanks to every one
Sorry, it is not possible to load the picture on your server, but you can view it on the CFD-onLine forum
hazelsct
Posts: 153
Joined: 05 Oct 2009, 17:02
Location: Boston, MA, USA
Contact:

Re: elmerGUI installation on Debian Lenny (1)

Post by hazelsct »

Hi,

There is a Debian package for Elmer in unstable, with a lenny backport at: http://www.opennovation.org/debian/ .

This is also in the Wiki under Compilation and Installation.

I'd be happy to follow up on any comments or suggestions you have for the package.

-Adam
Ahmed
Posts: 40
Joined: 31 Aug 2009, 20:10
Location: NY

Re: elmerGUI installation on Debian Lenny (1)

Post by Ahmed »

It is broken, it gives the same error (Unable to start solver)
please see my other post on Compiling Tetgen
I first downloaded it, but when trying to use it, it gave that bloody error
so please read that post, the bug and how to solve the problem is detailed there
Good Luck
Post Reply