Compiling LIGGGHTS using make auto on Ubuntu 22.04

Submitted by dusty_sikka on Thu, 07/21/2022 - 18:16

I had LIGGGHTS working on my Ubuntu 20.04 system. The machine automatically updates to 22.04, and now I am unable to compile with make auto command. I get the following error:

Creating list of contact models completed.
make[1]: Entering directory '/home/dusty-sikka/Research/Code/LIGGGHTS/LIGGGHTS-PUBLIC/src/Obj_auto'
Makefile:499: *** 'Could not compile and link a simple MPI example. Test was done with MPI_LIB='. Stop.
make[1]: Leaving directory '/home/dusty-sikka/Research/Code/LIGGGHTS/LIGGGHTS-PUBLIC/src/Obj_auto'
make: *** [Makefile:114: auto] Error 2

Can someone help me?

Yeasir Mohammad Akib | Wed, 07/27/2022 - 21:50

Hi dusty_sikka,
I was facing a problem during the installation of LIGGGHTS with the Ubuntu 22.04 version. Try to stick with Ubuntu 20.04 version. Hopefully, It would solve your problem.

Yeasir Mohammad Akib
MS Student

mschramm | Wed, 08/03/2022 - 19:02

I have liggghts running on a docker image of ubuntu 22.04.
I did this simply installing libvtk7-dev and using cmake to find the needed libraries.
My repo for flexible fibers contains the needed cmakefiles if the pull request in the public release has not been accepted yet.

You will need to alter the code a little bit to get it to compile.
The necasary file is "utils.h" at line 70
return static_cast< std::ostringstream & >(( std::ostringstream() << std::dec << a ) ).str();
You should be able to replace the line with
return std::to_string(a);
but I have not done large tests to make sure no issues are raised.