Help: OpenMC-0.7.0 unable to use openmc-plot-mesh-tally script

155 views
Skip to first unread message

Shawn H. Wachter

unread,
Sep 2, 2015, 10:46:25 PM9/2/15
to OpenMC Users Group
I have installed the new version of openmc (0.7.0) compiled from source using FC=mpif90.openmpi for the compilation, as well as installing ipython, numpy, scipy, matplotlib, and vtk. My OS is linux mint 17.1 cinammon (Rebecca), 64 bit architecture.

The executable openmc-plot-mesh-tally gives me the following error when executed on an arbitrary statepoint binary:

AttributeError: 'Tally' object has no attribute 'get_value'

I am reluctant to over-think this. Is there a problem with the script, or do I have other issues?

Your assistance is greatly appreciated!

Shawn Wachter
Kansas City, MO
816 337 7003

Screenshot from 2015-09-02 21:35:58.png

Will Boyd

unread,
Sep 2, 2015, 10:54:54 PM9/2/15
to Shawn H. Wachter, OpenMC Users Group
Shawn,

I think this is unfortunately a bug that crept in during some of the most recent changes to the Python API in OpenMC. I just submitted a bug fix for this to GitHub (here) for code review.

In the meantime, if you change "get_value" to "get_vaues" in the Python script I believe it will work for you.

Best,
Will

--
You received this message because you are subscribed to the Google Groups "OpenMC Users Group" group.
To unsubscribe from this group and stop receiving emails from it, send an email to openmc-users...@googlegroups.com.
To post to this group, send email to openmc...@googlegroups.com.
Visit this group at http://groups.google.com/group/openmc-users.
For more options, visit https://groups.google.com/d/optout.



--
Will Boyd
Nuclear Science & Engineering
Massachusetts Institute of Technology

Shawn H. Wachter

unread,
Sep 3, 2015, 12:06:51 AM9/3/15
to OpenMC Users Group
###################################
Will -

I changed get_value to get_values in both openmc-plot-mesh-tally and openmc-statepoint-3d .

This resulted in a different AttributeError: 'str' object has no attribute 'type' .
I have included a second screenshot showing the new error message.

Incidentally, I changed the scripts at both /usr/local/bin/ and /home/shawn/openmc/scripts , then tried executing the script using it's absolute pathname. All to no avail. Am going to quit messing with it for the rest of the evening and hope for a more pythonic tomorrow...
 
Incidentally, OpenMC is much more intuitive than SCALE; it has been good to me through 0.6.2.
 
Screenshot from 2015-09-02 22:54:06.png

Paul Romano

unread,
Sep 3, 2015, 5:08:39 AM9/3/15
to Shawn H. Wachter, OpenMC Users Group
Shawn- here's a version of openmc-plot-mesh-tally I just hacked up that should work. Will and I are working on getting the fix into the develop branch and will let you know when that happens. Thanks for helping to find a bug!

Best,
Paul

openmc-plot-mesh-tally

Will Boyd

unread,
Sep 4, 2015, 1:12:12 AM9/4/15
to Shawn H. Wachter, OpenMC Users Group
Shawn,

Paul and I merged in a patch to correct a few bugs in the openmc-plot-mesh-tally script which you can see on GitHub here. This is not part of the official v0.7 release, but you can easily access it by switching to the "develop" Git branch (the default branch when you clone the repository from GitHub). Then simply call "git pull" to merge in our latest changes.

Sorry for the inconvenience, thanks for pointing out this issue!

Best,
Will

--
You received this message because you are subscribed to the Google Groups "OpenMC Users Group" group.
To unsubscribe from this group and stop receiving emails from it, send an email to openmc-users...@googlegroups.com.
To post to this group, send email to openmc...@googlegroups.com.
Visit this group at http://groups.google.com/group/openmc-users.
For more options, visit https://groups.google.com/d/optout.

Shawn H. Wachter

unread,
Sep 8, 2015, 1:59:01 AM9/8/15
to OpenMC Users Group
%%%%%%%%%%%%%%%%%
Am still unable to get the openmc-plot-mesh-tally script to work properly. It will now produce a graph for the test_filter_mesh_2d test case, but it hangs up on the test_filter_energy test case, which I have modified by adding a rectangular mesh.

A screenshot is included, as is the modified tallies.xml file.

The affected files seem to be openmc-plot-mesh-tally , tallies.py , and filter.py . I wonder if the problem could be that there is a variable name filter_bin in one script, and a variable named filter_bins in another ?

I am trying to produce simultaneous graphs of both the thermal and fast absorption fluxes - and fluxes specific to certain isotopes, such as Np-237. My installation of the previous version, 0.6.2, had this capability. These visualizations are very helpful, as I am modeling an MSR core that irradiates various blanket materials.

Respectfully,

Shawn W.

%%%%%%%%%%%%%%%%%


On Wednesday, September 2, 2015 at 9:46:25 PM UTC-5, Shawn H. Wachter wrote:
Screenshot from 2015-09-08 00:38:26.png
tallies.xml

Paul Romano

unread,
Sep 11, 2015, 12:40:09 PM9/11/15
to Shawn H. Wachter, OpenMC Users Group
Shawn,

Can you try the version of openmc-plot-mesh-tally that I've attached? I've tested it out on test_filter_energy with your tallies.xml file and it works for me. Once you give me the green light, I will go ahead and submit a pull request so we can get this in the main codebase.

Thanks again!
Paul

openmc-plot-mesh-tally

Shawn H. Wachter

unread,
Sep 13, 2015, 3:32:12 PM9/13/15
to OpenMC Users Group
%%%%%%%%%%%%%%
The new script works on my setup.
:)
Thanks,
Shawn W.

%%%%%%%%%%%%%%

On Wednesday, September 2, 2015 at 9:46:25 PM UTC-5, Shawn H. Wachter wrote:
Reply all
Reply to author
Forward
0 new messages