Libmesh not compiling with VTK

189 views
Skip to first unread message

tas...@trinity.edu

unread,
Nov 8, 2017, 1:08:09 PM11/8/17
to moose-users
I want to use the ImageSampler to analyze a stack of input images but am receiving the error "libmesh must be configured with VTK enabled to utilize ImageSampler". However I've used the two necessary flags when running update_and_rebuild_libmesh.sh while in /moose/scripts/, i.e. --with-vtk-include=$VTKINCLUDE_DIR and --with-vtk-lib=$VTKLIB_DIR. The script output shows "vtk........yes, version.......7.1.0" so it should be available for my app. I also loaded the appropriate modules, moose-dev-clang, advanced_modules, and vtk-clang, before running update_and_rebuild, as per the PhaseField/ImageReader page on the MOOSE site. What am I missing?

Cody Permann

unread,
Nov 8, 2017, 1:22:31 PM11/8/17
to moose...@googlegroups.com
Well that's it, it should be working. We are going to have to play detective once more to find the problem. Are you on a Linux system or Mac OS? Did you make sure to load the modules and keep them loaded both for the compilation and when running? Please attach your libMesh config.log (You can find this in the ./libmesh/build directory). Anything else special about what you are doing? We routinely use and test this capability so we know it's working.



On Wed, Nov 8, 2017 at 11:08 AM <tas...@trinity.edu> wrote:
I want to use the ImageSampler to analyze a stack of input images but am receiving the error "libmesh must be configured with VTK enabled to utilize ImageSampler". However I've used the two necessary flags when running update_and_rebuild_libmesh.sh while in /moose/scripts/, i.e. --with-vtk-include=$VTKINCLUDE_DIR and --with-vtk-lib=$VTKLIB_DIR. The script output shows "vtk........yes, version.......7.1.0" so it should be available for my app. I also loaded the appropriate modules, moose-dev-clang, advanced_modules, and vtk-clang, before running update_and_rebuild, as per the PhaseField/ImageReader page on the MOOSE site. What am I missing?

--
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/b3a730bb-b8c7-4c21-81bc-a53fc7fc76f8%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

tas...@trinity.edu

unread,
Nov 8, 2017, 1:47:55 PM11/8/17
to moose-users
I'm on Sierra 10.12.5, running package version 36. I made sure to load the modules before running the rebuild script, and they showed up in my module list afterwards as well. There shouldn't be anything special about my app and I fully believe something is flipped on my local machine. I do remember seeing a few warnings in the libmesh output, mostly in the form of unused variables or parameters
config.log

Peterson, JW

unread,
Nov 8, 2017, 3:36:46 PM11/8/17
to moose-users
On Wed, Nov 8, 2017 at 11:47 AM, <tas...@trinity.edu> wrote:
I'm on Sierra 10.12.5, running package version 36. I made sure to load the modules before running the rebuild script, and they showed up in my module list afterwards as well. There shouldn't be anything special about my app and I fully believe something is flipped on my local machine. I do remember seeing a few warnings in the libmesh output, mostly in the form of unused variables or parameters

Looks like you can only get this error if

LIBMESH_HAVE_VTK

is not defined in $MOOSE_DIR/libmesh/installed/include/libmesh/libmesh_config.h

Can you look in your copy of that file and see what it says?

--
John

tas...@trinity.edu

unread,
Nov 8, 2017, 3:42:03 PM11/8/17
to moose-users
>grep VTK libmesh_config.h

#define LIBMESH_CONFIGURE_INFO "../configure  'INSTALL=/Users/intern/projects/moose/scripts/../libmesh/build-aux/install-sh -C' '--with-methods=opt oprof dbg' '--prefix=/Users/intern/projects/moose/scripts/../libmesh/installed' '--enable-silent-rules' '--enable-unique-id' '--disable-warnings' '--enable-unique-ptr' '--enable-openmp' '--disable-maintainer-mode' '--enable-petsc-required' '--with-vtk-include=/opt/moose/VTK-7.1.0/clang-opt/include/vtk-7.1' '--with-vtk-lib=/opt/moose/VTK-7.1.0/clang-opt/lib' 'CXX=mpicxx' 'CC=mpicc' 'FC=mpif90' 'F77=mpif77' 'METHODS=opt oprof dbg' 'PETSC_DIR=/opt/moose/petsc/mpich_petsc-3.7.5/clang-opt-superlu'"
/* VTK's major version number, as detected by vtk.m4 */
#ifndef LIBMESH_DETECTED_VTK_VERSION_MAJOR
#define LIBMESH_DETECTED_VTK_VERSION_MAJOR 7
/* VTK's minor version number, as detected by vtk.m4 */
#ifndef LIBMESH_DETECTED_VTK_VERSION_MINOR
#define LIBMESH_DETECTED_VTK_VERSION_MINOR 1
/* VTK's subminor version number, as detected by vtk.m4 */
#ifndef LIBMESH_DETECTED_VTK_VERSION_SUBMINOR
#define LIBMESH_DETECTED_VTK_VERSION_SUBMINOR 0
/* Flag indicating whether the library will be compiled with VTK support */
#ifndef LIBMESH_HAVE_VTK
#define LIBMESH_HAVE_VTK 1
#endif

Peterson, JW

unread,
Nov 8, 2017, 3:55:33 PM11/8/17
to moose-users


On Wed, Nov 8, 2017 at 1:42 PM, <tas...@trinity.edu> wrote:
>grep VTK libmesh_config.h

#define LIBMESH_HAVE_VTK 1
 
OK, so it's definitely there. There's no way you can be seeing the error message above unless MOOSE is compiling against some libmesh other than this one. Do you by any chance have $LIBMESH_DIR set in your environment?

--
John

tas...@trinity.edu

unread,
Nov 8, 2017, 4:11:36 PM11/8/17
to moose-users
I'm not sure how to check that but I did another grep for LIBMESH_DIR which returned many results, but these were at the top:

./framework/build.mk:# Set LIBMESH_DIR if it is not already set in the environment (try our best to guess!)
./framework/build.mk:LIBMESH_DIR       ?= $(MOOSE_DIR)/libmesh/installed
./framework/build.mk:libmesh_config := $(LIBMESH_DIR)/bin/libmesh-config           # installed version
./framework/build.mk:  libmesh_config := $(LIBMESH_DIR)/contrib/bin/libmesh-config # uninstalled version
./framework/build.mk:libmesh_LIBTOOL := $(LIBMESH_DIR)/contrib/bin/libtool # installed version
./framework/build.mk:  libmesh_LIBTOOL := $(LIBMESH_DIR)/libtool           # uninstalled version

Peterson, JW

unread,
Nov 8, 2017, 4:29:30 PM11/8/17
to moose-users
On Wed, Nov 8, 2017 at 2:11 PM, <tas...@trinity.edu> wrote:
I'm not sure how to check that


echo $LIBMESH_DIR 

--
John

tas...@trinity.edu

unread,
Nov 8, 2017, 4:32:58 PM11/8/17
to moose-users
echo $LIBMESH_DIR in the /moose/ directory returned empty

Peterson, JW

unread,
Nov 8, 2017, 4:54:03 PM11/8/17
to moose-users
On Wed, Nov 8, 2017 at 2:32 PM, <tas...@trinity.edu> wrote:
echo $LIBMESH_DIR in the /moose/ directory returned empty

OK, in that case I'm stumped. You have a header file that contains "#define LIBMESH_HAVE_VTK 1" and you are hitting a branch of code that's wrapped in #ifndef LIBMESH_HAVE_VTK

--
John

Cody Permann

unread,
Nov 8, 2017, 5:10:12 PM11/8/17
to moose...@googlegroups.com
It feels like your build is somehow out of date, but I'm not sure how we can reproduce that. You might want to "make clobberall" in your directory and rebuild. Let's see if that error goes away.

--
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.

tas...@trinity.edu

unread,
Nov 8, 2017, 7:03:55 PM11/8/17
to moose-users
I ran "make clobberall" in my application directory, loaded the appropriate modules, called the update_and_rebuild script in /moose/scripts/, ran "make -j4" in my application directory, and got the following:

ld: symbol(s) not found for architecture i386
clang-3.9: error: linker command failed with exit code 1 (use -v to see invocation)
make: *** [/Users/intern/projects/moose/framework/contrib/hit/hit.so] Error 1
make: *** Waiting for unfinished jobs....

Cody Permann

unread,
Nov 9, 2017, 11:11:00 AM11/9/17
to moose...@googlegroups.com
On Wed, Nov 8, 2017 at 5:03 PM <tas...@trinity.edu> wrote:
I ran "make clobberall" in my application directory, loaded the appropriate modules, called the update_and_rebuild script in /moose/scripts/, ran "make -j4" in my application directory, and got the following:

ld: symbol(s) not found for architecture i386

i386? Sounds like your python development path is incorrect somehow. This comes into play because we use a C++ parser in our python framework. You had to have built this successfully the first time or you wouldn't have reached the place where you could run and encounter the VTK problem.

Can you show us the output of "module list", also your environment. We are struggling to figure out how you are even running into all of these errors.
 
clang-3.9: error: linker command failed with exit code 1 (use -v to see invocation)
make: *** [/Users/intern/projects/moose/framework/contrib/hit/hit.so] Error 1
make: *** Waiting for unfinished jobs....


On Wednesday, November 8, 2017 at 3:10:12 PM UTC-7, Cody Permann wrote:
It feels like your build is somehow out of date, but I'm not sure how we can reproduce that. You might want to "make clobberall" in your directory and rebuild. Let's see if that error goes away.

On Wed, Nov 8, 2017 at 2:54 PM Peterson, JW <jw.pe...@inl.gov> wrote:
On Wed, Nov 8, 2017 at 2:32 PM, <tas...@trinity.edu> wrote:
echo $LIBMESH_DIR in the /moose/ directory returned empty

OK, in that case I'm stumped. You have a header file that contains "#define LIBMESH_HAVE_VTK 1" and you are hitting a branch of code that's wrapped in #ifndef LIBMESH_HAVE_VTK

--
John

--
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.

--
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.

tas...@trinity.edu

unread,
Nov 9, 2017, 11:53:23 AM11/9/17
to moose-users
>module list

  1) moose/.gcc-6.2.0                     6) moose/.cppunit-1.12.1-clang
  2) moose/.clang-3.9.0                   7) moose-dev-clang
  3) moose/.mpich-3.2_clang               8) advanced_modules
  4) moose/.mpich_petsc-3.7.5_opt-clang   9) vtk-clang
  5) moose/.tbb44_20150728

How do I check the environment?
Regardless I might simply uninstall everything then start from scratch

Cody Permann

unread,
Nov 9, 2017, 12:15:08 PM11/9/17
to moose...@googlegroups.com
OK - I don't see "miniconda" loaded which is OK but may be a piece to this puzzle. Clobbering should have cleaned up everything and in my dry-run testing over here it is cleaning up the hit.so library just fine. I suppose there's a chance that something is being missed with clobber though. In that case, if you had miniconda loaded the first time but don't this time and there's a file that didn't get cleaned. That could be the reason something failed here...

What I suggest is a more thorough cleaning (no, you don't have to uninstall and reinstall everything). First make sure you don't have any files in the MOOSE repository that you haven't checked in or otherwise saved. Once you've done that go to the root of the MOOSE repository and run this command. I'll delete everything that's not part of the repository (a very thorough cleaning).

$ git clean -xfd

Now, you'll need to rebuild libmesh with your VTK flags, and then your application which should recompile everything. Before you do that though, make a decision about whether you are going to use miniconda or not. I highly recommend that you use it. It's a great python package manager and includes a lot of utilities that you may want to eventually use (matplotlib, numpy, etc.).

--
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.
Message has been deleted

tas...@trinity.edu

unread,
Nov 9, 2017, 2:43:27 PM11/9/17
to moose-users
This worked. Something must've been flipped in the installation or called/cancelled prematurely, and VTK is now being detected. Thank you
Reply all
Reply to author
Forward
0 new messages