[yt-users] mpi4py

gso at physics.ucsd.edu gso at physics.ucsd.edu
Mon Mar 21 18:04:13 PDT 2011


Yup that fixed the problem, thanks :-)

Should not have messed with the --home flag, leaving it out lets it find
the right location automatically.

From
G.S.

> Hi G.S.,
>
> You should be fine with:
> python setup.py install
> without the --home flag.
> As long as the python you're calling is the one you want mpi4py installed
> on, it will be fine.  You just need to make sure that the mpi.cfg file in
> the mpi4py source directory is pointing to the right mpi installation.
>
> Britton
>
> On Mon, Mar 21, 2011 at 8:41 PM, <gso at physics.ucsd.edu> wrote:
>
>> In my .bashrc
>> export PYTHONPATH=/home/gso/TritonYT/lib/python2.7/site-packages
>>
>> but the mpi4py was found in /home/gso/TritonYT/lib/python/mpi4py
>>
>> Should I reinstall mpi4py with
>> python setup.py install
>> --home=/home/gso/TritonYT/lib/python2.7/site-packages
>>
>> instead of just:
>> python setup.py install --home=/home/gso/TritonYT
>> ?
>>
>> From
>> G.S.
>>
>> > Hi G.S.,
>> >
>> > For whatever reason, the python you're using doesn't think it has
>> mpi4py
>> > installed.  If you installed yt from the install script, you should
>> have
>> > set
>> > the PYTHONPATH environment variable.  One way you can verify whether
>> you
>> > actually have mpi4py installed with that python is by going into the
>> > PYTHONPATH directory and checking if there is anything in there named
>> > mpi4py.  Can you verify this?
>> >
>> > Britton
>> >
>> > On Mon, Mar 21, 2011 at 7:52 PM, <gso at physics.ucsd.edu> wrote:
>> >
>> >> 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
>> >> >
>> >>
>> >>
>> >> _______________________________________________
>> >> yt-users mailing list
>> >> yt-users at lists.spacepope.org
>> >> http://lists.spacepope.org/listinfo.cgi/yt-users-spacepope.org
>> >>
>> > _______________________________________________
>> > yt-users mailing list
>> > yt-users at lists.spacepope.org
>> > http://lists.spacepope.org/listinfo.cgi/yt-users-spacepope.org
>> >
>>
>>
>> _______________________________________________
>> yt-users mailing list
>> yt-users at lists.spacepope.org
>> http://lists.spacepope.org/listinfo.cgi/yt-users-spacepope.org
>>
> _______________________________________________
> 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