LIGGGHTS 컴파일 단계에서 Contact Model 에 따른 Optimization이 가능한가 봄.
make auto 말고 다른 옵션을 알아보자.
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
(iii) Use the ENABLE_MODEL_* flag when building with cmake.
If you perform one of the steps above LIGGGHTS(R) needs to be recompiled to generate the optimized code.
(../contact_models.h:365)
https://www.cfdem.com/media/DEM/docu/Section_start.html?highlight=whitelist
2. Getting Started — LIGGGHTS v3.X documentation
Docs » 2. Getting Started View page source Website Commands 2. Getting Started This section describes how to build and run LIGGGHTS(R)-PUBLIC, for both new and experienced users. We recommend to use git to download the LIGGGHTS(R)-PUBLIC package. Make sur
www.cfdem.com
All model combination of LIGGGHTS(R)-PUBLIC are automatically available starting with version 3.7. However, only a subset of them are compiled in an optimized manner. This might give you performance losses between 5 and 20%. In case you are using a model combination that is not optimized, LIGGGHTS(R)-PUBLIC will notify you of this. In this case you can create a file called style_contact_model_user.whitelist in your LIGGGHTS(R)-PUBLIC src/ folder and fill it with entries such as
EPSD2 Rolling Friction 모델을 쓰는 Hertz 모델을 추가해 보자. 아래의 파일에 추가한다.
style_contact_model_user.whitelist
GRAN_MODEL(HERTZ, TANGENTIAL_HISTORY, COHESION_OFF, ROLLING_EPSD2, SURFACE_DEFAULT)
여기서 좋은 답변을 찾은 듯
https://www.cfdem.com/forums/superquadrics-compilation
superquadrics compilation | CFDEM®project
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 termi
www.cfdem.com
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.
컴파일은
make clean all && make auto
== 추가 수정사항이 있음, 입력파일이 있으면, whitelist를 자동으로 만들어 주는 bash 스크립트가 /LIGGGHTS/src 디렉토리에 존재함
예를 들어 다음과 같이 사용함
$ ./genAutoExamplesWhitelist.sh
genAutoExamplesWhitelist.sh - searches paths recursively for LIGGGHTS example input scripts (in.*), and extracts the pair styles, version 0.1
usage: genAutoExamplesWhitelist.sh [-o outputfile] [-s LIGGGHTS src directory path] [-i] [-v] [-f] [-a] [paths|files]
-o: output filename (default: ./style_contact_model_autoExamples.whitelist)
-s: specify LIGGGHTS src directory path (default: ./)
-i: do not search recursively, look in specified files
-a: search recursive in all files, not only in.*
-f: force outfile to be overwritten
-v: verbose
Example:
genAutoExamplesWhitelist.sh ../examples/LIGGGHTS
실제 사용해 보면, style_contact_model_autoExamples.whitelist 파일이 작성됨
$ ./genAutoExamplesWhitelist.sh ./in.Shibuya_SQ
parsing of input scripts completed
they are added to the whitelist: style_contact_model_autoExamples.whitelist , only "style_contact_model_autoExamples.whitelist" is automatically invoked
작성된 파일의 내용은 아래와 같음
GRAN_MODEL(HERTZ, TANGENTIAL_OFF, COHESION_OFF, ROLLING_OFF, SURFACE_DEFAULT)
그런데, 이상함. 내가 사용한 LIGGGHTS에서 pair style은 아래와 같이 SuperQuadrics를 사용하도록 되어있는데, Surface가 Default로 나옴
pair_style gran model hertz surface superquadric # Hertzian without cohesion
한가지 추가사항 : SuperQuadric은 컴파일시 다음의 옵션을 사용함
make auto USE_SUPERQUADRICS=ON
이러면, make.auto 파일에서 자동으로 SuperQuadrics 옵션으로 컴파일을 진행 함
=== 추가사항
genAutoExamplesWhitelist.sh 스크립트에 문제가 있으니, 수동으로 등록하라고 함.
그리고 gcc 버전 8 이상에서는 whitelist가 큰 의미가 없다고 하네.. 잉?
https://www.cfdem.com/forums/problems-self-created-contact-model
'LIGGGHTS' 카테고리의 다른 글
WALL의 Information 획득하기 (0) | 2023.11.06 |
---|---|
servo controls (0) | 2023.10.19 |
Log 파일의 이해 (0) | 2023.08.27 |
Clustering (0) | 2023.08.24 |
Thermodynamic data의 출력 (0) | 2023.08.24 |