from yt.analysis_modules.api import EnzoSimulation
Hi, I just downloaded the latest http://hg.enzotools.org/yt/raw/stable/doc/install_script.sh and installed YT. Now, my python script (at the end of the email) quits with a "Segmentation fault" error at line-8 (yt.analysis_modules.api): [sagarwal@ember ~/junk]$ python colorbars.py parameterfile Segmentation fault If I comment out line8, then (obviously) I get the following error: Adding gaussian at -2.0 with width 0.5 and colors (0.0, 0.0, 0.502, 0.00031622776601683794) Adding gaussian at 0.5 with width 0.5 and colors (0.85737517232758309, 1.0, 0.12482388288648784, 0.005623413251903491) Adding gaussian at 3.0 with width 0.5 and colors (0.99609999999999999, 0.97250000000000003, 0.99609999999999999, 0.10000000000000001) Traceback (most recent call last): File "colorbars.py", line 36, in <module> es = EnzoSimulation(par_file, get_redshift_outputs=True, initial_redshift=50, final_redshift=0) NameError: name 'EnzoSimulation' is not defined Any ideas? Shankar python_script... ------------------------------------------------------------- import numpy as na from yt.mods import * import yt.visualization.volume_rendering.api as vr import matplotlib.pylab as pl import sys from yt.mods import * from yt.visualization.image_writer import write_bitmap from yt.analysis_modules.api import EnzoSimulation blah..blah... par_file = sys.argv[1] es = EnzoSimulation(par_file, get_redshift_outputs=True, initial_redshift=50, final_redshift=0) -------------------------------------------------------------
I think having to import EnzoSimulation is the old YT, the newer YT you can just do from yt.mods import * pf = load("par_file") [mine is usually something like pf = load("DD0000/DD0000")] see if that works From G.S.
Hi,
I just downloaded the latest http://hg.enzotools.org/yt/raw/stable/doc/install_script.sh
and installed YT. Now, my python script (at the end of the email) quits with a "Segmentation fault" error at line-8 (yt.analysis_modules.api):
[sagarwal@ember ~/junk]$ python colorbars.py parameterfile Segmentation fault
If I comment out line8, then (obviously) I get the following error:
Adding gaussian at -2.0 with width 0.5 and colors (0.0, 0.0, 0.502, 0.00031622776601683794) Adding gaussian at 0.5 with width 0.5 and colors (0.85737517232758309, 1.0, 0.12482388288648784, 0.005623413251903491) Adding gaussian at 3.0 with width 0.5 and colors (0.99609999999999999, 0.97250000000000003, 0.99609999999999999, 0.10000000000000001) Traceback (most recent call last): File "colorbars.py", line 36, in <module> es = EnzoSimulation(par_file, get_redshift_outputs=True, initial_redshift=50, final_redshift=0) NameError: name 'EnzoSimulation' is not defined
Any ideas? Shankar
python_script... ------------------------------------------------------------- import numpy as na from yt.mods import * import yt.visualization.volume_rendering.api as vr import matplotlib.pylab as pl import sys
from yt.mods import * from yt.visualization.image_writer import write_bitmap from yt.analysis_modules.api import EnzoSimulation
blah..blah...
par_file = sys.argv[1] es = EnzoSimulation(par_file, get_redshift_outputs=True, initial_redshift=50, final_redshift=0) ------------------------------------------------------------- _______________________________________________ yt-users mailing list yt-users@lists.spacepope.org http://lists.spacepope.org/listinfo.cgi/yt-users-spacepope.org
Actually I just tried and you can use from yt.mods impolrt * pf = EnzoSimulation("par_file") just skip the from yt.analysis_modules.api import EnzoSimulation and it will work From G.S.
I think having to import EnzoSimulation is the old YT, the newer YT you can just do
from yt.mods import * pf = load("par_file") [mine is usually something like pf = load("DD0000/DD0000")]
see if that works
From G.S.
Hi,
I just downloaded the latest http://hg.enzotools.org/yt/raw/stable/doc/install_script.sh
and installed YT. Now, my python script (at the end of the email) quits with a "Segmentation fault" error at line-8 (yt.analysis_modules.api):
[sagarwal@ember ~/junk]$ python colorbars.py parameterfile Segmentation fault
If I comment out line8, then (obviously) I get the following error:
Adding gaussian at -2.0 with width 0.5 and colors (0.0, 0.0, 0.502, 0.00031622776601683794) Adding gaussian at 0.5 with width 0.5 and colors (0.85737517232758309, 1.0, 0.12482388288648784, 0.005623413251903491) Adding gaussian at 3.0 with width 0.5 and colors (0.99609999999999999, 0.97250000000000003, 0.99609999999999999, 0.10000000000000001) Traceback (most recent call last): File "colorbars.py", line 36, in <module> es = EnzoSimulation(par_file, get_redshift_outputs=True, initial_redshift=50, final_redshift=0) NameError: name 'EnzoSimulation' is not defined
Any ideas? Shankar
python_script... ------------------------------------------------------------- import numpy as na from yt.mods import * import yt.visualization.volume_rendering.api as vr import matplotlib.pylab as pl import sys
from yt.mods import * from yt.visualization.image_writer import write_bitmap from yt.analysis_modules.api import EnzoSimulation
blah..blah...
par_file = sys.argv[1] es = EnzoSimulation(par_file, get_redshift_outputs=True, initial_redshift=50, final_redshift=0) ------------------------------------------------------------- _______________________________________________ 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
Hi G.S. Unfortunately, that did not work. If I skip "from yt.analysis_modules.api import EnzoSimulation", then i get the following error: NameError: name 'EnzoSimulation' is not defined [sagarwal@ember ~/junk]$ python Python 2.7.1 (r271:86832, Apr 23 2011, 12:22:34) [GCC 4.3.4 [gcc-4_3-branch revision 152973]] on linux2 Type "help", "copyright", "credits" or "license" for more information.
from yt.mods import * import numpy as na import yt.visualization.volume_rendering.api as vr import matplotlib.pylab as pl import sys from yt.visualization.image_writer import write_bitmap from yt.analysis_modules.api import EnzoSimulation Segmentation fault
For reference, the script I am talking about is http://paste.enzotools.org/show/1580/ Shankar ________________________________________ From: yt-users-bounces@lists.spacepope.org [yt-users-bounces@lists.spacepope.org] on behalf of gso@physics.ucsd.edu [gso@physics.ucsd.edu] Sent: Saturday, April 23, 2011 6:18 PM To: Discussion of the yt analysis package Subject: Re: [yt-users] from yt.analysis_modules.api import EnzoSimulation Actually I just tried and you can use from yt.mods impolrt * pf = EnzoSimulation("par_file") just skip the from yt.analysis_modules.api import EnzoSimulation and it will work From G.S.
I think having to import EnzoSimulation is the old YT, the newer YT you can just do
from yt.mods import * pf = load("par_file") [mine is usually something like pf = load("DD0000/DD0000")]
see if that works
From G.S.
Hi,
I just downloaded the latest http://hg.enzotools.org/yt/raw/stable/doc/install_script.sh
and installed YT. Now, my python script (at the end of the email) quits with a "Segmentation fault" error at line-8 (yt.analysis_modules.api):
[sagarwal@ember ~/junk]$ python colorbars.py parameterfile Segmentation fault
If I comment out line8, then (obviously) I get the following error:
Adding gaussian at -2.0 with width 0.5 and colors (0.0, 0.0, 0.502, 0.00031622776601683794) Adding gaussian at 0.5 with width 0.5 and colors (0.85737517232758309, 1.0, 0.12482388288648784, 0.005623413251903491) Adding gaussian at 3.0 with width 0.5 and colors (0.99609999999999999, 0.97250000000000003, 0.99609999999999999, 0.10000000000000001) Traceback (most recent call last): File "colorbars.py", line 36, in <module> es = EnzoSimulation(par_file, get_redshift_outputs=True, initial_redshift=50, final_redshift=0) NameError: name 'EnzoSimulation' is not defined
Any ideas? Shankar
python_script... ------------------------------------------------------------- import numpy as na from yt.mods import * import yt.visualization.volume_rendering.api as vr import matplotlib.pylab as pl import sys
from yt.mods import * from yt.visualization.image_writer import write_bitmap from yt.analysis_modules.api import EnzoSimulation
blah..blah...
par_file = sys.argv[1] es = EnzoSimulation(par_file, get_redshift_outputs=True, initial_redshift=50, final_redshift=0) ------------------------------------------------------------- _______________________________________________ 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
_______________________________________________ yt-users mailing list yt-users@lists.spacepope.org http://lists.spacepope.org/listinfo.cgi/yt-users-spacepope.org
Hi Shankar,
This is a worrisome error. Please leave in the import in your script
and run it like this:
gdb python
At the gdb prompt, type "run my_script.py" where "my_script.py" is your script.
When it segfaults, type:
bt
And then send that here, to the list.
Best,
Matt
On Sun, Apr 24, 2011 at 12:34 AM, Agarwal, Shankar
Hi G.S.
Unfortunately, that did not work. If I skip "from yt.analysis_modules.api import EnzoSimulation", then i get the following error:
NameError: name 'EnzoSimulation' is not defined
[sagarwal@ember ~/junk]$ python Python 2.7.1 (r271:86832, Apr 23 2011, 12:22:34) [GCC 4.3.4 [gcc-4_3-branch revision 152973]] on linux2 Type "help", "copyright", "credits" or "license" for more information.
from yt.mods import * import numpy as na import yt.visualization.volume_rendering.api as vr import matplotlib.pylab as pl import sys from yt.visualization.image_writer import write_bitmap from yt.analysis_modules.api import EnzoSimulation Segmentation fault
For reference, the script I am talking about is http://paste.enzotools.org/show/1580/
Shankar ________________________________________ From: yt-users-bounces@lists.spacepope.org [yt-users-bounces@lists.spacepope.org] on behalf of gso@physics.ucsd.edu [gso@physics.ucsd.edu] Sent: Saturday, April 23, 2011 6:18 PM To: Discussion of the yt analysis package Subject: Re: [yt-users] from yt.analysis_modules.api import EnzoSimulation
Actually I just tried and you can use
from yt.mods impolrt * pf = EnzoSimulation("par_file")
just skip the from yt.analysis_modules.api import EnzoSimulation and it will work
From G.S.
I think having to import EnzoSimulation is the old YT, the newer YT you can just do
from yt.mods import * pf = load("par_file") [mine is usually something like pf = load("DD0000/DD0000")]
see if that works
From G.S.
Hi,
I just downloaded the latest http://hg.enzotools.org/yt/raw/stable/doc/install_script.sh
and installed YT. Now, my python script (at the end of the email) quits with a "Segmentation fault" error at line-8 (yt.analysis_modules.api):
[sagarwal@ember ~/junk]$ python colorbars.py parameterfile Segmentation fault
If I comment out line8, then (obviously) I get the following error:
Adding gaussian at -2.0 with width 0.5 and colors (0.0, 0.0, 0.502, 0.00031622776601683794) Adding gaussian at 0.5 with width 0.5 and colors (0.85737517232758309, 1.0, 0.12482388288648784, 0.005623413251903491) Adding gaussian at 3.0 with width 0.5 and colors (0.99609999999999999, 0.97250000000000003, 0.99609999999999999, 0.10000000000000001) Traceback (most recent call last): File "colorbars.py", line 36, in <module> es = EnzoSimulation(par_file, get_redshift_outputs=True, initial_redshift=50, final_redshift=0) NameError: name 'EnzoSimulation' is not defined
Any ideas? Shankar
python_script... ------------------------------------------------------------- import numpy as na from yt.mods import * import yt.visualization.volume_rendering.api as vr import matplotlib.pylab as pl import sys
from yt.mods import * from yt.visualization.image_writer import write_bitmap from yt.analysis_modules.api import EnzoSimulation
blah..blah...
par_file = sys.argv[1] es = EnzoSimulation(par_file, get_redshift_outputs=True, initial_redshift=50, final_redshift=0) ------------------------------------------------------------- _______________________________________________ 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
_______________________________________________ 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
Hi Matt,
I was able to resolve the issue by replacing
from yt.analysis_modules.api import EnzoSimulation
par_file = sys.argv[1]
es = EnzoSimulation(par_file, get_redshift_outputs=False, initial_redshift=99, final_redshift=-0.001)
with
import yt.analysis_modules.simulation_handler.api as es
par_file = sys.argv[1]
pf = es.EnzoSimulation(par_file, get_redshift_outputs=True, initial_redshift=50, final_redshift=0)
In any case, your requested output is below (I think it has something to do with mpi4py, which I have not installed yet)
[sagarwal@ember cqi]$ gdb python
GNU gdb (GDB) SUSE (7.0-0.4.16)
Copyright (C) 2009 Free Software Foundation, Inc.
License GPLv3+: GNU GPL version 3 or later http://gnu.org/licenses/gpl.html
This is free software: you are free to change and redistribute it.
There is NO WARRANTY, to the extent permitted by law. Type "show copying"
and "show warranty" for details.
This GDB was configured as "x86_64-suse-linux".
For bug reporting instructions, please see:
http://www.gnu.org/software/gdb/bugs/...
Reading symbols from /gpfs1/u/ac/sagarwal/software/yt/yt-x86_64/bin/python...done.
(gdb) run my_script.py
Starting program: /gpfs1/u/ac/sagarwal/software/yt/yt-x86_64/bin/python my_script.py
Missing separate debuginfo for /lib64/ld-linux-x86-64.so.2
Try: zypper install -C "debuginfo(build-id)=31d4dbbe49e777eb2dceeb2b6cb722d01a7b35dc"
Missing separate debuginfo for /lib64/libpthread.so.0
Try: zypper install -C "debuginfo(build-id)=1f39dc121cb7220d95ee27e00f745c2832346070"
[Thread debugging using libthread_db enabled]
Missing separate debuginfo for /lib64/libdl.so.2
Try: zypper install -C "debuginfo(build-id)=fbb2084bce1dd7adc76d9ef90319cf89b601db94"
Missing separate debuginfo for /lib64/libutil.so.1
Try: zypper install -C "debuginfo(build-id)=c6a6d0d17dedd26b06e7ffaf6e7b6947e585d23b"
Missing separate debuginfo for /lib64/libm.so.6
Try: zypper install -C "debuginfo(build-id)=365e4d2c812908177265c8223f222a1665fe1035"
Missing separate debuginfo for /lib64/libc.so.6
Try: zypper install -C "debuginfo(build-id)=609a6e344dfdc723c6c768cae37c3d91373a731b"
Missing separate debuginfo for /usr/lib64/libssl.so.0.9.8
Try: zypper install -C "debuginfo(build-id)=32ac9dafd97959233238d768cf51c0d1f56108b3"
Missing separate debuginfo for /usr/lib64/libcrypto.so.0.9.8
Try: zypper install -C "debuginfo(build-id)=1f7e12a6de273136ada630a97a5580f47cf62a0d"
Missing separate debuginfo for /lib64/libncurses.so.5
Try: zypper install -C "debuginfo(build-id)=fe94a82e6d5f63f4063b23ef8a8aa934a4b8c015"
Missing separate debuginfo for /lib64/libreadline.so.5
Try: zypper install -C "debuginfo(build-id)=bb1f36da9edb1cfffb2aa3c6f094824353d8572f"
Missing separate debuginfo for /usr/lib64/libstdc++.so.6
Try: zypper install -C "debuginfo(build-id)=e907b88d15f5e1312d1ae0c7c61f8da92745738b"
Missing separate debuginfo for /lib64/libgcc_s.so.1
Try: zypper install -C "debuginfo(build-id)=3f06bcfc74f9b01780d68e89b8dce403bef9b2e3"
Missing separate debuginfo for /usr/lib64/libgfortran.so.3
Try: zypper install -C "debuginfo(build-id)=06659f9e2a7c2cbd7771266eca5d573397f3ade3"
Missing separate debuginfo for /usr/lib64/libBLT24.so
Try: zypper install -C "debuginfo(build-id)=9ed4be8ea3e1d06536b8fd4e24817828c150b97c"
Missing separate debuginfo for /usr/lib64/libtk8.5.so
Try: zypper install -C "debuginfo(build-id)=376e10f1384ca2b8d7e32241aa9b21af2406733c"
Missing separate debuginfo for /usr/lib64/libtcl8.5.so
Try: zypper install -C "debuginfo(build-id)=d6e9d896299126a7e63b8e2d833f735a21fe3f57"
Missing separate debuginfo for /usr/lib64/libX11.so.6
Try: zypper install -C "debuginfo(build-id)=dab04774eef6119f774b2397a0bdc654c12220f9"
Missing separate debuginfo for /usr/lib64/libXss.so.1
Try: zypper install -C "debuginfo(build-id)=ac45c253ff4760f8a7f24c18eb82557e43859d8d"
Missing separate debuginfo for /usr/lib64/libXext.so.6
Try: zypper install -C "debuginfo(build-id)=4d348b514a3a427748b4f8314b9a5028b56c4559"
Missing separate debuginfo for /usr/lib64/libXft.so.2
Try: zypper install -C "debuginfo(build-id)=05c029c33c0623d9ac9652e8118ef2f480a01709"
Missing separate debuginfo for /usr/lib64/libfontconfig.so.1
Try: zypper install -C "debuginfo(build-id)=150b2aee9ba64585e8e84da22664d51252ceb93d"
Missing separate debuginfo for /usr/lib64/libXrender.so.1
Try: zypper install -C "debuginfo(build-id)=8f5ba4c59765a6bcf81ace6f3e9d9266e8986518"
Missing separate debuginfo for /usr/lib64/libxcb-xlib.so.0
Try: zypper install -C "debuginfo(build-id)=be562d9316e960c35fee2ed868a0e5b17308d575"
Missing separate debuginfo for /usr/lib64/libxcb.so.1
Try: zypper install -C "debuginfo(build-id)=b420d129816f22330cd25c45cdff8ef41941abca"
Missing separate debuginfo for /usr/lib64/libXau.so.6
Try: zypper install -C "debuginfo(build-id)=9213680483512b8ae3ff90d914900be4637bb495"
Missing separate debuginfo for /lib64/libexpat.so.1
Try: zypper install -C "debuginfo(build-id)=2696e815e28d6ef4fcb614baf8b7802891fd5341"
Missing separate debuginfo for /lib64/librt.so.1
Try: zypper install -C "debuginfo(build-id)=81a3a96c7c0bc95cb4aa5b29702689cf324a7fcd"
Program received signal SIGSEGV, Segmentation fault.
0x00007fffe7b9646f in PMPI_Finalized (flag=0x7fffffff0b50) at finalized.c:27
27 finalized.c: No such file or directory.
in finalized.c
(gdb) bt
#0 0x00007fffe7b9646f in PMPI_Finalized (flag=0x7fffffff0b50) at finalized.c:27
#1 0x00007fffe7e91c02 in __pyx_f_6mpi4py_3MPI_initialize () at src/mpi4py.MPI.c:3775
#2 initMPI () at src/mpi4py.MPI.c:16824
#3 0x00000000004c19ad in _PyImport_LoadDynamicModule (name=0x7fffffff1cc0 "mpi4py.MPI",
pathname=0x7fffffff0bf0 "/u/ac/sagarwal/.local/lib/python2.7/site-packages/mpi4py/MPI.so", fp=<value optimized out>) at ./Python/importdl.c:53
#4 0x00000000004bfe24 in import_submodule (mod=0x233a600, subname=0xcf47fc "MPI", fullname=0x7fffffff1cc0 "mpi4py.MPI") at Python/import.c:2596
#5 0x00000000004c03c9 in ensure_fromlist (mod=0x233a600, fromlist=0x232aed0, buf=0x7fffffff1cc0 "mpi4py.MPI", buflen=6, recursive=0) at Python/import.c:2507
#6 0x00000000004c0998 in import_module_level (name=0x0, globals=<value optimized out>, locals=<value optimized out>, fromlist=0x232aed0, level=-1) at Python/import.c:2175
#7 0x00000000004c0daf in PyImport_ImportModuleLevel (name=0xcefdd4 "mpi4py", globals=0x236cce0, locals=0x236cce0, fromlist=0x232aed0, level=-1) at Python/import.c:2189
#8 0x00000000004a1089 in builtin___import__ (self=<value optimized out>, args=<value optimized out>, kwds=<value optimized out>) at Python/bltinmodule.c:49
#9 0x000000000041b9fd in PyObject_Call (func=0x7ffff7fdddd0, arg=0x232e9f0, kw=0x0) at Objects/abstract.c:2529
#10 0x00000000004a1e06 in PyEval_CallObjectWithKeywords (func=0x7ffff7fdddd0, arg=0x232e9f0, kw=0x0) at Python/ceval.c:3881
#11 0x00000000004a6ac3 in PyEval_EvalFrameEx (f=0x236ce00, throwflag=<value optimized out>) at Python/ceval.c:2332
#12 0x00000000004aa5e9 in PyEval_EvalCodeEx (co=0x2338d30, globals=<value optimized out>, locals=<value optimized out>, args=0x0, argcount=0, kws=0x0, kwcount=0,
defs=0x0, defcount=0, closure=0x0) at Python/ceval.c:3252
#13 0x00000000004aa752 in PyEval_EvalCode (co=0x7fffffff0b50, globals=0x7ffff7fb6f00, locals=0x0) at Python/ceval.c:666
#14 0x00000000004bdd5a in PyImport_ExecCodeModuleEx (name=0x7fffffff52d0 "yt.analysis_modules.light_ray.light_ray", co=0x2338d30,
pathname=0x7fffffff3100 "/gpfs1/u/ac/sagarwal/software/yt/yt-x86_64/src/yt-hg/yt/analysis_modules/light_ray/light_ray.pyc") at Python/import.c:681
#15 0x00000000004bf03d in load_source_module (name=0x7fffffff52d0 "yt.analysis_modules.light_ray.light_ray",
pathname=0x7fffffff3100 "/gpfs1/u/ac/sagarwal/software/yt/yt-x86_64/src/yt-hg/yt/analysis_modules/light_ray/light_ray.pyc", fp=<value optimized out>)
at Python/import.c:1021
#16 0x00000000004bfe24 in import_submodule (mod=0x2328e88, subname=0x7fffffff52ee "light_ray", fullname=0x7fffffff52d0 "yt.analysis_modules.light_ray.light_ray")
at Python/import.c:2596
#17 0x00000000004c00ac in load_next (mod=0x2328e88, altmod=0x2328e88, p_name=<value optimized out>, buf=0x7fffffff52d0 "yt.analysis_modules.light_ray.light_ray",
p_buflen=0x7fffffff62d8) at Python/import.c:2416
#18 0x00000000004c0701 in import_module_level (name=0x0, globals=0x7b4010, locals=<value optimized out>, fromlist=0x232ae50, level=1) at Python/import.c:2137
---Type <return> to continue, or q <return> to quit---
#19 0x00000000004c0daf in PyImport_ImportModuleLevel (name=0x23250e4 "light_ray", globals=0x235b160, locals=0x235b160, fromlist=0x232ae50, level=1) at Python/import.c:2189
#20 0x00000000004a1089 in builtin___import__ (self=<value optimized out>, args=<value optimized out>, kwds=<value optimized out>) at Python/bltinmodule.c:49
#21 0x000000000041b9fd in PyObject_Call (func=0x7ffff7fdddd0, arg=0x20bec50, kw=0x0) at Objects/abstract.c:2529
#22 0x00000000004a1e06 in PyEval_CallObjectWithKeywords (func=0x7ffff7fdddd0, arg=0x20bec50, kw=0x0) at Python/ceval.c:3881
#23 0x00000000004a6ac3 in PyEval_EvalFrameEx (f=0x2366df0, throwflag=<value optimized out>) at Python/ceval.c:2332
#24 0x00000000004aa5e9 in PyEval_EvalCodeEx (co=0x228b4b0, globals=<value optimized out>, locals=<value optimized out>, args=0x0, argcount=0, kws=0x0, kwcount=0,
defs=0x0, defcount=0, closure=0x0) at Python/ceval.c:3252
#25 0x00000000004aa752 in PyEval_EvalCode (co=0x7fffffff0b50, globals=0x7ffff7fb6f00, locals=0x0) at Python/ceval.c:666
#26 0x00000000004bdd5a in PyImport_ExecCodeModuleEx (name=0x7fffffff88e0 "yt.analysis_modules.light_ray.api", co=0x228b4b0,
pathname=0x7fffffff6710 "/gpfs1/u/ac/sagarwal/software/yt/yt-x86_64/src/yt-hg/yt/analysis_modules/light_ray/api.pyc") at Python/import.c:681
#27 0x00000000004bf03d in load_source_module (name=0x7fffffff88e0 "yt.analysis_modules.light_ray.api",
pathname=0x7fffffff6710 "/gpfs1/u/ac/sagarwal/software/yt/yt-x86_64/src/yt-hg/yt/analysis_modules/light_ray/api.pyc", fp=<value optimized out>) at Python/import.c:1021
#28 0x00000000004bfe24 in import_submodule (mod=0x2328e88, subname=0x7fffffff88fe "api", fullname=0x7fffffff88e0 "yt.analysis_modules.light_ray.api")
at Python/import.c:2596
#29 0x00000000004c00ac in load_next (mod=0x2328e88, altmod=0x2328e88, p_name=<value optimized out>, buf=0x7fffffff88e0 "yt.analysis_modules.light_ray.api",
p_buflen=0x7fffffff98e8) at Python/import.c:2416
#30 0x00000000004c074d in import_module_level (name=0x0, globals=<value optimized out>, locals=<value optimized out>, fromlist=0x7ffff71e29d0, level=1)
at Python/import.c:2145
#31 0x00000000004c0daf in PyImport_ImportModuleLevel (name=0x2271bb4 "light_ray.api", globals=0x2218690, locals=0x2218690, fromlist=0x7ffff71e29d0, level=1)
at Python/import.c:2189
#32 0x00000000004a1089 in builtin___import__ (self=<value optimized out>, args=<value optimized out>, kwds=<value optimized out>) at Python/bltinmodule.c:49
#33 0x000000000041b9fd in PyObject_Call (func=0x7ffff7fdddd0, arg=0xbd5350, kw=0x0) at Objects/abstract.c:2529
#34 0x00000000004a1e06 in PyEval_CallObjectWithKeywords (func=0x7ffff7fdddd0, arg=0xbd5350, kw=0x0) at Python/ceval.c:3881
#35 0x00000000004a6ac3 in PyEval_EvalFrameEx (f=0x2216540, throwflag=<value optimized out>) at Python/ceval.c:2332
#36 0x00000000004aa5e9 in PyEval_EvalCodeEx (co=0x7ffff71cccb0, globals=<value optimized out>, locals=<value optimized out>, args=0x0, argcount=0, kws=0x0, kwcount=0,
defs=0x0, defcount=0, closure=0x0) at Python/ceval.c:3252
---Type <return> to continue, or q <return> to quit---
#37 0x00000000004aa752 in PyEval_EvalCode (co=0x7fffffff0b50, globals=0x7ffff7fb6f00, locals=0x0) at Python/ceval.c:666
#38 0x00000000004bdd5a in PyImport_ExecCodeModuleEx (name=0x7fffffffbef0 "yt.analysis_modules.api", co=0x7ffff71cccb0,
pathname=0x7fffffff9d20 "/gpfs1/u/ac/sagarwal/software/yt/yt-x86_64/src/yt-hg/yt/analysis_modules/api.pyc") at Python/import.c:681
#39 0x00000000004bf03d in load_source_module (name=0x7fffffffbef0 "yt.analysis_modules.api",
pathname=0x7fffffff9d20 "/gpfs1/u/ac/sagarwal/software/yt/yt-x86_64/src/yt-hg/yt/analysis_modules/api.pyc", fp=<value optimized out>) at Python/import.c:1021
#40 0x00000000004bfe24 in import_submodule (mod=0x161c948, subname=0x7fffffffbf04 "api", fullname=0x7fffffffbef0 "yt.analysis_modules.api") at Python/import.c:2596
#41 0x00000000004c00ac in load_next (mod=0x161c948, altmod=0x161c948, p_name=<value optimized out>, buf=0x7fffffffbef0 "yt.analysis_modules.api", p_buflen=0x7fffffffcef8)
at Python/import.c:2416
#42 0x00000000004c074d in import_module_level (name=0x0, globals=<value optimized out>, locals=<value optimized out>, fromlist=0x7ffff7e37f10, level=23185736)
at Python/import.c:2145
#43 0x00000000004c0daf in PyImport_ImportModuleLevel (name=0x7ffff7e37ed4 "yt.analysis_modules.api", globals=0x7f3260, locals=0x7f3260, fromlist=0x7ffff7e37f10, level=-1)
at Python/import.c:2189
#44 0x00000000004a1089 in builtin___import__ (self=<value optimized out>, args=<value optimized out>, kwds=<value optimized out>) at Python/bltinmodule.c:49
#45 0x000000000041b9fd in PyObject_Call (func=0x7ffff7fdddd0, arg=0x7ffff7e19af8, kw=0x0) at Objects/abstract.c:2529
#46 0x00000000004a1e06 in PyEval_CallObjectWithKeywords (func=0x7ffff7fdddd0, arg=0x7ffff7e19af8, kw=0x0) at Python/ceval.c:3881
#47 0x00000000004a6ac3 in PyEval_EvalFrameEx (f=0x885ee0, throwflag=<value optimized out>) at Python/ceval.c:2332
#48 0x00000000004aa5e9 in PyEval_EvalCodeEx (co=0x7ffff7e32230, globals=<value optimized out>, locals=<value optimized out>, args=0x0, argcount=0, kws=0x0, kwcount=0,
defs=0x0, defcount=0, closure=0x0) at Python/ceval.c:3252
#49 0x00000000004aa752 in PyEval_EvalCode (co=0x7fffffff0b50, globals=0x7ffff7fb6f00, locals=0x0) at Python/ceval.c:666
#50 0x00000000004cae5c in run_mod (arena=<value optimized out>, flags=<value optimized out>, locals=<value optimized out>, globals=<value optimized out>,
filename=<value optimized out>, mod=<value optimized out>) at Python/pythonrun.c:1346
#51 PyRun_FileExFlags (arena=<value optimized out>, flags=<value optimized out>, locals=<value optimized out>, globals=<value optimized out>,
filename=<value optimized out>, mod=<value optimized out>) at Python/pythonrun.c:1332
#52 0x00000000004cb18b in PyRun_SimpleFileExFlags (fp=0x870760, filename=0x7fffffffda6a "my_script.py", closeit=1, flags=0x7fffffffd4b0) at Python/pythonrun.c:936
#53 0x000000000041703a in Py_Main (argc=-134774624, argv=0x7fffffffd5c8) at Modules/main.c:599
#54 0x00007ffff7224bc6 in __libc_start_main () from /lib64/libc.so.6
---Type <return> to continue, or q <return> to quit---
#55 0x00000000004161d9 in _start () at ../sysdeps/x86_64/elf/start.S:113
(gdb)
(gdb)
________________________________________
From: yt-users-bounces@lists.spacepope.org [yt-users-bounces@lists.spacepope.org] on behalf of Matthew Turk [matthewturk@gmail.com]
Sent: Monday, April 25, 2011 11:50 AM
To: Discussion of the yt analysis package
Subject: Re: [yt-users] from yt.analysis_modules.api import EnzoSimulation
Hi Shankar,
This is a worrisome error. Please leave in the import in your script
and run it like this:
gdb python
At the gdb prompt, type "run my_script.py" where "my_script.py" is your script.
When it segfaults, type:
bt
And then send that here, to the list.
Best,
Matt
On Sun, Apr 24, 2011 at 12:34 AM, Agarwal, Shankar
Hi G.S.
Unfortunately, that did not work. If I skip "from yt.analysis_modules.api import EnzoSimulation", then i get the following error:
NameError: name 'EnzoSimulation' is not defined
[sagarwal@ember ~/junk]$ python Python 2.7.1 (r271:86832, Apr 23 2011, 12:22:34) [GCC 4.3.4 [gcc-4_3-branch revision 152973]] on linux2 Type "help", "copyright", "credits" or "license" for more information.
from yt.mods import * import numpy as na import yt.visualization.volume_rendering.api as vr import matplotlib.pylab as pl import sys from yt.visualization.image_writer import write_bitmap from yt.analysis_modules.api import EnzoSimulation Segmentation fault
For reference, the script I am talking about is http://paste.enzotools.org/show/1580/
Shankar ________________________________________ From: yt-users-bounces@lists.spacepope.org [yt-users-bounces@lists.spacepope.org] on behalf of gso@physics.ucsd.edu [gso@physics.ucsd.edu] Sent: Saturday, April 23, 2011 6:18 PM To: Discussion of the yt analysis package Subject: Re: [yt-users] from yt.analysis_modules.api import EnzoSimulation
Actually I just tried and you can use
from yt.mods impolrt * pf = EnzoSimulation("par_file")
just skip the from yt.analysis_modules.api import EnzoSimulation and it will work
From G.S.
I think having to import EnzoSimulation is the old YT, the newer YT you can just do
from yt.mods import * pf = load("par_file") [mine is usually something like pf = load("DD0000/DD0000")]
see if that works
From G.S.
Hi,
I just downloaded the latest http://hg.enzotools.org/yt/raw/stable/doc/install_script.sh
and installed YT. Now, my python script (at the end of the email) quits with a "Segmentation fault" error at line-8 (yt.analysis_modules.api):
[sagarwal@ember ~/junk]$ python colorbars.py parameterfile Segmentation fault
If I comment out line8, then (obviously) I get the following error:
Adding gaussian at -2.0 with width 0.5 and colors (0.0, 0.0, 0.502, 0.00031622776601683794) Adding gaussian at 0.5 with width 0.5 and colors (0.85737517232758309, 1.0, 0.12482388288648784, 0.005623413251903491) Adding gaussian at 3.0 with width 0.5 and colors (0.99609999999999999, 0.97250000000000003, 0.99609999999999999, 0.10000000000000001) Traceback (most recent call last): File "colorbars.py", line 36, in <module> es = EnzoSimulation(par_file, get_redshift_outputs=True, initial_redshift=50, final_redshift=0) NameError: name 'EnzoSimulation' is not defined
Any ideas? Shankar
python_script... ------------------------------------------------------------- import numpy as na from yt.mods import * import yt.visualization.volume_rendering.api as vr import matplotlib.pylab as pl import sys
from yt.mods import * from yt.visualization.image_writer import write_bitmap from yt.analysis_modules.api import EnzoSimulation
blah..blah...
par_file = sys.argv[1] es = EnzoSimulation(par_file, get_redshift_outputs=True, initial_redshift=50, final_redshift=0) ------------------------------------------------------------- _______________________________________________ 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
_______________________________________________ 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
_______________________________________________ yt-users mailing list yt-users@lists.spacepope.org http://lists.spacepope.org/listinfo.cgi/yt-users-spacepope.org
Hi Shankar,
Good to hear you resolved it.
As a note, if you're running on an SGI UV machine, I've seen things
like this in the past with mpi4py (which I note you say you haven't
installed) if I ran in parallel and didn't use the python2.7-mpi
executable. You can get this with mpi4py by running "python2.7
setup.py install_exe".
-Matt
On Mon, Apr 25, 2011 at 1:35 PM, Agarwal, Shankar
Hi Matt,
I was able to resolve the issue by replacing
from yt.analysis_modules.api import EnzoSimulation par_file = sys.argv[1] es = EnzoSimulation(par_file, get_redshift_outputs=False, initial_redshift=99, final_redshift=-0.001)
with
import yt.analysis_modules.simulation_handler.api as es par_file = sys.argv[1] pf = es.EnzoSimulation(par_file, get_redshift_outputs=True, initial_redshift=50, final_redshift=0)
In any case, your requested output is below (I think it has something to do with mpi4py, which I have not installed yet)
[sagarwal@ember cqi]$ gdb python GNU gdb (GDB) SUSE (7.0-0.4.16) Copyright (C) 2009 Free Software Foundation, Inc. License GPLv3+: GNU GPL version 3 or later http://gnu.org/licenses/gpl.html This is free software: you are free to change and redistribute it. There is NO WARRANTY, to the extent permitted by law. Type "show copying" and "show warranty" for details. This GDB was configured as "x86_64-suse-linux". For bug reporting instructions, please see: http://www.gnu.org/software/gdb/bugs/... Reading symbols from /gpfs1/u/ac/sagarwal/software/yt/yt-x86_64/bin/python...done. (gdb) run my_script.py Starting program: /gpfs1/u/ac/sagarwal/software/yt/yt-x86_64/bin/python my_script.py Missing separate debuginfo for /lib64/ld-linux-x86-64.so.2 Try: zypper install -C "debuginfo(build-id)=31d4dbbe49e777eb2dceeb2b6cb722d01a7b35dc" Missing separate debuginfo for /lib64/libpthread.so.0 Try: zypper install -C "debuginfo(build-id)=1f39dc121cb7220d95ee27e00f745c2832346070" [Thread debugging using libthread_db enabled] Missing separate debuginfo for /lib64/libdl.so.2 Try: zypper install -C "debuginfo(build-id)=fbb2084bce1dd7adc76d9ef90319cf89b601db94" Missing separate debuginfo for /lib64/libutil.so.1 Try: zypper install -C "debuginfo(build-id)=c6a6d0d17dedd26b06e7ffaf6e7b6947e585d23b" Missing separate debuginfo for /lib64/libm.so.6 Try: zypper install -C "debuginfo(build-id)=365e4d2c812908177265c8223f222a1665fe1035" Missing separate debuginfo for /lib64/libc.so.6 Try: zypper install -C "debuginfo(build-id)=609a6e344dfdc723c6c768cae37c3d91373a731b" Missing separate debuginfo for /usr/lib64/libssl.so.0.9.8 Try: zypper install -C "debuginfo(build-id)=32ac9dafd97959233238d768cf51c0d1f56108b3" Missing separate debuginfo for /usr/lib64/libcrypto.so.0.9.8 Try: zypper install -C "debuginfo(build-id)=1f7e12a6de273136ada630a97a5580f47cf62a0d" Missing separate debuginfo for /lib64/libncurses.so.5 Try: zypper install -C "debuginfo(build-id)=fe94a82e6d5f63f4063b23ef8a8aa934a4b8c015" Missing separate debuginfo for /lib64/libreadline.so.5 Try: zypper install -C "debuginfo(build-id)=bb1f36da9edb1cfffb2aa3c6f094824353d8572f" Missing separate debuginfo for /usr/lib64/libstdc++.so.6 Try: zypper install -C "debuginfo(build-id)=e907b88d15f5e1312d1ae0c7c61f8da92745738b" Missing separate debuginfo for /lib64/libgcc_s.so.1 Try: zypper install -C "debuginfo(build-id)=3f06bcfc74f9b01780d68e89b8dce403bef9b2e3" Missing separate debuginfo for /usr/lib64/libgfortran.so.3 Try: zypper install -C "debuginfo(build-id)=06659f9e2a7c2cbd7771266eca5d573397f3ade3" Missing separate debuginfo for /usr/lib64/libBLT24.so Try: zypper install -C "debuginfo(build-id)=9ed4be8ea3e1d06536b8fd4e24817828c150b97c" Missing separate debuginfo for /usr/lib64/libtk8.5.so Try: zypper install -C "debuginfo(build-id)=376e10f1384ca2b8d7e32241aa9b21af2406733c" Missing separate debuginfo for /usr/lib64/libtcl8.5.so Try: zypper install -C "debuginfo(build-id)=d6e9d896299126a7e63b8e2d833f735a21fe3f57" Missing separate debuginfo for /usr/lib64/libX11.so.6 Try: zypper install -C "debuginfo(build-id)=dab04774eef6119f774b2397a0bdc654c12220f9" Missing separate debuginfo for /usr/lib64/libXss.so.1 Try: zypper install -C "debuginfo(build-id)=ac45c253ff4760f8a7f24c18eb82557e43859d8d" Missing separate debuginfo for /usr/lib64/libXext.so.6 Try: zypper install -C "debuginfo(build-id)=4d348b514a3a427748b4f8314b9a5028b56c4559" Missing separate debuginfo for /usr/lib64/libXft.so.2 Try: zypper install -C "debuginfo(build-id)=05c029c33c0623d9ac9652e8118ef2f480a01709" Missing separate debuginfo for /usr/lib64/libfontconfig.so.1 Try: zypper install -C "debuginfo(build-id)=150b2aee9ba64585e8e84da22664d51252ceb93d" Missing separate debuginfo for /usr/lib64/libXrender.so.1 Try: zypper install -C "debuginfo(build-id)=8f5ba4c59765a6bcf81ace6f3e9d9266e8986518" Missing separate debuginfo for /usr/lib64/libxcb-xlib.so.0 Try: zypper install -C "debuginfo(build-id)=be562d9316e960c35fee2ed868a0e5b17308d575" Missing separate debuginfo for /usr/lib64/libxcb.so.1 Try: zypper install -C "debuginfo(build-id)=b420d129816f22330cd25c45cdff8ef41941abca" Missing separate debuginfo for /usr/lib64/libXau.so.6 Try: zypper install -C "debuginfo(build-id)=9213680483512b8ae3ff90d914900be4637bb495" Missing separate debuginfo for /lib64/libexpat.so.1 Try: zypper install -C "debuginfo(build-id)=2696e815e28d6ef4fcb614baf8b7802891fd5341" Missing separate debuginfo for /lib64/librt.so.1 Try: zypper install -C "debuginfo(build-id)=81a3a96c7c0bc95cb4aa5b29702689cf324a7fcd"
Program received signal SIGSEGV, Segmentation fault. 0x00007fffe7b9646f in PMPI_Finalized (flag=0x7fffffff0b50) at finalized.c:27 27 finalized.c: No such file or directory. in finalized.c (gdb) bt #0 0x00007fffe7b9646f in PMPI_Finalized (flag=0x7fffffff0b50) at finalized.c:27 #1 0x00007fffe7e91c02 in __pyx_f_6mpi4py_3MPI_initialize () at src/mpi4py.MPI.c:3775 #2 initMPI () at src/mpi4py.MPI.c:16824 #3 0x00000000004c19ad in _PyImport_LoadDynamicModule (name=0x7fffffff1cc0 "mpi4py.MPI", pathname=0x7fffffff0bf0 "/u/ac/sagarwal/.local/lib/python2.7/site-packages/mpi4py/MPI.so", fp=<value optimized out>) at ./Python/importdl.c:53 #4 0x00000000004bfe24 in import_submodule (mod=0x233a600, subname=0xcf47fc "MPI", fullname=0x7fffffff1cc0 "mpi4py.MPI") at Python/import.c:2596 #5 0x00000000004c03c9 in ensure_fromlist (mod=0x233a600, fromlist=0x232aed0, buf=0x7fffffff1cc0 "mpi4py.MPI", buflen=6, recursive=0) at Python/import.c:2507 #6 0x00000000004c0998 in import_module_level (name=0x0, globals=<value optimized out>, locals=<value optimized out>, fromlist=0x232aed0, level=-1) at Python/import.c:2175 #7 0x00000000004c0daf in PyImport_ImportModuleLevel (name=0xcefdd4 "mpi4py", globals=0x236cce0, locals=0x236cce0, fromlist=0x232aed0, level=-1) at Python/import.c:2189 #8 0x00000000004a1089 in builtin___import__ (self=<value optimized out>, args=<value optimized out>, kwds=<value optimized out>) at Python/bltinmodule.c:49 #9 0x000000000041b9fd in PyObject_Call (func=0x7ffff7fdddd0, arg=0x232e9f0, kw=0x0) at Objects/abstract.c:2529 #10 0x00000000004a1e06 in PyEval_CallObjectWithKeywords (func=0x7ffff7fdddd0, arg=0x232e9f0, kw=0x0) at Python/ceval.c:3881 #11 0x00000000004a6ac3 in PyEval_EvalFrameEx (f=0x236ce00, throwflag=<value optimized out>) at Python/ceval.c:2332 #12 0x00000000004aa5e9 in PyEval_EvalCodeEx (co=0x2338d30, globals=<value optimized out>, locals=<value optimized out>, args=0x0, argcount=0, kws=0x0, kwcount=0, defs=0x0, defcount=0, closure=0x0) at Python/ceval.c:3252 #13 0x00000000004aa752 in PyEval_EvalCode (co=0x7fffffff0b50, globals=0x7ffff7fb6f00, locals=0x0) at Python/ceval.c:666 #14 0x00000000004bdd5a in PyImport_ExecCodeModuleEx (name=0x7fffffff52d0 "yt.analysis_modules.light_ray.light_ray", co=0x2338d30, pathname=0x7fffffff3100 "/gpfs1/u/ac/sagarwal/software/yt/yt-x86_64/src/yt-hg/yt/analysis_modules/light_ray/light_ray.pyc") at Python/import.c:681 #15 0x00000000004bf03d in load_source_module (name=0x7fffffff52d0 "yt.analysis_modules.light_ray.light_ray", pathname=0x7fffffff3100 "/gpfs1/u/ac/sagarwal/software/yt/yt-x86_64/src/yt-hg/yt/analysis_modules/light_ray/light_ray.pyc", fp=<value optimized out>) at Python/import.c:1021 #16 0x00000000004bfe24 in import_submodule (mod=0x2328e88, subname=0x7fffffff52ee "light_ray", fullname=0x7fffffff52d0 "yt.analysis_modules.light_ray.light_ray") at Python/import.c:2596 #17 0x00000000004c00ac in load_next (mod=0x2328e88, altmod=0x2328e88, p_name=<value optimized out>, buf=0x7fffffff52d0 "yt.analysis_modules.light_ray.light_ray", p_buflen=0x7fffffff62d8) at Python/import.c:2416 #18 0x00000000004c0701 in import_module_level (name=0x0, globals=0x7b4010, locals=<value optimized out>, fromlist=0x232ae50, level=1) at Python/import.c:2137 ---Type <return> to continue, or q <return> to quit--- #19 0x00000000004c0daf in PyImport_ImportModuleLevel (name=0x23250e4 "light_ray", globals=0x235b160, locals=0x235b160, fromlist=0x232ae50, level=1) at Python/import.c:2189 #20 0x00000000004a1089 in builtin___import__ (self=<value optimized out>, args=<value optimized out>, kwds=<value optimized out>) at Python/bltinmodule.c:49 #21 0x000000000041b9fd in PyObject_Call (func=0x7ffff7fdddd0, arg=0x20bec50, kw=0x0) at Objects/abstract.c:2529 #22 0x00000000004a1e06 in PyEval_CallObjectWithKeywords (func=0x7ffff7fdddd0, arg=0x20bec50, kw=0x0) at Python/ceval.c:3881 #23 0x00000000004a6ac3 in PyEval_EvalFrameEx (f=0x2366df0, throwflag=<value optimized out>) at Python/ceval.c:2332 #24 0x00000000004aa5e9 in PyEval_EvalCodeEx (co=0x228b4b0, globals=<value optimized out>, locals=<value optimized out>, args=0x0, argcount=0, kws=0x0, kwcount=0, defs=0x0, defcount=0, closure=0x0) at Python/ceval.c:3252 #25 0x00000000004aa752 in PyEval_EvalCode (co=0x7fffffff0b50, globals=0x7ffff7fb6f00, locals=0x0) at Python/ceval.c:666 #26 0x00000000004bdd5a in PyImport_ExecCodeModuleEx (name=0x7fffffff88e0 "yt.analysis_modules.light_ray.api", co=0x228b4b0, pathname=0x7fffffff6710 "/gpfs1/u/ac/sagarwal/software/yt/yt-x86_64/src/yt-hg/yt/analysis_modules/light_ray/api.pyc") at Python/import.c:681 #27 0x00000000004bf03d in load_source_module (name=0x7fffffff88e0 "yt.analysis_modules.light_ray.api", pathname=0x7fffffff6710 "/gpfs1/u/ac/sagarwal/software/yt/yt-x86_64/src/yt-hg/yt/analysis_modules/light_ray/api.pyc", fp=<value optimized out>) at Python/import.c:1021 #28 0x00000000004bfe24 in import_submodule (mod=0x2328e88, subname=0x7fffffff88fe "api", fullname=0x7fffffff88e0 "yt.analysis_modules.light_ray.api") at Python/import.c:2596 #29 0x00000000004c00ac in load_next (mod=0x2328e88, altmod=0x2328e88, p_name=<value optimized out>, buf=0x7fffffff88e0 "yt.analysis_modules.light_ray.api", p_buflen=0x7fffffff98e8) at Python/import.c:2416 #30 0x00000000004c074d in import_module_level (name=0x0, globals=<value optimized out>, locals=<value optimized out>, fromlist=0x7ffff71e29d0, level=1) at Python/import.c:2145 #31 0x00000000004c0daf in PyImport_ImportModuleLevel (name=0x2271bb4 "light_ray.api", globals=0x2218690, locals=0x2218690, fromlist=0x7ffff71e29d0, level=1) at Python/import.c:2189 #32 0x00000000004a1089 in builtin___import__ (self=<value optimized out>, args=<value optimized out>, kwds=<value optimized out>) at Python/bltinmodule.c:49 #33 0x000000000041b9fd in PyObject_Call (func=0x7ffff7fdddd0, arg=0xbd5350, kw=0x0) at Objects/abstract.c:2529 #34 0x00000000004a1e06 in PyEval_CallObjectWithKeywords (func=0x7ffff7fdddd0, arg=0xbd5350, kw=0x0) at Python/ceval.c:3881 #35 0x00000000004a6ac3 in PyEval_EvalFrameEx (f=0x2216540, throwflag=<value optimized out>) at Python/ceval.c:2332 #36 0x00000000004aa5e9 in PyEval_EvalCodeEx (co=0x7ffff71cccb0, globals=<value optimized out>, locals=<value optimized out>, args=0x0, argcount=0, kws=0x0, kwcount=0, defs=0x0, defcount=0, closure=0x0) at Python/ceval.c:3252 ---Type <return> to continue, or q <return> to quit--- #37 0x00000000004aa752 in PyEval_EvalCode (co=0x7fffffff0b50, globals=0x7ffff7fb6f00, locals=0x0) at Python/ceval.c:666 #38 0x00000000004bdd5a in PyImport_ExecCodeModuleEx (name=0x7fffffffbef0 "yt.analysis_modules.api", co=0x7ffff71cccb0, pathname=0x7fffffff9d20 "/gpfs1/u/ac/sagarwal/software/yt/yt-x86_64/src/yt-hg/yt/analysis_modules/api.pyc") at Python/import.c:681 #39 0x00000000004bf03d in load_source_module (name=0x7fffffffbef0 "yt.analysis_modules.api", pathname=0x7fffffff9d20 "/gpfs1/u/ac/sagarwal/software/yt/yt-x86_64/src/yt-hg/yt/analysis_modules/api.pyc", fp=<value optimized out>) at Python/import.c:1021 #40 0x00000000004bfe24 in import_submodule (mod=0x161c948, subname=0x7fffffffbf04 "api", fullname=0x7fffffffbef0 "yt.analysis_modules.api") at Python/import.c:2596 #41 0x00000000004c00ac in load_next (mod=0x161c948, altmod=0x161c948, p_name=<value optimized out>, buf=0x7fffffffbef0 "yt.analysis_modules.api", p_buflen=0x7fffffffcef8) at Python/import.c:2416 #42 0x00000000004c074d in import_module_level (name=0x0, globals=<value optimized out>, locals=<value optimized out>, fromlist=0x7ffff7e37f10, level=23185736) at Python/import.c:2145 #43 0x00000000004c0daf in PyImport_ImportModuleLevel (name=0x7ffff7e37ed4 "yt.analysis_modules.api", globals=0x7f3260, locals=0x7f3260, fromlist=0x7ffff7e37f10, level=-1) at Python/import.c:2189 #44 0x00000000004a1089 in builtin___import__ (self=<value optimized out>, args=<value optimized out>, kwds=<value optimized out>) at Python/bltinmodule.c:49 #45 0x000000000041b9fd in PyObject_Call (func=0x7ffff7fdddd0, arg=0x7ffff7e19af8, kw=0x0) at Objects/abstract.c:2529 #46 0x00000000004a1e06 in PyEval_CallObjectWithKeywords (func=0x7ffff7fdddd0, arg=0x7ffff7e19af8, kw=0x0) at Python/ceval.c:3881 #47 0x00000000004a6ac3 in PyEval_EvalFrameEx (f=0x885ee0, throwflag=<value optimized out>) at Python/ceval.c:2332 #48 0x00000000004aa5e9 in PyEval_EvalCodeEx (co=0x7ffff7e32230, globals=<value optimized out>, locals=<value optimized out>, args=0x0, argcount=0, kws=0x0, kwcount=0, defs=0x0, defcount=0, closure=0x0) at Python/ceval.c:3252 #49 0x00000000004aa752 in PyEval_EvalCode (co=0x7fffffff0b50, globals=0x7ffff7fb6f00, locals=0x0) at Python/ceval.c:666 #50 0x00000000004cae5c in run_mod (arena=<value optimized out>, flags=<value optimized out>, locals=<value optimized out>, globals=<value optimized out>, filename=<value optimized out>, mod=<value optimized out>) at Python/pythonrun.c:1346 #51 PyRun_FileExFlags (arena=<value optimized out>, flags=<value optimized out>, locals=<value optimized out>, globals=<value optimized out>, filename=<value optimized out>, mod=<value optimized out>) at Python/pythonrun.c:1332 #52 0x00000000004cb18b in PyRun_SimpleFileExFlags (fp=0x870760, filename=0x7fffffffda6a "my_script.py", closeit=1, flags=0x7fffffffd4b0) at Python/pythonrun.c:936 #53 0x000000000041703a in Py_Main (argc=-134774624, argv=0x7fffffffd5c8) at Modules/main.c:599 #54 0x00007ffff7224bc6 in __libc_start_main () from /lib64/libc.so.6 ---Type <return> to continue, or q <return> to quit--- #55 0x00000000004161d9 in _start () at ../sysdeps/x86_64/elf/start.S:113 (gdb) (gdb)
________________________________________ From: yt-users-bounces@lists.spacepope.org [yt-users-bounces@lists.spacepope.org] on behalf of Matthew Turk [matthewturk@gmail.com] Sent: Monday, April 25, 2011 11:50 AM To: Discussion of the yt analysis package Subject: Re: [yt-users] from yt.analysis_modules.api import EnzoSimulation
Hi Shankar,
This is a worrisome error. Please leave in the import in your script and run it like this:
gdb python
At the gdb prompt, type "run my_script.py" where "my_script.py" is your script.
When it segfaults, type:
bt
And then send that here, to the list.
Best,
Matt
On Sun, Apr 24, 2011 at 12:34 AM, Agarwal, Shankar
wrote: Hi G.S.
Unfortunately, that did not work. If I skip "from yt.analysis_modules.api import EnzoSimulation", then i get the following error:
NameError: name 'EnzoSimulation' is not defined
[sagarwal@ember ~/junk]$ python Python 2.7.1 (r271:86832, Apr 23 2011, 12:22:34) [GCC 4.3.4 [gcc-4_3-branch revision 152973]] on linux2 Type "help", "copyright", "credits" or "license" for more information.
from yt.mods import * import numpy as na import yt.visualization.volume_rendering.api as vr import matplotlib.pylab as pl import sys from yt.visualization.image_writer import write_bitmap from yt.analysis_modules.api import EnzoSimulation Segmentation fault
For reference, the script I am talking about is http://paste.enzotools.org/show/1580/
Shankar ________________________________________ From: yt-users-bounces@lists.spacepope.org [yt-users-bounces@lists.spacepope.org] on behalf of gso@physics.ucsd.edu [gso@physics.ucsd.edu] Sent: Saturday, April 23, 2011 6:18 PM To: Discussion of the yt analysis package Subject: Re: [yt-users] from yt.analysis_modules.api import EnzoSimulation
Actually I just tried and you can use
from yt.mods impolrt * pf = EnzoSimulation("par_file")
just skip the from yt.analysis_modules.api import EnzoSimulation and it will work
From G.S.
I think having to import EnzoSimulation is the old YT, the newer YT you can just do
from yt.mods import * pf = load("par_file") [mine is usually something like pf = load("DD0000/DD0000")]
see if that works
From G.S.
Hi,
I just downloaded the latest http://hg.enzotools.org/yt/raw/stable/doc/install_script.sh
and installed YT. Now, my python script (at the end of the email) quits with a "Segmentation fault" error at line-8 (yt.analysis_modules.api):
[sagarwal@ember ~/junk]$ python colorbars.py parameterfile Segmentation fault
If I comment out line8, then (obviously) I get the following error:
Adding gaussian at -2.0 with width 0.5 and colors (0.0, 0.0, 0.502, 0.00031622776601683794) Adding gaussian at 0.5 with width 0.5 and colors (0.85737517232758309, 1.0, 0.12482388288648784, 0.005623413251903491) Adding gaussian at 3.0 with width 0.5 and colors (0.99609999999999999, 0.97250000000000003, 0.99609999999999999, 0.10000000000000001) Traceback (most recent call last): File "colorbars.py", line 36, in <module> es = EnzoSimulation(par_file, get_redshift_outputs=True, initial_redshift=50, final_redshift=0) NameError: name 'EnzoSimulation' is not defined
Any ideas? Shankar
python_script... ------------------------------------------------------------- import numpy as na from yt.mods import * import yt.visualization.volume_rendering.api as vr import matplotlib.pylab as pl import sys
from yt.mods import * from yt.visualization.image_writer import write_bitmap from yt.analysis_modules.api import EnzoSimulation
blah..blah...
par_file = sys.argv[1] es = EnzoSimulation(par_file, get_redshift_outputs=True, initial_redshift=50, final_redshift=0) ------------------------------------------------------------- _______________________________________________ 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
_______________________________________________ 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
_______________________________________________ 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 (3)
-
Agarwal, Shankar
-
gso@physics.ucsd.edu
-
Matthew Turk