ammarhakim / gkyl

This is the main source repo for the Gkeyll 2.0 code. Please see gkeyll.rtfd.io for details.
https://gkeyll.readthedocs.io/en/latest/
62 stars 18 forks source link

Extend comparefiles tool or runregression to compare whole directories/groups of files #101

Open manauref opened 2 years ago

manauref commented 2 years ago

At the moment comparefiles works like

gkyl comparefiles -a fileA.bp -b fileB.bp

However, for the purpose of comparing data serially generated by our regression tests (i.e. accepted results) with data generated by a parallel run it'd be good to be able to do something like

gkyl comparefiles -da directoryA/ -db directoryB/

and it'll compare files just like our regression system does, reporting relative differences. This is a useful step on the way to checking results with MPI.

A more specific example, suppose I generate data for the vm-lbo/rt-lboRelax-1x1v-p1 test with gkyl runregression run create -r vm-lbo/rt-lboRelax-1x1v-p1.lua and make some changes that primarily affect MPI, then i'd like to check if a parallel run produces the same results with

mpirun -np N gkyl vm-lbo/rt-lboRelax-1x1v-p1.lua
gkyl comparefiles -da $HOME/gkylsoft/gkyl-results/vm-lbo/rt-lboRelax-1x1v-p1/ -db vm-lbo/