superquadrics compilation

Submitted by marcelo on Fri, 03/16/2018 - 14:21

Hello,

I have a question regarding my build of the 'superquadric' module. I went to the 'LIGGGHTS-PUBLIC/src/MAKE' folder in the 'Makefile.auto' file and modified the USE_SUPERQUADRICS? = "OFF" to "ON". When starting the compilation was warned in the terminal (Ubuntu 16.04 LTS):

"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. "

Should I worry? The compilation occurred normally with no error (https://paste.ubuntu.com/p/KFhyRTn44s/).

marcelo | Mon, 03/19/2018 - 12:00

When I try to run the 'superquadric' tutorial it warns me:

"WARNING:
The contact model you specified is not located in any whitelist.
Because of this the model will be run in an unoptimized version (increasing runtime by up to 20%).
In order to optimize this model you have the following options:
(i) Run the genAutoExamplesWhitelist.sh script in your LIGGGHTS (R) source folder to automatically parse the input script
(ii) Add the model combination by hand to your style_contact_model_user.whitelist that can be found in your LIGGGHTS (R) source folder
If you perform one of the above steps LIGGGHTS (R) needs to be recompiled to generate the optimized code."

and: "ERROR on proc 0: Substitution for illegal variable (../input.cpp:505)"
https://paste.ubuntu.com/p/VD5tcrCnND/

Please, I would like guidance on compilation and this WARNING/ERROR presented

marcelo | Mon, 03/19/2018 - 14:25

...and about: "You have 3240 model combinations. (limit = 1200)" in my compilation log?

And,
''Because of this the model will be run in an unoptimized version (increasing runtime by up to 20%).
In order to optimize this model you have the following options:
(i) Run the genAutoExamplesWhitelist.sh script in your LIGGGHTS (R) source folder to automatically parse the input script''

what do you recommend to do?

richti83's picture

richti83 | Fri, 03/23/2018 - 08:32

Hi Marcelo,
LIGGGHTS uses a (from my point of view) complicated make system.

Some contact models are predefined to be compiled in a optimized fashion - and some others not to keep filesize small and compile time low.
What you should do is to open LIGGGHTS-PUBLIC/src/style_contact_model_user.whitelist and add at least:

GRAN_MODEL(HOOKE, TANGENTIAL_HISTORY, COHESION_OFF, ROLLING_OFF, SURFACE_SUPERQUADRIC)
GRAN_MODEL(HERTZ, TANGENTIAL_HISTORY, COHESION_OFF, ROLLING_OFF, SURFACE_SUPERQUADRIC)

after that recompile liggghts with make clean all && make auto in your LIGGGHTS-PUBLIC/src/ folder.
When you plan to use SQ with rolling friction enabled add

GRAN_MODEL(HOOKE, TANGENTIAL_HISTORY, COHESION_OFF, ROLLING_CDT, SURFACE_SUPERQUADRIC)
GRAN_MODEL(HERTZ, TANGENTIAL_HISTORY, COHESION_OFF, ROLLING_CDT, SURFACE_SUPERQUADRIC)
GRAN_MODEL(HOOKE, TANGENTIAL_HISTORY, COHESION_OFF, ROLLING_EPSD, SURFACE_SUPERQUADRIC)
GRAN_MODEL(HERTZ, TANGENTIAL_HISTORY, COHESION_OFF, ROLLING_EPSD, SURFACE_SUPERQUADRIC)
GRAN_MODEL(HOOKE, TANGENTIAL_HISTORY, COHESION_OFF, ROLLING_EPSD2, SURFACE_SUPERQUADRIC)
GRAN_MODEL(HERTZ, TANGENTIAL_HISTORY, COHESION_OFF, ROLLING_EPSD2, SURFACE_SUPERQUADRIC)

too.
Have a look in style_contact_model.h to get all possible definitions.

When you want to compile all 3240 pissible contact model combinations change line 214 in Make.sh to 3240 and start compiling (this will take a long long time and results in a 150MB executable :-) )

Hope this helps,
Christian.

I'm not an associate of DCS GmbH and not a core developer of LIGGGHTS®
ResearchGate | Contact

marcelo | Fri, 03/23/2018 - 20:36

Thank you very much. So the one recommended by you is that I add the 8 lines (GRAN_MODEL ...) and recompile the LIGGGHTS.
I'm going to do iron ore analysis, do you believe it's necessary to recompile?
And about '' 150MB executable '' mentioned by you, I did not quite understand. Will the build create a 'file'? What file is this ?!

mhallee | Sun, 07/29/2018 - 02:42

Thanks for asking these questions, I was struggling with the same thing!

Not sure if it matters to you anymore, but I think the file is titled "lmp_auto" and it shows up in the "src" directory after you build from there.