[yt-svn] commit/yt: ngoldbaum: Merged in brittonsmith/yt (pull request #1953)

commits-noreply at bitbucket.org commits-noreply at bitbucket.org
Tue Jan 26 10:53:50 PST 2016


1 new commit in yt:

https://bitbucket.org/yt_analysis/yt/commits/3659de2335c8/
Changeset:   3659de2335c8
Branch:      yt
User:        ngoldbaum
Date:        2016-01-26 18:53:44+00:00
Summary:     Merged in brittonsmith/yt (pull request #1953)

Decrease verbosity
Affected #:  7 files

diff -r cd0a29c8ed02c58096e6e0f3f6c7aaa6b8cf6dc3 -r 3659de2335c886b52105e081a596992cc597bf8d yt/data_objects/static_output.py
--- a/yt/data_objects/static_output.py
+++ b/yt/data_objects/static_output.py
@@ -437,7 +437,7 @@
             pu = ParticleUnion("all", list(self.particle_types_raw))
             self.add_particle_union(pu)
         self.field_info.setup_extra_union_fields()
-        mylog.info("Loading field plugins.")
+        mylog.debug("Loading field plugins.")
         self.field_info.load_all_plugins()
         deps, unloaded = self.field_info.check_derived_fields()
         self.field_dependencies.update(deps)

diff -r cd0a29c8ed02c58096e6e0f3f6c7aaa6b8cf6dc3 -r 3659de2335c886b52105e081a596992cc597bf8d yt/fields/field_info_container.py
--- a/yt/fields/field_info_container.py
+++ b/yt/fields/field_info_container.py
@@ -251,7 +251,7 @@
         loaded = []
         for n in sorted(field_plugins):
             loaded += self.load_plugin(n, ftype)
-            only_on_root(mylog.info, "Loaded %s (%s new fields)",
+            only_on_root(mylog.debug, "Loaded %s (%s new fields)",
                          n, len(loaded))
         self.find_dependencies(loaded)
 

diff -r cd0a29c8ed02c58096e6e0f3f6c7aaa6b8cf6dc3 -r 3659de2335c886b52105e081a596992cc597bf8d yt/frontends/gadget/data_structures.py
--- a/yt/frontends/gadget/data_structures.py
+++ b/yt/frontends/gadget/data_structures.py
@@ -16,6 +16,7 @@
 #-----------------------------------------------------------------------------
 
 from yt.extern.six import string_types
+from yt.funcs import only_on_root
 from yt.utilities.on_demand_imports import _h5py as h5py
 import numpy as np
 import stat
@@ -169,7 +170,7 @@
         # It may be possible to deduce whether ComovingIntegration is on
         # somehow, but opinions on this vary.
         if self.omega_lambda == 0.0:
-            mylog.info("Omega Lambda is 0.0, so we are turning off Cosmology.")
+            only_on_root(mylog.info, "Omega Lambda is 0.0, so we are turning off Cosmology.")
             self.hubble_constant = 1.0  # So that scaling comes out correct
             self.cosmological_simulation = 0
             self.current_redshift = 0.0
@@ -183,8 +184,8 @@
             cosmo = Cosmology(self.hubble_constant,
                               self.omega_matter, self.omega_lambda)
             self.current_time = cosmo.hubble_time(self.current_redshift)
-            mylog.info("Calculating time from %0.3e to be %0.3e seconds",
-                       hvals["Time"], self.current_time)
+            only_on_root(mylog.info, "Calculating time from %0.3e to be %0.3e seconds",
+                         hvals["Time"], self.current_time)
         self.parameters = hvals
 
         prefix = os.path.abspath(
@@ -202,10 +203,10 @@
         # If no units passed in by user, set a sane default (Gadget-2 users guide).
         if self._unit_base is None:
             if self.cosmological_simulation == 1:
-                mylog.info("Assuming length units are in kpc/h (comoving)")
+                only_on_root(mylog.info, "Assuming length units are in kpc/h (comoving)")
                 self._unit_base = dict(length = (1.0, "kpccm/h"))
             else:
-                mylog.info("Assuming length units are in kpc (physical)")
+                only_on_root(mylog.info, "Assuming length units are in kpc (physical)")
                 self._unit_base = dict(length = (1.0, "kpc"))
 
         # If units passed in by user, decide what to do about

diff -r cd0a29c8ed02c58096e6e0f3f6c7aaa6b8cf6dc3 -r 3659de2335c886b52105e081a596992cc597bf8d yt/frontends/gadget_fof/data_structures.py
--- a/yt/frontends/gadget_fof/data_structures.py
+++ b/yt/frontends/gadget_fof/data_structures.py
@@ -21,6 +21,7 @@
 import glob
 import os
 
+from yt.funcs import only_on_root
 from yt.frontends.gadget_fof.fields import \
     GadgetFOFFieldInfo
 
@@ -169,7 +170,7 @@
     def _set_code_unit_attributes(self):
         # Set a sane default for cosmological simulations.
         if self._unit_base is None and self.cosmological_simulation == 1:
-            mylog.info("Assuming length units are in Mpc/h (comoving)")
+            only_on_root(mylog.info, "Assuming length units are in Mpc/h (comoving)")
             self._unit_base = dict(length = (1.0, "Mpccm/h"))
         # The other same defaults we will use from the standard Gadget
         # defaults.

diff -r cd0a29c8ed02c58096e6e0f3f6c7aaa6b8cf6dc3 -r 3659de2335c886b52105e081a596992cc597bf8d yt/frontends/owls_subfind/data_structures.py
--- a/yt/frontends/owls_subfind/data_structures.py
+++ b/yt/frontends/owls_subfind/data_structures.py
@@ -24,6 +24,7 @@
 from .fields import \
     OWLSSubfindFieldInfo
 
+from yt.funcs import only_on_root
 from yt.utilities.exceptions import \
     YTException
 from yt.utilities.logger import ytLogger as \
@@ -157,7 +158,7 @@
     def _set_code_unit_attributes(self):
         # Set a sane default for cosmological simulations.
         if self._unit_base is None and self.cosmological_simulation == 1:
-            mylog.info("Assuming length units are in Mpc/h (comoving)")
+            only_on_root(mylog.info, "Assuming length units are in Mpc/h (comoving)")
             self._unit_base = dict(length = (1.0, "Mpccm/h"))
         # The other same defaults we will use from the standard Gadget
         # defaults.

diff -r cd0a29c8ed02c58096e6e0f3f6c7aaa6b8cf6dc3 -r 3659de2335c886b52105e081a596992cc597bf8d yt/frontends/ytdata/data_structures.py
--- a/yt/frontends/ytdata/data_structures.py
+++ b/yt/frontends/ytdata/data_structures.py
@@ -112,7 +112,7 @@
             pu = ParticleUnion("all", list(self.particle_types_raw))
             self.add_particle_union(pu)
         self.field_info.setup_extra_union_fields()
-        mylog.info("Loading field plugins.")
+        mylog.debug("Loading field plugins.")
         self.field_info.load_all_plugins()
         deps, unloaded = self.field_info.check_derived_fields()
         self.field_dependencies.update(deps)

diff -r cd0a29c8ed02c58096e6e0f3f6c7aaa6b8cf6dc3 -r 3659de2335c886b52105e081a596992cc597bf8d yt/geometry/particle_geometry_handler.py
--- a/yt/geometry/particle_geometry_handler.py
+++ b/yt/geometry/particle_geometry_handler.py
@@ -18,6 +18,7 @@
 import os
 import weakref
 
+from yt.funcs import only_on_root
 from yt.utilities.logger import ytLogger as mylog
 from yt.data_objects.octree_subset import ParticleOctreeSubset
 from yt.geometry.geometry_handler import Index, YTDataChunk
@@ -67,7 +68,7 @@
             [1, 1, 1], ds.domain_left_edge, ds.domain_right_edge,
             over_refine = ds.over_refine_factor)
         self.oct_handler.n_ref = ds.n_ref
-        mylog.info("Allocating for %0.3e particles", self.total_particles)
+        only_on_root(mylog.info, "Allocating for %0.3e particles", self.total_particles)
         # No more than 256^3 in the region finder.
         N = min(len(self.data_files), 256) 
         self.regions = ParticleRegions(
@@ -77,7 +78,7 @@
         self.oct_handler.finalize()
         self.max_level = self.oct_handler.max_level
         tot = sum(self.oct_handler.recursively_count().values())
-        mylog.info("Identified %0.3e octs", tot)
+        only_on_root(mylog.info, "Identified %0.3e octs", tot)
 
     def _initialize_indices(self):
         # This will be replaced with a parallel-aware iteration step.

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