Link LIGGGHTS with other tools while compiling using CMake

Submitted by hamedhoori on Tue, 01/28/2025 - 16:36

Hello everyone,

I have a question about linking LIGGGHTS with other tools like PETSc or establishing a link between LIGGGHTS and VTK?

I've read old forums about compiling liggghts with user-defined directories for vtk, and I've tried them all, but it's not working. I can't do this while compiling LIGGGHTS using Cmake. I am working with LIGGGHTS on HPC and the other methods don't work well (compiling using make user/auto/mpi) and Cmake is the only option. The strange part is vtk is found while compiling using 'cmake ../src' command in the src-build directory but when it reaches to the first dump src file it returns an error as 'vtkSmartPointer.h' not found which is not correct. I checked, this library exist in the vtk directory.

I've tried compiling liggghts using
'cmake ../src -DVTK_DIR= ...',
'cmake ../src -DVTK_INC_DIR= path/to/vtk-9.3/include -DVTK_LIB_DIR= path/to/vtk-9.3/lib',
'cmake ../src -DVTK_DIR= path/to/vtk-9.3/lib64/cmake/vtk-9.3/',

but so far, nothing worked. The same thing happens with PETSc. I would appreciate it if you could guide me.

Kind regards,
Hamed