Building moose with VTK

369 views
Skip to first unread message

jason kim

unread,
Feb 12, 2016, 7:07:55 AM2/12/16
to moose-users
Hi, I am working on building moose with VTK.

I installed VTK on linux cluster following wiki : http://www.vtk.org/Wiki/VTK/Configure_and_Build

After build VTK, I looked for VTK include and library path to link to moose in configuration step (VTKINCLUDE_DIR, VTKLIB_DIR).
But I could not find include path except library  in VTK-build directory.

Perhaps, is there "another version" of VTK including include path? or is there different way to build moose with VTK?  

Thanks in advance for any help.

Peterson, JW

unread,
Feb 12, 2016, 10:03:57 AM2/12/16
to moose-users
On Fri, Feb 12, 2016 at 5:01 AM, jason kim <miroite...@gmail.com> wrote:

Hi, I am working on building moose with VTK.

I installed VTK on linux clusterfollowing wiki : http://www.vtk.org/Wiki/VTK/Configure_and_Build

After build VTK, I looked for VTK include and library path to link to moose in configuration step (VTKINCLUDE_DIR, VTKLIB_DIR).
But I could not find include path except library  in VTK-build directory.

I'm not sure exactly what you're saying here.  Are you saying that

ls $VTKINCLUDE_DIR 

prints nothing?  Did you possibly forget to 'make install' or was there an error during make install?

--
John

Miller, Jason M

unread,
Feb 12, 2016, 10:07:11 AM2/12/16
to moose...@googlegroups.com
Jason,

Depending on where you prefix'd your installation, VTKINCLUDE_DIR and VTKLIB_DIR _might_ be needing to be set to the following:

VTKINCLUDE_DIR=<PREFIX>/include/vtk-<version>
VTKLIB_DIR=<PREFIX>/lib

If you are planing on using the Python implantation of VTK:

PYTHONPATH=$PYTHONPATH:<PREFIX>/lib/python2.7/site-packages

Note: your python version may vary.

Hope this helps
Jason


--
You received this message because you are subscribed to the Google Groups "moose-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to moose-users...@googlegroups.com.
Visit this group at https://groups.google.com/group/moose-users.
To view this discussion on the web visit https://groups.google.com/d/msgid/moose-users/1e86a351-4aa9-40e6-9525-32e85b06bee2%40googlegroups.com.

For more options, visit https://groups.google.com/d/optout.

jason kim

unread,
Feb 12, 2016, 9:32:11 PM2/12/16
to moose-users
Thank for reply,

I meant that there is no include path of VTK, though there was no error in building VTK.
So I could not type the path in VTKINCLUDE_DIR and install moose with VTK, 

Thanks


2016년 2월 13일 토요일 오전 12시 3분 57초 UTC+9, jw.peterson 님의 말:

jason kim

unread,
Feb 12, 2016, 9:37:35 PM2/12/16
to moose-users
Thanks for reply,

As mentioned above, I could not find include path of VTK after building based on Wiki.
So, I could not set include path of VTK in configure step of moose.
Should VTK-build directory have include directory? (I also feel odd that there is no include directory in VTK, but there was no error during install)

Thanks

2016년 2월 13일 토요일 오전 12시 7분 11초 UTC+9, jason.miller 님의 말:

Miller, Jason M

unread,
Feb 15, 2016, 9:31:44 AM2/15/16
to moose...@googlegroups.com
Jason,

You are correct that the build directory will not be the correct directory. What we need is the installation directory (make install). What was your configure line when you built VTK?

cmake ../../VTK-6.3.0 \
      -DCMAKE_INSTALL_PREFIX=$PACKAGES_DIR/vtk-6.3/gcc-opt \
      -DCMAKE_BUILD_TYPE=Release \
      -DVTK_Group_Rendering=OFF \
      -DVTK_WRAP_PYTHON=ON \
      -Wno-dev

I am interested in the  '-DCMAKE_INSTALL_PREFIX=$PACKAGES_DIR/vtk-6.3/gcc-opt'   configure line. In our case, $PACKAGES_DIR is /opt/moose at the time, so the include directory will be located at:

  /opt/moose/vtk-6.3/gcc-opt/include/vtk-6.3

Hence why I was originally pointing you towards the '<PREFIX>' hint. What ever prefix variable you had set at the time, will be the installation location (containing lib, bin and include). I suppose there is a chance you did not supply that configure line, in which case most applications will default their installation path to:  /usr/local/<application name>, and so you might want to check that area for a VTK directory, or even the include directory itself.

It'll be somewhere!
Jason






jason kim

unread,
Feb 16, 2016, 1:33:03 AM2/16/16
to moose-users
Hi, .

My configure line was :
cmake -DQT_QMAKE_EXECUTABLE:PATH=/home/miroiterie/qt-4.8.6-build/qt-everywhere-opensource-src-4.8.6/bin/qmake \
      -DVTK_Group_Qt:BOOL=ON \
      -DBUILD_SHARED_LIBRARIES:BOOL=ON \
      /home/miroiterie/VTK

I did not set prefix. Also I could not find VTK directory in /usr/local, Building VTK seems incomplete. I'll install again with prefix setting.It is helpful!
My question might be trivial, but thanks for kind response.

2016년 2월 15일 월요일 오후 11시 31분 44초 UTC+9, jason.miller 님의 말:
Message has been deleted

jason kim

unread,
Feb 19, 2016, 8:16:46 AM2/19/16
to moose-users
I'd like to ask one more question.

I installed VTK well and tried to build with VTK.
I correctly set VTK_DIR, VTKINCLUDE_DIR and VTKLIB_DIR in bashrc and bash_profile. After that I ran the script :
./update_and_rebuild_libmesh.sh --enable-vtk


But it did not recognize VTK library path like below error. Please see attached configure.
I checked library path several time.

ld: warning: libvtkCommonExecutionModel-6.3.so.1, needed by /home/kuk1728/current_works/moose/vtk-6.3/gcc-opt/lib/libvtkIOCore-6.3.so, not found (try using -rpath or -rpath-link)

Should I build VTK again?
Thanks for help in advance again.


2016년 2월 16일 화요일 오후 3시 33분 3초 UTC+9, jason kim 님의 말:
config.log

Jason Miller

unread,
Feb 23, 2016, 12:30:45 PM2/23/16
to moose...@googlegroups.com
Jason, 

Sorry the delay, I've been out sick for the past few days.

You probably need to set an LD_LIBRARY_PATH variable pointing to your vtk-6.3/gcc-opt/lib  directory:

  export LD_LIBRARY_PATH=/home/kuk1728/current_works/moose/vtk-6.3/gcc-opt/lib:$LD_LIBRARY_PATH

Try rebuilding libMesh after you run that command (in the same terminal you issued the above command). If this works, know that your export command above only works for the current terminal session you have opened. If you need to make this more permanent you can add that command to your ~/.bashrc  (or ~/.bash_profile  which ever you already are using).

Jason




jason kim

unread,
Feb 24, 2016, 7:28:17 PM2/24/16
to moose-users

I just compiled moose and tested successfully!
Setting an LD_LIBRARY_PATH was worked.

I hope you get better.
Thanks for kind help!
Jason Kim.

2016년 2월 24일 수요일 오전 2시 30분 45초 UTC+9, Jason Miller 님의 말:

Miller, Jason M

unread,
Feb 25, 2016, 9:14:59 AM2/25/16
to moose...@googlegroups.com
Glad to hear it!

Cheers =D
jason

Reply all
Reply to author
Forward
0 new messages