
Hi everyone, I've come across an error while trying to use yt for parallel analysis on Kraken. Wondering if its something people have seen before. I have my simple script that does slices of a few different quanties. When I ran it with 12 tasks on Kraken, it worked fine for the first four datasets, but crashed during the fifth one. I tried a simpler script that just does a slice of density for that dataset, and it crashed again with the same error: IndexError: arrays used as indices must be of integer (or boolean) type When I ran this code again with only 1 task (still on Kraken, everything else the same), it worked fine. More of the output, as well as my job script and plotting script, are below. Since it works in serial , and works for some data sets, the problem seems to be something to do with parallelism. Is there any sort of simple explanation or something I'm doing wrong? Just wondering if this is something people have come across before. --Greg (Last few lines of output) mg, mc, mv, pos = self.find_max_cell_location(field, finest_levels) mg, mc, mv, pos = self.find_max_cell_location(field, finest_levels) File "/lustre/scratch/proj/sw/yt/current/lib/python2.7/site-packages/yt-2.1stable-py2.7-linux-x86_64.egg/yt/data_objects/object_finding_mixin.py", line 69, in find_max_cell_location File "/lustre/scratch/proj/sw/yt/current/lib/python2.7/site-packages/yt-2.1stable-py2.7-linux-x86_64.egg/yt/data_objects/object_finding_mixin.py", line 69, in find_max_cell_location File "/lustre/scratch/proj/sw/yt/current/lib/python2.7/site-packages/yt-2.1stable-py2.7-linux-x86_64.egg/yt/data_objects/object_finding_mixin.py", line 69, in find_max_cell_location max_grid = self.grids[mg] IndexError: arrays used as indices must be of integer (or boolean) type max_grid = self.grids[mg] max_grid = self.grids[mg] IndexError: arrays used as indices must be of integer (or boolean) type IndexError: arrays used as indices must be of integer (or boolean) type (Job script) #!/bin/bash #PBS -A TG-AST090040 #PBS -l size=12,walltime=2:00:00 #PBS -j oe #PBS -N slicer cd /lustre/scratch/oshea/nested_ics_real1/analysis ls pwd export MPLCONFIGDIR=${PBS_O_WORKDIR}/.matplotlib/ [ ! -d ${MPLCONFIGDIR} ] && mkdir ${MPLCONFIGDIR} module unload PrgEnv-pgi module load PrgEnv-gnu module load yt aprun -n 12 python ./simple_slice.py --parallel (simple_slice.py) from yt.mods import * DD = 40 fileName = "../DD%s/DD%s" % ((str(DD)).zfill(4), (str(DD)).zfill(4)) pf = load(fileName) pc = PlotCollection(pf) pc.add_slice("Density", 0) pc.save("./%s" % str(DD).zfill(4))

Hi Greg, Thanks for writing. This looks familiar to me, and I think it is fixed in the current development branch. Can you use the dev module for yt instead of stable? One sidenote is that often slicing in parallel is not a net gain; I have found very few datasets where it is in fact substantially faster, most of them gigantic AMR runs with >1e5 grids. I would recommend just doing slices in serial. Best, Matt On Fri, Jul 29, 2011 at 11:15 AM, <meecegre@msu.edu> wrote:
Hi everyone,
I've come across an error while trying to use yt for parallel analysis on Kraken. Wondering if its something people have seen before.
I have my simple script that does slices of a few different quanties. When I ran it with 12 tasks on Kraken, it worked fine for the first four datasets, but crashed during the fifth one. I tried a simpler script that just does a slice of density for that dataset, and it crashed again with the same error:
IndexError: arrays used as indices must be of integer (or boolean) type
When I ran this code again with only 1 task (still on Kraken, everything else the same), it worked fine. More of the output, as well as my job script and plotting script, are below.
Since it works in serial , and works for some data sets, the problem seems to be something to do with parallelism. Is there any sort of simple explanation or something I'm doing wrong?
Just wondering if this is something people have come across before.
--Greg
(Last few lines of output) mg, mc, mv, pos = self.find_max_cell_location(field, finest_levels) mg, mc, mv, pos = self.find_max_cell_location(field, finest_levels) File "/lustre/scratch/proj/sw/yt/current/lib/python2.7/site-packages/yt-2.1stable-py2.7-linux-x86_64.egg/yt/data_objects/object_finding_mixin.py", line 69, in find_max_cell_location File "/lustre/scratch/proj/sw/yt/current/lib/python2.7/site-packages/yt-2.1stable-py2.7-linux-x86_64.egg/yt/data_objects/object_finding_mixin.py", line 69, in find_max_cell_location File "/lustre/scratch/proj/sw/yt/current/lib/python2.7/site-packages/yt-2.1stable-py2.7-linux-x86_64.egg/yt/data_objects/object_finding_mixin.py", line 69, in find_max_cell_location max_grid = self.grids[mg] IndexError: arrays used as indices must be of integer (or boolean) type max_grid = self.grids[mg] max_grid = self.grids[mg] IndexError: arrays used as indices must be of integer (or boolean) type IndexError: arrays used as indices must be of integer (or boolean) type
(Job script) #!/bin/bash #PBS -A TG-AST090040 #PBS -l size=12,walltime=2:00:00 #PBS -j oe #PBS -N slicer
cd /lustre/scratch/oshea/nested_ics_real1/analysis
ls pwd
export MPLCONFIGDIR=${PBS_O_WORKDIR}/.matplotlib/ [ ! -d ${MPLCONFIGDIR} ] && mkdir ${MPLCONFIGDIR}
module unload PrgEnv-pgi module load PrgEnv-gnu module load yt
aprun -n 12 python ./simple_slice.py --parallel
(simple_slice.py) from yt.mods import *
DD = 40
fileName = "../DD%s/DD%s" % ((str(DD)).zfill(4), (str(DD)).zfill(4))
pf = load(fileName) pc = PlotCollection(pf)
pc.add_slice("Density", 0)
pc.save("./%s" % str(DD).zfill(4))
_______________________________________________ yt-users mailing list yt-users@lists.spacepope.org http://lists.spacepope.org/listinfo.cgi/yt-users-spacepope.org

Hi, I tried the dev module, but it still didn't work. I should note that I'm using the common install. I also tried a script that does a few projections and profiles without slices, and it also crashed with the same error. It looks like only a few nodes are crashing, while the others run along fine for a while. I've attached the full output, which lists the modules I have loaded near the top. Thanks, -- Greg
Hi Greg,
Thanks for writing. This looks familiar to me, and I think it is fixed in the current development branch. Can you use the dev module for yt instead of stable?
One sidenote is that often slicing in parallel is not a net gain; I have found very few datasets where it is in fact substantially faster, most of them gigantic AMR runs with >1e5 grids. I would recommend just doing slices in serial.
Best,
Matt
On Fri, Jul 29, 2011 at 11:15 AM, <meecegre@msu.edu> wrote:
Hi everyone,
I've come across an error while trying to use yt for parallel analysis on Kraken. Wondering if its something people have seen before.
I have my simple script that does slices of a few different quanties. When I ran it with 12 tasks on Kraken, it worked fine for the first four datasets, but crashed during the fifth one. I tried a simpler script that just does a slice of density for that dataset, and it crashed again with the same error:
IndexError: arrays used as indices must be of integer (or boolean) type
When I ran this code again with only 1 task (still on Kraken, everything else the same), it worked fine. More of the output, as well as my job script and plotting script, are below.
Since it works in serial , and works for some data sets, the problem seems to be something to do with parallelism. Is there any sort of simple explanation or something I'm doing wrong?
Just wondering if this is something people have come across before.
--Greg
(Last few lines of output) mg, mc, mv, pos = self.find_max_cell_location(field, finest_levels) mg, mc, mv, pos = self.find_max_cell_location(field, finest_levels) File "/lustre/scratch/proj/sw/yt/current/lib/python2.7/site-packages/yt-2.1stable-py2.7-linux-x86_64.egg/yt/data_objects/object_finding_mixin.py", line 69, in find_max_cell_location File "/lustre/scratch/proj/sw/yt/current/lib/python2.7/site-packages/yt-2.1stable-py2.7-linux-x86_64.egg/yt/data_objects/object_finding_mixin.py", line 69, in find_max_cell_location File "/lustre/scratch/proj/sw/yt/current/lib/python2.7/site-packages/yt-2.1stable-py2.7-linux-x86_64.egg/yt/data_objects/object_finding_mixin.py", line 69, in find_max_cell_location max_grid = self.grids[mg] IndexError: arrays used as indices must be of integer (or boolean) type max_grid = self.grids[mg] max_grid = self.grids[mg] IndexError: arrays used as indices must be of integer (or boolean) type IndexError: arrays used as indices must be of integer (or boolean) type
(Job script) #!/bin/bash #PBS -A TG-AST090040 #PBS -l size=12,walltime=2:00:00 #PBS -j oe #PBS -N slicer
cd /lustre/scratch/oshea/nested_ics_real1/analysis
ls pwd
export MPLCONFIGDIR=${PBS_O_WORKDIR}/.matplotlib/ [ ! -d ${MPLCONFIGDIR} ] && mkdir ${MPLCONFIGDIR}
module unload PrgEnv-pgi module load PrgEnv-gnu module load yt
aprun -n 12 python ./simple_slice.py --parallel
(simple_slice.py) from yt.mods import *
DD = 40
fileName = "../DD%s/DD%s" % ((str(DD)).zfill(4), (str(DD)).zfill(4))
pf = load(fileName) pc = PlotCollection(pf)
pc.add_slice("Density", 0)
pc.save("./%s" % str(DD).zfill(4))
_______________________________________________ yt-users mailing list yt-users@lists.spacepope.org http://lists.spacepope.org/listinfo.cgi/yt-users-spacepope.org
_______________________________________________ yt-users mailing list yt-users@lists.spacepope.org http://lists.spacepope.org/listinfo.cgi/yt-users-spacepope.org
participants (2)
-
Matthew Turk
-
meecegre@msu.edu