compilation of a new model

Asked by Bettina Suhr

Dear all,

after using yade for a while, this is the first time that I try to do coding. I created a new class in the pkg/dem folder and have some questions regarding the compilation.

1. After calling cmake, 'make' attempts to recompile the whole yade distribution. Is this really necessary or are there any shortcuts?
2. After modification of a single .cpp file (for instance in pkg/dem), compilation via make still needs several minutes. Is there any possibility to speed up the build process?

Thanks,
Bettina

Question information

Language:
English Edit question
Status:
Solved
For:
Yade Edit question
Assignee:
No assignee Edit question
Solved by:
Bruno Chareyre
Solved:
Last query:
Last reply:
Revision history for this message
Best Bruno Chareyre (bruno-chareyre) said :
#1

Hi,
1. Yes it is necessary. Depending on RAM and number of cores you can speedup compilation with
cmake -DCHUNKSIZE=[N] #with N>1
and
make -jM #with M>1
Yesterday I tried N=30 and M=24, it took not more than 5min

2. Not really, unfortunately (N>1 will actually make this one slower eventually). Make sure you have binutils-gold installed, it makes link edition faster. The compilation time is due to boost/python things. One way to make everything faster is to write your code in plain c++ in a file that does not include all the yade stuff, then link the object code. Not very practical though.

Bruno

Revision history for this message
Bettina Suhr (bettina-suhr) said :
#2

Thanks Bruno Chareyre, that solved my question.