[yt-svn] commit/yt: 2 new changesets
commits-noreply at bitbucket.org
commits-noreply at bitbucket.org
Tue Sep 19 06:44:07 PDT 2017
2 new commits in yt:
https://bitbucket.org/yt_analysis/yt/commits/c3e87ef86a0f/
Changeset: c3e87ef86a0f
User: brittonsmith
Date: 2017-09-14 17:57:43+00:00
Summary: Add parallel progress bar to halo catalog.
Affected #: 1 file
diff -r fccca1fb4d585d705867a553e7fd5ec94ac7181d -r c3e87ef86a0f02bb507f4f24d71f380d682b43aa yt/analysis_modules/halo_analysis/halo_catalog.py
--- a/yt/analysis_modules/halo_analysis/halo_catalog.py
+++ b/yt/analysis_modules/halo_analysis/halo_catalog.py
@@ -20,6 +20,7 @@
save_as_dataset
from yt.funcs import \
ensure_dir, \
+ get_pbar, \
mylog
from yt.utilities.parallel_tools.parallel_analysis_interface import \
ParallelAnalysisInterface, \
@@ -419,7 +420,12 @@
self.add_default_quantities('all')
my_index = np.argsort(self.data_source["all", "particle_identifier"])
+ nhalos = my_index.size
+ my_i = 0
+ my_n = self.comm.size
+ pbar = get_pbar("Creating catalog", nhalos, parallel=True)
for i in parallel_objects(my_index, njobs=njobs, dynamic=dynamic):
+ my_i += min(my_n, nhalos - my_i)
new_halo = Halo(self)
halo_filter = True
for action_type, action in self.actions:
@@ -427,7 +433,9 @@
action(new_halo)
elif action_type == "filter":
halo_filter = action(new_halo)
- if not halo_filter: break
+ if not halo_filter:
+ pbar.update(my_i)
+ break
elif action_type == "quantity":
key, quantity = action
if quantity in self.halos_ds.field_info:
@@ -449,6 +457,8 @@
else:
del new_halo
+ pbar.update(my_i)
+
self.catalog.sort(key=lambda a:a['particle_identifier'].to_ndarray())
if save_catalog:
self.save_catalog()
https://bitbucket.org/yt_analysis/yt/commits/fb7d9a802c1d/
Changeset: fb7d9a802c1d
User: xarthisius
Date: 2017-09-19 13:43:51+00:00
Summary: Merge pull request #1559 from brittonsmith/hgpb
Add parallel progress bar to halo catalog.
Affected #: 1 file
diff -r 06a7445d0c8649ba95211539cf71829d9d0b298b -r fb7d9a802c1dd06492673d7ed771e01b721d9de9 yt/analysis_modules/halo_analysis/halo_catalog.py
--- a/yt/analysis_modules/halo_analysis/halo_catalog.py
+++ b/yt/analysis_modules/halo_analysis/halo_catalog.py
@@ -20,6 +20,7 @@
save_as_dataset
from yt.funcs import \
ensure_dir, \
+ get_pbar, \
mylog
from yt.utilities.parallel_tools.parallel_analysis_interface import \
ParallelAnalysisInterface, \
@@ -419,7 +420,12 @@
self.add_default_quantities('all')
my_index = np.argsort(self.data_source["all", "particle_identifier"])
+ nhalos = my_index.size
+ my_i = 0
+ my_n = self.comm.size
+ pbar = get_pbar("Creating catalog", nhalos, parallel=True)
for i in parallel_objects(my_index, njobs=njobs, dynamic=dynamic):
+ my_i += min(my_n, nhalos - my_i)
new_halo = Halo(self)
halo_filter = True
for action_type, action in self.actions:
@@ -427,7 +433,9 @@
action(new_halo)
elif action_type == "filter":
halo_filter = action(new_halo)
- if not halo_filter: break
+ if not halo_filter:
+ pbar.update(my_i)
+ break
elif action_type == "quantity":
key, quantity = action
if quantity in self.halos_ds.field_info:
@@ -449,6 +457,8 @@
else:
del new_halo
+ pbar.update(my_i)
+
self.catalog.sort(key=lambda a:a['particle_identifier'].to_ndarray())
if save_catalog:
self.save_catalog()
Repository URL: https://bitbucket.org/yt_analysis/yt/
--
This is a commit notification from bitbucket.org. You are receiving
this because you have the service enabled, addressing the recipient of
this email.
More information about the yt-svn
mailing list