[yt-users] mpi4py

gso at physics.ucsd.edu gso at physics.ucsd.edu
Mon Mar 21 16:52:03 PDT 2011


Just had a revelation, I just had to get rid of the yt.func part for it to
work since they're already imported from yt.mods... so first issue
resolved

but the mpi4py issue remains.

From
G.S.

> Hi all,
>
> I was trying to use a script that calls yt.func.only_on_root to write the
> results to an output file if my script is ran in parallel, when it gave me
> the following:
>
> Traceback (most recent call last):
>   File "QuantityTotal.py", line 127, in <module>
>     yt.funcs.only_on_root(flush, "frames/StarFormationRate.txt", "%12.12e
> %12.12e %12.12e %12.12i %12.12e %12.12i %12.12i %12.12i %12.12i\n" %
> (yr, TotEmis, redshift, num_sources, 0, Ion10, IonE3, IonE5,
> num_star))
> NameError: name 'yt' is not defined
>
> I was wondering if either I messed up an import or something similar since
> this script was from an older version of yt... with
> #from yt.config import ytcfg
> #ytcfg["lagos","serialize"] = "False"
> commented out at the top.  I also thought that maybe because I was using
> only 1 processor so I tried this on multiple processors on Triton after
> installing mpi4py by hand, instead I got:
>
>     from mpi4py import MPI
> ImportError: No module named mpi4py
> Traceback (most recent call last):
>   File "QuantityTotal.py", line 6, in <module>
>     from yt.mods import *
>   File "/home/gso/TritonYT/src/yt-hg/yt/mods.py", line 44, in <module>
>     from yt.data_objects.api import \
>   File "/home/gso/TritonYT/src/yt-hg/yt/data_objects/api.py", line 34, in
> <module>
>     from hierarchy import \
>   File "/home/gso/TritonYT/src/yt-hg/yt/data_objects/hierarchy.py", line
> 40, in <module>
>     from yt.utilities.parallel_tools.parallel_analysis_interface import \
>   File
> "/home/gso/TritonYT/src/yt-hg/yt/utilities/parallel_tools/parallel_analysis_interface.py",
> line 47, in <module>
>
> I used the same directory for both my YT installation and mpi4py, so I
> shouldn't have to change anything for my environment variables such as
> where the /lib and /bin are (dev yt 2.1 works fine in serial), so I'm not
> sure what's going on now.  Has anyone else encountered anything similar?
> Are they two different problems or one of the same?
>
> From
> G.S.
>
>
> _______________________________________________
> yt-users mailing list
> yt-users at lists.spacepope.org
> http://lists.spacepope.org/listinfo.cgi/yt-users-spacepope.org
>





More information about the yt-users mailing list