Giter Club home page Giter Club logo

cymetric's Introduction

Cyclus

The Cyclus fuel cycle simulator is an agent-based and extensible framework for modeling the flow of material through future nuclear fuel cycles. For more information on the entire "ecosystem" please refer to the Cyclus website.

Branch Cyclus Cycamore Cymetric
main cyclus_main cycamore_main cymetric_main

The core of the Cyclus nuclear fuel cycle simulator from the University of Wisconsin-Madison is intended to be a simulation framework for the development of innovative fuel cycle simulations.

This README is intended primarily for those who intend to contribute to the development of the Cyclus Core. If you are interested Cyclus as a user or in developing Cyclus archetypes, you may want to consult Getting Started with Cyclus.

This README provides basic information about:
  • the dependencies required by Cyclus
  • installation of Cyclus from the command line
  • how to run Cyclus and the Cyclus unit tests

The Cyclus Core contains all the fundamental pieces of the Cyclus framework required to interface with the input file, write the output file, and manage material flow during the simulation via the Dynamic Resource Exchange. It does not contain any fuel cycle facility models. A set of nuclear facilities can be obtained by installing Cycamore, the Cyclus Additional Module. Cycamore is supported by the Cyclus Developer Team.

Third party modules can also be installed (or developed) with additional facilities. Please visit the Cyclus website for a list of contributed modules.

In order to facilitate future compatibility with multiple platforms, Cyclus is built using CMake. For detailed instructions on Cyclus dependencies (including minimum version requirements), see Installing Dependencies.

The quickest way to install Cyclus and its dependencies relies on using the conda-forge channel and the conda package manager within the Anaconda python environment. The following instructions guide you through that approach. To install Cyclus and its dependencies onto a clean Ubuntu machine (tested on 22.04 LTS):

  • Download and install Miniconda for Linux
mkdir -p ~/miniconda3
wget https://repo.anaconda.com/miniconda/Miniconda3-latest-Linux-x86_64.sh -O ~/miniconda3/miniconda.sh
bash ~/miniconda3/miniconda.sh -b -u -p ~/miniconda3
rm -rf ~/miniconda3/miniconda.sh
  • Execute the following commands to initialize Miniconda:
~/miniconda3/bin/conda init bash
source ~/.bashrc
  • Create a new environment and install the Cyclus package
conda config --add channels conda-forge
conda create -n cyclus
conda activate cyclus
conda install -y cyclus

For more detailed installation procedure, and/or custom installation please refer to the INSTALLATION guide.

Installing Cyclus will also install a test driver (i.e., an executable of all of our tests). You can run the tests yourself via:

cyclus_unit_tests

As noted previously, the Cyclus Core will not allow you to run fuel cycle simulations as it does not include nuclear facilities. To run fuel cycle simulations, first download Cycamore (GitHub Cyamore Repository):

  • Clone the Cycamore Repo: git clone https://github.com/cyclus/cycamore.git,
  • Install in the same location you installed Cyclus (eg. in ~/.local/): python3 install.py from the cycamore folder.

You can find instructions for writing an input file for cyclus from Cyclus User Guide or use sample input files from Cycamore Repo. Assuming you have some file input.xml, you can run Cyclus via:

cyclus path/to/input.xml

For a more detailed explanation, check out the Cyclus User Guide.

We happily welcome new developers into the Cyclus Developer Team. If you are willing to contribute into Cyclus, please follow this procedure:

  1. Fork Cyclus repository,
  2. Create a working branch on your fork from the main branch,
  3. Implement your modification of the Cyclus source code,
  4. Submit a Pull request into Cyclus/main branch,
  5. Wait for reviews/merge (the proposer of a pull request cannot be the Merger).

You may also want to read our Contribution Guidelines.

cymetric's People

Contributors

a-co avatar abachma2 avatar baaaaam avatar bam241 avatar bennibbelink avatar deniadjokic avatar flanflanagan avatar gidden avatar gonuke avatar gwenchee avatar hodger avatar katyhuff avatar louishartono avatar nuclearkatie avatar opotowsky avatar rakhimov avatar rwcarlsen avatar scopatz avatar stompsjo avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

cymetric's Issues

Possible Issue with 'ExplicitInventoryByAgent'

When I attempt to create frame using the following line I get the following error.

fname = cym.eval('ExplicitInventoryByAgent', db)
Traceback (most recent call last):
File "", line 1, in
File "/home/robert/.local/lib/python3.4/site-packages/cymetric/evaluator.py", line 82, in eval
return e.eval(str(metric), conds=conds)
File "/home/robert/.local/lib/python3.4/site-packages/cymetric/evaluator.py", line 59, in eval
raw = m(series=series, conds=conds, known_tables=self.known_tables)
File "/home/robert/.local/lib/python3.4/site-packages/cymetric/metrics.py", line 77, in call
return f(series)
File "/home/robert/.local/lib/python3.4/site-packages/cymetric/metrics.py", line 351, in explicit_inventory_by_agent
inv = inv.groupby(level=inv_index).sum()
AttributeError: 'NoneType' object has no attribute 'groupby'

Issue with the evaluator

first call to myevaluator.eval('Materials') fails, but second works...

db = cym.dbopen('my_cyclus_output')
myEval = cym.Evaluator(db)
myEval.eval('Materials')
TypeError                                 Traceback (most recent call last)
<ipython-input-5-e52e99861331> in <module>()
----> 1 myEval.eval('Materials')

/Users/mouginot/.local/lib/python3.5/site-packages/cymetric/evaluator.py in eval(self, metric, conds)
     71                 fname = m.schema.byte_names[field]
     72                 val = rawd[str(field)][i]
---> 73                 d = d.add_val(fname, val, dbtype=dbtype, shape=shape)
     74             d.record()
     75         self.known_tables.add(m.name)

cyclus/lib.pyx in cyclus.lib._Datum.add_val (/Users/mouginot/work/app/cyclus/cyclus/build/cyclus/py_lib_.cxx:6888)()

TypeError: add_val() got an unexpected keyword argument 'dbtype'

tag mismatch

I think I made a mistake by tagging the release candidate 1 with: 1.4.2-rc2

I have recreated the rc1 tag, can I remove safely the rc2 tag ?

Segmentation fault (core dumped)

Dear all,

I tried to compile the 1.5.0 version of Cymetric on Ubuntu 16.04. I get "Segmentation fault (core dumped)" when trying to run it. Running "nosetests -w tests/" gives me "src/tcmalloc.cc:278] Attempt to free invalid pointer 0x3331e80 Aborted (core dumped)".

~/.local/lib/python2.7/site-packages/cymetric contains:

brightlite_root_metrics.py   execution.py     main.py           schemas.py
brightlite_root_metrics.pyc  execution.pyc    main.pyc          schemas.pyc
cycamore_root_metrics.py     fco_metrics.py   metrics.py        tools.py
cycamore_root_metrics.pyc    fco_metrics.pyc  metrics.pyc       tools.pyc
evaluator.py                 __init__.py      root_metrics.py
evaluator.pyc                __init__.pyc     root_metrics.pyc

Any ideas how to fix this? I had previously tried to install Cymetric without success. Could the issue also be related to me not having cleaned up the previous installation attempt properly?
I also include the log from the Cymetric installations below.
Thanks,
Malte

install.log:

running install
running build
running build_py
creating build
creating build/lib.linux-x86_64-2.7
creating build/lib.linux-x86_64-2.7/cymetric
copying cymetric/fco_metrics.py -> build/lib.linux-x86_64-2.7/cymetric
copying cymetric/root_metrics.py -> build/lib.linux-x86_64-2.7/cymetric
copying cymetric/schemas.py -> build/lib.linux-x86_64-2.7/cymetric
copying cymetric/brightlite_root_metrics.py -> build/lib.linux-x86_64-2.7/cymetric
copying cymetric/__init__.py -> build/lib.linux-x86_64-2.7/cymetric
copying cymetric/cycamore_root_metrics.py -> build/lib.linux-x86_64-2.7/cymetric
copying cymetric/metrics.py -> build/lib.linux-x86_64-2.7/cymetric
copying cymetric/execution.py -> build/lib.linux-x86_64-2.7/cymetric
copying cymetric/evaluator.py -> build/lib.linux-x86_64-2.7/cymetric
copying cymetric/main.py -> build/lib.linux-x86_64-2.7/cymetric
copying cymetric/tools.py -> build/lib.linux-x86_64-2.7/cymetric
running build_scripts
creating build/scripts-2.7
copying and adjusting scripts/cymetric -> build/scripts-2.7
changing mode of build/scripts-2.7/cymetric from 664 to 775
running install_lib
creating /home/maltefgoettsche/.local/lib/python2.7/site-packages/cymetric
copying build/lib.linux-x86_64-2.7/cymetric/fco_metrics.py -> /home/maltefgoettsche/.local/lib/python2.7/site-packages/cymetric
copying build/lib.linux-x86_64-2.7/cymetric/root_metrics.py -> /home/maltefgoettsche/.local/lib/python2.7/site-packages/cymetric
copying build/lib.linux-x86_64-2.7/cymetric/schemas.py -> /home/maltefgoettsche/.local/lib/python2.7/site-packages/cymetric
copying build/lib.linux-x86_64-2.7/cymetric/brightlite_root_metrics.py -> /home/maltefgoettsche/.local/lib/python2.7/site-packages/cymetric
copying build/lib.linux-x86_64-2.7/cymetric/__init__.py -> /home/maltefgoettsche/.local/lib/python2.7/site-packages/cymetric
copying build/lib.linux-x86_64-2.7/cymetric/cycamore_root_metrics.py -> /home/maltefgoettsche/.local/lib/python2.7/site-packages/cymetric
copying build/lib.linux-x86_64-2.7/cymetric/metrics.py -> /home/maltefgoettsche/.local/lib/python2.7/site-packages/cymetric
copying build/lib.linux-x86_64-2.7/cymetric/execution.py -> /home/maltefgoettsche/.local/lib/python2.7/site-packages/cymetric
copying build/lib.linux-x86_64-2.7/cymetric/evaluator.py -> /home/maltefgoettsche/.local/lib/python2.7/site-packages/cymetric
copying build/lib.linux-x86_64-2.7/cymetric/main.py -> /home/maltefgoettsche/.local/lib/python2.7/site-packages/cymetric
copying build/lib.linux-x86_64-2.7/cymetric/tools.py -> /home/maltefgoettsche/.local/lib/python2.7/site-packages/cymetric
byte-compiling /home/maltefgoettsche/.local/lib/python2.7/site-packages/cymetric/fco_metrics.py to fco_metrics.pyc
byte-compiling /home/maltefgoettsche/.local/lib/python2.7/site-packages/cymetric/root_metrics.py to root_metrics.pyc
byte-compiling /home/maltefgoettsche/.local/lib/python2.7/site-packages/cymetric/schemas.py to schemas.pyc
byte-compiling /home/maltefgoettsche/.local/lib/python2.7/site-packages/cymetric/brightlite_root_metrics.py to brightlite_root_metrics.pyc
byte-compiling /home/maltefgoettsche/.local/lib/python2.7/site-packages/cymetric/__init__.py to __init__.pyc
byte-compiling /home/maltefgoettsche/.local/lib/python2.7/site-packages/cymetric/cycamore_root_metrics.py to cycamore_root_metrics.pyc
byte-compiling /home/maltefgoettsche/.local/lib/python2.7/site-packages/cymetric/metrics.py to metrics.pyc
byte-compiling /home/maltefgoettsche/.local/lib/python2.7/site-packages/cymetric/execution.py to execution.pyc
byte-compiling /home/maltefgoettsche/.local/lib/python2.7/site-packages/cymetric/evaluator.py to evaluator.pyc
byte-compiling /home/maltefgoettsche/.local/lib/python2.7/site-packages/cymetric/main.py to main.pyc
byte-compiling /home/maltefgoettsche/.local/lib/python2.7/site-packages/cymetric/tools.py to tools.pyc
running install_scripts
copying build/scripts-2.7/cymetric -> /home/maltefgoettsche/.local/bin
changing mode of /home/maltefgoettsche/.local/bin/cymetric to 775
running install_egg_info
Removing /home/maltefgoettsche/.local/lib/python2.7/site-packages/cymetric-1.5.0-py2.7.egg-info
Writing /home/maltefgoettsche/.local/lib/python2.7/site-packages/cymetric-1.5.0-py2.7.egg-info

Basic Metric: Activities

Calculate the activities of materials at a given time step, over time, and at a given location

Metrics calculations change data structure

I noticed that whenever I calculate a metric (let's take the example of the 'Materials' metric), the structure of the dependencies that are used to calculate the metrics are changed (for 'Materials', dependencies are the 'Resources' and the 'Compositions' metrics).
Here is a gist that explains what change occur :
https://gist.github.com/vcloitre/b3b55df38568708be4a6
As you can see, resources['Quantity'](which is basically the column 'Quantity' of the 'Resources' metric) does not have the same structure before and after calculating the 'Materials' metric.
Indeed, instead of the 'Quantity' column represented as a Pandas Series, resources['Quantity'] gives a MultiIndex Series after calculating the 'Materials' metric. The problem is that you cannot do the same operations with this new structure. That is the reason why it can lead to errors when manipulating the metrics represented as Pandas DataFrames.

Bad No-Metric Error

This is non intuitive

$ cymetric cyclus.sqlite -e 'print(Foo[:])'
/home/gidden/.local/lib/python2.7/site-packages/cymetric/metrics.py:10: QAWarning: pyne.data is not yet QA compliant.
  from pyne import data
/home/gidden/.local/lib/python2.7/site-packages/cymetric/metrics.py:11: QAWarning: pyne.material is not yet QA compliant.
  import pyne.enrichment as enr
/home/gidden/.local/lib/python2.7/site-packages/cymetric/metrics.py:11: QAWarning: pyne.enrichment is not yet QA compliant.
  import pyne.enrichment as enr
Traceback (most recent call last):
  File "/home/gidden/.local/bin/cymetric", line 4, in <module>
    main()
  File "/home/gidden/.local/lib/python2.7/site-packages/cymetric/main.py", line 36, in main
    exec_code(ns.exec_code, db, write=ns.write)
  File "/home/gidden/.local/lib/python2.7/site-packages/cymetric/execution.py", line 217, in exec_code
    exec(code, glb, loc)
  File "<string>", line 1, in <module>
  File "/home/gidden/.local/lib/python2.7/site-packages/cymetric/execution.py", line 38, in __getitem__
    raise TypeError('ColumnProxy object {0!r} cannot be indexed'.format(self.name))
TypeError: ColumnProxy object 'Foo' cannot be indexed

Perhaps some logic could be added to catch a bad metric and print something more graceful.

Cymetric Incompatible with Cyclus v1.3

UPDATE (5 Jun 2015)

A short and long term solution were both outlined for this issue.

In the short term, PR #77 will be merged in. This allows Cymetric to build but renders it incompatible with the Cyclus/Cycamore 1.3 suite because it is using a stale dbtypes.js file. Updates to the entire suite require a near term micro-release so all repositories will be in sync.

In the long term, we determined that the dbtypes.js file should live in Cyclus. Cymetric will then build off this file knowing the Cyclus path, and small changes will be made to genapi.py (already done here: https://github.com/gidden/cymetric/tree/testing) to accomodate the deletion of the first two columns. The website will have to be updated for this, and the bug in cymetric's type system generation (see (2) below) will have to be determined.


Cymetric downloads the dbtypes.js file from the website to get its type information in genapi.py. The recent changes to fuelcycle.org to the DbTypes table broke the Cymetric build. Two things were done: (1) two columns (Id and Name) were removed and (2) some complicated data types were added to enable recycle scenarios with the growth region. @gidden (https://github.com/gidden/cymetric/tree/testing) determined that even if the genapi.py file is fixed to address (1), that (2) still causes the Cymetric build to fail. Since (1) is not the issue (and I will show below that (2) is), the quick fix in #77 just has Cymetric build off the "old" DbTyles table without changing genapi.py. The next step is to refactor Cymetric somehow to not break with the new datatypes.

Onto the errors...

(1) Initial error:

  • Cymetric pulls the current dbtypes.js file from the website
DBTYPES_JS_URL = 'http://fuelcycle.org/arche/dbtypes.js'
  • Build fails because genapi.py is looking for missing columns.
~/cyclus/cymetric (develop) $ ./setup.py install --user
Generating API Bindings...

--------------------

If you are having issues building cymetric, please report your problem to [email protected] or look for help at http://fuelcycle.org

--------------------
Traceback (most recent call last):
  File "./setup.py", line 269, in <module>
    main()
  File "./setup.py", line 240, in main
    main_body(cmake_args, make_args)
  File "./setup.py", line 214, in main_body
    genapi.main([])
  File "/home/opotowsky/cyclus/cymetric/genapi.py", line 969, in main
    ts = setup(ns)
  File "/home/opotowsky/cyclus/cymetric/genapi.py", line 943, in setup
    cpp_typesystem=os.path.splitext(ns.cpp_typesystem)[0])
  File "/home/opotowsky/cyclus/cymetric/genapi.py", line 72, in __init__
    id, name, version = cols['id'], cols['name'], cols['version']
KeyError: u'id'

(2) Add back in missing columns, keeping new data type: still fails, instead because of the data type.

DBTYPES_JS_URL = 'https://raw.githubusercontent.com/gidden/cyclus.github.com/testing/source/arche/dbtypes.js'
  • Build fails.
~/cyclus/cymetric (develop) $ ./setup.py install --user
Generating API Bindings...
Downloading https://raw.githubusercontent.com/gidden/cyclus.github.com/testing/source/arche/dbtypes.js ...

--------------------

If you are having issues building cymetric, please report your problem to [email protected] or look for help at http://fuelcycle.org

--------------------
Traceback (most recent call last):
  File "./setup.py", line 269, in <module>
    main()
  File "./setup.py", line 240, in main
    main_body(cmake_args, make_args)
  File "./setup.py", line 214, in main_body
    genapi.main([])
  File "/home/opotowsky/cyclus/cymetric/genapi.py", line 970, in main
    code_gen(ts, ns)
  File "/home/opotowsky/cyclus/cymetric/genapi.py", line 953, in code_gen
    s = func(ts, ns)
  File "/home/opotowsky/cyclus/cymetric/genapi.py", line 810, in typesystem_pyx
    rtn = TYPESYSTEM_PYX.render(ctx)
  File "/usr/lib/python2.7/dist-packages/jinja2/environment.py", line 969, in render
    return self.environment.handle_exception(exc_info, True)
  File "/usr/lib/python2.7/dist-packages/jinja2/environment.py", line 742, in handle_exception
    reraise(exc_type, exc_value, tb)
  File "<template>", line 93, in top-level template code
  File "/home/opotowsky/cyclus/cymetric/genapi.py", line 213, in convert_to_py
    decl = decl.format(**ctx)
KeyError: u'valdecl'

(3) Add back in missing columns, remove new data type: passes.

DBTYPES_JS_URL = 'https://raw.githubusercontent.com/cyclus/cyclus.github.com/355dfbec0b408e7aa4b00bd673affc65b7c9090d/source/arche/dbtypes.js'
  • Build passes

metrics filtering

It seems I can filter on a root table just fine, but when I want to filter a metric, I get this type of error when trying to filter by any column other than QualId (pretty sure I tried all of the columns for the Materials metric):

$ cymetric lwr.sqlite -e "print(Materials[NucId != 922380000])"
/home/opotowsky/.local/lib/python2.7/site-packages/cymetric/metrics.py:12: QAWarning: pyne.data is not yet QA compliant.
  from pyne import data
Traceback (most recent call last):
  File "/home/opotowsky/.local/bin/cymetric", line 4, in <module>
    main()
  File "/home/opotowsky/.local/lib/python2.7/site-packages/cymetric/main.py", line 31, in main
    exec_code(ns.exec_code, db)
  File "/home/opotowsky/.local/lib/python2.7/site-packages/cymetric/execution.py", line 197, in exec_code
    exec(code, glb, loc)
  File "<string>", line 1, in <module>
  File "/home/opotowsky/.local/lib/python2.7/site-packages/cymetric/execution.py", line 123, in __getitem__
    return self.evaler.eval(self.name, conds=conds)
  File "/home/opotowsky/.local/lib/python2.7/site-packages/cymetric/evaluator.py", line 59, in eval
    d = self.eval(dep[0], conds=conds)
  File "/home/opotowsky/.local/lib/python2.7/site-packages/cymetric/evaluator.py", line 62, in eval
    raw = m(series=series, conds=conds, known_tables=self.known_tables)
  File "/home/opotowsky/.local/lib/python2.7/site-packages/cymetric/root_metrics.py", line 27, in __call__
    return self.db.query(self.name, conds=conds)
  File "cyclus.pyx", line 123, in cymetric.cyclus._FullBackend.query (/home/opotowsky/cyclus/cymetric/build/cymetric/cyclus.cxx:2586)
RuntimeError: SQL error [SELECT * FROM Resources WHERE NucId != ?;]: no such column: NucId

Testing structure causes false passing of tests

The cyclus simulations remain in the test directory and this caused all my tests to pass while others failed (when mine should have been failing). A simulation is run for multiple tests, but doesn't get deleted if the run of tests is successful. Changing this may require some significant changes to the testing architecture in cymetric.

Basic Metric: Material Composition

Depict the isotopic profile of material throughout the simulation. More detailed metrics could include total actinide content, or particular isotopes of interest.

Remove the conda-recipe folder

Result from TwoFCS19 Cyclus workshop - it may be the case that cyclus-build-deps-feedstock in conda-forge contains this information now and this folder is now deprecated.

@FlanFlanagan

This issue can be closed when the conda-recipe folder is removed.

Basic Metric: Decay Heat

Calculate the decay heat of materials at a given time step, over time, and at a given location

Install defaults different from cyclus

Cymetric should probably have the same install defaults as cyclus. A straight up install command fails for me.

$ ./setup.py install --user
Generating API Bindings...
/usr/bin/cmake
CMake command is
cmake .. -DPYTHON_EXECUTABLE=/usr/bin/python
-- Cymetric platform defined as: __LINUX__
                  __________________________________________________________
                  |  ____  __   __ __  __  _____  _____   ____  ___  ____   |
             /    | |___ \ \ \ / /|  \/  ||____ ||_   _| / _  ||_ _||___ \  |
            /---, |     | | \ V / | |\/| |  |_  |  | |  | (_| | | |     | | |
       -----# ==| |  ___| |  | |  | |  | | ___| |  | |   > _  | | |  ___| | |
       | :) # ==| | |____/   |_|  |_|  |_||_____|  |_|  /_/ |_||___||____/  |
  -----'----#   | |_________________________________________________________|
  |)___()  '#   |______====____   \___________________________________|
 [_/,-,\"--"------ //,-,  ,-,\\\   |/             //,-,  ,-,  ,-,\\ __#
   ( 0 )|===******||( 0 )( 0 )||-  o              '( 0 )( 0 )( 0 )||
----'-'--------------'-'--'-'-----------------------'-'--'-'--'-'--------------

-- Build type: Release
-- PYTHON_EXECUTABLE: /usr/bin/python
-- Cython Version: Cython version 0.20.1
-- Found glib-2.0: /usr/include/glib-2.0, /usr/lib/x86_64-linux-gnu/libglib-2.0.so
-- Found SigC++ 
-- Found Glibmm 
-- Found LibXML++ 
-- Boost version: 1.54.0
-- Found the following Boost libraries:
--   filesystem
--   system
-- A library with BLAS API found.
-- A library with LAPACK API found.
    Found LAPACK Libraries: /usr/lib/liblapack.so;/usr/lib/libblas.so
-- NUMPY_VERSION_STRING = 1.8.0
    COIN Root Dir: COIN_INCLUDE_DIR-NOTFOUND
-- COIN_ROOT_DIR hint is : 
-- Coin multiple library dependency status:
    COIN Include Dir: COIN_INCLUDE_DIR-NOTFOUND/coin
    COIN CBC: COIN_CBC_LIBRARY-NOTFOUND
    COIN CBC solver: COIN_CBC_SOLVER_LIBRARY-NOTFOUND
    COIN CGL: COIN_CGL_LIBRARY-NOTFOUND
    COIN CLP: COIN_CLP_LIBRARY-NOTFOUND
    COIN UTILS: COIN_COIN_UTILS_LIBRARY-NOTFOUND
    COIN OSI: COIN_OSI_LIBRARY-NOTFOUND
    COIN OSI CLP: COIN_OSI_CLP_LIBRARY-NOTFOUND
    COIN ZLIB: /usr/lib/x86_64-linux-gnu/libz.so
    COIN BZ2: /usr/lib/x86_64-linux-gnu/libbz2.so
CMake Error at /usr/share/cmake-2.8/Modules/FindPackageHandleStandardArgs.cmake:108 (message):
  Could NOT find COIN (missing: COIN_CBC_LIBRARY COIN_CBC_SOLVER_LIBRARY
  COIN_CGL_LIBRARY COIN_CLP_LIBRARY COIN_COIN_UTILS_LIBRARY COIN_OSI_LIBRARY
  COIN_OSI_CLP_LIBRARY)
Call Stack (most recent call first):
  /usr/share/cmake-2.8/Modules/FindPackageHandleStandardArgs.cmake:315 (_FPHSA_FAILURE_MESSAGE)
  cmake/FindCOIN.cmake:124 (FIND_PACKAGE_HANDLE_STANDARD_ARGS)
  CMakeLists.txt:78 (FIND_PACKAGE)


-- Configuring incomplete, errors occurred!
See also "/home/gidden/work/cyclus/cymetric/build/CMakeFiles/CMakeOutput.log".
See also "/home/gidden/work/cyclus/cymetric/build/CMakeFiles/CMakeError.log".
make: *** No targets specified and no makefile found.  Stop.

--------------------

If you are having issues building cymetric, please report your problem to [email protected] or look for help at http://fuelcycle.org

--------------------
Traceback (most recent call last):
  File "./setup.py", line 269, in <module>
    main()
  File "./setup.py", line 240, in main
    main_body(cmake_args, make_args)
  File "./setup.py", line 223, in main_body
    setup()
  File "./setup.py", line 149, in setup
    scripts = [os.path.join('scripts', f) for f in os.listdir('scripts')]
OSError: [Errno 2] No such file or directory: 'scripts'

Basic Metric: Fuel Cycle Efficiency

More defining needs to be done as to how efficiency will be measured. Power output as compared to waste output? Power output as compared to newly mined fuel?

Cymetric/master not compile against cyclus/master + cycamore/master

while trying to build cymetric build fails:

Generating API Bindings...


If you are having issues building cymetric, please report your problem to [email protected] or look for help at http://fuelcycle.org


Traceback (most recent call last):
File "setup.py", line 269, in
main()
File "setup.py", line 240, in main
main_body(cmake_args, make_args)
File "setup.py", line 214, in main_body
genapi.main([])
File "/Users/mouginot/work/app/cyclus/cymetric/genapi.py", line 962, in main
code_gen(ts, ns)
File "/Users/mouginot/work/app/cyclus/cymetric/genapi.py", line 945, in code_gen
s = func(ts, ns)
File "/Users/mouginot/work/app/cyclus/cymetric/genapi.py", line 810, in typesystem_pyx
rtn = TYPESYSTEM_PYX.render(ctx)
File "/opt/local/Library/Frameworks/Python.framework/Versions/3.5/lib/python3.5/site-packages/jinja2/environment.py", line 989, in render
return self.environment.handle_exception(exc_info, True)
File "/opt/local/Library/Frameworks/Python.framework/Versions/3.5/lib/python3.5/site-packages/jinja2/environment.py", line 754, in handle_exception
reraise(exc_type, exc_value, tb)
File "/opt/local/Library/Frameworks/Python.framework/Versions/3.5/lib/python3.5/site-packages/jinja2/_compat.py", line 37, in reraise
raise value.with_traceback(tb)
File "", line 93, in top-level template code
File "/Users/mouginot/work/app/cyclus/cymetric/genapi.py", line 213, in convert_to_py
decl = decl.format(**ctx)
KeyError: 'valdecl'

Documentation Integration

Right now the docs only live on fuelcycle.org, and they need to be automatically updated with the cymetric repository so that documentation for releases doesn't have to be manually carried out.

NOTETESTS RunTimeError with pyne/data.pyx

Currently running Ubuntu 16.04 with latest develop of cyclus, cycamore, cymetric and pyne that I've built from source.

After installing cymetric in .local (where cyclus and cycamore are installed), when I run the tests as shown in Readme.md, I get the following error message. The simulation runs successfully.

Status: Cyclus run successful!
Output location: orig.sqlite
Simulation ID: f0ff2bbe-3ab4-4613-95bd-98a2c5451367
......../home/user/anaconda3/lib/python3.6/importlib/_bootstrap.py:205: QAWarning: pyne.data is not yet QA compliant.
  return f(*args, **kwds)
/home/user/anaconda3/lib/python3.6/importlib/_bootstrap.py:205: QAWarning: pyne.material is not yet QA compliant.
  return f(*args, **kwds)
/home/user/anaconda3/lib/python3.6/importlib/_bootstrap.py:205: QAWarning: pyne.enrichment is not yet QA compliant.
  return f(*args, **kwds)
....../home/user/anaconda3/lib/python3.6/site-packages/cymetric/filters.py:191: UserWarning: no faciity provided
  warnings.warn(wng_msg, UserWarning)
..EEEE..EEEE......EE......................................./home/user/anaconda3/lib/python3.6/site-packages/cymetric/timeseries.py:133: UserWarning: no nuclide provided
  warnings.warn(wng_msg, UserWarning)
../home/user/anaconda3/lib/python3.6/site-packages/cymetric/timeseries.py:163: UserWarning: no nuclide provided
  warnings.warn(wng_msg, UserWarning)
EE/home/user/anaconda3/lib/python3.6/site-packages/cymetric/timeseries.py:192: UserWarning: no nuclide provided
  warnings.warn(wng_msg, UserWarning)
EE..EEEE
======================================================================
ERROR: test_filters.test_inventories_activity(<cyclus.lib.Hdf5Back object at 0x7ffad1c2cd88>, 'test.h5', <class 'cyclus.lib.Hdf5Back'>)
----------------------------------------------------------------------
Traceback (most recent call last):
  File "/home/user/anaconda3/lib/python3.6/site-packages/nose/case.py", line 197, in runTest
    self.test(*self.arg)
  File "/home/user/cyclus/cymetric/tests/test_filters.py", line 477, in test_inventories_activity
    cal = filters.inventories_activity(evaler)
  File "/home/user/anaconda3/lib/python3.6/site-packages/cymetric/filters.py", line 219, in inventories_activity
    data.decay_const(int(row['NucId']))
  File "pyne/data.pyx", line 910, in pyne.data.decay_const (/home/user/cyclus/pyne/build/pyne/data.cxx:10735)
RuntimeError

======================================================================
ERROR: test_filters.test_inventories_activity(<cyclus.lib.SqliteBack object at 0x7ffad1a090c8>, 'test.sqlite', <class 'cyclus.lib.SqliteBack'>)
----------------------------------------------------------------------
Traceback (most recent call last):
  File "/home/user/anaconda3/lib/python3.6/site-packages/nose/case.py", line 197, in runTest
    self.test(*self.arg)
  File "/home/user/cyclus/cymetric/tests/test_filters.py", line 477, in test_inventories_activity
    cal = filters.inventories_activity(evaler)
  File "/home/user/anaconda3/lib/python3.6/site-packages/cymetric/filters.py", line 219, in inventories_activity
    data.decay_const(int(row['NucId']))
  File "pyne/data.pyx", line 910, in pyne.data.decay_const (/home/user/cyclus/pyne/build/pyne/data.cxx:10735)
RuntimeError

======================================================================
ERROR: test_filters.test_inventories_decayheat(<cyclus.lib.Hdf5Back object at 0x7ffad1a1fe48>, 'test.h5', <class 'cyclus.lib.Hdf5Back'>)
----------------------------------------------------------------------
Traceback (most recent call last):
  File "/home/user/anaconda3/lib/python3.6/site-packages/nose/case.py", line 197, in runTest
    self.test(*self.arg)
  File "/home/user/cyclus/cymetric/tests/test_filters.py", line 541, in test_inventories_decayheat
    cal = filters.inventories_decayheat(evaler)
  File "/home/user/anaconda3/lib/python3.6/site-packages/cymetric/filters.py", line 240, in inventories_decayheat
    df = inventories_activity(evaler, facilities, nucs)
  File "/home/user/anaconda3/lib/python3.6/site-packages/cymetric/filters.py", line 219, in inventories_activity
    data.decay_const(int(row['NucId']))
  File "pyne/data.pyx", line 910, in pyne.data.decay_const (/home/user/cyclus/pyne/build/pyne/data.cxx:10735)
RuntimeError

======================================================================
ERROR: test_filters.test_inventories_decayheat(<cyclus.lib.SqliteBack object at 0x7ffad1a1f3c8>, 'test.sqlite', <class 'cyclus.lib.SqliteBack'>)
----------------------------------------------------------------------
Traceback (most recent call last):
  File "/home/user/anaconda3/lib/python3.6/site-packages/nose/case.py", line 197, in runTest
    self.test(*self.arg)
  File "/home/user/cyclus/cymetric/tests/test_filters.py", line 541, in test_inventories_decayheat
    cal = filters.inventories_decayheat(evaler)
  File "/home/user/anaconda3/lib/python3.6/site-packages/cymetric/filters.py", line 240, in inventories_decayheat
    df = inventories_activity(evaler, facilities, nucs)
  File "/home/user/anaconda3/lib/python3.6/site-packages/cymetric/filters.py", line 219, in inventories_activity
    data.decay_const(int(row['NucId']))
  File "pyne/data.pyx", line 910, in pyne.data.decay_const (/home/user/cyclus/pyne/build/pyne/data.cxx:10735)
RuntimeError

======================================================================
ERROR: test_filters.test_transactions_activity(<cyclus.lib.Hdf5Back object at 0x7ffad1a11d88>, 'test.h5', <class 'cyclus.lib.Hdf5Back'>)
----------------------------------------------------------------------
Traceback (most recent call last):
  File "/home/user/anaconda3/lib/python3.6/site-packages/nose/case.py", line 197, in runTest
    self.test(*self.arg)
  File "/home/user/cyclus/cymetric/tests/test_filters.py", line 290, in test_transactions_activity
    cal = filters.transactions_activity(evaler)
  File "/home/user/anaconda3/lib/python3.6/site-packages/cymetric/filters.py", line 127, in transactions_activity
    compo = evaler.eval('Activity')
  File "/home/user/anaconda3/lib/python3.6/site-packages/cymetric/evaluator.py", line 59, in eval
    raw = m(series=series, conds=conds, known_tables=self.known_tables)
  File "/home/user/anaconda3/lib/python3.6/site-packages/cymetric/metrics.py", line 76, in __call__
    return f(series)
  File "/home/user/anaconda3/lib/python3.6/site-packages/cymetric/metrics.py", line 150, in activity
    / data.atomic_mass(nuc))
  File "pyne/data.pyx", line 910, in pyne.data.decay_const (/home/user/cyclus/pyne/build/pyne/data.cxx:10735)
RuntimeError

======================================================================
ERROR: test_filters.test_transactions_activity(<cyclus.lib.SqliteBack object at 0x7ffad1a02b88>, 'test.sqlite', <class 'cyclus.lib.SqliteBack'>)
----------------------------------------------------------------------
Traceback (most recent call last):
  File "/home/user/anaconda3/lib/python3.6/site-packages/nose/case.py", line 197, in runTest
    self.test(*self.arg)
  File "/home/user/cyclus/cymetric/tests/test_filters.py", line 290, in test_transactions_activity
    cal = filters.transactions_activity(evaler)
  File "/home/user/anaconda3/lib/python3.6/site-packages/cymetric/filters.py", line 127, in transactions_activity
    compo = evaler.eval('Activity')
  File "/home/user/anaconda3/lib/python3.6/site-packages/cymetric/evaluator.py", line 59, in eval
    raw = m(series=series, conds=conds, known_tables=self.known_tables)
  File "/home/user/anaconda3/lib/python3.6/site-packages/cymetric/metrics.py", line 76, in __call__
    return f(series)
  File "/home/user/anaconda3/lib/python3.6/site-packages/cymetric/metrics.py", line 150, in activity
    / data.atomic_mass(nuc))
  File "pyne/data.pyx", line 910, in pyne.data.decay_const (/home/user/cyclus/pyne/build/pyne/data.cxx:10735)
RuntimeError

======================================================================
ERROR: test_filters.test_transactions_decayheat(<cyclus.lib.Hdf5Back object at 0x7ffad1c72508>, 'test.h5', <class 'cyclus.lib.Hdf5Back'>)
----------------------------------------------------------------------
Traceback (most recent call last):
  File "/home/user/anaconda3/lib/python3.6/site-packages/nose/case.py", line 197, in runTest
    self.test(*self.arg)
  File "/home/user/cyclus/cymetric/tests/test_filters.py", line 358, in test_transactions_decayheat
    cal = filters.transactions_decayheat(evaler)
  File "/home/user/anaconda3/lib/python3.6/site-packages/cymetric/filters.py", line 156, in transactions_decayheat
    compo = evaler.eval('DecayHeat')
  File "/home/user/anaconda3/lib/python3.6/site-packages/cymetric/evaluator.py", line 56, in eval
    d = self.eval(dep[0], conds=conds)
  File "/home/user/anaconda3/lib/python3.6/site-packages/cymetric/evaluator.py", line 59, in eval
    raw = m(series=series, conds=conds, known_tables=self.known_tables)
  File "/home/user/anaconda3/lib/python3.6/site-packages/cymetric/metrics.py", line 76, in __call__
    return f(series)
  File "/home/user/anaconda3/lib/python3.6/site-packages/cymetric/metrics.py", line 150, in activity
    / data.atomic_mass(nuc))
  File "pyne/data.pyx", line 910, in pyne.data.decay_const (/home/user/cyclus/pyne/build/pyne/data.cxx:10735)
RuntimeError

======================================================================
ERROR: test_filters.test_transactions_decayheat(<cyclus.lib.SqliteBack object at 0x7ffad1a21e88>, 'test.sqlite', <class 'cyclus.lib.SqliteBack'>)
----------------------------------------------------------------------
Traceback (most recent call last):
  File "/home/user/anaconda3/lib/python3.6/site-packages/nose/case.py", line 197, in runTest
    self.test(*self.arg)
  File "/home/user/cyclus/cymetric/tests/test_filters.py", line 358, in test_transactions_decayheat
    cal = filters.transactions_decayheat(evaler)
  File "/home/user/anaconda3/lib/python3.6/site-packages/cymetric/filters.py", line 156, in transactions_decayheat
    compo = evaler.eval('DecayHeat')
  File "/home/user/anaconda3/lib/python3.6/site-packages/cymetric/evaluator.py", line 56, in eval
    d = self.eval(dep[0], conds=conds)
  File "/home/user/anaconda3/lib/python3.6/site-packages/cymetric/evaluator.py", line 59, in eval
    raw = m(series=series, conds=conds, known_tables=self.known_tables)
  File "/home/user/anaconda3/lib/python3.6/site-packages/cymetric/metrics.py", line 76, in __call__
    return f(series)
  File "/home/user/anaconda3/lib/python3.6/site-packages/cymetric/metrics.py", line 150, in activity
    / data.atomic_mass(nuc))
  File "pyne/data.pyx", line 910, in pyne.data.decay_const (/home/user/cyclus/pyne/build/pyne/data.cxx:10735)
RuntimeError

======================================================================
ERROR: test_metrics.test_activity
----------------------------------------------------------------------
Traceback (most recent call last):
  File "/home/user/anaconda3/lib/python3.6/site-packages/nose/case.py", line 197, in runTest
    self.test(*self.arg)
  File "/home/user/cyclus/cymetric/tests/test_metrics.py", line 195, in test_activity
    obs = metrics.activity.func(series)
  File "/home/user/anaconda3/lib/python3.6/site-packages/cymetric/metrics.py", line 150, in activity
    / data.atomic_mass(nuc))
  File "pyne/data.pyx", line 910, in pyne.data.decay_const (/home/user/cyclus/pyne/build/pyne/data.cxx:10735)
RuntimeError

======================================================================
ERROR: test_metrics.test_decayheat
----------------------------------------------------------------------
Traceback (most recent call last):
  File "/home/user/anaconda3/lib/python3.6/site-packages/nose/case.py", line 197, in runTest
    self.test(*self.arg)
  File "/home/user/cyclus/cymetric/tests/test_metrics.py", line 222, in test_decayheat
    obs = metrics.decay_heat.func(series)
  File "/home/user/anaconda3/lib/python3.6/site-packages/cymetric/metrics.py", line 183, in decay_heat
    val = (data.MeV_per_MJ * a * data.q_val(nuc))
  File "pyne/data.pyx", line 179, in pyne.data.q_val (/home/user/cyclus/pyne/build/pyne/data.cxx:3628)
RuntimeError

======================================================================
ERROR: test_timeseries.test_timeseries_inventories_activity(<cyclus.lib.Hdf5Back object at 0x7ffad1a11ac8>, 'test.h5', <class 'cyclus.lib.Hdf5Back'>)
----------------------------------------------------------------------
Traceback (most recent call last):
  File "/home/user/anaconda3/lib/python3.6/site-packages/nose/case.py", line 197, in runTest
    self.test(*self.arg)
  File "/home/user/cyclus/cymetric/tests/test_timeseries.py", line 193, in test_timeseries_inventories_activity
    cal = ts.inventories_activity(evaler)
  File "/home/user/anaconda3/lib/python3.6/site-packages/cymetric/timeseries.py", line 165, in inventories_activity
    df = filters.inventories_activity(evaler, facilities, nucs)
  File "/home/user/anaconda3/lib/python3.6/site-packages/cymetric/filters.py", line 219, in inventories_activity
    data.decay_const(int(row['NucId']))
  File "pyne/data.pyx", line 910, in pyne.data.decay_const (/home/user/cyclus/pyne/build/pyne/data.cxx:10735)
RuntimeError

======================================================================
ERROR: test_timeseries.test_timeseries_inventories_activity(<cyclus.lib.SqliteBack object at 0x7ffad1a1f1c8>, 'test.sqlite', <class 'cyclus.lib.SqliteBack'>)
----------------------------------------------------------------------
Traceback (most recent call last):
  File "/home/user/anaconda3/lib/python3.6/site-packages/nose/case.py", line 197, in runTest
    self.test(*self.arg)
  File "/home/user/cyclus/cymetric/tests/test_timeseries.py", line 193, in test_timeseries_inventories_activity
    cal = ts.inventories_activity(evaler)
  File "/home/user/anaconda3/lib/python3.6/site-packages/cymetric/timeseries.py", line 165, in inventories_activity
    df = filters.inventories_activity(evaler, facilities, nucs)
  File "/home/user/anaconda3/lib/python3.6/site-packages/cymetric/filters.py", line 219, in inventories_activity
    data.decay_const(int(row['NucId']))
  File "pyne/data.pyx", line 910, in pyne.data.decay_const (/home/user/cyclus/pyne/build/pyne/data.cxx:10735)
RuntimeError

======================================================================
ERROR: test_timeseries.test_timeseries_inventories_decayheat(<cyclus.lib.Hdf5Back object at 0x7ffad1a1fc88>, 'test.h5', <class 'cyclus.lib.Hdf5Back'>)
----------------------------------------------------------------------
Traceback (most recent call last):
  File "/home/user/anaconda3/lib/python3.6/site-packages/nose/case.py", line 197, in runTest
    self.test(*self.arg)
  File "/home/user/cyclus/cymetric/tests/test_timeseries.py", line 231, in test_timeseries_inventories_decayheat
    cal = ts.inventories_decayheat(evaler)
  File "/home/user/anaconda3/lib/python3.6/site-packages/cymetric/timeseries.py", line 194, in inventories_decayheat
    df = filters.inventories_decayheat(evaler, facilities, nucs)
  File "/home/user/anaconda3/lib/python3.6/site-packages/cymetric/filters.py", line 240, in inventories_decayheat
    df = inventories_activity(evaler, facilities, nucs)
  File "/home/user/anaconda3/lib/python3.6/site-packages/cymetric/filters.py", line 219, in inventories_activity
    data.decay_const(int(row['NucId']))
  File "pyne/data.pyx", line 910, in pyne.data.decay_const (/home/user/cyclus/pyne/build/pyne/data.cxx:10735)
RuntimeError

======================================================================
ERROR: test_timeseries.test_timeseries_inventories_decayheat(<cyclus.lib.SqliteBack object at 0x7ffad1bdee88>, 'test.sqlite', <class 'cyclus.lib.SqliteBack'>)
----------------------------------------------------------------------
Traceback (most recent call last):
  File "/home/user/anaconda3/lib/python3.6/site-packages/nose/case.py", line 197, in runTest
    self.test(*self.arg)
  File "/home/user/cyclus/cymetric/tests/test_timeseries.py", line 231, in test_timeseries_inventories_decayheat
    cal = ts.inventories_decayheat(evaler)
  File "/home/user/anaconda3/lib/python3.6/site-packages/cymetric/timeseries.py", line 194, in inventories_decayheat
    df = filters.inventories_decayheat(evaler, facilities, nucs)
  File "/home/user/anaconda3/lib/python3.6/site-packages/cymetric/filters.py", line 240, in inventories_decayheat
    df = inventories_activity(evaler, facilities, nucs)
  File "/home/user/anaconda3/lib/python3.6/site-packages/cymetric/filters.py", line 219, in inventories_activity
    data.decay_const(int(row['NucId']))
  File "pyne/data.pyx", line 910, in pyne.data.decay_const (/home/user/cyclus/pyne/build/pyne/data.cxx:10735)
RuntimeError

======================================================================
ERROR: test_timeseries.test_timeseries_transactions_activity(<cyclus.lib.Hdf5Back object at 0x7ffad1d9a508>, 'test.h5', <class 'cyclus.lib.Hdf5Back'>)
----------------------------------------------------------------------
Traceback (most recent call last):
  File "/home/user/anaconda3/lib/python3.6/site-packages/nose/case.py", line 197, in runTest
    self.test(*self.arg)
  File "/home/user/cyclus/cymetric/tests/test_timeseries.py", line 75, in test_timeseries_transactions_activity
    cal = ts.transactions_activity(evaler)
  File "/home/user/anaconda3/lib/python3.6/site-packages/cymetric/timeseries.py", line 68, in transactions_activity
    nucs)
  File "/home/user/anaconda3/lib/python3.6/site-packages/cymetric/filters.py", line 127, in transactions_activity
    compo = evaler.eval('Activity')
  File "/home/user/anaconda3/lib/python3.6/site-packages/cymetric/evaluator.py", line 59, in eval
    raw = m(series=series, conds=conds, known_tables=self.known_tables)
  File "/home/user/anaconda3/lib/python3.6/site-packages/cymetric/metrics.py", line 76, in __call__
    return f(series)
  File "/home/user/anaconda3/lib/python3.6/site-packages/cymetric/metrics.py", line 150, in activity
    / data.atomic_mass(nuc))
  File "pyne/data.pyx", line 910, in pyne.data.decay_const (/home/user/cyclus/pyne/build/pyne/data.cxx:10735)
RuntimeError

======================================================================
ERROR: test_timeseries.test_timeseries_transactions_activity(<cyclus.lib.SqliteBack object at 0x7ffad1a54688>, 'test.sqlite', <class 'cyclus.lib.SqliteBack'>)
----------------------------------------------------------------------
Traceback (most recent call last):
  File "/home/user/anaconda3/lib/python3.6/site-packages/nose/case.py", line 197, in runTest
    self.test(*self.arg)
  File "/home/user/cyclus/cymetric/tests/test_timeseries.py", line 75, in test_timeseries_transactions_activity
    cal = ts.transactions_activity(evaler)
  File "/home/user/anaconda3/lib/python3.6/site-packages/cymetric/timeseries.py", line 68, in transactions_activity
    nucs)
  File "/home/user/anaconda3/lib/python3.6/site-packages/cymetric/filters.py", line 127, in transactions_activity
    compo = evaler.eval('Activity')
  File "/home/user/anaconda3/lib/python3.6/site-packages/cymetric/evaluator.py", line 59, in eval
    raw = m(series=series, conds=conds, known_tables=self.known_tables)
  File "/home/user/anaconda3/lib/python3.6/site-packages/cymetric/metrics.py", line 76, in __call__
    return f(series)
  File "/home/user/anaconda3/lib/python3.6/site-packages/cymetric/metrics.py", line 150, in activity
    / data.atomic_mass(nuc))
  File "pyne/data.pyx", line 910, in pyne.data.decay_const (/home/user/cyclus/pyne/build/pyne/data.cxx:10735)
RuntimeError

======================================================================
ERROR: test_timeseries.test_timeseries_transactions_decayheat(<cyclus.lib.Hdf5Back object at 0x7ffad1bde488>, 'test.h5', <class 'cyclus.lib.Hdf5Back'>)
----------------------------------------------------------------------
Traceback (most recent call last):
  File "/home/user/anaconda3/lib/python3.6/site-packages/nose/case.py", line 197, in runTest
    self.test(*self.arg)
  File "/home/user/cyclus/cymetric/tests/test_timeseries.py", line 115, in test_timeseries_transactions_decayheat
    cal = ts.transactions_decayheat(evaler)
  File "/home/user/anaconda3/lib/python3.6/site-packages/cymetric/timeseries.py", line 100, in transactions_decayheat
    nucs)
  File "/home/user/anaconda3/lib/python3.6/site-packages/cymetric/filters.py", line 156, in transactions_decayheat
    compo = evaler.eval('DecayHeat')
  File "/home/user/anaconda3/lib/python3.6/site-packages/cymetric/evaluator.py", line 56, in eval
    d = self.eval(dep[0], conds=conds)
  File "/home/user/anaconda3/lib/python3.6/site-packages/cymetric/evaluator.py", line 59, in eval
    raw = m(series=series, conds=conds, known_tables=self.known_tables)
  File "/home/user/anaconda3/lib/python3.6/site-packages/cymetric/metrics.py", line 76, in __call__
    return f(series)
  File "/home/user/anaconda3/lib/python3.6/site-packages/cymetric/metrics.py", line 150, in activity
    / data.atomic_mass(nuc))
  File "pyne/data.pyx", line 910, in pyne.data.decay_const (/home/user/cyclus/pyne/build/pyne/data.cxx:10735)
RuntimeError

======================================================================
ERROR: test_timeseries.test_timeseries_transactions_decayheat(<cyclus.lib.SqliteBack object at 0x7ffad1a64388>, 'test.sqlite', <class 'cyclus.lib.SqliteBack'>)
----------------------------------------------------------------------
Traceback (most recent call last):
  File "/home/user/anaconda3/lib/python3.6/site-packages/nose/case.py", line 197, in runTest
    self.test(*self.arg)
  File "/home/user/cyclus/cymetric/tests/test_timeseries.py", line 115, in test_timeseries_transactions_decayheat
    cal = ts.transactions_decayheat(evaler)
  File "/home/user/anaconda3/lib/python3.6/site-packages/cymetric/timeseries.py", line 100, in transactions_decayheat
    nucs)
  File "/home/user/anaconda3/lib/python3.6/site-packages/cymetric/filters.py", line 156, in transactions_decayheat
    compo = evaler.eval('DecayHeat')
  File "/home/user/anaconda3/lib/python3.6/site-packages/cymetric/evaluator.py", line 56, in eval
    d = self.eval(dep[0], conds=conds)
  File "/home/user/anaconda3/lib/python3.6/site-packages/cymetric/evaluator.py", line 59, in eval
    raw = m(series=series, conds=conds, known_tables=self.known_tables)
  File "/home/user/anaconda3/lib/python3.6/site-packages/cymetric/metrics.py", line 76, in __call__
    return f(series)
  File "/home/user/anaconda3/lib/python3.6/site-packages/cymetric/metrics.py", line 150, in activity
    / data.atomic_mass(nuc))
  File "pyne/data.pyx", line 910, in pyne.data.decay_const (/home/user/cyclus/pyne/build/pyne/data.cxx:10735)
RuntimeError

----------------------------------------------------------------------
Ran 85 tests in 4.917s

FAILED (errors=18)

Create Index in the output database

copying @katyhuff's text from cyclus/cyclus#603:

Suggestion from Yarden ( @yarden-livnat ) :

One of the last steps of database creation should be indexing (CREATE_INDEX ? )
Since it takes some time (how much?), it's likely that we will want a flag that turns off this feature for parametric simulation sets (because creating the index at the end of each simulation is fine, but is probably better to do just once at the end of the parametric series).

We should do this probably by adding a line to the create-table function for the sqlite backend that adds the name of that table to the list of tables to index.

Then, at the beginning of the close-table function in that sqlite backend, create an index based on that list.

See cyclus/cyclus#603 for further discussion

eval function bug

I recently installed and began to use cymetrics. I tried to receive the "ReactorEvents" metric from my database 'db'. After using the eval function cym.eval('ReactorEvents', db) to receive the 'ReactorEvents' data, this error occurred.

cym.eval('ReactorEvents', db)
Traceback (most recent call last):

File "", line 1, in
cym.eval('ReactorEvents', db)

File "/home/tyler/anaconda3/lib/python3.6/site-packages/cymetric/evaluator.py", line 83, in eval
return e.eval(str(metric), conds=conds)

File "/home/tyler/anaconda3/lib/python3.6/site-packages/cymetric/evaluator.py", line 55, in eval
m = self.get_metric(metric)

File "/home/tyler/anaconda3/lib/python3.6/site-packages/cymetric/evaluator.py", line 47, in get_metric
self.metrics[metric] = METRIC_REGISTRYmetric

KeyError: 'ReactorEvents'

The entire code is placed below
In[20]:
db.tables
Out[20]:
{'AgentEntry',
'AgentExit',
'AgentStateAgent',
'AgentStateInventories',
'AgentState_agents_NullInstInfo',
'AgentState_agents_NullRegionInfo',
'AgentState_cycamore_EnrichmentInfo',
'AgentState_cycamore_ReactorInfo',
'AgentState_cycamore_SinkInfo',
'AgentState_cycamore_SourceInfo',
'AgentVersions',
'CommodPriority',
'Compositions',
'DecayMode',
'DecomSchedule',
'Enrichments',
'Epsilon',
'Finish',
'GreedySolverInfo',
'Info',
'InfoExplicitInv',
'InputFiles',
'MaterialInfo',
'Materials',
'NextIds',
'Prototypes',
'ReactorEvents',
'Recipes',
'ResCreators',
'Resources',
'Snapshots',
'SolverInfo',
'TimeSeriesEnrichmentFeed',
'TimeSeriesEnrichmentSWU',
'TimeSeriesPower',
'TimeSeriesUsedFuel',
'TimeStepDur',
'Transactions',
'XMLPPInfo'}

cym.eval('ReactorEvents', db)
Traceback (most recent call last):

File "", line 1, in
cym.eval('ReactorEvents', db)

File "/home/tyler/anaconda3/lib/python3.6/site-packages/cymetric/evaluator.py", line 83, in eval
return e.eval(str(metric), conds=conds)

File "/home/tyler/anaconda3/lib/python3.6/site-packages/cymetric/evaluator.py", line 55, in eval
m = self.get_metric(metric)

File "/home/tyler/anaconda3/lib/python3.6/site-packages/cymetric/evaluator.py", line 47, in get_metric
self.metrics[metric] = METRIC_REGISTRYmetric

KeyError: 'ReactorEvents'

Install directions

I tried to install via Binary
$ conda install cymetric --yes
but received

PackagesNotFoundError:
The following packages are not available from current channels:
-cymetric

The installation via Binary install directions should be changed from
$ conda install cymetric --yes
to
$ conda install -c conda-forge cymetric

Reformatting advice?

Need to pay better attention to formatting main.cc and when to put functionality in new file.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.