Installing CFDEM and LIGGGHTS

Submitted by SilenceAndI on Sun, 04/14/2019 - 00:56

Greetings Community,

I would like to install these two toolboxes using the following guide:

I am running a RHEL 7.6 (Maipo) w/o root and currently stuck at the step where I have to add

#- source cfdem env vars
export CFDEM_bashrc=$CFDEM_PROJECT_DIR/src/lagrangian/cfdemParticle/etc/bashrc
. $CFDEM_bashrc

to .bashrc because ". $CFDEM_bashrc" completely unsets all my commands/aliases (vim, sed, export, vi, ...) and till now I wasn't able to locate the reason and the real error. The error message says the error happens one line below the last line available in:


As attachment you can see the log of ". $CFDEM_bashrc".

(OpenFoam 4.1 is already installed using )

Thank you very much in advance for your help.


@Edit because I am installing CFDEM and LIGGGHTS under /local/name123 (where also my OpenFoam is located) I changed certain parts of the


and added it to the attached files, also I removed the condition asking to create "$CFDEM_PROJECT_USER_DIR" and just let the script create it because else it crashed already at that point.

My ".bashrc" and ".zshrc" - experimenting with both shells currently (zsh is my preferred one but I read CFDEM and LIGGGHTS prefer bash so I tried both also changing $SHELL back and forth) are also attached.

SilenceAndI | Mon, 04/15/2019 - 17:54

For some reason the step concerning ". $CFDEM_bashrc" worked now (I did a lot of things - basically try and error and at some point I still received the error on the non existent line but the preparation process worked out even so cfdemSysTest still shows some critical parts that are non existent yet, maybe you can help out with a possible fix (if you think it will be necessary - <- Log-File).

But I'm still stuck at the following steps:

Now I should execute


which executes a number of commands in a row for me starting with


I set the AUTOINSTALL_VTK to YES or TRUE, but then the installation failed because of cmake.nThe problem is that the version of cmake in my system is 3.2.1 but 3.3.* is necessary. I locally installed cmake 3.14.x but I didn't manage to set it to be used system wide. Still I was able to first execute cmake by:

cd vtk/build
/path/to/cmake/bin/cmake ../src/
make && make install

Then some magic happened. And third directory appeared called "install". Afterwards I executed:


and received a log (log) with many errors (the log was ~5500 lines long I reduced it to the ~1000 most important ones).

I am open to any idea fixing the problem.

SilenceAndI | Mon, 04/15/2019 - 18:38

I noticed that there is a thread about a similar error and the reason for it there is called having "$CFDEM_WM_PROJECT_VERSION" not set. For some reason the bashrc in "../lagrangiancfdemParticle/etc/bashrc" does not do it even so it is supposed to do it. Could you tell me how I could fix the bashrc provided in the project to work properly? I mean I could try to stuff all the gaps when I find them to get to an ugly mutated something (like setting manually the export variables like $CFDEM_WM_PROJECT_VERSION). But isn't there a clean and reproducible way to install these two tools?

alice's picture

alice | Wed, 04/17/2019 - 11:24


the mentioned bashrc file will set the variable correctly, provided that the WM_PRJECT_VERSION variable is know at the time the file is sourced. This variable is defined by OpenFOAM, so please make sure that the OpenFOAM bashrc file is sourced in your ~/.bashrc file BEFORE the CFDEM(R)coupling specific bashrc file. If this is already the case, plase check if $WM_PROJECT_DIR is defined correctly and if OpenFOAM commands work.



SilenceAndI | Thu, 04/18/2019 - 17:10


$WM_PROJECT_VERSION is set to "4.1", echo tells me I am not lying.
still these lines are ignored (echo returns empty line) after sourcing ".../lagrangian/cfdemParticle/etc/bashrc" (also just checked that the variables lead to this file, and all are set correctly). Anyway, when I set it manually I still receive errors running "cfdemCompCFDEMall" (added in opening post of this thread) and the error from sourcing the above mentioned bashrc persists (bash: /local/name123/CFDEM/CFDEMcoupling-PUBLIC-4.1/src/lagrangian/cfdemParticle/etc/bashrc: line402: syntax error: unexpected end of file) even so the error line isn't part of the file anymore.

elif [[ $WM_PROJECT_VERSION == 4.* ]]; then

SilenceAndI | Thu, 04/18/2019 - 18:09

Fixed two problems which I did not notice before:
the directory mylpp is actually called lpp in my installation, think this is also inconsistent in the guide
and WM_LABEL_SIZE had to be 32. The sourcing of the given bashrc works now, but cfdemSysTest still gives "valid:NO critical:yes - $CFDEM_APP_DIR = /local/name123/CFDEM/CFDEMcoupling-PUBLIC-4.1/platforms/linux64GccDPInt64Opt/lib".
I don't know how and when this should be prepared but the directory indeed doesn't exists. There is only one folder with one file ".../lib/".

When I now run "cfdemCompCFDEMall" you can see (in 2 minuets in the first post the log)