communicators in yt
Hi devs, Could someone with knowledge about this explain to me how parallel communicators work in yt? I’m trying to adjust the chunk size for grid geometries using the size of the communicator, see line 361 here: https://bitbucket.org/jzuhone/yt-3.x/src/1307a7103665a9b2563050e9bba05f0f96d... https://bitbucket.org/jzuhone/yt-3.x/src/1307a7103665a9b2563050e9bba05f0f96d... where I’m trying to determine the size of the communicator using this: nproc = ytcfg.getint("yt", "__topcomm_parallel_size”) For an 8-processor job, I expect this to be nproc = 8, but it’s not. I’m generating chunks in photon_simulator from a data source and then iterating over them using parallel_objects, see lines 91-93, 108 of: https://bitbucket.org/jzuhone/yt-3.x/src/1307a7103665a9b2563050e9bba05f0f96d... https://bitbucket.org/jzuhone/yt-3.x/src/1307a7103665a9b2563050e9bba05f0f96d... I realize this is a little obtuse, but can someone flesh this out for me, and tell me how to get the size I’m looking for in this case? Best, John Z _______________________________________________ yt-dev mailing list yt-dev@lists.spacepope.org http://lists.spacepope.org/listinfo.cgi/yt-dev-spacepope.org
Hi John,
There are two communicator inside the config file, the topcomm and
global. The topcomm is the current communicator on top of the stack;
if you're doing parallel_objects with the default, this will be set to
1, since the "top" communicator only has one processor. If you have
access to a ParallelAnalysisInterface-derived object, that will have a
.comm which is the communicator it was created with, which will also
have rank and size and whatnot.
-Matt
On Wed, Apr 8, 2015 at 2:22 PM, John Zuhone
Hi devs,
Could someone with knowledge about this explain to me how parallel communicators work in yt?
I’m trying to adjust the chunk size for grid geometries using the size of the communicator, see line 361 here:
https://bitbucket.org/jzuhone/yt-3.x/src/1307a7103665a9b2563050e9bba05f0f96d...
where I’m trying to determine the size of the communicator using this:
nproc = ytcfg.getint("yt", "__topcomm_parallel_size”)
For an 8-processor job, I expect this to be nproc = 8, but it’s not. I’m generating chunks in photon_simulator from a data source and then iterating over them using parallel_objects, see lines 91-93, 108 of:
https://bitbucket.org/jzuhone/yt-3.x/src/1307a7103665a9b2563050e9bba05f0f96d...
I realize this is a little obtuse, but can someone flesh this out for me, and tell me how to get the size I’m looking for in this case?
Best,
John Z
_______________________________________________ yt-dev mailing list yt-dev@lists.spacepope.org http://lists.spacepope.org/listinfo.cgi/yt-dev-spacepope.org
_______________________________________________ yt-dev mailing list yt-dev@lists.spacepope.org http://lists.spacepope.org/listinfo.cgi/yt-dev-spacepope.org
participants (2)
-
John Zuhone
-
Matthew Turk