runTime logfile compression

Submitted by AliBlues on Wed, 12/14/2016 - 11:41

Hi,
I want to generate a compressed runtime log file. If I would have run say cfdemSolverPiso, then I could do something like
cfdemSolverPiso 2>&1 | gzip > log.gz

I was wondering how can modify the parCFDDEMrun.sh script, partly shown below to the same thing:
#- call function to run a parallel CFD-DEM case
parCFDDEMrun $logpath $logfileName $casePath $headerText $solverName $nrProcs $machineFileName $debugMode

Thanks!
Ali

Daniel Queteschiner | Wed, 12/14/2016 - 12:48

You may take a look at the parCFDDEMrun() function in src/lagrangian/cfdemParticle/etc/functions.sh.
E.g., change the line
mpirun -np $nrProcs $debugMode $solverName -parallel 2>&1 | tee -a $logpath/$logfileName
to
mpirun -np $nrProcs $debugMode $solverName -parallel 2>&1 | gzip > $logpath/$logfileName.gz