Error compiling LIGGGHTS with VTK 8.1

Submitted by jonathanc on Tue, 09/25/2018 - 15:23

Hello,

I have been attempting to compile LIGGGHTS with VTK 8.1 but am running into an issue when running "make auto". The error is pasted below:

# make auto
Creating list of contact models completed.
make[1]: Entering directory `/home/applications/liggghts/src/Obj_auto'
Makefile:940: *** 'Could not determine suitable appendix of VTK library with VTK_INC="-I/home/applications/vtk/8.1.1/usr/local/include/vtk-8.1", VTK_LIB="-L/home/applications/vtk/8.1.1/usr/local/lib" and VTK_APPENDIX="-8.1"'. Stop.
make[1]: Leaving directory `/home/applications/liggghts/src/Obj_auto'
make: *** [auto] Error 2

This is a strange issue because the VTK application directory I specified in Makefile.user is correct and has library files with the -8.1 appendix on them.


# ls /home/applications/vtk/8.1.1/usr/local/lib/ | head -n 15
cmake
libvtkalglib-8.1.so
libvtkalglib-8.1.so.1
libvtkChartsCore-8.1.so
libvtkChartsCore-8.1.so.1
libvtkCommonColor-8.1.so
libvtkCommonColor-8.1.so.1
libvtkCommonComputationalGeometry-8.1.so
libvtkCommonComputationalGeometry-8.1.so.1
libvtkCommonCore-8.1.so
libvtkCommonCore-8.1.so.1
libvtkCommonDataModel-8.1.so
libvtkCommonDataModel-8.1.so.1
libvtkCommonExecutionModel-8.1.so
libvtkCommonExecutionModel-8.1.so.1

What could I be missing here in order to get this to compile successfully with VTK? To my understanding, everything needed to be added is specified in the Makefile.auto file. Any help would be greatly appreciated. Thank you.

AttachmentSize
Plain text icon make_auto.txt2.13 MB

medvedeg | Tue, 09/25/2018 - 19:12

Hi,

You should not change anything in Makefile.auto. In order to specify the paths to VTK you must modify Makefile.user instead: specify VTK_INC_USR and VTK_LIB_USR.
VTK_INC_USR must be the folder containing vtkVersion.h file. For me VTK-8.0 works perfectly

Alexander Podlozhnyuk

jonathanc | Tue, 09/25/2018 - 22:44

Hi,

I misspoke in the earlier comment by mentioning Makefile.auto, I meant to say Makefile.user. My mistake.

I have the following in my Makefile.user specifying the location of the VTK include and library directories:


[root@u02 MAKE]# grep VTK_INC_USR Makefile.user
VTK_INC_USR=-I/home/applications/vtk/8.1.1/usr/local/include/vtk-8.1
[root@u02 MAKE]# grep VTK_LIB_USR Makefile.user
VTK_LIB_USR=-L/home/applications/vtk/8.1.1/usr/local/lib
#VTK_LIB_USR=-L/usr/lib64
[root@u02 MAKE]# ls /home/applications/vtk/8.1.1/usr/local/include/vtk-8.1/vtkVersion.h
/home/applications/vtk/8.1.1/usr/local/include/vtk-8.1/vtkVersion.h

The vtkVersion.h file is present in the directory I am specifying in Makefile.user.

arnom's picture

arnom | Thu, 11/15/2018 - 15:49

Can you write the following line into your Makefile.user
auto_debug = 1
and attach the file
Obj_auto/make_auto.log
to this thread? Thanks.

DCS team member & LIGGGHTS(R) core developer

jonathanc | Mon, 12/10/2018 - 17:42

Apologies for the very delayed response to this. I added the debug and have attached the log file.

[root@u02 src]# make auto
Creating list of contact models completed.
make[1]: Entering directory `/home/applications/liggghts/src/Obj_auto'
Makefile:1032: *** 'Could not compile VTK example with VTK_INC="-I/home/applications/vtk/8.1.1/usr/local/include/vtk-8.1", VTK_LIB="-L/home/applications/vtk/8.1.1/usr/local/lib" and VTK_ADDLIBS=" -lvtkCommonCore-8.1 -lvtkIOCore-8.1 -lvtkIOXML-8.1 -lvtkIOLegacy-8.1 -lvtkIOImage-8.1 -lvtkCommonDataModel-8.1 -lvtkIOParallelXML-8.1 -lvtkParallelCore-8.1 -lvtkParallelMPI-8.1 -lvtkCommonExecutionModel-8.1 -lvtkFiltersCore-8.1 -lvtksys-8.1 -lvtkCommonMisc-8.1 -lvtkCommonTransforms-8.1 -lvtkCommonMath-8.1 -lvtkIOXMLParser-8.1 -lvtkCommonSystem-8.1 -lvtkDICOMParser-8.1 -lvtkmetaio-8.1"'. Stop.
make[1]: Leaving directory `/home/applications/liggghts/src/Obj_auto'
make: *** [auto] Error 2

arnom's picture

arnom | Mon, 12/17/2018 - 10:39

Hi Jonathan,

did you compile VTK yourself? If yes, you will see at the end of the log file that vtkMPIParallel is missing. That means you compiled VTK without the support for parallel computations.
Make sure you have the following options set in your cmake configuration:
-DModule_vtkIOMPIParallel:BOOL=ON -DVTK_Group_MPI:BOOL=ON -DModule_vtkParallelMPI:BOOL=ON

Regards,
Arno

DCS team member & LIGGGHTS(R) core developer

jonathanc | Thu, 12/27/2018 - 14:50

Hello Arno,

Recompiling VTK with the MPI flags enabled created the necessary MPI libraries which then allowed Liggghts to compile successfully with VTK.

Thank you for the help!

deepakpawar.2310 | Wed, 10/23/2019 - 13:00

I am getting follwoing error while compliling LIGGGGHTS

cd src/make auto

Makefile:1032: *** 'Could not compile VTK example with VTK_INC="-I/home/pawar/Pawar_items/VTK_INSTALLATION_MPI/include/vtk-8.2",
VTK_LIB="-L/home/pawar/Pawar_items/VTK_INSTALLATION_MPI/lib64" and
VTK_ADDLIBS=" -lvtkCommonCore-8.2 -lvtkIOCore-8.2 -lvtkIOXML-8.2 -lvtkIOLegacy-8.2 -lvtkIOImage-8.2 -lvtkCommonDataModel-8.2 -lvtkIOParallelXML-8.2
-lvtkParallelCore-8.2 -lvtkParallelMPI-8.2 -lvtkCommonExecutionModel-8.2 -lvtkFiltersCore-8.2 -lvtksys-8.2 -lvtkCommonMisc-8.2
-lvtkCommonTransforms-8.2 -lvtkCommonMath-8.2 -lvtkIOXMLParser-8.2 -lvtkCommonSystem-8.2 -lvtkDICOMParser-8.2 -lvtkmetaio-8.2"'.

What would be the possible error

Thank you