Possible to re-compile only modified files in CFDEM?

Submitted by Evan.J on Tue, 03/06/2018 - 19:17

I am modifying some models in CFDEM, and after every change I have to recompile using cfdemCompCFDEMsrc which can take several minutes, and this makes the process of developing a new model very slow.

Is there any way to recompile only the files that have been modified?

I'm a newcomer to this type of programming, so please keep that in mind when answering. Any info or ideas would be helpful!

Thanks,

Evan

medvedeg | Wed, 03/07/2018 - 12:29

Hallo Evan,
it is of course possible. You must go in src/lagrangian/cfdemParticle folder and type "wmake" in order to compile lagrangian library (all drag force , void fraction models, etc). Only changed files (since last compilation) will be recompiled. The same is possible for each solver separately. For example, if you go in applications/solvers/cfdemSolverPiso and type "wmake", only cfdemSolverPiso will be compiled. Note that you should first compile lagrangian library before solver compilation.

Alexander Podlozhnyuk

gelinhan | Thu, 03/22/2018 - 00:22

Hi Alexander,

I just got another related question. I found that even I only modified the LIGGGHTS code , I had to recompile CFDEM to make the new LIGGGHTS code working with the coupling which was very time consuming. Is there any simple way to do this?

Kind regards,
Linhan

medvedeg | Thu, 03/22/2018 - 10:59

Hallo Linhan,

if you compile LIGGGHTS with "makefile auto", than the algorithm is as follows. From src folder execute following commands:
make auto -j 4
make makeshlib
make -f Makefile.shlib auto

This will update LIGGGHTS library necessary for running CFDEMcoupling. There is no no need to recompile CFDEMcoupling.

Alexander Podlozhnyuk

Evan.J | Thu, 03/08/2018 - 04:54

Alexander,

Thanks for the prompt response - indeed that is much faster!