running python program in yt project with STAMPEDE -
i have been working on python program find max_dens of files whenever execute file same error. can please tell me these errors refer to? using yt 3.1
computes , plots maximum density on time
import yt #import libcartesian3d import matplotlib matplotlib.use('agg') import matplotlib.pyplot plt import glob import numpy np flashfolder = '/work/03858/thaque56/run_149/' basename = 'super3d_' # sets prefix of plotfiles , checkpoint files. 'super3d_' mhd, 'relax_' purehydro. useallplotfiles = false # set true use glob.glob select plotfiles (by default uses available files) endcount = 5 # specify if useallplotfiles == false, gives number of last plotfile used # ============================ constructs list of filenames if script run on own, otherwise supplied allplots.py ! def getfilenames(useallplotfiles,endcount): if useallplotfiles == true: plotfilenames_own = glob.glob(flashfolder + basename + 'hdf5_plt_cnt_[0-9][0-9][0-9][0-9]') plotfilenames_own.sort() else: plotfilenames_own = [] n in range(0,endcount + 1): filename = flashfolder + basename + 'hdf5_plt_cnt_%04d' % n plotfilenames_own.append(filename) return plotfilenames_own #============================ def main(filenames): print 'executing maxdens.py' max_dens = np.zeros(len(filenames)) time = np.zeros(len(filenames)) n in range (len(filenames)): pf =yt.load(filenames[n]) time[n] = pf.current_time dens_max, dens_max_location = pf.h.find_max('dens') max_dens[n] = dens_max print time, max_dens plt.plot(time,max_dens) plt.xlabel('time [s]') plt.ylabel('density [g/cm^3]') plt.title('maximum density on time') plt.savefig('maxdens.png') if __name__ == "__main__": plotfilenames_own = getfilenames(useallplotfiles,endcount) main(plotfilenames_own)
i attaching error convenience.
> tacc: starting job 6517689 > tacc: setting parallel environment mvapich2+mpispawn. > tacc: starting parallel tasks... > traceback (most recent call last): > file "maxdens.py", line 3, in <module> > import yt > file "/work/03858/thaque56/sw/yt-3.1/yt-x86_64/src/yt-hg/yt/__init__.py", > line 121, in <module> > yt.data_objects.api import \ > file "/work/03858/thaque56/sw/yt-3.1/yt-x86_64/src/yt-hg/yt/data_objects/api.py", > line 51, in <module> > . import construction_data_containers __cdc > file "/work/03858/thaque56/sw/yt-3.1/yt-x86_64/src/yt-hg/yt/data_objects/construction_data_containers.py", > line 52, in <module> > yt.frontends.stream.api import load_uniform_grid > file "/work/03858/thaque56/sw/yt-3.1/yt-x86_64/src/yt-hg/yt/frontends/stream/api.py", > line 16, in <module> > .data_structures import \ > file "/work/03858/thaque56/sw/yt-3.1/yt-x86_64/src/yt-hg/yt/frontends/stream/data_structures.py", > line 38, in <module> > yt.geometry.grid_geometry_handler import \ > file "/work/03858/thaque56/sw/yt-3.1/yt-x86_64/src/yt-hg/yt/geometry/grid_geometry_handler.py", > line 38, in <module> > .grid_container import \ > file "yt/geometry/selection_routines.pxd", line 34, in init yt.geometry.grid_container (yt/geometry/grid_container.c:9108) > valueerror: yt.geometry.selection_routines.selectorobject has wrong size, try recompiling > [c557-601.stampede.tacc.utexas.edu:mpispawn_0][child_handler] mpi
process (rank: 0, pid: 130364) exited status 1
tacc: mpi job exited code: 1 tacc: shutdown complete. exiting.
please me resolve this. think there problem yt versions.
the issue of c extensions yt uses generated cython need recompiled. turns out clean.sh
script doesn't delete those, you'll have clean them out so:
$ cd /work/03858/thaque56/sw/yt-3.1/yt-x86_64/src/yt-hg/ $ hg --config extensions.purge= purge --all yt $ python setup.py develop
sorry giving bad advice on yt mailing list last night! hope fixes things you.
Comments
Post a Comment