Installing LIGGGHTS in a cluster based on Red Hat Enterprise Linux Server 7

Submitted by Arnon on Wed, 01/09/2019 - 20:23

I am trying to install LIGGGHTS in a cluster based on Red Hat Enterprise Linux Server 7
I have read all the post in the forum but I have been able to install it.

I have unsuccessfully tried different approaches:

1st TRY:

I used git clone https://github.com/CFDEMproject/LIGGGHTS-PUBLIC.git to download LIGGGHTS,

then I download VTK using git clone https://gitlab.kitware.com/vtk/vtk.git VTK (Version vtk-8.2)

I built it using:

cmake -DBUILD_TESTING:BOOL=OFF -DCMAKE_BUILD_TYPE:STRING=Release -DCMAKE_INSTALL_PREFIX=../install -DModule_vtkIOMPIParallel:BOOL=ON -DVTK_Group_MPI:BOOL=ON -DVTK_Group_Rendering:BOOL=OFF -DVTK_RENDERING_BACKEND:STRING=None -DVTK_USE_X:BOOL=OFF -DModule_vtkIOMPIImage:BOOL=ON -DModule_vtkParallelMPI:BOOL=ON ~/Applications/VTK/

Following the recommendation of one of the posts I found in the forum.

and then compiled it by typing make in the build folder.

When I type make auto in the src folder I obtain the following error

Generating model list, this could take a moment...
You have 3240 model combinations. (limit = 1200)
Some model combinations are skipped automatically. You may add missing combinations by yourself to 'style_contact_model_user.whitelist'.
Creating list of contact models completed.

>>> WARNING <<<
Created MAKE/Makefile.user for the first time. Please check that the options in that file are set correctly.

make[1]: Entering directory `/home/MMEALOPE/Applications/LIGGGHTS-PUBLIC/src/Obj_auto'
Makefile:815: *** 'Could not obtain VTK_MAJOR_VERSION. As AUTOINSTALL_VTK is not set to "ON" we cannot continue'. Stop.
make[1]: Leaving directory `/home/MMEALOPE/Applications/LIGGGHTS-PUBLIC/src/Obj_auto'
make: *** [auto] Error 2

Then I changed the path in the Makefile.user file as followed:

# Path that contains the includes (vtkVersion.h)
VTK_INC_USR=-I/usr/local/include/vtk-8.2
# Path that contains the VTK libraries
VTK_LIB_USR=-L/home/MMEALOPE/Applications/VTK/build/lib64

and try to compile LIGGGHTS again, the error obtained in this ocasion is:

make[1]: Entering directory `/home/MMEALOPE/Applications/LIGGGHTS-PUBLIC/src/Obj_auto'
Makefile:1032: *** 'Could not compile VTK example with VTK_INC="-I/usr/local/include/vtk-8.2", VTK_LIB="-L/home/MMEALOPE/Applications/VTK/build/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"'. Stop.
make[1]: Leaving directory `/home/MMEALOPE/Applications/LIGGGHTS-PUBLIC/src/Obj_auto'
make: *** [auto] Error 2

I also tried it building vtk with the command cmake without any other argument and the same error is displayed.

2nd TRY:

I started all over again typing make auto in the src folder getting the same error message than previously:

Generating model list, this could take a moment...
You have 3240 model combinations. (limit = 1200)
Some model combinations are skipped automatically. You may add missing combinations by yourself to 'style_contact_model_user.whitelist'.
Creating list of contact models completed.

>>> WARNING <<<
Created MAKE/Makefile.user for the first time. Please check that the options in that file are set correctly.

make[1]: Entering directory `/home/MMEALOPE/Applications/LIGGGHTS-PUBLIC/src/Obj_auto'
Makefile:815: *** 'Could not obtain VTK_MAJOR_VERSION. As AUTOINSTALL_VTK is not set to "ON" we cannot continue'. Stop.
make[1]: Leaving directory `/home/MMEALOPE/Applications/LIGGGHTS-PUBLIC/src/Obj_auto'
make: *** [auto] Error 2

Then I do the following modification in the Makefile.user

#AUTOINSTALL_VTK = "OFF" I changed it to AUTOINSTALL_VTK = "ON"

BUILD_LIBRARIES = "NONE" I change it to BUILD_LIBRARIES = "STATIC"

I run make auto again and I get the following message:

Creating list of contact models completed.
'Could not compile VTK example. As AUTOINSTALL_VTK is set to "ON". VTK will now be automatically downloaded to ../../lib'
Cloning into '../../lib/vtk/src'...
remote: Enumerating objects: 531614, done.
remote: Counting objects: 100% (531614/531614), done.
remote: Compressing objects: 100% (126342/126342), done.
remote: Total 531614 (delta 402208), reused 519590 (delta 396429)
Receiving objects: 100% (531614/531614), 191.63 MiB | 20.46 MiB/s, done.
Resolving deltas: 100% (402208/402208), done.
Checking out files: 100% (16436/16436), done.
VTK has been downloaded and will be compiled now. This can take several minutes.
(...) -lvtksys-8.0 -lvtkCommonMisc-8.0 -lvtkCommonTransforms-8.0 -lvtkCommonMath-8.0 -lvtkIOXMLParser-8.0 -lvtkCommonSystem-8.0 -lvtkDICOMParser-8.0 -lvtkmetaio-8.0 -o ../lmp_auto
size ../lmp_auto
text data bss dec hex filename
8141313 227260 824 8369397 7fb4f5 ../lmp_auto
make[1]: Leaving directory `/home/MMEALOPE/Applications/LIGGGHTS-PUBLIC/src/Obj_auto'

LIGGGHTS has been compiled, however when I launch lmp_auto I get the following error message:

./lmp_auto: error while loading shared libraries: libvtkCommonCore-8.0.so.1: cannot open shared object file: No such file or directory

3rd TRY:

Then I modification in the Makefile.user

BUILD_LIBRARIES = "NONE" I change it to BUILD_LIBRARIES = "ALL"

I run make auto and then ./lmp_auto, the following error message is displayed:

./lmp_auto: error while loading shared libraries: libvtkCommonCore-8.0.so.1: cannot open shared object file: No such file or directory

4th Try:

When I compile LIGGGHTS turning off the vtk option:

# Description: Allow the use of VTK output that can be read directly with ParaView
USE_VTK = "OFF"

The software compiles perfectly, as expected I cannot use VTK which I need.

Can anyone help me, please?

Regards,
Arnón

richti83's picture

richti83 | Thu, 01/10/2019 - 08:16


./lmp_auto: error while loading shared libraries: libvtkCommonCore-8.0.so.1: cannot open shared object file: No such file or directory

you need to add the vtk library folder path to your ld_library path variable, e.g.

export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:/foo/bar

I recommend to create a module on the cluster to set all path correctly and than load this module in the execution script

best
Christian.

Arnon | Thu, 01/10/2019 - 17:36

Hi Christian,

Thanks for you quick answer.
I compiled LIGGGTHS with AUTOINSTALL_VTK = "ON" and BUILD_LIBRARIES = "ALL". Then I found the folder where the vtk libraries where installed and I used the command you told me:

export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:/home/MMEALOPE/Applications/LIGGGHTS-PUBLIC/lib/vtk/install/lib/

It worked!!

Instead of creating a module on the cluster (basically because I did not know how to do it) I added the command to my .bashrc so it is loaded every time I log in.

Thank you very much for your help.

All the best!
Arnón