[yt-dev] communicators in yt

Matthew Turk matthewturk at gmail.com
Thu Apr 9 02:48:20 PDT 2015


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 <jzuhone at gmail.com> wrote:
> 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/1307a7103665a9b2563050e9bba05f0f96d8715c/yt/geometry/grid_geometry_handler.py?at=yt
>
> 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/1307a7103665a9b2563050e9bba05f0f96d8715c/yt/analysis_modules/photon_simulator/photon_models.py?at=yt
>
> 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 at lists.spacepope.org
> http://lists.spacepope.org/listinfo.cgi/yt-dev-spacepope.org
>
_______________________________________________
yt-dev mailing list
yt-dev at lists.spacepope.org
http://lists.spacepope.org/listinfo.cgi/yt-dev-spacepope.org




More information about the yt-dev mailing list