From 0774e121694b2e1739c8cf082ba115d3e949909c Mon Sep 17 00:00:00 2001 From: Martin Diehl Date: Fri, 21 Feb 2020 21:27:08 +0100 Subject: [PATCH] report progress --- python/damask/dadf5.py | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/python/damask/dadf5.py b/python/damask/dadf5.py index ce469f57e..b049c7dec 100644 --- a/python/damask/dadf5.py +++ b/python/damask/dadf5.py @@ -743,7 +743,7 @@ class DADF5(): 'label': '|{}|_{}'.format(x['label'],o), 'meta': { 'Unit': x['meta']['Unit'], - 'Description': '{}-norm of {} {} ({})'.format(ord,t,x['label'],x['meta']['Description']), + 'Description': '{}-norm of {} {} ({})'.format(o,t,x['label'],x['meta']['Description']), 'Creator': 'dadf5.py:add_norm v{}'.format(version) } } @@ -980,7 +980,9 @@ class DADF5(): groups = self.groups_with_datasets(datasets.values()) default_arg = partial(self.job,func=func,datasets=datasets,args=args,lock=lock) - for result in pool.imap_unordered(default_arg,groups): + util.progressBar(iteration=0,total=len(groups)-1) + for i,result in enumerate(pool.imap_unordered(default_arg,groups)): + util.progressBar(iteration=i,total=len(groups)-1) if not result: continue lock.acquire() with h5py.File(self.fname, 'a') as f: