Got problems running lpp.py to save dump files as VTK files

Submitted by Roesch on Thu, 02/27/2020 - 10:04

Hey everyone,

I'm using DEM for the first time and I have some troubles using the lpp/pizza postprocessing package.

when I'm running the lpp.py script in my post directory where the dumo files are located I get following error:

"python lpp.py
File "lpp.py", line 45
raise ValueError "Invalid or no argument given for chunksize"
^
SyntaxError: invalid syntax"

Is it a problem becaus of python2 and 3? Or what is the main issue I'm facing here?

Thanks in advance for your answers!

mschramm | Thu, 02/27/2020 - 15:21

From: https://www.cfdem.com/post-processing-liggghtsr-simulations
Add and adapt the following alias to your ~/.bashrc (not necessary if you have CFDEM®coupling installed already, which will perform these settings for you):
export LPP_DIR=$HOME/LIGGGHTS/LPP/src
export LPP_NPROCS=4
export LPP_CHUNKSIZE=1
alias lpp='python -i $LPP_DIR/lpp.py --cpunum $LPP_NPROCS --chunksize $LPP_CHUNKSIZE'

So, it is not a problem with python2 nor is it a problem with python3.
You need to call it as
python lpp --cpunum NumProcs --chunksize ChunkSize

or follow the directions above and make an alias.

Alternatively, look into 2c for a reader that would allow you to read .liggghts files.