[yt-svn] commit/yt-doc: 2 new changesets
commits-noreply at bitbucket.org
commits-noreply at bitbucket.org
Fri May 31 12:42:25 PDT 2013
2 new commits in yt-doc:
https://bitbucket.org/yt_analysis/yt-doc/commits/41b7d2bf77a1/
Changeset: 41b7d2bf77a1
User: jsoishi
Date: 2013-05-31 21:23:06
Summary: added is_root() to documentation.
Affected #: 2 files
diff -r 3c39d10238dbb3780516d8263a3a9cc38efad59e -r 41b7d2bf77a18d432208eedc2b227c2f74b34494 source/advanced/parallel_computation.rst
--- a/source/advanced/parallel_computation.rst
+++ b/source/advanced/parallel_computation.rst
@@ -81,9 +81,14 @@
operate on a grid-by-grid decomposed basis. In ``yt`` version 1.5 and the
trunk, this has recently been set to be the default.
-.. warning:: If you manually interact with the filesystem, not through YT, you
- will have to ensure that you only execute your functions on the root
- processor. You can do this with the function :func:`only_on_root`.
+.. warning:: If you manually interact with the filesystem via
+ functions, not through YT, you will have to ensure that you only
+ execute these functions on the root processor. You can do this
+ with the function :func:`only_on_root`. If you have only a few
+ lines of code that interact with the filesystem
+ (e.g. ``pyplot.savefig('blah.png')``), you can wrap them in an if
+ statement, using yt's :func:`is_root` which returns True only for
+ the root process.
yt.pmods
--------
diff -r 3c39d10238dbb3780516d8263a3a9cc38efad59e -r 41b7d2bf77a18d432208eedc2b227c2f74b34494 source/cookbook/time_series.py
--- a/source/cookbook/time_series.py
+++ b/source/cookbook/time_series.py
@@ -35,7 +35,8 @@
times.append(t)
entrs.append(e)
-plt.semilogy(times, entrs, 'x-')
-plt.xlabel("Time")
-plt.ylabel("Entropy")
-plt.savefig("time_versus_entropy.png")
+if is_root():
+ plt.semilogy(times, entrs, 'x-')
+ plt.xlabel("Time")
+ plt.ylabel("Entropy")
+ plt.savefig("time_versus_entropy.png")
https://bitbucket.org/yt_analysis/yt-doc/commits/aa42eb07c721/
Changeset: aa42eb07c721
User: jsoishi
Date: 2013-05-31 21:32:45
Summary: added a link to the cookbook recipe
Affected #: 1 file
diff -r 41b7d2bf77a18d432208eedc2b227c2f74b34494 -r aa42eb07c72160460f230d98f43f2398aa19546e source/advanced/parallel_computation.rst
--- a/source/advanced/parallel_computation.rst
+++ b/source/advanced/parallel_computation.rst
@@ -88,7 +88,8 @@
lines of code that interact with the filesystem
(e.g. ``pyplot.savefig('blah.png')``), you can wrap them in an if
statement, using yt's :func:`is_root` which returns True only for
- the root process.
+ the root process. See :ref:`cookbook-time-series-analysis` for
+ an example.
yt.pmods
--------
Repository URL: https://bitbucket.org/yt_analysis/yt-doc/
--
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