Skip to content

Instantly share code, notes, and snippets.

View rwcarlsen's full-sized avatar

Robert Carlsen rwcarlsen

View GitHub Profile
@rwcarlsen
rwcarlsen / cycmem.xml
Last active August 29, 2015 14:02
mem-leak-test-input
<simulation>
<schematype>flat</schematype>
<control>
<duration>4800</duration>
<startmonth>1</startmonth>
<startyear>2000</startyear>
<simhandle>35</simhandle>
</control>
<archetypes>
Linking CXX shared library ../lib/cyclus/NullInst/cyclus/NullRegion/cyclus/Sink/libSinkTests.so
[ 42%] Building CXX object src/CMakeFiles/cycluscore.dir/institution.cc.o
In file included from /home/r/cyc/cyclus/src/hdf5_back.cc:2:
In file included from /home/r/cyc/cyclus/src/hdf5_back.h:8:
/home/r/cyc/cyclus/src/query_backend.h:227:18: error: call to function 'operator<' that is neither visible in the template definition nor found by argument-dependent lookup
rtn = (*x) < cond->val.cast<T>() ? true : false;
^
/home/r/cyc/cyclus/src/query_backend.h:259:10: note: in instantiation of function template specialization 'cyclus::CmpCond<cyclus::Blob>' requested here
if (!CmpCond<T>(&(*x), (*conds)[i]))
^
@rwcarlsen
rwcarlsen / gist:10389554
Created April 10, 2014 14:41
cycamore-212-regression
Exception ignored in: <bound method TestRegression.__del__ of <test_regression.TestRegression object at 0x7fdc38d480f0>>
Traceback (most recent call last):
File "/home/r/cyc/cycamore/tests/test_regression.py", line 51, in __del__
for inf, outf in self.tmp_files_.items():
AttributeError: 'TestRegression' object has no attribute 'tmp_files_'
Exception ignored in: <bound method TestRegression.__del__ of <test_regression.TestRegression object at 0x7fdc38d480f0>>
Traceback (most recent call last):
File "/home/r/cyc/cycamore/tests/test_regression.py", line 51, in __del__
for inf, outf in self.tmp_files_.items():
AttributeError: 'TestRegression' object has no attribute 'tmp_files_'
Recorder rec;
SqliteBack b("outfile.sqlite");
rec.RegisterBackend(&b);
Context ctx(&ti, &rec);
int dur = 10; // # timesteps
ctx.InitSim(SimInfo(dur)); // this is in my dbinit PR
// create and add recipes to context if any
// ...
ctx.AddRecipe("[recipe-name]", recipe1);
@rwcarlsen
rwcarlsen / gist:8426136
Created January 14, 2014 21:30
sample implementation of python node tree for building: * input xml * input xml schema * c++ for initing module vars from input xml
from collections import OrderedDict
class Node:
def __init__(self, name):
pass
def schema(self):
return 'UNSET-schema'
@rwcarlsen
rwcarlsen / gist:8361255
Created January 10, 2014 19:43
xml init currently:
struct BuildOrder {
int time;
std::string prototype;
int num_to_build;
};
class Deployer: public Model {
public:
// ...
@rwcarlsen
rwcarlsen / gist:8361207
Created January 10, 2014 19:42
Using hl xml init api
struct BuildOrder {
int time;
std::string prototype;
int num_to_build;
};
INIT_VEC_TYPE(BuildOrder);
BEGIN_TYPES();
DEFINE_TYPE(BuildOrder, time);