Problem with VTK Installation on Redhat Server

Submitted by berlinphoenix on Fri, 04/30/2021 - 11:23

Hi all,

i want to install Liggghts on a redhat server and there are issues with the VTK part. The AUTOINSTALL_VTK flag is not working. I get the error: "Could not determine suitable appendix of VTK library with VTK = ... etc." when doing "make auto".

So i tried to manually install VTK. Configuration and Generation went without errors, altough i switched OFF everything besides mpi usage of VTK. After that i built VTK without error. But i do not find a folder usr/local/include. So i can not set the path in the Liggghts make file.

Anyone got an idea where the error lies?
Thanks a lot!

berlinphoenix | Mon, 05/03/2021 - 16:08

Dear mschramm,

thanks again for your valuable response. Indeed it seems i need to do install after make, strange that this is not included in the offical VTK build tutorial.
However a new problem arises. I don't have administrators rights at the cluster i want to use. However VTK wants adminstrator rights to create the folders. Is there any way to build VTK without admin rights?

Thanks!

kardous | Tue, 05/04/2021 - 10:54

Hello,

While running my script with Liggghts I got this error that I don't undrestand. Can u help me with it please?

ERROR: Mesh error - root causes: (a) mesh empty or (b) dimensions too small - use different unit system (/build/liggghts-YO7u74/liggghts-3.8.0+repack1/src/multi_node_mesh_parallel_I.h:566

thank u for your help,
SK

berlinphoenix | Tue, 05/04/2021 - 17:32

Hi mschramm,

that worked as you suggested. Now i set the variables in the Liggghts Make.Userfile to:

VTK_INC_USR=/home/kit/mvm/vo7742/local/include/vtk-9.0/
# Path that contains the VTK libraries
VTK_LIB_USR=/home/kit/mvm/vo7742/local/lib64/
# Additional VTK libraries to include
VTK_ADDLIBS_USR=-lvtkCommonCore-8.0 -lvtkIOCore-8.0 -lvtkIOXML-8.0 -lvtkIOLegacy-8.0 -lvtkIOImage-8.0 -lvtkCommonDataModel-8.0 - lvtkIOParallelXML-8.0 -lvtkParallelCore-8.0 -lvtkParallelMPI-8.0 -lvtkCommonExecutionModel-8.0 -lvtkFiltersCore-8.0 -lvtksys-8.0 -lvtkCommonMisc-8.0 -lvtkCommonTransforms-8.0 -lvtkCommonMath-8.0 -lvtkIOXMLParser-8.0 -lvtkCommonSystem-8.0 -lvtkDICOMParser-8.0 -lvtkmetaio-8.0

but i get the error "Could not obtain VTK_MAJOR_VERSION."
Haven't been able to find out what the error means so far.

Do you have an idea?
Thanks!

mschramm | Wed, 05/05/2021 - 06:23

Hello,
From your post, it seems that you are mixing the include files for vtk-9.0 with files for vtk-8.0.
LIGGGHTS does not compile out of the box with vtk 9.0 using their make auto command (There is a check in the makefile that only works for vtk upto 8.0).

Here is an example of my Makefile.user entry for vtk:
# VTK specific variables
#
# Path that contains the includes (vtkVersion.h)
#VTK_INC_USR=-I/path/to/vtk/include
VTK_INC_USR=-I/home/mschramm/Programs/LIGGGHTS-PUBLIC/lib/vtk/install/include/vtk-8.0

# Path that contains the VTK libraries
#VTK_LIB_USR=-L/path/to/vtk/lib
VTK_LIB_USR=-L/home/mschramm/Programs/LIGGGHTS-PUBLIC/lib/vtk/install/lib

# Additional VTK libraries to include
#VTK_ADDLIBS_USR=
# Appendix to the library names
# In general this is going to be dependent on the version of VTK that you have
# installed. In this case it is going to be detected automatically. In case of
# using a VTK version from a ParaView compilation, the appendix will be equal
# to pv-X.Y where X.Y is the ParaView version.
#VTK_APPENDIX_USR=pv-5.3

berlinphoenix | Wed, 05/05/2021 - 10:37

Hi,

ok so far i only find VTK version 8.2.0 online and this gives me the same VTK_MAJOR_VERSION error as above, after i installed VTK and changed the path accordingly. I hope that i can find the correct VTK version somewhere online. And yes you are correct, i excluded the VTK_ADDLIBS_USR.

berlinphoenix | Wed, 05/05/2021 - 15:37

Hi, it's me again. I found a VTK-8.0.1 version and installed the release version with mpi enabled.
After setting the paths in MAKEFILE and compiling Liggghts i get the error:
"lmp_auto: error while loading shared libraries: libvtklz4-8.0.so.1: cannot open shared object file: No such file or directory"
I double-checked that the "libvtklz4-8.0.so.1" is in the lib folder. I used the following in makefile:

# VTK specific variables
#
# Path that contains the includes (vtkVersion.h)
VTK_INC_USR=-I/pfs/data5/home/kit/mvm/vo7742/local/include/vtk-8.0/
# Path that contains the VTK libraries
VTK_LIB_USR=-L/pfs/data5/home/kit/mvm/vo7742/local/lib/
# Additional VTK libraries to include
#VTK_ADDLIBS_USR=
# Appendix to the library names
# In general this is going to be dependent on the version of VTK that you have
# installed. In this case it is going to be detected automatically. In case of
# using a VTK version from a ParaView compilation, the appendix will be equal
# to pv-X.Y where X.Y is the ParaView version.
#VTK_APPENDIX_USR=pv-5.3

So i'm really not sure what is going on. I think i set everything the way i found online to set and used the correct VTK version.
Thanks a lot for suggestions!
Kind regards

berlinphoenix | Wed, 05/05/2021 - 15:50

As i wrote my last post, i found a further post by a user that recommended adding
export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:/usr/local/lib
to bashrc and re-sourcing it. After i compiled lmp_auto again i finally worked. So i guess i can use VTK now finally! :D
Thanks!