diff --git a/dbhandle.py b/dbhandle.py index 0f955a1..cb7c28a 100644 --- a/dbhandle.py +++ b/dbhandle.py @@ -1,74 +1,69 @@ import click -import subprocess -import pymongo -import sys + +from ddsmdb.dbhandler import DBHandler +import json +import pprint @click.command() -@click.option('--run/--no-run', default=None, help="run mongod with `--dbpath`") +@click.option('--launch/--no-launch', default=True, help="run mongod with `--dbpath`") @click.option('--info/--no-info', default=False, help="the names of the databases") -@click.option('--create', default=None, help="create a database, specify a name") -@click.option('--delete', default=None, help="delete a database, specify a name") -@click.option('--shutdown/--no-shutdown', default=None, help='shutdown the database server using `--dbpath`') +@click.option('--create/--no-create', default=False, help="create a database") +@click.option('--delete/--no-delete', default=False, help="delete a database") +@click.option('--dbname', default=None, help="the name of the db") +@click.option('--shutdown/--no-shutdown', default=False, help='shutdown the database server using `--dbpath`') @click.option('--dbpath', default=None, help='specify the dbpath to run or remove') +@click.option('--verbose/--no-verbose', default=False, help="dump mongod output to stdout") +@click.option('--port', default=None, type=int, help="the port number") +@click.option('--host', default=None, help="the host") +@click.option('--jsonfile', default=None, help="upload JSON data to database") +@click.option('--view/--no-view', default=False, help="dump the data in the database to screeen") -def handle(run, info, create, delete, shutdown, dbpath): - if run: - dbrun(dbpath) +def handle(launch, + info, + create, + delete, + dbname, + shutdown, + dbpath, + verbose, + port, + host, + jsonfile, + view): - client = pymongo.MongoClient('localhost', 27017) + if shutdown: + launch = False + + handler = DBHandler(port=port, dbpath=dbpath, host=host, launch=launch, verbose=verbose) + if create or delete or jsonfile or view: + if not dbname: + dbname = click.prompt('enter a db name', type=str) + if create: - dbcreate(client, create) + handler.create(dbname) if info: - dbinfo(client) + info = handler.info() + click.echo(info) if delete: - dbdelete(client, delete) + handler.delete(dbname) + if jsonfile: + with open(jsonfile, 'r') as f: + data = json.load(f) + handler.create(dbname) + handler.set_data(dbname, data) + + if view: + data = handler.get_data(dbname) + pp = pprint.PrettyPrinter(indent=2) + pp.pprint(data) + if shutdown: - dbshutdown(dbpath) + handler.shutdown() -def dbrun(dbpath): - command = ['mongod'] - if dbpath: - command.append('--dbpath') - command.append(dbpath) - subprocess.Popen(command) - -def dbcreate(client, dbname): - db = client[dbname] - collection = db['setup-collection'] - collection.insert({'setup-data' : True}) - -def dbinfo(client): - click.echo('list of databases') - for name in client.database_names(): - click.echo('database: {0}'.format(name)) - -def dbdelete(client, dbname): - if click.confirm('Do you want to delete the {0} database?'.format(dbname)): - client.drop_database(dbname) - click.echo('deleted the {0} database'.format(dbname)) - -def dbsetup(): - #Add some test data to the database - pass - -def dbshutdown(dbpath): - if "linux" in sys.platform or "darwin" in sys.platform: - command = ['mongo'] - command.append('--eval') - command.append('db.getSiblingDB(\'admin\').shutdownServer()') - subprocess.call(command) - else: - click.echo('your {0} platform is not supported.'.format(sys.platform)) - if click.confirm('Try the mongo shell option anyway?'): - command = ['mongo'] - command.append('--eval') - command.append('db.getSiblingDB(\'admin\').shutdownServer()') - subprocess.call(command) - if __name__ == "__main__": handle() diff --git a/ddsmdb/data/test.json b/ddsmdb/data/test.json new file mode 100644 index 0000000..ab49bfa --- /dev/null +++ b/ddsmdb/data/test.json @@ -0,0 +1 @@ +[{"a": 1}, {"b": 2}] \ No newline at end of file diff --git a/ddsmdb/data/test_records.json b/ddsmdb/data/test_records.json new file mode 100644 index 0000000..2f89ddf --- /dev/null +++ b/ddsmdb/data/test_records.json @@ -0,0 +1,21731 @@ +[{ + "script_arguments": "", + "platforms": [ + { + "system_name": "Linux", + "machine": "x86_64", + "version": "#35-Ubuntu SMP Thu Jan 24 13:15:40 UTC 2013", + "ip_addr": "127.0.0.1", + "architecture_bits": "64bit", + "architecture_linkage": "ELF", + "release": "3.5.0-23-generic", + "network_name": "loki", + "processor": "x86_64" + } + ], + "duration": 6.46581506729126, + "diff": "diff --git a/script.py b/script.py\nindex ec41d60..dd94f39 100644\n--- a/script.py\n+++ b/script.py\n@@ -30,16 +30,5 @@ def run(totalSteps=10,\n NxBase=1200)\n \n if __name__ == '__main__':\n-\n-\n- class Bare(object):\n- pass\n-\n- \n- args = Bare()\n- parser = argparse.ArgumentParser(description=\"Run Extremefill 2D example.\")\n- parser.add_argument('--totalSteps', default=1, type=int)\n- parser.parse_args(namespace=args)\n-\n- run(totalSteps=args.totalSteps, tags=('test',), reason=\"testing SMT class\")\n+ run(totalSteps=2, CFL=0.1)\n \ndiff --git a/smtdecorator.py b/smtdecorator.py\nindex 432a8b7..826170c 100644\n--- a/smtdecorator.py\n+++ b/smtdecorator.py\n@@ -1,4 +1,3 @@\n-\n \"\"\"\n Script to test setting up batch simaulations with Sumatra.\n \n@@ -22,8 +21,8 @@ On laptop use http://129.6.153.60:8000\n import time\n import os\n import sys\n-from contextlib import contextmanager\n from StringIO import StringIO\n+import argparse\n \n \n from sumatra.projects import load_project\n@@ -59,18 +58,21 @@ class SMTDecorator(object):\n def __init__(self, function):\n self.function = function\n \n- def __call__(self, tags=(), reason='', *args, **kwargs):\n+ def __call__(self, tag=[], reason='', *args, **kwargs):\n+\n+ parameters, tag, reason = self.parseargs(kwargs, list(tag), reason)\n+\n project = load_project()\n- record = project.new_record(parameters=SimpleParameterSet(kwargs),\n+ record = project.new_record(parameters=SimpleParameterSet(parameters),\n main_file=self.function.func_globals['__file__'],\n reason=reason)\n \n record.datastore.root = os.path.join(record.datastore.root, record.label)\n- for tag in tags:\n- record.tags.add(tag)\n \n- record.start_time = time.time()\n+ for t in tag:\n+ record.tags.add(t)\n \n+ record.start_time = time.time()\n with Redirect() as out:\n returnvalue = self.function(datadir=record.datastore.root, *args, **record.parameters.as_dict())\n \n@@ -84,5 +86,25 @@ class SMTDecorator(object):\n \n return returnvalue\n \n+ def parseargs(self, func_kwargs, tag, reason):\n+ class Bare:\n+ pass\n+ ext_kwargs = Bare()\n+ parser = argparse.ArgumentParser(description=\"SMT arguments\")\n+\n+ for k, v in func_kwargs.iteritems():\n+ parser.add_argument('--' + k, default=v, type=type(v), dest=k)\n+ \n+ parser.add_argument('--tag', action='append', default=tag, dest='tag')\n+ parser.add_argument('--reason', default=reason, dest='reason')\n+ parser.parse_args(namespace=ext_kwargs)\n \n+ tag = ext_kwargs.tag\n+ reason = ext_kwargs.reason\n \n+ for k, v in func_kwargs.iteritems():\n+ func_kwargs[k] = getattr(ext_kwargs, k)\n+ \n+ return func_kwargs, tag, reason\n+ \n+ ", + "datastore": { + "type": "FileSystemDataStore", + "parameters": { + "root": "./Data/0f0b18283f9b" + } + }, + "input_datastore": { + "type": "FileSystemDataStore", + "parameters": { + "root": "/" + } + }, + "executable": { + "path": "/home/wd15/.virtualenvs/default/bin/python", + "version": "2.7.3", + "name": "Python", + "options": "" + }, + "parameters": { + "content": "totalSteps = 2\nCFL = 0.33", + "type": "SimpleParameterSet" + }, + "label": "0f0b18283f9b", + "version": "03128c81e5ec503445a0a10166626c2e902ba41e", + "stdout_stderr": "[ 1. 1. 1. 1.]\n[ 0.34738209 0.61535499 0.01923836 0.00971058]\n[ 1.23729704e-01 2.14204081e-01 1.88311438e-04 1.55991524e-03]\n\ntheta 0.0\ncBar_supp 1.0\ncBar_cu 1.0\npotentialBar 1.0\nmin(extension) 7.22965473284e-08\nmin(depositionRate) 2.09114908795e-09\nmin(current) 56.8350759862\nmin(cupric) 997.266139623\nmin(baseCurrent) 56.9323002935\nmax(interfaceTheta) - 1: -0.973021297371\nmin(interfaceTheta) 0.0\nmin(I0) 38.9208518948\ndt 0.011\nelapsed time 0.0\nstep 0\n\n[ 1. 1. 1. 1.]\n[ 0.10765512 0.04576554 0.03330295 0.00523947]\n\ntheta 0.0\ncBar_supp 1.0\ncBar_cu 1.0\npotentialBar 1.0\nmin(extension) 2.09114554699e-09\nmin(depositionRate) 1.47837489306e-09\nmin(current) 40.1805638188\nmin(cupric) 996.200886814\nmin(baseCurrent) 40.2838895551\nmax(interfaceTheta) - 1: -0.947107282423\nmin(interfaceTheta) 0.0\nmin(I0) 37.8842912969\ndt 0.0121\nelapsed time 0.011\nstep 1\n\n", + "repository": { + "url": "/home/wd15/git/extremefill-data", + "type": "GitRepository", + "upstream": "git@github.com:wd15/extremefill-data.git" + }, + "tags": [ + "test", + "CFL" + ], + "timestamp": "2013-02-19 10:48:25", + "reason": "Testing a lot of jobs at once", + "dependencies": [ + { + "name": "Cython", + "module": "python", + "source": "attribute", + "version": "0.16", + "diff": "", + "path": "/usr/lib/python2.7/dist-packages/Cython" + }, + { + "name": "IPython", + "module": "python", + "source": "attribute", + "version": "0.13.1.rc2", + "diff": "", + "path": "/usr/lib/python2.7/dist-packages/IPython" + }, + { + "name": "PIL", + "module": "python", + "source": null, + "version": "unknown", + "diff": "", + "path": "/usr/lib/python2.7/dist-packages/PIL" + }, + { + "name": "PyQt4", + "module": "python", + "source": null, + "version": "unknown", + "diff": "", + "path": "/usr/lib/python2.7/dist-packages/PyQt4" + }, + { + "name": "PyTrilinos", + "module": "python", + "source": "attribute", + "version": "4.8d", + "diff": "", + "path": "/home/wd15/.virtualenvs/fipy/lib/python2.7/site-packages/PyTrilinos" + }, + { + "name": "dateutil", + "module": "python", + "source": "attribute", + "version": "1.5", + "diff": "", + "path": "/usr/lib/python2.7/dist-packages/dateutil" + }, + { + "name": "distutils", + "module": "python", + "source": "attribute", + "version": "2.7.3", + "diff": "", + "path": "/home/wd15/.virtualenvs/default/lib/python2.7/distutils" + }, + { + "name": "django", + "module": "python", + "source": "attribute", + "version": "1.4.1", + "diff": "", + "path": "/usr/lib/python2.7/dist-packages/django" + }, + { + "name": "docutils", + "module": "python", + "source": "attribute", + "version": "0.10", + "diff": "", + "path": "/home/wd15/.virtualenvs/fipy/lib/python2.7/site-packages/docutils" + }, + { + "name": "encodings", + "module": "python", + "source": null, + "version": "unknown", + "diff": "", + "path": "/home/wd15/.virtualenvs/default/lib/python2.7/encodings" + }, + { + "name": "extremefill", + "module": "python", + "source": "/home/wd15/git/extremefill", + "version": "549c969edb113d0b3e9804612bfa53e91319c0ea", + "diff": "diff --git a/data/viewer.py b/data/viewer.py\nindex 68f60e0..d9ab7c2 100644\n--- a/data/viewer.py\n+++ b/data/viewer.py\n@@ -122,7 +122,7 @@ class ContourViewer(BaseViewer):\n self.times = times\n self.contours = contours\n self.data = []\n- super(ContourViewer, self).__init__(branches=branches, datafile=datafiles, datafiles=datafiles)\n+ super(ContourViewer, self).__init__(branches=branches, datafile=datafile, datafiles=datafiles)\n \n def plot(self):\n import matplotlib.pyplot as plt\n@@ -152,6 +152,24 @@ class ContourViewer(BaseViewer):\n phi = np.reshape(phi, shape)\n self.data.append((x, y, phi))\n \n+def datafilesFromBranches(branches, datafile):\n+ cwd = os.getcwd()\n+ for count, branch in enumerate(branches):\n+ print 'branch',branch\n+ tempdir = gitCloneToTemp(branch=branch, repositoryPath='ssh://wd15@genie.nist.gov/users/wd15/git/extremefill')\n+ repopath = os.path.join(tempdir, 'extremefill')\n+ datapath = os.path.join(repopath, datafile)\n+ gitMediaSync()\n+ if count == 0:\n+ self.addBaseData(datapath)\n+ basetempdir = tempdir\n+ else:\n+ self.addData(datapath, branch)\n+ cleanTempRepo(tempdir) \n+\n+ cleanTempRepo(basetempdir)\n+ os.chdir(cwd)\n+\n def plotNx():\n branches = ('Nx600', 'Nx300', 'Nx150')\n datafile = os.path.join('data', 'data.h5')\n@@ -174,13 +192,13 @@ def plotCFL():\n \n def plotContour():\n # branches = ('CFL0.0125', 'CFL0.025', 'CFL0.05', 'CFL0.1', 'CFL0.2', 'CFL0.4', 'CFL0.8', 'CFL1.6')\n- branches = ('Nx600', 'Nx150')\n+ branches = ('Nx300', 'Nx150')\n # branches = ('CFL0.025', 'CFL0.05')\n datafile = os.path.join('data', 'data.h5')\n times = (0,)\n- # times = (0., 1000., 2000., 3000., 4000.)\n- # viewer = ContourViewer(times=times, branches=branches, datafile=datafile)\n- viewer = ContourViewer(times=times, branches=branches, datafile=datafile, datafiles=('data150.h5', 'data600.h5'))\n+ times = (0., 1000., 2000., 3000., 4000.)\n+ viewer = ContourViewer(times=times, branches=branches, datafile=datafile)\n+ #viewer = ContourViewer(times=times, branches=branches, datafile=datafile, datafiles=('data150.h5', 'data600.h5'))\n viewer.plot()\n \n if __name__ == '__main__':\n@@ -188,6 +206,6 @@ if __name__ == '__main__':\n # from profiler import calibrate_profiler\n # fudge = calibrate_profiler(10000)\n # profile = Profiler('profile', fudge=fudge)\n- plotCFL()\n+ plotContour()\n # profile.stop()\n ", + "path": "/home/wd15/git/extremefill/extremefill" + }, + { + "name": "fipy", + "module": "python", + "source": "/home/wd15/git/fipy", + "version": "8c51478a3e8c30618b3a96c132612a46735c7548", + "diff": "", + "path": "/home/wd15/git/fipy/fipy" + }, + { + "name": "gi", + "module": "python", + "source": "attribute", + "version": "3.4.0", + "diff": "", + "path": "/usr/lib/python2.7/dist-packages/gi" + }, + { + "name": "glib", + "module": "python", + "source": null, + "version": "unknown", + "diff": "", + "path": "/usr/lib/python2.7/dist-packages/glib" + }, + { + "name": "gobject", + "module": "python", + "source": null, + "version": "unknown", + "diff": "", + "path": "/usr/lib/python2.7/dist-packages/gobject" + }, + { + "name": "google", + "module": "python", + "source": null, + "version": "unknown", + "diff": "", + "path": "/usr/lib/python2.7/dist-packages/google" + }, + { + "name": "gtk", + "module": "python", + "source": null, + "version": "unknown", + "diff": "", + "path": "/usr/lib/python2.7/dist-packages/gtk-2.0/gtk" + }, + { + "name": "httplib2", + "module": "python", + "source": "attribute", + "version": "0.7.4", + "diff": "", + "path": "/usr/lib/python2.7/dist-packages/httplib2" + }, + { + "name": "lockfile", + "module": "python", + "source": "egg-info", + "version": "0.9.1", + "diff": "", + "path": "/home/wd15/.virtualenvs/default/lib/python2.7/site-packages/lockfile-0.9.1-py2.7.egg/lockfile" + }, + { + "name": "lxml", + "module": "python", + "source": null, + "version": "unknown", + "diff": "", + "path": "/usr/lib/python2.7/dist-packages/lxml" + }, + { + "name": "matplotlib", + "module": "python", + "source": "attribute", + "version": "1.1.1", + "diff": "", + "path": "/usr/lib/pymodules/python2.7/matplotlib" + }, + { + "name": "mayavi", + "module": "python", + "source": "attribute", + "version": "4.1.0", + "diff": "", + "path": "/usr/lib/python2.7/dist-packages/mayavi" + }, + { + "name": "mpi4py", + "module": "python", + "source": "attribute", + "version": "1.3", + "diff": "", + "path": "/usr/lib/python2.7/dist-packages/mpi4py" + }, + { + "name": "mpl_toolkits", + "module": "python", + "source": null, + "version": "unknown", + "diff": "", + "path": "/usr/lib/pymodules/python2.7/mpl_toolkits" + }, + { + "name": "mx", + "module": "python", + "source": "attribute", + "version": "3.2.1", + "diff": "", + "path": "/usr/lib/python2.7/dist-packages/mx" + }, + { + "name": "nose", + "module": "python", + "source": "attribute", + "version": "1.2.1", + "diff": "", + "path": "/home/wd15/.virtualenvs/fipy/lib/python2.7/site-packages/nose" + }, + { + "name": "numexpr", + "module": "python", + "source": "attribute", + "version": "2.0.1", + "diff": "", + "path": "/usr/lib/python2.7/dist-packages/numexpr" + }, + { + "name": "numpy", + "module": "python", + "source": "attribute", + "version": "1.6.2", + "diff": "", + "path": "/usr/lib/python2.7/dist-packages/numpy" + }, + { + "name": "pyamg", + "module": "python", + "source": "attribute", + "version": "2.0.4.dev", + "diff": "", + "path": "/home/wd15/.virtualenvs/fipy/lib/python2.7/site-packages/pyamg" + }, + { + "name": "pylsmlib", + "module": "python", + "source": "/home/wd15/git/LSMLIB", + "version": "6f5d969bb27530aa37452a8b096e538a5cf7b993", + "diff": "", + "path": "/home/wd15/git/LSMLIB/pylsmlib/pylsmlib" + }, + { + "name": "pysparse", + "module": "python", + "source": "attribute", + "version": "1.1", + "diff": "", + "path": "/usr/lib/python2.7/dist-packages/pysparse" + }, + { + "name": "pytz", + "module": "python", + "source": "attribute", + "version": "2011k", + "diff": "", + "path": "/usr/lib/python2.7/dist-packages/pytz" + }, + { + "name": "scipy", + "module": "python", + "source": "attribute", + "version": "0.10.1", + "diff": "", + "path": "/usr/lib/python2.7/dist-packages/scipy" + }, + { + "name": "setuptools", + "module": "python", + "source": "attribute", + "version": "0.6", + "diff": "", + "path": "/home/wd15/.virtualenvs/default/local/lib/python2.7/site-packages/distribute-0.6.24-py2.7.egg/setuptools" + }, + { + "name": "simplejson", + "module": "python", + "source": "attribute", + "version": "2.6.1", + "diff": "", + "path": "/usr/lib/python2.7/dist-packages/simplejson" + }, + { + "name": "skfmm", + "module": "python", + "source": "/home/wd15/git/scikit-fmm", + "version": "467e5982fbd9d4eb32495f826d6bda65da498e13", + "diff": "", + "path": "/home/wd15/git/scikit-fmm/skfmm" + }, + { + "name": "sumatra", + "module": "python", + "source": "attribute", + "version": "0.5.0dev", + "diff": "", + "path": "/home/wd15/.virtualenvs/default/lib/python2.7/site-packages/Sumatra-0.5.0dev-py2.7.egg/sumatra" + }, + { + "name": "tables", + "module": "python", + "source": "attribute", + "version": "2.3.1", + "diff": "", + "path": "/usr/lib/python2.7/dist-packages/tables" + }, + { + "name": "tagging", + "module": "python", + "source": "attribute", + "version": "0.3.1", + "diff": "", + "path": "/home/wd15/.virtualenvs/fipy/lib/python2.7/site-packages/tagging" + }, + { + "name": "tornado", + "module": "python", + "source": "attribute", + "version": "2.3", + "diff": "", + "path": "/usr/lib/python2.7/dist-packages/tornado" + }, + { + "name": "traits", + "module": "python", + "source": "attribute", + "version": "4.1.0", + "diff": "", + "path": "/usr/lib/python2.7/dist-packages/traits" + }, + { + "name": "tvtk", + "module": "python", + "source": null, + "version": "unknown", + "diff": "", + "path": "/usr/lib/python2.7/dist-packages/tvtk" + }, + { + "name": "vtk", + "module": "python", + "source": null, + "version": "unknown", + "diff": "", + "path": "/usr/lib/pymodules/python2.7/vtk" + }, + { + "name": "wx", + "module": "python", + "source": "attribute", + "version": "2.8.12.1", + "diff": "", + "path": "/usr/lib/python2.7/dist-packages/wx-2.8-gtk2-unicode/wx" + }, + { + "name": "yaml", + "module": "python", + "source": "attribute", + "version": "3.10", + "diff": "", + "path": "/usr/lib/python2.7/dist-packages/yaml" + }, + { + "name": "zmq", + "module": "python", + "source": "attribute", + "version": "2.2.0", + "diff": "", + "path": "/usr/lib/python2.7/dist-packages/zmq" + } + ], + "user": "Daniel Wheeler ", + "output_data": [ + { + "path": "data.h5", + "digest": "a135712aa21a2a2778d9c7d828cd7ec36dcfa2fe", + "metadata": { + "mimetype": null, + "size": 102992, + "encoding": null + } + } + ], + "input_data": [], + "launch_mode": { + "type": "SerialLaunchMode", + "parameters": { + "working_directory": "/home/wd15/git/extremefill-data" + } + }, + "main_file": "script.py", + "outcome": "" +}, +{ + "script_arguments": "", + "platforms": [ + { + "system_name": "Linux", + "machine": "x86_64", + "version": "#35-Ubuntu SMP Thu Jan 24 13:15:40 UTC 2013", + "ip_addr": "127.0.0.1", + "architecture_bits": "64bit", + "architecture_linkage": "ELF", + "release": "3.5.0-23-generic", + "network_name": "loki", + "processor": "x86_64" + } + ], + "duration": 6.36234712600708, + "diff": "diff --git a/script.py b/script.py\nindex ec41d60..dd94f39 100644\n--- a/script.py\n+++ b/script.py\n@@ -30,16 +30,5 @@ def run(totalSteps=10,\n NxBase=1200)\n \n if __name__ == '__main__':\n-\n-\n- class Bare(object):\n- pass\n-\n- \n- args = Bare()\n- parser = argparse.ArgumentParser(description=\"Run Extremefill 2D example.\")\n- parser.add_argument('--totalSteps', default=1, type=int)\n- parser.parse_args(namespace=args)\n-\n- run(totalSteps=args.totalSteps, tags=('test',), reason=\"testing SMT class\")\n+ run(totalSteps=2, CFL=0.1)\n \ndiff --git a/smtdecorator.py b/smtdecorator.py\nindex 432a8b7..826170c 100644\n--- a/smtdecorator.py\n+++ b/smtdecorator.py\n@@ -1,4 +1,3 @@\n-\n \"\"\"\n Script to test setting up batch simaulations with Sumatra.\n \n@@ -22,8 +21,8 @@ On laptop use http://129.6.153.60:8000\n import time\n import os\n import sys\n-from contextlib import contextmanager\n from StringIO import StringIO\n+import argparse\n \n \n from sumatra.projects import load_project\n@@ -59,18 +58,21 @@ class SMTDecorator(object):\n def __init__(self, function):\n self.function = function\n \n- def __call__(self, tags=(), reason='', *args, **kwargs):\n+ def __call__(self, tag=[], reason='', *args, **kwargs):\n+\n+ parameters, tag, reason = self.parseargs(kwargs, list(tag), reason)\n+\n project = load_project()\n- record = project.new_record(parameters=SimpleParameterSet(kwargs),\n+ record = project.new_record(parameters=SimpleParameterSet(parameters),\n main_file=self.function.func_globals['__file__'],\n reason=reason)\n \n record.datastore.root = os.path.join(record.datastore.root, record.label)\n- for tag in tags:\n- record.tags.add(tag)\n \n- record.start_time = time.time()\n+ for t in tag:\n+ record.tags.add(t)\n \n+ record.start_time = time.time()\n with Redirect() as out:\n returnvalue = self.function(datadir=record.datastore.root, *args, **record.parameters.as_dict())\n \n@@ -84,5 +86,25 @@ class SMTDecorator(object):\n \n return returnvalue\n \n+ def parseargs(self, func_kwargs, tag, reason):\n+ class Bare:\n+ pass\n+ ext_kwargs = Bare()\n+ parser = argparse.ArgumentParser(description=\"SMT arguments\")\n+\n+ for k, v in func_kwargs.iteritems():\n+ parser.add_argument('--' + k, default=v, type=type(v), dest=k)\n+ \n+ parser.add_argument('--tag', action='append', default=tag, dest='tag')\n+ parser.add_argument('--reason', default=reason, dest='reason')\n+ parser.parse_args(namespace=ext_kwargs)\n \n+ tag = ext_kwargs.tag\n+ reason = ext_kwargs.reason\n \n+ for k, v in func_kwargs.iteritems():\n+ func_kwargs[k] = getattr(ext_kwargs, k)\n+ \n+ return func_kwargs, tag, reason\n+ \n+ ", + "datastore": { + "type": "FileSystemDataStore", + "parameters": { + "root": "./Data/9c517d0b4520" + } + }, + "input_datastore": { + "type": "FileSystemDataStore", + "parameters": { + "root": "/" + } + }, + "executable": { + "path": "/home/wd15/.virtualenvs/default/bin/python", + "version": "2.7.3", + "name": "Python", + "options": "" + }, + "parameters": { + "content": "totalSteps = 2\nCFL = 0.35", + "type": "SimpleParameterSet" + }, + "label": "9c517d0b4520", + "version": "03128c81e5ec503445a0a10166626c2e902ba41e", + "stdout_stderr": "[ 1. 1. 1. 1.]\n[ 0.34738209 0.61535499 0.01923836 0.00971058]\n[ 1.23729704e-01 2.14204081e-01 1.88311438e-04 1.55991524e-03]\n\ntheta 0.0\ncBar_supp 1.0\ncBar_cu 1.0\npotentialBar 1.0\nmin(extension) 7.22965473284e-08\nmin(depositionRate) 2.09114908795e-09\nmin(current) 56.8350759862\nmin(cupric) 997.266139623\nmin(baseCurrent) 56.9323002935\nmax(interfaceTheta) - 1: -0.973021297371\nmin(interfaceTheta) 0.0\nmin(I0) 38.9208518948\ndt 0.011\nelapsed time 0.0\nstep 0\n\n[ 1. 1. 1. 1.]\n[ 0.10765512 0.04576554 0.03330295 0.00523947]\n\ntheta 0.0\ncBar_supp 1.0\ncBar_cu 1.0\npotentialBar 1.0\nmin(extension) 2.09114554699e-09\nmin(depositionRate) 1.47837489306e-09\nmin(current) 40.1805638188\nmin(cupric) 996.200886814\nmin(baseCurrent) 40.2838895551\nmax(interfaceTheta) - 1: -0.947107282423\nmin(interfaceTheta) 0.0\nmin(I0) 37.8842912969\ndt 0.0121\nelapsed time 0.011\nstep 1\n\n", + "repository": { + "url": "/home/wd15/git/extremefill-data", + "type": "GitRepository", + "upstream": "git@github.com:wd15/extremefill-data.git" + }, + "tags": [ + "test", + "CFL" + ], + "timestamp": "2013-02-19 10:48:25", + "reason": "Testing a lot of jobs at once", + "dependencies": [ + { + "name": "Cython", + "module": "python", + "source": "attribute", + "version": "0.16", + "diff": "", + "path": "/usr/lib/python2.7/dist-packages/Cython" + }, + { + "name": "IPython", + "module": "python", + "source": "attribute", + "version": "0.13.1.rc2", + "diff": "", + "path": "/usr/lib/python2.7/dist-packages/IPython" + }, + { + "name": "PIL", + "module": "python", + "source": null, + "version": "unknown", + "diff": "", + "path": "/usr/lib/python2.7/dist-packages/PIL" + }, + { + "name": "PyQt4", + "module": "python", + "source": null, + "version": "unknown", + "diff": "", + "path": "/usr/lib/python2.7/dist-packages/PyQt4" + }, + { + "name": "PyTrilinos", + "module": "python", + "source": "attribute", + "version": "4.8d", + "diff": "", + "path": "/home/wd15/.virtualenvs/fipy/lib/python2.7/site-packages/PyTrilinos" + }, + { + "name": "dateutil", + "module": "python", + "source": "attribute", + "version": "1.5", + "diff": "", + "path": "/usr/lib/python2.7/dist-packages/dateutil" + }, + { + "name": "distutils", + "module": "python", + "source": "attribute", + "version": "2.7.3", + "diff": "", + "path": "/home/wd15/.virtualenvs/default/lib/python2.7/distutils" + }, + { + "name": "django", + "module": "python", + "source": "attribute", + "version": "1.4.1", + "diff": "", + "path": "/usr/lib/python2.7/dist-packages/django" + }, + { + "name": "docutils", + "module": "python", + "source": "attribute", + "version": "0.10", + "diff": "", + "path": "/home/wd15/.virtualenvs/fipy/lib/python2.7/site-packages/docutils" + }, + { + "name": "encodings", + "module": "python", + "source": null, + "version": "unknown", + "diff": "", + "path": "/home/wd15/.virtualenvs/default/lib/python2.7/encodings" + }, + { + "name": "extremefill", + "module": "python", + "source": "/home/wd15/git/extremefill", + "version": "549c969edb113d0b3e9804612bfa53e91319c0ea", + "diff": "diff --git a/data/viewer.py b/data/viewer.py\nindex 68f60e0..d9ab7c2 100644\n--- a/data/viewer.py\n+++ b/data/viewer.py\n@@ -122,7 +122,7 @@ class ContourViewer(BaseViewer):\n self.times = times\n self.contours = contours\n self.data = []\n- super(ContourViewer, self).__init__(branches=branches, datafile=datafiles, datafiles=datafiles)\n+ super(ContourViewer, self).__init__(branches=branches, datafile=datafile, datafiles=datafiles)\n \n def plot(self):\n import matplotlib.pyplot as plt\n@@ -152,6 +152,24 @@ class ContourViewer(BaseViewer):\n phi = np.reshape(phi, shape)\n self.data.append((x, y, phi))\n \n+def datafilesFromBranches(branches, datafile):\n+ cwd = os.getcwd()\n+ for count, branch in enumerate(branches):\n+ print 'branch',branch\n+ tempdir = gitCloneToTemp(branch=branch, repositoryPath='ssh://wd15@genie.nist.gov/users/wd15/git/extremefill')\n+ repopath = os.path.join(tempdir, 'extremefill')\n+ datapath = os.path.join(repopath, datafile)\n+ gitMediaSync()\n+ if count == 0:\n+ self.addBaseData(datapath)\n+ basetempdir = tempdir\n+ else:\n+ self.addData(datapath, branch)\n+ cleanTempRepo(tempdir) \n+\n+ cleanTempRepo(basetempdir)\n+ os.chdir(cwd)\n+\n def plotNx():\n branches = ('Nx600', 'Nx300', 'Nx150')\n datafile = os.path.join('data', 'data.h5')\n@@ -174,13 +192,13 @@ def plotCFL():\n \n def plotContour():\n # branches = ('CFL0.0125', 'CFL0.025', 'CFL0.05', 'CFL0.1', 'CFL0.2', 'CFL0.4', 'CFL0.8', 'CFL1.6')\n- branches = ('Nx600', 'Nx150')\n+ branches = ('Nx300', 'Nx150')\n # branches = ('CFL0.025', 'CFL0.05')\n datafile = os.path.join('data', 'data.h5')\n times = (0,)\n- # times = (0., 1000., 2000., 3000., 4000.)\n- # viewer = ContourViewer(times=times, branches=branches, datafile=datafile)\n- viewer = ContourViewer(times=times, branches=branches, datafile=datafile, datafiles=('data150.h5', 'data600.h5'))\n+ times = (0., 1000., 2000., 3000., 4000.)\n+ viewer = ContourViewer(times=times, branches=branches, datafile=datafile)\n+ #viewer = ContourViewer(times=times, branches=branches, datafile=datafile, datafiles=('data150.h5', 'data600.h5'))\n viewer.plot()\n \n if __name__ == '__main__':\n@@ -188,6 +206,6 @@ if __name__ == '__main__':\n # from profiler import calibrate_profiler\n # fudge = calibrate_profiler(10000)\n # profile = Profiler('profile', fudge=fudge)\n- plotCFL()\n+ plotContour()\n # profile.stop()\n ", + "path": "/home/wd15/git/extremefill/extremefill" + }, + { + "name": "fipy", + "module": "python", + "source": "/home/wd15/git/fipy", + "version": "8c51478a3e8c30618b3a96c132612a46735c7548", + "diff": "", + "path": "/home/wd15/git/fipy/fipy" + }, + { + "name": "gi", + "module": "python", + "source": "attribute", + "version": "3.4.0", + "diff": "", + "path": "/usr/lib/python2.7/dist-packages/gi" + }, + { + "name": "glib", + "module": "python", + "source": null, + "version": "unknown", + "diff": "", + "path": "/usr/lib/python2.7/dist-packages/glib" + }, + { + "name": "gobject", + "module": "python", + "source": null, + "version": "unknown", + "diff": "", + "path": "/usr/lib/python2.7/dist-packages/gobject" + }, + { + "name": "google", + "module": "python", + "source": null, + "version": "unknown", + "diff": "", + "path": "/usr/lib/python2.7/dist-packages/google" + }, + { + "name": "gtk", + "module": "python", + "source": null, + "version": "unknown", + "diff": "", + "path": "/usr/lib/python2.7/dist-packages/gtk-2.0/gtk" + }, + { + "name": "httplib2", + "module": "python", + "source": "attribute", + "version": "0.7.4", + "diff": "", + "path": "/usr/lib/python2.7/dist-packages/httplib2" + }, + { + "name": "lockfile", + "module": "python", + "source": "egg-info", + "version": "0.9.1", + "diff": "", + "path": "/home/wd15/.virtualenvs/default/lib/python2.7/site-packages/lockfile-0.9.1-py2.7.egg/lockfile" + }, + { + "name": "lxml", + "module": "python", + "source": null, + "version": "unknown", + "diff": "", + "path": "/usr/lib/python2.7/dist-packages/lxml" + }, + { + "name": "matplotlib", + "module": "python", + "source": "attribute", + "version": "1.1.1", + "diff": "", + "path": "/usr/lib/pymodules/python2.7/matplotlib" + }, + { + "name": "mayavi", + "module": "python", + "source": "attribute", + "version": "4.1.0", + "diff": "", + "path": "/usr/lib/python2.7/dist-packages/mayavi" + }, + { + "name": "mpi4py", + "module": "python", + "source": "attribute", + "version": "1.3", + "diff": "", + "path": "/usr/lib/python2.7/dist-packages/mpi4py" + }, + { + "name": "mpl_toolkits", + "module": "python", + "source": null, + "version": "unknown", + "diff": "", + "path": "/usr/lib/pymodules/python2.7/mpl_toolkits" + }, + { + "name": "mx", + "module": "python", + "source": "attribute", + "version": "3.2.1", + "diff": "", + "path": "/usr/lib/python2.7/dist-packages/mx" + }, + { + "name": "nose", + "module": "python", + "source": "attribute", + "version": "1.2.1", + "diff": "", + "path": "/home/wd15/.virtualenvs/fipy/lib/python2.7/site-packages/nose" + }, + { + "name": "numexpr", + "module": "python", + "source": "attribute", + "version": "2.0.1", + "diff": "", + "path": "/usr/lib/python2.7/dist-packages/numexpr" + }, + { + "name": "numpy", + "module": "python", + "source": "attribute", + "version": "1.6.2", + "diff": "", + "path": "/usr/lib/python2.7/dist-packages/numpy" + }, + { + "name": "pyamg", + "module": "python", + "source": "attribute", + "version": "2.0.4.dev", + "diff": "", + "path": "/home/wd15/.virtualenvs/fipy/lib/python2.7/site-packages/pyamg" + }, + { + "name": "pylsmlib", + "module": "python", + "source": "/home/wd15/git/LSMLIB", + "version": "6f5d969bb27530aa37452a8b096e538a5cf7b993", + "diff": "", + "path": "/home/wd15/git/LSMLIB/pylsmlib/pylsmlib" + }, + { + "name": "pysparse", + "module": "python", + "source": "attribute", + "version": "1.1", + "diff": "", + "path": "/usr/lib/python2.7/dist-packages/pysparse" + }, + { + "name": "pytz", + "module": "python", + "source": "attribute", + "version": "2011k", + "diff": "", + "path": "/usr/lib/python2.7/dist-packages/pytz" + }, + { + "name": "scipy", + "module": "python", + "source": "attribute", + "version": "0.10.1", + "diff": "", + "path": "/usr/lib/python2.7/dist-packages/scipy" + }, + { + "name": "setuptools", + "module": "python", + "source": "attribute", + "version": "0.6", + "diff": "", + "path": "/home/wd15/.virtualenvs/default/local/lib/python2.7/site-packages/distribute-0.6.24-py2.7.egg/setuptools" + }, + { + "name": "simplejson", + "module": "python", + "source": "attribute", + "version": "2.6.1", + "diff": "", + "path": "/usr/lib/python2.7/dist-packages/simplejson" + }, + { + "name": "skfmm", + "module": "python", + "source": "/home/wd15/git/scikit-fmm", + "version": "467e5982fbd9d4eb32495f826d6bda65da498e13", + "diff": "", + "path": "/home/wd15/git/scikit-fmm/skfmm" + }, + { + "name": "sumatra", + "module": "python", + "source": "attribute", + "version": "0.5.0dev", + "diff": "", + "path": "/home/wd15/.virtualenvs/default/lib/python2.7/site-packages/Sumatra-0.5.0dev-py2.7.egg/sumatra" + }, + { + "name": "tables", + "module": "python", + "source": "attribute", + "version": "2.3.1", + "diff": "", + "path": "/usr/lib/python2.7/dist-packages/tables" + }, + { + "name": "tagging", + "module": "python", + "source": "attribute", + "version": "0.3.1", + "diff": "", + "path": "/home/wd15/.virtualenvs/fipy/lib/python2.7/site-packages/tagging" + }, + { + "name": "tornado", + "module": "python", + "source": "attribute", + "version": "2.3", + "diff": "", + "path": "/usr/lib/python2.7/dist-packages/tornado" + }, + { + "name": "traits", + "module": "python", + "source": "attribute", + "version": "4.1.0", + "diff": "", + "path": "/usr/lib/python2.7/dist-packages/traits" + }, + { + "name": "tvtk", + "module": "python", + "source": null, + "version": "unknown", + "diff": "", + "path": "/usr/lib/python2.7/dist-packages/tvtk" + }, + { + "name": "vtk", + "module": "python", + "source": null, + "version": "unknown", + "diff": "", + "path": "/usr/lib/pymodules/python2.7/vtk" + }, + { + "name": "wx", + "module": "python", + "source": "attribute", + "version": "2.8.12.1", + "diff": "", + "path": "/usr/lib/python2.7/dist-packages/wx-2.8-gtk2-unicode/wx" + }, + { + "name": "yaml", + "module": "python", + "source": "attribute", + "version": "3.10", + "diff": "", + "path": "/usr/lib/python2.7/dist-packages/yaml" + }, + { + "name": "zmq", + "module": "python", + "source": "attribute", + "version": "2.2.0", + "diff": "", + "path": "/usr/lib/python2.7/dist-packages/zmq" + } + ], + "user": "Daniel Wheeler ", + "output_data": [ + { + "path": "data.h5", + "digest": "dacbb97305b895536a300e7ab443e8ed65f5b7e5", + "metadata": { + "mimetype": null, + "size": 102992, + "encoding": null + } + } + ], + "input_data": [], + "launch_mode": { + "type": "SerialLaunchMode", + "parameters": { + "working_directory": "/home/wd15/git/extremefill-data" + } + }, + "main_file": "script.py", + "outcome": "" +}, +{ + "script_arguments": "", + "platforms": [ + { + "system_name": "Linux", + "machine": "x86_64", + "version": "#35-Ubuntu SMP Thu Jan 24 13:15:40 UTC 2013", + "ip_addr": "127.0.0.1", + "architecture_bits": "64bit", + "architecture_linkage": "ELF", + "release": "3.5.0-23-generic", + "network_name": "loki", + "processor": "x86_64" + } + ], + "duration": 5.937668085098267, + "diff": "diff --git a/script.py b/script.py\nindex ec41d60..dd94f39 100644\n--- a/script.py\n+++ b/script.py\n@@ -30,16 +30,5 @@ def run(totalSteps=10,\n NxBase=1200)\n \n if __name__ == '__main__':\n-\n-\n- class Bare(object):\n- pass\n-\n- \n- args = Bare()\n- parser = argparse.ArgumentParser(description=\"Run Extremefill 2D example.\")\n- parser.add_argument('--totalSteps', default=1, type=int)\n- parser.parse_args(namespace=args)\n-\n- run(totalSteps=args.totalSteps, tags=('test',), reason=\"testing SMT class\")\n+ run(totalSteps=2, CFL=0.1)\n \ndiff --git a/smtdecorator.py b/smtdecorator.py\nindex 432a8b7..826170c 100644\n--- a/smtdecorator.py\n+++ b/smtdecorator.py\n@@ -1,4 +1,3 @@\n-\n \"\"\"\n Script to test setting up batch simaulations with Sumatra.\n \n@@ -22,8 +21,8 @@ On laptop use http://129.6.153.60:8000\n import time\n import os\n import sys\n-from contextlib import contextmanager\n from StringIO import StringIO\n+import argparse\n \n \n from sumatra.projects import load_project\n@@ -59,18 +58,21 @@ class SMTDecorator(object):\n def __init__(self, function):\n self.function = function\n \n- def __call__(self, tags=(), reason='', *args, **kwargs):\n+ def __call__(self, tag=[], reason='', *args, **kwargs):\n+\n+ parameters, tag, reason = self.parseargs(kwargs, list(tag), reason)\n+\n project = load_project()\n- record = project.new_record(parameters=SimpleParameterSet(kwargs),\n+ record = project.new_record(parameters=SimpleParameterSet(parameters),\n main_file=self.function.func_globals['__file__'],\n reason=reason)\n \n record.datastore.root = os.path.join(record.datastore.root, record.label)\n- for tag in tags:\n- record.tags.add(tag)\n \n- record.start_time = time.time()\n+ for t in tag:\n+ record.tags.add(t)\n \n+ record.start_time = time.time()\n with Redirect() as out:\n returnvalue = self.function(datadir=record.datastore.root, *args, **record.parameters.as_dict())\n \n@@ -84,5 +86,25 @@ class SMTDecorator(object):\n \n return returnvalue\n \n+ def parseargs(self, func_kwargs, tag, reason):\n+ class Bare:\n+ pass\n+ ext_kwargs = Bare()\n+ parser = argparse.ArgumentParser(description=\"SMT arguments\")\n+\n+ for k, v in func_kwargs.iteritems():\n+ parser.add_argument('--' + k, default=v, type=type(v), dest=k)\n+ \n+ parser.add_argument('--tag', action='append', default=tag, dest='tag')\n+ parser.add_argument('--reason', default=reason, dest='reason')\n+ parser.parse_args(namespace=ext_kwargs)\n \n+ tag = ext_kwargs.tag\n+ reason = ext_kwargs.reason\n \n+ for k, v in func_kwargs.iteritems():\n+ func_kwargs[k] = getattr(ext_kwargs, k)\n+ \n+ return func_kwargs, tag, reason\n+ \n+ ", + "datastore": { + "type": "FileSystemDataStore", + "parameters": { + "root": "./Data/26b97923ab28" + } + }, + "input_datastore": { + "type": "FileSystemDataStore", + "parameters": { + "root": "/" + } + }, + "executable": { + "path": "/home/wd15/.virtualenvs/default/bin/python", + "version": "2.7.3", + "name": "Python", + "options": "" + }, + "parameters": { + "content": "totalSteps = 2\nCFL = 0.3", + "type": "SimpleParameterSet" + }, + "label": "26b97923ab28", + "version": "03128c81e5ec503445a0a10166626c2e902ba41e", + "stdout_stderr": "[ 1. 1. 1. 1.]\n[ 0.34738209 0.61535499 0.01923836 0.00971058]\n[ 1.23729704e-01 2.14204081e-01 1.88311438e-04 1.55991524e-03]\n\ntheta 0.0\ncBar_supp 1.0\ncBar_cu 1.0\npotentialBar 1.0\nmin(extension) 7.22965473284e-08\nmin(depositionRate) 2.09114908795e-09\nmin(current) 56.8350759862\nmin(cupric) 997.266139623\nmin(baseCurrent) 56.9323002935\nmax(interfaceTheta) - 1: -0.973021297371\nmin(interfaceTheta) 0.0\nmin(I0) 38.9208518948\ndt 0.011\nelapsed time 0.0\nstep 0\n\n[ 1. 1. 1. 1.]\n[ 0.10765512 0.04576554 0.03330295 0.00523947]\n\ntheta 0.0\ncBar_supp 1.0\ncBar_cu 1.0\npotentialBar 1.0\nmin(extension) 2.09114554699e-09\nmin(depositionRate) 1.47837489306e-09\nmin(current) 40.1805638188\nmin(cupric) 996.200886814\nmin(baseCurrent) 40.2838895551\nmax(interfaceTheta) - 1: -0.947107282423\nmin(interfaceTheta) 0.0\nmin(I0) 37.8842912969\ndt 0.0121\nelapsed time 0.011\nstep 1\n\n", + "repository": { + "url": "/home/wd15/git/extremefill-data", + "type": "GitRepository", + "upstream": "git@github.com:wd15/extremefill-data.git" + }, + "tags": [ + "test", + "CFL" + ], + "timestamp": "2013-02-19 10:48:25", + "reason": "Testing a lot of jobs at once", + "dependencies": [ + { + "name": "Cython", + "module": "python", + "source": "attribute", + "version": "0.16", + "diff": "", + "path": "/usr/lib/python2.7/dist-packages/Cython" + }, + { + "name": "IPython", + "module": "python", + "source": "attribute", + "version": "0.13.1.rc2", + "diff": "", + "path": "/usr/lib/python2.7/dist-packages/IPython" + }, + { + "name": "PIL", + "module": "python", + "source": null, + "version": "unknown", + "diff": "", + "path": "/usr/lib/python2.7/dist-packages/PIL" + }, + { + "name": "PyQt4", + "module": "python", + "source": null, + "version": "unknown", + "diff": "", + "path": "/usr/lib/python2.7/dist-packages/PyQt4" + }, + { + "name": "PyTrilinos", + "module": "python", + "source": "attribute", + "version": "4.8d", + "diff": "", + "path": "/home/wd15/.virtualenvs/fipy/lib/python2.7/site-packages/PyTrilinos" + }, + { + "name": "dateutil", + "module": "python", + "source": "attribute", + "version": "1.5", + "diff": "", + "path": "/usr/lib/python2.7/dist-packages/dateutil" + }, + { + "name": "distutils", + "module": "python", + "source": "attribute", + "version": "2.7.3", + "diff": "", + "path": "/home/wd15/.virtualenvs/default/lib/python2.7/distutils" + }, + { + "name": "django", + "module": "python", + "source": "attribute", + "version": "1.4.1", + "diff": "", + "path": "/usr/lib/python2.7/dist-packages/django" + }, + { + "name": "docutils", + "module": "python", + "source": "attribute", + "version": "0.10", + "diff": "", + "path": "/home/wd15/.virtualenvs/fipy/lib/python2.7/site-packages/docutils" + }, + { + "name": "encodings", + "module": "python", + "source": null, + "version": "unknown", + "diff": "", + "path": "/home/wd15/.virtualenvs/default/lib/python2.7/encodings" + }, + { + "name": "extremefill", + "module": "python", + "source": "/home/wd15/git/extremefill", + "version": "549c969edb113d0b3e9804612bfa53e91319c0ea", + "diff": "diff --git a/data/viewer.py b/data/viewer.py\nindex 68f60e0..d9ab7c2 100644\n--- a/data/viewer.py\n+++ b/data/viewer.py\n@@ -122,7 +122,7 @@ class ContourViewer(BaseViewer):\n self.times = times\n self.contours = contours\n self.data = []\n- super(ContourViewer, self).__init__(branches=branches, datafile=datafiles, datafiles=datafiles)\n+ super(ContourViewer, self).__init__(branches=branches, datafile=datafile, datafiles=datafiles)\n \n def plot(self):\n import matplotlib.pyplot as plt\n@@ -152,6 +152,24 @@ class ContourViewer(BaseViewer):\n phi = np.reshape(phi, shape)\n self.data.append((x, y, phi))\n \n+def datafilesFromBranches(branches, datafile):\n+ cwd = os.getcwd()\n+ for count, branch in enumerate(branches):\n+ print 'branch',branch\n+ tempdir = gitCloneToTemp(branch=branch, repositoryPath='ssh://wd15@genie.nist.gov/users/wd15/git/extremefill')\n+ repopath = os.path.join(tempdir, 'extremefill')\n+ datapath = os.path.join(repopath, datafile)\n+ gitMediaSync()\n+ if count == 0:\n+ self.addBaseData(datapath)\n+ basetempdir = tempdir\n+ else:\n+ self.addData(datapath, branch)\n+ cleanTempRepo(tempdir) \n+\n+ cleanTempRepo(basetempdir)\n+ os.chdir(cwd)\n+\n def plotNx():\n branches = ('Nx600', 'Nx300', 'Nx150')\n datafile = os.path.join('data', 'data.h5')\n@@ -174,13 +192,13 @@ def plotCFL():\n \n def plotContour():\n # branches = ('CFL0.0125', 'CFL0.025', 'CFL0.05', 'CFL0.1', 'CFL0.2', 'CFL0.4', 'CFL0.8', 'CFL1.6')\n- branches = ('Nx600', 'Nx150')\n+ branches = ('Nx300', 'Nx150')\n # branches = ('CFL0.025', 'CFL0.05')\n datafile = os.path.join('data', 'data.h5')\n times = (0,)\n- # times = (0., 1000., 2000., 3000., 4000.)\n- # viewer = ContourViewer(times=times, branches=branches, datafile=datafile)\n- viewer = ContourViewer(times=times, branches=branches, datafile=datafile, datafiles=('data150.h5', 'data600.h5'))\n+ times = (0., 1000., 2000., 3000., 4000.)\n+ viewer = ContourViewer(times=times, branches=branches, datafile=datafile)\n+ #viewer = ContourViewer(times=times, branches=branches, datafile=datafile, datafiles=('data150.h5', 'data600.h5'))\n viewer.plot()\n \n if __name__ == '__main__':\n@@ -188,6 +206,6 @@ if __name__ == '__main__':\n # from profiler import calibrate_profiler\n # fudge = calibrate_profiler(10000)\n # profile = Profiler('profile', fudge=fudge)\n- plotCFL()\n+ plotContour()\n # profile.stop()\n ", + "path": "/home/wd15/git/extremefill/extremefill" + }, + { + "name": "fipy", + "module": "python", + "source": "/home/wd15/git/fipy", + "version": "8c51478a3e8c30618b3a96c132612a46735c7548", + "diff": "", + "path": "/home/wd15/git/fipy/fipy" + }, + { + "name": "gi", + "module": "python", + "source": "attribute", + "version": "3.4.0", + "diff": "", + "path": "/usr/lib/python2.7/dist-packages/gi" + }, + { + "name": "glib", + "module": "python", + "source": null, + "version": "unknown", + "diff": "", + "path": "/usr/lib/python2.7/dist-packages/glib" + }, + { + "name": "gobject", + "module": "python", + "source": null, + "version": "unknown", + "diff": "", + "path": "/usr/lib/python2.7/dist-packages/gobject" + }, + { + "name": "google", + "module": "python", + "source": null, + "version": "unknown", + "diff": "", + "path": "/usr/lib/python2.7/dist-packages/google" + }, + { + "name": "gtk", + "module": "python", + "source": null, + "version": "unknown", + "diff": "", + "path": "/usr/lib/python2.7/dist-packages/gtk-2.0/gtk" + }, + { + "name": "httplib2", + "module": "python", + "source": "attribute", + "version": "0.7.4", + "diff": "", + "path": "/usr/lib/python2.7/dist-packages/httplib2" + }, + { + "name": "lockfile", + "module": "python", + "source": "egg-info", + "version": "0.9.1", + "diff": "", + "path": "/home/wd15/.virtualenvs/default/lib/python2.7/site-packages/lockfile-0.9.1-py2.7.egg/lockfile" + }, + { + "name": "lxml", + "module": "python", + "source": null, + "version": "unknown", + "diff": "", + "path": "/usr/lib/python2.7/dist-packages/lxml" + }, + { + "name": "matplotlib", + "module": "python", + "source": "attribute", + "version": "1.1.1", + "diff": "", + "path": "/usr/lib/pymodules/python2.7/matplotlib" + }, + { + "name": "mayavi", + "module": "python", + "source": "attribute", + "version": "4.1.0", + "diff": "", + "path": "/usr/lib/python2.7/dist-packages/mayavi" + }, + { + "name": "mpi4py", + "module": "python", + "source": "attribute", + "version": "1.3", + "diff": "", + "path": "/usr/lib/python2.7/dist-packages/mpi4py" + }, + { + "name": "mpl_toolkits", + "module": "python", + "source": null, + "version": "unknown", + "diff": "", + "path": "/usr/lib/pymodules/python2.7/mpl_toolkits" + }, + { + "name": "mx", + "module": "python", + "source": "attribute", + "version": "3.2.1", + "diff": "", + "path": "/usr/lib/python2.7/dist-packages/mx" + }, + { + "name": "nose", + "module": "python", + "source": "attribute", + "version": "1.2.1", + "diff": "", + "path": "/home/wd15/.virtualenvs/fipy/lib/python2.7/site-packages/nose" + }, + { + "name": "numexpr", + "module": "python", + "source": "attribute", + "version": "2.0.1", + "diff": "", + "path": "/usr/lib/python2.7/dist-packages/numexpr" + }, + { + "name": "numpy", + "module": "python", + "source": "attribute", + "version": "1.6.2", + "diff": "", + "path": "/usr/lib/python2.7/dist-packages/numpy" + }, + { + "name": "pyamg", + "module": "python", + "source": "attribute", + "version": "2.0.4.dev", + "diff": "", + "path": "/home/wd15/.virtualenvs/fipy/lib/python2.7/site-packages/pyamg" + }, + { + "name": "pylsmlib", + "module": "python", + "source": "/home/wd15/git/LSMLIB", + "version": "6f5d969bb27530aa37452a8b096e538a5cf7b993", + "diff": "", + "path": "/home/wd15/git/LSMLIB/pylsmlib/pylsmlib" + }, + { + "name": "pysparse", + "module": "python", + "source": "attribute", + "version": "1.1", + "diff": "", + "path": "/usr/lib/python2.7/dist-packages/pysparse" + }, + { + "name": "pytz", + "module": "python", + "source": "attribute", + "version": "2011k", + "diff": "", + "path": "/usr/lib/python2.7/dist-packages/pytz" + }, + { + "name": "scipy", + "module": "python", + "source": "attribute", + "version": "0.10.1", + "diff": "", + "path": "/usr/lib/python2.7/dist-packages/scipy" + }, + { + "name": "setuptools", + "module": "python", + "source": "attribute", + "version": "0.6", + "diff": "", + "path": "/home/wd15/.virtualenvs/default/local/lib/python2.7/site-packages/distribute-0.6.24-py2.7.egg/setuptools" + }, + { + "name": "simplejson", + "module": "python", + "source": "attribute", + "version": "2.6.1", + "diff": "", + "path": "/usr/lib/python2.7/dist-packages/simplejson" + }, + { + "name": "skfmm", + "module": "python", + "source": "/home/wd15/git/scikit-fmm", + "version": "467e5982fbd9d4eb32495f826d6bda65da498e13", + "diff": "", + "path": "/home/wd15/git/scikit-fmm/skfmm" + }, + { + "name": "sumatra", + "module": "python", + "source": "attribute", + "version": "0.5.0dev", + "diff": "", + "path": "/home/wd15/.virtualenvs/default/lib/python2.7/site-packages/Sumatra-0.5.0dev-py2.7.egg/sumatra" + }, + { + "name": "tables", + "module": "python", + "source": "attribute", + "version": "2.3.1", + "diff": "", + "path": "/usr/lib/python2.7/dist-packages/tables" + }, + { + "name": "tagging", + "module": "python", + "source": "attribute", + "version": "0.3.1", + "diff": "", + "path": "/home/wd15/.virtualenvs/fipy/lib/python2.7/site-packages/tagging" + }, + { + "name": "tornado", + "module": "python", + "source": "attribute", + "version": "2.3", + "diff": "", + "path": "/usr/lib/python2.7/dist-packages/tornado" + }, + { + "name": "traits", + "module": "python", + "source": "attribute", + "version": "4.1.0", + "diff": "", + "path": "/usr/lib/python2.7/dist-packages/traits" + }, + { + "name": "tvtk", + "module": "python", + "source": null, + "version": "unknown", + "diff": "", + "path": "/usr/lib/python2.7/dist-packages/tvtk" + }, + { + "name": "vtk", + "module": "python", + "source": null, + "version": "unknown", + "diff": "", + "path": "/usr/lib/pymodules/python2.7/vtk" + }, + { + "name": "wx", + "module": "python", + "source": "attribute", + "version": "2.8.12.1", + "diff": "", + "path": "/usr/lib/python2.7/dist-packages/wx-2.8-gtk2-unicode/wx" + }, + { + "name": "yaml", + "module": "python", + "source": "attribute", + "version": "3.10", + "diff": "", + "path": "/usr/lib/python2.7/dist-packages/yaml" + }, + { + "name": "zmq", + "module": "python", + "source": "attribute", + "version": "2.2.0", + "diff": "", + "path": "/usr/lib/python2.7/dist-packages/zmq" + } + ], + "user": "Daniel Wheeler ", + "output_data": [ + { + "path": "data.h5", + "digest": "a135712aa21a2a2778d9c7d828cd7ec36dcfa2fe", + "metadata": { + "mimetype": null, + "size": 102992, + "encoding": null + } + } + ], + "input_data": [], + "launch_mode": { + "type": "SerialLaunchMode", + "parameters": { + "working_directory": "/home/wd15/git/extremefill-data" + } + }, + "main_file": "script.py", + "outcome": "" +}, +{ + "script_arguments": "", + "platforms": [ + { + "system_name": "Linux", + "machine": "x86_64", + "version": "#35-Ubuntu SMP Thu Jan 24 13:15:40 UTC 2013", + "ip_addr": "127.0.0.1", + "architecture_bits": "64bit", + "architecture_linkage": "ELF", + "release": "3.5.0-23-generic", + "network_name": "loki", + "processor": "x86_64" + } + ], + "duration": 6.238173961639404, + "diff": "diff --git a/script.py b/script.py\nindex ec41d60..dd94f39 100644\n--- a/script.py\n+++ b/script.py\n@@ -30,16 +30,5 @@ def run(totalSteps=10,\n NxBase=1200)\n \n if __name__ == '__main__':\n-\n-\n- class Bare(object):\n- pass\n-\n- \n- args = Bare()\n- parser = argparse.ArgumentParser(description=\"Run Extremefill 2D example.\")\n- parser.add_argument('--totalSteps', default=1, type=int)\n- parser.parse_args(namespace=args)\n-\n- run(totalSteps=args.totalSteps, tags=('test',), reason=\"testing SMT class\")\n+ run(totalSteps=2, CFL=0.1)\n \ndiff --git a/smtdecorator.py b/smtdecorator.py\nindex 432a8b7..826170c 100644\n--- a/smtdecorator.py\n+++ b/smtdecorator.py\n@@ -1,4 +1,3 @@\n-\n \"\"\"\n Script to test setting up batch simaulations with Sumatra.\n \n@@ -22,8 +21,8 @@ On laptop use http://129.6.153.60:8000\n import time\n import os\n import sys\n-from contextlib import contextmanager\n from StringIO import StringIO\n+import argparse\n \n \n from sumatra.projects import load_project\n@@ -59,18 +58,21 @@ class SMTDecorator(object):\n def __init__(self, function):\n self.function = function\n \n- def __call__(self, tags=(), reason='', *args, **kwargs):\n+ def __call__(self, tag=[], reason='', *args, **kwargs):\n+\n+ parameters, tag, reason = self.parseargs(kwargs, list(tag), reason)\n+\n project = load_project()\n- record = project.new_record(parameters=SimpleParameterSet(kwargs),\n+ record = project.new_record(parameters=SimpleParameterSet(parameters),\n main_file=self.function.func_globals['__file__'],\n reason=reason)\n \n record.datastore.root = os.path.join(record.datastore.root, record.label)\n- for tag in tags:\n- record.tags.add(tag)\n \n- record.start_time = time.time()\n+ for t in tag:\n+ record.tags.add(t)\n \n+ record.start_time = time.time()\n with Redirect() as out:\n returnvalue = self.function(datadir=record.datastore.root, *args, **record.parameters.as_dict())\n \n@@ -84,5 +86,25 @@ class SMTDecorator(object):\n \n return returnvalue\n \n+ def parseargs(self, func_kwargs, tag, reason):\n+ class Bare:\n+ pass\n+ ext_kwargs = Bare()\n+ parser = argparse.ArgumentParser(description=\"SMT arguments\")\n+\n+ for k, v in func_kwargs.iteritems():\n+ parser.add_argument('--' + k, default=v, type=type(v), dest=k)\n+ \n+ parser.add_argument('--tag', action='append', default=tag, dest='tag')\n+ parser.add_argument('--reason', default=reason, dest='reason')\n+ parser.parse_args(namespace=ext_kwargs)\n \n+ tag = ext_kwargs.tag\n+ reason = ext_kwargs.reason\n \n+ for k, v in func_kwargs.iteritems():\n+ func_kwargs[k] = getattr(ext_kwargs, k)\n+ \n+ return func_kwargs, tag, reason\n+ \n+ ", + "datastore": { + "type": "FileSystemDataStore", + "parameters": { + "root": "./Data/e1d2ce4c1d53" + } + }, + "input_datastore": { + "type": "FileSystemDataStore", + "parameters": { + "root": "/" + } + }, + "executable": { + "path": "/home/wd15/.virtualenvs/default/bin/python", + "version": "2.7.3", + "name": "Python", + "options": "" + }, + "parameters": { + "content": "totalSteps = 2\nCFL = 0.2", + "type": "SimpleParameterSet" + }, + "label": "e1d2ce4c1d53", + "version": "03128c81e5ec503445a0a10166626c2e902ba41e", + "stdout_stderr": "[ 1. 1. 1. 1.]\n[ 0.34738209 0.61535499 0.01923836 0.00971058]\n[ 1.23729704e-01 2.14204081e-01 1.88311438e-04 1.55991524e-03]\n\ntheta 0.0\ncBar_supp 1.0\ncBar_cu 1.0\npotentialBar 1.0\nmin(extension) 7.22965473284e-08\nmin(depositionRate) 2.09114908795e-09\nmin(current) 56.8350759862\nmin(cupric) 997.266139623\nmin(baseCurrent) 56.9323002935\nmax(interfaceTheta) - 1: -0.973021297371\nmin(interfaceTheta) 0.0\nmin(I0) 38.9208518948\ndt 0.011\nelapsed time 0.0\nstep 0\n\n[ 1. 1. 1. 1.]\n[ 0.10765512 0.04576554 0.03330295 0.00523947]\n\ntheta 0.0\ncBar_supp 1.0\ncBar_cu 1.0\npotentialBar 1.0\nmin(extension) 2.09114554699e-09\nmin(depositionRate) 1.47837489306e-09\nmin(current) 40.1805638188\nmin(cupric) 996.200886814\nmin(baseCurrent) 40.2838895551\nmax(interfaceTheta) - 1: -0.947107282423\nmin(interfaceTheta) 0.0\nmin(I0) 37.8842912969\ndt 0.0121\nelapsed time 0.011\nstep 1\n\n", + "repository": { + "url": "/home/wd15/git/extremefill-data", + "type": "GitRepository", + "upstream": "git@github.com:wd15/extremefill-data.git" + }, + "tags": [ + "test", + "CFL" + ], + "timestamp": "2013-02-19 10:48:25", + "reason": "Testing a lot of jobs at once", + "dependencies": [ + { + "name": "Cython", + "module": "python", + "source": "attribute", + "version": "0.16", + "diff": "", + "path": "/usr/lib/python2.7/dist-packages/Cython" + }, + { + "name": "IPython", + "module": "python", + "source": "attribute", + "version": "0.13.1.rc2", + "diff": "", + "path": "/usr/lib/python2.7/dist-packages/IPython" + }, + { + "name": "PIL", + "module": "python", + "source": null, + "version": "unknown", + "diff": "", + "path": "/usr/lib/python2.7/dist-packages/PIL" + }, + { + "name": "PyQt4", + "module": "python", + "source": null, + "version": "unknown", + "diff": "", + "path": "/usr/lib/python2.7/dist-packages/PyQt4" + }, + { + "name": "PyTrilinos", + "module": "python", + "source": "attribute", + "version": "4.8d", + "diff": "", + "path": "/home/wd15/.virtualenvs/fipy/lib/python2.7/site-packages/PyTrilinos" + }, + { + "name": "dateutil", + "module": "python", + "source": "attribute", + "version": "1.5", + "diff": "", + "path": "/usr/lib/python2.7/dist-packages/dateutil" + }, + { + "name": "distutils", + "module": "python", + "source": "attribute", + "version": "2.7.3", + "diff": "", + "path": "/home/wd15/.virtualenvs/default/lib/python2.7/distutils" + }, + { + "name": "django", + "module": "python", + "source": "attribute", + "version": "1.4.1", + "diff": "", + "path": "/usr/lib/python2.7/dist-packages/django" + }, + { + "name": "docutils", + "module": "python", + "source": "attribute", + "version": "0.10", + "diff": "", + "path": "/home/wd15/.virtualenvs/fipy/lib/python2.7/site-packages/docutils" + }, + { + "name": "encodings", + "module": "python", + "source": null, + "version": "unknown", + "diff": "", + "path": "/home/wd15/.virtualenvs/default/lib/python2.7/encodings" + }, + { + "name": "extremefill", + "module": "python", + "source": "/home/wd15/git/extremefill", + "version": "549c969edb113d0b3e9804612bfa53e91319c0ea", + "diff": "diff --git a/data/viewer.py b/data/viewer.py\nindex 68f60e0..d9ab7c2 100644\n--- a/data/viewer.py\n+++ b/data/viewer.py\n@@ -122,7 +122,7 @@ class ContourViewer(BaseViewer):\n self.times = times\n self.contours = contours\n self.data = []\n- super(ContourViewer, self).__init__(branches=branches, datafile=datafiles, datafiles=datafiles)\n+ super(ContourViewer, self).__init__(branches=branches, datafile=datafile, datafiles=datafiles)\n \n def plot(self):\n import matplotlib.pyplot as plt\n@@ -152,6 +152,24 @@ class ContourViewer(BaseViewer):\n phi = np.reshape(phi, shape)\n self.data.append((x, y, phi))\n \n+def datafilesFromBranches(branches, datafile):\n+ cwd = os.getcwd()\n+ for count, branch in enumerate(branches):\n+ print 'branch',branch\n+ tempdir = gitCloneToTemp(branch=branch, repositoryPath='ssh://wd15@genie.nist.gov/users/wd15/git/extremefill')\n+ repopath = os.path.join(tempdir, 'extremefill')\n+ datapath = os.path.join(repopath, datafile)\n+ gitMediaSync()\n+ if count == 0:\n+ self.addBaseData(datapath)\n+ basetempdir = tempdir\n+ else:\n+ self.addData(datapath, branch)\n+ cleanTempRepo(tempdir) \n+\n+ cleanTempRepo(basetempdir)\n+ os.chdir(cwd)\n+\n def plotNx():\n branches = ('Nx600', 'Nx300', 'Nx150')\n datafile = os.path.join('data', 'data.h5')\n@@ -174,13 +192,13 @@ def plotCFL():\n \n def plotContour():\n # branches = ('CFL0.0125', 'CFL0.025', 'CFL0.05', 'CFL0.1', 'CFL0.2', 'CFL0.4', 'CFL0.8', 'CFL1.6')\n- branches = ('Nx600', 'Nx150')\n+ branches = ('Nx300', 'Nx150')\n # branches = ('CFL0.025', 'CFL0.05')\n datafile = os.path.join('data', 'data.h5')\n times = (0,)\n- # times = (0., 1000., 2000., 3000., 4000.)\n- # viewer = ContourViewer(times=times, branches=branches, datafile=datafile)\n- viewer = ContourViewer(times=times, branches=branches, datafile=datafile, datafiles=('data150.h5', 'data600.h5'))\n+ times = (0., 1000., 2000., 3000., 4000.)\n+ viewer = ContourViewer(times=times, branches=branches, datafile=datafile)\n+ #viewer = ContourViewer(times=times, branches=branches, datafile=datafile, datafiles=('data150.h5', 'data600.h5'))\n viewer.plot()\n \n if __name__ == '__main__':\n@@ -188,6 +206,6 @@ if __name__ == '__main__':\n # from profiler import calibrate_profiler\n # fudge = calibrate_profiler(10000)\n # profile = Profiler('profile', fudge=fudge)\n- plotCFL()\n+ plotContour()\n # profile.stop()\n ", + "path": "/home/wd15/git/extremefill/extremefill" + }, + { + "name": "fipy", + "module": "python", + "source": "/home/wd15/git/fipy", + "version": "8c51478a3e8c30618b3a96c132612a46735c7548", + "diff": "", + "path": "/home/wd15/git/fipy/fipy" + }, + { + "name": "gi", + "module": "python", + "source": "attribute", + "version": "3.4.0", + "diff": "", + "path": "/usr/lib/python2.7/dist-packages/gi" + }, + { + "name": "glib", + "module": "python", + "source": null, + "version": "unknown", + "diff": "", + "path": "/usr/lib/python2.7/dist-packages/glib" + }, + { + "name": "gobject", + "module": "python", + "source": null, + "version": "unknown", + "diff": "", + "path": "/usr/lib/python2.7/dist-packages/gobject" + }, + { + "name": "google", + "module": "python", + "source": null, + "version": "unknown", + "diff": "", + "path": "/usr/lib/python2.7/dist-packages/google" + }, + { + "name": "gtk", + "module": "python", + "source": null, + "version": "unknown", + "diff": "", + "path": "/usr/lib/python2.7/dist-packages/gtk-2.0/gtk" + }, + { + "name": "httplib2", + "module": "python", + "source": "attribute", + "version": "0.7.4", + "diff": "", + "path": "/usr/lib/python2.7/dist-packages/httplib2" + }, + { + "name": "lockfile", + "module": "python", + "source": "egg-info", + "version": "0.9.1", + "diff": "", + "path": "/home/wd15/.virtualenvs/default/lib/python2.7/site-packages/lockfile-0.9.1-py2.7.egg/lockfile" + }, + { + "name": "lxml", + "module": "python", + "source": null, + "version": "unknown", + "diff": "", + "path": "/usr/lib/python2.7/dist-packages/lxml" + }, + { + "name": "matplotlib", + "module": "python", + "source": "attribute", + "version": "1.1.1", + "diff": "", + "path": "/usr/lib/pymodules/python2.7/matplotlib" + }, + { + "name": "mayavi", + "module": "python", + "source": "attribute", + "version": "4.1.0", + "diff": "", + "path": "/usr/lib/python2.7/dist-packages/mayavi" + }, + { + "name": "mpi4py", + "module": "python", + "source": "attribute", + "version": "1.3", + "diff": "", + "path": "/usr/lib/python2.7/dist-packages/mpi4py" + }, + { + "name": "mpl_toolkits", + "module": "python", + "source": null, + "version": "unknown", + "diff": "", + "path": "/usr/lib/pymodules/python2.7/mpl_toolkits" + }, + { + "name": "mx", + "module": "python", + "source": "attribute", + "version": "3.2.1", + "diff": "", + "path": "/usr/lib/python2.7/dist-packages/mx" + }, + { + "name": "nose", + "module": "python", + "source": "attribute", + "version": "1.2.1", + "diff": "", + "path": "/home/wd15/.virtualenvs/fipy/lib/python2.7/site-packages/nose" + }, + { + "name": "numexpr", + "module": "python", + "source": "attribute", + "version": "2.0.1", + "diff": "", + "path": "/usr/lib/python2.7/dist-packages/numexpr" + }, + { + "name": "numpy", + "module": "python", + "source": "attribute", + "version": "1.6.2", + "diff": "", + "path": "/usr/lib/python2.7/dist-packages/numpy" + }, + { + "name": "pyamg", + "module": "python", + "source": "attribute", + "version": "2.0.4.dev", + "diff": "", + "path": "/home/wd15/.virtualenvs/fipy/lib/python2.7/site-packages/pyamg" + }, + { + "name": "pylsmlib", + "module": "python", + "source": "/home/wd15/git/LSMLIB", + "version": "6f5d969bb27530aa37452a8b096e538a5cf7b993", + "diff": "", + "path": "/home/wd15/git/LSMLIB/pylsmlib/pylsmlib" + }, + { + "name": "pysparse", + "module": "python", + "source": "attribute", + "version": "1.1", + "diff": "", + "path": "/usr/lib/python2.7/dist-packages/pysparse" + }, + { + "name": "pytz", + "module": "python", + "source": "attribute", + "version": "2011k", + "diff": "", + "path": "/usr/lib/python2.7/dist-packages/pytz" + }, + { + "name": "scipy", + "module": "python", + "source": "attribute", + "version": "0.10.1", + "diff": "", + "path": "/usr/lib/python2.7/dist-packages/scipy" + }, + { + "name": "setuptools", + "module": "python", + "source": "attribute", + "version": "0.6", + "diff": "", + "path": "/home/wd15/.virtualenvs/default/local/lib/python2.7/site-packages/distribute-0.6.24-py2.7.egg/setuptools" + }, + { + "name": "simplejson", + "module": "python", + "source": "attribute", + "version": "2.6.1", + "diff": "", + "path": "/usr/lib/python2.7/dist-packages/simplejson" + }, + { + "name": "skfmm", + "module": "python", + "source": "/home/wd15/git/scikit-fmm", + "version": "467e5982fbd9d4eb32495f826d6bda65da498e13", + "diff": "", + "path": "/home/wd15/git/scikit-fmm/skfmm" + }, + { + "name": "sumatra", + "module": "python", + "source": "attribute", + "version": "0.5.0dev", + "diff": "", + "path": "/home/wd15/.virtualenvs/default/lib/python2.7/site-packages/Sumatra-0.5.0dev-py2.7.egg/sumatra" + }, + { + "name": "tables", + "module": "python", + "source": "attribute", + "version": "2.3.1", + "diff": "", + "path": "/usr/lib/python2.7/dist-packages/tables" + }, + { + "name": "tagging", + "module": "python", + "source": "attribute", + "version": "0.3.1", + "diff": "", + "path": "/home/wd15/.virtualenvs/fipy/lib/python2.7/site-packages/tagging" + }, + { + "name": "tornado", + "module": "python", + "source": "attribute", + "version": "2.3", + "diff": "", + "path": "/usr/lib/python2.7/dist-packages/tornado" + }, + { + "name": "traits", + "module": "python", + "source": "attribute", + "version": "4.1.0", + "diff": "", + "path": "/usr/lib/python2.7/dist-packages/traits" + }, + { + "name": "tvtk", + "module": "python", + "source": null, + "version": "unknown", + "diff": "", + "path": "/usr/lib/python2.7/dist-packages/tvtk" + }, + { + "name": "vtk", + "module": "python", + "source": null, + "version": "unknown", + "diff": "", + "path": "/usr/lib/pymodules/python2.7/vtk" + }, + { + "name": "wx", + "module": "python", + "source": "attribute", + "version": "2.8.12.1", + "diff": "", + "path": "/usr/lib/python2.7/dist-packages/wx-2.8-gtk2-unicode/wx" + }, + { + "name": "yaml", + "module": "python", + "source": "attribute", + "version": "3.10", + "diff": "", + "path": "/usr/lib/python2.7/dist-packages/yaml" + }, + { + "name": "zmq", + "module": "python", + "source": "attribute", + "version": "2.2.0", + "diff": "", + "path": "/usr/lib/python2.7/dist-packages/zmq" + } + ], + "user": "Daniel Wheeler ", + "output_data": [ + { + "path": "data.h5", + "digest": "a135712aa21a2a2778d9c7d828cd7ec36dcfa2fe", + "metadata": { + "mimetype": null, + "size": 102992, + "encoding": null + } + } + ], + "input_data": [], + "launch_mode": { + "type": "SerialLaunchMode", + "parameters": { + "working_directory": "/home/wd15/git/extremefill-data" + } + }, + "main_file": "script.py", + "outcome": "" +}, +{ + "script_arguments": "", + "platforms": [ + { + "system_name": "Linux", + "machine": "x86_64", + "version": "#35-Ubuntu SMP Thu Jan 24 13:15:40 UTC 2013", + "ip_addr": "127.0.0.1", + "architecture_bits": "64bit", + "architecture_linkage": "ELF", + "release": "3.5.0-23-generic", + "network_name": "loki", + "processor": "x86_64" + } + ], + "duration": 6.236216068267822, + "diff": "diff --git a/script.py b/script.py\nindex ec41d60..dd94f39 100644\n--- a/script.py\n+++ b/script.py\n@@ -30,16 +30,5 @@ def run(totalSteps=10,\n NxBase=1200)\n \n if __name__ == '__main__':\n-\n-\n- class Bare(object):\n- pass\n-\n- \n- args = Bare()\n- parser = argparse.ArgumentParser(description=\"Run Extremefill 2D example.\")\n- parser.add_argument('--totalSteps', default=1, type=int)\n- parser.parse_args(namespace=args)\n-\n- run(totalSteps=args.totalSteps, tags=('test',), reason=\"testing SMT class\")\n+ run(totalSteps=2, CFL=0.1)\n \ndiff --git a/smtdecorator.py b/smtdecorator.py\nindex 432a8b7..826170c 100644\n--- a/smtdecorator.py\n+++ b/smtdecorator.py\n@@ -1,4 +1,3 @@\n-\n \"\"\"\n Script to test setting up batch simaulations with Sumatra.\n \n@@ -22,8 +21,8 @@ On laptop use http://129.6.153.60:8000\n import time\n import os\n import sys\n-from contextlib import contextmanager\n from StringIO import StringIO\n+import argparse\n \n \n from sumatra.projects import load_project\n@@ -59,18 +58,21 @@ class SMTDecorator(object):\n def __init__(self, function):\n self.function = function\n \n- def __call__(self, tags=(), reason='', *args, **kwargs):\n+ def __call__(self, tag=[], reason='', *args, **kwargs):\n+\n+ parameters, tag, reason = self.parseargs(kwargs, list(tag), reason)\n+\n project = load_project()\n- record = project.new_record(parameters=SimpleParameterSet(kwargs),\n+ record = project.new_record(parameters=SimpleParameterSet(parameters),\n main_file=self.function.func_globals['__file__'],\n reason=reason)\n \n record.datastore.root = os.path.join(record.datastore.root, record.label)\n- for tag in tags:\n- record.tags.add(tag)\n \n- record.start_time = time.time()\n+ for t in tag:\n+ record.tags.add(t)\n \n+ record.start_time = time.time()\n with Redirect() as out:\n returnvalue = self.function(datadir=record.datastore.root, *args, **record.parameters.as_dict())\n \n@@ -84,5 +86,25 @@ class SMTDecorator(object):\n \n return returnvalue\n \n+ def parseargs(self, func_kwargs, tag, reason):\n+ class Bare:\n+ pass\n+ ext_kwargs = Bare()\n+ parser = argparse.ArgumentParser(description=\"SMT arguments\")\n+\n+ for k, v in func_kwargs.iteritems():\n+ parser.add_argument('--' + k, default=v, type=type(v), dest=k)\n+ \n+ parser.add_argument('--tag', action='append', default=tag, dest='tag')\n+ parser.add_argument('--reason', default=reason, dest='reason')\n+ parser.parse_args(namespace=ext_kwargs)\n \n+ tag = ext_kwargs.tag\n+ reason = ext_kwargs.reason\n \n+ for k, v in func_kwargs.iteritems():\n+ func_kwargs[k] = getattr(ext_kwargs, k)\n+ \n+ return func_kwargs, tag, reason\n+ \n+ ", + "datastore": { + "type": "FileSystemDataStore", + "parameters": { + "root": "./Data/7838a9de4144" + } + }, + "input_datastore": { + "type": "FileSystemDataStore", + "parameters": { + "root": "/" + } + }, + "executable": { + "path": "/home/wd15/.virtualenvs/default/bin/python", + "version": "2.7.3", + "name": "Python", + "options": "" + }, + "parameters": { + "content": "totalSteps = 2\nCFL = 0.34", + "type": "SimpleParameterSet" + }, + "label": "7838a9de4144", + "version": "03128c81e5ec503445a0a10166626c2e902ba41e", + "stdout_stderr": "[ 1. 1. 1. 1.]\n[ 0.34738209 0.61535499 0.01923836 0.00971058]\n[ 1.23729704e-01 2.14204081e-01 1.88311438e-04 1.55991524e-03]\n\ntheta 0.0\ncBar_supp 1.0\ncBar_cu 1.0\npotentialBar 1.0\nmin(extension) 7.22965473284e-08\nmin(depositionRate) 2.09114908795e-09\nmin(current) 56.8350759862\nmin(cupric) 997.266139623\nmin(baseCurrent) 56.9323002935\nmax(interfaceTheta) - 1: -0.973021297371\nmin(interfaceTheta) 0.0\nmin(I0) 38.9208518948\ndt 0.011\nelapsed time 0.0\nstep 0\n\n[ 1. 1. 1. 1.]\n[ 0.10765512 0.04576554 0.03330295 0.00523947]\n\ntheta 0.0\ncBar_supp 1.0\ncBar_cu 1.0\npotentialBar 1.0\nmin(extension) 2.09114554699e-09\nmin(depositionRate) 1.47837489306e-09\nmin(current) 40.1805638188\nmin(cupric) 996.200886814\nmin(baseCurrent) 40.2838895551\nmax(interfaceTheta) - 1: -0.947107282423\nmin(interfaceTheta) 0.0\nmin(I0) 37.8842912969\ndt 0.0121\nelapsed time 0.011\nstep 1\n\n", + "repository": { + "url": "/home/wd15/git/extremefill-data", + "type": "GitRepository", + "upstream": "git@github.com:wd15/extremefill-data.git" + }, + "tags": [ + "test", + "CFL" + ], + "timestamp": "2013-02-19 10:48:25", + "reason": "Testing a lot of jobs at once", + "dependencies": [ + { + "name": "Cython", + "module": "python", + "source": "attribute", + "version": "0.16", + "diff": "", + "path": "/usr/lib/python2.7/dist-packages/Cython" + }, + { + "name": "IPython", + "module": "python", + "source": "attribute", + "version": "0.13.1.rc2", + "diff": "", + "path": "/usr/lib/python2.7/dist-packages/IPython" + }, + { + "name": "PIL", + "module": "python", + "source": null, + "version": "unknown", + "diff": "", + "path": "/usr/lib/python2.7/dist-packages/PIL" + }, + { + "name": "PyQt4", + "module": "python", + "source": null, + "version": "unknown", + "diff": "", + "path": "/usr/lib/python2.7/dist-packages/PyQt4" + }, + { + "name": "PyTrilinos", + "module": "python", + "source": "attribute", + "version": "4.8d", + "diff": "", + "path": "/home/wd15/.virtualenvs/fipy/lib/python2.7/site-packages/PyTrilinos" + }, + { + "name": "dateutil", + "module": "python", + "source": "attribute", + "version": "1.5", + "diff": "", + "path": "/usr/lib/python2.7/dist-packages/dateutil" + }, + { + "name": "distutils", + "module": "python", + "source": "attribute", + "version": "2.7.3", + "diff": "", + "path": "/home/wd15/.virtualenvs/default/lib/python2.7/distutils" + }, + { + "name": "django", + "module": "python", + "source": "attribute", + "version": "1.4.1", + "diff": "", + "path": "/usr/lib/python2.7/dist-packages/django" + }, + { + "name": "docutils", + "module": "python", + "source": "attribute", + "version": "0.10", + "diff": "", + "path": "/home/wd15/.virtualenvs/fipy/lib/python2.7/site-packages/docutils" + }, + { + "name": "encodings", + "module": "python", + "source": null, + "version": "unknown", + "diff": "", + "path": "/home/wd15/.virtualenvs/default/lib/python2.7/encodings" + }, + { + "name": "extremefill", + "module": "python", + "source": "/home/wd15/git/extremefill", + "version": "549c969edb113d0b3e9804612bfa53e91319c0ea", + "diff": "diff --git a/data/viewer.py b/data/viewer.py\nindex 68f60e0..d9ab7c2 100644\n--- a/data/viewer.py\n+++ b/data/viewer.py\n@@ -122,7 +122,7 @@ class ContourViewer(BaseViewer):\n self.times = times\n self.contours = contours\n self.data = []\n- super(ContourViewer, self).__init__(branches=branches, datafile=datafiles, datafiles=datafiles)\n+ super(ContourViewer, self).__init__(branches=branches, datafile=datafile, datafiles=datafiles)\n \n def plot(self):\n import matplotlib.pyplot as plt\n@@ -152,6 +152,24 @@ class ContourViewer(BaseViewer):\n phi = np.reshape(phi, shape)\n self.data.append((x, y, phi))\n \n+def datafilesFromBranches(branches, datafile):\n+ cwd = os.getcwd()\n+ for count, branch in enumerate(branches):\n+ print 'branch',branch\n+ tempdir = gitCloneToTemp(branch=branch, repositoryPath='ssh://wd15@genie.nist.gov/users/wd15/git/extremefill')\n+ repopath = os.path.join(tempdir, 'extremefill')\n+ datapath = os.path.join(repopath, datafile)\n+ gitMediaSync()\n+ if count == 0:\n+ self.addBaseData(datapath)\n+ basetempdir = tempdir\n+ else:\n+ self.addData(datapath, branch)\n+ cleanTempRepo(tempdir) \n+\n+ cleanTempRepo(basetempdir)\n+ os.chdir(cwd)\n+\n def plotNx():\n branches = ('Nx600', 'Nx300', 'Nx150')\n datafile = os.path.join('data', 'data.h5')\n@@ -174,13 +192,13 @@ def plotCFL():\n \n def plotContour():\n # branches = ('CFL0.0125', 'CFL0.025', 'CFL0.05', 'CFL0.1', 'CFL0.2', 'CFL0.4', 'CFL0.8', 'CFL1.6')\n- branches = ('Nx600', 'Nx150')\n+ branches = ('Nx300', 'Nx150')\n # branches = ('CFL0.025', 'CFL0.05')\n datafile = os.path.join('data', 'data.h5')\n times = (0,)\n- # times = (0., 1000., 2000., 3000., 4000.)\n- # viewer = ContourViewer(times=times, branches=branches, datafile=datafile)\n- viewer = ContourViewer(times=times, branches=branches, datafile=datafile, datafiles=('data150.h5', 'data600.h5'))\n+ times = (0., 1000., 2000., 3000., 4000.)\n+ viewer = ContourViewer(times=times, branches=branches, datafile=datafile)\n+ #viewer = ContourViewer(times=times, branches=branches, datafile=datafile, datafiles=('data150.h5', 'data600.h5'))\n viewer.plot()\n \n if __name__ == '__main__':\n@@ -188,6 +206,6 @@ if __name__ == '__main__':\n # from profiler import calibrate_profiler\n # fudge = calibrate_profiler(10000)\n # profile = Profiler('profile', fudge=fudge)\n- plotCFL()\n+ plotContour()\n # profile.stop()\n ", + "path": "/home/wd15/git/extremefill/extremefill" + }, + { + "name": "fipy", + "module": "python", + "source": "/home/wd15/git/fipy", + "version": "8c51478a3e8c30618b3a96c132612a46735c7548", + "diff": "", + "path": "/home/wd15/git/fipy/fipy" + }, + { + "name": "gi", + "module": "python", + "source": "attribute", + "version": "3.4.0", + "diff": "", + "path": "/usr/lib/python2.7/dist-packages/gi" + }, + { + "name": "glib", + "module": "python", + "source": null, + "version": "unknown", + "diff": "", + "path": "/usr/lib/python2.7/dist-packages/glib" + }, + { + "name": "gobject", + "module": "python", + "source": null, + "version": "unknown", + "diff": "", + "path": "/usr/lib/python2.7/dist-packages/gobject" + }, + { + "name": "google", + "module": "python", + "source": null, + "version": "unknown", + "diff": "", + "path": "/usr/lib/python2.7/dist-packages/google" + }, + { + "name": "gtk", + "module": "python", + "source": null, + "version": "unknown", + "diff": "", + "path": "/usr/lib/python2.7/dist-packages/gtk-2.0/gtk" + }, + { + "name": "httplib2", + "module": "python", + "source": "attribute", + "version": "0.7.4", + "diff": "", + "path": "/usr/lib/python2.7/dist-packages/httplib2" + }, + { + "name": "lockfile", + "module": "python", + "source": "egg-info", + "version": "0.9.1", + "diff": "", + "path": "/home/wd15/.virtualenvs/default/lib/python2.7/site-packages/lockfile-0.9.1-py2.7.egg/lockfile" + }, + { + "name": "lxml", + "module": "python", + "source": null, + "version": "unknown", + "diff": "", + "path": "/usr/lib/python2.7/dist-packages/lxml" + }, + { + "name": "matplotlib", + "module": "python", + "source": "attribute", + "version": "1.1.1", + "diff": "", + "path": "/usr/lib/pymodules/python2.7/matplotlib" + }, + { + "name": "mayavi", + "module": "python", + "source": "attribute", + "version": "4.1.0", + "diff": "", + "path": "/usr/lib/python2.7/dist-packages/mayavi" + }, + { + "name": "mpi4py", + "module": "python", + "source": "attribute", + "version": "1.3", + "diff": "", + "path": "/usr/lib/python2.7/dist-packages/mpi4py" + }, + { + "name": "mpl_toolkits", + "module": "python", + "source": null, + "version": "unknown", + "diff": "", + "path": "/usr/lib/pymodules/python2.7/mpl_toolkits" + }, + { + "name": "mx", + "module": "python", + "source": "attribute", + "version": "3.2.1", + "diff": "", + "path": "/usr/lib/python2.7/dist-packages/mx" + }, + { + "name": "nose", + "module": "python", + "source": "attribute", + "version": "1.2.1", + "diff": "", + "path": "/home/wd15/.virtualenvs/fipy/lib/python2.7/site-packages/nose" + }, + { + "name": "numexpr", + "module": "python", + "source": "attribute", + "version": "2.0.1", + "diff": "", + "path": "/usr/lib/python2.7/dist-packages/numexpr" + }, + { + "name": "numpy", + "module": "python", + "source": "attribute", + "version": "1.6.2", + "diff": "", + "path": "/usr/lib/python2.7/dist-packages/numpy" + }, + { + "name": "pyamg", + "module": "python", + "source": "attribute", + "version": "2.0.4.dev", + "diff": "", + "path": "/home/wd15/.virtualenvs/fipy/lib/python2.7/site-packages/pyamg" + }, + { + "name": "pylsmlib", + "module": "python", + "source": "/home/wd15/git/LSMLIB", + "version": "6f5d969bb27530aa37452a8b096e538a5cf7b993", + "diff": "", + "path": "/home/wd15/git/LSMLIB/pylsmlib/pylsmlib" + }, + { + "name": "pysparse", + "module": "python", + "source": "attribute", + "version": "1.1", + "diff": "", + "path": "/usr/lib/python2.7/dist-packages/pysparse" + }, + { + "name": "pytz", + "module": "python", + "source": "attribute", + "version": "2011k", + "diff": "", + "path": "/usr/lib/python2.7/dist-packages/pytz" + }, + { + "name": "scipy", + "module": "python", + "source": "attribute", + "version": "0.10.1", + "diff": "", + "path": "/usr/lib/python2.7/dist-packages/scipy" + }, + { + "name": "setuptools", + "module": "python", + "source": "attribute", + "version": "0.6", + "diff": "", + "path": "/home/wd15/.virtualenvs/default/local/lib/python2.7/site-packages/distribute-0.6.24-py2.7.egg/setuptools" + }, + { + "name": "simplejson", + "module": "python", + "source": "attribute", + "version": "2.6.1", + "diff": "", + "path": "/usr/lib/python2.7/dist-packages/simplejson" + }, + { + "name": "skfmm", + "module": "python", + "source": "/home/wd15/git/scikit-fmm", + "version": "467e5982fbd9d4eb32495f826d6bda65da498e13", + "diff": "", + "path": "/home/wd15/git/scikit-fmm/skfmm" + }, + { + "name": "sumatra", + "module": "python", + "source": "attribute", + "version": "0.5.0dev", + "diff": "", + "path": "/home/wd15/.virtualenvs/default/lib/python2.7/site-packages/Sumatra-0.5.0dev-py2.7.egg/sumatra" + }, + { + "name": "tables", + "module": "python", + "source": "attribute", + "version": "2.3.1", + "diff": "", + "path": "/usr/lib/python2.7/dist-packages/tables" + }, + { + "name": "tagging", + "module": "python", + "source": "attribute", + "version": "0.3.1", + "diff": "", + "path": "/home/wd15/.virtualenvs/fipy/lib/python2.7/site-packages/tagging" + }, + { + "name": "tornado", + "module": "python", + "source": "attribute", + "version": "2.3", + "diff": "", + "path": "/usr/lib/python2.7/dist-packages/tornado" + }, + { + "name": "traits", + "module": "python", + "source": "attribute", + "version": "4.1.0", + "diff": "", + "path": "/usr/lib/python2.7/dist-packages/traits" + }, + { + "name": "tvtk", + "module": "python", + "source": null, + "version": "unknown", + "diff": "", + "path": "/usr/lib/python2.7/dist-packages/tvtk" + }, + { + "name": "vtk", + "module": "python", + "source": null, + "version": "unknown", + "diff": "", + "path": "/usr/lib/pymodules/python2.7/vtk" + }, + { + "name": "wx", + "module": "python", + "source": "attribute", + "version": "2.8.12.1", + "diff": "", + "path": "/usr/lib/python2.7/dist-packages/wx-2.8-gtk2-unicode/wx" + }, + { + "name": "yaml", + "module": "python", + "source": "attribute", + "version": "3.10", + "diff": "", + "path": "/usr/lib/python2.7/dist-packages/yaml" + }, + { + "name": "zmq", + "module": "python", + "source": "attribute", + "version": "2.2.0", + "diff": "", + "path": "/usr/lib/python2.7/dist-packages/zmq" + } + ], + "user": "Daniel Wheeler ", + "output_data": [ + { + "path": "data.h5", + "digest": "a135712aa21a2a2778d9c7d828cd7ec36dcfa2fe", + "metadata": { + "mimetype": null, + "size": 102992, + "encoding": null + } + } + ], + "input_data": [], + "launch_mode": { + "type": "SerialLaunchMode", + "parameters": { + "working_directory": "/home/wd15/git/extremefill-data" + } + }, + "main_file": "script.py", + "outcome": "" +}, +{ + "script_arguments": "", + "platforms": [ + { + "system_name": "Linux", + "machine": "x86_64", + "version": "#35-Ubuntu SMP Thu Jan 24 13:15:40 UTC 2013", + "ip_addr": "127.0.0.1", + "architecture_bits": "64bit", + "architecture_linkage": "ELF", + "release": "3.5.0-23-generic", + "network_name": "loki", + "processor": "x86_64" + } + ], + "duration": 6.459535121917725, + "diff": "diff --git a/script.py b/script.py\nindex ec41d60..dd94f39 100644\n--- a/script.py\n+++ b/script.py\n@@ -30,16 +30,5 @@ def run(totalSteps=10,\n NxBase=1200)\n \n if __name__ == '__main__':\n-\n-\n- class Bare(object):\n- pass\n-\n- \n- args = Bare()\n- parser = argparse.ArgumentParser(description=\"Run Extremefill 2D example.\")\n- parser.add_argument('--totalSteps', default=1, type=int)\n- parser.parse_args(namespace=args)\n-\n- run(totalSteps=args.totalSteps, tags=('test',), reason=\"testing SMT class\")\n+ run(totalSteps=2, CFL=0.1)\n \ndiff --git a/smtdecorator.py b/smtdecorator.py\nindex 432a8b7..826170c 100644\n--- a/smtdecorator.py\n+++ b/smtdecorator.py\n@@ -1,4 +1,3 @@\n-\n \"\"\"\n Script to test setting up batch simaulations with Sumatra.\n \n@@ -22,8 +21,8 @@ On laptop use http://129.6.153.60:8000\n import time\n import os\n import sys\n-from contextlib import contextmanager\n from StringIO import StringIO\n+import argparse\n \n \n from sumatra.projects import load_project\n@@ -59,18 +58,21 @@ class SMTDecorator(object):\n def __init__(self, function):\n self.function = function\n \n- def __call__(self, tags=(), reason='', *args, **kwargs):\n+ def __call__(self, tag=[], reason='', *args, **kwargs):\n+\n+ parameters, tag, reason = self.parseargs(kwargs, list(tag), reason)\n+\n project = load_project()\n- record = project.new_record(parameters=SimpleParameterSet(kwargs),\n+ record = project.new_record(parameters=SimpleParameterSet(parameters),\n main_file=self.function.func_globals['__file__'],\n reason=reason)\n \n record.datastore.root = os.path.join(record.datastore.root, record.label)\n- for tag in tags:\n- record.tags.add(tag)\n \n- record.start_time = time.time()\n+ for t in tag:\n+ record.tags.add(t)\n \n+ record.start_time = time.time()\n with Redirect() as out:\n returnvalue = self.function(datadir=record.datastore.root, *args, **record.parameters.as_dict())\n \n@@ -84,5 +86,25 @@ class SMTDecorator(object):\n \n return returnvalue\n \n+ def parseargs(self, func_kwargs, tag, reason):\n+ class Bare:\n+ pass\n+ ext_kwargs = Bare()\n+ parser = argparse.ArgumentParser(description=\"SMT arguments\")\n+\n+ for k, v in func_kwargs.iteritems():\n+ parser.add_argument('--' + k, default=v, type=type(v), dest=k)\n+ \n+ parser.add_argument('--tag', action='append', default=tag, dest='tag')\n+ parser.add_argument('--reason', default=reason, dest='reason')\n+ parser.parse_args(namespace=ext_kwargs)\n \n+ tag = ext_kwargs.tag\n+ reason = ext_kwargs.reason\n \n+ for k, v in func_kwargs.iteritems():\n+ func_kwargs[k] = getattr(ext_kwargs, k)\n+ \n+ return func_kwargs, tag, reason\n+ \n+ ", + "datastore": { + "type": "FileSystemDataStore", + "parameters": { + "root": "./Data/a9c53bd332b9" + } + }, + "input_datastore": { + "type": "FileSystemDataStore", + "parameters": { + "root": "/" + } + }, + "executable": { + "path": "/home/wd15/.virtualenvs/default/bin/python", + "version": "2.7.3", + "name": "Python", + "options": "" + }, + "parameters": { + "content": "totalSteps = 2\nCFL = 0.36", + "type": "SimpleParameterSet" + }, + "label": "a9c53bd332b9", + "version": "03128c81e5ec503445a0a10166626c2e902ba41e", + "stdout_stderr": "[ 1. 1. 1. 1.]\n[ 0.34738209 0.61535499 0.01923836 0.00971058]\n[ 1.23729704e-01 2.14204081e-01 1.88311438e-04 1.55991524e-03]\n\ntheta 0.0\ncBar_supp 1.0\ncBar_cu 1.0\npotentialBar 1.0\nmin(extension) 7.22965473284e-08\nmin(depositionRate) 2.09114908795e-09\nmin(current) 56.8350759862\nmin(cupric) 997.266139623\nmin(baseCurrent) 56.9323002935\nmax(interfaceTheta) - 1: -0.973021297371\nmin(interfaceTheta) 0.0\nmin(I0) 38.9208518948\ndt 0.011\nelapsed time 0.0\nstep 0\n\n[ 1. 1. 1. 1.]\n[ 0.10765512 0.04576554 0.03330295 0.00523947]\n\ntheta 0.0\ncBar_supp 1.0\ncBar_cu 1.0\npotentialBar 1.0\nmin(extension) 2.09114554699e-09\nmin(depositionRate) 1.47837489306e-09\nmin(current) 40.1805638188\nmin(cupric) 996.200886814\nmin(baseCurrent) 40.2838895551\nmax(interfaceTheta) - 1: -0.947107282423\nmin(interfaceTheta) 0.0\nmin(I0) 37.8842912969\ndt 0.0121\nelapsed time 0.011\nstep 1\n\n", + "repository": { + "url": "/home/wd15/git/extremefill-data", + "type": "GitRepository", + "upstream": "git@github.com:wd15/extremefill-data.git" + }, + "tags": [ + "test", + "CFL" + ], + "timestamp": "2013-02-19 10:48:25", + "reason": "Testing a lot of jobs at once", + "dependencies": [ + { + "name": "Cython", + "module": "python", + "source": "attribute", + "version": "0.16", + "diff": "", + "path": "/usr/lib/python2.7/dist-packages/Cython" + }, + { + "name": "IPython", + "module": "python", + "source": "attribute", + "version": "0.13.1.rc2", + "diff": "", + "path": "/usr/lib/python2.7/dist-packages/IPython" + }, + { + "name": "PIL", + "module": "python", + "source": null, + "version": "unknown", + "diff": "", + "path": "/usr/lib/python2.7/dist-packages/PIL" + }, + { + "name": "PyQt4", + "module": "python", + "source": null, + "version": "unknown", + "diff": "", + "path": "/usr/lib/python2.7/dist-packages/PyQt4" + }, + { + "name": "PyTrilinos", + "module": "python", + "source": "attribute", + "version": "4.8d", + "diff": "", + "path": "/home/wd15/.virtualenvs/fipy/lib/python2.7/site-packages/PyTrilinos" + }, + { + "name": "dateutil", + "module": "python", + "source": "attribute", + "version": "1.5", + "diff": "", + "path": "/usr/lib/python2.7/dist-packages/dateutil" + }, + { + "name": "distutils", + "module": "python", + "source": "attribute", + "version": "2.7.3", + "diff": "", + "path": "/home/wd15/.virtualenvs/default/lib/python2.7/distutils" + }, + { + "name": "django", + "module": "python", + "source": "attribute", + "version": "1.4.1", + "diff": "", + "path": "/usr/lib/python2.7/dist-packages/django" + }, + { + "name": "docutils", + "module": "python", + "source": "attribute", + "version": "0.10", + "diff": "", + "path": "/home/wd15/.virtualenvs/fipy/lib/python2.7/site-packages/docutils" + }, + { + "name": "encodings", + "module": "python", + "source": null, + "version": "unknown", + "diff": "", + "path": "/home/wd15/.virtualenvs/default/lib/python2.7/encodings" + }, + { + "name": "extremefill", + "module": "python", + "source": "/home/wd15/git/extremefill", + "version": "549c969edb113d0b3e9804612bfa53e91319c0ea", + "diff": "diff --git a/data/viewer.py b/data/viewer.py\nindex 68f60e0..d9ab7c2 100644\n--- a/data/viewer.py\n+++ b/data/viewer.py\n@@ -122,7 +122,7 @@ class ContourViewer(BaseViewer):\n self.times = times\n self.contours = contours\n self.data = []\n- super(ContourViewer, self).__init__(branches=branches, datafile=datafiles, datafiles=datafiles)\n+ super(ContourViewer, self).__init__(branches=branches, datafile=datafile, datafiles=datafiles)\n \n def plot(self):\n import matplotlib.pyplot as plt\n@@ -152,6 +152,24 @@ class ContourViewer(BaseViewer):\n phi = np.reshape(phi, shape)\n self.data.append((x, y, phi))\n \n+def datafilesFromBranches(branches, datafile):\n+ cwd = os.getcwd()\n+ for count, branch in enumerate(branches):\n+ print 'branch',branch\n+ tempdir = gitCloneToTemp(branch=branch, repositoryPath='ssh://wd15@genie.nist.gov/users/wd15/git/extremefill')\n+ repopath = os.path.join(tempdir, 'extremefill')\n+ datapath = os.path.join(repopath, datafile)\n+ gitMediaSync()\n+ if count == 0:\n+ self.addBaseData(datapath)\n+ basetempdir = tempdir\n+ else:\n+ self.addData(datapath, branch)\n+ cleanTempRepo(tempdir) \n+\n+ cleanTempRepo(basetempdir)\n+ os.chdir(cwd)\n+\n def plotNx():\n branches = ('Nx600', 'Nx300', 'Nx150')\n datafile = os.path.join('data', 'data.h5')\n@@ -174,13 +192,13 @@ def plotCFL():\n \n def plotContour():\n # branches = ('CFL0.0125', 'CFL0.025', 'CFL0.05', 'CFL0.1', 'CFL0.2', 'CFL0.4', 'CFL0.8', 'CFL1.6')\n- branches = ('Nx600', 'Nx150')\n+ branches = ('Nx300', 'Nx150')\n # branches = ('CFL0.025', 'CFL0.05')\n datafile = os.path.join('data', 'data.h5')\n times = (0,)\n- # times = (0., 1000., 2000., 3000., 4000.)\n- # viewer = ContourViewer(times=times, branches=branches, datafile=datafile)\n- viewer = ContourViewer(times=times, branches=branches, datafile=datafile, datafiles=('data150.h5', 'data600.h5'))\n+ times = (0., 1000., 2000., 3000., 4000.)\n+ viewer = ContourViewer(times=times, branches=branches, datafile=datafile)\n+ #viewer = ContourViewer(times=times, branches=branches, datafile=datafile, datafiles=('data150.h5', 'data600.h5'))\n viewer.plot()\n \n if __name__ == '__main__':\n@@ -188,6 +206,6 @@ if __name__ == '__main__':\n # from profiler import calibrate_profiler\n # fudge = calibrate_profiler(10000)\n # profile = Profiler('profile', fudge=fudge)\n- plotCFL()\n+ plotContour()\n # profile.stop()\n ", + "path": "/home/wd15/git/extremefill/extremefill" + }, + { + "name": "fipy", + "module": "python", + "source": "/home/wd15/git/fipy", + "version": "8c51478a3e8c30618b3a96c132612a46735c7548", + "diff": "", + "path": "/home/wd15/git/fipy/fipy" + }, + { + "name": "gi", + "module": "python", + "source": "attribute", + "version": "3.4.0", + "diff": "", + "path": "/usr/lib/python2.7/dist-packages/gi" + }, + { + "name": "glib", + "module": "python", + "source": null, + "version": "unknown", + "diff": "", + "path": "/usr/lib/python2.7/dist-packages/glib" + }, + { + "name": "gobject", + "module": "python", + "source": null, + "version": "unknown", + "diff": "", + "path": "/usr/lib/python2.7/dist-packages/gobject" + }, + { + "name": "google", + "module": "python", + "source": null, + "version": "unknown", + "diff": "", + "path": "/usr/lib/python2.7/dist-packages/google" + }, + { + "name": "gtk", + "module": "python", + "source": null, + "version": "unknown", + "diff": "", + "path": "/usr/lib/python2.7/dist-packages/gtk-2.0/gtk" + }, + { + "name": "httplib2", + "module": "python", + "source": "attribute", + "version": "0.7.4", + "diff": "", + "path": "/usr/lib/python2.7/dist-packages/httplib2" + }, + { + "name": "lockfile", + "module": "python", + "source": "egg-info", + "version": "0.9.1", + "diff": "", + "path": "/home/wd15/.virtualenvs/default/lib/python2.7/site-packages/lockfile-0.9.1-py2.7.egg/lockfile" + }, + { + "name": "lxml", + "module": "python", + "source": null, + "version": "unknown", + "diff": "", + "path": "/usr/lib/python2.7/dist-packages/lxml" + }, + { + "name": "matplotlib", + "module": "python", + "source": "attribute", + "version": "1.1.1", + "diff": "", + "path": "/usr/lib/pymodules/python2.7/matplotlib" + }, + { + "name": "mayavi", + "module": "python", + "source": "attribute", + "version": "4.1.0", + "diff": "", + "path": "/usr/lib/python2.7/dist-packages/mayavi" + }, + { + "name": "mpi4py", + "module": "python", + "source": "attribute", + "version": "1.3", + "diff": "", + "path": "/usr/lib/python2.7/dist-packages/mpi4py" + }, + { + "name": "mpl_toolkits", + "module": "python", + "source": null, + "version": "unknown", + "diff": "", + "path": "/usr/lib/pymodules/python2.7/mpl_toolkits" + }, + { + "name": "mx", + "module": "python", + "source": "attribute", + "version": "3.2.1", + "diff": "", + "path": "/usr/lib/python2.7/dist-packages/mx" + }, + { + "name": "nose", + "module": "python", + "source": "attribute", + "version": "1.2.1", + "diff": "", + "path": "/home/wd15/.virtualenvs/fipy/lib/python2.7/site-packages/nose" + }, + { + "name": "numexpr", + "module": "python", + "source": "attribute", + "version": "2.0.1", + "diff": "", + "path": "/usr/lib/python2.7/dist-packages/numexpr" + }, + { + "name": "numpy", + "module": "python", + "source": "attribute", + "version": "1.6.2", + "diff": "", + "path": "/usr/lib/python2.7/dist-packages/numpy" + }, + { + "name": "pyamg", + "module": "python", + "source": "attribute", + "version": "2.0.4.dev", + "diff": "", + "path": "/home/wd15/.virtualenvs/fipy/lib/python2.7/site-packages/pyamg" + }, + { + "name": "pylsmlib", + "module": "python", + "source": "/home/wd15/git/LSMLIB", + "version": "6f5d969bb27530aa37452a8b096e538a5cf7b993", + "diff": "", + "path": "/home/wd15/git/LSMLIB/pylsmlib/pylsmlib" + }, + { + "name": "pysparse", + "module": "python", + "source": "attribute", + "version": "1.1", + "diff": "", + "path": "/usr/lib/python2.7/dist-packages/pysparse" + }, + { + "name": "pytz", + "module": "python", + "source": "attribute", + "version": "2011k", + "diff": "", + "path": "/usr/lib/python2.7/dist-packages/pytz" + }, + { + "name": "scipy", + "module": "python", + "source": "attribute", + "version": "0.10.1", + "diff": "", + "path": "/usr/lib/python2.7/dist-packages/scipy" + }, + { + "name": "setuptools", + "module": "python", + "source": "attribute", + "version": "0.6", + "diff": "", + "path": "/home/wd15/.virtualenvs/default/local/lib/python2.7/site-packages/distribute-0.6.24-py2.7.egg/setuptools" + }, + { + "name": "simplejson", + "module": "python", + "source": "attribute", + "version": "2.6.1", + "diff": "", + "path": "/usr/lib/python2.7/dist-packages/simplejson" + }, + { + "name": "skfmm", + "module": "python", + "source": "/home/wd15/git/scikit-fmm", + "version": "467e5982fbd9d4eb32495f826d6bda65da498e13", + "diff": "", + "path": "/home/wd15/git/scikit-fmm/skfmm" + }, + { + "name": "sumatra", + "module": "python", + "source": "attribute", + "version": "0.5.0dev", + "diff": "", + "path": "/home/wd15/.virtualenvs/default/lib/python2.7/site-packages/Sumatra-0.5.0dev-py2.7.egg/sumatra" + }, + { + "name": "tables", + "module": "python", + "source": "attribute", + "version": "2.3.1", + "diff": "", + "path": "/usr/lib/python2.7/dist-packages/tables" + }, + { + "name": "tagging", + "module": "python", + "source": "attribute", + "version": "0.3.1", + "diff": "", + "path": "/home/wd15/.virtualenvs/fipy/lib/python2.7/site-packages/tagging" + }, + { + "name": "tornado", + "module": "python", + "source": "attribute", + "version": "2.3", + "diff": "", + "path": "/usr/lib/python2.7/dist-packages/tornado" + }, + { + "name": "traits", + "module": "python", + "source": "attribute", + "version": "4.1.0", + "diff": "", + "path": "/usr/lib/python2.7/dist-packages/traits" + }, + { + "name": "tvtk", + "module": "python", + "source": null, + "version": "unknown", + "diff": "", + "path": "/usr/lib/python2.7/dist-packages/tvtk" + }, + { + "name": "vtk", + "module": "python", + "source": null, + "version": "unknown", + "diff": "", + "path": "/usr/lib/pymodules/python2.7/vtk" + }, + { + "name": "wx", + "module": "python", + "source": "attribute", + "version": "2.8.12.1", + "diff": "", + "path": "/usr/lib/python2.7/dist-packages/wx-2.8-gtk2-unicode/wx" + }, + { + "name": "yaml", + "module": "python", + "source": "attribute", + "version": "3.10", + "diff": "", + "path": "/usr/lib/python2.7/dist-packages/yaml" + }, + { + "name": "zmq", + "module": "python", + "source": "attribute", + "version": "2.2.0", + "diff": "", + "path": "/usr/lib/python2.7/dist-packages/zmq" + } + ], + "user": "Daniel Wheeler ", + "output_data": [ + { + "path": "data.h5", + "digest": "a135712aa21a2a2778d9c7d828cd7ec36dcfa2fe", + "metadata": { + "mimetype": null, + "size": 102992, + "encoding": null + } + } + ], + "input_data": [], + "launch_mode": { + "type": "SerialLaunchMode", + "parameters": { + "working_directory": "/home/wd15/git/extremefill-data" + } + }, + "main_file": "script.py", + "outcome": "" +}, +{ + "script_arguments": "", + "platforms": [ + { + "system_name": "Linux", + "machine": "x86_64", + "version": "#35-Ubuntu SMP Thu Jan 24 13:15:40 UTC 2013", + "ip_addr": "127.0.0.1", + "architecture_bits": "64bit", + "architecture_linkage": "ELF", + "release": "3.5.0-23-generic", + "network_name": "loki", + "processor": "x86_64" + } + ], + "duration": 6.08132791519165, + "diff": "diff --git a/script.py b/script.py\nindex ec41d60..dd94f39 100644\n--- a/script.py\n+++ b/script.py\n@@ -30,16 +30,5 @@ def run(totalSteps=10,\n NxBase=1200)\n \n if __name__ == '__main__':\n-\n-\n- class Bare(object):\n- pass\n-\n- \n- args = Bare()\n- parser = argparse.ArgumentParser(description=\"Run Extremefill 2D example.\")\n- parser.add_argument('--totalSteps', default=1, type=int)\n- parser.parse_args(namespace=args)\n-\n- run(totalSteps=args.totalSteps, tags=('test',), reason=\"testing SMT class\")\n+ run(totalSteps=2, CFL=0.1)\n \ndiff --git a/smtdecorator.py b/smtdecorator.py\nindex 432a8b7..826170c 100644\n--- a/smtdecorator.py\n+++ b/smtdecorator.py\n@@ -1,4 +1,3 @@\n-\n \"\"\"\n Script to test setting up batch simaulations with Sumatra.\n \n@@ -22,8 +21,8 @@ On laptop use http://129.6.153.60:8000\n import time\n import os\n import sys\n-from contextlib import contextmanager\n from StringIO import StringIO\n+import argparse\n \n \n from sumatra.projects import load_project\n@@ -59,18 +58,21 @@ class SMTDecorator(object):\n def __init__(self, function):\n self.function = function\n \n- def __call__(self, tags=(), reason='', *args, **kwargs):\n+ def __call__(self, tag=[], reason='', *args, **kwargs):\n+\n+ parameters, tag, reason = self.parseargs(kwargs, list(tag), reason)\n+\n project = load_project()\n- record = project.new_record(parameters=SimpleParameterSet(kwargs),\n+ record = project.new_record(parameters=SimpleParameterSet(parameters),\n main_file=self.function.func_globals['__file__'],\n reason=reason)\n \n record.datastore.root = os.path.join(record.datastore.root, record.label)\n- for tag in tags:\n- record.tags.add(tag)\n \n- record.start_time = time.time()\n+ for t in tag:\n+ record.tags.add(t)\n \n+ record.start_time = time.time()\n with Redirect() as out:\n returnvalue = self.function(datadir=record.datastore.root, *args, **record.parameters.as_dict())\n \n@@ -84,5 +86,25 @@ class SMTDecorator(object):\n \n return returnvalue\n \n+ def parseargs(self, func_kwargs, tag, reason):\n+ class Bare:\n+ pass\n+ ext_kwargs = Bare()\n+ parser = argparse.ArgumentParser(description=\"SMT arguments\")\n+\n+ for k, v in func_kwargs.iteritems():\n+ parser.add_argument('--' + k, default=v, type=type(v), dest=k)\n+ \n+ parser.add_argument('--tag', action='append', default=tag, dest='tag')\n+ parser.add_argument('--reason', default=reason, dest='reason')\n+ parser.parse_args(namespace=ext_kwargs)\n \n+ tag = ext_kwargs.tag\n+ reason = ext_kwargs.reason\n \n+ for k, v in func_kwargs.iteritems():\n+ func_kwargs[k] = getattr(ext_kwargs, k)\n+ \n+ return func_kwargs, tag, reason\n+ \n+ ", + "datastore": { + "type": "FileSystemDataStore", + "parameters": { + "root": "./Data/55041c7faa87" + } + }, + "input_datastore": { + "type": "FileSystemDataStore", + "parameters": { + "root": "/" + } + }, + "executable": { + "path": "/home/wd15/.virtualenvs/default/bin/python", + "version": "2.7.3", + "name": "Python", + "options": "" + }, + "parameters": { + "content": "totalSteps = 2\nCFL = 0.1", + "type": "SimpleParameterSet" + }, + "label": "55041c7faa87", + "version": "03128c81e5ec503445a0a10166626c2e902ba41e", + "stdout_stderr": "[ 1. 1. 1. 1.]\n[ 0.34738209 0.61535499 0.01923836 0.00971058]\n[ 1.23729704e-01 2.14204081e-01 1.88311438e-04 1.55991524e-03]\n\ntheta 0.0\ncBar_supp 1.0\ncBar_cu 1.0\npotentialBar 1.0\nmin(extension) 7.22965473284e-08\nmin(depositionRate) 2.09114908795e-09\nmin(current) 56.8350759862\nmin(cupric) 997.266139623\nmin(baseCurrent) 56.9323002935\nmax(interfaceTheta) - 1: -0.973021297371\nmin(interfaceTheta) 0.0\nmin(I0) 38.9208518948\ndt 0.011\nelapsed time 0.0\nstep 0\n\n[ 1. 1. 1. 1.]\n[ 0.10765512 0.04576554 0.03330295 0.00523947]\n\ntheta 0.0\ncBar_supp 1.0\ncBar_cu 1.0\npotentialBar 1.0\nmin(extension) 2.09114554699e-09\nmin(depositionRate) 1.47837489306e-09\nmin(current) 40.1805638188\nmin(cupric) 996.200886814\nmin(baseCurrent) 40.2838895551\nmax(interfaceTheta) - 1: -0.947107282423\nmin(interfaceTheta) 0.0\nmin(I0) 37.8842912969\ndt 0.0121\nelapsed time 0.011\nstep 1\n\n", + "repository": { + "url": "/home/wd15/git/extremefill-data", + "type": "GitRepository", + "upstream": "git@github.com:wd15/extremefill-data.git" + }, + "tags": [ + "test", + "CFL" + ], + "timestamp": "2013-02-19 10:48:25", + "reason": "Testing a lot of jobs at once", + "dependencies": [ + { + "name": "Cython", + "module": "python", + "source": "attribute", + "version": "0.16", + "diff": "", + "path": "/usr/lib/python2.7/dist-packages/Cython" + }, + { + "name": "IPython", + "module": "python", + "source": "attribute", + "version": "0.13.1.rc2", + "diff": "", + "path": "/usr/lib/python2.7/dist-packages/IPython" + }, + { + "name": "PIL", + "module": "python", + "source": null, + "version": "unknown", + "diff": "", + "path": "/usr/lib/python2.7/dist-packages/PIL" + }, + { + "name": "PyQt4", + "module": "python", + "source": null, + "version": "unknown", + "diff": "", + "path": "/usr/lib/python2.7/dist-packages/PyQt4" + }, + { + "name": "PyTrilinos", + "module": "python", + "source": "attribute", + "version": "4.8d", + "diff": "", + "path": "/home/wd15/.virtualenvs/fipy/lib/python2.7/site-packages/PyTrilinos" + }, + { + "name": "dateutil", + "module": "python", + "source": "attribute", + "version": "1.5", + "diff": "", + "path": "/usr/lib/python2.7/dist-packages/dateutil" + }, + { + "name": "distutils", + "module": "python", + "source": "attribute", + "version": "2.7.3", + "diff": "", + "path": "/home/wd15/.virtualenvs/default/lib/python2.7/distutils" + }, + { + "name": "django", + "module": "python", + "source": "attribute", + "version": "1.4.1", + "diff": "", + "path": "/usr/lib/python2.7/dist-packages/django" + }, + { + "name": "docutils", + "module": "python", + "source": "attribute", + "version": "0.10", + "diff": "", + "path": "/home/wd15/.virtualenvs/fipy/lib/python2.7/site-packages/docutils" + }, + { + "name": "encodings", + "module": "python", + "source": null, + "version": "unknown", + "diff": "", + "path": "/home/wd15/.virtualenvs/default/lib/python2.7/encodings" + }, + { + "name": "extremefill", + "module": "python", + "source": "/home/wd15/git/extremefill", + "version": "549c969edb113d0b3e9804612bfa53e91319c0ea", + "diff": "diff --git a/data/viewer.py b/data/viewer.py\nindex 68f60e0..d9ab7c2 100644\n--- a/data/viewer.py\n+++ b/data/viewer.py\n@@ -122,7 +122,7 @@ class ContourViewer(BaseViewer):\n self.times = times\n self.contours = contours\n self.data = []\n- super(ContourViewer, self).__init__(branches=branches, datafile=datafiles, datafiles=datafiles)\n+ super(ContourViewer, self).__init__(branches=branches, datafile=datafile, datafiles=datafiles)\n \n def plot(self):\n import matplotlib.pyplot as plt\n@@ -152,6 +152,24 @@ class ContourViewer(BaseViewer):\n phi = np.reshape(phi, shape)\n self.data.append((x, y, phi))\n \n+def datafilesFromBranches(branches, datafile):\n+ cwd = os.getcwd()\n+ for count, branch in enumerate(branches):\n+ print 'branch',branch\n+ tempdir = gitCloneToTemp(branch=branch, repositoryPath='ssh://wd15@genie.nist.gov/users/wd15/git/extremefill')\n+ repopath = os.path.join(tempdir, 'extremefill')\n+ datapath = os.path.join(repopath, datafile)\n+ gitMediaSync()\n+ if count == 0:\n+ self.addBaseData(datapath)\n+ basetempdir = tempdir\n+ else:\n+ self.addData(datapath, branch)\n+ cleanTempRepo(tempdir) \n+\n+ cleanTempRepo(basetempdir)\n+ os.chdir(cwd)\n+\n def plotNx():\n branches = ('Nx600', 'Nx300', 'Nx150')\n datafile = os.path.join('data', 'data.h5')\n@@ -174,13 +192,13 @@ def plotCFL():\n \n def plotContour():\n # branches = ('CFL0.0125', 'CFL0.025', 'CFL0.05', 'CFL0.1', 'CFL0.2', 'CFL0.4', 'CFL0.8', 'CFL1.6')\n- branches = ('Nx600', 'Nx150')\n+ branches = ('Nx300', 'Nx150')\n # branches = ('CFL0.025', 'CFL0.05')\n datafile = os.path.join('data', 'data.h5')\n times = (0,)\n- # times = (0., 1000., 2000., 3000., 4000.)\n- # viewer = ContourViewer(times=times, branches=branches, datafile=datafile)\n- viewer = ContourViewer(times=times, branches=branches, datafile=datafile, datafiles=('data150.h5', 'data600.h5'))\n+ times = (0., 1000., 2000., 3000., 4000.)\n+ viewer = ContourViewer(times=times, branches=branches, datafile=datafile)\n+ #viewer = ContourViewer(times=times, branches=branches, datafile=datafile, datafiles=('data150.h5', 'data600.h5'))\n viewer.plot()\n \n if __name__ == '__main__':\n@@ -188,6 +206,6 @@ if __name__ == '__main__':\n # from profiler import calibrate_profiler\n # fudge = calibrate_profiler(10000)\n # profile = Profiler('profile', fudge=fudge)\n- plotCFL()\n+ plotContour()\n # profile.stop()\n ", + "path": "/home/wd15/git/extremefill/extremefill" + }, + { + "name": "fipy", + "module": "python", + "source": "/home/wd15/git/fipy", + "version": "8c51478a3e8c30618b3a96c132612a46735c7548", + "diff": "", + "path": "/home/wd15/git/fipy/fipy" + }, + { + "name": "gi", + "module": "python", + "source": "attribute", + "version": "3.4.0", + "diff": "", + "path": "/usr/lib/python2.7/dist-packages/gi" + }, + { + "name": "glib", + "module": "python", + "source": null, + "version": "unknown", + "diff": "", + "path": "/usr/lib/python2.7/dist-packages/glib" + }, + { + "name": "gobject", + "module": "python", + "source": null, + "version": "unknown", + "diff": "", + "path": "/usr/lib/python2.7/dist-packages/gobject" + }, + { + "name": "google", + "module": "python", + "source": null, + "version": "unknown", + "diff": "", + "path": "/usr/lib/python2.7/dist-packages/google" + }, + { + "name": "gtk", + "module": "python", + "source": null, + "version": "unknown", + "diff": "", + "path": "/usr/lib/python2.7/dist-packages/gtk-2.0/gtk" + }, + { + "name": "httplib2", + "module": "python", + "source": "attribute", + "version": "0.7.4", + "diff": "", + "path": "/usr/lib/python2.7/dist-packages/httplib2" + }, + { + "name": "lockfile", + "module": "python", + "source": "egg-info", + "version": "0.9.1", + "diff": "", + "path": "/home/wd15/.virtualenvs/default/lib/python2.7/site-packages/lockfile-0.9.1-py2.7.egg/lockfile" + }, + { + "name": "lxml", + "module": "python", + "source": null, + "version": "unknown", + "diff": "", + "path": "/usr/lib/python2.7/dist-packages/lxml" + }, + { + "name": "matplotlib", + "module": "python", + "source": "attribute", + "version": "1.1.1", + "diff": "", + "path": "/usr/lib/pymodules/python2.7/matplotlib" + }, + { + "name": "mayavi", + "module": "python", + "source": "attribute", + "version": "4.1.0", + "diff": "", + "path": "/usr/lib/python2.7/dist-packages/mayavi" + }, + { + "name": "mpi4py", + "module": "python", + "source": "attribute", + "version": "1.3", + "diff": "", + "path": "/usr/lib/python2.7/dist-packages/mpi4py" + }, + { + "name": "mpl_toolkits", + "module": "python", + "source": null, + "version": "unknown", + "diff": "", + "path": "/usr/lib/pymodules/python2.7/mpl_toolkits" + }, + { + "name": "mx", + "module": "python", + "source": "attribute", + "version": "3.2.1", + "diff": "", + "path": "/usr/lib/python2.7/dist-packages/mx" + }, + { + "name": "nose", + "module": "python", + "source": "attribute", + "version": "1.2.1", + "diff": "", + "path": "/home/wd15/.virtualenvs/fipy/lib/python2.7/site-packages/nose" + }, + { + "name": "numexpr", + "module": "python", + "source": "attribute", + "version": "2.0.1", + "diff": "", + "path": "/usr/lib/python2.7/dist-packages/numexpr" + }, + { + "name": "numpy", + "module": "python", + "source": "attribute", + "version": "1.6.2", + "diff": "", + "path": "/usr/lib/python2.7/dist-packages/numpy" + }, + { + "name": "pyamg", + "module": "python", + "source": "attribute", + "version": "2.0.4.dev", + "diff": "", + "path": "/home/wd15/.virtualenvs/fipy/lib/python2.7/site-packages/pyamg" + }, + { + "name": "pylsmlib", + "module": "python", + "source": "/home/wd15/git/LSMLIB", + "version": "6f5d969bb27530aa37452a8b096e538a5cf7b993", + "diff": "", + "path": "/home/wd15/git/LSMLIB/pylsmlib/pylsmlib" + }, + { + "name": "pysparse", + "module": "python", + "source": "attribute", + "version": "1.1", + "diff": "", + "path": "/usr/lib/python2.7/dist-packages/pysparse" + }, + { + "name": "pytz", + "module": "python", + "source": "attribute", + "version": "2011k", + "diff": "", + "path": "/usr/lib/python2.7/dist-packages/pytz" + }, + { + "name": "scipy", + "module": "python", + "source": "attribute", + "version": "0.10.1", + "diff": "", + "path": "/usr/lib/python2.7/dist-packages/scipy" + }, + { + "name": "setuptools", + "module": "python", + "source": "attribute", + "version": "0.6", + "diff": "", + "path": "/home/wd15/.virtualenvs/default/local/lib/python2.7/site-packages/distribute-0.6.24-py2.7.egg/setuptools" + }, + { + "name": "simplejson", + "module": "python", + "source": "attribute", + "version": "2.6.1", + "diff": "", + "path": "/usr/lib/python2.7/dist-packages/simplejson" + }, + { + "name": "skfmm", + "module": "python", + "source": "/home/wd15/git/scikit-fmm", + "version": "467e5982fbd9d4eb32495f826d6bda65da498e13", + "diff": "", + "path": "/home/wd15/git/scikit-fmm/skfmm" + }, + { + "name": "sumatra", + "module": "python", + "source": "attribute", + "version": "0.5.0dev", + "diff": "", + "path": "/home/wd15/.virtualenvs/default/lib/python2.7/site-packages/Sumatra-0.5.0dev-py2.7.egg/sumatra" + }, + { + "name": "tables", + "module": "python", + "source": "attribute", + "version": "2.3.1", + "diff": "", + "path": "/usr/lib/python2.7/dist-packages/tables" + }, + { + "name": "tagging", + "module": "python", + "source": "attribute", + "version": "0.3.1", + "diff": "", + "path": "/home/wd15/.virtualenvs/fipy/lib/python2.7/site-packages/tagging" + }, + { + "name": "tornado", + "module": "python", + "source": "attribute", + "version": "2.3", + "diff": "", + "path": "/usr/lib/python2.7/dist-packages/tornado" + }, + { + "name": "traits", + "module": "python", + "source": "attribute", + "version": "4.1.0", + "diff": "", + "path": "/usr/lib/python2.7/dist-packages/traits" + }, + { + "name": "tvtk", + "module": "python", + "source": null, + "version": "unknown", + "diff": "", + "path": "/usr/lib/python2.7/dist-packages/tvtk" + }, + { + "name": "vtk", + "module": "python", + "source": null, + "version": "unknown", + "diff": "", + "path": "/usr/lib/pymodules/python2.7/vtk" + }, + { + "name": "wx", + "module": "python", + "source": "attribute", + "version": "2.8.12.1", + "diff": "", + "path": "/usr/lib/python2.7/dist-packages/wx-2.8-gtk2-unicode/wx" + }, + { + "name": "yaml", + "module": "python", + "source": "attribute", + "version": "3.10", + "diff": "", + "path": "/usr/lib/python2.7/dist-packages/yaml" + }, + { + "name": "zmq", + "module": "python", + "source": "attribute", + "version": "2.2.0", + "diff": "", + "path": "/usr/lib/python2.7/dist-packages/zmq" + } + ], + "user": "Daniel Wheeler ", + "output_data": [ + { + "path": "data.h5", + "digest": "e1d387727fcc84296b720afe2b0de359ecb91249", + "metadata": { + "mimetype": null, + "size": 102992, + "encoding": null + } + } + ], + "input_data": [], + "launch_mode": { + "type": "SerialLaunchMode", + "parameters": { + "working_directory": "/home/wd15/git/extremefill-data" + } + }, + "main_file": "script.py", + "outcome": "" +}, +{ + "script_arguments": "", + "platforms": [ + { + "system_name": "Linux", + "machine": "x86_64", + "version": "#35-Ubuntu SMP Thu Jan 24 13:15:40 UTC 2013", + "ip_addr": "127.0.0.1", + "architecture_bits": "64bit", + "architecture_linkage": "ELF", + "release": "3.5.0-23-generic", + "network_name": "loki", + "processor": "x86_64" + } + ], + "duration": 6.156832933425903, + "diff": "diff --git a/script.py b/script.py\nindex ec41d60..dd94f39 100644\n--- a/script.py\n+++ b/script.py\n@@ -30,16 +30,5 @@ def run(totalSteps=10,\n NxBase=1200)\n \n if __name__ == '__main__':\n-\n-\n- class Bare(object):\n- pass\n-\n- \n- args = Bare()\n- parser = argparse.ArgumentParser(description=\"Run Extremefill 2D example.\")\n- parser.add_argument('--totalSteps', default=1, type=int)\n- parser.parse_args(namespace=args)\n-\n- run(totalSteps=args.totalSteps, tags=('test',), reason=\"testing SMT class\")\n+ run(totalSteps=2, CFL=0.1)\n \ndiff --git a/smtdecorator.py b/smtdecorator.py\nindex 432a8b7..826170c 100644\n--- a/smtdecorator.py\n+++ b/smtdecorator.py\n@@ -1,4 +1,3 @@\n-\n \"\"\"\n Script to test setting up batch simaulations with Sumatra.\n \n@@ -22,8 +21,8 @@ On laptop use http://129.6.153.60:8000\n import time\n import os\n import sys\n-from contextlib import contextmanager\n from StringIO import StringIO\n+import argparse\n \n \n from sumatra.projects import load_project\n@@ -59,18 +58,21 @@ class SMTDecorator(object):\n def __init__(self, function):\n self.function = function\n \n- def __call__(self, tags=(), reason='', *args, **kwargs):\n+ def __call__(self, tag=[], reason='', *args, **kwargs):\n+\n+ parameters, tag, reason = self.parseargs(kwargs, list(tag), reason)\n+\n project = load_project()\n- record = project.new_record(parameters=SimpleParameterSet(kwargs),\n+ record = project.new_record(parameters=SimpleParameterSet(parameters),\n main_file=self.function.func_globals['__file__'],\n reason=reason)\n \n record.datastore.root = os.path.join(record.datastore.root, record.label)\n- for tag in tags:\n- record.tags.add(tag)\n \n- record.start_time = time.time()\n+ for t in tag:\n+ record.tags.add(t)\n \n+ record.start_time = time.time()\n with Redirect() as out:\n returnvalue = self.function(datadir=record.datastore.root, *args, **record.parameters.as_dict())\n \n@@ -84,5 +86,25 @@ class SMTDecorator(object):\n \n return returnvalue\n \n+ def parseargs(self, func_kwargs, tag, reason):\n+ class Bare:\n+ pass\n+ ext_kwargs = Bare()\n+ parser = argparse.ArgumentParser(description=\"SMT arguments\")\n+\n+ for k, v in func_kwargs.iteritems():\n+ parser.add_argument('--' + k, default=v, type=type(v), dest=k)\n+ \n+ parser.add_argument('--tag', action='append', default=tag, dest='tag')\n+ parser.add_argument('--reason', default=reason, dest='reason')\n+ parser.parse_args(namespace=ext_kwargs)\n \n+ tag = ext_kwargs.tag\n+ reason = ext_kwargs.reason\n \n+ for k, v in func_kwargs.iteritems():\n+ func_kwargs[k] = getattr(ext_kwargs, k)\n+ \n+ return func_kwargs, tag, reason\n+ \n+ ", + "datastore": { + "type": "FileSystemDataStore", + "parameters": { + "root": "./Data/c67b25c8fa1a" + } + }, + "input_datastore": { + "type": "FileSystemDataStore", + "parameters": { + "root": "/" + } + }, + "executable": { + "path": "/home/wd15/.virtualenvs/default/bin/python", + "version": "2.7.3", + "name": "Python", + "options": "" + }, + "parameters": { + "content": "totalSteps = 2\nCFL = 0.33", + "type": "SimpleParameterSet" + }, + "label": "c67b25c8fa1a", + "version": "03128c81e5ec503445a0a10166626c2e902ba41e", + "stdout_stderr": "[ 1. 1. 1. 1.]\n[ 0.34738209 0.61535499 0.01923836 0.00971058]\n[ 1.23729704e-01 2.14204081e-01 1.88311438e-04 1.55991524e-03]\n\ntheta 0.0\ncBar_supp 1.0\ncBar_cu 1.0\npotentialBar 1.0\nmin(extension) 7.22965473284e-08\nmin(depositionRate) 2.09114908795e-09\nmin(current) 56.8350759862\nmin(cupric) 997.266139623\nmin(baseCurrent) 56.9323002935\nmax(interfaceTheta) - 1: -0.973021297371\nmin(interfaceTheta) 0.0\nmin(I0) 38.9208518948\ndt 0.011\nelapsed time 0.0\nstep 0\n\n[ 1. 1. 1. 1.]\n[ 0.10765512 0.04576554 0.03330295 0.00523947]\n\ntheta 0.0\ncBar_supp 1.0\ncBar_cu 1.0\npotentialBar 1.0\nmin(extension) 2.09114554699e-09\nmin(depositionRate) 1.47837489306e-09\nmin(current) 40.1805638188\nmin(cupric) 996.200886814\nmin(baseCurrent) 40.2838895551\nmax(interfaceTheta) - 1: -0.947107282423\nmin(interfaceTheta) 0.0\nmin(I0) 37.8842912969\ndt 0.0121\nelapsed time 0.011\nstep 1\n\n", + "repository": { + "url": "/home/wd15/git/extremefill-data", + "type": "GitRepository", + "upstream": "git@github.com:wd15/extremefill-data.git" + }, + "tags": [], + "timestamp": "2013-02-19 10:45:30", + "reason": "", + "dependencies": [ + { + "name": "Cython", + "module": "python", + "source": "attribute", + "version": "0.16", + "diff": "", + "path": "/usr/lib/python2.7/dist-packages/Cython" + }, + { + "name": "IPython", + "module": "python", + "source": "attribute", + "version": "0.13.1.rc2", + "diff": "", + "path": "/usr/lib/python2.7/dist-packages/IPython" + }, + { + "name": "PIL", + "module": "python", + "source": null, + "version": "unknown", + "diff": "", + "path": "/usr/lib/python2.7/dist-packages/PIL" + }, + { + "name": "PyQt4", + "module": "python", + "source": null, + "version": "unknown", + "diff": "", + "path": "/usr/lib/python2.7/dist-packages/PyQt4" + }, + { + "name": "PyTrilinos", + "module": "python", + "source": "attribute", + "version": "4.8d", + "diff": "", + "path": "/home/wd15/.virtualenvs/fipy/lib/python2.7/site-packages/PyTrilinos" + }, + { + "name": "dateutil", + "module": "python", + "source": "attribute", + "version": "1.5", + "diff": "", + "path": "/usr/lib/python2.7/dist-packages/dateutil" + }, + { + "name": "distutils", + "module": "python", + "source": "attribute", + "version": "2.7.3", + "diff": "", + "path": "/home/wd15/.virtualenvs/default/lib/python2.7/distutils" + }, + { + "name": "django", + "module": "python", + "source": "attribute", + "version": "1.4.1", + "diff": "", + "path": "/usr/lib/python2.7/dist-packages/django" + }, + { + "name": "docutils", + "module": "python", + "source": "attribute", + "version": "0.10", + "diff": "", + "path": "/home/wd15/.virtualenvs/fipy/lib/python2.7/site-packages/docutils" + }, + { + "name": "encodings", + "module": "python", + "source": null, + "version": "unknown", + "diff": "", + "path": "/home/wd15/.virtualenvs/default/lib/python2.7/encodings" + }, + { + "name": "extremefill", + "module": "python", + "source": "/home/wd15/git/extremefill", + "version": "549c969edb113d0b3e9804612bfa53e91319c0ea", + "diff": "diff --git a/data/viewer.py b/data/viewer.py\nindex 68f60e0..d9ab7c2 100644\n--- a/data/viewer.py\n+++ b/data/viewer.py\n@@ -122,7 +122,7 @@ class ContourViewer(BaseViewer):\n self.times = times\n self.contours = contours\n self.data = []\n- super(ContourViewer, self).__init__(branches=branches, datafile=datafiles, datafiles=datafiles)\n+ super(ContourViewer, self).__init__(branches=branches, datafile=datafile, datafiles=datafiles)\n \n def plot(self):\n import matplotlib.pyplot as plt\n@@ -152,6 +152,24 @@ class ContourViewer(BaseViewer):\n phi = np.reshape(phi, shape)\n self.data.append((x, y, phi))\n \n+def datafilesFromBranches(branches, datafile):\n+ cwd = os.getcwd()\n+ for count, branch in enumerate(branches):\n+ print 'branch',branch\n+ tempdir = gitCloneToTemp(branch=branch, repositoryPath='ssh://wd15@genie.nist.gov/users/wd15/git/extremefill')\n+ repopath = os.path.join(tempdir, 'extremefill')\n+ datapath = os.path.join(repopath, datafile)\n+ gitMediaSync()\n+ if count == 0:\n+ self.addBaseData(datapath)\n+ basetempdir = tempdir\n+ else:\n+ self.addData(datapath, branch)\n+ cleanTempRepo(tempdir) \n+\n+ cleanTempRepo(basetempdir)\n+ os.chdir(cwd)\n+\n def plotNx():\n branches = ('Nx600', 'Nx300', 'Nx150')\n datafile = os.path.join('data', 'data.h5')\n@@ -174,13 +192,13 @@ def plotCFL():\n \n def plotContour():\n # branches = ('CFL0.0125', 'CFL0.025', 'CFL0.05', 'CFL0.1', 'CFL0.2', 'CFL0.4', 'CFL0.8', 'CFL1.6')\n- branches = ('Nx600', 'Nx150')\n+ branches = ('Nx300', 'Nx150')\n # branches = ('CFL0.025', 'CFL0.05')\n datafile = os.path.join('data', 'data.h5')\n times = (0,)\n- # times = (0., 1000., 2000., 3000., 4000.)\n- # viewer = ContourViewer(times=times, branches=branches, datafile=datafile)\n- viewer = ContourViewer(times=times, branches=branches, datafile=datafile, datafiles=('data150.h5', 'data600.h5'))\n+ times = (0., 1000., 2000., 3000., 4000.)\n+ viewer = ContourViewer(times=times, branches=branches, datafile=datafile)\n+ #viewer = ContourViewer(times=times, branches=branches, datafile=datafile, datafiles=('data150.h5', 'data600.h5'))\n viewer.plot()\n \n if __name__ == '__main__':\n@@ -188,6 +206,6 @@ if __name__ == '__main__':\n # from profiler import calibrate_profiler\n # fudge = calibrate_profiler(10000)\n # profile = Profiler('profile', fudge=fudge)\n- plotCFL()\n+ plotContour()\n # profile.stop()\n ", + "path": "/home/wd15/git/extremefill/extremefill" + }, + { + "name": "fipy", + "module": "python", + "source": "/home/wd15/git/fipy", + "version": "8c51478a3e8c30618b3a96c132612a46735c7548", + "diff": "", + "path": "/home/wd15/git/fipy/fipy" + }, + { + "name": "gi", + "module": "python", + "source": "attribute", + "version": "3.4.0", + "diff": "", + "path": "/usr/lib/python2.7/dist-packages/gi" + }, + { + "name": "glib", + "module": "python", + "source": null, + "version": "unknown", + "diff": "", + "path": "/usr/lib/python2.7/dist-packages/glib" + }, + { + "name": "gobject", + "module": "python", + "source": null, + "version": "unknown", + "diff": "", + "path": "/usr/lib/python2.7/dist-packages/gobject" + }, + { + "name": "google", + "module": "python", + "source": null, + "version": "unknown", + "diff": "", + "path": "/usr/lib/python2.7/dist-packages/google" + }, + { + "name": "gtk", + "module": "python", + "source": null, + "version": "unknown", + "diff": "", + "path": "/usr/lib/python2.7/dist-packages/gtk-2.0/gtk" + }, + { + "name": "httplib2", + "module": "python", + "source": "attribute", + "version": "0.7.4", + "diff": "", + "path": "/usr/lib/python2.7/dist-packages/httplib2" + }, + { + "name": "lockfile", + "module": "python", + "source": "egg-info", + "version": "0.9.1", + "diff": "", + "path": "/home/wd15/.virtualenvs/default/lib/python2.7/site-packages/lockfile-0.9.1-py2.7.egg/lockfile" + }, + { + "name": "lxml", + "module": "python", + "source": null, + "version": "unknown", + "diff": "", + "path": "/usr/lib/python2.7/dist-packages/lxml" + }, + { + "name": "matplotlib", + "module": "python", + "source": "attribute", + "version": "1.1.1", + "diff": "", + "path": "/usr/lib/pymodules/python2.7/matplotlib" + }, + { + "name": "mayavi", + "module": "python", + "source": "attribute", + "version": "4.1.0", + "diff": "", + "path": "/usr/lib/python2.7/dist-packages/mayavi" + }, + { + "name": "mpi4py", + "module": "python", + "source": "attribute", + "version": "1.3", + "diff": "", + "path": "/usr/lib/python2.7/dist-packages/mpi4py" + }, + { + "name": "mpl_toolkits", + "module": "python", + "source": null, + "version": "unknown", + "diff": "", + "path": "/usr/lib/pymodules/python2.7/mpl_toolkits" + }, + { + "name": "mx", + "module": "python", + "source": "attribute", + "version": "3.2.1", + "diff": "", + "path": "/usr/lib/python2.7/dist-packages/mx" + }, + { + "name": "nose", + "module": "python", + "source": "attribute", + "version": "1.2.1", + "diff": "", + "path": "/home/wd15/.virtualenvs/fipy/lib/python2.7/site-packages/nose" + }, + { + "name": "numexpr", + "module": "python", + "source": "attribute", + "version": "2.0.1", + "diff": "", + "path": "/usr/lib/python2.7/dist-packages/numexpr" + }, + { + "name": "numpy", + "module": "python", + "source": "attribute", + "version": "1.6.2", + "diff": "", + "path": "/usr/lib/python2.7/dist-packages/numpy" + }, + { + "name": "pyamg", + "module": "python", + "source": "attribute", + "version": "2.0.4.dev", + "diff": "", + "path": "/home/wd15/.virtualenvs/fipy/lib/python2.7/site-packages/pyamg" + }, + { + "name": "pylsmlib", + "module": "python", + "source": "/home/wd15/git/LSMLIB", + "version": "6f5d969bb27530aa37452a8b096e538a5cf7b993", + "diff": "", + "path": "/home/wd15/git/LSMLIB/pylsmlib/pylsmlib" + }, + { + "name": "pysparse", + "module": "python", + "source": "attribute", + "version": "1.1", + "diff": "", + "path": "/usr/lib/python2.7/dist-packages/pysparse" + }, + { + "name": "pytz", + "module": "python", + "source": "attribute", + "version": "2011k", + "diff": "", + "path": "/usr/lib/python2.7/dist-packages/pytz" + }, + { + "name": "scipy", + "module": "python", + "source": "attribute", + "version": "0.10.1", + "diff": "", + "path": "/usr/lib/python2.7/dist-packages/scipy" + }, + { + "name": "setuptools", + "module": "python", + "source": "attribute", + "version": "0.6", + "diff": "", + "path": "/home/wd15/.virtualenvs/default/local/lib/python2.7/site-packages/distribute-0.6.24-py2.7.egg/setuptools" + }, + { + "name": "simplejson", + "module": "python", + "source": "attribute", + "version": "2.6.1", + "diff": "", + "path": "/usr/lib/python2.7/dist-packages/simplejson" + }, + { + "name": "skfmm", + "module": "python", + "source": "/home/wd15/git/scikit-fmm", + "version": "467e5982fbd9d4eb32495f826d6bda65da498e13", + "diff": "", + "path": "/home/wd15/git/scikit-fmm/skfmm" + }, + { + "name": "sumatra", + "module": "python", + "source": "attribute", + "version": "0.5.0dev", + "diff": "", + "path": "/home/wd15/.virtualenvs/default/lib/python2.7/site-packages/Sumatra-0.5.0dev-py2.7.egg/sumatra" + }, + { + "name": "tables", + "module": "python", + "source": "attribute", + "version": "2.3.1", + "diff": "", + "path": "/usr/lib/python2.7/dist-packages/tables" + }, + { + "name": "tagging", + "module": "python", + "source": "attribute", + "version": "0.3.1", + "diff": "", + "path": "/home/wd15/.virtualenvs/fipy/lib/python2.7/site-packages/tagging" + }, + { + "name": "tornado", + "module": "python", + "source": "attribute", + "version": "2.3", + "diff": "", + "path": "/usr/lib/python2.7/dist-packages/tornado" + }, + { + "name": "traits", + "module": "python", + "source": "attribute", + "version": "4.1.0", + "diff": "", + "path": "/usr/lib/python2.7/dist-packages/traits" + }, + { + "name": "tvtk", + "module": "python", + "source": null, + "version": "unknown", + "diff": "", + "path": "/usr/lib/python2.7/dist-packages/tvtk" + }, + { + "name": "vtk", + "module": "python", + "source": null, + "version": "unknown", + "diff": "", + "path": "/usr/lib/pymodules/python2.7/vtk" + }, + { + "name": "wx", + "module": "python", + "source": "attribute", + "version": "2.8.12.1", + "diff": "", + "path": "/usr/lib/python2.7/dist-packages/wx-2.8-gtk2-unicode/wx" + }, + { + "name": "yaml", + "module": "python", + "source": "attribute", + "version": "3.10", + "diff": "", + "path": "/usr/lib/python2.7/dist-packages/yaml" + }, + { + "name": "zmq", + "module": "python", + "source": "attribute", + "version": "2.2.0", + "diff": "", + "path": "/usr/lib/python2.7/dist-packages/zmq" + } + ], + "user": "Daniel Wheeler ", + "output_data": [ + { + "path": "data.h5", + "digest": "1e2b6274f8abac9aee34a921e8e8804af8054d10", + "metadata": { + "mimetype": null, + "size": 102992, + "encoding": null + } + } + ], + "input_data": [], + "launch_mode": { + "type": "SerialLaunchMode", + "parameters": { + "working_directory": "/home/wd15/git/extremefill-data" + } + }, + "main_file": "script.py", + "outcome": "" +}, +{ + "script_arguments": "", + "platforms": [ + { + "system_name": "Linux", + "machine": "x86_64", + "version": "#35-Ubuntu SMP Thu Jan 24 13:15:40 UTC 2013", + "ip_addr": "127.0.0.1", + "architecture_bits": "64bit", + "architecture_linkage": "ELF", + "release": "3.5.0-23-generic", + "network_name": "loki", + "processor": "x86_64" + } + ], + "duration": 6.060571908950806, + "diff": "diff --git a/script.py b/script.py\nindex ec41d60..dd94f39 100644\n--- a/script.py\n+++ b/script.py\n@@ -30,16 +30,5 @@ def run(totalSteps=10,\n NxBase=1200)\n \n if __name__ == '__main__':\n-\n-\n- class Bare(object):\n- pass\n-\n- \n- args = Bare()\n- parser = argparse.ArgumentParser(description=\"Run Extremefill 2D example.\")\n- parser.add_argument('--totalSteps', default=1, type=int)\n- parser.parse_args(namespace=args)\n-\n- run(totalSteps=args.totalSteps, tags=('test',), reason=\"testing SMT class\")\n+ run(totalSteps=2, CFL=0.1)\n \ndiff --git a/smtdecorator.py b/smtdecorator.py\nindex 432a8b7..826170c 100644\n--- a/smtdecorator.py\n+++ b/smtdecorator.py\n@@ -1,4 +1,3 @@\n-\n \"\"\"\n Script to test setting up batch simaulations with Sumatra.\n \n@@ -22,8 +21,8 @@ On laptop use http://129.6.153.60:8000\n import time\n import os\n import sys\n-from contextlib import contextmanager\n from StringIO import StringIO\n+import argparse\n \n \n from sumatra.projects import load_project\n@@ -59,18 +58,21 @@ class SMTDecorator(object):\n def __init__(self, function):\n self.function = function\n \n- def __call__(self, tags=(), reason='', *args, **kwargs):\n+ def __call__(self, tag=[], reason='', *args, **kwargs):\n+\n+ parameters, tag, reason = self.parseargs(kwargs, list(tag), reason)\n+\n project = load_project()\n- record = project.new_record(parameters=SimpleParameterSet(kwargs),\n+ record = project.new_record(parameters=SimpleParameterSet(parameters),\n main_file=self.function.func_globals['__file__'],\n reason=reason)\n \n record.datastore.root = os.path.join(record.datastore.root, record.label)\n- for tag in tags:\n- record.tags.add(tag)\n \n- record.start_time = time.time()\n+ for t in tag:\n+ record.tags.add(t)\n \n+ record.start_time = time.time()\n with Redirect() as out:\n returnvalue = self.function(datadir=record.datastore.root, *args, **record.parameters.as_dict())\n \n@@ -84,5 +86,25 @@ class SMTDecorator(object):\n \n return returnvalue\n \n+ def parseargs(self, func_kwargs, tag, reason):\n+ class Bare:\n+ pass\n+ ext_kwargs = Bare()\n+ parser = argparse.ArgumentParser(description=\"SMT arguments\")\n+\n+ for k, v in func_kwargs.iteritems():\n+ parser.add_argument('--' + k, default=v, type=type(v), dest=k)\n+ \n+ parser.add_argument('--tag', action='append', default=tag, dest='tag')\n+ parser.add_argument('--reason', default=reason, dest='reason')\n+ parser.parse_args(namespace=ext_kwargs)\n \n+ tag = ext_kwargs.tag\n+ reason = ext_kwargs.reason\n \n+ for k, v in func_kwargs.iteritems():\n+ func_kwargs[k] = getattr(ext_kwargs, k)\n+ \n+ return func_kwargs, tag, reason\n+ \n+ ", + "datastore": { + "type": "FileSystemDataStore", + "parameters": { + "root": "./Data/10ea6223aab3" + } + }, + "input_datastore": { + "type": "FileSystemDataStore", + "parameters": { + "root": "/" + } + }, + "executable": { + "path": "/home/wd15/.virtualenvs/default/bin/python", + "version": "2.7.3", + "name": "Python", + "options": "" + }, + "parameters": { + "content": "totalSteps = 2\nCFL = 0.3", + "type": "SimpleParameterSet" + }, + "label": "10ea6223aab3", + "version": "03128c81e5ec503445a0a10166626c2e902ba41e", + "stdout_stderr": "[ 1. 1. 1. 1.]\n[ 0.34738209 0.61535499 0.01923836 0.00971058]\n[ 1.23729704e-01 2.14204081e-01 1.88311438e-04 1.55991524e-03]\n\ntheta 0.0\ncBar_supp 1.0\ncBar_cu 1.0\npotentialBar 1.0\nmin(extension) 7.22965473284e-08\nmin(depositionRate) 2.09114908795e-09\nmin(current) 56.8350759862\nmin(cupric) 997.266139623\nmin(baseCurrent) 56.9323002935\nmax(interfaceTheta) - 1: -0.973021297371\nmin(interfaceTheta) 0.0\nmin(I0) 38.9208518948\ndt 0.011\nelapsed time 0.0\nstep 0\n\n[ 1. 1. 1. 1.]\n[ 0.10765512 0.04576554 0.03330295 0.00523947]\n\ntheta 0.0\ncBar_supp 1.0\ncBar_cu 1.0\npotentialBar 1.0\nmin(extension) 2.09114554699e-09\nmin(depositionRate) 1.47837489306e-09\nmin(current) 40.1805638188\nmin(cupric) 996.200886814\nmin(baseCurrent) 40.2838895551\nmax(interfaceTheta) - 1: -0.947107282423\nmin(interfaceTheta) 0.0\nmin(I0) 37.8842912969\ndt 0.0121\nelapsed time 0.011\nstep 1\n\n", + "repository": { + "url": "/home/wd15/git/extremefill-data", + "type": "GitRepository", + "upstream": "git@github.com:wd15/extremefill-data.git" + }, + "tags": [], + "timestamp": "2013-02-19 10:45:30", + "reason": "", + "dependencies": [ + { + "name": "Cython", + "module": "python", + "source": "attribute", + "version": "0.16", + "diff": "", + "path": "/usr/lib/python2.7/dist-packages/Cython" + }, + { + "name": "IPython", + "module": "python", + "source": "attribute", + "version": "0.13.1.rc2", + "diff": "", + "path": "/usr/lib/python2.7/dist-packages/IPython" + }, + { + "name": "PIL", + "module": "python", + "source": null, + "version": "unknown", + "diff": "", + "path": "/usr/lib/python2.7/dist-packages/PIL" + }, + { + "name": "PyQt4", + "module": "python", + "source": null, + "version": "unknown", + "diff": "", + "path": "/usr/lib/python2.7/dist-packages/PyQt4" + }, + { + "name": "PyTrilinos", + "module": "python", + "source": "attribute", + "version": "4.8d", + "diff": "", + "path": "/home/wd15/.virtualenvs/fipy/lib/python2.7/site-packages/PyTrilinos" + }, + { + "name": "dateutil", + "module": "python", + "source": "attribute", + "version": "1.5", + "diff": "", + "path": "/usr/lib/python2.7/dist-packages/dateutil" + }, + { + "name": "distutils", + "module": "python", + "source": "attribute", + "version": "2.7.3", + "diff": "", + "path": "/home/wd15/.virtualenvs/default/lib/python2.7/distutils" + }, + { + "name": "django", + "module": "python", + "source": "attribute", + "version": "1.4.1", + "diff": "", + "path": "/usr/lib/python2.7/dist-packages/django" + }, + { + "name": "docutils", + "module": "python", + "source": "attribute", + "version": "0.10", + "diff": "", + "path": "/home/wd15/.virtualenvs/fipy/lib/python2.7/site-packages/docutils" + }, + { + "name": "encodings", + "module": "python", + "source": null, + "version": "unknown", + "diff": "", + "path": "/home/wd15/.virtualenvs/default/lib/python2.7/encodings" + }, + { + "name": "extremefill", + "module": "python", + "source": "/home/wd15/git/extremefill", + "version": "549c969edb113d0b3e9804612bfa53e91319c0ea", + "diff": "diff --git a/data/viewer.py b/data/viewer.py\nindex 68f60e0..d9ab7c2 100644\n--- a/data/viewer.py\n+++ b/data/viewer.py\n@@ -122,7 +122,7 @@ class ContourViewer(BaseViewer):\n self.times = times\n self.contours = contours\n self.data = []\n- super(ContourViewer, self).__init__(branches=branches, datafile=datafiles, datafiles=datafiles)\n+ super(ContourViewer, self).__init__(branches=branches, datafile=datafile, datafiles=datafiles)\n \n def plot(self):\n import matplotlib.pyplot as plt\n@@ -152,6 +152,24 @@ class ContourViewer(BaseViewer):\n phi = np.reshape(phi, shape)\n self.data.append((x, y, phi))\n \n+def datafilesFromBranches(branches, datafile):\n+ cwd = os.getcwd()\n+ for count, branch in enumerate(branches):\n+ print 'branch',branch\n+ tempdir = gitCloneToTemp(branch=branch, repositoryPath='ssh://wd15@genie.nist.gov/users/wd15/git/extremefill')\n+ repopath = os.path.join(tempdir, 'extremefill')\n+ datapath = os.path.join(repopath, datafile)\n+ gitMediaSync()\n+ if count == 0:\n+ self.addBaseData(datapath)\n+ basetempdir = tempdir\n+ else:\n+ self.addData(datapath, branch)\n+ cleanTempRepo(tempdir) \n+\n+ cleanTempRepo(basetempdir)\n+ os.chdir(cwd)\n+\n def plotNx():\n branches = ('Nx600', 'Nx300', 'Nx150')\n datafile = os.path.join('data', 'data.h5')\n@@ -174,13 +192,13 @@ def plotCFL():\n \n def plotContour():\n # branches = ('CFL0.0125', 'CFL0.025', 'CFL0.05', 'CFL0.1', 'CFL0.2', 'CFL0.4', 'CFL0.8', 'CFL1.6')\n- branches = ('Nx600', 'Nx150')\n+ branches = ('Nx300', 'Nx150')\n # branches = ('CFL0.025', 'CFL0.05')\n datafile = os.path.join('data', 'data.h5')\n times = (0,)\n- # times = (0., 1000., 2000., 3000., 4000.)\n- # viewer = ContourViewer(times=times, branches=branches, datafile=datafile)\n- viewer = ContourViewer(times=times, branches=branches, datafile=datafile, datafiles=('data150.h5', 'data600.h5'))\n+ times = (0., 1000., 2000., 3000., 4000.)\n+ viewer = ContourViewer(times=times, branches=branches, datafile=datafile)\n+ #viewer = ContourViewer(times=times, branches=branches, datafile=datafile, datafiles=('data150.h5', 'data600.h5'))\n viewer.plot()\n \n if __name__ == '__main__':\n@@ -188,6 +206,6 @@ if __name__ == '__main__':\n # from profiler import calibrate_profiler\n # fudge = calibrate_profiler(10000)\n # profile = Profiler('profile', fudge=fudge)\n- plotCFL()\n+ plotContour()\n # profile.stop()\n ", + "path": "/home/wd15/git/extremefill/extremefill" + }, + { + "name": "fipy", + "module": "python", + "source": "/home/wd15/git/fipy", + "version": "8c51478a3e8c30618b3a96c132612a46735c7548", + "diff": "", + "path": "/home/wd15/git/fipy/fipy" + }, + { + "name": "gi", + "module": "python", + "source": "attribute", + "version": "3.4.0", + "diff": "", + "path": "/usr/lib/python2.7/dist-packages/gi" + }, + { + "name": "glib", + "module": "python", + "source": null, + "version": "unknown", + "diff": "", + "path": "/usr/lib/python2.7/dist-packages/glib" + }, + { + "name": "gobject", + "module": "python", + "source": null, + "version": "unknown", + "diff": "", + "path": "/usr/lib/python2.7/dist-packages/gobject" + }, + { + "name": "google", + "module": "python", + "source": null, + "version": "unknown", + "diff": "", + "path": "/usr/lib/python2.7/dist-packages/google" + }, + { + "name": "gtk", + "module": "python", + "source": null, + "version": "unknown", + "diff": "", + "path": "/usr/lib/python2.7/dist-packages/gtk-2.0/gtk" + }, + { + "name": "httplib2", + "module": "python", + "source": "attribute", + "version": "0.7.4", + "diff": "", + "path": "/usr/lib/python2.7/dist-packages/httplib2" + }, + { + "name": "lockfile", + "module": "python", + "source": "egg-info", + "version": "0.9.1", + "diff": "", + "path": "/home/wd15/.virtualenvs/default/lib/python2.7/site-packages/lockfile-0.9.1-py2.7.egg/lockfile" + }, + { + "name": "lxml", + "module": "python", + "source": null, + "version": "unknown", + "diff": "", + "path": "/usr/lib/python2.7/dist-packages/lxml" + }, + { + "name": "matplotlib", + "module": "python", + "source": "attribute", + "version": "1.1.1", + "diff": "", + "path": "/usr/lib/pymodules/python2.7/matplotlib" + }, + { + "name": "mayavi", + "module": "python", + "source": "attribute", + "version": "4.1.0", + "diff": "", + "path": "/usr/lib/python2.7/dist-packages/mayavi" + }, + { + "name": "mpi4py", + "module": "python", + "source": "attribute", + "version": "1.3", + "diff": "", + "path": "/usr/lib/python2.7/dist-packages/mpi4py" + }, + { + "name": "mpl_toolkits", + "module": "python", + "source": null, + "version": "unknown", + "diff": "", + "path": "/usr/lib/pymodules/python2.7/mpl_toolkits" + }, + { + "name": "mx", + "module": "python", + "source": "attribute", + "version": "3.2.1", + "diff": "", + "path": "/usr/lib/python2.7/dist-packages/mx" + }, + { + "name": "nose", + "module": "python", + "source": "attribute", + "version": "1.2.1", + "diff": "", + "path": "/home/wd15/.virtualenvs/fipy/lib/python2.7/site-packages/nose" + }, + { + "name": "numexpr", + "module": "python", + "source": "attribute", + "version": "2.0.1", + "diff": "", + "path": "/usr/lib/python2.7/dist-packages/numexpr" + }, + { + "name": "numpy", + "module": "python", + "source": "attribute", + "version": "1.6.2", + "diff": "", + "path": "/usr/lib/python2.7/dist-packages/numpy" + }, + { + "name": "pyamg", + "module": "python", + "source": "attribute", + "version": "2.0.4.dev", + "diff": "", + "path": "/home/wd15/.virtualenvs/fipy/lib/python2.7/site-packages/pyamg" + }, + { + "name": "pylsmlib", + "module": "python", + "source": "/home/wd15/git/LSMLIB", + "version": "6f5d969bb27530aa37452a8b096e538a5cf7b993", + "diff": "", + "path": "/home/wd15/git/LSMLIB/pylsmlib/pylsmlib" + }, + { + "name": "pysparse", + "module": "python", + "source": "attribute", + "version": "1.1", + "diff": "", + "path": "/usr/lib/python2.7/dist-packages/pysparse" + }, + { + "name": "pytz", + "module": "python", + "source": "attribute", + "version": "2011k", + "diff": "", + "path": "/usr/lib/python2.7/dist-packages/pytz" + }, + { + "name": "scipy", + "module": "python", + "source": "attribute", + "version": "0.10.1", + "diff": "", + "path": "/usr/lib/python2.7/dist-packages/scipy" + }, + { + "name": "setuptools", + "module": "python", + "source": "attribute", + "version": "0.6", + "diff": "", + "path": "/home/wd15/.virtualenvs/default/local/lib/python2.7/site-packages/distribute-0.6.24-py2.7.egg/setuptools" + }, + { + "name": "simplejson", + "module": "python", + "source": "attribute", + "version": "2.6.1", + "diff": "", + "path": "/usr/lib/python2.7/dist-packages/simplejson" + }, + { + "name": "skfmm", + "module": "python", + "source": "/home/wd15/git/scikit-fmm", + "version": "467e5982fbd9d4eb32495f826d6bda65da498e13", + "diff": "", + "path": "/home/wd15/git/scikit-fmm/skfmm" + }, + { + "name": "sumatra", + "module": "python", + "source": "attribute", + "version": "0.5.0dev", + "diff": "", + "path": "/home/wd15/.virtualenvs/default/lib/python2.7/site-packages/Sumatra-0.5.0dev-py2.7.egg/sumatra" + }, + { + "name": "tables", + "module": "python", + "source": "attribute", + "version": "2.3.1", + "diff": "", + "path": "/usr/lib/python2.7/dist-packages/tables" + }, + { + "name": "tagging", + "module": "python", + "source": "attribute", + "version": "0.3.1", + "diff": "", + "path": "/home/wd15/.virtualenvs/fipy/lib/python2.7/site-packages/tagging" + }, + { + "name": "tornado", + "module": "python", + "source": "attribute", + "version": "2.3", + "diff": "", + "path": "/usr/lib/python2.7/dist-packages/tornado" + }, + { + "name": "traits", + "module": "python", + "source": "attribute", + "version": "4.1.0", + "diff": "", + "path": "/usr/lib/python2.7/dist-packages/traits" + }, + { + "name": "tvtk", + "module": "python", + "source": null, + "version": "unknown", + "diff": "", + "path": "/usr/lib/python2.7/dist-packages/tvtk" + }, + { + "name": "vtk", + "module": "python", + "source": null, + "version": "unknown", + "diff": "", + "path": "/usr/lib/pymodules/python2.7/vtk" + }, + { + "name": "wx", + "module": "python", + "source": "attribute", + "version": "2.8.12.1", + "diff": "", + "path": "/usr/lib/python2.7/dist-packages/wx-2.8-gtk2-unicode/wx" + }, + { + "name": "yaml", + "module": "python", + "source": "attribute", + "version": "3.10", + "diff": "", + "path": "/usr/lib/python2.7/dist-packages/yaml" + }, + { + "name": "zmq", + "module": "python", + "source": "attribute", + "version": "2.2.0", + "diff": "", + "path": "/usr/lib/python2.7/dist-packages/zmq" + } + ], + "user": "Daniel Wheeler ", + "output_data": [ + { + "path": "data.h5", + "digest": "90eafa0b3d42cb4608b44e48cb329593f2892d93", + "metadata": { + "mimetype": null, + "size": 102992, + "encoding": null + } + } + ], + "input_data": [], + "launch_mode": { + "type": "SerialLaunchMode", + "parameters": { + "working_directory": "/home/wd15/git/extremefill-data" + } + }, + "main_file": "script.py", + "outcome": "" +}, +{ + "script_arguments": "", + "platforms": [ + { + "system_name": "Linux", + "machine": "x86_64", + "version": "#35-Ubuntu SMP Thu Jan 24 13:15:40 UTC 2013", + "ip_addr": "127.0.0.1", + "architecture_bits": "64bit", + "architecture_linkage": "ELF", + "release": "3.5.0-23-generic", + "network_name": "loki", + "processor": "x86_64" + } + ], + "duration": 5.158429861068726, + "diff": "diff --git a/script.py b/script.py\nindex ec41d60..dd94f39 100644\n--- a/script.py\n+++ b/script.py\n@@ -30,16 +30,5 @@ def run(totalSteps=10,\n NxBase=1200)\n \n if __name__ == '__main__':\n-\n-\n- class Bare(object):\n- pass\n-\n- \n- args = Bare()\n- parser = argparse.ArgumentParser(description=\"Run Extremefill 2D example.\")\n- parser.add_argument('--totalSteps', default=1, type=int)\n- parser.parse_args(namespace=args)\n-\n- run(totalSteps=args.totalSteps, tags=('test',), reason=\"testing SMT class\")\n+ run(totalSteps=2, CFL=0.1)\n \ndiff --git a/smtdecorator.py b/smtdecorator.py\nindex 432a8b7..826170c 100644\n--- a/smtdecorator.py\n+++ b/smtdecorator.py\n@@ -1,4 +1,3 @@\n-\n \"\"\"\n Script to test setting up batch simaulations with Sumatra.\n \n@@ -22,8 +21,8 @@ On laptop use http://129.6.153.60:8000\n import time\n import os\n import sys\n-from contextlib import contextmanager\n from StringIO import StringIO\n+import argparse\n \n \n from sumatra.projects import load_project\n@@ -59,18 +58,21 @@ class SMTDecorator(object):\n def __init__(self, function):\n self.function = function\n \n- def __call__(self, tags=(), reason='', *args, **kwargs):\n+ def __call__(self, tag=[], reason='', *args, **kwargs):\n+\n+ parameters, tag, reason = self.parseargs(kwargs, list(tag), reason)\n+\n project = load_project()\n- record = project.new_record(parameters=SimpleParameterSet(kwargs),\n+ record = project.new_record(parameters=SimpleParameterSet(parameters),\n main_file=self.function.func_globals['__file__'],\n reason=reason)\n \n record.datastore.root = os.path.join(record.datastore.root, record.label)\n- for tag in tags:\n- record.tags.add(tag)\n \n- record.start_time = time.time()\n+ for t in tag:\n+ record.tags.add(t)\n \n+ record.start_time = time.time()\n with Redirect() as out:\n returnvalue = self.function(datadir=record.datastore.root, *args, **record.parameters.as_dict())\n \n@@ -84,5 +86,25 @@ class SMTDecorator(object):\n \n return returnvalue\n \n+ def parseargs(self, func_kwargs, tag, reason):\n+ class Bare:\n+ pass\n+ ext_kwargs = Bare()\n+ parser = argparse.ArgumentParser(description=\"SMT arguments\")\n+\n+ for k, v in func_kwargs.iteritems():\n+ parser.add_argument('--' + k, default=v, type=type(v), dest=k)\n+ \n+ parser.add_argument('--tag', action='append', default=tag, dest='tag')\n+ parser.add_argument('--reason', default=reason, dest='reason')\n+ parser.parse_args(namespace=ext_kwargs)\n \n+ tag = ext_kwargs.tag\n+ reason = ext_kwargs.reason\n \n+ for k, v in func_kwargs.iteritems():\n+ func_kwargs[k] = getattr(ext_kwargs, k)\n+ \n+ return func_kwargs, tag, reason\n+ \n+ ", + "datastore": { + "type": "FileSystemDataStore", + "parameters": { + "root": "./Data/92ab7fa9b5b5" + } + }, + "input_datastore": { + "type": "FileSystemDataStore", + "parameters": { + "root": "/" + } + }, + "executable": { + "path": "/home/wd15/.virtualenvs/default/bin/python", + "version": "2.7.3", + "name": "Python", + "options": "" + }, + "parameters": { + "content": "totalSteps = 2\nCFL = 0.1", + "type": "SimpleParameterSet" + }, + "label": "92ab7fa9b5b5", + "version": "03128c81e5ec503445a0a10166626c2e902ba41e", + "stdout_stderr": "[ 1. 1. 1. 1.]\n[ 0.34738209 0.61535499 0.01923836 0.00971058]\n[ 1.23729704e-01 2.14204081e-01 1.88311438e-04 1.55991524e-03]\n\ntheta 0.0\ncBar_supp 1.0\ncBar_cu 1.0\npotentialBar 1.0\nmin(extension) 7.22965473284e-08\nmin(depositionRate) 2.09114908795e-09\nmin(current) 56.8350759862\nmin(cupric) 997.266139623\nmin(baseCurrent) 56.9323002935\nmax(interfaceTheta) - 1: -0.973021297371\nmin(interfaceTheta) 0.0\nmin(I0) 38.9208518948\ndt 0.011\nelapsed time 0.0\nstep 0\n\n[ 1. 1. 1. 1.]\n[ 0.10765512 0.04576554 0.03330295 0.00523947]\n\ntheta 0.0\ncBar_supp 1.0\ncBar_cu 1.0\npotentialBar 1.0\nmin(extension) 2.09114554699e-09\nmin(depositionRate) 1.47837489306e-09\nmin(current) 40.1805638188\nmin(cupric) 996.200886814\nmin(baseCurrent) 40.2838895551\nmax(interfaceTheta) - 1: -0.947107282423\nmin(interfaceTheta) 0.0\nmin(I0) 37.8842912969\ndt 0.0121\nelapsed time 0.011\nstep 1\n\n", + "repository": { + "url": "/home/wd15/git/extremefill-data", + "type": "GitRepository", + "upstream": "git@github.com:wd15/extremefill-data.git" + }, + "tags": [], + "timestamp": "2013-02-19 10:45:30", + "reason": "", + "dependencies": [ + { + "name": "Cython", + "module": "python", + "source": "attribute", + "version": "0.16", + "diff": "", + "path": "/usr/lib/python2.7/dist-packages/Cython" + }, + { + "name": "IPython", + "module": "python", + "source": "attribute", + "version": "0.13.1.rc2", + "diff": "", + "path": "/usr/lib/python2.7/dist-packages/IPython" + }, + { + "name": "PIL", + "module": "python", + "source": null, + "version": "unknown", + "diff": "", + "path": "/usr/lib/python2.7/dist-packages/PIL" + }, + { + "name": "PyQt4", + "module": "python", + "source": null, + "version": "unknown", + "diff": "", + "path": "/usr/lib/python2.7/dist-packages/PyQt4" + }, + { + "name": "PyTrilinos", + "module": "python", + "source": "attribute", + "version": "4.8d", + "diff": "", + "path": "/home/wd15/.virtualenvs/fipy/lib/python2.7/site-packages/PyTrilinos" + }, + { + "name": "dateutil", + "module": "python", + "source": "attribute", + "version": "1.5", + "diff": "", + "path": "/usr/lib/python2.7/dist-packages/dateutil" + }, + { + "name": "distutils", + "module": "python", + "source": "attribute", + "version": "2.7.3", + "diff": "", + "path": "/home/wd15/.virtualenvs/default/lib/python2.7/distutils" + }, + { + "name": "django", + "module": "python", + "source": "attribute", + "version": "1.4.1", + "diff": "", + "path": "/usr/lib/python2.7/dist-packages/django" + }, + { + "name": "docutils", + "module": "python", + "source": "attribute", + "version": "0.10", + "diff": "", + "path": "/home/wd15/.virtualenvs/fipy/lib/python2.7/site-packages/docutils" + }, + { + "name": "encodings", + "module": "python", + "source": null, + "version": "unknown", + "diff": "", + "path": "/home/wd15/.virtualenvs/default/lib/python2.7/encodings" + }, + { + "name": "extremefill", + "module": "python", + "source": "/home/wd15/git/extremefill", + "version": "549c969edb113d0b3e9804612bfa53e91319c0ea", + "diff": "diff --git a/data/viewer.py b/data/viewer.py\nindex 68f60e0..d9ab7c2 100644\n--- a/data/viewer.py\n+++ b/data/viewer.py\n@@ -122,7 +122,7 @@ class ContourViewer(BaseViewer):\n self.times = times\n self.contours = contours\n self.data = []\n- super(ContourViewer, self).__init__(branches=branches, datafile=datafiles, datafiles=datafiles)\n+ super(ContourViewer, self).__init__(branches=branches, datafile=datafile, datafiles=datafiles)\n \n def plot(self):\n import matplotlib.pyplot as plt\n@@ -152,6 +152,24 @@ class ContourViewer(BaseViewer):\n phi = np.reshape(phi, shape)\n self.data.append((x, y, phi))\n \n+def datafilesFromBranches(branches, datafile):\n+ cwd = os.getcwd()\n+ for count, branch in enumerate(branches):\n+ print 'branch',branch\n+ tempdir = gitCloneToTemp(branch=branch, repositoryPath='ssh://wd15@genie.nist.gov/users/wd15/git/extremefill')\n+ repopath = os.path.join(tempdir, 'extremefill')\n+ datapath = os.path.join(repopath, datafile)\n+ gitMediaSync()\n+ if count == 0:\n+ self.addBaseData(datapath)\n+ basetempdir = tempdir\n+ else:\n+ self.addData(datapath, branch)\n+ cleanTempRepo(tempdir) \n+\n+ cleanTempRepo(basetempdir)\n+ os.chdir(cwd)\n+\n def plotNx():\n branches = ('Nx600', 'Nx300', 'Nx150')\n datafile = os.path.join('data', 'data.h5')\n@@ -174,13 +192,13 @@ def plotCFL():\n \n def plotContour():\n # branches = ('CFL0.0125', 'CFL0.025', 'CFL0.05', 'CFL0.1', 'CFL0.2', 'CFL0.4', 'CFL0.8', 'CFL1.6')\n- branches = ('Nx600', 'Nx150')\n+ branches = ('Nx300', 'Nx150')\n # branches = ('CFL0.025', 'CFL0.05')\n datafile = os.path.join('data', 'data.h5')\n times = (0,)\n- # times = (0., 1000., 2000., 3000., 4000.)\n- # viewer = ContourViewer(times=times, branches=branches, datafile=datafile)\n- viewer = ContourViewer(times=times, branches=branches, datafile=datafile, datafiles=('data150.h5', 'data600.h5'))\n+ times = (0., 1000., 2000., 3000., 4000.)\n+ viewer = ContourViewer(times=times, branches=branches, datafile=datafile)\n+ #viewer = ContourViewer(times=times, branches=branches, datafile=datafile, datafiles=('data150.h5', 'data600.h5'))\n viewer.plot()\n \n if __name__ == '__main__':\n@@ -188,6 +206,6 @@ if __name__ == '__main__':\n # from profiler import calibrate_profiler\n # fudge = calibrate_profiler(10000)\n # profile = Profiler('profile', fudge=fudge)\n- plotCFL()\n+ plotContour()\n # profile.stop()\n ", + "path": "/home/wd15/git/extremefill/extremefill" + }, + { + "name": "fipy", + "module": "python", + "source": "/home/wd15/git/fipy", + "version": "8c51478a3e8c30618b3a96c132612a46735c7548", + "diff": "", + "path": "/home/wd15/git/fipy/fipy" + }, + { + "name": "gi", + "module": "python", + "source": "attribute", + "version": "3.4.0", + "diff": "", + "path": "/usr/lib/python2.7/dist-packages/gi" + }, + { + "name": "glib", + "module": "python", + "source": null, + "version": "unknown", + "diff": "", + "path": "/usr/lib/python2.7/dist-packages/glib" + }, + { + "name": "gobject", + "module": "python", + "source": null, + "version": "unknown", + "diff": "", + "path": "/usr/lib/python2.7/dist-packages/gobject" + }, + { + "name": "google", + "module": "python", + "source": null, + "version": "unknown", + "diff": "", + "path": "/usr/lib/python2.7/dist-packages/google" + }, + { + "name": "gtk", + "module": "python", + "source": null, + "version": "unknown", + "diff": "", + "path": "/usr/lib/python2.7/dist-packages/gtk-2.0/gtk" + }, + { + "name": "httplib2", + "module": "python", + "source": "attribute", + "version": "0.7.4", + "diff": "", + "path": "/usr/lib/python2.7/dist-packages/httplib2" + }, + { + "name": "lockfile", + "module": "python", + "source": "egg-info", + "version": "0.9.1", + "diff": "", + "path": "/home/wd15/.virtualenvs/default/lib/python2.7/site-packages/lockfile-0.9.1-py2.7.egg/lockfile" + }, + { + "name": "lxml", + "module": "python", + "source": null, + "version": "unknown", + "diff": "", + "path": "/usr/lib/python2.7/dist-packages/lxml" + }, + { + "name": "matplotlib", + "module": "python", + "source": "attribute", + "version": "1.1.1", + "diff": "", + "path": "/usr/lib/pymodules/python2.7/matplotlib" + }, + { + "name": "mayavi", + "module": "python", + "source": "attribute", + "version": "4.1.0", + "diff": "", + "path": "/usr/lib/python2.7/dist-packages/mayavi" + }, + { + "name": "mpi4py", + "module": "python", + "source": "attribute", + "version": "1.3", + "diff": "", + "path": "/usr/lib/python2.7/dist-packages/mpi4py" + }, + { + "name": "mpl_toolkits", + "module": "python", + "source": null, + "version": "unknown", + "diff": "", + "path": "/usr/lib/pymodules/python2.7/mpl_toolkits" + }, + { + "name": "mx", + "module": "python", + "source": "attribute", + "version": "3.2.1", + "diff": "", + "path": "/usr/lib/python2.7/dist-packages/mx" + }, + { + "name": "nose", + "module": "python", + "source": "attribute", + "version": "1.2.1", + "diff": "", + "path": "/home/wd15/.virtualenvs/fipy/lib/python2.7/site-packages/nose" + }, + { + "name": "numexpr", + "module": "python", + "source": "attribute", + "version": "2.0.1", + "diff": "", + "path": "/usr/lib/python2.7/dist-packages/numexpr" + }, + { + "name": "numpy", + "module": "python", + "source": "attribute", + "version": "1.6.2", + "diff": "", + "path": "/usr/lib/python2.7/dist-packages/numpy" + }, + { + "name": "pyamg", + "module": "python", + "source": "attribute", + "version": "2.0.4.dev", + "diff": "", + "path": "/home/wd15/.virtualenvs/fipy/lib/python2.7/site-packages/pyamg" + }, + { + "name": "pylsmlib", + "module": "python", + "source": "/home/wd15/git/LSMLIB", + "version": "6f5d969bb27530aa37452a8b096e538a5cf7b993", + "diff": "", + "path": "/home/wd15/git/LSMLIB/pylsmlib/pylsmlib" + }, + { + "name": "pysparse", + "module": "python", + "source": "attribute", + "version": "1.1", + "diff": "", + "path": "/usr/lib/python2.7/dist-packages/pysparse" + }, + { + "name": "pytz", + "module": "python", + "source": "attribute", + "version": "2011k", + "diff": "", + "path": "/usr/lib/python2.7/dist-packages/pytz" + }, + { + "name": "scipy", + "module": "python", + "source": "attribute", + "version": "0.10.1", + "diff": "", + "path": "/usr/lib/python2.7/dist-packages/scipy" + }, + { + "name": "setuptools", + "module": "python", + "source": "attribute", + "version": "0.6", + "diff": "", + "path": "/home/wd15/.virtualenvs/default/local/lib/python2.7/site-packages/distribute-0.6.24-py2.7.egg/setuptools" + }, + { + "name": "simplejson", + "module": "python", + "source": "attribute", + "version": "2.6.1", + "diff": "", + "path": "/usr/lib/python2.7/dist-packages/simplejson" + }, + { + "name": "skfmm", + "module": "python", + "source": "/home/wd15/git/scikit-fmm", + "version": "467e5982fbd9d4eb32495f826d6bda65da498e13", + "diff": "", + "path": "/home/wd15/git/scikit-fmm/skfmm" + }, + { + "name": "sumatra", + "module": "python", + "source": "attribute", + "version": "0.5.0dev", + "diff": "", + "path": "/home/wd15/.virtualenvs/default/lib/python2.7/site-packages/Sumatra-0.5.0dev-py2.7.egg/sumatra" + }, + { + "name": "tables", + "module": "python", + "source": "attribute", + "version": "2.3.1", + "diff": "", + "path": "/usr/lib/python2.7/dist-packages/tables" + }, + { + "name": "tagging", + "module": "python", + "source": "attribute", + "version": "0.3.1", + "diff": "", + "path": "/home/wd15/.virtualenvs/fipy/lib/python2.7/site-packages/tagging" + }, + { + "name": "tornado", + "module": "python", + "source": "attribute", + "version": "2.3", + "diff": "", + "path": "/usr/lib/python2.7/dist-packages/tornado" + }, + { + "name": "traits", + "module": "python", + "source": "attribute", + "version": "4.1.0", + "diff": "", + "path": "/usr/lib/python2.7/dist-packages/traits" + }, + { + "name": "tvtk", + "module": "python", + "source": null, + "version": "unknown", + "diff": "", + "path": "/usr/lib/python2.7/dist-packages/tvtk" + }, + { + "name": "vtk", + "module": "python", + "source": null, + "version": "unknown", + "diff": "", + "path": "/usr/lib/pymodules/python2.7/vtk" + }, + { + "name": "wx", + "module": "python", + "source": "attribute", + "version": "2.8.12.1", + "diff": "", + "path": "/usr/lib/python2.7/dist-packages/wx-2.8-gtk2-unicode/wx" + }, + { + "name": "yaml", + "module": "python", + "source": "attribute", + "version": "3.10", + "diff": "", + "path": "/usr/lib/python2.7/dist-packages/yaml" + }, + { + "name": "zmq", + "module": "python", + "source": "attribute", + "version": "2.2.0", + "diff": "", + "path": "/usr/lib/python2.7/dist-packages/zmq" + } + ], + "user": "Daniel Wheeler ", + "output_data": [ + { + "path": "data.h5", + "digest": "1e2b6274f8abac9aee34a921e8e8804af8054d10", + "metadata": { + "mimetype": null, + "size": 102992, + "encoding": null + } + } + ], + "input_data": [], + "launch_mode": { + "type": "SerialLaunchMode", + "parameters": { + "working_directory": "/home/wd15/git/extremefill-data" + } + }, + "main_file": "script.py", + "outcome": "" +}, +{ + "script_arguments": "", + "platforms": [ + { + "system_name": "Linux", + "machine": "x86_64", + "version": "#35-Ubuntu SMP Thu Jan 24 13:15:40 UTC 2013", + "ip_addr": "127.0.0.1", + "architecture_bits": "64bit", + "architecture_linkage": "ELF", + "release": "3.5.0-23-generic", + "network_name": "loki", + "processor": "x86_64" + } + ], + "duration": 5.70021915435791, + "diff": "diff --git a/script.py b/script.py\nindex ec41d60..dd94f39 100644\n--- a/script.py\n+++ b/script.py\n@@ -30,16 +30,5 @@ def run(totalSteps=10,\n NxBase=1200)\n \n if __name__ == '__main__':\n-\n-\n- class Bare(object):\n- pass\n-\n- \n- args = Bare()\n- parser = argparse.ArgumentParser(description=\"Run Extremefill 2D example.\")\n- parser.add_argument('--totalSteps', default=1, type=int)\n- parser.parse_args(namespace=args)\n-\n- run(totalSteps=args.totalSteps, tags=('test',), reason=\"testing SMT class\")\n+ run(totalSteps=2, CFL=0.1)\n \ndiff --git a/smtdecorator.py b/smtdecorator.py\nindex 432a8b7..826170c 100644\n--- a/smtdecorator.py\n+++ b/smtdecorator.py\n@@ -1,4 +1,3 @@\n-\n \"\"\"\n Script to test setting up batch simaulations with Sumatra.\n \n@@ -22,8 +21,8 @@ On laptop use http://129.6.153.60:8000\n import time\n import os\n import sys\n-from contextlib import contextmanager\n from StringIO import StringIO\n+import argparse\n \n \n from sumatra.projects import load_project\n@@ -59,18 +58,21 @@ class SMTDecorator(object):\n def __init__(self, function):\n self.function = function\n \n- def __call__(self, tags=(), reason='', *args, **kwargs):\n+ def __call__(self, tag=[], reason='', *args, **kwargs):\n+\n+ parameters, tag, reason = self.parseargs(kwargs, list(tag), reason)\n+\n project = load_project()\n- record = project.new_record(parameters=SimpleParameterSet(kwargs),\n+ record = project.new_record(parameters=SimpleParameterSet(parameters),\n main_file=self.function.func_globals['__file__'],\n reason=reason)\n \n record.datastore.root = os.path.join(record.datastore.root, record.label)\n- for tag in tags:\n- record.tags.add(tag)\n \n- record.start_time = time.time()\n+ for t in tag:\n+ record.tags.add(t)\n \n+ record.start_time = time.time()\n with Redirect() as out:\n returnvalue = self.function(datadir=record.datastore.root, *args, **record.parameters.as_dict())\n \n@@ -84,5 +86,25 @@ class SMTDecorator(object):\n \n return returnvalue\n \n+ def parseargs(self, func_kwargs, tag, reason):\n+ class Bare:\n+ pass\n+ ext_kwargs = Bare()\n+ parser = argparse.ArgumentParser(description=\"SMT arguments\")\n+\n+ for k, v in func_kwargs.iteritems():\n+ parser.add_argument('--' + k, default=v, type=type(v), dest=k)\n+ \n+ parser.add_argument('--tag', action='append', default=tag, dest='tag')\n+ parser.add_argument('--reason', default=reason, dest='reason')\n+ parser.parse_args(namespace=ext_kwargs)\n \n+ tag = ext_kwargs.tag\n+ reason = ext_kwargs.reason\n \n+ for k, v in func_kwargs.iteritems():\n+ func_kwargs[k] = getattr(ext_kwargs, k)\n+ \n+ return func_kwargs, tag, reason\n+ \n+ ", + "datastore": { + "type": "FileSystemDataStore", + "parameters": { + "root": "./Data/5bf0ada87657" + } + }, + "input_datastore": { + "type": "FileSystemDataStore", + "parameters": { + "root": "/" + } + }, + "executable": { + "path": "/home/wd15/.virtualenvs/default/bin/python", + "version": "2.7.3", + "name": "Python", + "options": "" + }, + "parameters": { + "content": "totalSteps = 2\nCFL = 0.2", + "type": "SimpleParameterSet" + }, + "label": "5bf0ada87657", + "version": "03128c81e5ec503445a0a10166626c2e902ba41e", + "stdout_stderr": "[ 1. 1. 1. 1.]\n[ 0.34738209 0.61535499 0.01923836 0.00971058]\n[ 1.23729704e-01 2.14204081e-01 1.88311438e-04 1.55991524e-03]\n\ntheta 0.0\ncBar_supp 1.0\ncBar_cu 1.0\npotentialBar 1.0\nmin(extension) 7.22965473284e-08\nmin(depositionRate) 2.09114908795e-09\nmin(current) 56.8350759862\nmin(cupric) 997.266139623\nmin(baseCurrent) 56.9323002935\nmax(interfaceTheta) - 1: -0.973021297371\nmin(interfaceTheta) 0.0\nmin(I0) 38.9208518948\ndt 0.011\nelapsed time 0.0\nstep 0\n\n[ 1. 1. 1. 1.]\n[ 0.10765512 0.04576554 0.03330295 0.00523947]\n\ntheta 0.0\ncBar_supp 1.0\ncBar_cu 1.0\npotentialBar 1.0\nmin(extension) 2.09114554699e-09\nmin(depositionRate) 1.47837489306e-09\nmin(current) 40.1805638188\nmin(cupric) 996.200886814\nmin(baseCurrent) 40.2838895551\nmax(interfaceTheta) - 1: -0.947107282423\nmin(interfaceTheta) 0.0\nmin(I0) 37.8842912969\ndt 0.0121\nelapsed time 0.011\nstep 1\n\n", + "repository": { + "url": "/home/wd15/git/extremefill-data", + "type": "GitRepository", + "upstream": "git@github.com:wd15/extremefill-data.git" + }, + "tags": [], + "timestamp": "2013-02-19 10:45:30", + "reason": "", + "dependencies": [ + { + "name": "Cython", + "module": "python", + "source": "attribute", + "version": "0.16", + "diff": "", + "path": "/usr/lib/python2.7/dist-packages/Cython" + }, + { + "name": "IPython", + "module": "python", + "source": "attribute", + "version": "0.13.1.rc2", + "diff": "", + "path": "/usr/lib/python2.7/dist-packages/IPython" + }, + { + "name": "PIL", + "module": "python", + "source": null, + "version": "unknown", + "diff": "", + "path": "/usr/lib/python2.7/dist-packages/PIL" + }, + { + "name": "PyQt4", + "module": "python", + "source": null, + "version": "unknown", + "diff": "", + "path": "/usr/lib/python2.7/dist-packages/PyQt4" + }, + { + "name": "PyTrilinos", + "module": "python", + "source": "attribute", + "version": "4.8d", + "diff": "", + "path": "/home/wd15/.virtualenvs/fipy/lib/python2.7/site-packages/PyTrilinos" + }, + { + "name": "dateutil", + "module": "python", + "source": "attribute", + "version": "1.5", + "diff": "", + "path": "/usr/lib/python2.7/dist-packages/dateutil" + }, + { + "name": "distutils", + "module": "python", + "source": "attribute", + "version": "2.7.3", + "diff": "", + "path": "/home/wd15/.virtualenvs/default/lib/python2.7/distutils" + }, + { + "name": "django", + "module": "python", + "source": "attribute", + "version": "1.4.1", + "diff": "", + "path": "/usr/lib/python2.7/dist-packages/django" + }, + { + "name": "docutils", + "module": "python", + "source": "attribute", + "version": "0.10", + "diff": "", + "path": "/home/wd15/.virtualenvs/fipy/lib/python2.7/site-packages/docutils" + }, + { + "name": "encodings", + "module": "python", + "source": null, + "version": "unknown", + "diff": "", + "path": "/home/wd15/.virtualenvs/default/lib/python2.7/encodings" + }, + { + "name": "extremefill", + "module": "python", + "source": "/home/wd15/git/extremefill", + "version": "549c969edb113d0b3e9804612bfa53e91319c0ea", + "diff": "diff --git a/data/viewer.py b/data/viewer.py\nindex 68f60e0..d9ab7c2 100644\n--- a/data/viewer.py\n+++ b/data/viewer.py\n@@ -122,7 +122,7 @@ class ContourViewer(BaseViewer):\n self.times = times\n self.contours = contours\n self.data = []\n- super(ContourViewer, self).__init__(branches=branches, datafile=datafiles, datafiles=datafiles)\n+ super(ContourViewer, self).__init__(branches=branches, datafile=datafile, datafiles=datafiles)\n \n def plot(self):\n import matplotlib.pyplot as plt\n@@ -152,6 +152,24 @@ class ContourViewer(BaseViewer):\n phi = np.reshape(phi, shape)\n self.data.append((x, y, phi))\n \n+def datafilesFromBranches(branches, datafile):\n+ cwd = os.getcwd()\n+ for count, branch in enumerate(branches):\n+ print 'branch',branch\n+ tempdir = gitCloneToTemp(branch=branch, repositoryPath='ssh://wd15@genie.nist.gov/users/wd15/git/extremefill')\n+ repopath = os.path.join(tempdir, 'extremefill')\n+ datapath = os.path.join(repopath, datafile)\n+ gitMediaSync()\n+ if count == 0:\n+ self.addBaseData(datapath)\n+ basetempdir = tempdir\n+ else:\n+ self.addData(datapath, branch)\n+ cleanTempRepo(tempdir) \n+\n+ cleanTempRepo(basetempdir)\n+ os.chdir(cwd)\n+\n def plotNx():\n branches = ('Nx600', 'Nx300', 'Nx150')\n datafile = os.path.join('data', 'data.h5')\n@@ -174,13 +192,13 @@ def plotCFL():\n \n def plotContour():\n # branches = ('CFL0.0125', 'CFL0.025', 'CFL0.05', 'CFL0.1', 'CFL0.2', 'CFL0.4', 'CFL0.8', 'CFL1.6')\n- branches = ('Nx600', 'Nx150')\n+ branches = ('Nx300', 'Nx150')\n # branches = ('CFL0.025', 'CFL0.05')\n datafile = os.path.join('data', 'data.h5')\n times = (0,)\n- # times = (0., 1000., 2000., 3000., 4000.)\n- # viewer = ContourViewer(times=times, branches=branches, datafile=datafile)\n- viewer = ContourViewer(times=times, branches=branches, datafile=datafile, datafiles=('data150.h5', 'data600.h5'))\n+ times = (0., 1000., 2000., 3000., 4000.)\n+ viewer = ContourViewer(times=times, branches=branches, datafile=datafile)\n+ #viewer = ContourViewer(times=times, branches=branches, datafile=datafile, datafiles=('data150.h5', 'data600.h5'))\n viewer.plot()\n \n if __name__ == '__main__':\n@@ -188,6 +206,6 @@ if __name__ == '__main__':\n # from profiler import calibrate_profiler\n # fudge = calibrate_profiler(10000)\n # profile = Profiler('profile', fudge=fudge)\n- plotCFL()\n+ plotContour()\n # profile.stop()\n ", + "path": "/home/wd15/git/extremefill/extremefill" + }, + { + "name": "fipy", + "module": "python", + "source": "/home/wd15/git/fipy", + "version": "8c51478a3e8c30618b3a96c132612a46735c7548", + "diff": "", + "path": "/home/wd15/git/fipy/fipy" + }, + { + "name": "gi", + "module": "python", + "source": "attribute", + "version": "3.4.0", + "diff": "", + "path": "/usr/lib/python2.7/dist-packages/gi" + }, + { + "name": "glib", + "module": "python", + "source": null, + "version": "unknown", + "diff": "", + "path": "/usr/lib/python2.7/dist-packages/glib" + }, + { + "name": "gobject", + "module": "python", + "source": null, + "version": "unknown", + "diff": "", + "path": "/usr/lib/python2.7/dist-packages/gobject" + }, + { + "name": "google", + "module": "python", + "source": null, + "version": "unknown", + "diff": "", + "path": "/usr/lib/python2.7/dist-packages/google" + }, + { + "name": "gtk", + "module": "python", + "source": null, + "version": "unknown", + "diff": "", + "path": "/usr/lib/python2.7/dist-packages/gtk-2.0/gtk" + }, + { + "name": "httplib2", + "module": "python", + "source": "attribute", + "version": "0.7.4", + "diff": "", + "path": "/usr/lib/python2.7/dist-packages/httplib2" + }, + { + "name": "lockfile", + "module": "python", + "source": "egg-info", + "version": "0.9.1", + "diff": "", + "path": "/home/wd15/.virtualenvs/default/lib/python2.7/site-packages/lockfile-0.9.1-py2.7.egg/lockfile" + }, + { + "name": "lxml", + "module": "python", + "source": null, + "version": "unknown", + "diff": "", + "path": "/usr/lib/python2.7/dist-packages/lxml" + }, + { + "name": "matplotlib", + "module": "python", + "source": "attribute", + "version": "1.1.1", + "diff": "", + "path": "/usr/lib/pymodules/python2.7/matplotlib" + }, + { + "name": "mayavi", + "module": "python", + "source": "attribute", + "version": "4.1.0", + "diff": "", + "path": "/usr/lib/python2.7/dist-packages/mayavi" + }, + { + "name": "mpi4py", + "module": "python", + "source": "attribute", + "version": "1.3", + "diff": "", + "path": "/usr/lib/python2.7/dist-packages/mpi4py" + }, + { + "name": "mpl_toolkits", + "module": "python", + "source": null, + "version": "unknown", + "diff": "", + "path": "/usr/lib/pymodules/python2.7/mpl_toolkits" + }, + { + "name": "mx", + "module": "python", + "source": "attribute", + "version": "3.2.1", + "diff": "", + "path": "/usr/lib/python2.7/dist-packages/mx" + }, + { + "name": "nose", + "module": "python", + "source": "attribute", + "version": "1.2.1", + "diff": "", + "path": "/home/wd15/.virtualenvs/fipy/lib/python2.7/site-packages/nose" + }, + { + "name": "numexpr", + "module": "python", + "source": "attribute", + "version": "2.0.1", + "diff": "", + "path": "/usr/lib/python2.7/dist-packages/numexpr" + }, + { + "name": "numpy", + "module": "python", + "source": "attribute", + "version": "1.6.2", + "diff": "", + "path": "/usr/lib/python2.7/dist-packages/numpy" + }, + { + "name": "pyamg", + "module": "python", + "source": "attribute", + "version": "2.0.4.dev", + "diff": "", + "path": "/home/wd15/.virtualenvs/fipy/lib/python2.7/site-packages/pyamg" + }, + { + "name": "pylsmlib", + "module": "python", + "source": "/home/wd15/git/LSMLIB", + "version": "6f5d969bb27530aa37452a8b096e538a5cf7b993", + "diff": "", + "path": "/home/wd15/git/LSMLIB/pylsmlib/pylsmlib" + }, + { + "name": "pysparse", + "module": "python", + "source": "attribute", + "version": "1.1", + "diff": "", + "path": "/usr/lib/python2.7/dist-packages/pysparse" + }, + { + "name": "pytz", + "module": "python", + "source": "attribute", + "version": "2011k", + "diff": "", + "path": "/usr/lib/python2.7/dist-packages/pytz" + }, + { + "name": "scipy", + "module": "python", + "source": "attribute", + "version": "0.10.1", + "diff": "", + "path": "/usr/lib/python2.7/dist-packages/scipy" + }, + { + "name": "setuptools", + "module": "python", + "source": "attribute", + "version": "0.6", + "diff": "", + "path": "/home/wd15/.virtualenvs/default/local/lib/python2.7/site-packages/distribute-0.6.24-py2.7.egg/setuptools" + }, + { + "name": "simplejson", + "module": "python", + "source": "attribute", + "version": "2.6.1", + "diff": "", + "path": "/usr/lib/python2.7/dist-packages/simplejson" + }, + { + "name": "skfmm", + "module": "python", + "source": "/home/wd15/git/scikit-fmm", + "version": "467e5982fbd9d4eb32495f826d6bda65da498e13", + "diff": "", + "path": "/home/wd15/git/scikit-fmm/skfmm" + }, + { + "name": "sumatra", + "module": "python", + "source": "attribute", + "version": "0.5.0dev", + "diff": "", + "path": "/home/wd15/.virtualenvs/default/lib/python2.7/site-packages/Sumatra-0.5.0dev-py2.7.egg/sumatra" + }, + { + "name": "tables", + "module": "python", + "source": "attribute", + "version": "2.3.1", + "diff": "", + "path": "/usr/lib/python2.7/dist-packages/tables" + }, + { + "name": "tagging", + "module": "python", + "source": "attribute", + "version": "0.3.1", + "diff": "", + "path": "/home/wd15/.virtualenvs/fipy/lib/python2.7/site-packages/tagging" + }, + { + "name": "tornado", + "module": "python", + "source": "attribute", + "version": "2.3", + "diff": "", + "path": "/usr/lib/python2.7/dist-packages/tornado" + }, + { + "name": "traits", + "module": "python", + "source": "attribute", + "version": "4.1.0", + "diff": "", + "path": "/usr/lib/python2.7/dist-packages/traits" + }, + { + "name": "tvtk", + "module": "python", + "source": null, + "version": "unknown", + "diff": "", + "path": "/usr/lib/python2.7/dist-packages/tvtk" + }, + { + "name": "vtk", + "module": "python", + "source": null, + "version": "unknown", + "diff": "", + "path": "/usr/lib/pymodules/python2.7/vtk" + }, + { + "name": "wx", + "module": "python", + "source": "attribute", + "version": "2.8.12.1", + "diff": "", + "path": "/usr/lib/python2.7/dist-packages/wx-2.8-gtk2-unicode/wx" + }, + { + "name": "yaml", + "module": "python", + "source": "attribute", + "version": "3.10", + "diff": "", + "path": "/usr/lib/python2.7/dist-packages/yaml" + }, + { + "name": "zmq", + "module": "python", + "source": "attribute", + "version": "2.2.0", + "diff": "", + "path": "/usr/lib/python2.7/dist-packages/zmq" + } + ], + "user": "Daniel Wheeler ", + "output_data": [ + { + "path": "data.h5", + "digest": "1e2b6274f8abac9aee34a921e8e8804af8054d10", + "metadata": { + "mimetype": null, + "size": 102992, + "encoding": null + } + } + ], + "input_data": [], + "launch_mode": { + "type": "SerialLaunchMode", + "parameters": { + "working_directory": "/home/wd15/git/extremefill-data" + } + }, + "main_file": "script.py", + "outcome": "" +}, +{ + "script_arguments": "", + "platforms": [ + { + "system_name": "Linux", + "machine": "x86_64", + "version": "#35-Ubuntu SMP Thu Jan 24 13:15:40 UTC 2013", + "ip_addr": "127.0.0.1", + "architecture_bits": "64bit", + "architecture_linkage": "ELF", + "release": "3.5.0-23-generic", + "network_name": "loki", + "processor": "x86_64" + } + ], + "duration": 6.002815008163452, + "diff": "diff --git a/script.py b/script.py\nindex ec41d60..dd94f39 100644\n--- a/script.py\n+++ b/script.py\n@@ -30,16 +30,5 @@ def run(totalSteps=10,\n NxBase=1200)\n \n if __name__ == '__main__':\n-\n-\n- class Bare(object):\n- pass\n-\n- \n- args = Bare()\n- parser = argparse.ArgumentParser(description=\"Run Extremefill 2D example.\")\n- parser.add_argument('--totalSteps', default=1, type=int)\n- parser.parse_args(namespace=args)\n-\n- run(totalSteps=args.totalSteps, tags=('test',), reason=\"testing SMT class\")\n+ run(totalSteps=2, CFL=0.1)\n \ndiff --git a/smtdecorator.py b/smtdecorator.py\nindex 432a8b7..826170c 100644\n--- a/smtdecorator.py\n+++ b/smtdecorator.py\n@@ -1,4 +1,3 @@\n-\n \"\"\"\n Script to test setting up batch simaulations with Sumatra.\n \n@@ -22,8 +21,8 @@ On laptop use http://129.6.153.60:8000\n import time\n import os\n import sys\n-from contextlib import contextmanager\n from StringIO import StringIO\n+import argparse\n \n \n from sumatra.projects import load_project\n@@ -59,18 +58,21 @@ class SMTDecorator(object):\n def __init__(self, function):\n self.function = function\n \n- def __call__(self, tags=(), reason='', *args, **kwargs):\n+ def __call__(self, tag=[], reason='', *args, **kwargs):\n+\n+ parameters, tag, reason = self.parseargs(kwargs, list(tag), reason)\n+\n project = load_project()\n- record = project.new_record(parameters=SimpleParameterSet(kwargs),\n+ record = project.new_record(parameters=SimpleParameterSet(parameters),\n main_file=self.function.func_globals['__file__'],\n reason=reason)\n \n record.datastore.root = os.path.join(record.datastore.root, record.label)\n- for tag in tags:\n- record.tags.add(tag)\n \n- record.start_time = time.time()\n+ for t in tag:\n+ record.tags.add(t)\n \n+ record.start_time = time.time()\n with Redirect() as out:\n returnvalue = self.function(datadir=record.datastore.root, *args, **record.parameters.as_dict())\n \n@@ -84,5 +86,25 @@ class SMTDecorator(object):\n \n return returnvalue\n \n+ def parseargs(self, func_kwargs, tag, reason):\n+ class Bare:\n+ pass\n+ ext_kwargs = Bare()\n+ parser = argparse.ArgumentParser(description=\"SMT arguments\")\n+\n+ for k, v in func_kwargs.iteritems():\n+ parser.add_argument('--' + k, default=v, type=type(v), dest=k)\n+ \n+ parser.add_argument('--tag', action='append', default=tag, dest='tag')\n+ parser.add_argument('--reason', default=reason, dest='reason')\n+ parser.parse_args(namespace=ext_kwargs)\n \n+ tag = ext_kwargs.tag\n+ reason = ext_kwargs.reason\n \n+ for k, v in func_kwargs.iteritems():\n+ func_kwargs[k] = getattr(ext_kwargs, k)\n+ \n+ return func_kwargs, tag, reason\n+ \n+ ", + "datastore": { + "type": "FileSystemDataStore", + "parameters": { + "root": "./Data/f26cd7d959ce" + } + }, + "input_datastore": { + "type": "FileSystemDataStore", + "parameters": { + "root": "/" + } + }, + "executable": { + "path": "/home/wd15/.virtualenvs/default/bin/python", + "version": "2.7.3", + "name": "Python", + "options": "" + }, + "parameters": { + "content": "totalSteps = 2\nCFL = 0.35", + "type": "SimpleParameterSet" + }, + "label": "f26cd7d959ce", + "version": "03128c81e5ec503445a0a10166626c2e902ba41e", + "stdout_stderr": "[ 1. 1. 1. 1.]\n[ 0.34738209 0.61535499 0.01923836 0.00971058]\n[ 1.23729704e-01 2.14204081e-01 1.88311438e-04 1.55991524e-03]\n\ntheta 0.0\ncBar_supp 1.0\ncBar_cu 1.0\npotentialBar 1.0\nmin(extension) 7.22965473284e-08\nmin(depositionRate) 2.09114908795e-09\nmin(current) 56.8350759862\nmin(cupric) 997.266139623\nmin(baseCurrent) 56.9323002935\nmax(interfaceTheta) - 1: -0.973021297371\nmin(interfaceTheta) 0.0\nmin(I0) 38.9208518948\ndt 0.011\nelapsed time 0.0\nstep 0\n\n[ 1. 1. 1. 1.]\n[ 0.10765512 0.04576554 0.03330295 0.00523947]\n\ntheta 0.0\ncBar_supp 1.0\ncBar_cu 1.0\npotentialBar 1.0\nmin(extension) 2.09114554699e-09\nmin(depositionRate) 1.47837489306e-09\nmin(current) 40.1805638188\nmin(cupric) 996.200886814\nmin(baseCurrent) 40.2838895551\nmax(interfaceTheta) - 1: -0.947107282423\nmin(interfaceTheta) 0.0\nmin(I0) 37.8842912969\ndt 0.0121\nelapsed time 0.011\nstep 1\n\n", + "repository": { + "url": "/home/wd15/git/extremefill-data", + "type": "GitRepository", + "upstream": "git@github.com:wd15/extremefill-data.git" + }, + "tags": [], + "timestamp": "2013-02-19 10:45:30", + "reason": "", + "dependencies": [ + { + "name": "Cython", + "module": "python", + "source": "attribute", + "version": "0.16", + "diff": "", + "path": "/usr/lib/python2.7/dist-packages/Cython" + }, + { + "name": "IPython", + "module": "python", + "source": "attribute", + "version": "0.13.1.rc2", + "diff": "", + "path": "/usr/lib/python2.7/dist-packages/IPython" + }, + { + "name": "PIL", + "module": "python", + "source": null, + "version": "unknown", + "diff": "", + "path": "/usr/lib/python2.7/dist-packages/PIL" + }, + { + "name": "PyQt4", + "module": "python", + "source": null, + "version": "unknown", + "diff": "", + "path": "/usr/lib/python2.7/dist-packages/PyQt4" + }, + { + "name": "PyTrilinos", + "module": "python", + "source": "attribute", + "version": "4.8d", + "diff": "", + "path": "/home/wd15/.virtualenvs/fipy/lib/python2.7/site-packages/PyTrilinos" + }, + { + "name": "dateutil", + "module": "python", + "source": "attribute", + "version": "1.5", + "diff": "", + "path": "/usr/lib/python2.7/dist-packages/dateutil" + }, + { + "name": "distutils", + "module": "python", + "source": "attribute", + "version": "2.7.3", + "diff": "", + "path": "/home/wd15/.virtualenvs/default/lib/python2.7/distutils" + }, + { + "name": "django", + "module": "python", + "source": "attribute", + "version": "1.4.1", + "diff": "", + "path": "/usr/lib/python2.7/dist-packages/django" + }, + { + "name": "docutils", + "module": "python", + "source": "attribute", + "version": "0.10", + "diff": "", + "path": "/home/wd15/.virtualenvs/fipy/lib/python2.7/site-packages/docutils" + }, + { + "name": "encodings", + "module": "python", + "source": null, + "version": "unknown", + "diff": "", + "path": "/home/wd15/.virtualenvs/default/lib/python2.7/encodings" + }, + { + "name": "extremefill", + "module": "python", + "source": "/home/wd15/git/extremefill", + "version": "549c969edb113d0b3e9804612bfa53e91319c0ea", + "diff": "diff --git a/data/viewer.py b/data/viewer.py\nindex 68f60e0..d9ab7c2 100644\n--- a/data/viewer.py\n+++ b/data/viewer.py\n@@ -122,7 +122,7 @@ class ContourViewer(BaseViewer):\n self.times = times\n self.contours = contours\n self.data = []\n- super(ContourViewer, self).__init__(branches=branches, datafile=datafiles, datafiles=datafiles)\n+ super(ContourViewer, self).__init__(branches=branches, datafile=datafile, datafiles=datafiles)\n \n def plot(self):\n import matplotlib.pyplot as plt\n@@ -152,6 +152,24 @@ class ContourViewer(BaseViewer):\n phi = np.reshape(phi, shape)\n self.data.append((x, y, phi))\n \n+def datafilesFromBranches(branches, datafile):\n+ cwd = os.getcwd()\n+ for count, branch in enumerate(branches):\n+ print 'branch',branch\n+ tempdir = gitCloneToTemp(branch=branch, repositoryPath='ssh://wd15@genie.nist.gov/users/wd15/git/extremefill')\n+ repopath = os.path.join(tempdir, 'extremefill')\n+ datapath = os.path.join(repopath, datafile)\n+ gitMediaSync()\n+ if count == 0:\n+ self.addBaseData(datapath)\n+ basetempdir = tempdir\n+ else:\n+ self.addData(datapath, branch)\n+ cleanTempRepo(tempdir) \n+\n+ cleanTempRepo(basetempdir)\n+ os.chdir(cwd)\n+\n def plotNx():\n branches = ('Nx600', 'Nx300', 'Nx150')\n datafile = os.path.join('data', 'data.h5')\n@@ -174,13 +192,13 @@ def plotCFL():\n \n def plotContour():\n # branches = ('CFL0.0125', 'CFL0.025', 'CFL0.05', 'CFL0.1', 'CFL0.2', 'CFL0.4', 'CFL0.8', 'CFL1.6')\n- branches = ('Nx600', 'Nx150')\n+ branches = ('Nx300', 'Nx150')\n # branches = ('CFL0.025', 'CFL0.05')\n datafile = os.path.join('data', 'data.h5')\n times = (0,)\n- # times = (0., 1000., 2000., 3000., 4000.)\n- # viewer = ContourViewer(times=times, branches=branches, datafile=datafile)\n- viewer = ContourViewer(times=times, branches=branches, datafile=datafile, datafiles=('data150.h5', 'data600.h5'))\n+ times = (0., 1000., 2000., 3000., 4000.)\n+ viewer = ContourViewer(times=times, branches=branches, datafile=datafile)\n+ #viewer = ContourViewer(times=times, branches=branches, datafile=datafile, datafiles=('data150.h5', 'data600.h5'))\n viewer.plot()\n \n if __name__ == '__main__':\n@@ -188,6 +206,6 @@ if __name__ == '__main__':\n # from profiler import calibrate_profiler\n # fudge = calibrate_profiler(10000)\n # profile = Profiler('profile', fudge=fudge)\n- plotCFL()\n+ plotContour()\n # profile.stop()\n ", + "path": "/home/wd15/git/extremefill/extremefill" + }, + { + "name": "fipy", + "module": "python", + "source": "/home/wd15/git/fipy", + "version": "8c51478a3e8c30618b3a96c132612a46735c7548", + "diff": "", + "path": "/home/wd15/git/fipy/fipy" + }, + { + "name": "gi", + "module": "python", + "source": "attribute", + "version": "3.4.0", + "diff": "", + "path": "/usr/lib/python2.7/dist-packages/gi" + }, + { + "name": "glib", + "module": "python", + "source": null, + "version": "unknown", + "diff": "", + "path": "/usr/lib/python2.7/dist-packages/glib" + }, + { + "name": "gobject", + "module": "python", + "source": null, + "version": "unknown", + "diff": "", + "path": "/usr/lib/python2.7/dist-packages/gobject" + }, + { + "name": "google", + "module": "python", + "source": null, + "version": "unknown", + "diff": "", + "path": "/usr/lib/python2.7/dist-packages/google" + }, + { + "name": "gtk", + "module": "python", + "source": null, + "version": "unknown", + "diff": "", + "path": "/usr/lib/python2.7/dist-packages/gtk-2.0/gtk" + }, + { + "name": "httplib2", + "module": "python", + "source": "attribute", + "version": "0.7.4", + "diff": "", + "path": "/usr/lib/python2.7/dist-packages/httplib2" + }, + { + "name": "lockfile", + "module": "python", + "source": "egg-info", + "version": "0.9.1", + "diff": "", + "path": "/home/wd15/.virtualenvs/default/lib/python2.7/site-packages/lockfile-0.9.1-py2.7.egg/lockfile" + }, + { + "name": "lxml", + "module": "python", + "source": null, + "version": "unknown", + "diff": "", + "path": "/usr/lib/python2.7/dist-packages/lxml" + }, + { + "name": "matplotlib", + "module": "python", + "source": "attribute", + "version": "1.1.1", + "diff": "", + "path": "/usr/lib/pymodules/python2.7/matplotlib" + }, + { + "name": "mayavi", + "module": "python", + "source": "attribute", + "version": "4.1.0", + "diff": "", + "path": "/usr/lib/python2.7/dist-packages/mayavi" + }, + { + "name": "mpi4py", + "module": "python", + "source": "attribute", + "version": "1.3", + "diff": "", + "path": "/usr/lib/python2.7/dist-packages/mpi4py" + }, + { + "name": "mpl_toolkits", + "module": "python", + "source": null, + "version": "unknown", + "diff": "", + "path": "/usr/lib/pymodules/python2.7/mpl_toolkits" + }, + { + "name": "mx", + "module": "python", + "source": "attribute", + "version": "3.2.1", + "diff": "", + "path": "/usr/lib/python2.7/dist-packages/mx" + }, + { + "name": "nose", + "module": "python", + "source": "attribute", + "version": "1.2.1", + "diff": "", + "path": "/home/wd15/.virtualenvs/fipy/lib/python2.7/site-packages/nose" + }, + { + "name": "numexpr", + "module": "python", + "source": "attribute", + "version": "2.0.1", + "diff": "", + "path": "/usr/lib/python2.7/dist-packages/numexpr" + }, + { + "name": "numpy", + "module": "python", + "source": "attribute", + "version": "1.6.2", + "diff": "", + "path": "/usr/lib/python2.7/dist-packages/numpy" + }, + { + "name": "pyamg", + "module": "python", + "source": "attribute", + "version": "2.0.4.dev", + "diff": "", + "path": "/home/wd15/.virtualenvs/fipy/lib/python2.7/site-packages/pyamg" + }, + { + "name": "pylsmlib", + "module": "python", + "source": "/home/wd15/git/LSMLIB", + "version": "6f5d969bb27530aa37452a8b096e538a5cf7b993", + "diff": "", + "path": "/home/wd15/git/LSMLIB/pylsmlib/pylsmlib" + }, + { + "name": "pysparse", + "module": "python", + "source": "attribute", + "version": "1.1", + "diff": "", + "path": "/usr/lib/python2.7/dist-packages/pysparse" + }, + { + "name": "pytz", + "module": "python", + "source": "attribute", + "version": "2011k", + "diff": "", + "path": "/usr/lib/python2.7/dist-packages/pytz" + }, + { + "name": "scipy", + "module": "python", + "source": "attribute", + "version": "0.10.1", + "diff": "", + "path": "/usr/lib/python2.7/dist-packages/scipy" + }, + { + "name": "setuptools", + "module": "python", + "source": "attribute", + "version": "0.6", + "diff": "", + "path": "/home/wd15/.virtualenvs/default/local/lib/python2.7/site-packages/distribute-0.6.24-py2.7.egg/setuptools" + }, + { + "name": "simplejson", + "module": "python", + "source": "attribute", + "version": "2.6.1", + "diff": "", + "path": "/usr/lib/python2.7/dist-packages/simplejson" + }, + { + "name": "skfmm", + "module": "python", + "source": "/home/wd15/git/scikit-fmm", + "version": "467e5982fbd9d4eb32495f826d6bda65da498e13", + "diff": "", + "path": "/home/wd15/git/scikit-fmm/skfmm" + }, + { + "name": "sumatra", + "module": "python", + "source": "attribute", + "version": "0.5.0dev", + "diff": "", + "path": "/home/wd15/.virtualenvs/default/lib/python2.7/site-packages/Sumatra-0.5.0dev-py2.7.egg/sumatra" + }, + { + "name": "tables", + "module": "python", + "source": "attribute", + "version": "2.3.1", + "diff": "", + "path": "/usr/lib/python2.7/dist-packages/tables" + }, + { + "name": "tagging", + "module": "python", + "source": "attribute", + "version": "0.3.1", + "diff": "", + "path": "/home/wd15/.virtualenvs/fipy/lib/python2.7/site-packages/tagging" + }, + { + "name": "tornado", + "module": "python", + "source": "attribute", + "version": "2.3", + "diff": "", + "path": "/usr/lib/python2.7/dist-packages/tornado" + }, + { + "name": "traits", + "module": "python", + "source": "attribute", + "version": "4.1.0", + "diff": "", + "path": "/usr/lib/python2.7/dist-packages/traits" + }, + { + "name": "tvtk", + "module": "python", + "source": null, + "version": "unknown", + "diff": "", + "path": "/usr/lib/python2.7/dist-packages/tvtk" + }, + { + "name": "vtk", + "module": "python", + "source": null, + "version": "unknown", + "diff": "", + "path": "/usr/lib/pymodules/python2.7/vtk" + }, + { + "name": "wx", + "module": "python", + "source": "attribute", + "version": "2.8.12.1", + "diff": "", + "path": "/usr/lib/python2.7/dist-packages/wx-2.8-gtk2-unicode/wx" + }, + { + "name": "yaml", + "module": "python", + "source": "attribute", + "version": "3.10", + "diff": "", + "path": "/usr/lib/python2.7/dist-packages/yaml" + }, + { + "name": "zmq", + "module": "python", + "source": "attribute", + "version": "2.2.0", + "diff": "", + "path": "/usr/lib/python2.7/dist-packages/zmq" + } + ], + "user": "Daniel Wheeler ", + "output_data": [ + { + "path": "data.h5", + "digest": "90eafa0b3d42cb4608b44e48cb329593f2892d93", + "metadata": { + "mimetype": null, + "size": 102992, + "encoding": null + } + } + ], + "input_data": [], + "launch_mode": { + "type": "SerialLaunchMode", + "parameters": { + "working_directory": "/home/wd15/git/extremefill-data" + } + }, + "main_file": "script.py", + "outcome": "" +}, +{ + "script_arguments": "", + "platforms": [ + { + "system_name": "Linux", + "machine": "x86_64", + "version": "#35-Ubuntu SMP Thu Jan 24 13:15:40 UTC 2013", + "ip_addr": "127.0.0.1", + "architecture_bits": "64bit", + "architecture_linkage": "ELF", + "release": "3.5.0-23-generic", + "network_name": "loki", + "processor": "x86_64" + } + ], + "duration": 6.076067924499512, + "diff": "diff --git a/script.py b/script.py\nindex ec41d60..dd94f39 100644\n--- a/script.py\n+++ b/script.py\n@@ -30,16 +30,5 @@ def run(totalSteps=10,\n NxBase=1200)\n \n if __name__ == '__main__':\n-\n-\n- class Bare(object):\n- pass\n-\n- \n- args = Bare()\n- parser = argparse.ArgumentParser(description=\"Run Extremefill 2D example.\")\n- parser.add_argument('--totalSteps', default=1, type=int)\n- parser.parse_args(namespace=args)\n-\n- run(totalSteps=args.totalSteps, tags=('test',), reason=\"testing SMT class\")\n+ run(totalSteps=2, CFL=0.1)\n \ndiff --git a/smtdecorator.py b/smtdecorator.py\nindex 432a8b7..826170c 100644\n--- a/smtdecorator.py\n+++ b/smtdecorator.py\n@@ -1,4 +1,3 @@\n-\n \"\"\"\n Script to test setting up batch simaulations with Sumatra.\n \n@@ -22,8 +21,8 @@ On laptop use http://129.6.153.60:8000\n import time\n import os\n import sys\n-from contextlib import contextmanager\n from StringIO import StringIO\n+import argparse\n \n \n from sumatra.projects import load_project\n@@ -59,18 +58,21 @@ class SMTDecorator(object):\n def __init__(self, function):\n self.function = function\n \n- def __call__(self, tags=(), reason='', *args, **kwargs):\n+ def __call__(self, tag=[], reason='', *args, **kwargs):\n+\n+ parameters, tag, reason = self.parseargs(kwargs, list(tag), reason)\n+\n project = load_project()\n- record = project.new_record(parameters=SimpleParameterSet(kwargs),\n+ record = project.new_record(parameters=SimpleParameterSet(parameters),\n main_file=self.function.func_globals['__file__'],\n reason=reason)\n \n record.datastore.root = os.path.join(record.datastore.root, record.label)\n- for tag in tags:\n- record.tags.add(tag)\n \n- record.start_time = time.time()\n+ for t in tag:\n+ record.tags.add(t)\n \n+ record.start_time = time.time()\n with Redirect() as out:\n returnvalue = self.function(datadir=record.datastore.root, *args, **record.parameters.as_dict())\n \n@@ -84,5 +86,25 @@ class SMTDecorator(object):\n \n return returnvalue\n \n+ def parseargs(self, func_kwargs, tag, reason):\n+ class Bare:\n+ pass\n+ ext_kwargs = Bare()\n+ parser = argparse.ArgumentParser(description=\"SMT arguments\")\n+\n+ for k, v in func_kwargs.iteritems():\n+ parser.add_argument('--' + k, default=v, type=type(v), dest=k)\n+ \n+ parser.add_argument('--tag', action='append', default=tag, dest='tag')\n+ parser.add_argument('--reason', default=reason, dest='reason')\n+ parser.parse_args(namespace=ext_kwargs)\n \n+ tag = ext_kwargs.tag\n+ reason = ext_kwargs.reason\n \n+ for k, v in func_kwargs.iteritems():\n+ func_kwargs[k] = getattr(ext_kwargs, k)\n+ \n+ return func_kwargs, tag, reason\n+ \n+ ", + "datastore": { + "type": "FileSystemDataStore", + "parameters": { + "root": "./Data/f7cf20243fdb" + } + }, + "input_datastore": { + "type": "FileSystemDataStore", + "parameters": { + "root": "/" + } + }, + "executable": { + "path": "/home/wd15/.virtualenvs/default/bin/python", + "version": "2.7.3", + "name": "Python", + "options": "" + }, + "parameters": { + "content": "totalSteps = 2\nCFL = 0.34", + "type": "SimpleParameterSet" + }, + "label": "f7cf20243fdb", + "version": "03128c81e5ec503445a0a10166626c2e902ba41e", + "stdout_stderr": "[ 1. 1. 1. 1.]\n[ 0.34738209 0.61535499 0.01923836 0.00971058]\n[ 1.23729704e-01 2.14204081e-01 1.88311438e-04 1.55991524e-03]\n\ntheta 0.0\ncBar_supp 1.0\ncBar_cu 1.0\npotentialBar 1.0\nmin(extension) 7.22965473284e-08\nmin(depositionRate) 2.09114908795e-09\nmin(current) 56.8350759862\nmin(cupric) 997.266139623\nmin(baseCurrent) 56.9323002935\nmax(interfaceTheta) - 1: -0.973021297371\nmin(interfaceTheta) 0.0\nmin(I0) 38.9208518948\ndt 0.011\nelapsed time 0.0\nstep 0\n\n[ 1. 1. 1. 1.]\n[ 0.10765512 0.04576554 0.03330295 0.00523947]\n\ntheta 0.0\ncBar_supp 1.0\ncBar_cu 1.0\npotentialBar 1.0\nmin(extension) 2.09114554699e-09\nmin(depositionRate) 1.47837489306e-09\nmin(current) 40.1805638188\nmin(cupric) 996.200886814\nmin(baseCurrent) 40.2838895551\nmax(interfaceTheta) - 1: -0.947107282423\nmin(interfaceTheta) 0.0\nmin(I0) 37.8842912969\ndt 0.0121\nelapsed time 0.011\nstep 1\n\n", + "repository": { + "url": "/home/wd15/git/extremefill-data", + "type": "GitRepository", + "upstream": "git@github.com:wd15/extremefill-data.git" + }, + "tags": [], + "timestamp": "2013-02-19 10:45:30", + "reason": "", + "dependencies": [ + { + "name": "Cython", + "module": "python", + "source": "attribute", + "version": "0.16", + "diff": "", + "path": "/usr/lib/python2.7/dist-packages/Cython" + }, + { + "name": "IPython", + "module": "python", + "source": "attribute", + "version": "0.13.1.rc2", + "diff": "", + "path": "/usr/lib/python2.7/dist-packages/IPython" + }, + { + "name": "PIL", + "module": "python", + "source": null, + "version": "unknown", + "diff": "", + "path": "/usr/lib/python2.7/dist-packages/PIL" + }, + { + "name": "PyQt4", + "module": "python", + "source": null, + "version": "unknown", + "diff": "", + "path": "/usr/lib/python2.7/dist-packages/PyQt4" + }, + { + "name": "PyTrilinos", + "module": "python", + "source": "attribute", + "version": "4.8d", + "diff": "", + "path": "/home/wd15/.virtualenvs/fipy/lib/python2.7/site-packages/PyTrilinos" + }, + { + "name": "dateutil", + "module": "python", + "source": "attribute", + "version": "1.5", + "diff": "", + "path": "/usr/lib/python2.7/dist-packages/dateutil" + }, + { + "name": "distutils", + "module": "python", + "source": "attribute", + "version": "2.7.3", + "diff": "", + "path": "/home/wd15/.virtualenvs/default/lib/python2.7/distutils" + }, + { + "name": "django", + "module": "python", + "source": "attribute", + "version": "1.4.1", + "diff": "", + "path": "/usr/lib/python2.7/dist-packages/django" + }, + { + "name": "docutils", + "module": "python", + "source": "attribute", + "version": "0.10", + "diff": "", + "path": "/home/wd15/.virtualenvs/fipy/lib/python2.7/site-packages/docutils" + }, + { + "name": "encodings", + "module": "python", + "source": null, + "version": "unknown", + "diff": "", + "path": "/home/wd15/.virtualenvs/default/lib/python2.7/encodings" + }, + { + "name": "extremefill", + "module": "python", + "source": "/home/wd15/git/extremefill", + "version": "549c969edb113d0b3e9804612bfa53e91319c0ea", + "diff": "diff --git a/data/viewer.py b/data/viewer.py\nindex 68f60e0..d9ab7c2 100644\n--- a/data/viewer.py\n+++ b/data/viewer.py\n@@ -122,7 +122,7 @@ class ContourViewer(BaseViewer):\n self.times = times\n self.contours = contours\n self.data = []\n- super(ContourViewer, self).__init__(branches=branches, datafile=datafiles, datafiles=datafiles)\n+ super(ContourViewer, self).__init__(branches=branches, datafile=datafile, datafiles=datafiles)\n \n def plot(self):\n import matplotlib.pyplot as plt\n@@ -152,6 +152,24 @@ class ContourViewer(BaseViewer):\n phi = np.reshape(phi, shape)\n self.data.append((x, y, phi))\n \n+def datafilesFromBranches(branches, datafile):\n+ cwd = os.getcwd()\n+ for count, branch in enumerate(branches):\n+ print 'branch',branch\n+ tempdir = gitCloneToTemp(branch=branch, repositoryPath='ssh://wd15@genie.nist.gov/users/wd15/git/extremefill')\n+ repopath = os.path.join(tempdir, 'extremefill')\n+ datapath = os.path.join(repopath, datafile)\n+ gitMediaSync()\n+ if count == 0:\n+ self.addBaseData(datapath)\n+ basetempdir = tempdir\n+ else:\n+ self.addData(datapath, branch)\n+ cleanTempRepo(tempdir) \n+\n+ cleanTempRepo(basetempdir)\n+ os.chdir(cwd)\n+\n def plotNx():\n branches = ('Nx600', 'Nx300', 'Nx150')\n datafile = os.path.join('data', 'data.h5')\n@@ -174,13 +192,13 @@ def plotCFL():\n \n def plotContour():\n # branches = ('CFL0.0125', 'CFL0.025', 'CFL0.05', 'CFL0.1', 'CFL0.2', 'CFL0.4', 'CFL0.8', 'CFL1.6')\n- branches = ('Nx600', 'Nx150')\n+ branches = ('Nx300', 'Nx150')\n # branches = ('CFL0.025', 'CFL0.05')\n datafile = os.path.join('data', 'data.h5')\n times = (0,)\n- # times = (0., 1000., 2000., 3000., 4000.)\n- # viewer = ContourViewer(times=times, branches=branches, datafile=datafile)\n- viewer = ContourViewer(times=times, branches=branches, datafile=datafile, datafiles=('data150.h5', 'data600.h5'))\n+ times = (0., 1000., 2000., 3000., 4000.)\n+ viewer = ContourViewer(times=times, branches=branches, datafile=datafile)\n+ #viewer = ContourViewer(times=times, branches=branches, datafile=datafile, datafiles=('data150.h5', 'data600.h5'))\n viewer.plot()\n \n if __name__ == '__main__':\n@@ -188,6 +206,6 @@ if __name__ == '__main__':\n # from profiler import calibrate_profiler\n # fudge = calibrate_profiler(10000)\n # profile = Profiler('profile', fudge=fudge)\n- plotCFL()\n+ plotContour()\n # profile.stop()\n ", + "path": "/home/wd15/git/extremefill/extremefill" + }, + { + "name": "fipy", + "module": "python", + "source": "/home/wd15/git/fipy", + "version": "8c51478a3e8c30618b3a96c132612a46735c7548", + "diff": "", + "path": "/home/wd15/git/fipy/fipy" + }, + { + "name": "gi", + "module": "python", + "source": "attribute", + "version": "3.4.0", + "diff": "", + "path": "/usr/lib/python2.7/dist-packages/gi" + }, + { + "name": "glib", + "module": "python", + "source": null, + "version": "unknown", + "diff": "", + "path": "/usr/lib/python2.7/dist-packages/glib" + }, + { + "name": "gobject", + "module": "python", + "source": null, + "version": "unknown", + "diff": "", + "path": "/usr/lib/python2.7/dist-packages/gobject" + }, + { + "name": "google", + "module": "python", + "source": null, + "version": "unknown", + "diff": "", + "path": "/usr/lib/python2.7/dist-packages/google" + }, + { + "name": "gtk", + "module": "python", + "source": null, + "version": "unknown", + "diff": "", + "path": "/usr/lib/python2.7/dist-packages/gtk-2.0/gtk" + }, + { + "name": "httplib2", + "module": "python", + "source": "attribute", + "version": "0.7.4", + "diff": "", + "path": "/usr/lib/python2.7/dist-packages/httplib2" + }, + { + "name": "lockfile", + "module": "python", + "source": "egg-info", + "version": "0.9.1", + "diff": "", + "path": "/home/wd15/.virtualenvs/default/lib/python2.7/site-packages/lockfile-0.9.1-py2.7.egg/lockfile" + }, + { + "name": "lxml", + "module": "python", + "source": null, + "version": "unknown", + "diff": "", + "path": "/usr/lib/python2.7/dist-packages/lxml" + }, + { + "name": "matplotlib", + "module": "python", + "source": "attribute", + "version": "1.1.1", + "diff": "", + "path": "/usr/lib/pymodules/python2.7/matplotlib" + }, + { + "name": "mayavi", + "module": "python", + "source": "attribute", + "version": "4.1.0", + "diff": "", + "path": "/usr/lib/python2.7/dist-packages/mayavi" + }, + { + "name": "mpi4py", + "module": "python", + "source": "attribute", + "version": "1.3", + "diff": "", + "path": "/usr/lib/python2.7/dist-packages/mpi4py" + }, + { + "name": "mpl_toolkits", + "module": "python", + "source": null, + "version": "unknown", + "diff": "", + "path": "/usr/lib/pymodules/python2.7/mpl_toolkits" + }, + { + "name": "mx", + "module": "python", + "source": "attribute", + "version": "3.2.1", + "diff": "", + "path": "/usr/lib/python2.7/dist-packages/mx" + }, + { + "name": "nose", + "module": "python", + "source": "attribute", + "version": "1.2.1", + "diff": "", + "path": "/home/wd15/.virtualenvs/fipy/lib/python2.7/site-packages/nose" + }, + { + "name": "numexpr", + "module": "python", + "source": "attribute", + "version": "2.0.1", + "diff": "", + "path": "/usr/lib/python2.7/dist-packages/numexpr" + }, + { + "name": "numpy", + "module": "python", + "source": "attribute", + "version": "1.6.2", + "diff": "", + "path": "/usr/lib/python2.7/dist-packages/numpy" + }, + { + "name": "pyamg", + "module": "python", + "source": "attribute", + "version": "2.0.4.dev", + "diff": "", + "path": "/home/wd15/.virtualenvs/fipy/lib/python2.7/site-packages/pyamg" + }, + { + "name": "pylsmlib", + "module": "python", + "source": "/home/wd15/git/LSMLIB", + "version": "6f5d969bb27530aa37452a8b096e538a5cf7b993", + "diff": "", + "path": "/home/wd15/git/LSMLIB/pylsmlib/pylsmlib" + }, + { + "name": "pysparse", + "module": "python", + "source": "attribute", + "version": "1.1", + "diff": "", + "path": "/usr/lib/python2.7/dist-packages/pysparse" + }, + { + "name": "pytz", + "module": "python", + "source": "attribute", + "version": "2011k", + "diff": "", + "path": "/usr/lib/python2.7/dist-packages/pytz" + }, + { + "name": "scipy", + "module": "python", + "source": "attribute", + "version": "0.10.1", + "diff": "", + "path": "/usr/lib/python2.7/dist-packages/scipy" + }, + { + "name": "setuptools", + "module": "python", + "source": "attribute", + "version": "0.6", + "diff": "", + "path": "/home/wd15/.virtualenvs/default/local/lib/python2.7/site-packages/distribute-0.6.24-py2.7.egg/setuptools" + }, + { + "name": "simplejson", + "module": "python", + "source": "attribute", + "version": "2.6.1", + "diff": "", + "path": "/usr/lib/python2.7/dist-packages/simplejson" + }, + { + "name": "skfmm", + "module": "python", + "source": "/home/wd15/git/scikit-fmm", + "version": "467e5982fbd9d4eb32495f826d6bda65da498e13", + "diff": "", + "path": "/home/wd15/git/scikit-fmm/skfmm" + }, + { + "name": "sumatra", + "module": "python", + "source": "attribute", + "version": "0.5.0dev", + "diff": "", + "path": "/home/wd15/.virtualenvs/default/lib/python2.7/site-packages/Sumatra-0.5.0dev-py2.7.egg/sumatra" + }, + { + "name": "tables", + "module": "python", + "source": "attribute", + "version": "2.3.1", + "diff": "", + "path": "/usr/lib/python2.7/dist-packages/tables" + }, + { + "name": "tagging", + "module": "python", + "source": "attribute", + "version": "0.3.1", + "diff": "", + "path": "/home/wd15/.virtualenvs/fipy/lib/python2.7/site-packages/tagging" + }, + { + "name": "tornado", + "module": "python", + "source": "attribute", + "version": "2.3", + "diff": "", + "path": "/usr/lib/python2.7/dist-packages/tornado" + }, + { + "name": "traits", + "module": "python", + "source": "attribute", + "version": "4.1.0", + "diff": "", + "path": "/usr/lib/python2.7/dist-packages/traits" + }, + { + "name": "tvtk", + "module": "python", + "source": null, + "version": "unknown", + "diff": "", + "path": "/usr/lib/python2.7/dist-packages/tvtk" + }, + { + "name": "vtk", + "module": "python", + "source": null, + "version": "unknown", + "diff": "", + "path": "/usr/lib/pymodules/python2.7/vtk" + }, + { + "name": "wx", + "module": "python", + "source": "attribute", + "version": "2.8.12.1", + "diff": "", + "path": "/usr/lib/python2.7/dist-packages/wx-2.8-gtk2-unicode/wx" + }, + { + "name": "yaml", + "module": "python", + "source": "attribute", + "version": "3.10", + "diff": "", + "path": "/usr/lib/python2.7/dist-packages/yaml" + }, + { + "name": "zmq", + "module": "python", + "source": "attribute", + "version": "2.2.0", + "diff": "", + "path": "/usr/lib/python2.7/dist-packages/zmq" + } + ], + "user": "Daniel Wheeler ", + "output_data": [ + { + "path": "data.h5", + "digest": "e791044e57eac02645e1795d017e7548cf7b351c", + "metadata": { + "mimetype": null, + "size": 102992, + "encoding": null + } + } + ], + "input_data": [], + "launch_mode": { + "type": "SerialLaunchMode", + "parameters": { + "working_directory": "/home/wd15/git/extremefill-data" + } + }, + "main_file": "script.py", + "outcome": "" +}, +{ + "script_arguments": "", + "platforms": [ + { + "system_name": "Linux", + "machine": "x86_64", + "version": "#35-Ubuntu SMP Thu Jan 24 13:15:40 UTC 2013", + "ip_addr": "127.0.0.1", + "architecture_bits": "64bit", + "architecture_linkage": "ELF", + "release": "3.5.0-23-generic", + "network_name": "loki", + "processor": "x86_64" + } + ], + "duration": 5.603995084762573, + "diff": "diff --git a/script.py b/script.py\nindex ec41d60..dd94f39 100644\n--- a/script.py\n+++ b/script.py\n@@ -30,16 +30,5 @@ def run(totalSteps=10,\n NxBase=1200)\n \n if __name__ == '__main__':\n-\n-\n- class Bare(object):\n- pass\n-\n- \n- args = Bare()\n- parser = argparse.ArgumentParser(description=\"Run Extremefill 2D example.\")\n- parser.add_argument('--totalSteps', default=1, type=int)\n- parser.parse_args(namespace=args)\n-\n- run(totalSteps=args.totalSteps, tags=('test',), reason=\"testing SMT class\")\n+ run(totalSteps=2, CFL=0.1)\n \ndiff --git a/smtdecorator.py b/smtdecorator.py\nindex 432a8b7..826170c 100644\n--- a/smtdecorator.py\n+++ b/smtdecorator.py\n@@ -1,4 +1,3 @@\n-\n \"\"\"\n Script to test setting up batch simaulations with Sumatra.\n \n@@ -22,8 +21,8 @@ On laptop use http://129.6.153.60:8000\n import time\n import os\n import sys\n-from contextlib import contextmanager\n from StringIO import StringIO\n+import argparse\n \n \n from sumatra.projects import load_project\n@@ -59,18 +58,21 @@ class SMTDecorator(object):\n def __init__(self, function):\n self.function = function\n \n- def __call__(self, tags=(), reason='', *args, **kwargs):\n+ def __call__(self, tag=[], reason='', *args, **kwargs):\n+\n+ parameters, tag, reason = self.parseargs(kwargs, list(tag), reason)\n+\n project = load_project()\n- record = project.new_record(parameters=SimpleParameterSet(kwargs),\n+ record = project.new_record(parameters=SimpleParameterSet(parameters),\n main_file=self.function.func_globals['__file__'],\n reason=reason)\n \n record.datastore.root = os.path.join(record.datastore.root, record.label)\n- for tag in tags:\n- record.tags.add(tag)\n \n- record.start_time = time.time()\n+ for t in tag:\n+ record.tags.add(t)\n \n+ record.start_time = time.time()\n with Redirect() as out:\n returnvalue = self.function(datadir=record.datastore.root, *args, **record.parameters.as_dict())\n \n@@ -84,5 +86,25 @@ class SMTDecorator(object):\n \n return returnvalue\n \n+ def parseargs(self, func_kwargs, tag, reason):\n+ class Bare:\n+ pass\n+ ext_kwargs = Bare()\n+ parser = argparse.ArgumentParser(description=\"SMT arguments\")\n+\n+ for k, v in func_kwargs.iteritems():\n+ parser.add_argument('--' + k, default=v, type=type(v), dest=k)\n+ \n+ parser.add_argument('--tag', action='append', default=tag, dest='tag')\n+ parser.add_argument('--reason', default=reason, dest='reason')\n+ parser.parse_args(namespace=ext_kwargs)\n \n+ tag = ext_kwargs.tag\n+ reason = ext_kwargs.reason\n \n+ for k, v in func_kwargs.iteritems():\n+ func_kwargs[k] = getattr(ext_kwargs, k)\n+ \n+ return func_kwargs, tag, reason\n+ \n+ ", + "datastore": { + "type": "FileSystemDataStore", + "parameters": { + "root": "./Data/8d6eb9a77d07" + } + }, + "input_datastore": { + "type": "FileSystemDataStore", + "parameters": { + "root": "/" + } + }, + "executable": { + "path": "/home/wd15/.virtualenvs/default/bin/python", + "version": "2.7.3", + "name": "Python", + "options": "" + }, + "parameters": { + "content": "totalSteps = 2\nCFL = 0.36", + "type": "SimpleParameterSet" + }, + "label": "8d6eb9a77d07", + "version": "03128c81e5ec503445a0a10166626c2e902ba41e", + "stdout_stderr": "[ 1. 1. 1. 1.]\n[ 0.34738209 0.61535499 0.01923836 0.00971058]\n[ 1.23729704e-01 2.14204081e-01 1.88311438e-04 1.55991524e-03]\n\ntheta 0.0\ncBar_supp 1.0\ncBar_cu 1.0\npotentialBar 1.0\nmin(extension) 7.22965473284e-08\nmin(depositionRate) 2.09114908795e-09\nmin(current) 56.8350759862\nmin(cupric) 997.266139623\nmin(baseCurrent) 56.9323002935\nmax(interfaceTheta) - 1: -0.973021297371\nmin(interfaceTheta) 0.0\nmin(I0) 38.9208518948\ndt 0.011\nelapsed time 0.0\nstep 0\n\n[ 1. 1. 1. 1.]\n[ 0.10765512 0.04576554 0.03330295 0.00523947]\n\ntheta 0.0\ncBar_supp 1.0\ncBar_cu 1.0\npotentialBar 1.0\nmin(extension) 2.09114554699e-09\nmin(depositionRate) 1.47837489306e-09\nmin(current) 40.1805638188\nmin(cupric) 996.200886814\nmin(baseCurrent) 40.2838895551\nmax(interfaceTheta) - 1: -0.947107282423\nmin(interfaceTheta) 0.0\nmin(I0) 37.8842912969\ndt 0.0121\nelapsed time 0.011\nstep 1\n\n", + "repository": { + "url": "/home/wd15/git/extremefill-data", + "type": "GitRepository", + "upstream": "git@github.com:wd15/extremefill-data.git" + }, + "tags": [], + "timestamp": "2013-02-19 10:45:30", + "reason": "", + "dependencies": [ + { + "name": "Cython", + "module": "python", + "source": "attribute", + "version": "0.16", + "diff": "", + "path": "/usr/lib/python2.7/dist-packages/Cython" + }, + { + "name": "IPython", + "module": "python", + "source": "attribute", + "version": "0.13.1.rc2", + "diff": "", + "path": "/usr/lib/python2.7/dist-packages/IPython" + }, + { + "name": "PIL", + "module": "python", + "source": null, + "version": "unknown", + "diff": "", + "path": "/usr/lib/python2.7/dist-packages/PIL" + }, + { + "name": "PyQt4", + "module": "python", + "source": null, + "version": "unknown", + "diff": "", + "path": "/usr/lib/python2.7/dist-packages/PyQt4" + }, + { + "name": "PyTrilinos", + "module": "python", + "source": "attribute", + "version": "4.8d", + "diff": "", + "path": "/home/wd15/.virtualenvs/fipy/lib/python2.7/site-packages/PyTrilinos" + }, + { + "name": "dateutil", + "module": "python", + "source": "attribute", + "version": "1.5", + "diff": "", + "path": "/usr/lib/python2.7/dist-packages/dateutil" + }, + { + "name": "distutils", + "module": "python", + "source": "attribute", + "version": "2.7.3", + "diff": "", + "path": "/home/wd15/.virtualenvs/default/lib/python2.7/distutils" + }, + { + "name": "django", + "module": "python", + "source": "attribute", + "version": "1.4.1", + "diff": "", + "path": "/usr/lib/python2.7/dist-packages/django" + }, + { + "name": "docutils", + "module": "python", + "source": "attribute", + "version": "0.10", + "diff": "", + "path": "/home/wd15/.virtualenvs/fipy/lib/python2.7/site-packages/docutils" + }, + { + "name": "encodings", + "module": "python", + "source": null, + "version": "unknown", + "diff": "", + "path": "/home/wd15/.virtualenvs/default/lib/python2.7/encodings" + }, + { + "name": "extremefill", + "module": "python", + "source": "/home/wd15/git/extremefill", + "version": "549c969edb113d0b3e9804612bfa53e91319c0ea", + "diff": "diff --git a/data/viewer.py b/data/viewer.py\nindex 68f60e0..d9ab7c2 100644\n--- a/data/viewer.py\n+++ b/data/viewer.py\n@@ -122,7 +122,7 @@ class ContourViewer(BaseViewer):\n self.times = times\n self.contours = contours\n self.data = []\n- super(ContourViewer, self).__init__(branches=branches, datafile=datafiles, datafiles=datafiles)\n+ super(ContourViewer, self).__init__(branches=branches, datafile=datafile, datafiles=datafiles)\n \n def plot(self):\n import matplotlib.pyplot as plt\n@@ -152,6 +152,24 @@ class ContourViewer(BaseViewer):\n phi = np.reshape(phi, shape)\n self.data.append((x, y, phi))\n \n+def datafilesFromBranches(branches, datafile):\n+ cwd = os.getcwd()\n+ for count, branch in enumerate(branches):\n+ print 'branch',branch\n+ tempdir = gitCloneToTemp(branch=branch, repositoryPath='ssh://wd15@genie.nist.gov/users/wd15/git/extremefill')\n+ repopath = os.path.join(tempdir, 'extremefill')\n+ datapath = os.path.join(repopath, datafile)\n+ gitMediaSync()\n+ if count == 0:\n+ self.addBaseData(datapath)\n+ basetempdir = tempdir\n+ else:\n+ self.addData(datapath, branch)\n+ cleanTempRepo(tempdir) \n+\n+ cleanTempRepo(basetempdir)\n+ os.chdir(cwd)\n+\n def plotNx():\n branches = ('Nx600', 'Nx300', 'Nx150')\n datafile = os.path.join('data', 'data.h5')\n@@ -174,13 +192,13 @@ def plotCFL():\n \n def plotContour():\n # branches = ('CFL0.0125', 'CFL0.025', 'CFL0.05', 'CFL0.1', 'CFL0.2', 'CFL0.4', 'CFL0.8', 'CFL1.6')\n- branches = ('Nx600', 'Nx150')\n+ branches = ('Nx300', 'Nx150')\n # branches = ('CFL0.025', 'CFL0.05')\n datafile = os.path.join('data', 'data.h5')\n times = (0,)\n- # times = (0., 1000., 2000., 3000., 4000.)\n- # viewer = ContourViewer(times=times, branches=branches, datafile=datafile)\n- viewer = ContourViewer(times=times, branches=branches, datafile=datafile, datafiles=('data150.h5', 'data600.h5'))\n+ times = (0., 1000., 2000., 3000., 4000.)\n+ viewer = ContourViewer(times=times, branches=branches, datafile=datafile)\n+ #viewer = ContourViewer(times=times, branches=branches, datafile=datafile, datafiles=('data150.h5', 'data600.h5'))\n viewer.plot()\n \n if __name__ == '__main__':\n@@ -188,6 +206,6 @@ if __name__ == '__main__':\n # from profiler import calibrate_profiler\n # fudge = calibrate_profiler(10000)\n # profile = Profiler('profile', fudge=fudge)\n- plotCFL()\n+ plotContour()\n # profile.stop()\n ", + "path": "/home/wd15/git/extremefill/extremefill" + }, + { + "name": "fipy", + "module": "python", + "source": "/home/wd15/git/fipy", + "version": "8c51478a3e8c30618b3a96c132612a46735c7548", + "diff": "", + "path": "/home/wd15/git/fipy/fipy" + }, + { + "name": "gi", + "module": "python", + "source": "attribute", + "version": "3.4.0", + "diff": "", + "path": "/usr/lib/python2.7/dist-packages/gi" + }, + { + "name": "glib", + "module": "python", + "source": null, + "version": "unknown", + "diff": "", + "path": "/usr/lib/python2.7/dist-packages/glib" + }, + { + "name": "gobject", + "module": "python", + "source": null, + "version": "unknown", + "diff": "", + "path": "/usr/lib/python2.7/dist-packages/gobject" + }, + { + "name": "google", + "module": "python", + "source": null, + "version": "unknown", + "diff": "", + "path": "/usr/lib/python2.7/dist-packages/google" + }, + { + "name": "gtk", + "module": "python", + "source": null, + "version": "unknown", + "diff": "", + "path": "/usr/lib/python2.7/dist-packages/gtk-2.0/gtk" + }, + { + "name": "httplib2", + "module": "python", + "source": "attribute", + "version": "0.7.4", + "diff": "", + "path": "/usr/lib/python2.7/dist-packages/httplib2" + }, + { + "name": "lockfile", + "module": "python", + "source": "egg-info", + "version": "0.9.1", + "diff": "", + "path": "/home/wd15/.virtualenvs/default/lib/python2.7/site-packages/lockfile-0.9.1-py2.7.egg/lockfile" + }, + { + "name": "lxml", + "module": "python", + "source": null, + "version": "unknown", + "diff": "", + "path": "/usr/lib/python2.7/dist-packages/lxml" + }, + { + "name": "matplotlib", + "module": "python", + "source": "attribute", + "version": "1.1.1", + "diff": "", + "path": "/usr/lib/pymodules/python2.7/matplotlib" + }, + { + "name": "mayavi", + "module": "python", + "source": "attribute", + "version": "4.1.0", + "diff": "", + "path": "/usr/lib/python2.7/dist-packages/mayavi" + }, + { + "name": "mpi4py", + "module": "python", + "source": "attribute", + "version": "1.3", + "diff": "", + "path": "/usr/lib/python2.7/dist-packages/mpi4py" + }, + { + "name": "mpl_toolkits", + "module": "python", + "source": null, + "version": "unknown", + "diff": "", + "path": "/usr/lib/pymodules/python2.7/mpl_toolkits" + }, + { + "name": "mx", + "module": "python", + "source": "attribute", + "version": "3.2.1", + "diff": "", + "path": "/usr/lib/python2.7/dist-packages/mx" + }, + { + "name": "nose", + "module": "python", + "source": "attribute", + "version": "1.2.1", + "diff": "", + "path": "/home/wd15/.virtualenvs/fipy/lib/python2.7/site-packages/nose" + }, + { + "name": "numexpr", + "module": "python", + "source": "attribute", + "version": "2.0.1", + "diff": "", + "path": "/usr/lib/python2.7/dist-packages/numexpr" + }, + { + "name": "numpy", + "module": "python", + "source": "attribute", + "version": "1.6.2", + "diff": "", + "path": "/usr/lib/python2.7/dist-packages/numpy" + }, + { + "name": "pyamg", + "module": "python", + "source": "attribute", + "version": "2.0.4.dev", + "diff": "", + "path": "/home/wd15/.virtualenvs/fipy/lib/python2.7/site-packages/pyamg" + }, + { + "name": "pylsmlib", + "module": "python", + "source": "/home/wd15/git/LSMLIB", + "version": "6f5d969bb27530aa37452a8b096e538a5cf7b993", + "diff": "", + "path": "/home/wd15/git/LSMLIB/pylsmlib/pylsmlib" + }, + { + "name": "pysparse", + "module": "python", + "source": "attribute", + "version": "1.1", + "diff": "", + "path": "/usr/lib/python2.7/dist-packages/pysparse" + }, + { + "name": "pytz", + "module": "python", + "source": "attribute", + "version": "2011k", + "diff": "", + "path": "/usr/lib/python2.7/dist-packages/pytz" + }, + { + "name": "scipy", + "module": "python", + "source": "attribute", + "version": "0.10.1", + "diff": "", + "path": "/usr/lib/python2.7/dist-packages/scipy" + }, + { + "name": "setuptools", + "module": "python", + "source": "attribute", + "version": "0.6", + "diff": "", + "path": "/home/wd15/.virtualenvs/default/local/lib/python2.7/site-packages/distribute-0.6.24-py2.7.egg/setuptools" + }, + { + "name": "simplejson", + "module": "python", + "source": "attribute", + "version": "2.6.1", + "diff": "", + "path": "/usr/lib/python2.7/dist-packages/simplejson" + }, + { + "name": "skfmm", + "module": "python", + "source": "/home/wd15/git/scikit-fmm", + "version": "467e5982fbd9d4eb32495f826d6bda65da498e13", + "diff": "", + "path": "/home/wd15/git/scikit-fmm/skfmm" + }, + { + "name": "sumatra", + "module": "python", + "source": "attribute", + "version": "0.5.0dev", + "diff": "", + "path": "/home/wd15/.virtualenvs/default/lib/python2.7/site-packages/Sumatra-0.5.0dev-py2.7.egg/sumatra" + }, + { + "name": "tables", + "module": "python", + "source": "attribute", + "version": "2.3.1", + "diff": "", + "path": "/usr/lib/python2.7/dist-packages/tables" + }, + { + "name": "tagging", + "module": "python", + "source": "attribute", + "version": "0.3.1", + "diff": "", + "path": "/home/wd15/.virtualenvs/fipy/lib/python2.7/site-packages/tagging" + }, + { + "name": "tornado", + "module": "python", + "source": "attribute", + "version": "2.3", + "diff": "", + "path": "/usr/lib/python2.7/dist-packages/tornado" + }, + { + "name": "traits", + "module": "python", + "source": "attribute", + "version": "4.1.0", + "diff": "", + "path": "/usr/lib/python2.7/dist-packages/traits" + }, + { + "name": "tvtk", + "module": "python", + "source": null, + "version": "unknown", + "diff": "", + "path": "/usr/lib/python2.7/dist-packages/tvtk" + }, + { + "name": "vtk", + "module": "python", + "source": null, + "version": "unknown", + "diff": "", + "path": "/usr/lib/pymodules/python2.7/vtk" + }, + { + "name": "wx", + "module": "python", + "source": "attribute", + "version": "2.8.12.1", + "diff": "", + "path": "/usr/lib/python2.7/dist-packages/wx-2.8-gtk2-unicode/wx" + }, + { + "name": "yaml", + "module": "python", + "source": "attribute", + "version": "3.10", + "diff": "", + "path": "/usr/lib/python2.7/dist-packages/yaml" + }, + { + "name": "zmq", + "module": "python", + "source": "attribute", + "version": "2.2.0", + "diff": "", + "path": "/usr/lib/python2.7/dist-packages/zmq" + } + ], + "user": "Daniel Wheeler ", + "output_data": [ + { + "path": "data.h5", + "digest": "410909c686c3e2e9e009e81e366f94124abd7ac8", + "metadata": { + "mimetype": null, + "size": 102992, + "encoding": null + } + } + ], + "input_data": [], + "launch_mode": { + "type": "SerialLaunchMode", + "parameters": { + "working_directory": "/home/wd15/git/extremefill-data" + } + }, + "main_file": "script.py", + "outcome": "" +}, +{ + "script_arguments": "", + "platforms": [ + { + "system_name": "Linux", + "machine": "x86_64", + "version": "#35-Ubuntu SMP Thu Jan 24 13:15:40 UTC 2013", + "ip_addr": "127.0.0.1", + "architecture_bits": "64bit", + "architecture_linkage": "ELF", + "release": "3.5.0-23-generic", + "network_name": "loki", + "processor": "x86_64" + } + ], + "duration": 3.940074920654297, + "diff": "diff --git a/script.py b/script.py\nindex ec41d60..e4a7100 100644\n--- a/script.py\n+++ b/script.py\n@@ -30,16 +30,5 @@ def run(totalSteps=10,\n NxBase=1200)\n \n if __name__ == '__main__':\n-\n-\n- class Bare(object):\n- pass\n-\n- \n- args = Bare()\n- parser = argparse.ArgumentParser(description=\"Run Extremefill 2D example.\")\n- parser.add_argument('--totalSteps', default=1, type=int)\n- parser.parse_args(namespace=args)\n-\n- run(totalSteps=args.totalSteps, tags=('test',), reason=\"testing SMT class\")\n+ run(totalSteps=2, tag=['test'], reason=\"testing SMT class\")\n \ndiff --git a/smtdecorator.py b/smtdecorator.py\nindex 432a8b7..826170c 100644\n--- a/smtdecorator.py\n+++ b/smtdecorator.py\n@@ -1,4 +1,3 @@\n-\n \"\"\"\n Script to test setting up batch simaulations with Sumatra.\n \n@@ -22,8 +21,8 @@ On laptop use http://129.6.153.60:8000\n import time\n import os\n import sys\n-from contextlib import contextmanager\n from StringIO import StringIO\n+import argparse\n \n \n from sumatra.projects import load_project\n@@ -59,18 +58,21 @@ class SMTDecorator(object):\n def __init__(self, function):\n self.function = function\n \n- def __call__(self, tags=(), reason='', *args, **kwargs):\n+ def __call__(self, tag=[], reason='', *args, **kwargs):\n+\n+ parameters, tag, reason = self.parseargs(kwargs, list(tag), reason)\n+\n project = load_project()\n- record = project.new_record(parameters=SimpleParameterSet(kwargs),\n+ record = project.new_record(parameters=SimpleParameterSet(parameters),\n main_file=self.function.func_globals['__file__'],\n reason=reason)\n \n record.datastore.root = os.path.join(record.datastore.root, record.label)\n- for tag in tags:\n- record.tags.add(tag)\n \n- record.start_time = time.time()\n+ for t in tag:\n+ record.tags.add(t)\n \n+ record.start_time = time.time()\n with Redirect() as out:\n returnvalue = self.function(datadir=record.datastore.root, *args, **record.parameters.as_dict())\n \n@@ -84,5 +86,25 @@ class SMTDecorator(object):\n \n return returnvalue\n \n+ def parseargs(self, func_kwargs, tag, reason):\n+ class Bare:\n+ pass\n+ ext_kwargs = Bare()\n+ parser = argparse.ArgumentParser(description=\"SMT arguments\")\n+\n+ for k, v in func_kwargs.iteritems():\n+ parser.add_argument('--' + k, default=v, type=type(v), dest=k)\n+ \n+ parser.add_argument('--tag', action='append', default=tag, dest='tag')\n+ parser.add_argument('--reason', default=reason, dest='reason')\n+ parser.parse_args(namespace=ext_kwargs)\n \n+ tag = ext_kwargs.tag\n+ reason = ext_kwargs.reason\n \n+ for k, v in func_kwargs.iteritems():\n+ func_kwargs[k] = getattr(ext_kwargs, k)\n+ \n+ return func_kwargs, tag, reason\n+ \n+ ", + "datastore": { + "type": "FileSystemDataStore", + "parameters": { + "root": "./Data/eab0f6237281" + } + }, + "input_datastore": { + "type": "FileSystemDataStore", + "parameters": { + "root": "/" + } + }, + "executable": { + "path": "/home/wd15/.virtualenvs/default/bin/python", + "version": "2.7.3", + "name": "Python", + "options": "" + }, + "parameters": { + "content": "totalSteps = 2", + "type": "SimpleParameterSet" + }, + "label": "eab0f6237281", + "version": "03128c81e5ec503445a0a10166626c2e902ba41e", + "stdout_stderr": "[ 1. 1. 1. 1.]\n[ 0.34738209 0.61535499 0.01923836 0.00971058]\n[ 1.23729704e-01 2.14204081e-01 1.88311438e-04 1.55991524e-03]\n\ntheta 0.0\ncBar_supp 1.0\ncBar_cu 1.0\npotentialBar 1.0\nmin(extension) 7.22965473284e-08\nmin(depositionRate) 2.09114908795e-09\nmin(current) 56.8350759862\nmin(cupric) 997.266139623\nmin(baseCurrent) 56.9323002935\nmax(interfaceTheta) - 1: -0.973021297371\nmin(interfaceTheta) 0.0\nmin(I0) 38.9208518948\ndt 0.011\nelapsed time 0.0\nstep 0\n\n[ 1. 1. 1. 1.]\n[ 0.10765512 0.04576554 0.03330295 0.00523947]\n\ntheta 0.0\ncBar_supp 1.0\ncBar_cu 1.0\npotentialBar 1.0\nmin(extension) 2.09114554699e-09\nmin(depositionRate) 1.47837489306e-09\nmin(current) 40.1805638188\nmin(cupric) 996.200886814\nmin(baseCurrent) 40.2838895551\nmax(interfaceTheta) - 1: -0.947107282423\nmin(interfaceTheta) 0.0\nmin(I0) 37.8842912969\ndt 0.0121\nelapsed time 0.011\nstep 1\n\n", + "repository": { + "url": "/home/wd15/git/extremefill-data", + "type": "GitRepository", + "upstream": "git@github.com:wd15/extremefill-data.git" + }, + "tags": [ + "test" + ], + "timestamp": "2013-02-19 10:31:47", + "reason": "testing SMT class", + "dependencies": [ + { + "name": "Cython", + "module": "python", + "source": "attribute", + "version": "0.16", + "diff": "", + "path": "/usr/lib/python2.7/dist-packages/Cython" + }, + { + "name": "IPython", + "module": "python", + "source": "attribute", + "version": "0.13.1.rc2", + "diff": "", + "path": "/usr/lib/python2.7/dist-packages/IPython" + }, + { + "name": "PIL", + "module": "python", + "source": null, + "version": "unknown", + "diff": "", + "path": "/usr/lib/python2.7/dist-packages/PIL" + }, + { + "name": "PyQt4", + "module": "python", + "source": null, + "version": "unknown", + "diff": "", + "path": "/usr/lib/python2.7/dist-packages/PyQt4" + }, + { + "name": "PyTrilinos", + "module": "python", + "source": "attribute", + "version": "4.8d", + "diff": "", + "path": "/home/wd15/.virtualenvs/fipy/lib/python2.7/site-packages/PyTrilinos" + }, + { + "name": "dateutil", + "module": "python", + "source": "attribute", + "version": "1.5", + "diff": "", + "path": "/usr/lib/python2.7/dist-packages/dateutil" + }, + { + "name": "distutils", + "module": "python", + "source": "attribute", + "version": "2.7.3", + "diff": "", + "path": "/home/wd15/.virtualenvs/default/lib/python2.7/distutils" + }, + { + "name": "django", + "module": "python", + "source": "attribute", + "version": "1.4.1", + "diff": "", + "path": "/usr/lib/python2.7/dist-packages/django" + }, + { + "name": "docutils", + "module": "python", + "source": "attribute", + "version": "0.10", + "diff": "", + "path": "/home/wd15/.virtualenvs/fipy/lib/python2.7/site-packages/docutils" + }, + { + "name": "encodings", + "module": "python", + "source": null, + "version": "unknown", + "diff": "", + "path": "/home/wd15/.virtualenvs/default/lib/python2.7/encodings" + }, + { + "name": "extremefill", + "module": "python", + "source": "/home/wd15/git/extremefill", + "version": "549c969edb113d0b3e9804612bfa53e91319c0ea", + "diff": "diff --git a/data/viewer.py b/data/viewer.py\nindex 68f60e0..d9ab7c2 100644\n--- a/data/viewer.py\n+++ b/data/viewer.py\n@@ -122,7 +122,7 @@ class ContourViewer(BaseViewer):\n self.times = times\n self.contours = contours\n self.data = []\n- super(ContourViewer, self).__init__(branches=branches, datafile=datafiles, datafiles=datafiles)\n+ super(ContourViewer, self).__init__(branches=branches, datafile=datafile, datafiles=datafiles)\n \n def plot(self):\n import matplotlib.pyplot as plt\n@@ -152,6 +152,24 @@ class ContourViewer(BaseViewer):\n phi = np.reshape(phi, shape)\n self.data.append((x, y, phi))\n \n+def datafilesFromBranches(branches, datafile):\n+ cwd = os.getcwd()\n+ for count, branch in enumerate(branches):\n+ print 'branch',branch\n+ tempdir = gitCloneToTemp(branch=branch, repositoryPath='ssh://wd15@genie.nist.gov/users/wd15/git/extremefill')\n+ repopath = os.path.join(tempdir, 'extremefill')\n+ datapath = os.path.join(repopath, datafile)\n+ gitMediaSync()\n+ if count == 0:\n+ self.addBaseData(datapath)\n+ basetempdir = tempdir\n+ else:\n+ self.addData(datapath, branch)\n+ cleanTempRepo(tempdir) \n+\n+ cleanTempRepo(basetempdir)\n+ os.chdir(cwd)\n+\n def plotNx():\n branches = ('Nx600', 'Nx300', 'Nx150')\n datafile = os.path.join('data', 'data.h5')\n@@ -174,13 +192,13 @@ def plotCFL():\n \n def plotContour():\n # branches = ('CFL0.0125', 'CFL0.025', 'CFL0.05', 'CFL0.1', 'CFL0.2', 'CFL0.4', 'CFL0.8', 'CFL1.6')\n- branches = ('Nx600', 'Nx150')\n+ branches = ('Nx300', 'Nx150')\n # branches = ('CFL0.025', 'CFL0.05')\n datafile = os.path.join('data', 'data.h5')\n times = (0,)\n- # times = (0., 1000., 2000., 3000., 4000.)\n- # viewer = ContourViewer(times=times, branches=branches, datafile=datafile)\n- viewer = ContourViewer(times=times, branches=branches, datafile=datafile, datafiles=('data150.h5', 'data600.h5'))\n+ times = (0., 1000., 2000., 3000., 4000.)\n+ viewer = ContourViewer(times=times, branches=branches, datafile=datafile)\n+ #viewer = ContourViewer(times=times, branches=branches, datafile=datafile, datafiles=('data150.h5', 'data600.h5'))\n viewer.plot()\n \n if __name__ == '__main__':\n@@ -188,6 +206,6 @@ if __name__ == '__main__':\n # from profiler import calibrate_profiler\n # fudge = calibrate_profiler(10000)\n # profile = Profiler('profile', fudge=fudge)\n- plotCFL()\n+ plotContour()\n # profile.stop()\n ", + "path": "/home/wd15/git/extremefill/extremefill" + }, + { + "name": "fipy", + "module": "python", + "source": "/home/wd15/git/fipy", + "version": "8c51478a3e8c30618b3a96c132612a46735c7548", + "diff": "", + "path": "/home/wd15/git/fipy/fipy" + }, + { + "name": "gi", + "module": "python", + "source": "attribute", + "version": "3.4.0", + "diff": "", + "path": "/usr/lib/python2.7/dist-packages/gi" + }, + { + "name": "glib", + "module": "python", + "source": null, + "version": "unknown", + "diff": "", + "path": "/usr/lib/python2.7/dist-packages/glib" + }, + { + "name": "gobject", + "module": "python", + "source": null, + "version": "unknown", + "diff": "", + "path": "/usr/lib/python2.7/dist-packages/gobject" + }, + { + "name": "google", + "module": "python", + "source": null, + "version": "unknown", + "diff": "", + "path": "/usr/lib/python2.7/dist-packages/google" + }, + { + "name": "gtk", + "module": "python", + "source": null, + "version": "unknown", + "diff": "", + "path": "/usr/lib/python2.7/dist-packages/gtk-2.0/gtk" + }, + { + "name": "httplib2", + "module": "python", + "source": "attribute", + "version": "0.7.4", + "diff": "", + "path": "/usr/lib/python2.7/dist-packages/httplib2" + }, + { + "name": "lockfile", + "module": "python", + "source": "egg-info", + "version": "0.9.1", + "diff": "", + "path": "/home/wd15/.virtualenvs/default/lib/python2.7/site-packages/lockfile-0.9.1-py2.7.egg/lockfile" + }, + { + "name": "lxml", + "module": "python", + "source": null, + "version": "unknown", + "diff": "", + "path": "/usr/lib/python2.7/dist-packages/lxml" + }, + { + "name": "matplotlib", + "module": "python", + "source": "attribute", + "version": "1.1.1", + "diff": "", + "path": "/usr/lib/pymodules/python2.7/matplotlib" + }, + { + "name": "mayavi", + "module": "python", + "source": "attribute", + "version": "4.1.0", + "diff": "", + "path": "/usr/lib/python2.7/dist-packages/mayavi" + }, + { + "name": "mpi4py", + "module": "python", + "source": "attribute", + "version": "1.3", + "diff": "", + "path": "/usr/lib/python2.7/dist-packages/mpi4py" + }, + { + "name": "mpl_toolkits", + "module": "python", + "source": null, + "version": "unknown", + "diff": "", + "path": "/usr/lib/pymodules/python2.7/mpl_toolkits" + }, + { + "name": "mx", + "module": "python", + "source": "attribute", + "version": "3.2.1", + "diff": "", + "path": "/usr/lib/python2.7/dist-packages/mx" + }, + { + "name": "nose", + "module": "python", + "source": "attribute", + "version": "1.2.1", + "diff": "", + "path": "/home/wd15/.virtualenvs/fipy/lib/python2.7/site-packages/nose" + }, + { + "name": "numexpr", + "module": "python", + "source": "attribute", + "version": "2.0.1", + "diff": "", + "path": "/usr/lib/python2.7/dist-packages/numexpr" + }, + { + "name": "numpy", + "module": "python", + "source": "attribute", + "version": "1.6.2", + "diff": "", + "path": "/usr/lib/python2.7/dist-packages/numpy" + }, + { + "name": "pyamg", + "module": "python", + "source": "attribute", + "version": "2.0.4.dev", + "diff": "", + "path": "/home/wd15/.virtualenvs/fipy/lib/python2.7/site-packages/pyamg" + }, + { + "name": "pylsmlib", + "module": "python", + "source": "/home/wd15/git/LSMLIB", + "version": "6f5d969bb27530aa37452a8b096e538a5cf7b993", + "diff": "", + "path": "/home/wd15/git/LSMLIB/pylsmlib/pylsmlib" + }, + { + "name": "pysparse", + "module": "python", + "source": "attribute", + "version": "1.1", + "diff": "", + "path": "/usr/lib/python2.7/dist-packages/pysparse" + }, + { + "name": "pytz", + "module": "python", + "source": "attribute", + "version": "2011k", + "diff": "", + "path": "/usr/lib/python2.7/dist-packages/pytz" + }, + { + "name": "scipy", + "module": "python", + "source": "attribute", + "version": "0.10.1", + "diff": "", + "path": "/usr/lib/python2.7/dist-packages/scipy" + }, + { + "name": "setuptools", + "module": "python", + "source": "attribute", + "version": "0.6", + "diff": "", + "path": "/home/wd15/.virtualenvs/default/local/lib/python2.7/site-packages/distribute-0.6.24-py2.7.egg/setuptools" + }, + { + "name": "simplejson", + "module": "python", + "source": "attribute", + "version": "2.6.1", + "diff": "", + "path": "/usr/lib/python2.7/dist-packages/simplejson" + }, + { + "name": "skfmm", + "module": "python", + "source": "/home/wd15/git/scikit-fmm", + "version": "467e5982fbd9d4eb32495f826d6bda65da498e13", + "diff": "", + "path": "/home/wd15/git/scikit-fmm/skfmm" + }, + { + "name": "sumatra", + "module": "python", + "source": "attribute", + "version": "0.5.0dev", + "diff": "", + "path": "/home/wd15/.virtualenvs/default/lib/python2.7/site-packages/Sumatra-0.5.0dev-py2.7.egg/sumatra" + }, + { + "name": "tables", + "module": "python", + "source": "attribute", + "version": "2.3.1", + "diff": "", + "path": "/usr/lib/python2.7/dist-packages/tables" + }, + { + "name": "tagging", + "module": "python", + "source": "attribute", + "version": "0.3.1", + "diff": "", + "path": "/home/wd15/.virtualenvs/fipy/lib/python2.7/site-packages/tagging" + }, + { + "name": "tornado", + "module": "python", + "source": "attribute", + "version": "2.3", + "diff": "", + "path": "/usr/lib/python2.7/dist-packages/tornado" + }, + { + "name": "traits", + "module": "python", + "source": "attribute", + "version": "4.1.0", + "diff": "", + "path": "/usr/lib/python2.7/dist-packages/traits" + }, + { + "name": "tvtk", + "module": "python", + "source": null, + "version": "unknown", + "diff": "", + "path": "/usr/lib/python2.7/dist-packages/tvtk" + }, + { + "name": "vtk", + "module": "python", + "source": null, + "version": "unknown", + "diff": "", + "path": "/usr/lib/pymodules/python2.7/vtk" + }, + { + "name": "wx", + "module": "python", + "source": "attribute", + "version": "2.8.12.1", + "diff": "", + "path": "/usr/lib/python2.7/dist-packages/wx-2.8-gtk2-unicode/wx" + }, + { + "name": "yaml", + "module": "python", + "source": "attribute", + "version": "3.10", + "diff": "", + "path": "/usr/lib/python2.7/dist-packages/yaml" + }, + { + "name": "zmq", + "module": "python", + "source": "attribute", + "version": "2.2.0", + "diff": "", + "path": "/usr/lib/python2.7/dist-packages/zmq" + } + ], + "user": "Daniel Wheeler ", + "output_data": [ + { + "path": "data.h5", + "digest": "90815e8cdae794b0c34cea976f68f08fc1469996", + "metadata": { + "mimetype": null, + "size": 102992, + "encoding": null + } + } + ], + "input_data": [], + "launch_mode": { + "type": "SerialLaunchMode", + "parameters": { + "working_directory": "/home/wd15/git/extremefill-data" + } + }, + "main_file": "script.py", + "outcome": "" +}, +{ + "script_arguments": "", + "platforms": [ + { + "system_name": "Linux", + "machine": "x86_64", + "version": "#35-Ubuntu SMP Thu Jan 24 13:15:40 UTC 2013", + "ip_addr": "127.0.0.1", + "architecture_bits": "64bit", + "architecture_linkage": "ELF", + "release": "3.5.0-23-generic", + "network_name": "loki", + "processor": "x86_64" + } + ], + "duration": 2.5849039554595947, + "diff": "diff --git a/script.py b/script.py\nindex ec41d60..e4a7100 100644\n--- a/script.py\n+++ b/script.py\n@@ -30,16 +30,5 @@ def run(totalSteps=10,\n NxBase=1200)\n \n if __name__ == '__main__':\n-\n-\n- class Bare(object):\n- pass\n-\n- \n- args = Bare()\n- parser = argparse.ArgumentParser(description=\"Run Extremefill 2D example.\")\n- parser.add_argument('--totalSteps', default=1, type=int)\n- parser.parse_args(namespace=args)\n-\n- run(totalSteps=args.totalSteps, tags=('test',), reason=\"testing SMT class\")\n+ run(totalSteps=2, tag=['test'], reason=\"testing SMT class\")\n \ndiff --git a/smtdecorator.py b/smtdecorator.py\nindex 432a8b7..826170c 100644\n--- a/smtdecorator.py\n+++ b/smtdecorator.py\n@@ -1,4 +1,3 @@\n-\n \"\"\"\n Script to test setting up batch simaulations with Sumatra.\n \n@@ -22,8 +21,8 @@ On laptop use http://129.6.153.60:8000\n import time\n import os\n import sys\n-from contextlib import contextmanager\n from StringIO import StringIO\n+import argparse\n \n \n from sumatra.projects import load_project\n@@ -59,18 +58,21 @@ class SMTDecorator(object):\n def __init__(self, function):\n self.function = function\n \n- def __call__(self, tags=(), reason='', *args, **kwargs):\n+ def __call__(self, tag=[], reason='', *args, **kwargs):\n+\n+ parameters, tag, reason = self.parseargs(kwargs, list(tag), reason)\n+\n project = load_project()\n- record = project.new_record(parameters=SimpleParameterSet(kwargs),\n+ record = project.new_record(parameters=SimpleParameterSet(parameters),\n main_file=self.function.func_globals['__file__'],\n reason=reason)\n \n record.datastore.root = os.path.join(record.datastore.root, record.label)\n- for tag in tags:\n- record.tags.add(tag)\n \n- record.start_time = time.time()\n+ for t in tag:\n+ record.tags.add(t)\n \n+ record.start_time = time.time()\n with Redirect() as out:\n returnvalue = self.function(datadir=record.datastore.root, *args, **record.parameters.as_dict())\n \n@@ -84,5 +86,25 @@ class SMTDecorator(object):\n \n return returnvalue\n \n+ def parseargs(self, func_kwargs, tag, reason):\n+ class Bare:\n+ pass\n+ ext_kwargs = Bare()\n+ parser = argparse.ArgumentParser(description=\"SMT arguments\")\n+\n+ for k, v in func_kwargs.iteritems():\n+ parser.add_argument('--' + k, default=v, type=type(v), dest=k)\n+ \n+ parser.add_argument('--tag', action='append', default=tag, dest='tag')\n+ parser.add_argument('--reason', default=reason, dest='reason')\n+ parser.parse_args(namespace=ext_kwargs)\n \n+ tag = ext_kwargs.tag\n+ reason = ext_kwargs.reason\n \n+ for k, v in func_kwargs.iteritems():\n+ func_kwargs[k] = getattr(ext_kwargs, k)\n+ \n+ return func_kwargs, tag, reason\n+ \n+ ", + "datastore": { + "type": "FileSystemDataStore", + "parameters": { + "root": "./Data/91c2e621543b" + } + }, + "input_datastore": { + "type": "FileSystemDataStore", + "parameters": { + "root": "/" + } + }, + "executable": { + "path": "/home/wd15/.virtualenvs/default/bin/python", + "version": "2.7.3", + "name": "Python", + "options": "" + }, + "parameters": { + "content": "totalSteps = 1", + "type": "SimpleParameterSet" + }, + "label": "91c2e621543b", + "version": "03128c81e5ec503445a0a10166626c2e902ba41e", + "stdout_stderr": "[ 1. 1. 1. 1.]\n[ 0.34738209 0.61535499 0.01923836 0.00971058]\n[ 1.23729704e-01 2.14204081e-01 1.88311438e-04 1.55991524e-03]\n\ntheta 0.0\ncBar_supp 1.0\ncBar_cu 1.0\npotentialBar 1.0\nmin(extension) 7.22965473284e-08\nmin(depositionRate) 2.09114908795e-09\nmin(current) 56.8350759862\nmin(cupric) 997.266139623\nmin(baseCurrent) 56.9323002935\nmax(interfaceTheta) - 1: -0.973021297371\nmin(interfaceTheta) 0.0\nmin(I0) 38.9208518948\ndt 0.011\nelapsed time 0.0\nstep 0\n\n", + "repository": { + "url": "/home/wd15/git/extremefill-data", + "type": "GitRepository", + "upstream": "git@github.com:wd15/extremefill-data.git" + }, + "tags": [ + "test" + ], + "timestamp": "2013-02-19 10:31:47", + "reason": "testing SMT class", + "dependencies": [ + { + "name": "Cython", + "module": "python", + "source": "attribute", + "version": "0.16", + "diff": "", + "path": "/usr/lib/python2.7/dist-packages/Cython" + }, + { + "name": "IPython", + "module": "python", + "source": "attribute", + "version": "0.13.1.rc2", + "diff": "", + "path": "/usr/lib/python2.7/dist-packages/IPython" + }, + { + "name": "PIL", + "module": "python", + "source": null, + "version": "unknown", + "diff": "", + "path": "/usr/lib/python2.7/dist-packages/PIL" + }, + { + "name": "PyQt4", + "module": "python", + "source": null, + "version": "unknown", + "diff": "", + "path": "/usr/lib/python2.7/dist-packages/PyQt4" + }, + { + "name": "PyTrilinos", + "module": "python", + "source": "attribute", + "version": "4.8d", + "diff": "", + "path": "/home/wd15/.virtualenvs/fipy/lib/python2.7/site-packages/PyTrilinos" + }, + { + "name": "dateutil", + "module": "python", + "source": "attribute", + "version": "1.5", + "diff": "", + "path": "/usr/lib/python2.7/dist-packages/dateutil" + }, + { + "name": "distutils", + "module": "python", + "source": "attribute", + "version": "2.7.3", + "diff": "", + "path": "/home/wd15/.virtualenvs/default/lib/python2.7/distutils" + }, + { + "name": "django", + "module": "python", + "source": "attribute", + "version": "1.4.1", + "diff": "", + "path": "/usr/lib/python2.7/dist-packages/django" + }, + { + "name": "docutils", + "module": "python", + "source": "attribute", + "version": "0.10", + "diff": "", + "path": "/home/wd15/.virtualenvs/fipy/lib/python2.7/site-packages/docutils" + }, + { + "name": "encodings", + "module": "python", + "source": null, + "version": "unknown", + "diff": "", + "path": "/home/wd15/.virtualenvs/default/lib/python2.7/encodings" + }, + { + "name": "extremefill", + "module": "python", + "source": "/home/wd15/git/extremefill", + "version": "549c969edb113d0b3e9804612bfa53e91319c0ea", + "diff": "diff --git a/data/viewer.py b/data/viewer.py\nindex 68f60e0..d9ab7c2 100644\n--- a/data/viewer.py\n+++ b/data/viewer.py\n@@ -122,7 +122,7 @@ class ContourViewer(BaseViewer):\n self.times = times\n self.contours = contours\n self.data = []\n- super(ContourViewer, self).__init__(branches=branches, datafile=datafiles, datafiles=datafiles)\n+ super(ContourViewer, self).__init__(branches=branches, datafile=datafile, datafiles=datafiles)\n \n def plot(self):\n import matplotlib.pyplot as plt\n@@ -152,6 +152,24 @@ class ContourViewer(BaseViewer):\n phi = np.reshape(phi, shape)\n self.data.append((x, y, phi))\n \n+def datafilesFromBranches(branches, datafile):\n+ cwd = os.getcwd()\n+ for count, branch in enumerate(branches):\n+ print 'branch',branch\n+ tempdir = gitCloneToTemp(branch=branch, repositoryPath='ssh://wd15@genie.nist.gov/users/wd15/git/extremefill')\n+ repopath = os.path.join(tempdir, 'extremefill')\n+ datapath = os.path.join(repopath, datafile)\n+ gitMediaSync()\n+ if count == 0:\n+ self.addBaseData(datapath)\n+ basetempdir = tempdir\n+ else:\n+ self.addData(datapath, branch)\n+ cleanTempRepo(tempdir) \n+\n+ cleanTempRepo(basetempdir)\n+ os.chdir(cwd)\n+\n def plotNx():\n branches = ('Nx600', 'Nx300', 'Nx150')\n datafile = os.path.join('data', 'data.h5')\n@@ -174,13 +192,13 @@ def plotCFL():\n \n def plotContour():\n # branches = ('CFL0.0125', 'CFL0.025', 'CFL0.05', 'CFL0.1', 'CFL0.2', 'CFL0.4', 'CFL0.8', 'CFL1.6')\n- branches = ('Nx600', 'Nx150')\n+ branches = ('Nx300', 'Nx150')\n # branches = ('CFL0.025', 'CFL0.05')\n datafile = os.path.join('data', 'data.h5')\n times = (0,)\n- # times = (0., 1000., 2000., 3000., 4000.)\n- # viewer = ContourViewer(times=times, branches=branches, datafile=datafile)\n- viewer = ContourViewer(times=times, branches=branches, datafile=datafile, datafiles=('data150.h5', 'data600.h5'))\n+ times = (0., 1000., 2000., 3000., 4000.)\n+ viewer = ContourViewer(times=times, branches=branches, datafile=datafile)\n+ #viewer = ContourViewer(times=times, branches=branches, datafile=datafile, datafiles=('data150.h5', 'data600.h5'))\n viewer.plot()\n \n if __name__ == '__main__':\n@@ -188,6 +206,6 @@ if __name__ == '__main__':\n # from profiler import calibrate_profiler\n # fudge = calibrate_profiler(10000)\n # profile = Profiler('profile', fudge=fudge)\n- plotCFL()\n+ plotContour()\n # profile.stop()\n ", + "path": "/home/wd15/git/extremefill/extremefill" + }, + { + "name": "fipy", + "module": "python", + "source": "/home/wd15/git/fipy", + "version": "8c51478a3e8c30618b3a96c132612a46735c7548", + "diff": "", + "path": "/home/wd15/git/fipy/fipy" + }, + { + "name": "gi", + "module": "python", + "source": "attribute", + "version": "3.4.0", + "diff": "", + "path": "/usr/lib/python2.7/dist-packages/gi" + }, + { + "name": "glib", + "module": "python", + "source": null, + "version": "unknown", + "diff": "", + "path": "/usr/lib/python2.7/dist-packages/glib" + }, + { + "name": "gobject", + "module": "python", + "source": null, + "version": "unknown", + "diff": "", + "path": "/usr/lib/python2.7/dist-packages/gobject" + }, + { + "name": "google", + "module": "python", + "source": null, + "version": "unknown", + "diff": "", + "path": "/usr/lib/python2.7/dist-packages/google" + }, + { + "name": "gtk", + "module": "python", + "source": null, + "version": "unknown", + "diff": "", + "path": "/usr/lib/python2.7/dist-packages/gtk-2.0/gtk" + }, + { + "name": "httplib2", + "module": "python", + "source": "attribute", + "version": "0.7.4", + "diff": "", + "path": "/usr/lib/python2.7/dist-packages/httplib2" + }, + { + "name": "lockfile", + "module": "python", + "source": "egg-info", + "version": "0.9.1", + "diff": "", + "path": "/home/wd15/.virtualenvs/default/lib/python2.7/site-packages/lockfile-0.9.1-py2.7.egg/lockfile" + }, + { + "name": "lxml", + "module": "python", + "source": null, + "version": "unknown", + "diff": "", + "path": "/usr/lib/python2.7/dist-packages/lxml" + }, + { + "name": "matplotlib", + "module": "python", + "source": "attribute", + "version": "1.1.1", + "diff": "", + "path": "/usr/lib/pymodules/python2.7/matplotlib" + }, + { + "name": "mayavi", + "module": "python", + "source": "attribute", + "version": "4.1.0", + "diff": "", + "path": "/usr/lib/python2.7/dist-packages/mayavi" + }, + { + "name": "mpi4py", + "module": "python", + "source": "attribute", + "version": "1.3", + "diff": "", + "path": "/usr/lib/python2.7/dist-packages/mpi4py" + }, + { + "name": "mpl_toolkits", + "module": "python", + "source": null, + "version": "unknown", + "diff": "", + "path": "/usr/lib/pymodules/python2.7/mpl_toolkits" + }, + { + "name": "mx", + "module": "python", + "source": "attribute", + "version": "3.2.1", + "diff": "", + "path": "/usr/lib/python2.7/dist-packages/mx" + }, + { + "name": "nose", + "module": "python", + "source": "attribute", + "version": "1.2.1", + "diff": "", + "path": "/home/wd15/.virtualenvs/fipy/lib/python2.7/site-packages/nose" + }, + { + "name": "numexpr", + "module": "python", + "source": "attribute", + "version": "2.0.1", + "diff": "", + "path": "/usr/lib/python2.7/dist-packages/numexpr" + }, + { + "name": "numpy", + "module": "python", + "source": "attribute", + "version": "1.6.2", + "diff": "", + "path": "/usr/lib/python2.7/dist-packages/numpy" + }, + { + "name": "pyamg", + "module": "python", + "source": "attribute", + "version": "2.0.4.dev", + "diff": "", + "path": "/home/wd15/.virtualenvs/fipy/lib/python2.7/site-packages/pyamg" + }, + { + "name": "pylsmlib", + "module": "python", + "source": "/home/wd15/git/LSMLIB", + "version": "6f5d969bb27530aa37452a8b096e538a5cf7b993", + "diff": "", + "path": "/home/wd15/git/LSMLIB/pylsmlib/pylsmlib" + }, + { + "name": "pysparse", + "module": "python", + "source": "attribute", + "version": "1.1", + "diff": "", + "path": "/usr/lib/python2.7/dist-packages/pysparse" + }, + { + "name": "pytz", + "module": "python", + "source": "attribute", + "version": "2011k", + "diff": "", + "path": "/usr/lib/python2.7/dist-packages/pytz" + }, + { + "name": "scipy", + "module": "python", + "source": "attribute", + "version": "0.10.1", + "diff": "", + "path": "/usr/lib/python2.7/dist-packages/scipy" + }, + { + "name": "setuptools", + "module": "python", + "source": "attribute", + "version": "0.6", + "diff": "", + "path": "/home/wd15/.virtualenvs/default/local/lib/python2.7/site-packages/distribute-0.6.24-py2.7.egg/setuptools" + }, + { + "name": "simplejson", + "module": "python", + "source": "attribute", + "version": "2.6.1", + "diff": "", + "path": "/usr/lib/python2.7/dist-packages/simplejson" + }, + { + "name": "skfmm", + "module": "python", + "source": "/home/wd15/git/scikit-fmm", + "version": "467e5982fbd9d4eb32495f826d6bda65da498e13", + "diff": "", + "path": "/home/wd15/git/scikit-fmm/skfmm" + }, + { + "name": "sumatra", + "module": "python", + "source": "attribute", + "version": "0.5.0dev", + "diff": "", + "path": "/home/wd15/.virtualenvs/default/lib/python2.7/site-packages/Sumatra-0.5.0dev-py2.7.egg/sumatra" + }, + { + "name": "tables", + "module": "python", + "source": "attribute", + "version": "2.3.1", + "diff": "", + "path": "/usr/lib/python2.7/dist-packages/tables" + }, + { + "name": "tagging", + "module": "python", + "source": "attribute", + "version": "0.3.1", + "diff": "", + "path": "/home/wd15/.virtualenvs/fipy/lib/python2.7/site-packages/tagging" + }, + { + "name": "tornado", + "module": "python", + "source": "attribute", + "version": "2.3", + "diff": "", + "path": "/usr/lib/python2.7/dist-packages/tornado" + }, + { + "name": "traits", + "module": "python", + "source": "attribute", + "version": "4.1.0", + "diff": "", + "path": "/usr/lib/python2.7/dist-packages/traits" + }, + { + "name": "tvtk", + "module": "python", + "source": null, + "version": "unknown", + "diff": "", + "path": "/usr/lib/python2.7/dist-packages/tvtk" + }, + { + "name": "vtk", + "module": "python", + "source": null, + "version": "unknown", + "diff": "", + "path": "/usr/lib/pymodules/python2.7/vtk" + }, + { + "name": "wx", + "module": "python", + "source": "attribute", + "version": "2.8.12.1", + "diff": "", + "path": "/usr/lib/python2.7/dist-packages/wx-2.8-gtk2-unicode/wx" + }, + { + "name": "yaml", + "module": "python", + "source": "attribute", + "version": "3.10", + "diff": "", + "path": "/usr/lib/python2.7/dist-packages/yaml" + }, + { + "name": "zmq", + "module": "python", + "source": "attribute", + "version": "2.2.0", + "diff": "", + "path": "/usr/lib/python2.7/dist-packages/zmq" + } + ], + "user": "Daniel Wheeler ", + "output_data": [ + { + "path": "data.h5", + "digest": "90815e8cdae794b0c34cea976f68f08fc1469996", + "metadata": { + "mimetype": null, + "size": 102992, + "encoding": null + } + } + ], + "input_data": [], + "launch_mode": { + "type": "SerialLaunchMode", + "parameters": { + "working_directory": "/home/wd15/git/extremefill-data" + } + }, + "main_file": "script.py", + "outcome": "" +}, +{ + "script_arguments": "", + "platforms": [ + { + "system_name": "Linux", + "machine": "x86_64", + "version": "#35-Ubuntu SMP Thu Jan 24 13:15:40 UTC 2013", + "ip_addr": "127.0.0.1", + "architecture_bits": "64bit", + "architecture_linkage": "ELF", + "release": "3.5.0-23-generic", + "network_name": "loki", + "processor": "x86_64" + } + ], + "duration": 3.917757987976074, + "diff": "diff --git a/script.py b/script.py\nindex ec41d60..e4a7100 100644\n--- a/script.py\n+++ b/script.py\n@@ -30,16 +30,5 @@ def run(totalSteps=10,\n NxBase=1200)\n \n if __name__ == '__main__':\n-\n-\n- class Bare(object):\n- pass\n-\n- \n- args = Bare()\n- parser = argparse.ArgumentParser(description=\"Run Extremefill 2D example.\")\n- parser.add_argument('--totalSteps', default=1, type=int)\n- parser.parse_args(namespace=args)\n-\n- run(totalSteps=args.totalSteps, tags=('test',), reason=\"testing SMT class\")\n+ run(totalSteps=2, tag=['test'], reason=\"testing SMT class\")\n \ndiff --git a/smtdecorator.py b/smtdecorator.py\nindex 432a8b7..826170c 100644\n--- a/smtdecorator.py\n+++ b/smtdecorator.py\n@@ -1,4 +1,3 @@\n-\n \"\"\"\n Script to test setting up batch simaulations with Sumatra.\n \n@@ -22,8 +21,8 @@ On laptop use http://129.6.153.60:8000\n import time\n import os\n import sys\n-from contextlib import contextmanager\n from StringIO import StringIO\n+import argparse\n \n \n from sumatra.projects import load_project\n@@ -59,18 +58,21 @@ class SMTDecorator(object):\n def __init__(self, function):\n self.function = function\n \n- def __call__(self, tags=(), reason='', *args, **kwargs):\n+ def __call__(self, tag=[], reason='', *args, **kwargs):\n+\n+ parameters, tag, reason = self.parseargs(kwargs, list(tag), reason)\n+\n project = load_project()\n- record = project.new_record(parameters=SimpleParameterSet(kwargs),\n+ record = project.new_record(parameters=SimpleParameterSet(parameters),\n main_file=self.function.func_globals['__file__'],\n reason=reason)\n \n record.datastore.root = os.path.join(record.datastore.root, record.label)\n- for tag in tags:\n- record.tags.add(tag)\n \n- record.start_time = time.time()\n+ for t in tag:\n+ record.tags.add(t)\n \n+ record.start_time = time.time()\n with Redirect() as out:\n returnvalue = self.function(datadir=record.datastore.root, *args, **record.parameters.as_dict())\n \n@@ -84,5 +86,25 @@ class SMTDecorator(object):\n \n return returnvalue\n \n+ def parseargs(self, func_kwargs, tag, reason):\n+ class Bare:\n+ pass\n+ ext_kwargs = Bare()\n+ parser = argparse.ArgumentParser(description=\"SMT arguments\")\n+\n+ for k, v in func_kwargs.iteritems():\n+ parser.add_argument('--' + k, default=v, type=type(v), dest=k)\n+ \n+ parser.add_argument('--tag', action='append', default=tag, dest='tag')\n+ parser.add_argument('--reason', default=reason, dest='reason')\n+ parser.parse_args(namespace=ext_kwargs)\n \n+ tag = ext_kwargs.tag\n+ reason = ext_kwargs.reason\n \n+ for k, v in func_kwargs.iteritems():\n+ func_kwargs[k] = getattr(ext_kwargs, k)\n+ \n+ return func_kwargs, tag, reason\n+ \n+ ", + "datastore": { + "type": "FileSystemDataStore", + "parameters": { + "root": "./Data/9cded8d95a51" + } + }, + "input_datastore": { + "type": "FileSystemDataStore", + "parameters": { + "root": "/" + } + }, + "executable": { + "path": "/home/wd15/.virtualenvs/default/bin/python", + "version": "2.7.3", + "name": "Python", + "options": "" + }, + "parameters": { + "content": "totalSteps = 2", + "type": "SimpleParameterSet" + }, + "label": "9cded8d95a51", + "version": "03128c81e5ec503445a0a10166626c2e902ba41e", + "stdout_stderr": "[ 1. 1. 1. 1.]\n[ 0.34738209 0.61535499 0.01923836 0.00971058]\n[ 1.23729704e-01 2.14204081e-01 1.88311438e-04 1.55991524e-03]\n\ntheta 0.0\ncBar_supp 1.0\ncBar_cu 1.0\npotentialBar 1.0\nmin(extension) 7.22965473284e-08\nmin(depositionRate) 2.09114908795e-09\nmin(current) 56.8350759862\nmin(cupric) 997.266139623\nmin(baseCurrent) 56.9323002935\nmax(interfaceTheta) - 1: -0.973021297371\nmin(interfaceTheta) 0.0\nmin(I0) 38.9208518948\ndt 0.011\nelapsed time 0.0\nstep 0\n\n[ 1. 1. 1. 1.]\n[ 0.10765512 0.04576554 0.03330295 0.00523947]\n\ntheta 0.0\ncBar_supp 1.0\ncBar_cu 1.0\npotentialBar 1.0\nmin(extension) 2.09114554699e-09\nmin(depositionRate) 1.47837489306e-09\nmin(current) 40.1805638188\nmin(cupric) 996.200886814\nmin(baseCurrent) 40.2838895551\nmax(interfaceTheta) - 1: -0.947107282423\nmin(interfaceTheta) 0.0\nmin(I0) 37.8842912969\ndt 0.0121\nelapsed time 0.011\nstep 1\n\n", + "repository": { + "url": "/home/wd15/git/extremefill-data", + "type": "GitRepository", + "upstream": "git@github.com:wd15/extremefill-data.git" + }, + "tags": [ + "test" + ], + "timestamp": "2013-02-18 22:33:13", + "reason": "testing for loop", + "dependencies": [ + { + "name": "Cython", + "module": "python", + "source": "attribute", + "version": "0.16", + "diff": "", + "path": "/usr/lib/python2.7/dist-packages/Cython" + }, + { + "name": "IPython", + "module": "python", + "source": "attribute", + "version": "0.13.1.rc2", + "diff": "", + "path": "/usr/lib/python2.7/dist-packages/IPython" + }, + { + "name": "PIL", + "module": "python", + "source": null, + "version": "unknown", + "diff": "", + "path": "/usr/lib/python2.7/dist-packages/PIL" + }, + { + "name": "PyQt4", + "module": "python", + "source": null, + "version": "unknown", + "diff": "", + "path": "/usr/lib/python2.7/dist-packages/PyQt4" + }, + { + "name": "PyTrilinos", + "module": "python", + "source": "attribute", + "version": "4.8d", + "diff": "", + "path": "/home/wd15/.virtualenvs/fipy/lib/python2.7/site-packages/PyTrilinos" + }, + { + "name": "dateutil", + "module": "python", + "source": "attribute", + "version": "1.5", + "diff": "", + "path": "/usr/lib/python2.7/dist-packages/dateutil" + }, + { + "name": "distutils", + "module": "python", + "source": "attribute", + "version": "2.7.3", + "diff": "", + "path": "/home/wd15/.virtualenvs/default/lib/python2.7/distutils" + }, + { + "name": "django", + "module": "python", + "source": "attribute", + "version": "1.4.1", + "diff": "", + "path": "/usr/lib/python2.7/dist-packages/django" + }, + { + "name": "docutils", + "module": "python", + "source": "attribute", + "version": "0.10", + "diff": "", + "path": "/home/wd15/.virtualenvs/fipy/lib/python2.7/site-packages/docutils" + }, + { + "name": "encodings", + "module": "python", + "source": null, + "version": "unknown", + "diff": "", + "path": "/home/wd15/.virtualenvs/default/lib/python2.7/encodings" + }, + { + "name": "extremefill", + "module": "python", + "source": "/home/wd15/git/extremefill", + "version": "549c969edb113d0b3e9804612bfa53e91319c0ea", + "diff": "diff --git a/data/viewer.py b/data/viewer.py\nindex 68f60e0..d9ab7c2 100644\n--- a/data/viewer.py\n+++ b/data/viewer.py\n@@ -122,7 +122,7 @@ class ContourViewer(BaseViewer):\n self.times = times\n self.contours = contours\n self.data = []\n- super(ContourViewer, self).__init__(branches=branches, datafile=datafiles, datafiles=datafiles)\n+ super(ContourViewer, self).__init__(branches=branches, datafile=datafile, datafiles=datafiles)\n \n def plot(self):\n import matplotlib.pyplot as plt\n@@ -152,6 +152,24 @@ class ContourViewer(BaseViewer):\n phi = np.reshape(phi, shape)\n self.data.append((x, y, phi))\n \n+def datafilesFromBranches(branches, datafile):\n+ cwd = os.getcwd()\n+ for count, branch in enumerate(branches):\n+ print 'branch',branch\n+ tempdir = gitCloneToTemp(branch=branch, repositoryPath='ssh://wd15@genie.nist.gov/users/wd15/git/extremefill')\n+ repopath = os.path.join(tempdir, 'extremefill')\n+ datapath = os.path.join(repopath, datafile)\n+ gitMediaSync()\n+ if count == 0:\n+ self.addBaseData(datapath)\n+ basetempdir = tempdir\n+ else:\n+ self.addData(datapath, branch)\n+ cleanTempRepo(tempdir) \n+\n+ cleanTempRepo(basetempdir)\n+ os.chdir(cwd)\n+\n def plotNx():\n branches = ('Nx600', 'Nx300', 'Nx150')\n datafile = os.path.join('data', 'data.h5')\n@@ -174,13 +192,13 @@ def plotCFL():\n \n def plotContour():\n # branches = ('CFL0.0125', 'CFL0.025', 'CFL0.05', 'CFL0.1', 'CFL0.2', 'CFL0.4', 'CFL0.8', 'CFL1.6')\n- branches = ('Nx600', 'Nx150')\n+ branches = ('Nx300', 'Nx150')\n # branches = ('CFL0.025', 'CFL0.05')\n datafile = os.path.join('data', 'data.h5')\n times = (0,)\n- # times = (0., 1000., 2000., 3000., 4000.)\n- # viewer = ContourViewer(times=times, branches=branches, datafile=datafile)\n- viewer = ContourViewer(times=times, branches=branches, datafile=datafile, datafiles=('data150.h5', 'data600.h5'))\n+ times = (0., 1000., 2000., 3000., 4000.)\n+ viewer = ContourViewer(times=times, branches=branches, datafile=datafile)\n+ #viewer = ContourViewer(times=times, branches=branches, datafile=datafile, datafiles=('data150.h5', 'data600.h5'))\n viewer.plot()\n \n if __name__ == '__main__':\n@@ -188,6 +206,6 @@ if __name__ == '__main__':\n # from profiler import calibrate_profiler\n # fudge = calibrate_profiler(10000)\n # profile = Profiler('profile', fudge=fudge)\n- plotCFL()\n+ plotContour()\n # profile.stop()\n ", + "path": "/home/wd15/git/extremefill/extremefill" + }, + { + "name": "fipy", + "module": "python", + "source": "/home/wd15/git/fipy", + "version": "8c51478a3e8c30618b3a96c132612a46735c7548", + "diff": "", + "path": "/home/wd15/git/fipy/fipy" + }, + { + "name": "gi", + "module": "python", + "source": "attribute", + "version": "3.4.0", + "diff": "", + "path": "/usr/lib/python2.7/dist-packages/gi" + }, + { + "name": "glib", + "module": "python", + "source": null, + "version": "unknown", + "diff": "", + "path": "/usr/lib/python2.7/dist-packages/glib" + }, + { + "name": "gobject", + "module": "python", + "source": null, + "version": "unknown", + "diff": "", + "path": "/usr/lib/python2.7/dist-packages/gobject" + }, + { + "name": "google", + "module": "python", + "source": null, + "version": "unknown", + "diff": "", + "path": "/usr/lib/python2.7/dist-packages/google" + }, + { + "name": "gtk", + "module": "python", + "source": null, + "version": "unknown", + "diff": "", + "path": "/usr/lib/python2.7/dist-packages/gtk-2.0/gtk" + }, + { + "name": "httplib2", + "module": "python", + "source": "attribute", + "version": "0.7.4", + "diff": "", + "path": "/usr/lib/python2.7/dist-packages/httplib2" + }, + { + "name": "lockfile", + "module": "python", + "source": "egg-info", + "version": "0.9.1", + "diff": "", + "path": "/home/wd15/.virtualenvs/default/lib/python2.7/site-packages/lockfile-0.9.1-py2.7.egg/lockfile" + }, + { + "name": "lxml", + "module": "python", + "source": null, + "version": "unknown", + "diff": "", + "path": "/usr/lib/python2.7/dist-packages/lxml" + }, + { + "name": "matplotlib", + "module": "python", + "source": "attribute", + "version": "1.1.1", + "diff": "", + "path": "/usr/lib/pymodules/python2.7/matplotlib" + }, + { + "name": "mayavi", + "module": "python", + "source": "attribute", + "version": "4.1.0", + "diff": "", + "path": "/usr/lib/python2.7/dist-packages/mayavi" + }, + { + "name": "mpi4py", + "module": "python", + "source": "attribute", + "version": "1.3", + "diff": "", + "path": "/usr/lib/python2.7/dist-packages/mpi4py" + }, + { + "name": "mpl_toolkits", + "module": "python", + "source": null, + "version": "unknown", + "diff": "", + "path": "/usr/lib/pymodules/python2.7/mpl_toolkits" + }, + { + "name": "mx", + "module": "python", + "source": "attribute", + "version": "3.2.1", + "diff": "", + "path": "/usr/lib/python2.7/dist-packages/mx" + }, + { + "name": "nose", + "module": "python", + "source": "attribute", + "version": "1.2.1", + "diff": "", + "path": "/home/wd15/.virtualenvs/fipy/lib/python2.7/site-packages/nose" + }, + { + "name": "numexpr", + "module": "python", + "source": "attribute", + "version": "2.0.1", + "diff": "", + "path": "/usr/lib/python2.7/dist-packages/numexpr" + }, + { + "name": "numpy", + "module": "python", + "source": "attribute", + "version": "1.6.2", + "diff": "", + "path": "/usr/lib/python2.7/dist-packages/numpy" + }, + { + "name": "pyamg", + "module": "python", + "source": "attribute", + "version": "2.0.4.dev", + "diff": "", + "path": "/home/wd15/.virtualenvs/fipy/lib/python2.7/site-packages/pyamg" + }, + { + "name": "pylsmlib", + "module": "python", + "source": "/home/wd15/git/LSMLIB", + "version": "6f5d969bb27530aa37452a8b096e538a5cf7b993", + "diff": "", + "path": "/home/wd15/git/LSMLIB/pylsmlib/pylsmlib" + }, + { + "name": "pysparse", + "module": "python", + "source": "attribute", + "version": "1.1", + "diff": "", + "path": "/usr/lib/python2.7/dist-packages/pysparse" + }, + { + "name": "pytz", + "module": "python", + "source": "attribute", + "version": "2011k", + "diff": "", + "path": "/usr/lib/python2.7/dist-packages/pytz" + }, + { + "name": "scipy", + "module": "python", + "source": "attribute", + "version": "0.10.1", + "diff": "", + "path": "/usr/lib/python2.7/dist-packages/scipy" + }, + { + "name": "setuptools", + "module": "python", + "source": "attribute", + "version": "0.6", + "diff": "", + "path": "/home/wd15/.virtualenvs/default/local/lib/python2.7/site-packages/distribute-0.6.24-py2.7.egg/setuptools" + }, + { + "name": "simplejson", + "module": "python", + "source": "attribute", + "version": "2.6.1", + "diff": "", + "path": "/usr/lib/python2.7/dist-packages/simplejson" + }, + { + "name": "skfmm", + "module": "python", + "source": "/home/wd15/git/scikit-fmm", + "version": "467e5982fbd9d4eb32495f826d6bda65da498e13", + "diff": "", + "path": "/home/wd15/git/scikit-fmm/skfmm" + }, + { + "name": "sumatra", + "module": "python", + "source": "attribute", + "version": "0.5.0dev", + "diff": "", + "path": "/home/wd15/.virtualenvs/default/lib/python2.7/site-packages/Sumatra-0.5.0dev-py2.7.egg/sumatra" + }, + { + "name": "tables", + "module": "python", + "source": "attribute", + "version": "2.3.1", + "diff": "", + "path": "/usr/lib/python2.7/dist-packages/tables" + }, + { + "name": "tagging", + "module": "python", + "source": "attribute", + "version": "0.3.1", + "diff": "", + "path": "/home/wd15/.virtualenvs/fipy/lib/python2.7/site-packages/tagging" + }, + { + "name": "tornado", + "module": "python", + "source": "attribute", + "version": "2.3", + "diff": "", + "path": "/usr/lib/python2.7/dist-packages/tornado" + }, + { + "name": "traits", + "module": "python", + "source": "attribute", + "version": "4.1.0", + "diff": "", + "path": "/usr/lib/python2.7/dist-packages/traits" + }, + { + "name": "tvtk", + "module": "python", + "source": null, + "version": "unknown", + "diff": "", + "path": "/usr/lib/python2.7/dist-packages/tvtk" + }, + { + "name": "vtk", + "module": "python", + "source": null, + "version": "unknown", + "diff": "", + "path": "/usr/lib/pymodules/python2.7/vtk" + }, + { + "name": "wx", + "module": "python", + "source": "attribute", + "version": "2.8.12.1", + "diff": "", + "path": "/usr/lib/python2.7/dist-packages/wx-2.8-gtk2-unicode/wx" + }, + { + "name": "yaml", + "module": "python", + "source": "attribute", + "version": "3.10", + "diff": "", + "path": "/usr/lib/python2.7/dist-packages/yaml" + }, + { + "name": "zmq", + "module": "python", + "source": "attribute", + "version": "2.2.0", + "diff": "", + "path": "/usr/lib/python2.7/dist-packages/zmq" + } + ], + "user": "Daniel Wheeler ", + "output_data": [ + { + "path": "data.h5", + "digest": "7c11935f7c9da601c1850e021e624c411c2f9e08", + "metadata": { + "mimetype": null, + "size": 102992, + "encoding": null + } + } + ], + "input_data": [], + "launch_mode": { + "type": "SerialLaunchMode", + "parameters": { + "working_directory": "/home/wd15/git/extremefill-data" + } + }, + "main_file": "script.py", + "outcome": "" +}, +{ + "script_arguments": "", + "platforms": [ + { + "system_name": "Linux", + "machine": "x86_64", + "version": "#35-Ubuntu SMP Thu Jan 24 13:15:40 UTC 2013", + "ip_addr": "127.0.0.1", + "architecture_bits": "64bit", + "architecture_linkage": "ELF", + "release": "3.5.0-23-generic", + "network_name": "loki", + "processor": "x86_64" + } + ], + "duration": 2.63201904296875, + "diff": "diff --git a/script.py b/script.py\nindex ec41d60..e4a7100 100644\n--- a/script.py\n+++ b/script.py\n@@ -30,16 +30,5 @@ def run(totalSteps=10,\n NxBase=1200)\n \n if __name__ == '__main__':\n-\n-\n- class Bare(object):\n- pass\n-\n- \n- args = Bare()\n- parser = argparse.ArgumentParser(description=\"Run Extremefill 2D example.\")\n- parser.add_argument('--totalSteps', default=1, type=int)\n- parser.parse_args(namespace=args)\n-\n- run(totalSteps=args.totalSteps, tags=('test',), reason=\"testing SMT class\")\n+ run(totalSteps=2, tag=['test'], reason=\"testing SMT class\")\n \ndiff --git a/smtdecorator.py b/smtdecorator.py\nindex 432a8b7..826170c 100644\n--- a/smtdecorator.py\n+++ b/smtdecorator.py\n@@ -1,4 +1,3 @@\n-\n \"\"\"\n Script to test setting up batch simaulations with Sumatra.\n \n@@ -22,8 +21,8 @@ On laptop use http://129.6.153.60:8000\n import time\n import os\n import sys\n-from contextlib import contextmanager\n from StringIO import StringIO\n+import argparse\n \n \n from sumatra.projects import load_project\n@@ -59,18 +58,21 @@ class SMTDecorator(object):\n def __init__(self, function):\n self.function = function\n \n- def __call__(self, tags=(), reason='', *args, **kwargs):\n+ def __call__(self, tag=[], reason='', *args, **kwargs):\n+\n+ parameters, tag, reason = self.parseargs(kwargs, list(tag), reason)\n+\n project = load_project()\n- record = project.new_record(parameters=SimpleParameterSet(kwargs),\n+ record = project.new_record(parameters=SimpleParameterSet(parameters),\n main_file=self.function.func_globals['__file__'],\n reason=reason)\n \n record.datastore.root = os.path.join(record.datastore.root, record.label)\n- for tag in tags:\n- record.tags.add(tag)\n \n- record.start_time = time.time()\n+ for t in tag:\n+ record.tags.add(t)\n \n+ record.start_time = time.time()\n with Redirect() as out:\n returnvalue = self.function(datadir=record.datastore.root, *args, **record.parameters.as_dict())\n \n@@ -84,5 +86,25 @@ class SMTDecorator(object):\n \n return returnvalue\n \n+ def parseargs(self, func_kwargs, tag, reason):\n+ class Bare:\n+ pass\n+ ext_kwargs = Bare()\n+ parser = argparse.ArgumentParser(description=\"SMT arguments\")\n+\n+ for k, v in func_kwargs.iteritems():\n+ parser.add_argument('--' + k, default=v, type=type(v), dest=k)\n+ \n+ parser.add_argument('--tag', action='append', default=tag, dest='tag')\n+ parser.add_argument('--reason', default=reason, dest='reason')\n+ parser.parse_args(namespace=ext_kwargs)\n \n+ tag = ext_kwargs.tag\n+ reason = ext_kwargs.reason\n \n+ for k, v in func_kwargs.iteritems():\n+ func_kwargs[k] = getattr(ext_kwargs, k)\n+ \n+ return func_kwargs, tag, reason\n+ \n+ ", + "datastore": { + "type": "FileSystemDataStore", + "parameters": { + "root": "./Data/86aa8bc75941" + } + }, + "input_datastore": { + "type": "FileSystemDataStore", + "parameters": { + "root": "/" + } + }, + "executable": { + "path": "/home/wd15/.virtualenvs/default/bin/python", + "version": "2.7.3", + "name": "Python", + "options": "" + }, + "parameters": { + "content": "totalSteps = 1", + "type": "SimpleParameterSet" + }, + "label": "86aa8bc75941", + "version": "03128c81e5ec503445a0a10166626c2e902ba41e", + "stdout_stderr": "[ 1. 1. 1. 1.]\n[ 0.34738209 0.61535499 0.01923836 0.00971058]\n[ 1.23729704e-01 2.14204081e-01 1.88311438e-04 1.55991524e-03]\n\ntheta 0.0\ncBar_supp 1.0\ncBar_cu 1.0\npotentialBar 1.0\nmin(extension) 7.22965473284e-08\nmin(depositionRate) 2.09114908795e-09\nmin(current) 56.8350759862\nmin(cupric) 997.266139623\nmin(baseCurrent) 56.9323002935\nmax(interfaceTheta) - 1: -0.973021297371\nmin(interfaceTheta) 0.0\nmin(I0) 38.9208518948\ndt 0.011\nelapsed time 0.0\nstep 0\n\n", + "repository": { + "url": "/home/wd15/git/extremefill-data", + "type": "GitRepository", + "upstream": "git@github.com:wd15/extremefill-data.git" + }, + "tags": [ + "test" + ], + "timestamp": "2013-02-18 22:33:13", + "reason": "testing for loop", + "dependencies": [ + { + "name": "Cython", + "module": "python", + "source": "attribute", + "version": "0.16", + "diff": "", + "path": "/usr/lib/python2.7/dist-packages/Cython" + }, + { + "name": "IPython", + "module": "python", + "source": "attribute", + "version": "0.13.1.rc2", + "diff": "", + "path": "/usr/lib/python2.7/dist-packages/IPython" + }, + { + "name": "PIL", + "module": "python", + "source": null, + "version": "unknown", + "diff": "", + "path": "/usr/lib/python2.7/dist-packages/PIL" + }, + { + "name": "PyQt4", + "module": "python", + "source": null, + "version": "unknown", + "diff": "", + "path": "/usr/lib/python2.7/dist-packages/PyQt4" + }, + { + "name": "PyTrilinos", + "module": "python", + "source": "attribute", + "version": "4.8d", + "diff": "", + "path": "/home/wd15/.virtualenvs/fipy/lib/python2.7/site-packages/PyTrilinos" + }, + { + "name": "dateutil", + "module": "python", + "source": "attribute", + "version": "1.5", + "diff": "", + "path": "/usr/lib/python2.7/dist-packages/dateutil" + }, + { + "name": "distutils", + "module": "python", + "source": "attribute", + "version": "2.7.3", + "diff": "", + "path": "/home/wd15/.virtualenvs/default/lib/python2.7/distutils" + }, + { + "name": "django", + "module": "python", + "source": "attribute", + "version": "1.4.1", + "diff": "", + "path": "/usr/lib/python2.7/dist-packages/django" + }, + { + "name": "docutils", + "module": "python", + "source": "attribute", + "version": "0.10", + "diff": "", + "path": "/home/wd15/.virtualenvs/fipy/lib/python2.7/site-packages/docutils" + }, + { + "name": "encodings", + "module": "python", + "source": null, + "version": "unknown", + "diff": "", + "path": "/home/wd15/.virtualenvs/default/lib/python2.7/encodings" + }, + { + "name": "extremefill", + "module": "python", + "source": "/home/wd15/git/extremefill", + "version": "549c969edb113d0b3e9804612bfa53e91319c0ea", + "diff": "diff --git a/data/viewer.py b/data/viewer.py\nindex 68f60e0..d9ab7c2 100644\n--- a/data/viewer.py\n+++ b/data/viewer.py\n@@ -122,7 +122,7 @@ class ContourViewer(BaseViewer):\n self.times = times\n self.contours = contours\n self.data = []\n- super(ContourViewer, self).__init__(branches=branches, datafile=datafiles, datafiles=datafiles)\n+ super(ContourViewer, self).__init__(branches=branches, datafile=datafile, datafiles=datafiles)\n \n def plot(self):\n import matplotlib.pyplot as plt\n@@ -152,6 +152,24 @@ class ContourViewer(BaseViewer):\n phi = np.reshape(phi, shape)\n self.data.append((x, y, phi))\n \n+def datafilesFromBranches(branches, datafile):\n+ cwd = os.getcwd()\n+ for count, branch in enumerate(branches):\n+ print 'branch',branch\n+ tempdir = gitCloneToTemp(branch=branch, repositoryPath='ssh://wd15@genie.nist.gov/users/wd15/git/extremefill')\n+ repopath = os.path.join(tempdir, 'extremefill')\n+ datapath = os.path.join(repopath, datafile)\n+ gitMediaSync()\n+ if count == 0:\n+ self.addBaseData(datapath)\n+ basetempdir = tempdir\n+ else:\n+ self.addData(datapath, branch)\n+ cleanTempRepo(tempdir) \n+\n+ cleanTempRepo(basetempdir)\n+ os.chdir(cwd)\n+\n def plotNx():\n branches = ('Nx600', 'Nx300', 'Nx150')\n datafile = os.path.join('data', 'data.h5')\n@@ -174,13 +192,13 @@ def plotCFL():\n \n def plotContour():\n # branches = ('CFL0.0125', 'CFL0.025', 'CFL0.05', 'CFL0.1', 'CFL0.2', 'CFL0.4', 'CFL0.8', 'CFL1.6')\n- branches = ('Nx600', 'Nx150')\n+ branches = ('Nx300', 'Nx150')\n # branches = ('CFL0.025', 'CFL0.05')\n datafile = os.path.join('data', 'data.h5')\n times = (0,)\n- # times = (0., 1000., 2000., 3000., 4000.)\n- # viewer = ContourViewer(times=times, branches=branches, datafile=datafile)\n- viewer = ContourViewer(times=times, branches=branches, datafile=datafile, datafiles=('data150.h5', 'data600.h5'))\n+ times = (0., 1000., 2000., 3000., 4000.)\n+ viewer = ContourViewer(times=times, branches=branches, datafile=datafile)\n+ #viewer = ContourViewer(times=times, branches=branches, datafile=datafile, datafiles=('data150.h5', 'data600.h5'))\n viewer.plot()\n \n if __name__ == '__main__':\n@@ -188,6 +206,6 @@ if __name__ == '__main__':\n # from profiler import calibrate_profiler\n # fudge = calibrate_profiler(10000)\n # profile = Profiler('profile', fudge=fudge)\n- plotCFL()\n+ plotContour()\n # profile.stop()\n ", + "path": "/home/wd15/git/extremefill/extremefill" + }, + { + "name": "fipy", + "module": "python", + "source": "/home/wd15/git/fipy", + "version": "8c51478a3e8c30618b3a96c132612a46735c7548", + "diff": "", + "path": "/home/wd15/git/fipy/fipy" + }, + { + "name": "gi", + "module": "python", + "source": "attribute", + "version": "3.4.0", + "diff": "", + "path": "/usr/lib/python2.7/dist-packages/gi" + }, + { + "name": "glib", + "module": "python", + "source": null, + "version": "unknown", + "diff": "", + "path": "/usr/lib/python2.7/dist-packages/glib" + }, + { + "name": "gobject", + "module": "python", + "source": null, + "version": "unknown", + "diff": "", + "path": "/usr/lib/python2.7/dist-packages/gobject" + }, + { + "name": "google", + "module": "python", + "source": null, + "version": "unknown", + "diff": "", + "path": "/usr/lib/python2.7/dist-packages/google" + }, + { + "name": "gtk", + "module": "python", + "source": null, + "version": "unknown", + "diff": "", + "path": "/usr/lib/python2.7/dist-packages/gtk-2.0/gtk" + }, + { + "name": "httplib2", + "module": "python", + "source": "attribute", + "version": "0.7.4", + "diff": "", + "path": "/usr/lib/python2.7/dist-packages/httplib2" + }, + { + "name": "lockfile", + "module": "python", + "source": "egg-info", + "version": "0.9.1", + "diff": "", + "path": "/home/wd15/.virtualenvs/default/lib/python2.7/site-packages/lockfile-0.9.1-py2.7.egg/lockfile" + }, + { + "name": "lxml", + "module": "python", + "source": null, + "version": "unknown", + "diff": "", + "path": "/usr/lib/python2.7/dist-packages/lxml" + }, + { + "name": "matplotlib", + "module": "python", + "source": "attribute", + "version": "1.1.1", + "diff": "", + "path": "/usr/lib/pymodules/python2.7/matplotlib" + }, + { + "name": "mayavi", + "module": "python", + "source": "attribute", + "version": "4.1.0", + "diff": "", + "path": "/usr/lib/python2.7/dist-packages/mayavi" + }, + { + "name": "mpi4py", + "module": "python", + "source": "attribute", + "version": "1.3", + "diff": "", + "path": "/usr/lib/python2.7/dist-packages/mpi4py" + }, + { + "name": "mpl_toolkits", + "module": "python", + "source": null, + "version": "unknown", + "diff": "", + "path": "/usr/lib/pymodules/python2.7/mpl_toolkits" + }, + { + "name": "mx", + "module": "python", + "source": "attribute", + "version": "3.2.1", + "diff": "", + "path": "/usr/lib/python2.7/dist-packages/mx" + }, + { + "name": "nose", + "module": "python", + "source": "attribute", + "version": "1.2.1", + "diff": "", + "path": "/home/wd15/.virtualenvs/fipy/lib/python2.7/site-packages/nose" + }, + { + "name": "numexpr", + "module": "python", + "source": "attribute", + "version": "2.0.1", + "diff": "", + "path": "/usr/lib/python2.7/dist-packages/numexpr" + }, + { + "name": "numpy", + "module": "python", + "source": "attribute", + "version": "1.6.2", + "diff": "", + "path": "/usr/lib/python2.7/dist-packages/numpy" + }, + { + "name": "pyamg", + "module": "python", + "source": "attribute", + "version": "2.0.4.dev", + "diff": "", + "path": "/home/wd15/.virtualenvs/fipy/lib/python2.7/site-packages/pyamg" + }, + { + "name": "pylsmlib", + "module": "python", + "source": "/home/wd15/git/LSMLIB", + "version": "6f5d969bb27530aa37452a8b096e538a5cf7b993", + "diff": "", + "path": "/home/wd15/git/LSMLIB/pylsmlib/pylsmlib" + }, + { + "name": "pysparse", + "module": "python", + "source": "attribute", + "version": "1.1", + "diff": "", + "path": "/usr/lib/python2.7/dist-packages/pysparse" + }, + { + "name": "pytz", + "module": "python", + "source": "attribute", + "version": "2011k", + "diff": "", + "path": "/usr/lib/python2.7/dist-packages/pytz" + }, + { + "name": "scipy", + "module": "python", + "source": "attribute", + "version": "0.10.1", + "diff": "", + "path": "/usr/lib/python2.7/dist-packages/scipy" + }, + { + "name": "setuptools", + "module": "python", + "source": "attribute", + "version": "0.6", + "diff": "", + "path": "/home/wd15/.virtualenvs/default/local/lib/python2.7/site-packages/distribute-0.6.24-py2.7.egg/setuptools" + }, + { + "name": "simplejson", + "module": "python", + "source": "attribute", + "version": "2.6.1", + "diff": "", + "path": "/usr/lib/python2.7/dist-packages/simplejson" + }, + { + "name": "skfmm", + "module": "python", + "source": "/home/wd15/git/scikit-fmm", + "version": "467e5982fbd9d4eb32495f826d6bda65da498e13", + "diff": "", + "path": "/home/wd15/git/scikit-fmm/skfmm" + }, + { + "name": "sumatra", + "module": "python", + "source": "attribute", + "version": "0.5.0dev", + "diff": "", + "path": "/home/wd15/.virtualenvs/default/lib/python2.7/site-packages/Sumatra-0.5.0dev-py2.7.egg/sumatra" + }, + { + "name": "tables", + "module": "python", + "source": "attribute", + "version": "2.3.1", + "diff": "", + "path": "/usr/lib/python2.7/dist-packages/tables" + }, + { + "name": "tagging", + "module": "python", + "source": "attribute", + "version": "0.3.1", + "diff": "", + "path": "/home/wd15/.virtualenvs/fipy/lib/python2.7/site-packages/tagging" + }, + { + "name": "tornado", + "module": "python", + "source": "attribute", + "version": "2.3", + "diff": "", + "path": "/usr/lib/python2.7/dist-packages/tornado" + }, + { + "name": "traits", + "module": "python", + "source": "attribute", + "version": "4.1.0", + "diff": "", + "path": "/usr/lib/python2.7/dist-packages/traits" + }, + { + "name": "tvtk", + "module": "python", + "source": null, + "version": "unknown", + "diff": "", + "path": "/usr/lib/python2.7/dist-packages/tvtk" + }, + { + "name": "vtk", + "module": "python", + "source": null, + "version": "unknown", + "diff": "", + "path": "/usr/lib/pymodules/python2.7/vtk" + }, + { + "name": "wx", + "module": "python", + "source": "attribute", + "version": "2.8.12.1", + "diff": "", + "path": "/usr/lib/python2.7/dist-packages/wx-2.8-gtk2-unicode/wx" + }, + { + "name": "yaml", + "module": "python", + "source": "attribute", + "version": "3.10", + "diff": "", + "path": "/usr/lib/python2.7/dist-packages/yaml" + }, + { + "name": "zmq", + "module": "python", + "source": "attribute", + "version": "2.2.0", + "diff": "", + "path": "/usr/lib/python2.7/dist-packages/zmq" + } + ], + "user": "Daniel Wheeler ", + "output_data": [ + { + "path": "data.h5", + "digest": "7c11935f7c9da601c1850e021e624c411c2f9e08", + "metadata": { + "mimetype": null, + "size": 102992, + "encoding": null + } + } + ], + "input_data": [], + "launch_mode": { + "type": "SerialLaunchMode", + "parameters": { + "working_directory": "/home/wd15/git/extremefill-data" + } + }, + "main_file": "script.py", + "outcome": "" +}, +{ + "script_arguments": "", + "platforms": [ + { + "system_name": "Linux", + "machine": "x86_64", + "version": "#35-Ubuntu SMP Thu Jan 24 13:15:40 UTC 2013", + "ip_addr": "127.0.0.1", + "architecture_bits": "64bit", + "architecture_linkage": "ELF", + "release": "3.5.0-23-generic", + "network_name": "loki", + "processor": "x86_64" + } + ], + "duration": 8.603619813919067, + "diff": "diff --git a/script.py b/script.py\nindex ec41d60..e4a7100 100644\n--- a/script.py\n+++ b/script.py\n@@ -30,16 +30,5 @@ def run(totalSteps=10,\n NxBase=1200)\n \n if __name__ == '__main__':\n-\n-\n- class Bare(object):\n- pass\n-\n- \n- args = Bare()\n- parser = argparse.ArgumentParser(description=\"Run Extremefill 2D example.\")\n- parser.add_argument('--totalSteps', default=1, type=int)\n- parser.parse_args(namespace=args)\n-\n- run(totalSteps=args.totalSteps, tags=('test',), reason=\"testing SMT class\")\n+ run(totalSteps=2, tag=['test'], reason=\"testing SMT class\")\n \ndiff --git a/smtdecorator.py b/smtdecorator.py\nindex 432a8b7..826170c 100644\n--- a/smtdecorator.py\n+++ b/smtdecorator.py\n@@ -1,4 +1,3 @@\n-\n \"\"\"\n Script to test setting up batch simaulations with Sumatra.\n \n@@ -22,8 +21,8 @@ On laptop use http://129.6.153.60:8000\n import time\n import os\n import sys\n-from contextlib import contextmanager\n from StringIO import StringIO\n+import argparse\n \n \n from sumatra.projects import load_project\n@@ -59,18 +58,21 @@ class SMTDecorator(object):\n def __init__(self, function):\n self.function = function\n \n- def __call__(self, tags=(), reason='', *args, **kwargs):\n+ def __call__(self, tag=[], reason='', *args, **kwargs):\n+\n+ parameters, tag, reason = self.parseargs(kwargs, list(tag), reason)\n+\n project = load_project()\n- record = project.new_record(parameters=SimpleParameterSet(kwargs),\n+ record = project.new_record(parameters=SimpleParameterSet(parameters),\n main_file=self.function.func_globals['__file__'],\n reason=reason)\n \n record.datastore.root = os.path.join(record.datastore.root, record.label)\n- for tag in tags:\n- record.tags.add(tag)\n \n- record.start_time = time.time()\n+ for t in tag:\n+ record.tags.add(t)\n \n+ record.start_time = time.time()\n with Redirect() as out:\n returnvalue = self.function(datadir=record.datastore.root, *args, **record.parameters.as_dict())\n \n@@ -84,5 +86,25 @@ class SMTDecorator(object):\n \n return returnvalue\n \n+ def parseargs(self, func_kwargs, tag, reason):\n+ class Bare:\n+ pass\n+ ext_kwargs = Bare()\n+ parser = argparse.ArgumentParser(description=\"SMT arguments\")\n+\n+ for k, v in func_kwargs.iteritems():\n+ parser.add_argument('--' + k, default=v, type=type(v), dest=k)\n+ \n+ parser.add_argument('--tag', action='append', default=tag, dest='tag')\n+ parser.add_argument('--reason', default=reason, dest='reason')\n+ parser.parse_args(namespace=ext_kwargs)\n \n+ tag = ext_kwargs.tag\n+ reason = ext_kwargs.reason\n \n+ for k, v in func_kwargs.iteritems():\n+ func_kwargs[k] = getattr(ext_kwargs, k)\n+ \n+ return func_kwargs, tag, reason\n+ \n+ ", + "datastore": { + "type": "FileSystemDataStore", + "parameters": { + "root": "./Data/10a99a73cc01" + } + }, + "input_datastore": { + "type": "FileSystemDataStore", + "parameters": { + "root": "/" + } + }, + "executable": { + "path": "/home/wd15/.virtualenvs/default/bin/python", + "version": "2.7.3", + "name": "Python", + "options": "" + }, + "parameters": { + "content": "totalSteps = 5", + "type": "SimpleParameterSet" + }, + "label": "10a99a73cc01", + "version": "03128c81e5ec503445a0a10166626c2e902ba41e", + "stdout_stderr": "[ 1. 1. 1. 1.]\n[ 0.34738209 0.61535499 0.01923836 0.00971058]\n[ 1.23729704e-01 2.14204081e-01 1.88311438e-04 1.55991524e-03]\n\ntheta 0.0\ncBar_supp 1.0\ncBar_cu 1.0\npotentialBar 1.0\nmin(extension) 7.22965473284e-08\nmin(depositionRate) 2.09114908795e-09\nmin(current) 56.8350759862\nmin(cupric) 997.266139623\nmin(baseCurrent) 56.9323002935\nmax(interfaceTheta) - 1: -0.973021297371\nmin(interfaceTheta) 0.0\nmin(I0) 38.9208518948\ndt 0.011\nelapsed time 0.0\nstep 0\n\n[ 1. 1. 1. 1.]\n[ 0.10765512 0.04576554 0.03330295 0.00523947]\n\ntheta 0.0\ncBar_supp 1.0\ncBar_cu 1.0\npotentialBar 1.0\nmin(extension) 2.09114554699e-09\nmin(depositionRate) 1.47837489306e-09\nmin(current) 40.1805638188\nmin(cupric) 996.200886814\nmin(baseCurrent) 40.2838895551\nmax(interfaceTheta) - 1: -0.947107282423\nmin(interfaceTheta) 0.0\nmin(I0) 37.8842912969\ndt 0.0121\nelapsed time 0.011\nstep 1\n\n[ 1. 1. 1. 1.]\n[ 3.45872899 0.00767994 0.04328443 0.00526515]\n\ntheta 0.0\ncBar_supp 1.0\ncBar_cu 1.0\npotentialBar 1.0\nmin(extension) 1.47835191842e-09\nmin(depositionRate) 1.46663996872e-09\nmin(current) 39.8616217978\nmin(cupric) 995.148480462\nmin(baseCurrent) 39.9926693524\nmax(interfaceTheta) - 1: -0.92148263086\nmin(interfaceTheta) 0.0\nmin(I0) 36.8593052344\ndt 0.01331\nelapsed time 0.0231\nstep 2\n\n[ 1. 1. 1. 1.]\n[ 8.88172168e+01 8.75504210e-03 5.01742754e-02 5.39551911e-03]\n[ 8.96400062e-01 2.22717014e-04 2.71862484e-04 2.90776586e-05]\n\ntheta 0.0\ncBar_supp 1.0\ncBar_cu 1.0\npotentialBar 1.0\nmin(extension) 1.46657584035e-09\nmin(depositionRate) 1.46404704728e-09\nmin(current) 39.7911491146\nmin(cupric) 994.084658919\nmin(baseCurrent) 39.9384404059\nmax(interfaceTheta) - 1: -0.895749878737\nmin(interfaceTheta) 0.0\nmin(I0) 35.8299951495\ndt 0.014641\nelapsed time 0.03641\nstep 3\n\n[ 1. 1. 1. 1.]\n[ 6.58855298e+01 9.88225224e-03 5.50740145e-02 5.60514798e-03]\n[ 6.71844438e-01 2.23945268e-04 3.10661420e-04 3.13582485e-05]\n\ntheta 0.0\ncBar_supp 1.0\ncBar_cu 1.0\npotentialBar 1.0\nmin(extension) 1.4639671787e-09\nmin(depositionRate) 1.4609435473e-09\nmin(current) 39.7067994821\nmin(cupric) 992.985196573\nmin(baseCurrent) 39.8816197139\nmax(interfaceTheta) - 1: -0.869674427336\nmin(interfaceTheta) 0.0\nmin(I0) 34.7869770934\ndt 0.0161051\nelapsed time 0.051051\nstep 4\n\n", + "repository": { + "url": "/home/wd15/git/extremefill-data", + "type": "GitRepository", + "upstream": "git@github.com:wd15/extremefill-data.git" + }, + "tags": [ + "test", + "test2" + ], + "timestamp": "2013-02-18 22:26:42", + "reason": "testing command line arguments with tags", + "dependencies": [ + { + "name": "Cython", + "module": "python", + "source": "attribute", + "version": "0.16", + "diff": "", + "path": "/usr/lib/python2.7/dist-packages/Cython" + }, + { + "name": "IPython", + "module": "python", + "source": "attribute", + "version": "0.13.1.rc2", + "diff": "", + "path": "/usr/lib/python2.7/dist-packages/IPython" + }, + { + "name": "PIL", + "module": "python", + "source": null, + "version": "unknown", + "diff": "", + "path": "/usr/lib/python2.7/dist-packages/PIL" + }, + { + "name": "PyQt4", + "module": "python", + "source": null, + "version": "unknown", + "diff": "", + "path": "/usr/lib/python2.7/dist-packages/PyQt4" + }, + { + "name": "PyTrilinos", + "module": "python", + "source": "attribute", + "version": "4.8d", + "diff": "", + "path": "/home/wd15/.virtualenvs/fipy/lib/python2.7/site-packages/PyTrilinos" + }, + { + "name": "dateutil", + "module": "python", + "source": "attribute", + "version": "1.5", + "diff": "", + "path": "/usr/lib/python2.7/dist-packages/dateutil" + }, + { + "name": "distutils", + "module": "python", + "source": "attribute", + "version": "2.7.3", + "diff": "", + "path": "/home/wd15/.virtualenvs/default/lib/python2.7/distutils" + }, + { + "name": "django", + "module": "python", + "source": "attribute", + "version": "1.4.1", + "diff": "", + "path": "/usr/lib/python2.7/dist-packages/django" + }, + { + "name": "docutils", + "module": "python", + "source": "attribute", + "version": "0.10", + "diff": "", + "path": "/home/wd15/.virtualenvs/fipy/lib/python2.7/site-packages/docutils" + }, + { + "name": "encodings", + "module": "python", + "source": null, + "version": "unknown", + "diff": "", + "path": "/home/wd15/.virtualenvs/default/lib/python2.7/encodings" + }, + { + "name": "extremefill", + "module": "python", + "source": "/home/wd15/git/extremefill", + "version": "549c969edb113d0b3e9804612bfa53e91319c0ea", + "diff": "diff --git a/data/viewer.py b/data/viewer.py\nindex 68f60e0..d9ab7c2 100644\n--- a/data/viewer.py\n+++ b/data/viewer.py\n@@ -122,7 +122,7 @@ class ContourViewer(BaseViewer):\n self.times = times\n self.contours = contours\n self.data = []\n- super(ContourViewer, self).__init__(branches=branches, datafile=datafiles, datafiles=datafiles)\n+ super(ContourViewer, self).__init__(branches=branches, datafile=datafile, datafiles=datafiles)\n \n def plot(self):\n import matplotlib.pyplot as plt\n@@ -152,6 +152,24 @@ class ContourViewer(BaseViewer):\n phi = np.reshape(phi, shape)\n self.data.append((x, y, phi))\n \n+def datafilesFromBranches(branches, datafile):\n+ cwd = os.getcwd()\n+ for count, branch in enumerate(branches):\n+ print 'branch',branch\n+ tempdir = gitCloneToTemp(branch=branch, repositoryPath='ssh://wd15@genie.nist.gov/users/wd15/git/extremefill')\n+ repopath = os.path.join(tempdir, 'extremefill')\n+ datapath = os.path.join(repopath, datafile)\n+ gitMediaSync()\n+ if count == 0:\n+ self.addBaseData(datapath)\n+ basetempdir = tempdir\n+ else:\n+ self.addData(datapath, branch)\n+ cleanTempRepo(tempdir) \n+\n+ cleanTempRepo(basetempdir)\n+ os.chdir(cwd)\n+\n def plotNx():\n branches = ('Nx600', 'Nx300', 'Nx150')\n datafile = os.path.join('data', 'data.h5')\n@@ -174,13 +192,13 @@ def plotCFL():\n \n def plotContour():\n # branches = ('CFL0.0125', 'CFL0.025', 'CFL0.05', 'CFL0.1', 'CFL0.2', 'CFL0.4', 'CFL0.8', 'CFL1.6')\n- branches = ('Nx600', 'Nx150')\n+ branches = ('Nx300', 'Nx150')\n # branches = ('CFL0.025', 'CFL0.05')\n datafile = os.path.join('data', 'data.h5')\n times = (0,)\n- # times = (0., 1000., 2000., 3000., 4000.)\n- # viewer = ContourViewer(times=times, branches=branches, datafile=datafile)\n- viewer = ContourViewer(times=times, branches=branches, datafile=datafile, datafiles=('data150.h5', 'data600.h5'))\n+ times = (0., 1000., 2000., 3000., 4000.)\n+ viewer = ContourViewer(times=times, branches=branches, datafile=datafile)\n+ #viewer = ContourViewer(times=times, branches=branches, datafile=datafile, datafiles=('data150.h5', 'data600.h5'))\n viewer.plot()\n \n if __name__ == '__main__':\n@@ -188,6 +206,6 @@ if __name__ == '__main__':\n # from profiler import calibrate_profiler\n # fudge = calibrate_profiler(10000)\n # profile = Profiler('profile', fudge=fudge)\n- plotCFL()\n+ plotContour()\n # profile.stop()\n ", + "path": "/home/wd15/git/extremefill/extremefill" + }, + { + "name": "fipy", + "module": "python", + "source": "/home/wd15/git/fipy", + "version": "8c51478a3e8c30618b3a96c132612a46735c7548", + "diff": "", + "path": "/home/wd15/git/fipy/fipy" + }, + { + "name": "gi", + "module": "python", + "source": "attribute", + "version": "3.4.0", + "diff": "", + "path": "/usr/lib/python2.7/dist-packages/gi" + }, + { + "name": "glib", + "module": "python", + "source": null, + "version": "unknown", + "diff": "", + "path": "/usr/lib/python2.7/dist-packages/glib" + }, + { + "name": "gobject", + "module": "python", + "source": null, + "version": "unknown", + "diff": "", + "path": "/usr/lib/python2.7/dist-packages/gobject" + }, + { + "name": "google", + "module": "python", + "source": null, + "version": "unknown", + "diff": "", + "path": "/usr/lib/python2.7/dist-packages/google" + }, + { + "name": "gtk", + "module": "python", + "source": null, + "version": "unknown", + "diff": "", + "path": "/usr/lib/python2.7/dist-packages/gtk-2.0/gtk" + }, + { + "name": "httplib2", + "module": "python", + "source": "attribute", + "version": "0.7.4", + "diff": "", + "path": "/usr/lib/python2.7/dist-packages/httplib2" + }, + { + "name": "lockfile", + "module": "python", + "source": "egg-info", + "version": "0.9.1", + "diff": "", + "path": "/home/wd15/.virtualenvs/default/lib/python2.7/site-packages/lockfile-0.9.1-py2.7.egg/lockfile" + }, + { + "name": "lxml", + "module": "python", + "source": null, + "version": "unknown", + "diff": "", + "path": "/usr/lib/python2.7/dist-packages/lxml" + }, + { + "name": "matplotlib", + "module": "python", + "source": "attribute", + "version": "1.1.1", + "diff": "", + "path": "/usr/lib/pymodules/python2.7/matplotlib" + }, + { + "name": "mayavi", + "module": "python", + "source": "attribute", + "version": "4.1.0", + "diff": "", + "path": "/usr/lib/python2.7/dist-packages/mayavi" + }, + { + "name": "mpi4py", + "module": "python", + "source": "attribute", + "version": "1.3", + "diff": "", + "path": "/usr/lib/python2.7/dist-packages/mpi4py" + }, + { + "name": "mpl_toolkits", + "module": "python", + "source": null, + "version": "unknown", + "diff": "", + "path": "/usr/lib/pymodules/python2.7/mpl_toolkits" + }, + { + "name": "mx", + "module": "python", + "source": "attribute", + "version": "3.2.1", + "diff": "", + "path": "/usr/lib/python2.7/dist-packages/mx" + }, + { + "name": "nose", + "module": "python", + "source": "attribute", + "version": "1.2.1", + "diff": "", + "path": "/home/wd15/.virtualenvs/fipy/lib/python2.7/site-packages/nose" + }, + { + "name": "numexpr", + "module": "python", + "source": "attribute", + "version": "2.0.1", + "diff": "", + "path": "/usr/lib/python2.7/dist-packages/numexpr" + }, + { + "name": "numpy", + "module": "python", + "source": "attribute", + "version": "1.6.2", + "diff": "", + "path": "/usr/lib/python2.7/dist-packages/numpy" + }, + { + "name": "pyamg", + "module": "python", + "source": "attribute", + "version": "2.0.4.dev", + "diff": "", + "path": "/home/wd15/.virtualenvs/fipy/lib/python2.7/site-packages/pyamg" + }, + { + "name": "pylsmlib", + "module": "python", + "source": "/home/wd15/git/LSMLIB", + "version": "6f5d969bb27530aa37452a8b096e538a5cf7b993", + "diff": "", + "path": "/home/wd15/git/LSMLIB/pylsmlib/pylsmlib" + }, + { + "name": "pysparse", + "module": "python", + "source": "attribute", + "version": "1.1", + "diff": "", + "path": "/usr/lib/python2.7/dist-packages/pysparse" + }, + { + "name": "pytz", + "module": "python", + "source": "attribute", + "version": "2011k", + "diff": "", + "path": "/usr/lib/python2.7/dist-packages/pytz" + }, + { + "name": "scipy", + "module": "python", + "source": "attribute", + "version": "0.10.1", + "diff": "", + "path": "/usr/lib/python2.7/dist-packages/scipy" + }, + { + "name": "setuptools", + "module": "python", + "source": "attribute", + "version": "0.6", + "diff": "", + "path": "/home/wd15/.virtualenvs/default/local/lib/python2.7/site-packages/distribute-0.6.24-py2.7.egg/setuptools" + }, + { + "name": "simplejson", + "module": "python", + "source": "attribute", + "version": "2.6.1", + "diff": "", + "path": "/usr/lib/python2.7/dist-packages/simplejson" + }, + { + "name": "skfmm", + "module": "python", + "source": "/home/wd15/git/scikit-fmm", + "version": "467e5982fbd9d4eb32495f826d6bda65da498e13", + "diff": "", + "path": "/home/wd15/git/scikit-fmm/skfmm" + }, + { + "name": "sumatra", + "module": "python", + "source": "attribute", + "version": "0.5.0dev", + "diff": "", + "path": "/home/wd15/.virtualenvs/default/lib/python2.7/site-packages/Sumatra-0.5.0dev-py2.7.egg/sumatra" + }, + { + "name": "tables", + "module": "python", + "source": "attribute", + "version": "2.3.1", + "diff": "", + "path": "/usr/lib/python2.7/dist-packages/tables" + }, + { + "name": "tagging", + "module": "python", + "source": "attribute", + "version": "0.3.1", + "diff": "", + "path": "/home/wd15/.virtualenvs/fipy/lib/python2.7/site-packages/tagging" + }, + { + "name": "tornado", + "module": "python", + "source": "attribute", + "version": "2.3", + "diff": "", + "path": "/usr/lib/python2.7/dist-packages/tornado" + }, + { + "name": "traits", + "module": "python", + "source": "attribute", + "version": "4.1.0", + "diff": "", + "path": "/usr/lib/python2.7/dist-packages/traits" + }, + { + "name": "tvtk", + "module": "python", + "source": null, + "version": "unknown", + "diff": "", + "path": "/usr/lib/python2.7/dist-packages/tvtk" + }, + { + "name": "vtk", + "module": "python", + "source": null, + "version": "unknown", + "diff": "", + "path": "/usr/lib/pymodules/python2.7/vtk" + }, + { + "name": "wx", + "module": "python", + "source": "attribute", + "version": "2.8.12.1", + "diff": "", + "path": "/usr/lib/python2.7/dist-packages/wx-2.8-gtk2-unicode/wx" + }, + { + "name": "yaml", + "module": "python", + "source": "attribute", + "version": "3.10", + "diff": "", + "path": "/usr/lib/python2.7/dist-packages/yaml" + }, + { + "name": "zmq", + "module": "python", + "source": "attribute", + "version": "2.2.0", + "diff": "", + "path": "/usr/lib/python2.7/dist-packages/zmq" + } + ], + "user": "Daniel Wheeler ", + "output_data": [ + { + "path": "data.h5", + "digest": "8e5b3c63995a7b35817bbbdb0f83a2946d0e358d", + "metadata": { + "mimetype": null, + "size": 102992, + "encoding": null + } + } + ], + "input_data": [], + "launch_mode": { + "type": "SerialLaunchMode", + "parameters": { + "working_directory": "/home/wd15/git/extremefill-data" + } + }, + "main_file": "script.py", + "outcome": "" +}, +{ + "script_arguments": "", + "platforms": [ + { + "system_name": "Linux", + "machine": "x86_64", + "version": "#35-Ubuntu SMP Thu Jan 24 13:15:40 UTC 2013", + "ip_addr": "127.0.0.1", + "architecture_bits": "64bit", + "architecture_linkage": "ELF", + "release": "3.5.0-23-generic", + "network_name": "loki", + "processor": "x86_64" + } + ], + "duration": 3.90509295463562, + "diff": "diff --git a/script.py b/script.py\nindex ec41d60..9fb84b3 100644\n--- a/script.py\n+++ b/script.py\n@@ -30,16 +30,5 @@ def run(totalSteps=10,\n NxBase=1200)\n \n if __name__ == '__main__':\n-\n-\n- class Bare(object):\n- pass\n-\n- \n- args = Bare()\n- parser = argparse.ArgumentParser(description=\"Run Extremefill 2D example.\")\n- parser.add_argument('--totalSteps', default=1, type=int)\n- parser.parse_args(namespace=args)\n-\n- run(totalSteps=args.totalSteps, tags=('test',), reason=\"testing SMT class\")\n+ run(totalSteps=2, tags=['test'], reason=\"testing SMT class\")\n \ndiff --git a/smtdecorator.py b/smtdecorator.py\nindex 432a8b7..9119012 100644\n--- a/smtdecorator.py\n+++ b/smtdecorator.py\n@@ -1,4 +1,3 @@\n-\n \"\"\"\n Script to test setting up batch simaulations with Sumatra.\n \n@@ -22,8 +21,8 @@ On laptop use http://129.6.153.60:8000\n import time\n import os\n import sys\n-from contextlib import contextmanager\n from StringIO import StringIO\n+import argparse\n \n \n from sumatra.projects import load_project\n@@ -60,17 +59,20 @@ class SMTDecorator(object):\n self.function = function\n \n def __call__(self, tags=(), reason='', *args, **kwargs):\n+\n+ parameters, tags, reason = self.parseargs(kwargs, tags, reason)\n+\n project = load_project()\n- record = project.new_record(parameters=SimpleParameterSet(kwargs),\n+ record = project.new_record(parameters=SimpleParameterSet(parameters),\n main_file=self.function.func_globals['__file__'],\n reason=reason)\n \n record.datastore.root = os.path.join(record.datastore.root, record.label)\n+\n for tag in tags:\n record.tags.add(tag)\n \n record.start_time = time.time()\n-\n with Redirect() as out:\n returnvalue = self.function(datadir=record.datastore.root, *args, **record.parameters.as_dict())\n \n@@ -84,5 +86,25 @@ class SMTDecorator(object):\n \n return returnvalue\n \n+ def parseargs(self, func_kwargs, tags, reason):\n+ class Bare:\n+ pass\n+ ext_kwargs = Bare()\n+ parser = argparse.ArgumentParser(description=\"SMT arguments\")\n+\n+ for k, v in func_kwargs.iteritems():\n+ parser.add_argument('--' + k, default=v, type=type(v), dest=k)\n+ \n+ parser.add_argument('--tags', action='append', default=tags, dest='tags')\n+ parser.add_argument('--reason', default=reason, dest='reason')\n+ parser.parse_args(namespace=ext_kwargs)\n \n+ tags = ext_kwargs.tags\n+ reason = ext_kwargs.reason\n \n+ for k, v in func_kwargs.iteritems():\n+ func_kwargs[k] = getattr(ext_kwargs, k)\n+ \n+ return func_kwargs, tags, reason\n+ \n+ ", + "datastore": { + "type": "FileSystemDataStore", + "parameters": { + "root": "./Data/71e02bc3b711" + } + }, + "input_datastore": { + "type": "FileSystemDataStore", + "parameters": { + "root": "/" + } + }, + "executable": { + "path": "/home/wd15/.virtualenvs/default/bin/python", + "version": "2.7.3", + "name": "Python", + "options": "" + }, + "parameters": { + "content": "totalSteps = 2", + "type": "SimpleParameterSet" + }, + "label": "71e02bc3b711", + "version": "03128c81e5ec503445a0a10166626c2e902ba41e", + "stdout_stderr": "[ 1. 1. 1. 1.]\n[ 0.34738209 0.61535499 0.01923836 0.00971058]\n[ 1.23729704e-01 2.14204081e-01 1.88311438e-04 1.55991524e-03]\n\ntheta 0.0\ncBar_supp 1.0\ncBar_cu 1.0\npotentialBar 1.0\nmin(extension) 7.22965473284e-08\nmin(depositionRate) 2.09114908795e-09\nmin(current) 56.8350759862\nmin(cupric) 997.266139623\nmin(baseCurrent) 56.9323002935\nmax(interfaceTheta) - 1: -0.973021297371\nmin(interfaceTheta) 0.0\nmin(I0) 38.9208518948\ndt 0.011\nelapsed time 0.0\nstep 0\n\n[ 1. 1. 1. 1.]\n[ 0.10765512 0.04576554 0.03330295 0.00523947]\n\ntheta 0.0\ncBar_supp 1.0\ncBar_cu 1.0\npotentialBar 1.0\nmin(extension) 2.09114554699e-09\nmin(depositionRate) 1.47837489306e-09\nmin(current) 40.1805638188\nmin(cupric) 996.200886814\nmin(baseCurrent) 40.2838895551\nmax(interfaceTheta) - 1: -0.947107282423\nmin(interfaceTheta) 0.0\nmin(I0) 37.8842912969\ndt 0.0121\nelapsed time 0.011\nstep 1\n\n", + "repository": { + "url": "/home/wd15/git/extremefill-data", + "type": "GitRepository", + "upstream": "git@github.com:wd15/extremefill-data.git" + }, + "tags": [ + "test", + "test1" + ], + "timestamp": "2013-02-18 22:23:58", + "reason": "testing command line arguments", + "dependencies": [ + { + "name": "Cython", + "module": "python", + "source": "attribute", + "version": "0.16", + "diff": "", + "path": "/usr/lib/python2.7/dist-packages/Cython" + }, + { + "name": "IPython", + "module": "python", + "source": "attribute", + "version": "0.13.1.rc2", + "diff": "", + "path": "/usr/lib/python2.7/dist-packages/IPython" + }, + { + "name": "PIL", + "module": "python", + "source": null, + "version": "unknown", + "diff": "", + "path": "/usr/lib/python2.7/dist-packages/PIL" + }, + { + "name": "PyQt4", + "module": "python", + "source": null, + "version": "unknown", + "diff": "", + "path": "/usr/lib/python2.7/dist-packages/PyQt4" + }, + { + "name": "PyTrilinos", + "module": "python", + "source": "attribute", + "version": "4.8d", + "diff": "", + "path": "/home/wd15/.virtualenvs/fipy/lib/python2.7/site-packages/PyTrilinos" + }, + { + "name": "dateutil", + "module": "python", + "source": "attribute", + "version": "1.5", + "diff": "", + "path": "/usr/lib/python2.7/dist-packages/dateutil" + }, + { + "name": "distutils", + "module": "python", + "source": "attribute", + "version": "2.7.3", + "diff": "", + "path": "/home/wd15/.virtualenvs/default/lib/python2.7/distutils" + }, + { + "name": "django", + "module": "python", + "source": "attribute", + "version": "1.4.1", + "diff": "", + "path": "/usr/lib/python2.7/dist-packages/django" + }, + { + "name": "docutils", + "module": "python", + "source": "attribute", + "version": "0.10", + "diff": "", + "path": "/home/wd15/.virtualenvs/fipy/lib/python2.7/site-packages/docutils" + }, + { + "name": "encodings", + "module": "python", + "source": null, + "version": "unknown", + "diff": "", + "path": "/home/wd15/.virtualenvs/default/lib/python2.7/encodings" + }, + { + "name": "extremefill", + "module": "python", + "source": "/home/wd15/git/extremefill", + "version": "549c969edb113d0b3e9804612bfa53e91319c0ea", + "diff": "diff --git a/data/viewer.py b/data/viewer.py\nindex 68f60e0..d9ab7c2 100644\n--- a/data/viewer.py\n+++ b/data/viewer.py\n@@ -122,7 +122,7 @@ class ContourViewer(BaseViewer):\n self.times = times\n self.contours = contours\n self.data = []\n- super(ContourViewer, self).__init__(branches=branches, datafile=datafiles, datafiles=datafiles)\n+ super(ContourViewer, self).__init__(branches=branches, datafile=datafile, datafiles=datafiles)\n \n def plot(self):\n import matplotlib.pyplot as plt\n@@ -152,6 +152,24 @@ class ContourViewer(BaseViewer):\n phi = np.reshape(phi, shape)\n self.data.append((x, y, phi))\n \n+def datafilesFromBranches(branches, datafile):\n+ cwd = os.getcwd()\n+ for count, branch in enumerate(branches):\n+ print 'branch',branch\n+ tempdir = gitCloneToTemp(branch=branch, repositoryPath='ssh://wd15@genie.nist.gov/users/wd15/git/extremefill')\n+ repopath = os.path.join(tempdir, 'extremefill')\n+ datapath = os.path.join(repopath, datafile)\n+ gitMediaSync()\n+ if count == 0:\n+ self.addBaseData(datapath)\n+ basetempdir = tempdir\n+ else:\n+ self.addData(datapath, branch)\n+ cleanTempRepo(tempdir) \n+\n+ cleanTempRepo(basetempdir)\n+ os.chdir(cwd)\n+\n def plotNx():\n branches = ('Nx600', 'Nx300', 'Nx150')\n datafile = os.path.join('data', 'data.h5')\n@@ -174,13 +192,13 @@ def plotCFL():\n \n def plotContour():\n # branches = ('CFL0.0125', 'CFL0.025', 'CFL0.05', 'CFL0.1', 'CFL0.2', 'CFL0.4', 'CFL0.8', 'CFL1.6')\n- branches = ('Nx600', 'Nx150')\n+ branches = ('Nx300', 'Nx150')\n # branches = ('CFL0.025', 'CFL0.05')\n datafile = os.path.join('data', 'data.h5')\n times = (0,)\n- # times = (0., 1000., 2000., 3000., 4000.)\n- # viewer = ContourViewer(times=times, branches=branches, datafile=datafile)\n- viewer = ContourViewer(times=times, branches=branches, datafile=datafile, datafiles=('data150.h5', 'data600.h5'))\n+ times = (0., 1000., 2000., 3000., 4000.)\n+ viewer = ContourViewer(times=times, branches=branches, datafile=datafile)\n+ #viewer = ContourViewer(times=times, branches=branches, datafile=datafile, datafiles=('data150.h5', 'data600.h5'))\n viewer.plot()\n \n if __name__ == '__main__':\n@@ -188,6 +206,6 @@ if __name__ == '__main__':\n # from profiler import calibrate_profiler\n # fudge = calibrate_profiler(10000)\n # profile = Profiler('profile', fudge=fudge)\n- plotCFL()\n+ plotContour()\n # profile.stop()\n ", + "path": "/home/wd15/git/extremefill/extremefill" + }, + { + "name": "fipy", + "module": "python", + "source": "/home/wd15/git/fipy", + "version": "8c51478a3e8c30618b3a96c132612a46735c7548", + "diff": "", + "path": "/home/wd15/git/fipy/fipy" + }, + { + "name": "gi", + "module": "python", + "source": "attribute", + "version": "3.4.0", + "diff": "", + "path": "/usr/lib/python2.7/dist-packages/gi" + }, + { + "name": "glib", + "module": "python", + "source": null, + "version": "unknown", + "diff": "", + "path": "/usr/lib/python2.7/dist-packages/glib" + }, + { + "name": "gobject", + "module": "python", + "source": null, + "version": "unknown", + "diff": "", + "path": "/usr/lib/python2.7/dist-packages/gobject" + }, + { + "name": "google", + "module": "python", + "source": null, + "version": "unknown", + "diff": "", + "path": "/usr/lib/python2.7/dist-packages/google" + }, + { + "name": "gtk", + "module": "python", + "source": null, + "version": "unknown", + "diff": "", + "path": "/usr/lib/python2.7/dist-packages/gtk-2.0/gtk" + }, + { + "name": "httplib2", + "module": "python", + "source": "attribute", + "version": "0.7.4", + "diff": "", + "path": "/usr/lib/python2.7/dist-packages/httplib2" + }, + { + "name": "lockfile", + "module": "python", + "source": "egg-info", + "version": "0.9.1", + "diff": "", + "path": "/home/wd15/.virtualenvs/default/lib/python2.7/site-packages/lockfile-0.9.1-py2.7.egg/lockfile" + }, + { + "name": "lxml", + "module": "python", + "source": null, + "version": "unknown", + "diff": "", + "path": "/usr/lib/python2.7/dist-packages/lxml" + }, + { + "name": "matplotlib", + "module": "python", + "source": "attribute", + "version": "1.1.1", + "diff": "", + "path": "/usr/lib/pymodules/python2.7/matplotlib" + }, + { + "name": "mayavi", + "module": "python", + "source": "attribute", + "version": "4.1.0", + "diff": "", + "path": "/usr/lib/python2.7/dist-packages/mayavi" + }, + { + "name": "mpi4py", + "module": "python", + "source": "attribute", + "version": "1.3", + "diff": "", + "path": "/usr/lib/python2.7/dist-packages/mpi4py" + }, + { + "name": "mpl_toolkits", + "module": "python", + "source": null, + "version": "unknown", + "diff": "", + "path": "/usr/lib/pymodules/python2.7/mpl_toolkits" + }, + { + "name": "mx", + "module": "python", + "source": "attribute", + "version": "3.2.1", + "diff": "", + "path": "/usr/lib/python2.7/dist-packages/mx" + }, + { + "name": "nose", + "module": "python", + "source": "attribute", + "version": "1.2.1", + "diff": "", + "path": "/home/wd15/.virtualenvs/fipy/lib/python2.7/site-packages/nose" + }, + { + "name": "numexpr", + "module": "python", + "source": "attribute", + "version": "2.0.1", + "diff": "", + "path": "/usr/lib/python2.7/dist-packages/numexpr" + }, + { + "name": "numpy", + "module": "python", + "source": "attribute", + "version": "1.6.2", + "diff": "", + "path": "/usr/lib/python2.7/dist-packages/numpy" + }, + { + "name": "pyamg", + "module": "python", + "source": "attribute", + "version": "2.0.4.dev", + "diff": "", + "path": "/home/wd15/.virtualenvs/fipy/lib/python2.7/site-packages/pyamg" + }, + { + "name": "pylsmlib", + "module": "python", + "source": "/home/wd15/git/LSMLIB", + "version": "6f5d969bb27530aa37452a8b096e538a5cf7b993", + "diff": "", + "path": "/home/wd15/git/LSMLIB/pylsmlib/pylsmlib" + }, + { + "name": "pysparse", + "module": "python", + "source": "attribute", + "version": "1.1", + "diff": "", + "path": "/usr/lib/python2.7/dist-packages/pysparse" + }, + { + "name": "pytz", + "module": "python", + "source": "attribute", + "version": "2011k", + "diff": "", + "path": "/usr/lib/python2.7/dist-packages/pytz" + }, + { + "name": "scipy", + "module": "python", + "source": "attribute", + "version": "0.10.1", + "diff": "", + "path": "/usr/lib/python2.7/dist-packages/scipy" + }, + { + "name": "setuptools", + "module": "python", + "source": "attribute", + "version": "0.6", + "diff": "", + "path": "/home/wd15/.virtualenvs/default/local/lib/python2.7/site-packages/distribute-0.6.24-py2.7.egg/setuptools" + }, + { + "name": "simplejson", + "module": "python", + "source": "attribute", + "version": "2.6.1", + "diff": "", + "path": "/usr/lib/python2.7/dist-packages/simplejson" + }, + { + "name": "skfmm", + "module": "python", + "source": "/home/wd15/git/scikit-fmm", + "version": "467e5982fbd9d4eb32495f826d6bda65da498e13", + "diff": "", + "path": "/home/wd15/git/scikit-fmm/skfmm" + }, + { + "name": "sumatra", + "module": "python", + "source": "attribute", + "version": "0.5.0dev", + "diff": "", + "path": "/home/wd15/.virtualenvs/default/lib/python2.7/site-packages/Sumatra-0.5.0dev-py2.7.egg/sumatra" + }, + { + "name": "tables", + "module": "python", + "source": "attribute", + "version": "2.3.1", + "diff": "", + "path": "/usr/lib/python2.7/dist-packages/tables" + }, + { + "name": "tagging", + "module": "python", + "source": "attribute", + "version": "0.3.1", + "diff": "", + "path": "/home/wd15/.virtualenvs/fipy/lib/python2.7/site-packages/tagging" + }, + { + "name": "tornado", + "module": "python", + "source": "attribute", + "version": "2.3", + "diff": "", + "path": "/usr/lib/python2.7/dist-packages/tornado" + }, + { + "name": "traits", + "module": "python", + "source": "attribute", + "version": "4.1.0", + "diff": "", + "path": "/usr/lib/python2.7/dist-packages/traits" + }, + { + "name": "tvtk", + "module": "python", + "source": null, + "version": "unknown", + "diff": "", + "path": "/usr/lib/python2.7/dist-packages/tvtk" + }, + { + "name": "vtk", + "module": "python", + "source": null, + "version": "unknown", + "diff": "", + "path": "/usr/lib/pymodules/python2.7/vtk" + }, + { + "name": "wx", + "module": "python", + "source": "attribute", + "version": "2.8.12.1", + "diff": "", + "path": "/usr/lib/python2.7/dist-packages/wx-2.8-gtk2-unicode/wx" + }, + { + "name": "yaml", + "module": "python", + "source": "attribute", + "version": "3.10", + "diff": "", + "path": "/usr/lib/python2.7/dist-packages/yaml" + }, + { + "name": "zmq", + "module": "python", + "source": "attribute", + "version": "2.2.0", + "diff": "", + "path": "/usr/lib/python2.7/dist-packages/zmq" + } + ], + "user": "Daniel Wheeler ", + "output_data": [ + { + "path": "data.h5", + "digest": "90f2f03f6ca5ec803bcee08014a4e58f521f47c4", + "metadata": { + "mimetype": null, + "size": 102992, + "encoding": null + } + } + ], + "input_data": [], + "launch_mode": { + "type": "SerialLaunchMode", + "parameters": { + "working_directory": "/home/wd15/git/extremefill-data" + } + }, + "main_file": "script.py", + "outcome": "" +}, +{ + "script_arguments": "", + "platforms": [ + { + "system_name": "Linux", + "machine": "x86_64", + "version": "#35-Ubuntu SMP Thu Jan 24 13:15:40 UTC 2013", + "ip_addr": "127.0.0.1", + "architecture_bits": "64bit", + "architecture_linkage": "ELF", + "release": "3.5.0-23-generic", + "network_name": "loki", + "processor": "x86_64" + } + ], + "duration": 3.9935479164123535, + "diff": "diff --git a/script.py b/script.py\nindex ec41d60..8c98103 100644\n--- a/script.py\n+++ b/script.py\n@@ -30,16 +30,5 @@ def run(totalSteps=10,\n NxBase=1200)\n \n if __name__ == '__main__':\n-\n-\n- class Bare(object):\n- pass\n-\n- \n- args = Bare()\n- parser = argparse.ArgumentParser(description=\"Run Extremefill 2D example.\")\n- parser.add_argument('--totalSteps', default=1, type=int)\n- parser.parse_args(namespace=args)\n-\n- run(totalSteps=args.totalSteps, tags=('test',), reason=\"testing SMT class\")\n+ run(totalSteps=2, tags=('test',), reason=\"testing SMT class\")\n \ndiff --git a/smtdecorator.py b/smtdecorator.py\nindex 432a8b7..3bbff83 100644\n--- a/smtdecorator.py\n+++ b/smtdecorator.py\n@@ -1,4 +1,3 @@\n-\n \"\"\"\n Script to test setting up batch simaulations with Sumatra.\n \n@@ -22,8 +21,8 @@ On laptop use http://129.6.153.60:8000\n import time\n import os\n import sys\n-from contextlib import contextmanager\n from StringIO import StringIO\n+import argparse\n \n \n from sumatra.projects import load_project\n@@ -60,17 +59,20 @@ class SMTDecorator(object):\n self.function = function\n \n def __call__(self, tags=(), reason='', *args, **kwargs):\n+\n+ parameters, tags, reason = self.parseargs(kwargs, tags, reason)\n+\n project = load_project()\n- record = project.new_record(parameters=SimpleParameterSet(kwargs),\n+ record = project.new_record(parameters=SimpleParameterSet(parameters),\n main_file=self.function.func_globals['__file__'],\n reason=reason)\n \n record.datastore.root = os.path.join(record.datastore.root, record.label)\n+\n for tag in tags:\n record.tags.add(tag)\n \n record.start_time = time.time()\n-\n with Redirect() as out:\n returnvalue = self.function(datadir=record.datastore.root, *args, **record.parameters.as_dict())\n \n@@ -84,5 +86,25 @@ class SMTDecorator(object):\n \n return returnvalue\n \n+ def parseargs(self, func_kwargs, tags, reason):\n+ class Bare:\n+ pass\n+ ext_kwargs = Bare()\n+ parser = argparse.ArgumentParser(description=\"SMT arguments\")\n+\n+ for k, v in func_kwargs.iteritems():\n+ parser.add_argument('--' + k, default=v, type=type(v))\n+ parser.parse_args(namespace=ext_kwargs)\n+ func_kwargs[k] = getattr(ext_kwargs, k)\n+ \n+ parser.add_argument('--tags', action='append', default=tags)\n+ parser.parse_args(namespace=ext_kwargs)\n+ tags = ext_kwargs.tags\n+ \n+ parser.add_argument('--reason', default=reason, type=type(reason))\n+ parser.parse_args(namespace=ext_kwargs)\n+ reason = ext_kwargs.reason\n \n-\n+ return func_kwargs, tags, reason\n+ \n+ ", + "datastore": { + "type": "FileSystemDataStore", + "parameters": { + "root": "./Data/2c36b03dd13e" + } + }, + "input_datastore": { + "type": "FileSystemDataStore", + "parameters": { + "root": "/" + } + }, + "executable": { + "path": "/home/wd15/.virtualenvs/default/bin/python", + "version": "2.7.3", + "name": "Python", + "options": "" + }, + "parameters": { + "content": "totalSteps = 2", + "type": "SimpleParameterSet" + }, + "label": "2c36b03dd13e", + "version": "03128c81e5ec503445a0a10166626c2e902ba41e", + "stdout_stderr": "[ 1. 1. 1. 1.]\n[ 0.34738209 0.61535499 0.01923836 0.00971058]\n[ 1.23729704e-01 2.14204081e-01 1.88311438e-04 1.55991524e-03]\n\ntheta 0.0\ncBar_supp 1.0\ncBar_cu 1.0\npotentialBar 1.0\nmin(extension) 7.22965473284e-08\nmin(depositionRate) 2.09114908795e-09\nmin(current) 56.8350759862\nmin(cupric) 997.266139623\nmin(baseCurrent) 56.9323002935\nmax(interfaceTheta) - 1: -0.973021297371\nmin(interfaceTheta) 0.0\nmin(I0) 38.9208518948\ndt 0.011\nelapsed time 0.0\nstep 0\n\n[ 1. 1. 1. 1.]\n[ 0.10765512 0.04576554 0.03330295 0.00523947]\n\ntheta 0.0\ncBar_supp 1.0\ncBar_cu 1.0\npotentialBar 1.0\nmin(extension) 2.09114554699e-09\nmin(depositionRate) 1.47837489306e-09\nmin(current) 40.1805638188\nmin(cupric) 996.200886814\nmin(baseCurrent) 40.2838895551\nmax(interfaceTheta) - 1: -0.947107282423\nmin(interfaceTheta) 0.0\nmin(I0) 37.8842912969\ndt 0.0121\nelapsed time 0.011\nstep 1\n\n", + "repository": { + "url": "/home/wd15/git/extremefill-data", + "type": "GitRepository", + "upstream": "git@github.com:wd15/extremefill-data.git" + }, + "tags": [ + "test" + ], + "timestamp": "2013-02-18 22:15:04", + "reason": "testing SMT class", + "dependencies": [ + { + "name": "Cython", + "module": "python", + "source": "attribute", + "version": "0.16", + "diff": "", + "path": "/usr/lib/python2.7/dist-packages/Cython" + }, + { + "name": "IPython", + "module": "python", + "source": "attribute", + "version": "0.13.1.rc2", + "diff": "", + "path": "/usr/lib/python2.7/dist-packages/IPython" + }, + { + "name": "PIL", + "module": "python", + "source": null, + "version": "unknown", + "diff": "", + "path": "/usr/lib/python2.7/dist-packages/PIL" + }, + { + "name": "PyQt4", + "module": "python", + "source": null, + "version": "unknown", + "diff": "", + "path": "/usr/lib/python2.7/dist-packages/PyQt4" + }, + { + "name": "PyTrilinos", + "module": "python", + "source": "attribute", + "version": "4.8d", + "diff": "", + "path": "/home/wd15/.virtualenvs/fipy/lib/python2.7/site-packages/PyTrilinos" + }, + { + "name": "dateutil", + "module": "python", + "source": "attribute", + "version": "1.5", + "diff": "", + "path": "/usr/lib/python2.7/dist-packages/dateutil" + }, + { + "name": "distutils", + "module": "python", + "source": "attribute", + "version": "2.7.3", + "diff": "", + "path": "/home/wd15/.virtualenvs/default/lib/python2.7/distutils" + }, + { + "name": "django", + "module": "python", + "source": "attribute", + "version": "1.4.1", + "diff": "", + "path": "/usr/lib/python2.7/dist-packages/django" + }, + { + "name": "docutils", + "module": "python", + "source": "attribute", + "version": "0.10", + "diff": "", + "path": "/home/wd15/.virtualenvs/fipy/lib/python2.7/site-packages/docutils" + }, + { + "name": "encodings", + "module": "python", + "source": null, + "version": "unknown", + "diff": "", + "path": "/home/wd15/.virtualenvs/default/lib/python2.7/encodings" + }, + { + "name": "extremefill", + "module": "python", + "source": "/home/wd15/git/extremefill", + "version": "549c969edb113d0b3e9804612bfa53e91319c0ea", + "diff": "diff --git a/data/viewer.py b/data/viewer.py\nindex 68f60e0..d9ab7c2 100644\n--- a/data/viewer.py\n+++ b/data/viewer.py\n@@ -122,7 +122,7 @@ class ContourViewer(BaseViewer):\n self.times = times\n self.contours = contours\n self.data = []\n- super(ContourViewer, self).__init__(branches=branches, datafile=datafiles, datafiles=datafiles)\n+ super(ContourViewer, self).__init__(branches=branches, datafile=datafile, datafiles=datafiles)\n \n def plot(self):\n import matplotlib.pyplot as plt\n@@ -152,6 +152,24 @@ class ContourViewer(BaseViewer):\n phi = np.reshape(phi, shape)\n self.data.append((x, y, phi))\n \n+def datafilesFromBranches(branches, datafile):\n+ cwd = os.getcwd()\n+ for count, branch in enumerate(branches):\n+ print 'branch',branch\n+ tempdir = gitCloneToTemp(branch=branch, repositoryPath='ssh://wd15@genie.nist.gov/users/wd15/git/extremefill')\n+ repopath = os.path.join(tempdir, 'extremefill')\n+ datapath = os.path.join(repopath, datafile)\n+ gitMediaSync()\n+ if count == 0:\n+ self.addBaseData(datapath)\n+ basetempdir = tempdir\n+ else:\n+ self.addData(datapath, branch)\n+ cleanTempRepo(tempdir) \n+\n+ cleanTempRepo(basetempdir)\n+ os.chdir(cwd)\n+\n def plotNx():\n branches = ('Nx600', 'Nx300', 'Nx150')\n datafile = os.path.join('data', 'data.h5')\n@@ -174,13 +192,13 @@ def plotCFL():\n \n def plotContour():\n # branches = ('CFL0.0125', 'CFL0.025', 'CFL0.05', 'CFL0.1', 'CFL0.2', 'CFL0.4', 'CFL0.8', 'CFL1.6')\n- branches = ('Nx600', 'Nx150')\n+ branches = ('Nx300', 'Nx150')\n # branches = ('CFL0.025', 'CFL0.05')\n datafile = os.path.join('data', 'data.h5')\n times = (0,)\n- # times = (0., 1000., 2000., 3000., 4000.)\n- # viewer = ContourViewer(times=times, branches=branches, datafile=datafile)\n- viewer = ContourViewer(times=times, branches=branches, datafile=datafile, datafiles=('data150.h5', 'data600.h5'))\n+ times = (0., 1000., 2000., 3000., 4000.)\n+ viewer = ContourViewer(times=times, branches=branches, datafile=datafile)\n+ #viewer = ContourViewer(times=times, branches=branches, datafile=datafile, datafiles=('data150.h5', 'data600.h5'))\n viewer.plot()\n \n if __name__ == '__main__':\n@@ -188,6 +206,6 @@ if __name__ == '__main__':\n # from profiler import calibrate_profiler\n # fudge = calibrate_profiler(10000)\n # profile = Profiler('profile', fudge=fudge)\n- plotCFL()\n+ plotContour()\n # profile.stop()\n ", + "path": "/home/wd15/git/extremefill/extremefill" + }, + { + "name": "fipy", + "module": "python", + "source": "/home/wd15/git/fipy", + "version": "8c51478a3e8c30618b3a96c132612a46735c7548", + "diff": "", + "path": "/home/wd15/git/fipy/fipy" + }, + { + "name": "gi", + "module": "python", + "source": "attribute", + "version": "3.4.0", + "diff": "", + "path": "/usr/lib/python2.7/dist-packages/gi" + }, + { + "name": "glib", + "module": "python", + "source": null, + "version": "unknown", + "diff": "", + "path": "/usr/lib/python2.7/dist-packages/glib" + }, + { + "name": "gobject", + "module": "python", + "source": null, + "version": "unknown", + "diff": "", + "path": "/usr/lib/python2.7/dist-packages/gobject" + }, + { + "name": "google", + "module": "python", + "source": null, + "version": "unknown", + "diff": "", + "path": "/usr/lib/python2.7/dist-packages/google" + }, + { + "name": "gtk", + "module": "python", + "source": null, + "version": "unknown", + "diff": "", + "path": "/usr/lib/python2.7/dist-packages/gtk-2.0/gtk" + }, + { + "name": "httplib2", + "module": "python", + "source": "attribute", + "version": "0.7.4", + "diff": "", + "path": "/usr/lib/python2.7/dist-packages/httplib2" + }, + { + "name": "lockfile", + "module": "python", + "source": "egg-info", + "version": "0.9.1", + "diff": "", + "path": "/home/wd15/.virtualenvs/default/lib/python2.7/site-packages/lockfile-0.9.1-py2.7.egg/lockfile" + }, + { + "name": "lxml", + "module": "python", + "source": null, + "version": "unknown", + "diff": "", + "path": "/usr/lib/python2.7/dist-packages/lxml" + }, + { + "name": "matplotlib", + "module": "python", + "source": "attribute", + "version": "1.1.1", + "diff": "", + "path": "/usr/lib/pymodules/python2.7/matplotlib" + }, + { + "name": "mayavi", + "module": "python", + "source": "attribute", + "version": "4.1.0", + "diff": "", + "path": "/usr/lib/python2.7/dist-packages/mayavi" + }, + { + "name": "mpi4py", + "module": "python", + "source": "attribute", + "version": "1.3", + "diff": "", + "path": "/usr/lib/python2.7/dist-packages/mpi4py" + }, + { + "name": "mpl_toolkits", + "module": "python", + "source": null, + "version": "unknown", + "diff": "", + "path": "/usr/lib/pymodules/python2.7/mpl_toolkits" + }, + { + "name": "mx", + "module": "python", + "source": "attribute", + "version": "3.2.1", + "diff": "", + "path": "/usr/lib/python2.7/dist-packages/mx" + }, + { + "name": "nose", + "module": "python", + "source": "attribute", + "version": "1.2.1", + "diff": "", + "path": "/home/wd15/.virtualenvs/fipy/lib/python2.7/site-packages/nose" + }, + { + "name": "numexpr", + "module": "python", + "source": "attribute", + "version": "2.0.1", + "diff": "", + "path": "/usr/lib/python2.7/dist-packages/numexpr" + }, + { + "name": "numpy", + "module": "python", + "source": "attribute", + "version": "1.6.2", + "diff": "", + "path": "/usr/lib/python2.7/dist-packages/numpy" + }, + { + "name": "pyamg", + "module": "python", + "source": "attribute", + "version": "2.0.4.dev", + "diff": "", + "path": "/home/wd15/.virtualenvs/fipy/lib/python2.7/site-packages/pyamg" + }, + { + "name": "pylsmlib", + "module": "python", + "source": "/home/wd15/git/LSMLIB", + "version": "6f5d969bb27530aa37452a8b096e538a5cf7b993", + "diff": "", + "path": "/home/wd15/git/LSMLIB/pylsmlib/pylsmlib" + }, + { + "name": "pysparse", + "module": "python", + "source": "attribute", + "version": "1.1", + "diff": "", + "path": "/usr/lib/python2.7/dist-packages/pysparse" + }, + { + "name": "pytz", + "module": "python", + "source": "attribute", + "version": "2011k", + "diff": "", + "path": "/usr/lib/python2.7/dist-packages/pytz" + }, + { + "name": "scipy", + "module": "python", + "source": "attribute", + "version": "0.10.1", + "diff": "", + "path": "/usr/lib/python2.7/dist-packages/scipy" + }, + { + "name": "setuptools", + "module": "python", + "source": "attribute", + "version": "0.6", + "diff": "", + "path": "/home/wd15/.virtualenvs/default/local/lib/python2.7/site-packages/distribute-0.6.24-py2.7.egg/setuptools" + }, + { + "name": "simplejson", + "module": "python", + "source": "attribute", + "version": "2.6.1", + "diff": "", + "path": "/usr/lib/python2.7/dist-packages/simplejson" + }, + { + "name": "skfmm", + "module": "python", + "source": "/home/wd15/git/scikit-fmm", + "version": "467e5982fbd9d4eb32495f826d6bda65da498e13", + "diff": "", + "path": "/home/wd15/git/scikit-fmm/skfmm" + }, + { + "name": "sumatra", + "module": "python", + "source": "attribute", + "version": "0.5.0dev", + "diff": "", + "path": "/home/wd15/.virtualenvs/default/lib/python2.7/site-packages/Sumatra-0.5.0dev-py2.7.egg/sumatra" + }, + { + "name": "tables", + "module": "python", + "source": "attribute", + "version": "2.3.1", + "diff": "", + "path": "/usr/lib/python2.7/dist-packages/tables" + }, + { + "name": "tagging", + "module": "python", + "source": "attribute", + "version": "0.3.1", + "diff": "", + "path": "/home/wd15/.virtualenvs/fipy/lib/python2.7/site-packages/tagging" + }, + { + "name": "tornado", + "module": "python", + "source": "attribute", + "version": "2.3", + "diff": "", + "path": "/usr/lib/python2.7/dist-packages/tornado" + }, + { + "name": "traits", + "module": "python", + "source": "attribute", + "version": "4.1.0", + "diff": "", + "path": "/usr/lib/python2.7/dist-packages/traits" + }, + { + "name": "tvtk", + "module": "python", + "source": null, + "version": "unknown", + "diff": "", + "path": "/usr/lib/python2.7/dist-packages/tvtk" + }, + { + "name": "vtk", + "module": "python", + "source": null, + "version": "unknown", + "diff": "", + "path": "/usr/lib/pymodules/python2.7/vtk" + }, + { + "name": "wx", + "module": "python", + "source": "attribute", + "version": "2.8.12.1", + "diff": "", + "path": "/usr/lib/python2.7/dist-packages/wx-2.8-gtk2-unicode/wx" + }, + { + "name": "yaml", + "module": "python", + "source": "attribute", + "version": "3.10", + "diff": "", + "path": "/usr/lib/python2.7/dist-packages/yaml" + }, + { + "name": "zmq", + "module": "python", + "source": "attribute", + "version": "2.2.0", + "diff": "", + "path": "/usr/lib/python2.7/dist-packages/zmq" + } + ], + "user": "Daniel Wheeler ", + "output_data": [ + { + "path": "data.h5", + "digest": "e7b9bf4f53db03b6f16e8457d637ea56e3ddc8f6", + "metadata": { + "mimetype": null, + "size": 102992, + "encoding": null + } + } + ], + "input_data": [], + "launch_mode": { + "type": "SerialLaunchMode", + "parameters": { + "working_directory": "/home/wd15/git/extremefill-data" + } + }, + "main_file": "script.py", + "outcome": "" +}, +{ + "script_arguments": "", + "platforms": [ + { + "system_name": "Linux", + "machine": "x86_64", + "version": "#35-Ubuntu SMP Thu Jan 24 13:15:40 UTC 2013", + "ip_addr": "127.0.0.1", + "architecture_bits": "64bit", + "architecture_linkage": "ELF", + "release": "3.5.0-23-generic", + "network_name": "loki", + "processor": "x86_64" + } + ], + "duration": 6.978579998016357, + "diff": "diff --git a/script.py b/script.py\nindex ec41d60..4a880aa 100644\n--- a/script.py\n+++ b/script.py\n@@ -32,14 +32,14 @@ def run(totalSteps=10,\n if __name__ == '__main__':\n \n \n- class Bare(object):\n- pass\n+ # class Bare(object):\n+ # pass\n \n \n- args = Bare()\n- parser = argparse.ArgumentParser(description=\"Run Extremefill 2D example.\")\n- parser.add_argument('--totalSteps', default=1, type=int)\n- parser.parse_args(namespace=args)\n+ # args = Bare()\n+ # parser = argparse.ArgumentParser(description=\"Run Extremefill 2D example.\")\n+ # parser.add_argument('--totalSteps', default=1, type=int)\n+ # parser.parse_args(namespace=args)\n \n- run(totalSteps=args.totalSteps, tags=('test',), reason=\"testing SMT class\")\n+ run(totalSteps=2, tags=('test',), reason=\"testing SMT class\")\n \ndiff --git a/smtdecorator.py b/smtdecorator.py\nindex 432a8b7..1ac6cd5 100644\n--- a/smtdecorator.py\n+++ b/smtdecorator.py\n@@ -1,4 +1,3 @@\n-\n \"\"\"\n Script to test setting up batch simaulations with Sumatra.\n \n@@ -22,8 +21,8 @@ On laptop use http://129.6.153.60:8000\n import time\n import os\n import sys\n-from contextlib import contextmanager\n from StringIO import StringIO\n+import argparse\n \n \n from sumatra.projects import load_project\n@@ -60,6 +59,9 @@ class SMTDecorator(object):\n self.function = function\n \n def __call__(self, tags=(), reason='', *args, **kwargs):\n+\n+ kwargs = self.parseargs(kwargs)\n+ \n project = load_project()\n record = project.new_record(parameters=SimpleParameterSet(kwargs),\n main_file=self.function.func_globals['__file__'],\n@@ -70,7 +72,6 @@ class SMTDecorator(object):\n record.tags.add(tag)\n \n record.start_time = time.time()\n-\n with Redirect() as out:\n returnvalue = self.function(datadir=record.datastore.root, *args, **record.parameters.as_dict())\n \n@@ -84,5 +85,17 @@ class SMTDecorator(object):\n \n return returnvalue\n \n+ def parseargs(self, kwargs):\n+ class Bare:\n+ pass\n+ args = Bare()\n+ parser = argparse.ArgumentParser(description=\"Run Extremefill 2D example.\")\n \n+ for k, v in kwargs.iteritems():\n+ parser.add_argument('--' + k, default=v, type=type(v)) \n+ parser.parse_args(namespace=args)\n+ kwargs[k] = getattr(args, k)\n \n+ return kwargs\n+ \n+ ", + "datastore": { + "type": "FileSystemDataStore", + "parameters": { + "root": "./Data/e1039436208f" + } + }, + "input_datastore": { + "type": "FileSystemDataStore", + "parameters": { + "root": "/" + } + }, + "executable": { + "path": "/home/wd15/.virtualenvs/default/bin/python", + "version": "2.7.3", + "name": "Python", + "options": "" + }, + "parameters": { + "content": "totalSteps = 4", + "type": "SimpleParameterSet" + }, + "label": "e1039436208f", + "version": "03128c81e5ec503445a0a10166626c2e902ba41e", + "stdout_stderr": "[ 1. 1. 1. 1.]\n[ 0.34738209 0.61535499 0.01923836 0.00971058]\n[ 1.23729704e-01 2.14204081e-01 1.88311438e-04 1.55991524e-03]\n\ntheta 0.0\ncBar_supp 1.0\ncBar_cu 1.0\npotentialBar 1.0\nmin(extension) 7.22965473284e-08\nmin(depositionRate) 2.09114908795e-09\nmin(current) 56.8350759862\nmin(cupric) 997.266139623\nmin(baseCurrent) 56.9323002935\nmax(interfaceTheta) - 1: -0.973021297371\nmin(interfaceTheta) 0.0\nmin(I0) 38.9208518948\ndt 0.011\nelapsed time 0.0\nstep 0\n\n[ 1. 1. 1. 1.]\n[ 0.10765512 0.04576554 0.03330295 0.00523947]\n\ntheta 0.0\ncBar_supp 1.0\ncBar_cu 1.0\npotentialBar 1.0\nmin(extension) 2.09114554699e-09\nmin(depositionRate) 1.47837489306e-09\nmin(current) 40.1805638188\nmin(cupric) 996.200886814\nmin(baseCurrent) 40.2838895551\nmax(interfaceTheta) - 1: -0.947107282423\nmin(interfaceTheta) 0.0\nmin(I0) 37.8842912969\ndt 0.0121\nelapsed time 0.011\nstep 1\n\n[ 1. 1. 1. 1.]\n[ 3.45872899 0.00767994 0.04328443 0.00526515]\n\ntheta 0.0\ncBar_supp 1.0\ncBar_cu 1.0\npotentialBar 1.0\nmin(extension) 1.47835191842e-09\nmin(depositionRate) 1.46663996872e-09\nmin(current) 39.8616217978\nmin(cupric) 995.148480462\nmin(baseCurrent) 39.9926693524\nmax(interfaceTheta) - 1: -0.92148263086\nmin(interfaceTheta) 0.0\nmin(I0) 36.8593052344\ndt 0.01331\nelapsed time 0.0231\nstep 2\n\n[ 1. 1. 1. 1.]\n[ 8.88172168e+01 8.75504210e-03 5.01742754e-02 5.39551911e-03]\n[ 8.96400062e-01 2.22717014e-04 2.71862484e-04 2.90776586e-05]\n\ntheta 0.0\ncBar_supp 1.0\ncBar_cu 1.0\npotentialBar 1.0\nmin(extension) 1.46657584035e-09\nmin(depositionRate) 1.46404704728e-09\nmin(current) 39.7911491146\nmin(cupric) 994.084658919\nmin(baseCurrent) 39.9384404059\nmax(interfaceTheta) - 1: -0.895749878737\nmin(interfaceTheta) 0.0\nmin(I0) 35.8299951495\ndt 0.014641\nelapsed time 0.03641\nstep 3\n\n", + "repository": { + "url": "/home/wd15/git/extremefill-data", + "type": "GitRepository", + "upstream": "git@github.com:wd15/extremefill-data.git" + }, + "tags": [ + "test" + ], + "timestamp": "2013-02-18 20:53:28", + "reason": "testing SMT class", + "dependencies": [ + { + "name": "Cython", + "module": "python", + "source": "attribute", + "version": "0.16", + "diff": "", + "path": "/usr/lib/python2.7/dist-packages/Cython" + }, + { + "name": "IPython", + "module": "python", + "source": "attribute", + "version": "0.13.1.rc2", + "diff": "", + "path": "/usr/lib/python2.7/dist-packages/IPython" + }, + { + "name": "PIL", + "module": "python", + "source": null, + "version": "unknown", + "diff": "", + "path": "/usr/lib/python2.7/dist-packages/PIL" + }, + { + "name": "PyQt4", + "module": "python", + "source": null, + "version": "unknown", + "diff": "", + "path": "/usr/lib/python2.7/dist-packages/PyQt4" + }, + { + "name": "PyTrilinos", + "module": "python", + "source": "attribute", + "version": "4.8d", + "diff": "", + "path": "/home/wd15/.virtualenvs/fipy/lib/python2.7/site-packages/PyTrilinos" + }, + { + "name": "dateutil", + "module": "python", + "source": "attribute", + "version": "1.5", + "diff": "", + "path": "/usr/lib/python2.7/dist-packages/dateutil" + }, + { + "name": "distutils", + "module": "python", + "source": "attribute", + "version": "2.7.3", + "diff": "", + "path": "/home/wd15/.virtualenvs/default/lib/python2.7/distutils" + }, + { + "name": "django", + "module": "python", + "source": "attribute", + "version": "1.4.1", + "diff": "", + "path": "/usr/lib/python2.7/dist-packages/django" + }, + { + "name": "docutils", + "module": "python", + "source": "attribute", + "version": "0.10", + "diff": "", + "path": "/home/wd15/.virtualenvs/fipy/lib/python2.7/site-packages/docutils" + }, + { + "name": "encodings", + "module": "python", + "source": null, + "version": "unknown", + "diff": "", + "path": "/home/wd15/.virtualenvs/default/lib/python2.7/encodings" + }, + { + "name": "extremefill", + "module": "python", + "source": "/home/wd15/git/extremefill", + "version": "549c969edb113d0b3e9804612bfa53e91319c0ea", + "diff": "diff --git a/data/viewer.py b/data/viewer.py\nindex 68f60e0..d9ab7c2 100644\n--- a/data/viewer.py\n+++ b/data/viewer.py\n@@ -122,7 +122,7 @@ class ContourViewer(BaseViewer):\n self.times = times\n self.contours = contours\n self.data = []\n- super(ContourViewer, self).__init__(branches=branches, datafile=datafiles, datafiles=datafiles)\n+ super(ContourViewer, self).__init__(branches=branches, datafile=datafile, datafiles=datafiles)\n \n def plot(self):\n import matplotlib.pyplot as plt\n@@ -152,6 +152,24 @@ class ContourViewer(BaseViewer):\n phi = np.reshape(phi, shape)\n self.data.append((x, y, phi))\n \n+def datafilesFromBranches(branches, datafile):\n+ cwd = os.getcwd()\n+ for count, branch in enumerate(branches):\n+ print 'branch',branch\n+ tempdir = gitCloneToTemp(branch=branch, repositoryPath='ssh://wd15@genie.nist.gov/users/wd15/git/extremefill')\n+ repopath = os.path.join(tempdir, 'extremefill')\n+ datapath = os.path.join(repopath, datafile)\n+ gitMediaSync()\n+ if count == 0:\n+ self.addBaseData(datapath)\n+ basetempdir = tempdir\n+ else:\n+ self.addData(datapath, branch)\n+ cleanTempRepo(tempdir) \n+\n+ cleanTempRepo(basetempdir)\n+ os.chdir(cwd)\n+\n def plotNx():\n branches = ('Nx600', 'Nx300', 'Nx150')\n datafile = os.path.join('data', 'data.h5')\n@@ -174,13 +192,13 @@ def plotCFL():\n \n def plotContour():\n # branches = ('CFL0.0125', 'CFL0.025', 'CFL0.05', 'CFL0.1', 'CFL0.2', 'CFL0.4', 'CFL0.8', 'CFL1.6')\n- branches = ('Nx600', 'Nx150')\n+ branches = ('Nx300', 'Nx150')\n # branches = ('CFL0.025', 'CFL0.05')\n datafile = os.path.join('data', 'data.h5')\n times = (0,)\n- # times = (0., 1000., 2000., 3000., 4000.)\n- # viewer = ContourViewer(times=times, branches=branches, datafile=datafile)\n- viewer = ContourViewer(times=times, branches=branches, datafile=datafile, datafiles=('data150.h5', 'data600.h5'))\n+ times = (0., 1000., 2000., 3000., 4000.)\n+ viewer = ContourViewer(times=times, branches=branches, datafile=datafile)\n+ #viewer = ContourViewer(times=times, branches=branches, datafile=datafile, datafiles=('data150.h5', 'data600.h5'))\n viewer.plot()\n \n if __name__ == '__main__':\n@@ -188,6 +206,6 @@ if __name__ == '__main__':\n # from profiler import calibrate_profiler\n # fudge = calibrate_profiler(10000)\n # profile = Profiler('profile', fudge=fudge)\n- plotCFL()\n+ plotContour()\n # profile.stop()\n ", + "path": "/home/wd15/git/extremefill/extremefill" + }, + { + "name": "fipy", + "module": "python", + "source": "/home/wd15/git/fipy", + "version": "8c51478a3e8c30618b3a96c132612a46735c7548", + "diff": "", + "path": "/home/wd15/git/fipy/fipy" + }, + { + "name": "gi", + "module": "python", + "source": "attribute", + "version": "3.4.0", + "diff": "", + "path": "/usr/lib/python2.7/dist-packages/gi" + }, + { + "name": "glib", + "module": "python", + "source": null, + "version": "unknown", + "diff": "", + "path": "/usr/lib/python2.7/dist-packages/glib" + }, + { + "name": "gobject", + "module": "python", + "source": null, + "version": "unknown", + "diff": "", + "path": "/usr/lib/python2.7/dist-packages/gobject" + }, + { + "name": "google", + "module": "python", + "source": null, + "version": "unknown", + "diff": "", + "path": "/usr/lib/python2.7/dist-packages/google" + }, + { + "name": "gtk", + "module": "python", + "source": null, + "version": "unknown", + "diff": "", + "path": "/usr/lib/python2.7/dist-packages/gtk-2.0/gtk" + }, + { + "name": "httplib2", + "module": "python", + "source": "attribute", + "version": "0.7.4", + "diff": "", + "path": "/usr/lib/python2.7/dist-packages/httplib2" + }, + { + "name": "lockfile", + "module": "python", + "source": "egg-info", + "version": "0.9.1", + "diff": "", + "path": "/home/wd15/.virtualenvs/default/lib/python2.7/site-packages/lockfile-0.9.1-py2.7.egg/lockfile" + }, + { + "name": "lxml", + "module": "python", + "source": null, + "version": "unknown", + "diff": "", + "path": "/usr/lib/python2.7/dist-packages/lxml" + }, + { + "name": "matplotlib", + "module": "python", + "source": "attribute", + "version": "1.1.1", + "diff": "", + "path": "/usr/lib/pymodules/python2.7/matplotlib" + }, + { + "name": "mayavi", + "module": "python", + "source": "attribute", + "version": "4.1.0", + "diff": "", + "path": "/usr/lib/python2.7/dist-packages/mayavi" + }, + { + "name": "mpi4py", + "module": "python", + "source": "attribute", + "version": "1.3", + "diff": "", + "path": "/usr/lib/python2.7/dist-packages/mpi4py" + }, + { + "name": "mpl_toolkits", + "module": "python", + "source": null, + "version": "unknown", + "diff": "", + "path": "/usr/lib/pymodules/python2.7/mpl_toolkits" + }, + { + "name": "mx", + "module": "python", + "source": "attribute", + "version": "3.2.1", + "diff": "", + "path": "/usr/lib/python2.7/dist-packages/mx" + }, + { + "name": "nose", + "module": "python", + "source": "attribute", + "version": "1.2.1", + "diff": "", + "path": "/home/wd15/.virtualenvs/fipy/lib/python2.7/site-packages/nose" + }, + { + "name": "numexpr", + "module": "python", + "source": "attribute", + "version": "2.0.1", + "diff": "", + "path": "/usr/lib/python2.7/dist-packages/numexpr" + }, + { + "name": "numpy", + "module": "python", + "source": "attribute", + "version": "1.6.2", + "diff": "", + "path": "/usr/lib/python2.7/dist-packages/numpy" + }, + { + "name": "pyamg", + "module": "python", + "source": "attribute", + "version": "2.0.4.dev", + "diff": "", + "path": "/home/wd15/.virtualenvs/fipy/lib/python2.7/site-packages/pyamg" + }, + { + "name": "pylsmlib", + "module": "python", + "source": "/home/wd15/git/LSMLIB", + "version": "6f5d969bb27530aa37452a8b096e538a5cf7b993", + "diff": "", + "path": "/home/wd15/git/LSMLIB/pylsmlib/pylsmlib" + }, + { + "name": "pysparse", + "module": "python", + "source": "attribute", + "version": "1.1", + "diff": "", + "path": "/usr/lib/python2.7/dist-packages/pysparse" + }, + { + "name": "pytz", + "module": "python", + "source": "attribute", + "version": "2011k", + "diff": "", + "path": "/usr/lib/python2.7/dist-packages/pytz" + }, + { + "name": "scipy", + "module": "python", + "source": "attribute", + "version": "0.10.1", + "diff": "", + "path": "/usr/lib/python2.7/dist-packages/scipy" + }, + { + "name": "setuptools", + "module": "python", + "source": "attribute", + "version": "0.6", + "diff": "", + "path": "/home/wd15/.virtualenvs/default/local/lib/python2.7/site-packages/distribute-0.6.24-py2.7.egg/setuptools" + }, + { + "name": "simplejson", + "module": "python", + "source": "attribute", + "version": "2.6.1", + "diff": "", + "path": "/usr/lib/python2.7/dist-packages/simplejson" + }, + { + "name": "skfmm", + "module": "python", + "source": "/home/wd15/git/scikit-fmm", + "version": "467e5982fbd9d4eb32495f826d6bda65da498e13", + "diff": "", + "path": "/home/wd15/git/scikit-fmm/skfmm" + }, + { + "name": "sumatra", + "module": "python", + "source": "attribute", + "version": "0.5.0dev", + "diff": "", + "path": "/home/wd15/.virtualenvs/default/lib/python2.7/site-packages/Sumatra-0.5.0dev-py2.7.egg/sumatra" + }, + { + "name": "tables", + "module": "python", + "source": "attribute", + "version": "2.3.1", + "diff": "", + "path": "/usr/lib/python2.7/dist-packages/tables" + }, + { + "name": "tagging", + "module": "python", + "source": "attribute", + "version": "0.3.1", + "diff": "", + "path": "/home/wd15/.virtualenvs/fipy/lib/python2.7/site-packages/tagging" + }, + { + "name": "tornado", + "module": "python", + "source": "attribute", + "version": "2.3", + "diff": "", + "path": "/usr/lib/python2.7/dist-packages/tornado" + }, + { + "name": "traits", + "module": "python", + "source": "attribute", + "version": "4.1.0", + "diff": "", + "path": "/usr/lib/python2.7/dist-packages/traits" + }, + { + "name": "tvtk", + "module": "python", + "source": null, + "version": "unknown", + "diff": "", + "path": "/usr/lib/python2.7/dist-packages/tvtk" + }, + { + "name": "vtk", + "module": "python", + "source": null, + "version": "unknown", + "diff": "", + "path": "/usr/lib/pymodules/python2.7/vtk" + }, + { + "name": "wx", + "module": "python", + "source": "attribute", + "version": "2.8.12.1", + "diff": "", + "path": "/usr/lib/python2.7/dist-packages/wx-2.8-gtk2-unicode/wx" + }, + { + "name": "yaml", + "module": "python", + "source": "attribute", + "version": "3.10", + "diff": "", + "path": "/usr/lib/python2.7/dist-packages/yaml" + }, + { + "name": "zmq", + "module": "python", + "source": "attribute", + "version": "2.2.0", + "diff": "", + "path": "/usr/lib/python2.7/dist-packages/zmq" + } + ], + "user": "Daniel Wheeler ", + "output_data": [ + { + "path": "data.h5", + "digest": "a11633291ee0e71fe090d2c2a99f69f2fe598b84", + "metadata": { + "mimetype": null, + "size": 102992, + "encoding": null + } + } + ], + "input_data": [], + "launch_mode": { + "type": "SerialLaunchMode", + "parameters": { + "working_directory": "/home/wd15/git/extremefill-data" + } + }, + "main_file": "script.py", + "outcome": "" +}, +{ + "script_arguments": "", + "platforms": [ + { + "system_name": "Linux", + "machine": "x86_64", + "version": "#35-Ubuntu SMP Thu Jan 24 13:15:40 UTC 2013", + "ip_addr": "127.0.0.1", + "architecture_bits": "64bit", + "architecture_linkage": "ELF", + "release": "3.5.0-23-generic", + "network_name": "loki", + "processor": "x86_64" + } + ], + "duration": 3.731626033782959, + "diff": "diff --git a/script.py b/script.py\nindex d111049..ec41d60 100644\n--- a/script.py\n+++ b/script.py\n@@ -38,7 +38,7 @@ if __name__ == '__main__':\n \n args = Bare()\n parser = argparse.ArgumentParser(description=\"Run Extremefill 2D example.\")\n- parser.add_argument('totalSteps', default=1, type=int)\n+ parser.add_argument('--totalSteps', default=1, type=int)\n parser.parse_args(namespace=args)\n \n run(totalSteps=args.totalSteps, tags=('test',), reason=\"testing SMT class\")", + "datastore": { + "type": "FileSystemDataStore", + "parameters": { + "root": "./Data/799ff9b72b5d" + } + }, + "input_datastore": { + "type": "FileSystemDataStore", + "parameters": { + "root": "/" + } + }, + "executable": { + "path": "/home/wd15/.virtualenvs/default/bin/python", + "version": "2.7.3", + "name": "Python", + "options": "" + }, + "parameters": { + "content": "totalSteps = 2", + "type": "SimpleParameterSet" + }, + "label": "799ff9b72b5d", + "version": "5b38357396de292925e8ac847e9c616109baa887", + "stdout_stderr": "[ 1. 1. 1. 1.]\n[ 0.34738209 0.61535499 0.01923836 0.00971058]\n[ 1.23729704e-01 2.14204081e-01 1.88311438e-04 1.55991524e-03]\n\ntheta 0.0\ncBar_supp 1.0\ncBar_cu 1.0\npotentialBar 1.0\nmin(extension) 7.22965473284e-08\nmin(depositionRate) 2.09114908795e-09\nmin(current) 56.8350759862\nmin(cupric) 997.266139623\nmin(baseCurrent) 56.9323002935\nmax(interfaceTheta) - 1: -0.973021297371\nmin(interfaceTheta) 0.0\nmin(I0) 38.9208518948\ndt 0.011\nelapsed time 0.0\nstep 0\n\n[ 1. 1. 1. 1.]\n[ 0.10765512 0.04576554 0.03330295 0.00523947]\n\ntheta 0.0\ncBar_supp 1.0\ncBar_cu 1.0\npotentialBar 1.0\nmin(extension) 2.09114554699e-09\nmin(depositionRate) 1.47837489306e-09\nmin(current) 40.1805638188\nmin(cupric) 996.200886814\nmin(baseCurrent) 40.2838895551\nmax(interfaceTheta) - 1: -0.947107282423\nmin(interfaceTheta) 0.0\nmin(I0) 37.8842912969\ndt 0.0121\nelapsed time 0.011\nstep 1\n\n", + "repository": { + "url": "/home/wd15/git/extremefill-data", + "type": "GitRepository", + "upstream": "git@github.com:wd15/extremefill-data.git" + }, + "tags": [ + "test" + ], + "timestamp": "2013-02-18 17:58:19", + "reason": "testing SMT class", + "dependencies": [ + { + "name": "Cython", + "module": "python", + "source": "attribute", + "version": "0.16", + "diff": "", + "path": "/usr/lib/python2.7/dist-packages/Cython" + }, + { + "name": "IPython", + "module": "python", + "source": "attribute", + "version": "0.13.1.rc2", + "diff": "", + "path": "/usr/lib/python2.7/dist-packages/IPython" + }, + { + "name": "PIL", + "module": "python", + "source": null, + "version": "unknown", + "diff": "", + "path": "/usr/lib/python2.7/dist-packages/PIL" + }, + { + "name": "PyQt4", + "module": "python", + "source": null, + "version": "unknown", + "diff": "", + "path": "/usr/lib/python2.7/dist-packages/PyQt4" + }, + { + "name": "PyTrilinos", + "module": "python", + "source": "attribute", + "version": "4.8d", + "diff": "", + "path": "/home/wd15/.virtualenvs/fipy/lib/python2.7/site-packages/PyTrilinos" + }, + { + "name": "dateutil", + "module": "python", + "source": "attribute", + "version": "1.5", + "diff": "", + "path": "/usr/lib/python2.7/dist-packages/dateutil" + }, + { + "name": "distutils", + "module": "python", + "source": "attribute", + "version": "2.7.3", + "diff": "", + "path": "/home/wd15/.virtualenvs/default/lib/python2.7/distutils" + }, + { + "name": "django", + "module": "python", + "source": "attribute", + "version": "1.4.1", + "diff": "", + "path": "/usr/lib/python2.7/dist-packages/django" + }, + { + "name": "docutils", + "module": "python", + "source": "attribute", + "version": "0.10", + "diff": "", + "path": "/home/wd15/.virtualenvs/fipy/lib/python2.7/site-packages/docutils" + }, + { + "name": "encodings", + "module": "python", + "source": null, + "version": "unknown", + "diff": "", + "path": "/home/wd15/.virtualenvs/default/lib/python2.7/encodings" + }, + { + "name": "extremefill", + "module": "python", + "source": "/home/wd15/git/extremefill", + "version": "549c969edb113d0b3e9804612bfa53e91319c0ea", + "diff": "diff --git a/data/viewer.py b/data/viewer.py\nindex 68f60e0..d9ab7c2 100644\n--- a/data/viewer.py\n+++ b/data/viewer.py\n@@ -122,7 +122,7 @@ class ContourViewer(BaseViewer):\n self.times = times\n self.contours = contours\n self.data = []\n- super(ContourViewer, self).__init__(branches=branches, datafile=datafiles, datafiles=datafiles)\n+ super(ContourViewer, self).__init__(branches=branches, datafile=datafile, datafiles=datafiles)\n \n def plot(self):\n import matplotlib.pyplot as plt\n@@ -152,6 +152,24 @@ class ContourViewer(BaseViewer):\n phi = np.reshape(phi, shape)\n self.data.append((x, y, phi))\n \n+def datafilesFromBranches(branches, datafile):\n+ cwd = os.getcwd()\n+ for count, branch in enumerate(branches):\n+ print 'branch',branch\n+ tempdir = gitCloneToTemp(branch=branch, repositoryPath='ssh://wd15@genie.nist.gov/users/wd15/git/extremefill')\n+ repopath = os.path.join(tempdir, 'extremefill')\n+ datapath = os.path.join(repopath, datafile)\n+ gitMediaSync()\n+ if count == 0:\n+ self.addBaseData(datapath)\n+ basetempdir = tempdir\n+ else:\n+ self.addData(datapath, branch)\n+ cleanTempRepo(tempdir) \n+\n+ cleanTempRepo(basetempdir)\n+ os.chdir(cwd)\n+\n def plotNx():\n branches = ('Nx600', 'Nx300', 'Nx150')\n datafile = os.path.join('data', 'data.h5')\n@@ -174,13 +192,13 @@ def plotCFL():\n \n def plotContour():\n # branches = ('CFL0.0125', 'CFL0.025', 'CFL0.05', 'CFL0.1', 'CFL0.2', 'CFL0.4', 'CFL0.8', 'CFL1.6')\n- branches = ('Nx600', 'Nx150')\n+ branches = ('Nx300', 'Nx150')\n # branches = ('CFL0.025', 'CFL0.05')\n datafile = os.path.join('data', 'data.h5')\n times = (0,)\n- # times = (0., 1000., 2000., 3000., 4000.)\n- # viewer = ContourViewer(times=times, branches=branches, datafile=datafile)\n- viewer = ContourViewer(times=times, branches=branches, datafile=datafile, datafiles=('data150.h5', 'data600.h5'))\n+ times = (0., 1000., 2000., 3000., 4000.)\n+ viewer = ContourViewer(times=times, branches=branches, datafile=datafile)\n+ #viewer = ContourViewer(times=times, branches=branches, datafile=datafile, datafiles=('data150.h5', 'data600.h5'))\n viewer.plot()\n \n if __name__ == '__main__':\n@@ -188,6 +206,6 @@ if __name__ == '__main__':\n # from profiler import calibrate_profiler\n # fudge = calibrate_profiler(10000)\n # profile = Profiler('profile', fudge=fudge)\n- plotCFL()\n+ plotContour()\n # profile.stop()\n ", + "path": "/home/wd15/git/extremefill/extremefill" + }, + { + "name": "fipy", + "module": "python", + "source": "/home/wd15/git/fipy", + "version": "8c51478a3e8c30618b3a96c132612a46735c7548", + "diff": "", + "path": "/home/wd15/git/fipy/fipy" + }, + { + "name": "gi", + "module": "python", + "source": "attribute", + "version": "3.4.0", + "diff": "", + "path": "/usr/lib/python2.7/dist-packages/gi" + }, + { + "name": "glib", + "module": "python", + "source": null, + "version": "unknown", + "diff": "", + "path": "/usr/lib/python2.7/dist-packages/glib" + }, + { + "name": "gobject", + "module": "python", + "source": null, + "version": "unknown", + "diff": "", + "path": "/usr/lib/python2.7/dist-packages/gobject" + }, + { + "name": "google", + "module": "python", + "source": null, + "version": "unknown", + "diff": "", + "path": "/usr/lib/python2.7/dist-packages/google" + }, + { + "name": "gtk", + "module": "python", + "source": null, + "version": "unknown", + "diff": "", + "path": "/usr/lib/python2.7/dist-packages/gtk-2.0/gtk" + }, + { + "name": "httplib2", + "module": "python", + "source": "attribute", + "version": "0.7.4", + "diff": "", + "path": "/usr/lib/python2.7/dist-packages/httplib2" + }, + { + "name": "lockfile", + "module": "python", + "source": "egg-info", + "version": "0.9.1", + "diff": "", + "path": "/home/wd15/.virtualenvs/default/lib/python2.7/site-packages/lockfile-0.9.1-py2.7.egg/lockfile" + }, + { + "name": "lxml", + "module": "python", + "source": null, + "version": "unknown", + "diff": "", + "path": "/usr/lib/python2.7/dist-packages/lxml" + }, + { + "name": "matplotlib", + "module": "python", + "source": "attribute", + "version": "1.1.1", + "diff": "", + "path": "/usr/lib/pymodules/python2.7/matplotlib" + }, + { + "name": "mayavi", + "module": "python", + "source": "attribute", + "version": "4.1.0", + "diff": "", + "path": "/usr/lib/python2.7/dist-packages/mayavi" + }, + { + "name": "mpi4py", + "module": "python", + "source": "attribute", + "version": "1.3", + "diff": "", + "path": "/usr/lib/python2.7/dist-packages/mpi4py" + }, + { + "name": "mpl_toolkits", + "module": "python", + "source": null, + "version": "unknown", + "diff": "", + "path": "/usr/lib/pymodules/python2.7/mpl_toolkits" + }, + { + "name": "mx", + "module": "python", + "source": "attribute", + "version": "3.2.1", + "diff": "", + "path": "/usr/lib/python2.7/dist-packages/mx" + }, + { + "name": "nose", + "module": "python", + "source": "attribute", + "version": "1.2.1", + "diff": "", + "path": "/home/wd15/.virtualenvs/fipy/lib/python2.7/site-packages/nose" + }, + { + "name": "numexpr", + "module": "python", + "source": "attribute", + "version": "2.0.1", + "diff": "", + "path": "/usr/lib/python2.7/dist-packages/numexpr" + }, + { + "name": "numpy", + "module": "python", + "source": "attribute", + "version": "1.6.2", + "diff": "", + "path": "/usr/lib/python2.7/dist-packages/numpy" + }, + { + "name": "pyamg", + "module": "python", + "source": "attribute", + "version": "2.0.4.dev", + "diff": "", + "path": "/home/wd15/.virtualenvs/fipy/lib/python2.7/site-packages/pyamg" + }, + { + "name": "pylsmlib", + "module": "python", + "source": "/home/wd15/git/LSMLIB", + "version": "6f5d969bb27530aa37452a8b096e538a5cf7b993", + "diff": "", + "path": "/home/wd15/git/LSMLIB/pylsmlib/pylsmlib" + }, + { + "name": "pysparse", + "module": "python", + "source": "attribute", + "version": "1.1", + "diff": "", + "path": "/usr/lib/python2.7/dist-packages/pysparse" + }, + { + "name": "pytz", + "module": "python", + "source": "attribute", + "version": "2011k", + "diff": "", + "path": "/usr/lib/python2.7/dist-packages/pytz" + }, + { + "name": "scipy", + "module": "python", + "source": "attribute", + "version": "0.10.1", + "diff": "", + "path": "/usr/lib/python2.7/dist-packages/scipy" + }, + { + "name": "setuptools", + "module": "python", + "source": "attribute", + "version": "0.6", + "diff": "", + "path": "/home/wd15/.virtualenvs/default/local/lib/python2.7/site-packages/distribute-0.6.24-py2.7.egg/setuptools" + }, + { + "name": "simplejson", + "module": "python", + "source": "attribute", + "version": "2.6.1", + "diff": "", + "path": "/usr/lib/python2.7/dist-packages/simplejson" + }, + { + "name": "skfmm", + "module": "python", + "source": "/home/wd15/git/scikit-fmm", + "version": "467e5982fbd9d4eb32495f826d6bda65da498e13", + "diff": "", + "path": "/home/wd15/git/scikit-fmm/skfmm" + }, + { + "name": "sumatra", + "module": "python", + "source": "attribute", + "version": "0.5.0dev", + "diff": "", + "path": "/home/wd15/.virtualenvs/default/lib/python2.7/site-packages/Sumatra-0.5.0dev-py2.7.egg/sumatra" + }, + { + "name": "tables", + "module": "python", + "source": "attribute", + "version": "2.3.1", + "diff": "", + "path": "/usr/lib/python2.7/dist-packages/tables" + }, + { + "name": "tagging", + "module": "python", + "source": "attribute", + "version": "0.3.1", + "diff": "", + "path": "/home/wd15/.virtualenvs/fipy/lib/python2.7/site-packages/tagging" + }, + { + "name": "tornado", + "module": "python", + "source": "attribute", + "version": "2.3", + "diff": "", + "path": "/usr/lib/python2.7/dist-packages/tornado" + }, + { + "name": "traits", + "module": "python", + "source": "attribute", + "version": "4.1.0", + "diff": "", + "path": "/usr/lib/python2.7/dist-packages/traits" + }, + { + "name": "tvtk", + "module": "python", + "source": null, + "version": "unknown", + "diff": "", + "path": "/usr/lib/python2.7/dist-packages/tvtk" + }, + { + "name": "vtk", + "module": "python", + "source": null, + "version": "unknown", + "diff": "", + "path": "/usr/lib/pymodules/python2.7/vtk" + }, + { + "name": "wx", + "module": "python", + "source": "attribute", + "version": "2.8.12.1", + "diff": "", + "path": "/usr/lib/python2.7/dist-packages/wx-2.8-gtk2-unicode/wx" + }, + { + "name": "yaml", + "module": "python", + "source": "attribute", + "version": "3.10", + "diff": "", + "path": "/usr/lib/python2.7/dist-packages/yaml" + }, + { + "name": "zmq", + "module": "python", + "source": "attribute", + "version": "2.2.0", + "diff": "", + "path": "/usr/lib/python2.7/dist-packages/zmq" + } + ], + "user": "Daniel Wheeler ", + "output_data": [ + { + "path": "data.h5", + "digest": "516803eb56b2b1254b9186758b7b03ae38d19141", + "metadata": { + "mimetype": null, + "size": 102992, + "encoding": null + } + } + ], + "input_data": [], + "launch_mode": { + "type": "SerialLaunchMode", + "parameters": { + "working_directory": "/home/wd15/git/extremefill-data" + } + }, + "main_file": "script.py", + "outcome": "" +}, +{ + "script_arguments": "", + "platforms": [ + { + "system_name": "Linux", + "machine": "x86_64", + "version": "#35-Ubuntu SMP Thu Jan 24 13:15:40 UTC 2013", + "ip_addr": "127.0.0.1", + "architecture_bits": "64bit", + "architecture_linkage": "ELF", + "release": "3.5.0-23-generic", + "network_name": "loki", + "processor": "x86_64" + } + ], + "duration": 16.083943128585815, + "diff": "diff --git a/script.py b/script.py\nindex cdf82e9..d111049 100644\n--- a/script.py\n+++ b/script.py\n@@ -1,4 +1,5 @@\n import os\n+import argparse\n \n \n import tables\n@@ -29,5 +30,16 @@ def run(totalSteps=10,\n NxBase=1200)\n \n if __name__ == '__main__':\n- run(totalSteps=1, tags=('test',), reason=\"testing SMT class\")\n+\n+\n+ class Bare(object):\n+ pass\n+\n+ \n+ args = Bare()\n+ parser = argparse.ArgumentParser(description=\"Run Extremefill 2D example.\")\n+ parser.add_argument('totalSteps', default=1, type=int)\n+ parser.parse_args(namespace=args)\n+\n+ run(totalSteps=args.totalSteps, tags=('test',), reason=\"testing SMT class\")\n \ndiff --git a/smtdecorator.py b/smtdecorator.py\nindex 22cef26..432a8b7 100644\n--- a/smtdecorator.py\n+++ b/smtdecorator.py\n@@ -72,7 +72,7 @@ class SMTDecorator(object):\n record.start_time = time.time()\n \n with Redirect() as out:\n- returnvalue = self.function(datadir=record.datastoreroot, *args, **record.parameters.as_dict())\n+ returnvalue = self.function(datadir=record.datastore.root, *args, **record.parameters.as_dict())\n \n record.duration = time.time() - record.start_time\n record.stdout_stderr = out.getvalue()", + "datastore": { + "type": "FileSystemDataStore", + "parameters": { + "root": "./Data/aee969c13e71" + } + }, + "input_datastore": { + "type": "FileSystemDataStore", + "parameters": { + "root": "/" + } + }, + "executable": { + "path": "/home/wd15/.virtualenvs/default/bin/python", + "version": "2.7.3", + "name": "Python", + "options": "" + }, + "parameters": { + "content": "totalSteps = 5", + "type": "SimpleParameterSet" + }, + "label": "aee969c13e71", + "version": "879a77999c431385fb12fd40c50ae7132bfddd0a", + "stdout_stderr": "[ 1. 1. 1. 1.]\n[ 0.34738209 0.61535499 0.01923836 0.00971058]\n[ 1.23729704e-01 2.14204081e-01 1.88311438e-04 1.55991524e-03]\n\ntheta 0.0\ncBar_supp 1.0\ncBar_cu 1.0\npotentialBar 1.0\nmin(extension) 7.22965473284e-08\nmin(depositionRate) 2.09114908795e-09\nmin(current) 56.8350759862\nmin(cupric) 997.266139623\nmin(baseCurrent) 56.9323002935\nmax(interfaceTheta) - 1: -0.973021297371\nmin(interfaceTheta) 0.0\nmin(I0) 38.9208518948\ndt 0.011\nelapsed time 0.0\nstep 0\n\n[ 1. 1. 1. 1.]\n[ 0.10765512 0.04576554 0.03330295 0.00523947]\n\ntheta 0.0\ncBar_supp 1.0\ncBar_cu 1.0\npotentialBar 1.0\nmin(extension) 2.09114554699e-09\nmin(depositionRate) 1.47837489306e-09\nmin(current) 40.1805638188\nmin(cupric) 996.200886814\nmin(baseCurrent) 40.2838895551\nmax(interfaceTheta) - 1: -0.947107282423\nmin(interfaceTheta) 0.0\nmin(I0) 37.8842912969\ndt 0.0121\nelapsed time 0.011\nstep 1\n\n[ 1. 1. 1. 1.]\n[ 3.45872899 0.00767994 0.04328443 0.00526515]\n\ntheta 0.0\ncBar_supp 1.0\ncBar_cu 1.0\npotentialBar 1.0\nmin(extension) 1.47835191842e-09\nmin(depositionRate) 1.46663996872e-09\nmin(current) 39.8616217978\nmin(cupric) 995.148480462\nmin(baseCurrent) 39.9926693524\nmax(interfaceTheta) - 1: -0.92148263086\nmin(interfaceTheta) 0.0\nmin(I0) 36.8593052344\ndt 0.01331\nelapsed time 0.0231\nstep 2\n\n[ 1. 1. 1. 1.]\n[ 8.88172168e+01 8.75504210e-03 5.01742754e-02 5.39551911e-03]\n[ 8.96400062e-01 2.22717014e-04 2.71862484e-04 2.90776586e-05]\n\ntheta 0.0\ncBar_supp 1.0\ncBar_cu 1.0\npotentialBar 1.0\nmin(extension) 1.46657584035e-09\nmin(depositionRate) 1.46404704728e-09\nmin(current) 39.7911491146\nmin(cupric) 994.084658919\nmin(baseCurrent) 39.9384404059\nmax(interfaceTheta) - 1: -0.895749878737\nmin(interfaceTheta) 0.0\nmin(I0) 35.8299951495\ndt 0.014641\nelapsed time 0.03641\nstep 3\n\n[ 1. 1. 1. 1.]\n[ 6.58855298e+01 9.88225224e-03 5.50740145e-02 5.60514798e-03]\n[ 6.71844438e-01 2.23945268e-04 3.10661420e-04 3.13582485e-05]\n\ntheta 0.0\ncBar_supp 1.0\ncBar_cu 1.0\npotentialBar 1.0\nmin(extension) 1.4639671787e-09\nmin(depositionRate) 1.4609435473e-09\nmin(current) 39.7067994821\nmin(cupric) 992.985196573\nmin(baseCurrent) 39.8816197139\nmax(interfaceTheta) - 1: -0.869674427336\nmin(interfaceTheta) 0.0\nmin(I0) 34.7869770934\ndt 0.0161051\nelapsed time 0.051051\nstep 4\n\n", + "repository": { + "url": "/home/wd15/git/extremefill-data", + "type": "GitRepository", + "upstream": "git@github.com:wd15/extremefill-data.git" + }, + "tags": [ + "test" + ], + "timestamp": "2013-02-18 17:48:55", + "reason": "testing SMT class", + "dependencies": [ + { + "name": "Cython", + "module": "python", + "source": "attribute", + "version": "0.16", + "diff": "", + "path": "/usr/lib/python2.7/dist-packages/Cython" + }, + { + "name": "IPython", + "module": "python", + "source": "attribute", + "version": "0.13.1.rc2", + "diff": "", + "path": "/usr/lib/python2.7/dist-packages/IPython" + }, + { + "name": "PIL", + "module": "python", + "source": null, + "version": "unknown", + "diff": "", + "path": "/usr/lib/python2.7/dist-packages/PIL" + }, + { + "name": "PyQt4", + "module": "python", + "source": null, + "version": "unknown", + "diff": "", + "path": "/usr/lib/python2.7/dist-packages/PyQt4" + }, + { + "name": "PyTrilinos", + "module": "python", + "source": "attribute", + "version": "4.8d", + "diff": "", + "path": "/home/wd15/.virtualenvs/fipy/lib/python2.7/site-packages/PyTrilinos" + }, + { + "name": "dateutil", + "module": "python", + "source": "attribute", + "version": "1.5", + "diff": "", + "path": "/usr/lib/python2.7/dist-packages/dateutil" + }, + { + "name": "distutils", + "module": "python", + "source": "attribute", + "version": "2.7.3", + "diff": "", + "path": "/home/wd15/.virtualenvs/default/lib/python2.7/distutils" + }, + { + "name": "django", + "module": "python", + "source": "attribute", + "version": "1.4.1", + "diff": "", + "path": "/usr/lib/python2.7/dist-packages/django" + }, + { + "name": "docutils", + "module": "python", + "source": "attribute", + "version": "0.10", + "diff": "", + "path": "/home/wd15/.virtualenvs/fipy/lib/python2.7/site-packages/docutils" + }, + { + "name": "encodings", + "module": "python", + "source": null, + "version": "unknown", + "diff": "", + "path": "/home/wd15/.virtualenvs/default/lib/python2.7/encodings" + }, + { + "name": "extremefill", + "module": "python", + "source": "/home/wd15/git/extremefill", + "version": "549c969edb113d0b3e9804612bfa53e91319c0ea", + "diff": "diff --git a/data/viewer.py b/data/viewer.py\nindex 68f60e0..d9ab7c2 100644\n--- a/data/viewer.py\n+++ b/data/viewer.py\n@@ -122,7 +122,7 @@ class ContourViewer(BaseViewer):\n self.times = times\n self.contours = contours\n self.data = []\n- super(ContourViewer, self).__init__(branches=branches, datafile=datafiles, datafiles=datafiles)\n+ super(ContourViewer, self).__init__(branches=branches, datafile=datafile, datafiles=datafiles)\n \n def plot(self):\n import matplotlib.pyplot as plt\n@@ -152,6 +152,24 @@ class ContourViewer(BaseViewer):\n phi = np.reshape(phi, shape)\n self.data.append((x, y, phi))\n \n+def datafilesFromBranches(branches, datafile):\n+ cwd = os.getcwd()\n+ for count, branch in enumerate(branches):\n+ print 'branch',branch\n+ tempdir = gitCloneToTemp(branch=branch, repositoryPath='ssh://wd15@genie.nist.gov/users/wd15/git/extremefill')\n+ repopath = os.path.join(tempdir, 'extremefill')\n+ datapath = os.path.join(repopath, datafile)\n+ gitMediaSync()\n+ if count == 0:\n+ self.addBaseData(datapath)\n+ basetempdir = tempdir\n+ else:\n+ self.addData(datapath, branch)\n+ cleanTempRepo(tempdir) \n+\n+ cleanTempRepo(basetempdir)\n+ os.chdir(cwd)\n+\n def plotNx():\n branches = ('Nx600', 'Nx300', 'Nx150')\n datafile = os.path.join('data', 'data.h5')\n@@ -174,13 +192,13 @@ def plotCFL():\n \n def plotContour():\n # branches = ('CFL0.0125', 'CFL0.025', 'CFL0.05', 'CFL0.1', 'CFL0.2', 'CFL0.4', 'CFL0.8', 'CFL1.6')\n- branches = ('Nx600', 'Nx150')\n+ branches = ('Nx300', 'Nx150')\n # branches = ('CFL0.025', 'CFL0.05')\n datafile = os.path.join('data', 'data.h5')\n times = (0,)\n- # times = (0., 1000., 2000., 3000., 4000.)\n- # viewer = ContourViewer(times=times, branches=branches, datafile=datafile)\n- viewer = ContourViewer(times=times, branches=branches, datafile=datafile, datafiles=('data150.h5', 'data600.h5'))\n+ times = (0., 1000., 2000., 3000., 4000.)\n+ viewer = ContourViewer(times=times, branches=branches, datafile=datafile)\n+ #viewer = ContourViewer(times=times, branches=branches, datafile=datafile, datafiles=('data150.h5', 'data600.h5'))\n viewer.plot()\n \n if __name__ == '__main__':\n@@ -188,6 +206,6 @@ if __name__ == '__main__':\n # from profiler import calibrate_profiler\n # fudge = calibrate_profiler(10000)\n # profile = Profiler('profile', fudge=fudge)\n- plotCFL()\n+ plotContour()\n # profile.stop()\n ", + "path": "/home/wd15/git/extremefill/extremefill" + }, + { + "name": "fipy", + "module": "python", + "source": "/home/wd15/git/fipy", + "version": "8c51478a3e8c30618b3a96c132612a46735c7548", + "diff": "", + "path": "/home/wd15/git/fipy/fipy" + }, + { + "name": "gi", + "module": "python", + "source": "attribute", + "version": "3.4.0", + "diff": "", + "path": "/usr/lib/python2.7/dist-packages/gi" + }, + { + "name": "glib", + "module": "python", + "source": null, + "version": "unknown", + "diff": "", + "path": "/usr/lib/python2.7/dist-packages/glib" + }, + { + "name": "gobject", + "module": "python", + "source": null, + "version": "unknown", + "diff": "", + "path": "/usr/lib/python2.7/dist-packages/gobject" + }, + { + "name": "google", + "module": "python", + "source": null, + "version": "unknown", + "diff": "", + "path": "/usr/lib/python2.7/dist-packages/google" + }, + { + "name": "gtk", + "module": "python", + "source": null, + "version": "unknown", + "diff": "", + "path": "/usr/lib/python2.7/dist-packages/gtk-2.0/gtk" + }, + { + "name": "httplib2", + "module": "python", + "source": "attribute", + "version": "0.7.4", + "diff": "", + "path": "/usr/lib/python2.7/dist-packages/httplib2" + }, + { + "name": "lockfile", + "module": "python", + "source": "egg-info", + "version": "0.9.1", + "diff": "", + "path": "/home/wd15/.virtualenvs/default/lib/python2.7/site-packages/lockfile-0.9.1-py2.7.egg/lockfile" + }, + { + "name": "lxml", + "module": "python", + "source": null, + "version": "unknown", + "diff": "", + "path": "/usr/lib/python2.7/dist-packages/lxml" + }, + { + "name": "matplotlib", + "module": "python", + "source": "attribute", + "version": "1.1.1", + "diff": "", + "path": "/usr/lib/pymodules/python2.7/matplotlib" + }, + { + "name": "mayavi", + "module": "python", + "source": "attribute", + "version": "4.1.0", + "diff": "", + "path": "/usr/lib/python2.7/dist-packages/mayavi" + }, + { + "name": "mpi4py", + "module": "python", + "source": "attribute", + "version": "1.3", + "diff": "", + "path": "/usr/lib/python2.7/dist-packages/mpi4py" + }, + { + "name": "mpl_toolkits", + "module": "python", + "source": null, + "version": "unknown", + "diff": "", + "path": "/usr/lib/pymodules/python2.7/mpl_toolkits" + }, + { + "name": "mx", + "module": "python", + "source": "attribute", + "version": "3.2.1", + "diff": "", + "path": "/usr/lib/python2.7/dist-packages/mx" + }, + { + "name": "nose", + "module": "python", + "source": "attribute", + "version": "1.2.1", + "diff": "", + "path": "/home/wd15/.virtualenvs/fipy/lib/python2.7/site-packages/nose" + }, + { + "name": "numexpr", + "module": "python", + "source": "attribute", + "version": "2.0.1", + "diff": "", + "path": "/usr/lib/python2.7/dist-packages/numexpr" + }, + { + "name": "numpy", + "module": "python", + "source": "attribute", + "version": "1.6.2", + "diff": "", + "path": "/usr/lib/python2.7/dist-packages/numpy" + }, + { + "name": "pyamg", + "module": "python", + "source": "attribute", + "version": "2.0.4.dev", + "diff": "", + "path": "/home/wd15/.virtualenvs/fipy/lib/python2.7/site-packages/pyamg" + }, + { + "name": "pylsmlib", + "module": "python", + "source": "/home/wd15/git/LSMLIB", + "version": "6f5d969bb27530aa37452a8b096e538a5cf7b993", + "diff": "", + "path": "/home/wd15/git/LSMLIB/pylsmlib/pylsmlib" + }, + { + "name": "pysparse", + "module": "python", + "source": "attribute", + "version": "1.1", + "diff": "", + "path": "/usr/lib/python2.7/dist-packages/pysparse" + }, + { + "name": "pytz", + "module": "python", + "source": "attribute", + "version": "2011k", + "diff": "", + "path": "/usr/lib/python2.7/dist-packages/pytz" + }, + { + "name": "scipy", + "module": "python", + "source": "attribute", + "version": "0.10.1", + "diff": "", + "path": "/usr/lib/python2.7/dist-packages/scipy" + }, + { + "name": "setuptools", + "module": "python", + "source": "attribute", + "version": "0.6", + "diff": "", + "path": "/home/wd15/.virtualenvs/default/local/lib/python2.7/site-packages/distribute-0.6.24-py2.7.egg/setuptools" + }, + { + "name": "simplejson", + "module": "python", + "source": "attribute", + "version": "2.6.1", + "diff": "", + "path": "/usr/lib/python2.7/dist-packages/simplejson" + }, + { + "name": "skfmm", + "module": "python", + "source": "/home/wd15/git/scikit-fmm", + "version": "467e5982fbd9d4eb32495f826d6bda65da498e13", + "diff": "", + "path": "/home/wd15/git/scikit-fmm/skfmm" + }, + { + "name": "sumatra", + "module": "python", + "source": "attribute", + "version": "0.5.0dev", + "diff": "", + "path": "/home/wd15/.virtualenvs/default/lib/python2.7/site-packages/Sumatra-0.5.0dev-py2.7.egg/sumatra" + }, + { + "name": "tables", + "module": "python", + "source": "attribute", + "version": "2.3.1", + "diff": "", + "path": "/usr/lib/python2.7/dist-packages/tables" + }, + { + "name": "tagging", + "module": "python", + "source": "attribute", + "version": "0.3.1", + "diff": "", + "path": "/home/wd15/.virtualenvs/fipy/lib/python2.7/site-packages/tagging" + }, + { + "name": "tornado", + "module": "python", + "source": "attribute", + "version": "2.3", + "diff": "", + "path": "/usr/lib/python2.7/dist-packages/tornado" + }, + { + "name": "traits", + "module": "python", + "source": "attribute", + "version": "4.1.0", + "diff": "", + "path": "/usr/lib/python2.7/dist-packages/traits" + }, + { + "name": "tvtk", + "module": "python", + "source": null, + "version": "unknown", + "diff": "", + "path": "/usr/lib/python2.7/dist-packages/tvtk" + }, + { + "name": "vtk", + "module": "python", + "source": null, + "version": "unknown", + "diff": "", + "path": "/usr/lib/pymodules/python2.7/vtk" + }, + { + "name": "wx", + "module": "python", + "source": "attribute", + "version": "2.8.12.1", + "diff": "", + "path": "/usr/lib/python2.7/dist-packages/wx-2.8-gtk2-unicode/wx" + }, + { + "name": "yaml", + "module": "python", + "source": "attribute", + "version": "3.10", + "diff": "", + "path": "/usr/lib/python2.7/dist-packages/yaml" + }, + { + "name": "zmq", + "module": "python", + "source": "attribute", + "version": "2.2.0", + "diff": "", + "path": "/usr/lib/python2.7/dist-packages/zmq" + } + ], + "user": "Daniel Wheeler ", + "output_data": [ + { + "path": "data.h5", + "digest": "003f004dc84adfca170d96c9a06c6b202646c0d7", + "metadata": { + "mimetype": null, + "size": 102992, + "encoding": null + } + } + ], + "input_data": [], + "launch_mode": { + "type": "SerialLaunchMode", + "parameters": { + "working_directory": "/home/wd15/git/extremefill-data" + } + }, + "main_file": "script.py", + "outcome": "" +}, +{ + "script_arguments": "", + "platforms": [ + { + "system_name": "Linux", + "machine": "x86_64", + "version": "#35-Ubuntu SMP Thu Jan 24 13:15:40 UTC 2013", + "ip_addr": "127.0.0.1", + "architecture_bits": "64bit", + "architecture_linkage": "ELF", + "release": "3.5.0-23-generic", + "network_name": "loki", + "processor": "x86_64" + } + ], + "duration": 2.4379470348358154, + "diff": "diff --git a/script.py b/script.py\nindex 6a31b7e..8ae29b7 100644\n--- a/script.py\n+++ b/script.py\n@@ -32,4 +32,4 @@ def run(totalSteps=10,\n if __name__ == '__main__':\n # run(totalSteps=1, tags=('test',), reason=\"testing SMT class\")\n with SMTContextManager(tags=('test',), reason=\"testing SMT class\") as smtcontext:\n- run(totalsteps=1)\n+ run(totalSteps=1)\ndiff --git a/smtdecorator.py b/smtdecorator.py\nindex e567d68..4d5014c 100644\n--- a/smtdecorator.py\n+++ b/smtdecorator.py\n@@ -93,7 +93,7 @@ class SMTContextManager(object):\n def __enter__(self):\n self.project = load_project()\n self.record = self.project.new_record(parameters=SimpleParameterSet({}),\n- main_file=__file__,\n+ main_file='script.py',\n reason=self.reason)\n \n self.record.datastore.root = os.path.join(self.record.datastore.root, self.record.label)\n@@ -106,7 +106,7 @@ class SMTContextManager(object):\n self.redirect.__enter__()\n \n def __exit__(self, type, value, tb):\n- self.redirect.__exit__()\n+ self.redirect.__exit__(type, value, tb)\n \n self.record.duration = time.time() - self.record.start_time\n self.record.stdout_stderr = self.redirect.target.getvalue()", + "datastore": { + "type": "FileSystemDataStore", + "parameters": { + "root": "./Data/1d6cf0770b75" + } + }, + "input_datastore": { + "type": "FileSystemDataStore", + "parameters": { + "root": "/" + } + }, + "executable": { + "path": "/home/wd15/.virtualenvs/default/bin/python", + "version": "2.7.3", + "name": "Python", + "options": "" + }, + "parameters": { + "content": "", + "type": "SimpleParameterSet" + }, + "label": "1d6cf0770b75", + "version": "540556f10db2f84778881583dfe7b6bc7ef31e5f", + "stdout_stderr": "[ 1. 1. 1. 1.]\n[ 0.34738209 0.61535499 0.01923836 0.00971058]\n[ 1.23729704e-01 2.14204081e-01 1.88311438e-04 1.55991524e-03]\n\ntheta 0.0\ncBar_supp 1.0\ncBar_cu 1.0\npotentialBar 1.0\nmin(extension) 7.22965473284e-08\nmin(depositionRate) 2.09114908795e-09\nmin(current) 56.8350759862\nmin(cupric) 997.266139623\nmin(baseCurrent) 56.9323002935\nmax(interfaceTheta) - 1: -0.973021297371\nmin(interfaceTheta) 0.0\nmin(I0) 38.9208518948\ndt 0.011\nelapsed time 0.0\nstep 0\n\n", + "repository": { + "url": "/home/wd15/git/extremefill-data", + "type": "GitRepository", + "upstream": "git@github.com:wd15/extremefill-data.git" + }, + "tags": [ + "test" + ], + "timestamp": "2013-02-17 23:41:35", + "reason": "testing SMT class", + "dependencies": [ + { + "name": "Cython", + "module": "python", + "source": "attribute", + "version": "0.16", + "diff": "", + "path": "/usr/lib/python2.7/dist-packages/Cython" + }, + { + "name": "IPython", + "module": "python", + "source": "attribute", + "version": "0.13.1.rc2", + "diff": "", + "path": "/usr/lib/python2.7/dist-packages/IPython" + }, + { + "name": "PIL", + "module": "python", + "source": null, + "version": "unknown", + "diff": "", + "path": "/usr/lib/python2.7/dist-packages/PIL" + }, + { + "name": "PyQt4", + "module": "python", + "source": null, + "version": "unknown", + "diff": "", + "path": "/usr/lib/python2.7/dist-packages/PyQt4" + }, + { + "name": "PyTrilinos", + "module": "python", + "source": "attribute", + "version": "4.8d", + "diff": "", + "path": "/home/wd15/.virtualenvs/fipy/lib/python2.7/site-packages/PyTrilinos" + }, + { + "name": "dateutil", + "module": "python", + "source": "attribute", + "version": "1.5", + "diff": "", + "path": "/usr/lib/python2.7/dist-packages/dateutil" + }, + { + "name": "distutils", + "module": "python", + "source": "attribute", + "version": "2.7.3", + "diff": "", + "path": "/home/wd15/.virtualenvs/default/lib/python2.7/distutils" + }, + { + "name": "django", + "module": "python", + "source": "attribute", + "version": "1.4.1", + "diff": "", + "path": "/usr/lib/python2.7/dist-packages/django" + }, + { + "name": "docutils", + "module": "python", + "source": "attribute", + "version": "0.10", + "diff": "", + "path": "/home/wd15/.virtualenvs/fipy/lib/python2.7/site-packages/docutils" + }, + { + "name": "encodings", + "module": "python", + "source": null, + "version": "unknown", + "diff": "", + "path": "/home/wd15/.virtualenvs/default/lib/python2.7/encodings" + }, + { + "name": "extremefill", + "module": "python", + "source": "/home/wd15/git/extremefill", + "version": "549c969edb113d0b3e9804612bfa53e91319c0ea", + "diff": "diff --git a/data/viewer.py b/data/viewer.py\nindex 68f60e0..d9ab7c2 100644\n--- a/data/viewer.py\n+++ b/data/viewer.py\n@@ -122,7 +122,7 @@ class ContourViewer(BaseViewer):\n self.times = times\n self.contours = contours\n self.data = []\n- super(ContourViewer, self).__init__(branches=branches, datafile=datafiles, datafiles=datafiles)\n+ super(ContourViewer, self).__init__(branches=branches, datafile=datafile, datafiles=datafiles)\n \n def plot(self):\n import matplotlib.pyplot as plt\n@@ -152,6 +152,24 @@ class ContourViewer(BaseViewer):\n phi = np.reshape(phi, shape)\n self.data.append((x, y, phi))\n \n+def datafilesFromBranches(branches, datafile):\n+ cwd = os.getcwd()\n+ for count, branch in enumerate(branches):\n+ print 'branch',branch\n+ tempdir = gitCloneToTemp(branch=branch, repositoryPath='ssh://wd15@genie.nist.gov/users/wd15/git/extremefill')\n+ repopath = os.path.join(tempdir, 'extremefill')\n+ datapath = os.path.join(repopath, datafile)\n+ gitMediaSync()\n+ if count == 0:\n+ self.addBaseData(datapath)\n+ basetempdir = tempdir\n+ else:\n+ self.addData(datapath, branch)\n+ cleanTempRepo(tempdir) \n+\n+ cleanTempRepo(basetempdir)\n+ os.chdir(cwd)\n+\n def plotNx():\n branches = ('Nx600', 'Nx300', 'Nx150')\n datafile = os.path.join('data', 'data.h5')\n@@ -174,13 +192,13 @@ def plotCFL():\n \n def plotContour():\n # branches = ('CFL0.0125', 'CFL0.025', 'CFL0.05', 'CFL0.1', 'CFL0.2', 'CFL0.4', 'CFL0.8', 'CFL1.6')\n- branches = ('Nx600', 'Nx150')\n+ branches = ('Nx300', 'Nx150')\n # branches = ('CFL0.025', 'CFL0.05')\n datafile = os.path.join('data', 'data.h5')\n times = (0,)\n- # times = (0., 1000., 2000., 3000., 4000.)\n- # viewer = ContourViewer(times=times, branches=branches, datafile=datafile)\n- viewer = ContourViewer(times=times, branches=branches, datafile=datafile, datafiles=('data150.h5', 'data600.h5'))\n+ times = (0., 1000., 2000., 3000., 4000.)\n+ viewer = ContourViewer(times=times, branches=branches, datafile=datafile)\n+ #viewer = ContourViewer(times=times, branches=branches, datafile=datafile, datafiles=('data150.h5', 'data600.h5'))\n viewer.plot()\n \n if __name__ == '__main__':\n@@ -188,6 +206,6 @@ if __name__ == '__main__':\n # from profiler import calibrate_profiler\n # fudge = calibrate_profiler(10000)\n # profile = Profiler('profile', fudge=fudge)\n- plotCFL()\n+ plotContour()\n # profile.stop()\n ", + "path": "/home/wd15/git/extremefill/extremefill" + }, + { + "name": "fipy", + "module": "python", + "source": "/home/wd15/git/fipy", + "version": "8c51478a3e8c30618b3a96c132612a46735c7548", + "diff": "", + "path": "/home/wd15/git/fipy/fipy" + }, + { + "name": "gi", + "module": "python", + "source": "attribute", + "version": "3.4.0", + "diff": "", + "path": "/usr/lib/python2.7/dist-packages/gi" + }, + { + "name": "glib", + "module": "python", + "source": null, + "version": "unknown", + "diff": "", + "path": "/usr/lib/python2.7/dist-packages/glib" + }, + { + "name": "gobject", + "module": "python", + "source": null, + "version": "unknown", + "diff": "", + "path": "/usr/lib/python2.7/dist-packages/gobject" + }, + { + "name": "google", + "module": "python", + "source": null, + "version": "unknown", + "diff": "", + "path": "/usr/lib/python2.7/dist-packages/google" + }, + { + "name": "gtk", + "module": "python", + "source": null, + "version": "unknown", + "diff": "", + "path": "/usr/lib/python2.7/dist-packages/gtk-2.0/gtk" + }, + { + "name": "httplib2", + "module": "python", + "source": "attribute", + "version": "0.7.4", + "diff": "", + "path": "/usr/lib/python2.7/dist-packages/httplib2" + }, + { + "name": "lockfile", + "module": "python", + "source": "egg-info", + "version": "0.9.1", + "diff": "", + "path": "/home/wd15/.virtualenvs/default/lib/python2.7/site-packages/lockfile-0.9.1-py2.7.egg/lockfile" + }, + { + "name": "lxml", + "module": "python", + "source": null, + "version": "unknown", + "diff": "", + "path": "/usr/lib/python2.7/dist-packages/lxml" + }, + { + "name": "matplotlib", + "module": "python", + "source": "attribute", + "version": "1.1.1", + "diff": "", + "path": "/usr/lib/pymodules/python2.7/matplotlib" + }, + { + "name": "mayavi", + "module": "python", + "source": "attribute", + "version": "4.1.0", + "diff": "", + "path": "/usr/lib/python2.7/dist-packages/mayavi" + }, + { + "name": "mpi4py", + "module": "python", + "source": "attribute", + "version": "1.3", + "diff": "", + "path": "/usr/lib/python2.7/dist-packages/mpi4py" + }, + { + "name": "mpl_toolkits", + "module": "python", + "source": null, + "version": "unknown", + "diff": "", + "path": "/usr/lib/pymodules/python2.7/mpl_toolkits" + }, + { + "name": "mx", + "module": "python", + "source": "attribute", + "version": "3.2.1", + "diff": "", + "path": "/usr/lib/python2.7/dist-packages/mx" + }, + { + "name": "nose", + "module": "python", + "source": "attribute", + "version": "1.2.1", + "diff": "", + "path": "/home/wd15/.virtualenvs/fipy/lib/python2.7/site-packages/nose" + }, + { + "name": "numexpr", + "module": "python", + "source": "attribute", + "version": "2.0.1", + "diff": "", + "path": "/usr/lib/python2.7/dist-packages/numexpr" + }, + { + "name": "numpy", + "module": "python", + "source": "attribute", + "version": "1.6.2", + "diff": "", + "path": "/usr/lib/python2.7/dist-packages/numpy" + }, + { + "name": "pyamg", + "module": "python", + "source": "attribute", + "version": "2.0.4.dev", + "diff": "", + "path": "/home/wd15/.virtualenvs/fipy/lib/python2.7/site-packages/pyamg" + }, + { + "name": "pylsmlib", + "module": "python", + "source": "/home/wd15/git/LSMLIB", + "version": "6f5d969bb27530aa37452a8b096e538a5cf7b993", + "diff": "", + "path": "/home/wd15/git/LSMLIB/pylsmlib/pylsmlib" + }, + { + "name": "pysparse", + "module": "python", + "source": "attribute", + "version": "1.1", + "diff": "", + "path": "/usr/lib/python2.7/dist-packages/pysparse" + }, + { + "name": "pytz", + "module": "python", + "source": "attribute", + "version": "2011k", + "diff": "", + "path": "/usr/lib/python2.7/dist-packages/pytz" + }, + { + "name": "scipy", + "module": "python", + "source": "attribute", + "version": "0.10.1", + "diff": "", + "path": "/usr/lib/python2.7/dist-packages/scipy" + }, + { + "name": "setuptools", + "module": "python", + "source": "attribute", + "version": "0.6", + "diff": "", + "path": "/home/wd15/.virtualenvs/default/local/lib/python2.7/site-packages/distribute-0.6.24-py2.7.egg/setuptools" + }, + { + "name": "simplejson", + "module": "python", + "source": "attribute", + "version": "2.6.1", + "diff": "", + "path": "/usr/lib/python2.7/dist-packages/simplejson" + }, + { + "name": "skfmm", + "module": "python", + "source": "/home/wd15/git/scikit-fmm", + "version": "467e5982fbd9d4eb32495f826d6bda65da498e13", + "diff": "", + "path": "/home/wd15/git/scikit-fmm/skfmm" + }, + { + "name": "sumatra", + "module": "python", + "source": "attribute", + "version": "0.5.0dev", + "diff": "", + "path": "/home/wd15/.virtualenvs/default/lib/python2.7/site-packages/Sumatra-0.5.0dev-py2.7.egg/sumatra" + }, + { + "name": "tables", + "module": "python", + "source": "attribute", + "version": "2.3.1", + "diff": "", + "path": "/usr/lib/python2.7/dist-packages/tables" + }, + { + "name": "tagging", + "module": "python", + "source": "attribute", + "version": "0.3.1", + "diff": "", + "path": "/home/wd15/.virtualenvs/fipy/lib/python2.7/site-packages/tagging" + }, + { + "name": "tornado", + "module": "python", + "source": "attribute", + "version": "2.3", + "diff": "", + "path": "/usr/lib/python2.7/dist-packages/tornado" + }, + { + "name": "traits", + "module": "python", + "source": "attribute", + "version": "4.1.0", + "diff": "", + "path": "/usr/lib/python2.7/dist-packages/traits" + }, + { + "name": "tvtk", + "module": "python", + "source": null, + "version": "unknown", + "diff": "", + "path": "/usr/lib/python2.7/dist-packages/tvtk" + }, + { + "name": "vtk", + "module": "python", + "source": null, + "version": "unknown", + "diff": "", + "path": "/usr/lib/pymodules/python2.7/vtk" + }, + { + "name": "wx", + "module": "python", + "source": "attribute", + "version": "2.8.12.1", + "diff": "", + "path": "/usr/lib/python2.7/dist-packages/wx-2.8-gtk2-unicode/wx" + }, + { + "name": "yaml", + "module": "python", + "source": "attribute", + "version": "3.10", + "diff": "", + "path": "/usr/lib/python2.7/dist-packages/yaml" + }, + { + "name": "zmq", + "module": "python", + "source": "attribute", + "version": "2.2.0", + "diff": "", + "path": "/usr/lib/python2.7/dist-packages/zmq" + } + ], + "user": "Daniel Wheeler ", + "output_data": [], + "input_data": [], + "launch_mode": { + "type": "SerialLaunchMode", + "parameters": { + "working_directory": "/home/wd15/git/extremefill-data" + } + }, + "main_file": "script.py", + "outcome": "" +}, +{ + "script_arguments": "", + "platforms": [ + { + "system_name": "Linux", + "machine": "x86_64", + "version": "#35-Ubuntu SMP Thu Jan 24 13:15:40 UTC 2013", + "ip_addr": "127.0.0.1", + "architecture_bits": "64bit", + "architecture_linkage": "ELF", + "release": "3.5.0-23-generic", + "network_name": "loki", + "processor": "x86_64" + } + ], + "duration": 0.00013709068298339844, + "diff": "diff --git a/smtdecorator.py b/smtdecorator.py\nindex e567d68..4d5014c 100644\n--- a/smtdecorator.py\n+++ b/smtdecorator.py\n@@ -93,7 +93,7 @@ class SMTContextManager(object):\n def __enter__(self):\n self.project = load_project()\n self.record = self.project.new_record(parameters=SimpleParameterSet({}),\n- main_file=__file__,\n+ main_file='script.py',\n reason=self.reason)\n \n self.record.datastore.root = os.path.join(self.record.datastore.root, self.record.label)\n@@ -106,7 +106,7 @@ class SMTContextManager(object):\n self.redirect.__enter__()\n \n def __exit__(self, type, value, tb):\n- self.redirect.__exit__()\n+ self.redirect.__exit__(type, value, tb)\n \n self.record.duration = time.time() - self.record.start_time\n self.record.stdout_stderr = self.redirect.target.getvalue()", + "datastore": { + "type": "FileSystemDataStore", + "parameters": { + "root": "./Data/696278952f7b" + } + }, + "input_datastore": { + "type": "FileSystemDataStore", + "parameters": { + "root": "/" + } + }, + "executable": { + "path": "/home/wd15/.virtualenvs/default/bin/python", + "version": "2.7.3", + "name": "Python", + "options": "" + }, + "parameters": { + "content": "", + "type": "SimpleParameterSet" + }, + "label": "696278952f7b", + "version": "540556f10db2f84778881583dfe7b6bc7ef31e5f", + "stdout_stderr": "", + "repository": { + "url": "/home/wd15/git/extremefill-data", + "type": "GitRepository", + "upstream": "git@github.com:wd15/extremefill-data.git" + }, + "tags": [ + "test" + ], + "timestamp": "2013-02-17 23:40:50", + "reason": "testing SMT class", + "dependencies": [ + { + "name": "Cython", + "module": "python", + "source": "attribute", + "version": "0.16", + "diff": "", + "path": "/usr/lib/python2.7/dist-packages/Cython" + }, + { + "name": "IPython", + "module": "python", + "source": "attribute", + "version": "0.13.1.rc2", + "diff": "", + "path": "/usr/lib/python2.7/dist-packages/IPython" + }, + { + "name": "PIL", + "module": "python", + "source": null, + "version": "unknown", + "diff": "", + "path": "/usr/lib/python2.7/dist-packages/PIL" + }, + { + "name": "PyQt4", + "module": "python", + "source": null, + "version": "unknown", + "diff": "", + "path": "/usr/lib/python2.7/dist-packages/PyQt4" + }, + { + "name": "PyTrilinos", + "module": "python", + "source": "attribute", + "version": "4.8d", + "diff": "", + "path": "/home/wd15/.virtualenvs/fipy/lib/python2.7/site-packages/PyTrilinos" + }, + { + "name": "dateutil", + "module": "python", + "source": "attribute", + "version": "1.5", + "diff": "", + "path": "/usr/lib/python2.7/dist-packages/dateutil" + }, + { + "name": "distutils", + "module": "python", + "source": "attribute", + "version": "2.7.3", + "diff": "", + "path": "/home/wd15/.virtualenvs/default/lib/python2.7/distutils" + }, + { + "name": "django", + "module": "python", + "source": "attribute", + "version": "1.4.1", + "diff": "", + "path": "/usr/lib/python2.7/dist-packages/django" + }, + { + "name": "docutils", + "module": "python", + "source": "attribute", + "version": "0.10", + "diff": "", + "path": "/home/wd15/.virtualenvs/fipy/lib/python2.7/site-packages/docutils" + }, + { + "name": "encodings", + "module": "python", + "source": null, + "version": "unknown", + "diff": "", + "path": "/home/wd15/.virtualenvs/default/lib/python2.7/encodings" + }, + { + "name": "extremefill", + "module": "python", + "source": "/home/wd15/git/extremefill", + "version": "549c969edb113d0b3e9804612bfa53e91319c0ea", + "diff": "diff --git a/data/viewer.py b/data/viewer.py\nindex 68f60e0..d9ab7c2 100644\n--- a/data/viewer.py\n+++ b/data/viewer.py\n@@ -122,7 +122,7 @@ class ContourViewer(BaseViewer):\n self.times = times\n self.contours = contours\n self.data = []\n- super(ContourViewer, self).__init__(branches=branches, datafile=datafiles, datafiles=datafiles)\n+ super(ContourViewer, self).__init__(branches=branches, datafile=datafile, datafiles=datafiles)\n \n def plot(self):\n import matplotlib.pyplot as plt\n@@ -152,6 +152,24 @@ class ContourViewer(BaseViewer):\n phi = np.reshape(phi, shape)\n self.data.append((x, y, phi))\n \n+def datafilesFromBranches(branches, datafile):\n+ cwd = os.getcwd()\n+ for count, branch in enumerate(branches):\n+ print 'branch',branch\n+ tempdir = gitCloneToTemp(branch=branch, repositoryPath='ssh://wd15@genie.nist.gov/users/wd15/git/extremefill')\n+ repopath = os.path.join(tempdir, 'extremefill')\n+ datapath = os.path.join(repopath, datafile)\n+ gitMediaSync()\n+ if count == 0:\n+ self.addBaseData(datapath)\n+ basetempdir = tempdir\n+ else:\n+ self.addData(datapath, branch)\n+ cleanTempRepo(tempdir) \n+\n+ cleanTempRepo(basetempdir)\n+ os.chdir(cwd)\n+\n def plotNx():\n branches = ('Nx600', 'Nx300', 'Nx150')\n datafile = os.path.join('data', 'data.h5')\n@@ -174,13 +192,13 @@ def plotCFL():\n \n def plotContour():\n # branches = ('CFL0.0125', 'CFL0.025', 'CFL0.05', 'CFL0.1', 'CFL0.2', 'CFL0.4', 'CFL0.8', 'CFL1.6')\n- branches = ('Nx600', 'Nx150')\n+ branches = ('Nx300', 'Nx150')\n # branches = ('CFL0.025', 'CFL0.05')\n datafile = os.path.join('data', 'data.h5')\n times = (0,)\n- # times = (0., 1000., 2000., 3000., 4000.)\n- # viewer = ContourViewer(times=times, branches=branches, datafile=datafile)\n- viewer = ContourViewer(times=times, branches=branches, datafile=datafile, datafiles=('data150.h5', 'data600.h5'))\n+ times = (0., 1000., 2000., 3000., 4000.)\n+ viewer = ContourViewer(times=times, branches=branches, datafile=datafile)\n+ #viewer = ContourViewer(times=times, branches=branches, datafile=datafile, datafiles=('data150.h5', 'data600.h5'))\n viewer.plot()\n \n if __name__ == '__main__':\n@@ -188,6 +206,6 @@ if __name__ == '__main__':\n # from profiler import calibrate_profiler\n # fudge = calibrate_profiler(10000)\n # profile = Profiler('profile', fudge=fudge)\n- plotCFL()\n+ plotContour()\n # profile.stop()\n ", + "path": "/home/wd15/git/extremefill/extremefill" + }, + { + "name": "fipy", + "module": "python", + "source": "/home/wd15/git/fipy", + "version": "8c51478a3e8c30618b3a96c132612a46735c7548", + "diff": "", + "path": "/home/wd15/git/fipy/fipy" + }, + { + "name": "gi", + "module": "python", + "source": "attribute", + "version": "3.4.0", + "diff": "", + "path": "/usr/lib/python2.7/dist-packages/gi" + }, + { + "name": "glib", + "module": "python", + "source": null, + "version": "unknown", + "diff": "", + "path": "/usr/lib/python2.7/dist-packages/glib" + }, + { + "name": "gobject", + "module": "python", + "source": null, + "version": "unknown", + "diff": "", + "path": "/usr/lib/python2.7/dist-packages/gobject" + }, + { + "name": "google", + "module": "python", + "source": null, + "version": "unknown", + "diff": "", + "path": "/usr/lib/python2.7/dist-packages/google" + }, + { + "name": "gtk", + "module": "python", + "source": null, + "version": "unknown", + "diff": "", + "path": "/usr/lib/python2.7/dist-packages/gtk-2.0/gtk" + }, + { + "name": "httplib2", + "module": "python", + "source": "attribute", + "version": "0.7.4", + "diff": "", + "path": "/usr/lib/python2.7/dist-packages/httplib2" + }, + { + "name": "lockfile", + "module": "python", + "source": "egg-info", + "version": "0.9.1", + "diff": "", + "path": "/home/wd15/.virtualenvs/default/lib/python2.7/site-packages/lockfile-0.9.1-py2.7.egg/lockfile" + }, + { + "name": "lxml", + "module": "python", + "source": null, + "version": "unknown", + "diff": "", + "path": "/usr/lib/python2.7/dist-packages/lxml" + }, + { + "name": "matplotlib", + "module": "python", + "source": "attribute", + "version": "1.1.1", + "diff": "", + "path": "/usr/lib/pymodules/python2.7/matplotlib" + }, + { + "name": "mayavi", + "module": "python", + "source": "attribute", + "version": "4.1.0", + "diff": "", + "path": "/usr/lib/python2.7/dist-packages/mayavi" + }, + { + "name": "mpi4py", + "module": "python", + "source": "attribute", + "version": "1.3", + "diff": "", + "path": "/usr/lib/python2.7/dist-packages/mpi4py" + }, + { + "name": "mpl_toolkits", + "module": "python", + "source": null, + "version": "unknown", + "diff": "", + "path": "/usr/lib/pymodules/python2.7/mpl_toolkits" + }, + { + "name": "mx", + "module": "python", + "source": "attribute", + "version": "3.2.1", + "diff": "", + "path": "/usr/lib/python2.7/dist-packages/mx" + }, + { + "name": "nose", + "module": "python", + "source": "attribute", + "version": "1.2.1", + "diff": "", + "path": "/home/wd15/.virtualenvs/fipy/lib/python2.7/site-packages/nose" + }, + { + "name": "numexpr", + "module": "python", + "source": "attribute", + "version": "2.0.1", + "diff": "", + "path": "/usr/lib/python2.7/dist-packages/numexpr" + }, + { + "name": "numpy", + "module": "python", + "source": "attribute", + "version": "1.6.2", + "diff": "", + "path": "/usr/lib/python2.7/dist-packages/numpy" + }, + { + "name": "pyamg", + "module": "python", + "source": "attribute", + "version": "2.0.4.dev", + "diff": "", + "path": "/home/wd15/.virtualenvs/fipy/lib/python2.7/site-packages/pyamg" + }, + { + "name": "pylsmlib", + "module": "python", + "source": "/home/wd15/git/LSMLIB", + "version": "6f5d969bb27530aa37452a8b096e538a5cf7b993", + "diff": "", + "path": "/home/wd15/git/LSMLIB/pylsmlib/pylsmlib" + }, + { + "name": "pysparse", + "module": "python", + "source": "attribute", + "version": "1.1", + "diff": "", + "path": "/usr/lib/python2.7/dist-packages/pysparse" + }, + { + "name": "pytz", + "module": "python", + "source": "attribute", + "version": "2011k", + "diff": "", + "path": "/usr/lib/python2.7/dist-packages/pytz" + }, + { + "name": "scipy", + "module": "python", + "source": "attribute", + "version": "0.10.1", + "diff": "", + "path": "/usr/lib/python2.7/dist-packages/scipy" + }, + { + "name": "setuptools", + "module": "python", + "source": "attribute", + "version": "0.6", + "diff": "", + "path": "/home/wd15/.virtualenvs/default/local/lib/python2.7/site-packages/distribute-0.6.24-py2.7.egg/setuptools" + }, + { + "name": "simplejson", + "module": "python", + "source": "attribute", + "version": "2.6.1", + "diff": "", + "path": "/usr/lib/python2.7/dist-packages/simplejson" + }, + { + "name": "skfmm", + "module": "python", + "source": "/home/wd15/git/scikit-fmm", + "version": "467e5982fbd9d4eb32495f826d6bda65da498e13", + "diff": "", + "path": "/home/wd15/git/scikit-fmm/skfmm" + }, + { + "name": "sumatra", + "module": "python", + "source": "attribute", + "version": "0.5.0dev", + "diff": "", + "path": "/home/wd15/.virtualenvs/default/lib/python2.7/site-packages/Sumatra-0.5.0dev-py2.7.egg/sumatra" + }, + { + "name": "tables", + "module": "python", + "source": "attribute", + "version": "2.3.1", + "diff": "", + "path": "/usr/lib/python2.7/dist-packages/tables" + }, + { + "name": "tagging", + "module": "python", + "source": "attribute", + "version": "0.3.1", + "diff": "", + "path": "/home/wd15/.virtualenvs/fipy/lib/python2.7/site-packages/tagging" + }, + { + "name": "tornado", + "module": "python", + "source": "attribute", + "version": "2.3", + "diff": "", + "path": "/usr/lib/python2.7/dist-packages/tornado" + }, + { + "name": "traits", + "module": "python", + "source": "attribute", + "version": "4.1.0", + "diff": "", + "path": "/usr/lib/python2.7/dist-packages/traits" + }, + { + "name": "tvtk", + "module": "python", + "source": null, + "version": "unknown", + "diff": "", + "path": "/usr/lib/python2.7/dist-packages/tvtk" + }, + { + "name": "vtk", + "module": "python", + "source": null, + "version": "unknown", + "diff": "", + "path": "/usr/lib/pymodules/python2.7/vtk" + }, + { + "name": "wx", + "module": "python", + "source": "attribute", + "version": "2.8.12.1", + "diff": "", + "path": "/usr/lib/python2.7/dist-packages/wx-2.8-gtk2-unicode/wx" + }, + { + "name": "yaml", + "module": "python", + "source": "attribute", + "version": "3.10", + "diff": "", + "path": "/usr/lib/python2.7/dist-packages/yaml" + }, + { + "name": "zmq", + "module": "python", + "source": "attribute", + "version": "2.2.0", + "diff": "", + "path": "/usr/lib/python2.7/dist-packages/zmq" + } + ], + "user": "Daniel Wheeler ", + "output_data": [], + "input_data": [], + "launch_mode": { + "type": "SerialLaunchMode", + "parameters": { + "working_directory": "/home/wd15/git/extremefill-data" + } + }, + "main_file": "script.py", + "outcome": "" +}, +{ + "script_arguments": "", + "platforms": [ + { + "system_name": "Linux", + "machine": "x86_64", + "version": "#35-Ubuntu SMP Thu Jan 24 13:15:40 UTC 2013", + "ip_addr": "127.0.0.1", + "architecture_bits": "64bit", + "architecture_linkage": "ELF", + "release": "3.5.0-23-generic", + "network_name": "loki", + "processor": "x86_64" + } + ], + "duration": 2.4162650108337402, + "diff": "diff --git a/script.py b/script.py\nindex a2a7a03..cac472a 100644\n--- a/script.py\n+++ b/script.py\n@@ -3,10 +3,9 @@ import os\n \n import tables\n from extremefill.simulation2D import Simulation2D\n+from smtcapture import SMTCapture\n \n-\n-simulation = Simulation2D()\n-\n+@SMTCapture\n def run(totalSteps=10,\n Nx=300,\n CFL=0.1,\n@@ -29,8 +28,6 @@ def run(totalSteps=10,\n data_frequency=10,\n NxBase=1200)\n \n+if __name__ == '__main__':\n \n-from smt import SMTSimulation\n-\n-smtsim = SMTSimulation(run, kwargs={'totalSteps' : 1}, tags=('test',), reason=\"testing SMT class\", main_file=__file__)\n-smtsim.launch()\n+ run(totalSteps=1, tags=('test',), reason=\"testing SMT class\")\ndiff --git a/smt.py b/smt.py\nindex adb98c5..f8903f5 100644\n--- a/smt.py\n+++ b/smt.py\n@@ -46,18 +46,21 @@ class SMTLock:\n class Redirect:\n def __enter__(self):\n self.tmp_stdout = sys.stdout\n- sys.stdout = StringIO()\n- return sys.stdout\n+ self.target = StringIO()\n+ sys.stdout = self.target\n+ return self.target\n \n def __exit__(self, type, value, tb):\n sys.stdout = self.tmp_stdout\n-\n+ print self.target.getvalue()\n+ \n+class SMTCapture(object):\n+ def __init__(self, function, tags=(), reason={}, *args, **kwargs):\n \n-class SMTSimulation(object):\n- def __init__(self, function, args=(), kwargs={}, tags=(), reason='', main_file=__file__):\n project = load_project()\n+ \n record = project.new_record(parameters=SimpleParameterSet(kwargs),\n- main_file=main_file,\n+ main_file=function.func_globals['__file__'],\n reason=reason)\n \n record.datastore.root = os.path.join(record.datastore.root, record.label)\n@@ -70,7 +73,7 @@ class SMTSimulation(object):\n self.project = project\n self.function = function\n self.args = args\n- \n+ \n def launch(self):\n record = self.record\n record.start_time = time.time()\n@@ -78,7 +81,6 @@ class SMTSimulation(object):\n with Redirect() as out:\n self.function(*self.args, **record.parameters.as_dict())\n \n- print out.getvalue()\n record.stdout_stderr = out.getvalue()\n record.duration = time.time() - record.start_time\n ", + "datastore": { + "type": "FileSystemDataStore", + "parameters": { + "root": "./Data/467c4d01f410" + } + }, + "input_datastore": { + "type": "FileSystemDataStore", + "parameters": { + "root": "/" + } + }, + "executable": { + "path": "/home/wd15/.virtualenvs/default/bin/python", + "version": "2.7.3", + "name": "Python", + "options": "" + }, + "parameters": { + "content": "totalSteps = 1\ndatadir = \"./Data/467c4d01f410\"", + "type": "SimpleParameterSet" + }, + "label": "467c4d01f410", + "version": "13bcd18862c82a3573c3e7a1f32834a205056dbd", + "stdout_stderr": "[ 1. 1. 1. 1.]\n[ 0.34738209 0.61535499 0.01923836 0.00971058]\n[ 1.23729704e-01 2.14204081e-01 1.88311438e-04 1.55991524e-03]\n\ntheta 0.0\ncBar_supp 1.0\ncBar_cu 1.0\npotentialBar 1.0\nmin(extension) 7.22965473284e-08\nmin(depositionRate) 2.09114908795e-09\nmin(current) 56.8350759862\nmin(cupric) 997.266139623\nmin(baseCurrent) 56.9323002935\nmax(interfaceTheta) - 1: -0.973021297371\nmin(interfaceTheta) 0.0\nmin(I0) 38.9208518948\ndt 0.011\nelapsed time 0.0\nstep 0\n\n", + "repository": { + "url": "/home/wd15/git/extremefill-data", + "type": "GitRepository", + "upstream": "git@github.com:wd15/extremefill-data.git" + }, + "tags": [ + "test" + ], + "timestamp": "2013-02-17 22:45:31", + "reason": "testing SMT class", + "dependencies": [ + { + "name": "Cython", + "module": "python", + "source": "attribute", + "version": "0.16", + "diff": "", + "path": "/usr/lib/python2.7/dist-packages/Cython" + }, + { + "name": "IPython", + "module": "python", + "source": "attribute", + "version": "0.13.1.rc2", + "diff": "", + "path": "/usr/lib/python2.7/dist-packages/IPython" + }, + { + "name": "PIL", + "module": "python", + "source": null, + "version": "unknown", + "diff": "", + "path": "/usr/lib/python2.7/dist-packages/PIL" + }, + { + "name": "PyQt4", + "module": "python", + "source": null, + "version": "unknown", + "diff": "", + "path": "/usr/lib/python2.7/dist-packages/PyQt4" + }, + { + "name": "PyTrilinos", + "module": "python", + "source": "attribute", + "version": "4.8d", + "diff": "", + "path": "/home/wd15/.virtualenvs/fipy/lib/python2.7/site-packages/PyTrilinos" + }, + { + "name": "dateutil", + "module": "python", + "source": "attribute", + "version": "1.5", + "diff": "", + "path": "/usr/lib/python2.7/dist-packages/dateutil" + }, + { + "name": "distutils", + "module": "python", + "source": "attribute", + "version": "2.7.3", + "diff": "", + "path": "/home/wd15/.virtualenvs/default/lib/python2.7/distutils" + }, + { + "name": "django", + "module": "python", + "source": "attribute", + "version": "1.4.1", + "diff": "", + "path": "/usr/lib/python2.7/dist-packages/django" + }, + { + "name": "docutils", + "module": "python", + "source": "attribute", + "version": "0.10", + "diff": "", + "path": "/home/wd15/.virtualenvs/fipy/lib/python2.7/site-packages/docutils" + }, + { + "name": "encodings", + "module": "python", + "source": null, + "version": "unknown", + "diff": "", + "path": "/home/wd15/.virtualenvs/default/lib/python2.7/encodings" + }, + { + "name": "extremefill", + "module": "python", + "source": "/home/wd15/git/extremefill", + "version": "549c969edb113d0b3e9804612bfa53e91319c0ea", + "diff": "diff --git a/data/viewer.py b/data/viewer.py\nindex 68f60e0..d9ab7c2 100644\n--- a/data/viewer.py\n+++ b/data/viewer.py\n@@ -122,7 +122,7 @@ class ContourViewer(BaseViewer):\n self.times = times\n self.contours = contours\n self.data = []\n- super(ContourViewer, self).__init__(branches=branches, datafile=datafiles, datafiles=datafiles)\n+ super(ContourViewer, self).__init__(branches=branches, datafile=datafile, datafiles=datafiles)\n \n def plot(self):\n import matplotlib.pyplot as plt\n@@ -152,6 +152,24 @@ class ContourViewer(BaseViewer):\n phi = np.reshape(phi, shape)\n self.data.append((x, y, phi))\n \n+def datafilesFromBranches(branches, datafile):\n+ cwd = os.getcwd()\n+ for count, branch in enumerate(branches):\n+ print 'branch',branch\n+ tempdir = gitCloneToTemp(branch=branch, repositoryPath='ssh://wd15@genie.nist.gov/users/wd15/git/extremefill')\n+ repopath = os.path.join(tempdir, 'extremefill')\n+ datapath = os.path.join(repopath, datafile)\n+ gitMediaSync()\n+ if count == 0:\n+ self.addBaseData(datapath)\n+ basetempdir = tempdir\n+ else:\n+ self.addData(datapath, branch)\n+ cleanTempRepo(tempdir) \n+\n+ cleanTempRepo(basetempdir)\n+ os.chdir(cwd)\n+\n def plotNx():\n branches = ('Nx600', 'Nx300', 'Nx150')\n datafile = os.path.join('data', 'data.h5')\n@@ -174,13 +192,13 @@ def plotCFL():\n \n def plotContour():\n # branches = ('CFL0.0125', 'CFL0.025', 'CFL0.05', 'CFL0.1', 'CFL0.2', 'CFL0.4', 'CFL0.8', 'CFL1.6')\n- branches = ('Nx600', 'Nx150')\n+ branches = ('Nx300', 'Nx150')\n # branches = ('CFL0.025', 'CFL0.05')\n datafile = os.path.join('data', 'data.h5')\n times = (0,)\n- # times = (0., 1000., 2000., 3000., 4000.)\n- # viewer = ContourViewer(times=times, branches=branches, datafile=datafile)\n- viewer = ContourViewer(times=times, branches=branches, datafile=datafile, datafiles=('data150.h5', 'data600.h5'))\n+ times = (0., 1000., 2000., 3000., 4000.)\n+ viewer = ContourViewer(times=times, branches=branches, datafile=datafile)\n+ #viewer = ContourViewer(times=times, branches=branches, datafile=datafile, datafiles=('data150.h5', 'data600.h5'))\n viewer.plot()\n \n if __name__ == '__main__':\n@@ -188,6 +206,6 @@ if __name__ == '__main__':\n # from profiler import calibrate_profiler\n # fudge = calibrate_profiler(10000)\n # profile = Profiler('profile', fudge=fudge)\n- plotCFL()\n+ plotContour()\n # profile.stop()\n ", + "path": "/home/wd15/git/extremefill/extremefill" + }, + { + "name": "fipy", + "module": "python", + "source": "/home/wd15/git/fipy", + "version": "8c51478a3e8c30618b3a96c132612a46735c7548", + "diff": "", + "path": "/home/wd15/git/fipy/fipy" + }, + { + "name": "gi", + "module": "python", + "source": "attribute", + "version": "3.4.0", + "diff": "", + "path": "/usr/lib/python2.7/dist-packages/gi" + }, + { + "name": "glib", + "module": "python", + "source": null, + "version": "unknown", + "diff": "", + "path": "/usr/lib/python2.7/dist-packages/glib" + }, + { + "name": "gobject", + "module": "python", + "source": null, + "version": "unknown", + "diff": "", + "path": "/usr/lib/python2.7/dist-packages/gobject" + }, + { + "name": "google", + "module": "python", + "source": null, + "version": "unknown", + "diff": "", + "path": "/usr/lib/python2.7/dist-packages/google" + }, + { + "name": "gtk", + "module": "python", + "source": null, + "version": "unknown", + "diff": "", + "path": "/usr/lib/python2.7/dist-packages/gtk-2.0/gtk" + }, + { + "name": "httplib2", + "module": "python", + "source": "attribute", + "version": "0.7.4", + "diff": "", + "path": "/usr/lib/python2.7/dist-packages/httplib2" + }, + { + "name": "lockfile", + "module": "python", + "source": "egg-info", + "version": "0.9.1", + "diff": "", + "path": "/home/wd15/.virtualenvs/default/lib/python2.7/site-packages/lockfile-0.9.1-py2.7.egg/lockfile" + }, + { + "name": "lxml", + "module": "python", + "source": null, + "version": "unknown", + "diff": "", + "path": "/usr/lib/python2.7/dist-packages/lxml" + }, + { + "name": "matplotlib", + "module": "python", + "source": "attribute", + "version": "1.1.1", + "diff": "", + "path": "/usr/lib/pymodules/python2.7/matplotlib" + }, + { + "name": "mayavi", + "module": "python", + "source": "attribute", + "version": "4.1.0", + "diff": "", + "path": "/usr/lib/python2.7/dist-packages/mayavi" + }, + { + "name": "mpi4py", + "module": "python", + "source": "attribute", + "version": "1.3", + "diff": "", + "path": "/usr/lib/python2.7/dist-packages/mpi4py" + }, + { + "name": "mpl_toolkits", + "module": "python", + "source": null, + "version": "unknown", + "diff": "", + "path": "/usr/lib/pymodules/python2.7/mpl_toolkits" + }, + { + "name": "mx", + "module": "python", + "source": "attribute", + "version": "3.2.1", + "diff": "", + "path": "/usr/lib/python2.7/dist-packages/mx" + }, + { + "name": "nose", + "module": "python", + "source": "attribute", + "version": "1.2.1", + "diff": "", + "path": "/home/wd15/.virtualenvs/fipy/lib/python2.7/site-packages/nose" + }, + { + "name": "numexpr", + "module": "python", + "source": "attribute", + "version": "2.0.1", + "diff": "", + "path": "/usr/lib/python2.7/dist-packages/numexpr" + }, + { + "name": "numpy", + "module": "python", + "source": "attribute", + "version": "1.6.2", + "diff": "", + "path": "/usr/lib/python2.7/dist-packages/numpy" + }, + { + "name": "pyamg", + "module": "python", + "source": "attribute", + "version": "2.0.4.dev", + "diff": "", + "path": "/home/wd15/.virtualenvs/fipy/lib/python2.7/site-packages/pyamg" + }, + { + "name": "pylsmlib", + "module": "python", + "source": "/home/wd15/git/LSMLIB", + "version": "6f5d969bb27530aa37452a8b096e538a5cf7b993", + "diff": "", + "path": "/home/wd15/git/LSMLIB/pylsmlib/pylsmlib" + }, + { + "name": "pysparse", + "module": "python", + "source": "attribute", + "version": "1.1", + "diff": "", + "path": "/usr/lib/python2.7/dist-packages/pysparse" + }, + { + "name": "pytz", + "module": "python", + "source": "attribute", + "version": "2011k", + "diff": "", + "path": "/usr/lib/python2.7/dist-packages/pytz" + }, + { + "name": "scipy", + "module": "python", + "source": "attribute", + "version": "0.10.1", + "diff": "", + "path": "/usr/lib/python2.7/dist-packages/scipy" + }, + { + "name": "setuptools", + "module": "python", + "source": "attribute", + "version": "0.6", + "diff": "", + "path": "/home/wd15/.virtualenvs/default/local/lib/python2.7/site-packages/distribute-0.6.24-py2.7.egg/setuptools" + }, + { + "name": "simplejson", + "module": "python", + "source": "attribute", + "version": "2.6.1", + "diff": "", + "path": "/usr/lib/python2.7/dist-packages/simplejson" + }, + { + "name": "skfmm", + "module": "python", + "source": "/home/wd15/git/scikit-fmm", + "version": "467e5982fbd9d4eb32495f826d6bda65da498e13", + "diff": "", + "path": "/home/wd15/git/scikit-fmm/skfmm" + }, + { + "name": "sumatra", + "module": "python", + "source": "attribute", + "version": "0.5.0dev", + "diff": "", + "path": "/home/wd15/.virtualenvs/default/lib/python2.7/site-packages/Sumatra-0.5.0dev-py2.7.egg/sumatra" + }, + { + "name": "tables", + "module": "python", + "source": "attribute", + "version": "2.3.1", + "diff": "", + "path": "/usr/lib/python2.7/dist-packages/tables" + }, + { + "name": "tagging", + "module": "python", + "source": "attribute", + "version": "0.3.1", + "diff": "", + "path": "/home/wd15/.virtualenvs/fipy/lib/python2.7/site-packages/tagging" + }, + { + "name": "tornado", + "module": "python", + "source": "attribute", + "version": "2.3", + "diff": "", + "path": "/usr/lib/python2.7/dist-packages/tornado" + }, + { + "name": "traits", + "module": "python", + "source": "attribute", + "version": "4.1.0", + "diff": "", + "path": "/usr/lib/python2.7/dist-packages/traits" + }, + { + "name": "tvtk", + "module": "python", + "source": null, + "version": "unknown", + "diff": "", + "path": "/usr/lib/python2.7/dist-packages/tvtk" + }, + { + "name": "vtk", + "module": "python", + "source": null, + "version": "unknown", + "diff": "", + "path": "/usr/lib/pymodules/python2.7/vtk" + }, + { + "name": "wx", + "module": "python", + "source": "attribute", + "version": "2.8.12.1", + "diff": "", + "path": "/usr/lib/python2.7/dist-packages/wx-2.8-gtk2-unicode/wx" + }, + { + "name": "yaml", + "module": "python", + "source": "attribute", + "version": "3.10", + "diff": "", + "path": "/usr/lib/python2.7/dist-packages/yaml" + }, + { + "name": "zmq", + "module": "python", + "source": "attribute", + "version": "2.2.0", + "diff": "", + "path": "/usr/lib/python2.7/dist-packages/zmq" + } + ], + "user": "Daniel Wheeler ", + "output_data": [ + { + "path": "data.h5", + "digest": "0b3ff40c27742881f0950406ef6caaefb3c00aa7", + "metadata": { + "mimetype": null, + "size": 102992, + "encoding": null + } + } + ], + "input_data": [], + "launch_mode": { + "type": "SerialLaunchMode", + "parameters": { + "working_directory": "/home/wd15/git/extremefill-data" + } + }, + "main_file": "script.py", + "outcome": "" +}, +{ + "script_arguments": "", + "platforms": [ + { + "system_name": "Linux", + "machine": "x86_64", + "version": "#35-Ubuntu SMP Thu Jan 24 13:15:40 UTC 2013", + "ip_addr": "127.0.0.1", + "architecture_bits": "64bit", + "architecture_linkage": "ELF", + "release": "3.5.0-23-generic", + "network_name": "loki", + "processor": "x86_64" + } + ], + "duration": 2.4252991676330566, + "diff": "diff --git a/script.py b/script.py\nindex a2a7a03..c2307ca 100644\n--- a/script.py\n+++ b/script.py\n@@ -5,8 +5,6 @@ import tables\n from extremefill.simulation2D import Simulation2D\n \n \n-simulation = Simulation2D()\n-\n def run(totalSteps=10,\n Nx=300,\n CFL=0.1,\n@@ -29,8 +27,8 @@ def run(totalSteps=10,\n data_frequency=10,\n NxBase=1200)\n \n+if __name__ == '__main__':\n+ from smt import SMTSimulation\n \n-from smt import SMTSimulation\n-\n-smtsim = SMTSimulation(run, kwargs={'totalSteps' : 1}, tags=('test',), reason=\"testing SMT class\", main_file=__file__)\n-smtsim.launch()\n+ smtsim = SMTSimulation(run, totalSteps=1, tags=('test',), reason=\"testing SMT class\")\n+ smtsim.launch()\ndiff --git a/smt.py b/smt.py\nindex adb98c5..810814a 100644\n--- a/smt.py\n+++ b/smt.py\n@@ -46,18 +46,21 @@ class SMTLock:\n class Redirect:\n def __enter__(self):\n self.tmp_stdout = sys.stdout\n- sys.stdout = StringIO()\n- return sys.stdout\n+ self.target = StringIO()\n+ sys.stdout = self.target\n+ return self.target\n \n def __exit__(self, type, value, tb):\n sys.stdout = self.tmp_stdout\n-\n+ print self.target.getvalue()\n \n class SMTSimulation(object):\n- def __init__(self, function, args=(), kwargs={}, tags=(), reason='', main_file=__file__):\n+ def __init__(self, function, tags=(), reason={}, *args, **kwargs):\n+ \n project = load_project()\n+ \n record = project.new_record(parameters=SimpleParameterSet(kwargs),\n- main_file=main_file,\n+ main_file=function.func_globals['__file__'],\n reason=reason)\n \n record.datastore.root = os.path.join(record.datastore.root, record.label)\n@@ -70,7 +73,7 @@ class SMTSimulation(object):\n self.project = project\n self.function = function\n self.args = args\n- \n+ \n def launch(self):\n record = self.record\n record.start_time = time.time()\n@@ -78,7 +81,6 @@ class SMTSimulation(object):\n with Redirect() as out:\n self.function(*self.args, **record.parameters.as_dict())\n \n- print out.getvalue()\n record.stdout_stderr = out.getvalue()\n record.duration = time.time() - record.start_time\n ", + "datastore": { + "type": "FileSystemDataStore", + "parameters": { + "root": "./Data/542d2db15b47" + } + }, + "input_datastore": { + "type": "FileSystemDataStore", + "parameters": { + "root": "/" + } + }, + "executable": { + "path": "/home/wd15/.virtualenvs/default/bin/python", + "version": "2.7.3", + "name": "Python", + "options": "" + }, + "parameters": { + "content": "totalSteps = 1\ndatadir = \"./Data/542d2db15b47\"", + "type": "SimpleParameterSet" + }, + "label": "542d2db15b47", + "version": "13bcd18862c82a3573c3e7a1f32834a205056dbd", + "stdout_stderr": "[ 1. 1. 1. 1.]\n[ 0.34738209 0.61535499 0.01923836 0.00971058]\n[ 1.23729704e-01 2.14204081e-01 1.88311438e-04 1.55991524e-03]\n\ntheta 0.0\ncBar_supp 1.0\ncBar_cu 1.0\npotentialBar 1.0\nmin(extension) 7.22965473284e-08\nmin(depositionRate) 2.09114908795e-09\nmin(current) 56.8350759862\nmin(cupric) 997.266139623\nmin(baseCurrent) 56.9323002935\nmax(interfaceTheta) - 1: -0.973021297371\nmin(interfaceTheta) 0.0\nmin(I0) 38.9208518948\ndt 0.011\nelapsed time 0.0\nstep 0\n\n", + "repository": { + "url": "/home/wd15/git/extremefill-data", + "type": "GitRepository", + "upstream": "git@github.com:wd15/extremefill-data.git" + }, + "tags": [ + "test" + ], + "timestamp": "2013-02-17 22:26:10", + "reason": "testing SMT class", + "dependencies": [ + { + "name": "Cython", + "module": "python", + "source": "attribute", + "version": "0.16", + "diff": "", + "path": "/usr/lib/python2.7/dist-packages/Cython" + }, + { + "name": "IPython", + "module": "python", + "source": "attribute", + "version": "0.13.1.rc2", + "diff": "", + "path": "/usr/lib/python2.7/dist-packages/IPython" + }, + { + "name": "PIL", + "module": "python", + "source": null, + "version": "unknown", + "diff": "", + "path": "/usr/lib/python2.7/dist-packages/PIL" + }, + { + "name": "PyQt4", + "module": "python", + "source": null, + "version": "unknown", + "diff": "", + "path": "/usr/lib/python2.7/dist-packages/PyQt4" + }, + { + "name": "PyTrilinos", + "module": "python", + "source": "attribute", + "version": "4.8d", + "diff": "", + "path": "/home/wd15/.virtualenvs/fipy/lib/python2.7/site-packages/PyTrilinos" + }, + { + "name": "dateutil", + "module": "python", + "source": "attribute", + "version": "1.5", + "diff": "", + "path": "/usr/lib/python2.7/dist-packages/dateutil" + }, + { + "name": "distutils", + "module": "python", + "source": "attribute", + "version": "2.7.3", + "diff": "", + "path": "/home/wd15/.virtualenvs/default/lib/python2.7/distutils" + }, + { + "name": "django", + "module": "python", + "source": "attribute", + "version": "1.4.1", + "diff": "", + "path": "/usr/lib/python2.7/dist-packages/django" + }, + { + "name": "docutils", + "module": "python", + "source": "attribute", + "version": "0.10", + "diff": "", + "path": "/home/wd15/.virtualenvs/fipy/lib/python2.7/site-packages/docutils" + }, + { + "name": "encodings", + "module": "python", + "source": null, + "version": "unknown", + "diff": "", + "path": "/home/wd15/.virtualenvs/default/lib/python2.7/encodings" + }, + { + "name": "extremefill", + "module": "python", + "source": "/home/wd15/git/extremefill", + "version": "549c969edb113d0b3e9804612bfa53e91319c0ea", + "diff": "diff --git a/data/viewer.py b/data/viewer.py\nindex 68f60e0..d9ab7c2 100644\n--- a/data/viewer.py\n+++ b/data/viewer.py\n@@ -122,7 +122,7 @@ class ContourViewer(BaseViewer):\n self.times = times\n self.contours = contours\n self.data = []\n- super(ContourViewer, self).__init__(branches=branches, datafile=datafiles, datafiles=datafiles)\n+ super(ContourViewer, self).__init__(branches=branches, datafile=datafile, datafiles=datafiles)\n \n def plot(self):\n import matplotlib.pyplot as plt\n@@ -152,6 +152,24 @@ class ContourViewer(BaseViewer):\n phi = np.reshape(phi, shape)\n self.data.append((x, y, phi))\n \n+def datafilesFromBranches(branches, datafile):\n+ cwd = os.getcwd()\n+ for count, branch in enumerate(branches):\n+ print 'branch',branch\n+ tempdir = gitCloneToTemp(branch=branch, repositoryPath='ssh://wd15@genie.nist.gov/users/wd15/git/extremefill')\n+ repopath = os.path.join(tempdir, 'extremefill')\n+ datapath = os.path.join(repopath, datafile)\n+ gitMediaSync()\n+ if count == 0:\n+ self.addBaseData(datapath)\n+ basetempdir = tempdir\n+ else:\n+ self.addData(datapath, branch)\n+ cleanTempRepo(tempdir) \n+\n+ cleanTempRepo(basetempdir)\n+ os.chdir(cwd)\n+\n def plotNx():\n branches = ('Nx600', 'Nx300', 'Nx150')\n datafile = os.path.join('data', 'data.h5')\n@@ -174,13 +192,13 @@ def plotCFL():\n \n def plotContour():\n # branches = ('CFL0.0125', 'CFL0.025', 'CFL0.05', 'CFL0.1', 'CFL0.2', 'CFL0.4', 'CFL0.8', 'CFL1.6')\n- branches = ('Nx600', 'Nx150')\n+ branches = ('Nx300', 'Nx150')\n # branches = ('CFL0.025', 'CFL0.05')\n datafile = os.path.join('data', 'data.h5')\n times = (0,)\n- # times = (0., 1000., 2000., 3000., 4000.)\n- # viewer = ContourViewer(times=times, branches=branches, datafile=datafile)\n- viewer = ContourViewer(times=times, branches=branches, datafile=datafile, datafiles=('data150.h5', 'data600.h5'))\n+ times = (0., 1000., 2000., 3000., 4000.)\n+ viewer = ContourViewer(times=times, branches=branches, datafile=datafile)\n+ #viewer = ContourViewer(times=times, branches=branches, datafile=datafile, datafiles=('data150.h5', 'data600.h5'))\n viewer.plot()\n \n if __name__ == '__main__':\n@@ -188,6 +206,6 @@ if __name__ == '__main__':\n # from profiler import calibrate_profiler\n # fudge = calibrate_profiler(10000)\n # profile = Profiler('profile', fudge=fudge)\n- plotCFL()\n+ plotContour()\n # profile.stop()\n ", + "path": "/home/wd15/git/extremefill/extremefill" + }, + { + "name": "fipy", + "module": "python", + "source": "/home/wd15/git/fipy", + "version": "8c51478a3e8c30618b3a96c132612a46735c7548", + "diff": "", + "path": "/home/wd15/git/fipy/fipy" + }, + { + "name": "gi", + "module": "python", + "source": "attribute", + "version": "3.4.0", + "diff": "", + "path": "/usr/lib/python2.7/dist-packages/gi" + }, + { + "name": "glib", + "module": "python", + "source": null, + "version": "unknown", + "diff": "", + "path": "/usr/lib/python2.7/dist-packages/glib" + }, + { + "name": "gobject", + "module": "python", + "source": null, + "version": "unknown", + "diff": "", + "path": "/usr/lib/python2.7/dist-packages/gobject" + }, + { + "name": "google", + "module": "python", + "source": null, + "version": "unknown", + "diff": "", + "path": "/usr/lib/python2.7/dist-packages/google" + }, + { + "name": "gtk", + "module": "python", + "source": null, + "version": "unknown", + "diff": "", + "path": "/usr/lib/python2.7/dist-packages/gtk-2.0/gtk" + }, + { + "name": "httplib2", + "module": "python", + "source": "attribute", + "version": "0.7.4", + "diff": "", + "path": "/usr/lib/python2.7/dist-packages/httplib2" + }, + { + "name": "lockfile", + "module": "python", + "source": "egg-info", + "version": "0.9.1", + "diff": "", + "path": "/home/wd15/.virtualenvs/default/lib/python2.7/site-packages/lockfile-0.9.1-py2.7.egg/lockfile" + }, + { + "name": "lxml", + "module": "python", + "source": null, + "version": "unknown", + "diff": "", + "path": "/usr/lib/python2.7/dist-packages/lxml" + }, + { + "name": "matplotlib", + "module": "python", + "source": "attribute", + "version": "1.1.1", + "diff": "", + "path": "/usr/lib/pymodules/python2.7/matplotlib" + }, + { + "name": "mayavi", + "module": "python", + "source": "attribute", + "version": "4.1.0", + "diff": "", + "path": "/usr/lib/python2.7/dist-packages/mayavi" + }, + { + "name": "mpi4py", + "module": "python", + "source": "attribute", + "version": "1.3", + "diff": "", + "path": "/usr/lib/python2.7/dist-packages/mpi4py" + }, + { + "name": "mpl_toolkits", + "module": "python", + "source": null, + "version": "unknown", + "diff": "", + "path": "/usr/lib/pymodules/python2.7/mpl_toolkits" + }, + { + "name": "mx", + "module": "python", + "source": "attribute", + "version": "3.2.1", + "diff": "", + "path": "/usr/lib/python2.7/dist-packages/mx" + }, + { + "name": "nose", + "module": "python", + "source": "attribute", + "version": "1.2.1", + "diff": "", + "path": "/home/wd15/.virtualenvs/fipy/lib/python2.7/site-packages/nose" + }, + { + "name": "numexpr", + "module": "python", + "source": "attribute", + "version": "2.0.1", + "diff": "", + "path": "/usr/lib/python2.7/dist-packages/numexpr" + }, + { + "name": "numpy", + "module": "python", + "source": "attribute", + "version": "1.6.2", + "diff": "", + "path": "/usr/lib/python2.7/dist-packages/numpy" + }, + { + "name": "pyamg", + "module": "python", + "source": "attribute", + "version": "2.0.4.dev", + "diff": "", + "path": "/home/wd15/.virtualenvs/fipy/lib/python2.7/site-packages/pyamg" + }, + { + "name": "pylsmlib", + "module": "python", + "source": "/home/wd15/git/LSMLIB", + "version": "6f5d969bb27530aa37452a8b096e538a5cf7b993", + "diff": "", + "path": "/home/wd15/git/LSMLIB/pylsmlib/pylsmlib" + }, + { + "name": "pysparse", + "module": "python", + "source": "attribute", + "version": "1.1", + "diff": "", + "path": "/usr/lib/python2.7/dist-packages/pysparse" + }, + { + "name": "pytz", + "module": "python", + "source": "attribute", + "version": "2011k", + "diff": "", + "path": "/usr/lib/python2.7/dist-packages/pytz" + }, + { + "name": "scipy", + "module": "python", + "source": "attribute", + "version": "0.10.1", + "diff": "", + "path": "/usr/lib/python2.7/dist-packages/scipy" + }, + { + "name": "setuptools", + "module": "python", + "source": "attribute", + "version": "0.6", + "diff": "", + "path": "/home/wd15/.virtualenvs/default/local/lib/python2.7/site-packages/distribute-0.6.24-py2.7.egg/setuptools" + }, + { + "name": "simplejson", + "module": "python", + "source": "attribute", + "version": "2.6.1", + "diff": "", + "path": "/usr/lib/python2.7/dist-packages/simplejson" + }, + { + "name": "skfmm", + "module": "python", + "source": "/home/wd15/git/scikit-fmm", + "version": "467e5982fbd9d4eb32495f826d6bda65da498e13", + "diff": "", + "path": "/home/wd15/git/scikit-fmm/skfmm" + }, + { + "name": "sumatra", + "module": "python", + "source": "attribute", + "version": "0.5.0dev", + "diff": "", + "path": "/home/wd15/.virtualenvs/default/lib/python2.7/site-packages/Sumatra-0.5.0dev-py2.7.egg/sumatra" + }, + { + "name": "tables", + "module": "python", + "source": "attribute", + "version": "2.3.1", + "diff": "", + "path": "/usr/lib/python2.7/dist-packages/tables" + }, + { + "name": "tagging", + "module": "python", + "source": "attribute", + "version": "0.3.1", + "diff": "", + "path": "/home/wd15/.virtualenvs/fipy/lib/python2.7/site-packages/tagging" + }, + { + "name": "tornado", + "module": "python", + "source": "attribute", + "version": "2.3", + "diff": "", + "path": "/usr/lib/python2.7/dist-packages/tornado" + }, + { + "name": "traits", + "module": "python", + "source": "attribute", + "version": "4.1.0", + "diff": "", + "path": "/usr/lib/python2.7/dist-packages/traits" + }, + { + "name": "tvtk", + "module": "python", + "source": null, + "version": "unknown", + "diff": "", + "path": "/usr/lib/python2.7/dist-packages/tvtk" + }, + { + "name": "vtk", + "module": "python", + "source": null, + "version": "unknown", + "diff": "", + "path": "/usr/lib/pymodules/python2.7/vtk" + }, + { + "name": "wx", + "module": "python", + "source": "attribute", + "version": "2.8.12.1", + "diff": "", + "path": "/usr/lib/python2.7/dist-packages/wx-2.8-gtk2-unicode/wx" + }, + { + "name": "yaml", + "module": "python", + "source": "attribute", + "version": "3.10", + "diff": "", + "path": "/usr/lib/python2.7/dist-packages/yaml" + }, + { + "name": "zmq", + "module": "python", + "source": "attribute", + "version": "2.2.0", + "diff": "", + "path": "/usr/lib/python2.7/dist-packages/zmq" + } + ], + "user": "Daniel Wheeler ", + "output_data": [ + { + "path": "data.h5", + "digest": "49bde0dbe50fa1ae9cc9dc5cf1398ad4a0c5a796", + "metadata": { + "mimetype": null, + "size": 102992, + "encoding": null + } + } + ], + "input_data": [], + "launch_mode": { + "type": "SerialLaunchMode", + "parameters": { + "working_directory": "/home/wd15/git/extremefill-data" + } + }, + "main_file": "script.py", + "outcome": "" +}, +{ + "script_arguments": "", + "platforms": [ + { + "system_name": "Linux", + "machine": "x86_64", + "version": "#35-Ubuntu SMP Thu Jan 24 13:15:40 UTC 2013", + "ip_addr": "127.0.0.1", + "architecture_bits": "64bit", + "architecture_linkage": "ELF", + "release": "3.5.0-23-generic", + "network_name": "loki", + "processor": "x86_64" + } + ], + "duration": 2.412522792816162, + "diff": "diff --git a/smt.py b/smt.py\nindex adb98c5..e978a2e 100644\n--- a/smt.py\n+++ b/smt.py\n@@ -46,12 +46,13 @@ class SMTLock:\n class Redirect:\n def __enter__(self):\n self.tmp_stdout = sys.stdout\n- sys.stdout = StringIO()\n- return sys.stdout\n+ self.target = StringIO()\n+ sys.stdout = self.target\n+ return self.target\n \n def __exit__(self, type, value, tb):\n sys.stdout = self.tmp_stdout\n-\n+ print self.target.getvalue()\n \n class SMTSimulation(object):\n def __init__(self, function, args=(), kwargs={}, tags=(), reason='', main_file=__file__):\n@@ -78,7 +79,6 @@ class SMTSimulation(object):\n with Redirect() as out:\n self.function(*self.args, **record.parameters.as_dict())\n \n- print out.getvalue()\n record.stdout_stderr = out.getvalue()\n record.duration = time.time() - record.start_time\n ", + "datastore": { + "type": "FileSystemDataStore", + "parameters": { + "root": "./Data/67537b5afbaa" + } + }, + "input_datastore": { + "type": "FileSystemDataStore", + "parameters": { + "root": "/" + } + }, + "executable": { + "path": "/home/wd15/.virtualenvs/default/bin/python", + "version": "2.7.3", + "name": "Python", + "options": "" + }, + "parameters": { + "content": "totalSteps = 1\ndatadir = \"./Data/67537b5afbaa\"", + "type": "SimpleParameterSet" + }, + "label": "67537b5afbaa", + "version": "13bcd18862c82a3573c3e7a1f32834a205056dbd", + "stdout_stderr": "[ 1. 1. 1. 1.]\n[ 0.34738209 0.61535499 0.01923836 0.00971058]\n[ 1.23729704e-01 2.14204081e-01 1.88311438e-04 1.55991524e-03]\n\ntheta 0.0\ncBar_supp 1.0\ncBar_cu 1.0\npotentialBar 1.0\nmin(extension) 7.22965473284e-08\nmin(depositionRate) 2.09114908795e-09\nmin(current) 56.8350759862\nmin(cupric) 997.266139623\nmin(baseCurrent) 56.9323002935\nmax(interfaceTheta) - 1: -0.973021297371\nmin(interfaceTheta) 0.0\nmin(I0) 38.9208518948\ndt 0.011\nelapsed time 0.0\nstep 0\n\n", + "repository": { + "url": "/home/wd15/git/extremefill-data", + "type": "GitRepository", + "upstream": "git@github.com:wd15/extremefill-data.git" + }, + "tags": [ + "test" + ], + "timestamp": "2013-02-17 21:53:07", + "reason": "testing SMT class", + "dependencies": [ + { + "name": "Cython", + "module": "python", + "source": "attribute", + "version": "0.16", + "diff": "", + "path": "/usr/lib/python2.7/dist-packages/Cython" + }, + { + "name": "IPython", + "module": "python", + "source": "attribute", + "version": "0.13.1.rc2", + "diff": "", + "path": "/usr/lib/python2.7/dist-packages/IPython" + }, + { + "name": "PIL", + "module": "python", + "source": null, + "version": "unknown", + "diff": "", + "path": "/usr/lib/python2.7/dist-packages/PIL" + }, + { + "name": "PyQt4", + "module": "python", + "source": null, + "version": "unknown", + "diff": "", + "path": "/usr/lib/python2.7/dist-packages/PyQt4" + }, + { + "name": "PyTrilinos", + "module": "python", + "source": "attribute", + "version": "4.8d", + "diff": "", + "path": "/home/wd15/.virtualenvs/fipy/lib/python2.7/site-packages/PyTrilinos" + }, + { + "name": "dateutil", + "module": "python", + "source": "attribute", + "version": "1.5", + "diff": "", + "path": "/usr/lib/python2.7/dist-packages/dateutil" + }, + { + "name": "distutils", + "module": "python", + "source": "attribute", + "version": "2.7.3", + "diff": "", + "path": "/home/wd15/.virtualenvs/default/lib/python2.7/distutils" + }, + { + "name": "django", + "module": "python", + "source": "attribute", + "version": "1.4.1", + "diff": "", + "path": "/usr/lib/python2.7/dist-packages/django" + }, + { + "name": "docutils", + "module": "python", + "source": "attribute", + "version": "0.10", + "diff": "", + "path": "/home/wd15/.virtualenvs/fipy/lib/python2.7/site-packages/docutils" + }, + { + "name": "encodings", + "module": "python", + "source": null, + "version": "unknown", + "diff": "", + "path": "/home/wd15/.virtualenvs/default/lib/python2.7/encodings" + }, + { + "name": "extremefill", + "module": "python", + "source": "/home/wd15/git/extremefill", + "version": "549c969edb113d0b3e9804612bfa53e91319c0ea", + "diff": "diff --git a/data/viewer.py b/data/viewer.py\nindex 68f60e0..d9ab7c2 100644\n--- a/data/viewer.py\n+++ b/data/viewer.py\n@@ -122,7 +122,7 @@ class ContourViewer(BaseViewer):\n self.times = times\n self.contours = contours\n self.data = []\n- super(ContourViewer, self).__init__(branches=branches, datafile=datafiles, datafiles=datafiles)\n+ super(ContourViewer, self).__init__(branches=branches, datafile=datafile, datafiles=datafiles)\n \n def plot(self):\n import matplotlib.pyplot as plt\n@@ -152,6 +152,24 @@ class ContourViewer(BaseViewer):\n phi = np.reshape(phi, shape)\n self.data.append((x, y, phi))\n \n+def datafilesFromBranches(branches, datafile):\n+ cwd = os.getcwd()\n+ for count, branch in enumerate(branches):\n+ print 'branch',branch\n+ tempdir = gitCloneToTemp(branch=branch, repositoryPath='ssh://wd15@genie.nist.gov/users/wd15/git/extremefill')\n+ repopath = os.path.join(tempdir, 'extremefill')\n+ datapath = os.path.join(repopath, datafile)\n+ gitMediaSync()\n+ if count == 0:\n+ self.addBaseData(datapath)\n+ basetempdir = tempdir\n+ else:\n+ self.addData(datapath, branch)\n+ cleanTempRepo(tempdir) \n+\n+ cleanTempRepo(basetempdir)\n+ os.chdir(cwd)\n+\n def plotNx():\n branches = ('Nx600', 'Nx300', 'Nx150')\n datafile = os.path.join('data', 'data.h5')\n@@ -174,13 +192,13 @@ def plotCFL():\n \n def plotContour():\n # branches = ('CFL0.0125', 'CFL0.025', 'CFL0.05', 'CFL0.1', 'CFL0.2', 'CFL0.4', 'CFL0.8', 'CFL1.6')\n- branches = ('Nx600', 'Nx150')\n+ branches = ('Nx300', 'Nx150')\n # branches = ('CFL0.025', 'CFL0.05')\n datafile = os.path.join('data', 'data.h5')\n times = (0,)\n- # times = (0., 1000., 2000., 3000., 4000.)\n- # viewer = ContourViewer(times=times, branches=branches, datafile=datafile)\n- viewer = ContourViewer(times=times, branches=branches, datafile=datafile, datafiles=('data150.h5', 'data600.h5'))\n+ times = (0., 1000., 2000., 3000., 4000.)\n+ viewer = ContourViewer(times=times, branches=branches, datafile=datafile)\n+ #viewer = ContourViewer(times=times, branches=branches, datafile=datafile, datafiles=('data150.h5', 'data600.h5'))\n viewer.plot()\n \n if __name__ == '__main__':\n@@ -188,6 +206,6 @@ if __name__ == '__main__':\n # from profiler import calibrate_profiler\n # fudge = calibrate_profiler(10000)\n # profile = Profiler('profile', fudge=fudge)\n- plotCFL()\n+ plotContour()\n # profile.stop()\n ", + "path": "/home/wd15/git/extremefill/extremefill" + }, + { + "name": "fipy", + "module": "python", + "source": "/home/wd15/git/fipy", + "version": "8c51478a3e8c30618b3a96c132612a46735c7548", + "diff": "", + "path": "/home/wd15/git/fipy/fipy" + }, + { + "name": "gi", + "module": "python", + "source": "attribute", + "version": "3.4.0", + "diff": "", + "path": "/usr/lib/python2.7/dist-packages/gi" + }, + { + "name": "glib", + "module": "python", + "source": null, + "version": "unknown", + "diff": "", + "path": "/usr/lib/python2.7/dist-packages/glib" + }, + { + "name": "gobject", + "module": "python", + "source": null, + "version": "unknown", + "diff": "", + "path": "/usr/lib/python2.7/dist-packages/gobject" + }, + { + "name": "google", + "module": "python", + "source": null, + "version": "unknown", + "diff": "", + "path": "/usr/lib/python2.7/dist-packages/google" + }, + { + "name": "gtk", + "module": "python", + "source": null, + "version": "unknown", + "diff": "", + "path": "/usr/lib/python2.7/dist-packages/gtk-2.0/gtk" + }, + { + "name": "httplib2", + "module": "python", + "source": "attribute", + "version": "0.7.4", + "diff": "", + "path": "/usr/lib/python2.7/dist-packages/httplib2" + }, + { + "name": "lockfile", + "module": "python", + "source": "egg-info", + "version": "0.9.1", + "diff": "", + "path": "/home/wd15/.virtualenvs/default/lib/python2.7/site-packages/lockfile-0.9.1-py2.7.egg/lockfile" + }, + { + "name": "lxml", + "module": "python", + "source": null, + "version": "unknown", + "diff": "", + "path": "/usr/lib/python2.7/dist-packages/lxml" + }, + { + "name": "matplotlib", + "module": "python", + "source": "attribute", + "version": "1.1.1", + "diff": "", + "path": "/usr/lib/pymodules/python2.7/matplotlib" + }, + { + "name": "mayavi", + "module": "python", + "source": "attribute", + "version": "4.1.0", + "diff": "", + "path": "/usr/lib/python2.7/dist-packages/mayavi" + }, + { + "name": "mpi4py", + "module": "python", + "source": "attribute", + "version": "1.3", + "diff": "", + "path": "/usr/lib/python2.7/dist-packages/mpi4py" + }, + { + "name": "mpl_toolkits", + "module": "python", + "source": null, + "version": "unknown", + "diff": "", + "path": "/usr/lib/pymodules/python2.7/mpl_toolkits" + }, + { + "name": "mx", + "module": "python", + "source": "attribute", + "version": "3.2.1", + "diff": "", + "path": "/usr/lib/python2.7/dist-packages/mx" + }, + { + "name": "nose", + "module": "python", + "source": "attribute", + "version": "1.2.1", + "diff": "", + "path": "/home/wd15/.virtualenvs/fipy/lib/python2.7/site-packages/nose" + }, + { + "name": "numexpr", + "module": "python", + "source": "attribute", + "version": "2.0.1", + "diff": "", + "path": "/usr/lib/python2.7/dist-packages/numexpr" + }, + { + "name": "numpy", + "module": "python", + "source": "attribute", + "version": "1.6.2", + "diff": "", + "path": "/usr/lib/python2.7/dist-packages/numpy" + }, + { + "name": "pyamg", + "module": "python", + "source": "attribute", + "version": "2.0.4.dev", + "diff": "", + "path": "/home/wd15/.virtualenvs/fipy/lib/python2.7/site-packages/pyamg" + }, + { + "name": "pylsmlib", + "module": "python", + "source": "/home/wd15/git/LSMLIB", + "version": "6f5d969bb27530aa37452a8b096e538a5cf7b993", + "diff": "", + "path": "/home/wd15/git/LSMLIB/pylsmlib/pylsmlib" + }, + { + "name": "pysparse", + "module": "python", + "source": "attribute", + "version": "1.1", + "diff": "", + "path": "/usr/lib/python2.7/dist-packages/pysparse" + }, + { + "name": "pytz", + "module": "python", + "source": "attribute", + "version": "2011k", + "diff": "", + "path": "/usr/lib/python2.7/dist-packages/pytz" + }, + { + "name": "scipy", + "module": "python", + "source": "attribute", + "version": "0.10.1", + "diff": "", + "path": "/usr/lib/python2.7/dist-packages/scipy" + }, + { + "name": "setuptools", + "module": "python", + "source": "attribute", + "version": "0.6", + "diff": "", + "path": "/home/wd15/.virtualenvs/default/local/lib/python2.7/site-packages/distribute-0.6.24-py2.7.egg/setuptools" + }, + { + "name": "simplejson", + "module": "python", + "source": "attribute", + "version": "2.6.1", + "diff": "", + "path": "/usr/lib/python2.7/dist-packages/simplejson" + }, + { + "name": "skfmm", + "module": "python", + "source": "/home/wd15/git/scikit-fmm", + "version": "467e5982fbd9d4eb32495f826d6bda65da498e13", + "diff": "", + "path": "/home/wd15/git/scikit-fmm/skfmm" + }, + { + "name": "sumatra", + "module": "python", + "source": "attribute", + "version": "0.5.0dev", + "diff": "", + "path": "/home/wd15/.virtualenvs/default/lib/python2.7/site-packages/Sumatra-0.5.0dev-py2.7.egg/sumatra" + }, + { + "name": "tables", + "module": "python", + "source": "attribute", + "version": "2.3.1", + "diff": "", + "path": "/usr/lib/python2.7/dist-packages/tables" + }, + { + "name": "tagging", + "module": "python", + "source": "attribute", + "version": "0.3.1", + "diff": "", + "path": "/home/wd15/.virtualenvs/fipy/lib/python2.7/site-packages/tagging" + }, + { + "name": "tornado", + "module": "python", + "source": "attribute", + "version": "2.3", + "diff": "", + "path": "/usr/lib/python2.7/dist-packages/tornado" + }, + { + "name": "traits", + "module": "python", + "source": "attribute", + "version": "4.1.0", + "diff": "", + "path": "/usr/lib/python2.7/dist-packages/traits" + }, + { + "name": "tvtk", + "module": "python", + "source": null, + "version": "unknown", + "diff": "", + "path": "/usr/lib/python2.7/dist-packages/tvtk" + }, + { + "name": "vtk", + "module": "python", + "source": null, + "version": "unknown", + "diff": "", + "path": "/usr/lib/pymodules/python2.7/vtk" + }, + { + "name": "wx", + "module": "python", + "source": "attribute", + "version": "2.8.12.1", + "diff": "", + "path": "/usr/lib/python2.7/dist-packages/wx-2.8-gtk2-unicode/wx" + }, + { + "name": "yaml", + "module": "python", + "source": "attribute", + "version": "3.10", + "diff": "", + "path": "/usr/lib/python2.7/dist-packages/yaml" + }, + { + "name": "zmq", + "module": "python", + "source": "attribute", + "version": "2.2.0", + "diff": "", + "path": "/usr/lib/python2.7/dist-packages/zmq" + } + ], + "user": "Daniel Wheeler ", + "output_data": [ + { + "path": "data.h5", + "digest": "a4aaac3452c67fe73070cdd60f81389fd84abe2c", + "metadata": { + "mimetype": null, + "size": 102992, + "encoding": null + } + } + ], + "input_data": [], + "launch_mode": { + "type": "SerialLaunchMode", + "parameters": { + "working_directory": "/home/wd15/git/extremefill-data" + } + }, + "main_file": "script.py", + "outcome": "" +}, +{ + "script_arguments": "", + "platforms": [ + { + "system_name": "Linux", + "machine": "x86_64", + "version": "#35-Ubuntu SMP Thu Jan 24 13:15:40 UTC 2013", + "ip_addr": "127.0.0.1", + "architecture_bits": "64bit", + "architecture_linkage": "ELF", + "release": "3.5.0-23-generic", + "network_name": "loki", + "processor": "x86_64" + } + ], + "duration": 2.4760689735412598, + "diff": "diff --git a/script.py b/script.py\nindex cd4453d..a2a7a03 100644\n--- a/script.py\n+++ b/script.py\n@@ -32,5 +32,5 @@ def run(totalSteps=10,\n \n from smt import SMTSimulation\n \n-SMTSimulation(run, kwargs={'totalSteps' : 1}, tags=('test',), reason=\"testing decorator\", main_file=__file__)\n-\n+smtsim = SMTSimulation(run, kwargs={'totalSteps' : 1}, tags=('test',), reason=\"testing SMT class\", main_file=__file__)\n+smtsim.launch()\ndiff --git a/smt.py b/smt.py\nindex cdc7015..d8308ab 100644\n--- a/smt.py\n+++ b/smt.py\n@@ -22,6 +22,8 @@ On laptop use http://129.6.153.60:8000\n import time\n import os\n import sys\n+from contextlib import contextmanager\n+from StringIO import StringIO\n \n \n from sumatra.projects import load_project\n@@ -30,43 +32,59 @@ from sumatra.projects import _get_project_file\n import lockfile\n \n \n-class Writer(object):\n- log = []\n- def write(self, data):\n- self.log.append(data)\n+class SMTLock:\n+ def __init__(self, project):\n+ self.lock = lockfile.FileLock(os.path.split(_get_project_file(project.path))[0])\n \n+ def __enter__(self):\n+ self.lock.acquire()\n \n-def SMTSimulation(function, args=(), kwargs={}, tags=(), reason='', main_file=__file__):\n- project = load_project()\n- record = project.new_record(parameters=SimpleParameterSet(kwargs),\n- main_file=main_file,\n- reason=reason)\n+ def __exit__(self, type, value, tb):\n+ self.lock.release()\n \n- record.datastore.root = os.path.join(record.datastore.root, record.label)\n- record.parameters.update({'datadir': record.datastore.root})\n \n- for tag in tags:\n- record.tags.add(tag)\n+class Redirect:\n+ def __enter__(self):\n+ self.tmp_stdout = sys.stdout\n+ sys.stdout = StringIO()\n+ return sys.stdout\n+ \n+ def __exit__(self, type, value, tb):\n+ sys.stdout = self.tmp_stdout\n \n- record.start_time = time.time()\n+ \n+class SMTSimulation(object):\n+ def __init__(self, function, args=(), kwargs={}, tags=(), reason='', main_file=__file__):\n+ project = load_project()\n+ record = project.new_record(parameters=SimpleParameterSet(kwargs),\n+ main_file=main_file,\n+ reason=reason)\n \n- ## http://stackoverflow.com/questions/4675728/redirect-stdout-to-a-file-in-python\n- ## see the last post in this thread\n- logger = Writer()\n- stdout_stderr = sys.stdout, sys.stderr\n- sys.stdout, sys.stderr = logger, logger\n+ record.datastore.root = os.path.join(record.datastore.root, record.label)\n+ record.parameters.update({'datadir': record.datastore.root})\n \n- function(*args, **record.parameters.as_dict())\n+ for tag in tags:\n+ record.tags.add(tag)\n \n- sys.stdout, sys.stderr = stdout_stderr\n- record.stdout_stderr = logger.log\n- print logger.log\n- record.duration = time.time() - record.start_time\n- record.output_data = record.datastore.find_new_data(record.timestamp)\n+ self.record = record\n+ self.project = project\n+ self.function = function\n+ self.args = args\n+ \n+ def launch(self):\n+ record = self.record\n+ record.start_time = time.time()\n \n- lock = lockfile.FileLock(os.path.split(_get_project_file(project.path))[0])\n- lock.acquire()\n- project.add_record(record)\n- project.save()\n- lock.release()\n+ with Redirect() as out:\n+ self.function(*self.args, **record.parameters.as_dict())\n \n+ print out\n+ print out.getvalue()\n+ record.stdout_stderr = out.getvalue()\n+ record.duration = time.time() - record.start_time\n+\n+ record.output_data = record.datastore.find_new_data(record.timestamp)\n+\n+ with SMTLock(self.project):\n+ self.project.add_record(record)\n+ self.project.save()", + "datastore": { + "type": "FileSystemDataStore", + "parameters": { + "root": "./Data/5e56dd2b69d6" + } + }, + "input_datastore": { + "type": "FileSystemDataStore", + "parameters": { + "root": "/" + } + }, + "executable": { + "path": "/home/wd15/.virtualenvs/default/bin/python", + "version": "2.7.3", + "name": "Python", + "options": "" + }, + "parameters": { + "content": "totalSteps = 1\ndatadir = \"./Data/5e56dd2b69d6\"", + "type": "SimpleParameterSet" + }, + "label": "5e56dd2b69d6", + "version": "dbe0f00a15307cd92b19e14677d61097315669fb", + "stdout_stderr": "[ 1. 1. 1. 1.]\n[ 0.34738209 0.61535499 0.01923836 0.00971058]\n[ 1.23729704e-01 2.14204081e-01 1.88311438e-04 1.55991524e-03]\n\ntheta 0.0\ncBar_supp 1.0\ncBar_cu 1.0\npotentialBar 1.0\nmin(extension) 7.22965473284e-08\nmin(depositionRate) 2.09114908795e-09\nmin(current) 56.8350759862\nmin(cupric) 997.266139623\nmin(baseCurrent) 56.9323002935\nmax(interfaceTheta) - 1: -0.973021297371\nmin(interfaceTheta) 0.0\nmin(I0) 38.9208518948\ndt 0.011\nelapsed time 0.0\nstep 0\n\n", + "repository": { + "url": "/home/wd15/git/extremefill-data", + "type": "GitRepository", + "upstream": "git@github.com:wd15/extremefill-data.git" + }, + "tags": [ + "test" + ], + "timestamp": "2013-02-16 23:01:00", + "reason": "testing SMT class", + "dependencies": [ + { + "name": "Cython", + "module": "python", + "source": "attribute", + "version": "0.16", + "diff": "", + "path": "/usr/lib/python2.7/dist-packages/Cython" + }, + { + "name": "IPython", + "module": "python", + "source": "attribute", + "version": "0.13.1.rc2", + "diff": "", + "path": "/usr/lib/python2.7/dist-packages/IPython" + }, + { + "name": "PIL", + "module": "python", + "source": null, + "version": "unknown", + "diff": "", + "path": "/usr/lib/python2.7/dist-packages/PIL" + }, + { + "name": "PyQt4", + "module": "python", + "source": null, + "version": "unknown", + "diff": "", + "path": "/usr/lib/python2.7/dist-packages/PyQt4" + }, + { + "name": "PyTrilinos", + "module": "python", + "source": "attribute", + "version": "4.8d", + "diff": "", + "path": "/home/wd15/.virtualenvs/fipy/lib/python2.7/site-packages/PyTrilinos" + }, + { + "name": "dateutil", + "module": "python", + "source": "attribute", + "version": "1.5", + "diff": "", + "path": "/usr/lib/python2.7/dist-packages/dateutil" + }, + { + "name": "distutils", + "module": "python", + "source": "attribute", + "version": "2.7.3", + "diff": "", + "path": "/home/wd15/.virtualenvs/default/lib/python2.7/distutils" + }, + { + "name": "django", + "module": "python", + "source": "attribute", + "version": "1.4.1", + "diff": "", + "path": "/usr/lib/python2.7/dist-packages/django" + }, + { + "name": "docutils", + "module": "python", + "source": "attribute", + "version": "0.10", + "diff": "", + "path": "/home/wd15/.virtualenvs/fipy/lib/python2.7/site-packages/docutils" + }, + { + "name": "encodings", + "module": "python", + "source": null, + "version": "unknown", + "diff": "", + "path": "/home/wd15/.virtualenvs/default/lib/python2.7/encodings" + }, + { + "name": "extremefill", + "module": "python", + "source": "/home/wd15/git/extremefill", + "version": "549c969edb113d0b3e9804612bfa53e91319c0ea", + "diff": "diff --git a/data/viewer.py b/data/viewer.py\nindex 68f60e0..d9ab7c2 100644\n--- a/data/viewer.py\n+++ b/data/viewer.py\n@@ -122,7 +122,7 @@ class ContourViewer(BaseViewer):\n self.times = times\n self.contours = contours\n self.data = []\n- super(ContourViewer, self).__init__(branches=branches, datafile=datafiles, datafiles=datafiles)\n+ super(ContourViewer, self).__init__(branches=branches, datafile=datafile, datafiles=datafiles)\n \n def plot(self):\n import matplotlib.pyplot as plt\n@@ -152,6 +152,24 @@ class ContourViewer(BaseViewer):\n phi = np.reshape(phi, shape)\n self.data.append((x, y, phi))\n \n+def datafilesFromBranches(branches, datafile):\n+ cwd = os.getcwd()\n+ for count, branch in enumerate(branches):\n+ print 'branch',branch\n+ tempdir = gitCloneToTemp(branch=branch, repositoryPath='ssh://wd15@genie.nist.gov/users/wd15/git/extremefill')\n+ repopath = os.path.join(tempdir, 'extremefill')\n+ datapath = os.path.join(repopath, datafile)\n+ gitMediaSync()\n+ if count == 0:\n+ self.addBaseData(datapath)\n+ basetempdir = tempdir\n+ else:\n+ self.addData(datapath, branch)\n+ cleanTempRepo(tempdir) \n+\n+ cleanTempRepo(basetempdir)\n+ os.chdir(cwd)\n+\n def plotNx():\n branches = ('Nx600', 'Nx300', 'Nx150')\n datafile = os.path.join('data', 'data.h5')\n@@ -174,13 +192,13 @@ def plotCFL():\n \n def plotContour():\n # branches = ('CFL0.0125', 'CFL0.025', 'CFL0.05', 'CFL0.1', 'CFL0.2', 'CFL0.4', 'CFL0.8', 'CFL1.6')\n- branches = ('Nx600', 'Nx150')\n+ branches = ('Nx300', 'Nx150')\n # branches = ('CFL0.025', 'CFL0.05')\n datafile = os.path.join('data', 'data.h5')\n times = (0,)\n- # times = (0., 1000., 2000., 3000., 4000.)\n- # viewer = ContourViewer(times=times, branches=branches, datafile=datafile)\n- viewer = ContourViewer(times=times, branches=branches, datafile=datafile, datafiles=('data150.h5', 'data600.h5'))\n+ times = (0., 1000., 2000., 3000., 4000.)\n+ viewer = ContourViewer(times=times, branches=branches, datafile=datafile)\n+ #viewer = ContourViewer(times=times, branches=branches, datafile=datafile, datafiles=('data150.h5', 'data600.h5'))\n viewer.plot()\n \n if __name__ == '__main__':\n@@ -188,6 +206,6 @@ if __name__ == '__main__':\n # from profiler import calibrate_profiler\n # fudge = calibrate_profiler(10000)\n # profile = Profiler('profile', fudge=fudge)\n- plotCFL()\n+ plotContour()\n # profile.stop()\n ", + "path": "/home/wd15/git/extremefill/extremefill" + }, + { + "name": "fipy", + "module": "python", + "source": "/home/wd15/git/fipy", + "version": "8c51478a3e8c30618b3a96c132612a46735c7548", + "diff": "", + "path": "/home/wd15/git/fipy/fipy" + }, + { + "name": "gi", + "module": "python", + "source": "attribute", + "version": "3.4.0", + "diff": "", + "path": "/usr/lib/python2.7/dist-packages/gi" + }, + { + "name": "glib", + "module": "python", + "source": null, + "version": "unknown", + "diff": "", + "path": "/usr/lib/python2.7/dist-packages/glib" + }, + { + "name": "gobject", + "module": "python", + "source": null, + "version": "unknown", + "diff": "", + "path": "/usr/lib/python2.7/dist-packages/gobject" + }, + { + "name": "google", + "module": "python", + "source": null, + "version": "unknown", + "diff": "", + "path": "/usr/lib/python2.7/dist-packages/google" + }, + { + "name": "gtk", + "module": "python", + "source": null, + "version": "unknown", + "diff": "", + "path": "/usr/lib/python2.7/dist-packages/gtk-2.0/gtk" + }, + { + "name": "httplib2", + "module": "python", + "source": "attribute", + "version": "0.7.4", + "diff": "", + "path": "/usr/lib/python2.7/dist-packages/httplib2" + }, + { + "name": "lockfile", + "module": "python", + "source": "egg-info", + "version": "0.9.1", + "diff": "", + "path": "/home/wd15/.virtualenvs/default/lib/python2.7/site-packages/lockfile-0.9.1-py2.7.egg/lockfile" + }, + { + "name": "lxml", + "module": "python", + "source": null, + "version": "unknown", + "diff": "", + "path": "/usr/lib/python2.7/dist-packages/lxml" + }, + { + "name": "matplotlib", + "module": "python", + "source": "attribute", + "version": "1.1.1", + "diff": "", + "path": "/usr/lib/pymodules/python2.7/matplotlib" + }, + { + "name": "mayavi", + "module": "python", + "source": "attribute", + "version": "4.1.0", + "diff": "", + "path": "/usr/lib/python2.7/dist-packages/mayavi" + }, + { + "name": "mpi4py", + "module": "python", + "source": "attribute", + "version": "1.3", + "diff": "", + "path": "/usr/lib/python2.7/dist-packages/mpi4py" + }, + { + "name": "mpl_toolkits", + "module": "python", + "source": null, + "version": "unknown", + "diff": "", + "path": "/usr/lib/pymodules/python2.7/mpl_toolkits" + }, + { + "name": "mx", + "module": "python", + "source": "attribute", + "version": "3.2.1", + "diff": "", + "path": "/usr/lib/python2.7/dist-packages/mx" + }, + { + "name": "nose", + "module": "python", + "source": "attribute", + "version": "1.2.1", + "diff": "", + "path": "/home/wd15/.virtualenvs/fipy/lib/python2.7/site-packages/nose" + }, + { + "name": "numexpr", + "module": "python", + "source": "attribute", + "version": "2.0.1", + "diff": "", + "path": "/usr/lib/python2.7/dist-packages/numexpr" + }, + { + "name": "numpy", + "module": "python", + "source": "attribute", + "version": "1.6.2", + "diff": "", + "path": "/usr/lib/python2.7/dist-packages/numpy" + }, + { + "name": "pyamg", + "module": "python", + "source": "attribute", + "version": "2.0.4.dev", + "diff": "", + "path": "/home/wd15/.virtualenvs/fipy/lib/python2.7/site-packages/pyamg" + }, + { + "name": "pylsmlib", + "module": "python", + "source": "/home/wd15/git/LSMLIB", + "version": "6f5d969bb27530aa37452a8b096e538a5cf7b993", + "diff": "", + "path": "/home/wd15/git/LSMLIB/pylsmlib/pylsmlib" + }, + { + "name": "pysparse", + "module": "python", + "source": "attribute", + "version": "1.1", + "diff": "", + "path": "/usr/lib/python2.7/dist-packages/pysparse" + }, + { + "name": "pytz", + "module": "python", + "source": "attribute", + "version": "2011k", + "diff": "", + "path": "/usr/lib/python2.7/dist-packages/pytz" + }, + { + "name": "scipy", + "module": "python", + "source": "attribute", + "version": "0.10.1", + "diff": "", + "path": "/usr/lib/python2.7/dist-packages/scipy" + }, + { + "name": "setuptools", + "module": "python", + "source": "attribute", + "version": "0.6", + "diff": "", + "path": "/home/wd15/.virtualenvs/default/local/lib/python2.7/site-packages/distribute-0.6.24-py2.7.egg/setuptools" + }, + { + "name": "simplejson", + "module": "python", + "source": "attribute", + "version": "2.6.1", + "diff": "", + "path": "/usr/lib/python2.7/dist-packages/simplejson" + }, + { + "name": "skfmm", + "module": "python", + "source": "/home/wd15/git/scikit-fmm", + "version": "467e5982fbd9d4eb32495f826d6bda65da498e13", + "diff": "", + "path": "/home/wd15/git/scikit-fmm/skfmm" + }, + { + "name": "sumatra", + "module": "python", + "source": "attribute", + "version": "0.5.0dev", + "diff": "", + "path": "/home/wd15/.virtualenvs/default/lib/python2.7/site-packages/Sumatra-0.5.0dev-py2.7.egg/sumatra" + }, + { + "name": "tables", + "module": "python", + "source": "attribute", + "version": "2.3.1", + "diff": "", + "path": "/usr/lib/python2.7/dist-packages/tables" + }, + { + "name": "tagging", + "module": "python", + "source": "attribute", + "version": "0.3.1", + "diff": "", + "path": "/home/wd15/.virtualenvs/fipy/lib/python2.7/site-packages/tagging" + }, + { + "name": "tornado", + "module": "python", + "source": "attribute", + "version": "2.3", + "diff": "", + "path": "/usr/lib/python2.7/dist-packages/tornado" + }, + { + "name": "traits", + "module": "python", + "source": "attribute", + "version": "4.1.0", + "diff": "", + "path": "/usr/lib/python2.7/dist-packages/traits" + }, + { + "name": "tvtk", + "module": "python", + "source": null, + "version": "unknown", + "diff": "", + "path": "/usr/lib/python2.7/dist-packages/tvtk" + }, + { + "name": "vtk", + "module": "python", + "source": null, + "version": "unknown", + "diff": "", + "path": "/usr/lib/pymodules/python2.7/vtk" + }, + { + "name": "wx", + "module": "python", + "source": "attribute", + "version": "2.8.12.1", + "diff": "", + "path": "/usr/lib/python2.7/dist-packages/wx-2.8-gtk2-unicode/wx" + }, + { + "name": "yaml", + "module": "python", + "source": "attribute", + "version": "3.10", + "diff": "", + "path": "/usr/lib/python2.7/dist-packages/yaml" + }, + { + "name": "zmq", + "module": "python", + "source": "attribute", + "version": "2.2.0", + "diff": "", + "path": "/usr/lib/python2.7/dist-packages/zmq" + } + ], + "user": "Daniel Wheeler ", + "output_data": [ + { + "path": "data.h5", + "digest": "a520ed21e7ba5adee13e25f432ace709c3a1b834", + "metadata": { + "mimetype": null, + "size": 102992, + "encoding": null + } + } + ], + "input_data": [], + "launch_mode": { + "type": "SerialLaunchMode", + "parameters": { + "working_directory": "/home/wd15/git/extremefill-data" + } + }, + "main_file": "script.py", + "outcome": "" +}, +{ + "script_arguments": "", + "platforms": [ + { + "system_name": "Linux", + "machine": "x86_64", + "version": "#35-Ubuntu SMP Thu Jan 24 13:15:40 UTC 2013", + "ip_addr": "127.0.0.1", + "architecture_bits": "64bit", + "architecture_linkage": "ELF", + "release": "3.5.0-23-generic", + "network_name": "loki", + "processor": "x86_64" + } + ], + "duration": 2.387367010116577, + "diff": "diff --git a/script.py b/script.py\nindex cd4453d..a2a7a03 100644\n--- a/script.py\n+++ b/script.py\n@@ -32,5 +32,5 @@ def run(totalSteps=10,\n \n from smt import SMTSimulation\n \n-SMTSimulation(run, kwargs={'totalSteps' : 1}, tags=('test',), reason=\"testing decorator\", main_file=__file__)\n-\n+smtsim = SMTSimulation(run, kwargs={'totalSteps' : 1}, tags=('test',), reason=\"testing SMT class\", main_file=__file__)\n+smtsim.launch()\ndiff --git a/smt.py b/smt.py\nindex cdc7015..5027f10 100644\n--- a/smt.py\n+++ b/smt.py\n@@ -22,6 +22,8 @@ On laptop use http://129.6.153.60:8000\n import time\n import os\n import sys\n+from contextlib import contextmanager\n+from StringIO import StringIO\n \n \n from sumatra.projects import load_project\n@@ -30,43 +32,59 @@ from sumatra.projects import _get_project_file\n import lockfile\n \n \n-class Writer(object):\n- log = []\n- def write(self, data):\n- self.log.append(data)\n+class SMTLock:\n+ def __init__(self, project):\n+ self.lock = lockfile.FileLock(os.path.split(_get_project_file(project.path))[0])\n \n+ def __enter__(self):\n+ self.lock.acquire()\n \n-def SMTSimulation(function, args=(), kwargs={}, tags=(), reason='', main_file=__file__):\n- project = load_project()\n- record = project.new_record(parameters=SimpleParameterSet(kwargs),\n- main_file=main_file,\n- reason=reason)\n+ def __exit__(self, type, value, tb):\n+ self.lock.release()\n \n- record.datastore.root = os.path.join(record.datastore.root, record.label)\n- record.parameters.update({'datadir': record.datastore.root})\n \n- for tag in tags:\n- record.tags.add(tag)\n+class Redirect:\n+ def __enter__(self):\n+ self.tmp_stdout = sys.stdout\n+ sys.stdout = StringIO()\n+ return sys.stdout\n+ \n+ def __exit__(self, type, value, tb):\n+ sys.stdout = self.tmp_stdout\n \n- record.start_time = time.time()\n+ \n+class SMTSimulation(object):\n+ def __init__(self, function, args=(), kwargs={}, tags=(), reason='', main_file=__file__):\n+ project = load_project()\n+ record = project.new_record(parameters=SimpleParameterSet(kwargs),\n+ main_file=main_file,\n+ reason=reason)\n \n- ## http://stackoverflow.com/questions/4675728/redirect-stdout-to-a-file-in-python\n- ## see the last post in this thread\n- logger = Writer()\n- stdout_stderr = sys.stdout, sys.stderr\n- sys.stdout, sys.stderr = logger, logger\n+ record.datastore.root = os.path.join(record.datastore.root, record.label)\n+ record.parameters.update({'datadir': record.datastore.root})\n \n- function(*args, **record.parameters.as_dict())\n+ for tag in tags:\n+ record.tags.add(tag)\n \n- sys.stdout, sys.stderr = stdout_stderr\n- record.stdout_stderr = logger.log\n- print logger.log\n- record.duration = time.time() - record.start_time\n- record.output_data = record.datastore.find_new_data(record.timestamp)\n+ self.record = record\n+ self.project = project\n+ self.function = function\n+ self.args = args\n+ \n+ def launch(self):\n+ record = self.record\n+ record.start_time = time.time()\n \n- lock = lockfile.FileLock(os.path.split(_get_project_file(project.path))[0])\n- lock.acquire()\n- project.add_record(record)\n- project.save()\n- lock.release()\n+ with Redirect() as out:\n+ self.function(*self.args, **record.parameters.as_dict())\n \n+ print type(out.getvalue())\n+ print out.getvalue()\n+ record.stdout_stderr = out.getvalue()\n+ record.duration = time.time() - record.start_time\n+\n+ record.output_data = record.datastore.find_new_data(record.timestamp)\n+\n+ with SMTLock(self.project):\n+ self.project.add_record(record)\n+ self.project.save()", + "datastore": { + "type": "FileSystemDataStore", + "parameters": { + "root": "./Data/f5bcb64b6102" + } + }, + "input_datastore": { + "type": "FileSystemDataStore", + "parameters": { + "root": "/" + } + }, + "executable": { + "path": "/home/wd15/.virtualenvs/default/bin/python", + "version": "2.7.3", + "name": "Python", + "options": "" + }, + "parameters": { + "content": "totalSteps = 1\ndatadir = \"./Data/f5bcb64b6102\"", + "type": "SimpleParameterSet" + }, + "label": "f5bcb64b6102", + "version": "dbe0f00a15307cd92b19e14677d61097315669fb", + "stdout_stderr": "[ 1. 1. 1. 1.]\n[ 0.34738209 0.61535499 0.01923836 0.00971058]\n[ 1.23729704e-01 2.14204081e-01 1.88311438e-04 1.55991524e-03]\n\ntheta 0.0\ncBar_supp 1.0\ncBar_cu 1.0\npotentialBar 1.0\nmin(extension) 7.22965473284e-08\nmin(depositionRate) 2.09114908795e-09\nmin(current) 56.8350759862\nmin(cupric) 997.266139623\nmin(baseCurrent) 56.9323002935\nmax(interfaceTheta) - 1: -0.973021297371\nmin(interfaceTheta) 0.0\nmin(I0) 38.9208518948\ndt 0.011\nelapsed time 0.0\nstep 0\n\n", + "repository": { + "url": "/home/wd15/git/extremefill-data", + "type": "GitRepository", + "upstream": "git@github.com:wd15/extremefill-data.git" + }, + "tags": [ + "test" + ], + "timestamp": "2013-02-16 23:00:24", + "reason": "testing SMT class", + "dependencies": [ + { + "name": "Cython", + "module": "python", + "source": "attribute", + "version": "0.16", + "diff": "", + "path": "/usr/lib/python2.7/dist-packages/Cython" + }, + { + "name": "IPython", + "module": "python", + "source": "attribute", + "version": "0.13.1.rc2", + "diff": "", + "path": "/usr/lib/python2.7/dist-packages/IPython" + }, + { + "name": "PIL", + "module": "python", + "source": null, + "version": "unknown", + "diff": "", + "path": "/usr/lib/python2.7/dist-packages/PIL" + }, + { + "name": "PyQt4", + "module": "python", + "source": null, + "version": "unknown", + "diff": "", + "path": "/usr/lib/python2.7/dist-packages/PyQt4" + }, + { + "name": "PyTrilinos", + "module": "python", + "source": "attribute", + "version": "4.8d", + "diff": "", + "path": "/home/wd15/.virtualenvs/fipy/lib/python2.7/site-packages/PyTrilinos" + }, + { + "name": "dateutil", + "module": "python", + "source": "attribute", + "version": "1.5", + "diff": "", + "path": "/usr/lib/python2.7/dist-packages/dateutil" + }, + { + "name": "distutils", + "module": "python", + "source": "attribute", + "version": "2.7.3", + "diff": "", + "path": "/home/wd15/.virtualenvs/default/lib/python2.7/distutils" + }, + { + "name": "django", + "module": "python", + "source": "attribute", + "version": "1.4.1", + "diff": "", + "path": "/usr/lib/python2.7/dist-packages/django" + }, + { + "name": "docutils", + "module": "python", + "source": "attribute", + "version": "0.10", + "diff": "", + "path": "/home/wd15/.virtualenvs/fipy/lib/python2.7/site-packages/docutils" + }, + { + "name": "encodings", + "module": "python", + "source": null, + "version": "unknown", + "diff": "", + "path": "/home/wd15/.virtualenvs/default/lib/python2.7/encodings" + }, + { + "name": "extremefill", + "module": "python", + "source": "/home/wd15/git/extremefill", + "version": "549c969edb113d0b3e9804612bfa53e91319c0ea", + "diff": "diff --git a/data/viewer.py b/data/viewer.py\nindex 68f60e0..d9ab7c2 100644\n--- a/data/viewer.py\n+++ b/data/viewer.py\n@@ -122,7 +122,7 @@ class ContourViewer(BaseViewer):\n self.times = times\n self.contours = contours\n self.data = []\n- super(ContourViewer, self).__init__(branches=branches, datafile=datafiles, datafiles=datafiles)\n+ super(ContourViewer, self).__init__(branches=branches, datafile=datafile, datafiles=datafiles)\n \n def plot(self):\n import matplotlib.pyplot as plt\n@@ -152,6 +152,24 @@ class ContourViewer(BaseViewer):\n phi = np.reshape(phi, shape)\n self.data.append((x, y, phi))\n \n+def datafilesFromBranches(branches, datafile):\n+ cwd = os.getcwd()\n+ for count, branch in enumerate(branches):\n+ print 'branch',branch\n+ tempdir = gitCloneToTemp(branch=branch, repositoryPath='ssh://wd15@genie.nist.gov/users/wd15/git/extremefill')\n+ repopath = os.path.join(tempdir, 'extremefill')\n+ datapath = os.path.join(repopath, datafile)\n+ gitMediaSync()\n+ if count == 0:\n+ self.addBaseData(datapath)\n+ basetempdir = tempdir\n+ else:\n+ self.addData(datapath, branch)\n+ cleanTempRepo(tempdir) \n+\n+ cleanTempRepo(basetempdir)\n+ os.chdir(cwd)\n+\n def plotNx():\n branches = ('Nx600', 'Nx300', 'Nx150')\n datafile = os.path.join('data', 'data.h5')\n@@ -174,13 +192,13 @@ def plotCFL():\n \n def plotContour():\n # branches = ('CFL0.0125', 'CFL0.025', 'CFL0.05', 'CFL0.1', 'CFL0.2', 'CFL0.4', 'CFL0.8', 'CFL1.6')\n- branches = ('Nx600', 'Nx150')\n+ branches = ('Nx300', 'Nx150')\n # branches = ('CFL0.025', 'CFL0.05')\n datafile = os.path.join('data', 'data.h5')\n times = (0,)\n- # times = (0., 1000., 2000., 3000., 4000.)\n- # viewer = ContourViewer(times=times, branches=branches, datafile=datafile)\n- viewer = ContourViewer(times=times, branches=branches, datafile=datafile, datafiles=('data150.h5', 'data600.h5'))\n+ times = (0., 1000., 2000., 3000., 4000.)\n+ viewer = ContourViewer(times=times, branches=branches, datafile=datafile)\n+ #viewer = ContourViewer(times=times, branches=branches, datafile=datafile, datafiles=('data150.h5', 'data600.h5'))\n viewer.plot()\n \n if __name__ == '__main__':\n@@ -188,6 +206,6 @@ if __name__ == '__main__':\n # from profiler import calibrate_profiler\n # fudge = calibrate_profiler(10000)\n # profile = Profiler('profile', fudge=fudge)\n- plotCFL()\n+ plotContour()\n # profile.stop()\n ", + "path": "/home/wd15/git/extremefill/extremefill" + }, + { + "name": "fipy", + "module": "python", + "source": "/home/wd15/git/fipy", + "version": "8c51478a3e8c30618b3a96c132612a46735c7548", + "diff": "", + "path": "/home/wd15/git/fipy/fipy" + }, + { + "name": "gi", + "module": "python", + "source": "attribute", + "version": "3.4.0", + "diff": "", + "path": "/usr/lib/python2.7/dist-packages/gi" + }, + { + "name": "glib", + "module": "python", + "source": null, + "version": "unknown", + "diff": "", + "path": "/usr/lib/python2.7/dist-packages/glib" + }, + { + "name": "gobject", + "module": "python", + "source": null, + "version": "unknown", + "diff": "", + "path": "/usr/lib/python2.7/dist-packages/gobject" + }, + { + "name": "google", + "module": "python", + "source": null, + "version": "unknown", + "diff": "", + "path": "/usr/lib/python2.7/dist-packages/google" + }, + { + "name": "gtk", + "module": "python", + "source": null, + "version": "unknown", + "diff": "", + "path": "/usr/lib/python2.7/dist-packages/gtk-2.0/gtk" + }, + { + "name": "httplib2", + "module": "python", + "source": "attribute", + "version": "0.7.4", + "diff": "", + "path": "/usr/lib/python2.7/dist-packages/httplib2" + }, + { + "name": "lockfile", + "module": "python", + "source": "egg-info", + "version": "0.9.1", + "diff": "", + "path": "/home/wd15/.virtualenvs/default/lib/python2.7/site-packages/lockfile-0.9.1-py2.7.egg/lockfile" + }, + { + "name": "lxml", + "module": "python", + "source": null, + "version": "unknown", + "diff": "", + "path": "/usr/lib/python2.7/dist-packages/lxml" + }, + { + "name": "matplotlib", + "module": "python", + "source": "attribute", + "version": "1.1.1", + "diff": "", + "path": "/usr/lib/pymodules/python2.7/matplotlib" + }, + { + "name": "mayavi", + "module": "python", + "source": "attribute", + "version": "4.1.0", + "diff": "", + "path": "/usr/lib/python2.7/dist-packages/mayavi" + }, + { + "name": "mpi4py", + "module": "python", + "source": "attribute", + "version": "1.3", + "diff": "", + "path": "/usr/lib/python2.7/dist-packages/mpi4py" + }, + { + "name": "mpl_toolkits", + "module": "python", + "source": null, + "version": "unknown", + "diff": "", + "path": "/usr/lib/pymodules/python2.7/mpl_toolkits" + }, + { + "name": "mx", + "module": "python", + "source": "attribute", + "version": "3.2.1", + "diff": "", + "path": "/usr/lib/python2.7/dist-packages/mx" + }, + { + "name": "nose", + "module": "python", + "source": "attribute", + "version": "1.2.1", + "diff": "", + "path": "/home/wd15/.virtualenvs/fipy/lib/python2.7/site-packages/nose" + }, + { + "name": "numexpr", + "module": "python", + "source": "attribute", + "version": "2.0.1", + "diff": "", + "path": "/usr/lib/python2.7/dist-packages/numexpr" + }, + { + "name": "numpy", + "module": "python", + "source": "attribute", + "version": "1.6.2", + "diff": "", + "path": "/usr/lib/python2.7/dist-packages/numpy" + }, + { + "name": "pyamg", + "module": "python", + "source": "attribute", + "version": "2.0.4.dev", + "diff": "", + "path": "/home/wd15/.virtualenvs/fipy/lib/python2.7/site-packages/pyamg" + }, + { + "name": "pylsmlib", + "module": "python", + "source": "/home/wd15/git/LSMLIB", + "version": "6f5d969bb27530aa37452a8b096e538a5cf7b993", + "diff": "", + "path": "/home/wd15/git/LSMLIB/pylsmlib/pylsmlib" + }, + { + "name": "pysparse", + "module": "python", + "source": "attribute", + "version": "1.1", + "diff": "", + "path": "/usr/lib/python2.7/dist-packages/pysparse" + }, + { + "name": "pytz", + "module": "python", + "source": "attribute", + "version": "2011k", + "diff": "", + "path": "/usr/lib/python2.7/dist-packages/pytz" + }, + { + "name": "scipy", + "module": "python", + "source": "attribute", + "version": "0.10.1", + "diff": "", + "path": "/usr/lib/python2.7/dist-packages/scipy" + }, + { + "name": "setuptools", + "module": "python", + "source": "attribute", + "version": "0.6", + "diff": "", + "path": "/home/wd15/.virtualenvs/default/local/lib/python2.7/site-packages/distribute-0.6.24-py2.7.egg/setuptools" + }, + { + "name": "simplejson", + "module": "python", + "source": "attribute", + "version": "2.6.1", + "diff": "", + "path": "/usr/lib/python2.7/dist-packages/simplejson" + }, + { + "name": "skfmm", + "module": "python", + "source": "/home/wd15/git/scikit-fmm", + "version": "467e5982fbd9d4eb32495f826d6bda65da498e13", + "diff": "", + "path": "/home/wd15/git/scikit-fmm/skfmm" + }, + { + "name": "sumatra", + "module": "python", + "source": "attribute", + "version": "0.5.0dev", + "diff": "", + "path": "/home/wd15/.virtualenvs/default/lib/python2.7/site-packages/Sumatra-0.5.0dev-py2.7.egg/sumatra" + }, + { + "name": "tables", + "module": "python", + "source": "attribute", + "version": "2.3.1", + "diff": "", + "path": "/usr/lib/python2.7/dist-packages/tables" + }, + { + "name": "tagging", + "module": "python", + "source": "attribute", + "version": "0.3.1", + "diff": "", + "path": "/home/wd15/.virtualenvs/fipy/lib/python2.7/site-packages/tagging" + }, + { + "name": "tornado", + "module": "python", + "source": "attribute", + "version": "2.3", + "diff": "", + "path": "/usr/lib/python2.7/dist-packages/tornado" + }, + { + "name": "traits", + "module": "python", + "source": "attribute", + "version": "4.1.0", + "diff": "", + "path": "/usr/lib/python2.7/dist-packages/traits" + }, + { + "name": "tvtk", + "module": "python", + "source": null, + "version": "unknown", + "diff": "", + "path": "/usr/lib/python2.7/dist-packages/tvtk" + }, + { + "name": "vtk", + "module": "python", + "source": null, + "version": "unknown", + "diff": "", + "path": "/usr/lib/pymodules/python2.7/vtk" + }, + { + "name": "wx", + "module": "python", + "source": "attribute", + "version": "2.8.12.1", + "diff": "", + "path": "/usr/lib/python2.7/dist-packages/wx-2.8-gtk2-unicode/wx" + }, + { + "name": "yaml", + "module": "python", + "source": "attribute", + "version": "3.10", + "diff": "", + "path": "/usr/lib/python2.7/dist-packages/yaml" + }, + { + "name": "zmq", + "module": "python", + "source": "attribute", + "version": "2.2.0", + "diff": "", + "path": "/usr/lib/python2.7/dist-packages/zmq" + } + ], + "user": "Daniel Wheeler ", + "output_data": [ + { + "path": "data.h5", + "digest": "161fc2665a6c7dbef87bb236e90c7069c10aad28", + "metadata": { + "mimetype": null, + "size": 102992, + "encoding": null + } + } + ], + "input_data": [], + "launch_mode": { + "type": "SerialLaunchMode", + "parameters": { + "working_directory": "/home/wd15/git/extremefill-data" + } + }, + "main_file": "script.py", + "outcome": "" +}, +{ + "script_arguments": "", + "platforms": [ + { + "system_name": "Linux", + "machine": "x86_64", + "version": "#35-Ubuntu SMP Thu Jan 24 13:15:40 UTC 2013", + "ip_addr": "127.0.0.1", + "architecture_bits": "64bit", + "architecture_linkage": "ELF", + "release": "3.5.0-23-generic", + "network_name": "loki", + "processor": "x86_64" + } + ], + "duration": 2.377830982208252, + "diff": "diff --git a/script.py b/script.py\nindex cd4453d..a2a7a03 100644\n--- a/script.py\n+++ b/script.py\n@@ -32,5 +32,5 @@ def run(totalSteps=10,\n \n from smt import SMTSimulation\n \n-SMTSimulation(run, kwargs={'totalSteps' : 1}, tags=('test',), reason=\"testing decorator\", main_file=__file__)\n-\n+smtsim = SMTSimulation(run, kwargs={'totalSteps' : 1}, tags=('test',), reason=\"testing SMT class\", main_file=__file__)\n+smtsim.launch()\ndiff --git a/smt.py b/smt.py\nindex cdc7015..f5afaa7 100644\n--- a/smt.py\n+++ b/smt.py\n@@ -22,6 +22,8 @@ On laptop use http://129.6.153.60:8000\n import time\n import os\n import sys\n+from contextlib import contextmanager\n+from StringIO import StringIO\n \n \n from sumatra.projects import load_project\n@@ -30,43 +32,63 @@ from sumatra.projects import _get_project_file\n import lockfile\n \n \n-class Writer(object):\n- log = []\n- def write(self, data):\n- self.log.append(data)\n+class SMTLock:\n+ def __init__(self, project):\n+ self.lock = lockfile.FileLock(os.path.split(_get_project_file(project.path))[0])\n \n+ def __enter__(self):\n+ self.lock.acquire()\n \n-def SMTSimulation(function, args=(), kwargs={}, tags=(), reason='', main_file=__file__):\n- project = load_project()\n- record = project.new_record(parameters=SimpleParameterSet(kwargs),\n- main_file=main_file,\n- reason=reason)\n+ def __exit__(self, type, value, tb):\n+ self.lock.release()\n \n- record.datastore.root = os.path.join(record.datastore.root, record.label)\n- record.parameters.update({'datadir': record.datastore.root})\n \n- for tag in tags:\n- record.tags.add(tag)\n+class Redirect:\n+ def __init__(self, stdout):\n+ self.stdout = stdout\n+ \n+ def __enter__(self):\n+ self.tmp_stdout = sys.stdout\n+ sys.stdout = self.stdout\n+ return self.stdout\n+ \n+ def __exit__(self, type, value, tb):\n+ sys.stdout = self.tmp_stdout\n \n- record.start_time = time.time()\n+ \n+class SMTSimulation(object):\n+ def __init__(self, function, args=(), kwargs={}, tags=(), reason='', main_file=__file__):\n+ project = load_project()\n+ record = project.new_record(parameters=SimpleParameterSet(kwargs),\n+ main_file=main_file,\n+ reason=reason)\n \n- ## http://stackoverflow.com/questions/4675728/redirect-stdout-to-a-file-in-python\n- ## see the last post in this thread\n- logger = Writer()\n- stdout_stderr = sys.stdout, sys.stderr\n- sys.stdout, sys.stderr = logger, logger\n+ record.datastore.root = os.path.join(record.datastore.root, record.label)\n+ record.parameters.update({'datadir': record.datastore.root})\n \n- function(*args, **record.parameters.as_dict())\n+ for tag in tags:\n+ record.tags.add(tag)\n \n- sys.stdout, sys.stderr = stdout_stderr\n- record.stdout_stderr = logger.log\n- print logger.log\n- record.duration = time.time() - record.start_time\n- record.output_data = record.datastore.find_new_data(record.timestamp)\n+ self.record = record\n+ self.project = project\n+ self.function = function\n+ self.args = args\n+ \n+ def launch(self):\n+ record = self.record\n+ record.start_time = time.time()\n \n- lock = lockfile.FileLock(os.path.split(_get_project_file(project.path))[0])\n- lock.acquire()\n- project.add_record(record)\n- project.save()\n- lock.release()\n \n+ out = StringIO()\n+ with Redirect(out) as out1:\n+ self.function(*self.args, **record.parameters.as_dict())\n+\n+ print out1.getvalue()\n+ record.stdout_stderr = out.getvalue()\n+ record.duration = time.time() - record.start_time\n+\n+ record.output_data = record.datastore.find_new_data(record.timestamp)\n+\n+ with SMTLock(self.project):\n+ self.project.add_record(record)\n+ self.project.save()", + "datastore": { + "type": "FileSystemDataStore", + "parameters": { + "root": "./Data/8f1f4179c826" + } + }, + "input_datastore": { + "type": "FileSystemDataStore", + "parameters": { + "root": "/" + } + }, + "executable": { + "path": "/home/wd15/.virtualenvs/default/bin/python", + "version": "2.7.3", + "name": "Python", + "options": "" + }, + "parameters": { + "content": "totalSteps = 1\ndatadir = \"./Data/8f1f4179c826\"", + "type": "SimpleParameterSet" + }, + "label": "8f1f4179c826", + "version": "dbe0f00a15307cd92b19e14677d61097315669fb", + "stdout_stderr": "[ 1. 1. 1. 1.]\n[ 0.34738209 0.61535499 0.01923836 0.00971058]\n[ 1.23729704e-01 2.14204081e-01 1.88311438e-04 1.55991524e-03]\n\ntheta 0.0\ncBar_supp 1.0\ncBar_cu 1.0\npotentialBar 1.0\nmin(extension) 7.22965473284e-08\nmin(depositionRate) 2.09114908795e-09\nmin(current) 56.8350759862\nmin(cupric) 997.266139623\nmin(baseCurrent) 56.9323002935\nmax(interfaceTheta) - 1: -0.973021297371\nmin(interfaceTheta) 0.0\nmin(I0) 38.9208518948\ndt 0.011\nelapsed time 0.0\nstep 0\n\n", + "repository": { + "url": "/home/wd15/git/extremefill-data", + "type": "GitRepository", + "upstream": "git@github.com:wd15/extremefill-data.git" + }, + "tags": [ + "test" + ], + "timestamp": "2013-02-16 22:56:38", + "reason": "testing SMT class", + "dependencies": [ + { + "name": "Cython", + "module": "python", + "source": "attribute", + "version": "0.16", + "diff": "", + "path": "/usr/lib/python2.7/dist-packages/Cython" + }, + { + "name": "IPython", + "module": "python", + "source": "attribute", + "version": "0.13.1.rc2", + "diff": "", + "path": "/usr/lib/python2.7/dist-packages/IPython" + }, + { + "name": "PIL", + "module": "python", + "source": null, + "version": "unknown", + "diff": "", + "path": "/usr/lib/python2.7/dist-packages/PIL" + }, + { + "name": "PyQt4", + "module": "python", + "source": null, + "version": "unknown", + "diff": "", + "path": "/usr/lib/python2.7/dist-packages/PyQt4" + }, + { + "name": "PyTrilinos", + "module": "python", + "source": "attribute", + "version": "4.8d", + "diff": "", + "path": "/home/wd15/.virtualenvs/fipy/lib/python2.7/site-packages/PyTrilinos" + }, + { + "name": "dateutil", + "module": "python", + "source": "attribute", + "version": "1.5", + "diff": "", + "path": "/usr/lib/python2.7/dist-packages/dateutil" + }, + { + "name": "distutils", + "module": "python", + "source": "attribute", + "version": "2.7.3", + "diff": "", + "path": "/home/wd15/.virtualenvs/default/lib/python2.7/distutils" + }, + { + "name": "django", + "module": "python", + "source": "attribute", + "version": "1.4.1", + "diff": "", + "path": "/usr/lib/python2.7/dist-packages/django" + }, + { + "name": "docutils", + "module": "python", + "source": "attribute", + "version": "0.10", + "diff": "", + "path": "/home/wd15/.virtualenvs/fipy/lib/python2.7/site-packages/docutils" + }, + { + "name": "encodings", + "module": "python", + "source": null, + "version": "unknown", + "diff": "", + "path": "/home/wd15/.virtualenvs/default/lib/python2.7/encodings" + }, + { + "name": "extremefill", + "module": "python", + "source": "/home/wd15/git/extremefill", + "version": "549c969edb113d0b3e9804612bfa53e91319c0ea", + "diff": "diff --git a/data/viewer.py b/data/viewer.py\nindex 68f60e0..d9ab7c2 100644\n--- a/data/viewer.py\n+++ b/data/viewer.py\n@@ -122,7 +122,7 @@ class ContourViewer(BaseViewer):\n self.times = times\n self.contours = contours\n self.data = []\n- super(ContourViewer, self).__init__(branches=branches, datafile=datafiles, datafiles=datafiles)\n+ super(ContourViewer, self).__init__(branches=branches, datafile=datafile, datafiles=datafiles)\n \n def plot(self):\n import matplotlib.pyplot as plt\n@@ -152,6 +152,24 @@ class ContourViewer(BaseViewer):\n phi = np.reshape(phi, shape)\n self.data.append((x, y, phi))\n \n+def datafilesFromBranches(branches, datafile):\n+ cwd = os.getcwd()\n+ for count, branch in enumerate(branches):\n+ print 'branch',branch\n+ tempdir = gitCloneToTemp(branch=branch, repositoryPath='ssh://wd15@genie.nist.gov/users/wd15/git/extremefill')\n+ repopath = os.path.join(tempdir, 'extremefill')\n+ datapath = os.path.join(repopath, datafile)\n+ gitMediaSync()\n+ if count == 0:\n+ self.addBaseData(datapath)\n+ basetempdir = tempdir\n+ else:\n+ self.addData(datapath, branch)\n+ cleanTempRepo(tempdir) \n+\n+ cleanTempRepo(basetempdir)\n+ os.chdir(cwd)\n+\n def plotNx():\n branches = ('Nx600', 'Nx300', 'Nx150')\n datafile = os.path.join('data', 'data.h5')\n@@ -174,13 +192,13 @@ def plotCFL():\n \n def plotContour():\n # branches = ('CFL0.0125', 'CFL0.025', 'CFL0.05', 'CFL0.1', 'CFL0.2', 'CFL0.4', 'CFL0.8', 'CFL1.6')\n- branches = ('Nx600', 'Nx150')\n+ branches = ('Nx300', 'Nx150')\n # branches = ('CFL0.025', 'CFL0.05')\n datafile = os.path.join('data', 'data.h5')\n times = (0,)\n- # times = (0., 1000., 2000., 3000., 4000.)\n- # viewer = ContourViewer(times=times, branches=branches, datafile=datafile)\n- viewer = ContourViewer(times=times, branches=branches, datafile=datafile, datafiles=('data150.h5', 'data600.h5'))\n+ times = (0., 1000., 2000., 3000., 4000.)\n+ viewer = ContourViewer(times=times, branches=branches, datafile=datafile)\n+ #viewer = ContourViewer(times=times, branches=branches, datafile=datafile, datafiles=('data150.h5', 'data600.h5'))\n viewer.plot()\n \n if __name__ == '__main__':\n@@ -188,6 +206,6 @@ if __name__ == '__main__':\n # from profiler import calibrate_profiler\n # fudge = calibrate_profiler(10000)\n # profile = Profiler('profile', fudge=fudge)\n- plotCFL()\n+ plotContour()\n # profile.stop()\n ", + "path": "/home/wd15/git/extremefill/extremefill" + }, + { + "name": "fipy", + "module": "python", + "source": "/home/wd15/git/fipy", + "version": "8c51478a3e8c30618b3a96c132612a46735c7548", + "diff": "", + "path": "/home/wd15/git/fipy/fipy" + }, + { + "name": "gi", + "module": "python", + "source": "attribute", + "version": "3.4.0", + "diff": "", + "path": "/usr/lib/python2.7/dist-packages/gi" + }, + { + "name": "glib", + "module": "python", + "source": null, + "version": "unknown", + "diff": "", + "path": "/usr/lib/python2.7/dist-packages/glib" + }, + { + "name": "gobject", + "module": "python", + "source": null, + "version": "unknown", + "diff": "", + "path": "/usr/lib/python2.7/dist-packages/gobject" + }, + { + "name": "google", + "module": "python", + "source": null, + "version": "unknown", + "diff": "", + "path": "/usr/lib/python2.7/dist-packages/google" + }, + { + "name": "gtk", + "module": "python", + "source": null, + "version": "unknown", + "diff": "", + "path": "/usr/lib/python2.7/dist-packages/gtk-2.0/gtk" + }, + { + "name": "httplib2", + "module": "python", + "source": "attribute", + "version": "0.7.4", + "diff": "", + "path": "/usr/lib/python2.7/dist-packages/httplib2" + }, + { + "name": "lockfile", + "module": "python", + "source": "egg-info", + "version": "0.9.1", + "diff": "", + "path": "/home/wd15/.virtualenvs/default/lib/python2.7/site-packages/lockfile-0.9.1-py2.7.egg/lockfile" + }, + { + "name": "lxml", + "module": "python", + "source": null, + "version": "unknown", + "diff": "", + "path": "/usr/lib/python2.7/dist-packages/lxml" + }, + { + "name": "matplotlib", + "module": "python", + "source": "attribute", + "version": "1.1.1", + "diff": "", + "path": "/usr/lib/pymodules/python2.7/matplotlib" + }, + { + "name": "mayavi", + "module": "python", + "source": "attribute", + "version": "4.1.0", + "diff": "", + "path": "/usr/lib/python2.7/dist-packages/mayavi" + }, + { + "name": "mpi4py", + "module": "python", + "source": "attribute", + "version": "1.3", + "diff": "", + "path": "/usr/lib/python2.7/dist-packages/mpi4py" + }, + { + "name": "mpl_toolkits", + "module": "python", + "source": null, + "version": "unknown", + "diff": "", + "path": "/usr/lib/pymodules/python2.7/mpl_toolkits" + }, + { + "name": "mx", + "module": "python", + "source": "attribute", + "version": "3.2.1", + "diff": "", + "path": "/usr/lib/python2.7/dist-packages/mx" + }, + { + "name": "nose", + "module": "python", + "source": "attribute", + "version": "1.2.1", + "diff": "", + "path": "/home/wd15/.virtualenvs/fipy/lib/python2.7/site-packages/nose" + }, + { + "name": "numexpr", + "module": "python", + "source": "attribute", + "version": "2.0.1", + "diff": "", + "path": "/usr/lib/python2.7/dist-packages/numexpr" + }, + { + "name": "numpy", + "module": "python", + "source": "attribute", + "version": "1.6.2", + "diff": "", + "path": "/usr/lib/python2.7/dist-packages/numpy" + }, + { + "name": "pyamg", + "module": "python", + "source": "attribute", + "version": "2.0.4.dev", + "diff": "", + "path": "/home/wd15/.virtualenvs/fipy/lib/python2.7/site-packages/pyamg" + }, + { + "name": "pylsmlib", + "module": "python", + "source": "/home/wd15/git/LSMLIB", + "version": "6f5d969bb27530aa37452a8b096e538a5cf7b993", + "diff": "", + "path": "/home/wd15/git/LSMLIB/pylsmlib/pylsmlib" + }, + { + "name": "pysparse", + "module": "python", + "source": "attribute", + "version": "1.1", + "diff": "", + "path": "/usr/lib/python2.7/dist-packages/pysparse" + }, + { + "name": "pytz", + "module": "python", + "source": "attribute", + "version": "2011k", + "diff": "", + "path": "/usr/lib/python2.7/dist-packages/pytz" + }, + { + "name": "scipy", + "module": "python", + "source": "attribute", + "version": "0.10.1", + "diff": "", + "path": "/usr/lib/python2.7/dist-packages/scipy" + }, + { + "name": "setuptools", + "module": "python", + "source": "attribute", + "version": "0.6", + "diff": "", + "path": "/home/wd15/.virtualenvs/default/local/lib/python2.7/site-packages/distribute-0.6.24-py2.7.egg/setuptools" + }, + { + "name": "simplejson", + "module": "python", + "source": "attribute", + "version": "2.6.1", + "diff": "", + "path": "/usr/lib/python2.7/dist-packages/simplejson" + }, + { + "name": "skfmm", + "module": "python", + "source": "/home/wd15/git/scikit-fmm", + "version": "467e5982fbd9d4eb32495f826d6bda65da498e13", + "diff": "", + "path": "/home/wd15/git/scikit-fmm/skfmm" + }, + { + "name": "sumatra", + "module": "python", + "source": "attribute", + "version": "0.5.0dev", + "diff": "", + "path": "/home/wd15/.virtualenvs/default/lib/python2.7/site-packages/Sumatra-0.5.0dev-py2.7.egg/sumatra" + }, + { + "name": "tables", + "module": "python", + "source": "attribute", + "version": "2.3.1", + "diff": "", + "path": "/usr/lib/python2.7/dist-packages/tables" + }, + { + "name": "tagging", + "module": "python", + "source": "attribute", + "version": "0.3.1", + "diff": "", + "path": "/home/wd15/.virtualenvs/fipy/lib/python2.7/site-packages/tagging" + }, + { + "name": "tornado", + "module": "python", + "source": "attribute", + "version": "2.3", + "diff": "", + "path": "/usr/lib/python2.7/dist-packages/tornado" + }, + { + "name": "traits", + "module": "python", + "source": "attribute", + "version": "4.1.0", + "diff": "", + "path": "/usr/lib/python2.7/dist-packages/traits" + }, + { + "name": "tvtk", + "module": "python", + "source": null, + "version": "unknown", + "diff": "", + "path": "/usr/lib/python2.7/dist-packages/tvtk" + }, + { + "name": "vtk", + "module": "python", + "source": null, + "version": "unknown", + "diff": "", + "path": "/usr/lib/pymodules/python2.7/vtk" + }, + { + "name": "wx", + "module": "python", + "source": "attribute", + "version": "2.8.12.1", + "diff": "", + "path": "/usr/lib/python2.7/dist-packages/wx-2.8-gtk2-unicode/wx" + }, + { + "name": "yaml", + "module": "python", + "source": "attribute", + "version": "3.10", + "diff": "", + "path": "/usr/lib/python2.7/dist-packages/yaml" + }, + { + "name": "zmq", + "module": "python", + "source": "attribute", + "version": "2.2.0", + "diff": "", + "path": "/usr/lib/python2.7/dist-packages/zmq" + } + ], + "user": "Daniel Wheeler ", + "output_data": [ + { + "path": "data.h5", + "digest": "2cc75eacce8f3ed147a2c80171673b1765ec4613", + "metadata": { + "mimetype": null, + "size": 102992, + "encoding": null + } + } + ], + "input_data": [], + "launch_mode": { + "type": "SerialLaunchMode", + "parameters": { + "working_directory": "/home/wd15/git/extremefill-data" + } + }, + "main_file": "script.py", + "outcome": "" +}, +{ + "script_arguments": "", + "platforms": [ + { + "system_name": "Linux", + "machine": "x86_64", + "version": "#35-Ubuntu SMP Thu Jan 24 13:15:40 UTC 2013", + "ip_addr": "127.0.0.1", + "architecture_bits": "64bit", + "architecture_linkage": "ELF", + "release": "3.5.0-23-generic", + "network_name": "loki", + "processor": "x86_64" + } + ], + "duration": 2.403925895690918, + "diff": "diff --git a/script.py b/script.py\nindex cd4453d..a2a7a03 100644\n--- a/script.py\n+++ b/script.py\n@@ -32,5 +32,5 @@ def run(totalSteps=10,\n \n from smt import SMTSimulation\n \n-SMTSimulation(run, kwargs={'totalSteps' : 1}, tags=('test',), reason=\"testing decorator\", main_file=__file__)\n-\n+smtsim = SMTSimulation(run, kwargs={'totalSteps' : 1}, tags=('test',), reason=\"testing SMT class\", main_file=__file__)\n+smtsim.launch()\ndiff --git a/smt.py b/smt.py\nindex cdc7015..267f70c 100644\n--- a/smt.py\n+++ b/smt.py\n@@ -22,6 +22,8 @@ On laptop use http://129.6.153.60:8000\n import time\n import os\n import sys\n+from contextlib import contextmanager\n+from StringIO import StringIO\n \n \n from sumatra.projects import load_project\n@@ -30,43 +32,64 @@ from sumatra.projects import _get_project_file\n import lockfile\n \n \n-class Writer(object):\n- log = []\n- def write(self, data):\n- self.log.append(data)\n+class SMTLock:\n+ def __init__(self, project):\n+ self.lock = lockfile.FileLock(os.path.split(_get_project_file(project.path))[0])\n \n+ def __enter__(self):\n+ self.lock.acquire()\n \n-def SMTSimulation(function, args=(), kwargs={}, tags=(), reason='', main_file=__file__):\n- project = load_project()\n- record = project.new_record(parameters=SimpleParameterSet(kwargs),\n- main_file=main_file,\n- reason=reason)\n+ def __exit__(self, type, value, tb):\n+ self.lock.release()\n \n- record.datastore.root = os.path.join(record.datastore.root, record.label)\n- record.parameters.update({'datadir': record.datastore.root})\n \n- for tag in tags:\n- record.tags.add(tag)\n+class Redirect:\n+ def __init__(self, stdout):\n+ self.stdout = stdout\n+ \n+ def __enter__(self):\n+ self.tmp_stdout = sys.stdout\n+ sys.stdout = self.stdout\n+ \n+ def __exit__(self, type, value, tb):\n+ sys.stdout = self.tmp_stdout\n \n- record.start_time = time.time()\n+ \n+class SMTSimulation(object):\n+ def __init__(self, function, args=(), kwargs={}, tags=(), reason='', main_file=__file__):\n+ project = load_project()\n+ record = project.new_record(parameters=SimpleParameterSet(kwargs),\n+ main_file=main_file,\n+ reason=reason)\n \n- ## http://stackoverflow.com/questions/4675728/redirect-stdout-to-a-file-in-python\n- ## see the last post in this thread\n- logger = Writer()\n- stdout_stderr = sys.stdout, sys.stderr\n- sys.stdout, sys.stderr = logger, logger\n+ record.datastore.root = os.path.join(record.datastore.root, record.label)\n+ record.parameters.update({'datadir': record.datastore.root})\n \n- function(*args, **record.parameters.as_dict())\n+ for tag in tags:\n+ record.tags.add(tag)\n \n- sys.stdout, sys.stderr = stdout_stderr\n- record.stdout_stderr = logger.log\n- print logger.log\n- record.duration = time.time() - record.start_time\n- record.output_data = record.datastore.find_new_data(record.timestamp)\n+ self.record = record\n+ self.project = project\n+ self.function = function\n+ self.args = args\n+ \n+ def launch(self):\n+ record = self.record\n+ record.start_time = time.time()\n \n- lock = lockfile.FileLock(os.path.split(_get_project_file(project.path))[0])\n- lock.acquire()\n- project.add_record(record)\n- project.save()\n- lock.release()\n \n+ out = StringIO()\n+ with Redirect(out) as r:\n+ self.function(*self.args, **record.parameters.as_dict())\n+ s = r\n+\n+ print s\n+ print out.getvalue()\n+ record.stdout_stderr = out.getvalue()\n+ record.duration = time.time() - record.start_time\n+\n+ record.output_data = record.datastore.find_new_data(record.timestamp)\n+\n+ with SMTLock(self.project):\n+ self.project.add_record(record)\n+ self.project.save()", + "datastore": { + "type": "FileSystemDataStore", + "parameters": { + "root": "./Data/d8b9a4b07c3c" + } + }, + "input_datastore": { + "type": "FileSystemDataStore", + "parameters": { + "root": "/" + } + }, + "executable": { + "path": "/home/wd15/.virtualenvs/default/bin/python", + "version": "2.7.3", + "name": "Python", + "options": "" + }, + "parameters": { + "content": "totalSteps = 1\ndatadir = \"./Data/d8b9a4b07c3c\"", + "type": "SimpleParameterSet" + }, + "label": "d8b9a4b07c3c", + "version": "dbe0f00a15307cd92b19e14677d61097315669fb", + "stdout_stderr": "[ 1. 1. 1. 1.]\n[ 0.34738209 0.61535499 0.01923836 0.00971058]\n[ 1.23729704e-01 2.14204081e-01 1.88311438e-04 1.55991524e-03]\n\ntheta 0.0\ncBar_supp 1.0\ncBar_cu 1.0\npotentialBar 1.0\nmin(extension) 7.22965473284e-08\nmin(depositionRate) 2.09114908795e-09\nmin(current) 56.8350759862\nmin(cupric) 997.266139623\nmin(baseCurrent) 56.9323002935\nmax(interfaceTheta) - 1: -0.973021297371\nmin(interfaceTheta) 0.0\nmin(I0) 38.9208518948\ndt 0.011\nelapsed time 0.0\nstep 0\n\n", + "repository": { + "url": "/home/wd15/git/extremefill-data", + "type": "GitRepository", + "upstream": "git@github.com:wd15/extremefill-data.git" + }, + "tags": [ + "test" + ], + "timestamp": "2013-02-16 22:43:44", + "reason": "testing SMT class", + "dependencies": [ + { + "name": "Cython", + "module": "python", + "source": "attribute", + "version": "0.16", + "diff": "", + "path": "/usr/lib/python2.7/dist-packages/Cython" + }, + { + "name": "IPython", + "module": "python", + "source": "attribute", + "version": "0.13.1.rc2", + "diff": "", + "path": "/usr/lib/python2.7/dist-packages/IPython" + }, + { + "name": "PIL", + "module": "python", + "source": null, + "version": "unknown", + "diff": "", + "path": "/usr/lib/python2.7/dist-packages/PIL" + }, + { + "name": "PyQt4", + "module": "python", + "source": null, + "version": "unknown", + "diff": "", + "path": "/usr/lib/python2.7/dist-packages/PyQt4" + }, + { + "name": "PyTrilinos", + "module": "python", + "source": "attribute", + "version": "4.8d", + "diff": "", + "path": "/home/wd15/.virtualenvs/fipy/lib/python2.7/site-packages/PyTrilinos" + }, + { + "name": "dateutil", + "module": "python", + "source": "attribute", + "version": "1.5", + "diff": "", + "path": "/usr/lib/python2.7/dist-packages/dateutil" + }, + { + "name": "distutils", + "module": "python", + "source": "attribute", + "version": "2.7.3", + "diff": "", + "path": "/home/wd15/.virtualenvs/default/lib/python2.7/distutils" + }, + { + "name": "django", + "module": "python", + "source": "attribute", + "version": "1.4.1", + "diff": "", + "path": "/usr/lib/python2.7/dist-packages/django" + }, + { + "name": "docutils", + "module": "python", + "source": "attribute", + "version": "0.10", + "diff": "", + "path": "/home/wd15/.virtualenvs/fipy/lib/python2.7/site-packages/docutils" + }, + { + "name": "encodings", + "module": "python", + "source": null, + "version": "unknown", + "diff": "", + "path": "/home/wd15/.virtualenvs/default/lib/python2.7/encodings" + }, + { + "name": "extremefill", + "module": "python", + "source": "/home/wd15/git/extremefill", + "version": "549c969edb113d0b3e9804612bfa53e91319c0ea", + "diff": "diff --git a/data/viewer.py b/data/viewer.py\nindex 68f60e0..d9ab7c2 100644\n--- a/data/viewer.py\n+++ b/data/viewer.py\n@@ -122,7 +122,7 @@ class ContourViewer(BaseViewer):\n self.times = times\n self.contours = contours\n self.data = []\n- super(ContourViewer, self).__init__(branches=branches, datafile=datafiles, datafiles=datafiles)\n+ super(ContourViewer, self).__init__(branches=branches, datafile=datafile, datafiles=datafiles)\n \n def plot(self):\n import matplotlib.pyplot as plt\n@@ -152,6 +152,24 @@ class ContourViewer(BaseViewer):\n phi = np.reshape(phi, shape)\n self.data.append((x, y, phi))\n \n+def datafilesFromBranches(branches, datafile):\n+ cwd = os.getcwd()\n+ for count, branch in enumerate(branches):\n+ print 'branch',branch\n+ tempdir = gitCloneToTemp(branch=branch, repositoryPath='ssh://wd15@genie.nist.gov/users/wd15/git/extremefill')\n+ repopath = os.path.join(tempdir, 'extremefill')\n+ datapath = os.path.join(repopath, datafile)\n+ gitMediaSync()\n+ if count == 0:\n+ self.addBaseData(datapath)\n+ basetempdir = tempdir\n+ else:\n+ self.addData(datapath, branch)\n+ cleanTempRepo(tempdir) \n+\n+ cleanTempRepo(basetempdir)\n+ os.chdir(cwd)\n+\n def plotNx():\n branches = ('Nx600', 'Nx300', 'Nx150')\n datafile = os.path.join('data', 'data.h5')\n@@ -174,13 +192,13 @@ def plotCFL():\n \n def plotContour():\n # branches = ('CFL0.0125', 'CFL0.025', 'CFL0.05', 'CFL0.1', 'CFL0.2', 'CFL0.4', 'CFL0.8', 'CFL1.6')\n- branches = ('Nx600', 'Nx150')\n+ branches = ('Nx300', 'Nx150')\n # branches = ('CFL0.025', 'CFL0.05')\n datafile = os.path.join('data', 'data.h5')\n times = (0,)\n- # times = (0., 1000., 2000., 3000., 4000.)\n- # viewer = ContourViewer(times=times, branches=branches, datafile=datafile)\n- viewer = ContourViewer(times=times, branches=branches, datafile=datafile, datafiles=('data150.h5', 'data600.h5'))\n+ times = (0., 1000., 2000., 3000., 4000.)\n+ viewer = ContourViewer(times=times, branches=branches, datafile=datafile)\n+ #viewer = ContourViewer(times=times, branches=branches, datafile=datafile, datafiles=('data150.h5', 'data600.h5'))\n viewer.plot()\n \n if __name__ == '__main__':\n@@ -188,6 +206,6 @@ if __name__ == '__main__':\n # from profiler import calibrate_profiler\n # fudge = calibrate_profiler(10000)\n # profile = Profiler('profile', fudge=fudge)\n- plotCFL()\n+ plotContour()\n # profile.stop()\n ", + "path": "/home/wd15/git/extremefill/extremefill" + }, + { + "name": "fipy", + "module": "python", + "source": "/home/wd15/git/fipy", + "version": "8c51478a3e8c30618b3a96c132612a46735c7548", + "diff": "", + "path": "/home/wd15/git/fipy/fipy" + }, + { + "name": "gi", + "module": "python", + "source": "attribute", + "version": "3.4.0", + "diff": "", + "path": "/usr/lib/python2.7/dist-packages/gi" + }, + { + "name": "glib", + "module": "python", + "source": null, + "version": "unknown", + "diff": "", + "path": "/usr/lib/python2.7/dist-packages/glib" + }, + { + "name": "gobject", + "module": "python", + "source": null, + "version": "unknown", + "diff": "", + "path": "/usr/lib/python2.7/dist-packages/gobject" + }, + { + "name": "google", + "module": "python", + "source": null, + "version": "unknown", + "diff": "", + "path": "/usr/lib/python2.7/dist-packages/google" + }, + { + "name": "gtk", + "module": "python", + "source": null, + "version": "unknown", + "diff": "", + "path": "/usr/lib/python2.7/dist-packages/gtk-2.0/gtk" + }, + { + "name": "httplib2", + "module": "python", + "source": "attribute", + "version": "0.7.4", + "diff": "", + "path": "/usr/lib/python2.7/dist-packages/httplib2" + }, + { + "name": "lockfile", + "module": "python", + "source": "egg-info", + "version": "0.9.1", + "diff": "", + "path": "/home/wd15/.virtualenvs/default/lib/python2.7/site-packages/lockfile-0.9.1-py2.7.egg/lockfile" + }, + { + "name": "lxml", + "module": "python", + "source": null, + "version": "unknown", + "diff": "", + "path": "/usr/lib/python2.7/dist-packages/lxml" + }, + { + "name": "matplotlib", + "module": "python", + "source": "attribute", + "version": "1.1.1", + "diff": "", + "path": "/usr/lib/pymodules/python2.7/matplotlib" + }, + { + "name": "mayavi", + "module": "python", + "source": "attribute", + "version": "4.1.0", + "diff": "", + "path": "/usr/lib/python2.7/dist-packages/mayavi" + }, + { + "name": "mpi4py", + "module": "python", + "source": "attribute", + "version": "1.3", + "diff": "", + "path": "/usr/lib/python2.7/dist-packages/mpi4py" + }, + { + "name": "mpl_toolkits", + "module": "python", + "source": null, + "version": "unknown", + "diff": "", + "path": "/usr/lib/pymodules/python2.7/mpl_toolkits" + }, + { + "name": "mx", + "module": "python", + "source": "attribute", + "version": "3.2.1", + "diff": "", + "path": "/usr/lib/python2.7/dist-packages/mx" + }, + { + "name": "nose", + "module": "python", + "source": "attribute", + "version": "1.2.1", + "diff": "", + "path": "/home/wd15/.virtualenvs/fipy/lib/python2.7/site-packages/nose" + }, + { + "name": "numexpr", + "module": "python", + "source": "attribute", + "version": "2.0.1", + "diff": "", + "path": "/usr/lib/python2.7/dist-packages/numexpr" + }, + { + "name": "numpy", + "module": "python", + "source": "attribute", + "version": "1.6.2", + "diff": "", + "path": "/usr/lib/python2.7/dist-packages/numpy" + }, + { + "name": "pyamg", + "module": "python", + "source": "attribute", + "version": "2.0.4.dev", + "diff": "", + "path": "/home/wd15/.virtualenvs/fipy/lib/python2.7/site-packages/pyamg" + }, + { + "name": "pylsmlib", + "module": "python", + "source": "/home/wd15/git/LSMLIB", + "version": "6f5d969bb27530aa37452a8b096e538a5cf7b993", + "diff": "", + "path": "/home/wd15/git/LSMLIB/pylsmlib/pylsmlib" + }, + { + "name": "pysparse", + "module": "python", + "source": "attribute", + "version": "1.1", + "diff": "", + "path": "/usr/lib/python2.7/dist-packages/pysparse" + }, + { + "name": "pytz", + "module": "python", + "source": "attribute", + "version": "2011k", + "diff": "", + "path": "/usr/lib/python2.7/dist-packages/pytz" + }, + { + "name": "scipy", + "module": "python", + "source": "attribute", + "version": "0.10.1", + "diff": "", + "path": "/usr/lib/python2.7/dist-packages/scipy" + }, + { + "name": "setuptools", + "module": "python", + "source": "attribute", + "version": "0.6", + "diff": "", + "path": "/home/wd15/.virtualenvs/default/local/lib/python2.7/site-packages/distribute-0.6.24-py2.7.egg/setuptools" + }, + { + "name": "simplejson", + "module": "python", + "source": "attribute", + "version": "2.6.1", + "diff": "", + "path": "/usr/lib/python2.7/dist-packages/simplejson" + }, + { + "name": "skfmm", + "module": "python", + "source": "/home/wd15/git/scikit-fmm", + "version": "467e5982fbd9d4eb32495f826d6bda65da498e13", + "diff": "", + "path": "/home/wd15/git/scikit-fmm/skfmm" + }, + { + "name": "sumatra", + "module": "python", + "source": "attribute", + "version": "0.5.0dev", + "diff": "", + "path": "/home/wd15/.virtualenvs/default/lib/python2.7/site-packages/Sumatra-0.5.0dev-py2.7.egg/sumatra" + }, + { + "name": "tables", + "module": "python", + "source": "attribute", + "version": "2.3.1", + "diff": "", + "path": "/usr/lib/python2.7/dist-packages/tables" + }, + { + "name": "tagging", + "module": "python", + "source": "attribute", + "version": "0.3.1", + "diff": "", + "path": "/home/wd15/.virtualenvs/fipy/lib/python2.7/site-packages/tagging" + }, + { + "name": "tornado", + "module": "python", + "source": "attribute", + "version": "2.3", + "diff": "", + "path": "/usr/lib/python2.7/dist-packages/tornado" + }, + { + "name": "traits", + "module": "python", + "source": "attribute", + "version": "4.1.0", + "diff": "", + "path": "/usr/lib/python2.7/dist-packages/traits" + }, + { + "name": "tvtk", + "module": "python", + "source": null, + "version": "unknown", + "diff": "", + "path": "/usr/lib/python2.7/dist-packages/tvtk" + }, + { + "name": "vtk", + "module": "python", + "source": null, + "version": "unknown", + "diff": "", + "path": "/usr/lib/pymodules/python2.7/vtk" + }, + { + "name": "wx", + "module": "python", + "source": "attribute", + "version": "2.8.12.1", + "diff": "", + "path": "/usr/lib/python2.7/dist-packages/wx-2.8-gtk2-unicode/wx" + }, + { + "name": "yaml", + "module": "python", + "source": "attribute", + "version": "3.10", + "diff": "", + "path": "/usr/lib/python2.7/dist-packages/yaml" + }, + { + "name": "zmq", + "module": "python", + "source": "attribute", + "version": "2.2.0", + "diff": "", + "path": "/usr/lib/python2.7/dist-packages/zmq" + } + ], + "user": "Daniel Wheeler ", + "output_data": [ + { + "path": "data.h5", + "digest": "88c98ea7bc3d02ef625fadb17262dda9afdeff66", + "metadata": { + "mimetype": null, + "size": 102992, + "encoding": null + } + } + ], + "input_data": [], + "launch_mode": { + "type": "SerialLaunchMode", + "parameters": { + "working_directory": "/home/wd15/git/extremefill-data" + } + }, + "main_file": "script.py", + "outcome": "" +}, +{ + "script_arguments": "", + "platforms": [ + { + "system_name": "Linux", + "machine": "x86_64", + "version": "#35-Ubuntu SMP Thu Jan 24 13:15:40 UTC 2013", + "ip_addr": "127.0.0.1", + "architecture_bits": "64bit", + "architecture_linkage": "ELF", + "release": "3.5.0-23-generic", + "network_name": "loki", + "processor": "x86_64" + } + ], + "duration": 2.4093050956726074, + "diff": "diff --git a/script.py b/script.py\nindex cd4453d..a2a7a03 100644\n--- a/script.py\n+++ b/script.py\n@@ -32,5 +32,5 @@ def run(totalSteps=10,\n \n from smt import SMTSimulation\n \n-SMTSimulation(run, kwargs={'totalSteps' : 1}, tags=('test',), reason=\"testing decorator\", main_file=__file__)\n-\n+smtsim = SMTSimulation(run, kwargs={'totalSteps' : 1}, tags=('test',), reason=\"testing SMT class\", main_file=__file__)\n+smtsim.launch()\ndiff --git a/smt.py b/smt.py\nindex cdc7015..8ba5999 100644\n--- a/smt.py\n+++ b/smt.py\n@@ -22,6 +22,8 @@ On laptop use http://129.6.153.60:8000\n import time\n import os\n import sys\n+from contextlib import contextmanager\n+from StringIO import StringIO\n \n \n from sumatra.projects import load_project\n@@ -30,43 +32,63 @@ from sumatra.projects import _get_project_file\n import lockfile\n \n \n-class Writer(object):\n- log = []\n- def write(self, data):\n- self.log.append(data)\n-\n-\n-def SMTSimulation(function, args=(), kwargs={}, tags=(), reason='', main_file=__file__):\n- project = load_project()\n- record = project.new_record(parameters=SimpleParameterSet(kwargs),\n- main_file=main_file,\n- reason=reason)\n-\n- record.datastore.root = os.path.join(record.datastore.root, record.label)\n- record.parameters.update({'datadir': record.datastore.root})\n-\n- for tag in tags:\n- record.tags.add(tag)\n-\n- record.start_time = time.time()\n-\n- ## http://stackoverflow.com/questions/4675728/redirect-stdout-to-a-file-in-python\n- ## see the last post in this thread\n- logger = Writer()\n- stdout_stderr = sys.stdout, sys.stderr\n- sys.stdout, sys.stderr = logger, logger\n-\n- function(*args, **record.parameters.as_dict())\n-\n- sys.stdout, sys.stderr = stdout_stderr\n- record.stdout_stderr = logger.log\n- print logger.log\n- record.duration = time.time() - record.start_time\n- record.output_data = record.datastore.find_new_data(record.timestamp)\n-\n- lock = lockfile.FileLock(os.path.split(_get_project_file(project.path))[0])\n- lock.acquire()\n- project.add_record(record)\n- project.save()\n- lock.release()\n-\n+class SMTLock:\n+ def __init__(self, project):\n+ self.lock = lockfile.FileLock(os.path.split(_get_project_file(project.path))[0])\n+\n+ def __enter__(self):\n+ self.lock.acquire()\n+\n+ def __exit__(self, type, value, tb):\n+ self.lock.release()\n+\n+\n+class Redirect:\n+ def __init__(self, stdout):\n+ self.stdout = stdout\n+ \n+ def __enter__(self):\n+ self.tmp_stdout = sys.stdout\n+ sys.stdout = self.stdout\n+ \n+ def __exit__(self, type, value, tb):\n+ sys.stdout = self.tmp_stdout\n+\n+ \n+class SMTSimulation(object):\n+ def __init__(self, function, args=(), kwargs={}, tags=(), reason='', main_file=__file__):\n+ project = load_project()\n+ record = project.new_record(parameters=SimpleParameterSet(kwargs),\n+ main_file=main_file,\n+ reason=reason)\n+\n+ record.datastore.root = os.path.join(record.datastore.root, record.label)\n+ record.parameters.update({'datadir': record.datastore.root})\n+\n+ for tag in tags:\n+ record.tags.add(tag)\n+\n+ self.record = record\n+ self.project = project\n+ self.function = function\n+ self.args = args\n+ \n+ def launch(self):\n+ record = self.record\n+ record.start_time = time.time()\n+\n+\n+ out = StringIO()\n+ with Redirect(out):\n+ self.function(*self.args, **record.parameters.as_dict())\n+ \n+ print out.getvalue()\n+ record.stdout_stderr = out.getvalue()\n+ record.duration = time.time() - record.start_time\n+\n+ record.output_data = record.datastore.find_new_data(record.timestamp)\n+\n+ with SMTLock(self.project):\n+ self.project.add_record(record)\n+ self.project.save()\n+ self.world", + "datastore": { + "type": "FileSystemDataStore", + "parameters": { + "root": "./Data/f7f22b8d7f23" + } + }, + "input_datastore": { + "type": "FileSystemDataStore", + "parameters": { + "root": "/" + } + }, + "executable": { + "path": "/home/wd15/.virtualenvs/default/bin/python", + "version": "2.7.3", + "name": "Python", + "options": "" + }, + "parameters": { + "content": "totalSteps = 1\ndatadir = \"./Data/f7f22b8d7f23\"", + "type": "SimpleParameterSet" + }, + "label": "f7f22b8d7f23", + "version": "dbe0f00a15307cd92b19e14677d61097315669fb", + "stdout_stderr": "[ 1. 1. 1. 1.]\n[ 0.34738209 0.61535499 0.01923836 0.00971058]\n[ 1.23729704e-01 2.14204081e-01 1.88311438e-04 1.55991524e-03]\n\ntheta 0.0\ncBar_supp 1.0\ncBar_cu 1.0\npotentialBar 1.0\nmin(extension) 7.22965473284e-08\nmin(depositionRate) 2.09114908795e-09\nmin(current) 56.8350759862\nmin(cupric) 997.266139623\nmin(baseCurrent) 56.9323002935\nmax(interfaceTheta) - 1: -0.973021297371\nmin(interfaceTheta) 0.0\nmin(I0) 38.9208518948\ndt 0.011\nelapsed time 0.0\nstep 0\n\n", + "repository": { + "url": "/home/wd15/git/extremefill-data", + "type": "GitRepository", + "upstream": "git@github.com:wd15/extremefill-data.git" + }, + "tags": [ + "test" + ], + "timestamp": "2013-02-16 22:39:43", + "reason": "testing SMT class", + "dependencies": [ + { + "name": "Cython", + "module": "python", + "source": "attribute", + "version": "0.16", + "diff": "", + "path": "/usr/lib/python2.7/dist-packages/Cython" + }, + { + "name": "IPython", + "module": "python", + "source": "attribute", + "version": "0.13.1.rc2", + "diff": "", + "path": "/usr/lib/python2.7/dist-packages/IPython" + }, + { + "name": "PIL", + "module": "python", + "source": null, + "version": "unknown", + "diff": "", + "path": "/usr/lib/python2.7/dist-packages/PIL" + }, + { + "name": "PyQt4", + "module": "python", + "source": null, + "version": "unknown", + "diff": "", + "path": "/usr/lib/python2.7/dist-packages/PyQt4" + }, + { + "name": "PyTrilinos", + "module": "python", + "source": "attribute", + "version": "4.8d", + "diff": "", + "path": "/home/wd15/.virtualenvs/fipy/lib/python2.7/site-packages/PyTrilinos" + }, + { + "name": "dateutil", + "module": "python", + "source": "attribute", + "version": "1.5", + "diff": "", + "path": "/usr/lib/python2.7/dist-packages/dateutil" + }, + { + "name": "distutils", + "module": "python", + "source": "attribute", + "version": "2.7.3", + "diff": "", + "path": "/home/wd15/.virtualenvs/default/lib/python2.7/distutils" + }, + { + "name": "django", + "module": "python", + "source": "attribute", + "version": "1.4.1", + "diff": "", + "path": "/usr/lib/python2.7/dist-packages/django" + }, + { + "name": "docutils", + "module": "python", + "source": "attribute", + "version": "0.10", + "diff": "", + "path": "/home/wd15/.virtualenvs/fipy/lib/python2.7/site-packages/docutils" + }, + { + "name": "encodings", + "module": "python", + "source": null, + "version": "unknown", + "diff": "", + "path": "/home/wd15/.virtualenvs/default/lib/python2.7/encodings" + }, + { + "name": "extremefill", + "module": "python", + "source": "/home/wd15/git/extremefill", + "version": "549c969edb113d0b3e9804612bfa53e91319c0ea", + "diff": "diff --git a/data/viewer.py b/data/viewer.py\nindex 68f60e0..d9ab7c2 100644\n--- a/data/viewer.py\n+++ b/data/viewer.py\n@@ -122,7 +122,7 @@ class ContourViewer(BaseViewer):\n self.times = times\n self.contours = contours\n self.data = []\n- super(ContourViewer, self).__init__(branches=branches, datafile=datafiles, datafiles=datafiles)\n+ super(ContourViewer, self).__init__(branches=branches, datafile=datafile, datafiles=datafiles)\n \n def plot(self):\n import matplotlib.pyplot as plt\n@@ -152,6 +152,24 @@ class ContourViewer(BaseViewer):\n phi = np.reshape(phi, shape)\n self.data.append((x, y, phi))\n \n+def datafilesFromBranches(branches, datafile):\n+ cwd = os.getcwd()\n+ for count, branch in enumerate(branches):\n+ print 'branch',branch\n+ tempdir = gitCloneToTemp(branch=branch, repositoryPath='ssh://wd15@genie.nist.gov/users/wd15/git/extremefill')\n+ repopath = os.path.join(tempdir, 'extremefill')\n+ datapath = os.path.join(repopath, datafile)\n+ gitMediaSync()\n+ if count == 0:\n+ self.addBaseData(datapath)\n+ basetempdir = tempdir\n+ else:\n+ self.addData(datapath, branch)\n+ cleanTempRepo(tempdir) \n+\n+ cleanTempRepo(basetempdir)\n+ os.chdir(cwd)\n+\n def plotNx():\n branches = ('Nx600', 'Nx300', 'Nx150')\n datafile = os.path.join('data', 'data.h5')\n@@ -174,13 +192,13 @@ def plotCFL():\n \n def plotContour():\n # branches = ('CFL0.0125', 'CFL0.025', 'CFL0.05', 'CFL0.1', 'CFL0.2', 'CFL0.4', 'CFL0.8', 'CFL1.6')\n- branches = ('Nx600', 'Nx150')\n+ branches = ('Nx300', 'Nx150')\n # branches = ('CFL0.025', 'CFL0.05')\n datafile = os.path.join('data', 'data.h5')\n times = (0,)\n- # times = (0., 1000., 2000., 3000., 4000.)\n- # viewer = ContourViewer(times=times, branches=branches, datafile=datafile)\n- viewer = ContourViewer(times=times, branches=branches, datafile=datafile, datafiles=('data150.h5', 'data600.h5'))\n+ times = (0., 1000., 2000., 3000., 4000.)\n+ viewer = ContourViewer(times=times, branches=branches, datafile=datafile)\n+ #viewer = ContourViewer(times=times, branches=branches, datafile=datafile, datafiles=('data150.h5', 'data600.h5'))\n viewer.plot()\n \n if __name__ == '__main__':\n@@ -188,6 +206,6 @@ if __name__ == '__main__':\n # from profiler import calibrate_profiler\n # fudge = calibrate_profiler(10000)\n # profile = Profiler('profile', fudge=fudge)\n- plotCFL()\n+ plotContour()\n # profile.stop()\n ", + "path": "/home/wd15/git/extremefill/extremefill" + }, + { + "name": "fipy", + "module": "python", + "source": "/home/wd15/git/fipy", + "version": "8c51478a3e8c30618b3a96c132612a46735c7548", + "diff": "", + "path": "/home/wd15/git/fipy/fipy" + }, + { + "name": "gi", + "module": "python", + "source": "attribute", + "version": "3.4.0", + "diff": "", + "path": "/usr/lib/python2.7/dist-packages/gi" + }, + { + "name": "glib", + "module": "python", + "source": null, + "version": "unknown", + "diff": "", + "path": "/usr/lib/python2.7/dist-packages/glib" + }, + { + "name": "gobject", + "module": "python", + "source": null, + "version": "unknown", + "diff": "", + "path": "/usr/lib/python2.7/dist-packages/gobject" + }, + { + "name": "google", + "module": "python", + "source": null, + "version": "unknown", + "diff": "", + "path": "/usr/lib/python2.7/dist-packages/google" + }, + { + "name": "gtk", + "module": "python", + "source": null, + "version": "unknown", + "diff": "", + "path": "/usr/lib/python2.7/dist-packages/gtk-2.0/gtk" + }, + { + "name": "httplib2", + "module": "python", + "source": "attribute", + "version": "0.7.4", + "diff": "", + "path": "/usr/lib/python2.7/dist-packages/httplib2" + }, + { + "name": "lockfile", + "module": "python", + "source": "egg-info", + "version": "0.9.1", + "diff": "", + "path": "/home/wd15/.virtualenvs/default/lib/python2.7/site-packages/lockfile-0.9.1-py2.7.egg/lockfile" + }, + { + "name": "lxml", + "module": "python", + "source": null, + "version": "unknown", + "diff": "", + "path": "/usr/lib/python2.7/dist-packages/lxml" + }, + { + "name": "matplotlib", + "module": "python", + "source": "attribute", + "version": "1.1.1", + "diff": "", + "path": "/usr/lib/pymodules/python2.7/matplotlib" + }, + { + "name": "mayavi", + "module": "python", + "source": "attribute", + "version": "4.1.0", + "diff": "", + "path": "/usr/lib/python2.7/dist-packages/mayavi" + }, + { + "name": "mpi4py", + "module": "python", + "source": "attribute", + "version": "1.3", + "diff": "", + "path": "/usr/lib/python2.7/dist-packages/mpi4py" + }, + { + "name": "mpl_toolkits", + "module": "python", + "source": null, + "version": "unknown", + "diff": "", + "path": "/usr/lib/pymodules/python2.7/mpl_toolkits" + }, + { + "name": "mx", + "module": "python", + "source": "attribute", + "version": "3.2.1", + "diff": "", + "path": "/usr/lib/python2.7/dist-packages/mx" + }, + { + "name": "nose", + "module": "python", + "source": "attribute", + "version": "1.2.1", + "diff": "", + "path": "/home/wd15/.virtualenvs/fipy/lib/python2.7/site-packages/nose" + }, + { + "name": "numexpr", + "module": "python", + "source": "attribute", + "version": "2.0.1", + "diff": "", + "path": "/usr/lib/python2.7/dist-packages/numexpr" + }, + { + "name": "numpy", + "module": "python", + "source": "attribute", + "version": "1.6.2", + "diff": "", + "path": "/usr/lib/python2.7/dist-packages/numpy" + }, + { + "name": "pyamg", + "module": "python", + "source": "attribute", + "version": "2.0.4.dev", + "diff": "", + "path": "/home/wd15/.virtualenvs/fipy/lib/python2.7/site-packages/pyamg" + }, + { + "name": "pylsmlib", + "module": "python", + "source": "/home/wd15/git/LSMLIB", + "version": "6f5d969bb27530aa37452a8b096e538a5cf7b993", + "diff": "", + "path": "/home/wd15/git/LSMLIB/pylsmlib/pylsmlib" + }, + { + "name": "pysparse", + "module": "python", + "source": "attribute", + "version": "1.1", + "diff": "", + "path": "/usr/lib/python2.7/dist-packages/pysparse" + }, + { + "name": "pytz", + "module": "python", + "source": "attribute", + "version": "2011k", + "diff": "", + "path": "/usr/lib/python2.7/dist-packages/pytz" + }, + { + "name": "scipy", + "module": "python", + "source": "attribute", + "version": "0.10.1", + "diff": "", + "path": "/usr/lib/python2.7/dist-packages/scipy" + }, + { + "name": "setuptools", + "module": "python", + "source": "attribute", + "version": "0.6", + "diff": "", + "path": "/home/wd15/.virtualenvs/default/local/lib/python2.7/site-packages/distribute-0.6.24-py2.7.egg/setuptools" + }, + { + "name": "simplejson", + "module": "python", + "source": "attribute", + "version": "2.6.1", + "diff": "", + "path": "/usr/lib/python2.7/dist-packages/simplejson" + }, + { + "name": "skfmm", + "module": "python", + "source": "/home/wd15/git/scikit-fmm", + "version": "467e5982fbd9d4eb32495f826d6bda65da498e13", + "diff": "", + "path": "/home/wd15/git/scikit-fmm/skfmm" + }, + { + "name": "sumatra", + "module": "python", + "source": "attribute", + "version": "0.5.0dev", + "diff": "", + "path": "/home/wd15/.virtualenvs/default/lib/python2.7/site-packages/Sumatra-0.5.0dev-py2.7.egg/sumatra" + }, + { + "name": "tables", + "module": "python", + "source": "attribute", + "version": "2.3.1", + "diff": "", + "path": "/usr/lib/python2.7/dist-packages/tables" + }, + { + "name": "tagging", + "module": "python", + "source": "attribute", + "version": "0.3.1", + "diff": "", + "path": "/home/wd15/.virtualenvs/fipy/lib/python2.7/site-packages/tagging" + }, + { + "name": "tornado", + "module": "python", + "source": "attribute", + "version": "2.3", + "diff": "", + "path": "/usr/lib/python2.7/dist-packages/tornado" + }, + { + "name": "traits", + "module": "python", + "source": "attribute", + "version": "4.1.0", + "diff": "", + "path": "/usr/lib/python2.7/dist-packages/traits" + }, + { + "name": "tvtk", + "module": "python", + "source": null, + "version": "unknown", + "diff": "", + "path": "/usr/lib/python2.7/dist-packages/tvtk" + }, + { + "name": "vtk", + "module": "python", + "source": null, + "version": "unknown", + "diff": "", + "path": "/usr/lib/pymodules/python2.7/vtk" + }, + { + "name": "wx", + "module": "python", + "source": "attribute", + "version": "2.8.12.1", + "diff": "", + "path": "/usr/lib/python2.7/dist-packages/wx-2.8-gtk2-unicode/wx" + }, + { + "name": "yaml", + "module": "python", + "source": "attribute", + "version": "3.10", + "diff": "", + "path": "/usr/lib/python2.7/dist-packages/yaml" + }, + { + "name": "zmq", + "module": "python", + "source": "attribute", + "version": "2.2.0", + "diff": "", + "path": "/usr/lib/python2.7/dist-packages/zmq" + } + ], + "user": "Daniel Wheeler ", + "output_data": [ + { + "path": "data.h5", + "digest": "3edd425d25667a3e63a7212919269e424e3698c6", + "metadata": { + "mimetype": null, + "size": 102992, + "encoding": null + } + } + ], + "input_data": [], + "launch_mode": { + "type": "SerialLaunchMode", + "parameters": { + "working_directory": "/home/wd15/git/extremefill-data" + } + }, + "main_file": "script.py", + "outcome": "" +}, +{ + "script_arguments": "", + "platforms": [ + { + "system_name": "Linux", + "machine": "x86_64", + "version": "#35-Ubuntu SMP Thu Jan 24 13:15:40 UTC 2013", + "ip_addr": "127.0.0.1", + "architecture_bits": "64bit", + "architecture_linkage": "ELF", + "release": "3.5.0-23-generic", + "network_name": "loki", + "processor": "x86_64" + } + ], + "duration": 2.3969228267669678, + "diff": "diff --git a/script.py b/script.py\nindex cd4453d..a2a7a03 100644\n--- a/script.py\n+++ b/script.py\n@@ -32,5 +32,5 @@ def run(totalSteps=10,\n \n from smt import SMTSimulation\n \n-SMTSimulation(run, kwargs={'totalSteps' : 1}, tags=('test',), reason=\"testing decorator\", main_file=__file__)\n-\n+smtsim = SMTSimulation(run, kwargs={'totalSteps' : 1}, tags=('test',), reason=\"testing SMT class\", main_file=__file__)\n+smtsim.launch()\ndiff --git a/smt.py b/smt.py\nindex cdc7015..322fc77 100644\n--- a/smt.py\n+++ b/smt.py\n@@ -22,6 +22,8 @@ On laptop use http://129.6.153.60:8000\n import time\n import os\n import sys\n+from contextlib import contextmanager\n+from StringIO import StringIO\n \n \n from sumatra.projects import load_project\n@@ -30,43 +32,82 @@ from sumatra.projects import _get_project_file\n import lockfile\n \n \n-class Writer(object):\n- log = []\n- def write(self, data):\n- self.log.append(data)\n-\n-\n-def SMTSimulation(function, args=(), kwargs={}, tags=(), reason='', main_file=__file__):\n- project = load_project()\n- record = project.new_record(parameters=SimpleParameterSet(kwargs),\n- main_file=main_file,\n- reason=reason)\n-\n- record.datastore.root = os.path.join(record.datastore.root, record.label)\n- record.parameters.update({'datadir': record.datastore.root})\n-\n- for tag in tags:\n- record.tags.add(tag)\n-\n- record.start_time = time.time()\n-\n- ## http://stackoverflow.com/questions/4675728/redirect-stdout-to-a-file-in-python\n- ## see the last post in this thread\n- logger = Writer()\n- stdout_stderr = sys.stdout, sys.stderr\n- sys.stdout, sys.stderr = logger, logger\n-\n- function(*args, **record.parameters.as_dict())\n-\n- sys.stdout, sys.stderr = stdout_stderr\n- record.stdout_stderr = logger.log\n- print logger.log\n- record.duration = time.time() - record.start_time\n- record.output_data = record.datastore.find_new_data(record.timestamp)\n-\n- lock = lockfile.FileLock(os.path.split(_get_project_file(project.path))[0])\n- lock.acquire()\n- project.add_record(record)\n- project.save()\n- lock.release()\n+class SMTLock(object):\n+ def __init__(self, project):\n+ self.lock = lockfile.FileLock(os.path.split(_get_project_file(project.path))[0])\n+\n+ def start(self):\n+ self.lock.acquire()\n+\n+ def stop(self):\n+ self.lock.release()\n+\n+\n+@contextmanager\n+def contextualize(l):\n+ l.start()\n+ try:\n+ yield\n+ finally:\n+ l.stop()\n+ return\n+\n+\n+class Redirect:\n+ def __init__(self, stdout=sys.stdout, stderr=sys.stderr):\n+ self.stdout = stdout\n+ self.stderr = stderr\n+\n+ def __enter__(self):\n+ self.tmp_stdout = sys.stdout\n+ self.tmp_stderr = sys.stderr\n+ sys.stdout = self.stdout\n+ sys.stderr = self.stderr\n+ \n+ def __exit__(self, type, value, tb):\n+ sys.stdout = self.tmp_stdout\n+ sys.stderr = self.tmp_stderr\n+\n+ \n+class SMTSimulation(object):\n+ def __init__(self, function, args=(), kwargs={}, tags=(), reason='', main_file=__file__):\n+ project = load_project()\n+ record = project.new_record(parameters=SimpleParameterSet(kwargs),\n+ main_file=main_file,\n+ reason=reason)\n+\n+ record.datastore.root = os.path.join(record.datastore.root, record.label)\n+ record.parameters.update({'datadir': record.datastore.root})\n+\n+ for tag in tags:\n+ record.tags.add(tag)\n+\n+ self.record = record\n+ self.project = project\n+ self.function = function\n+ self.args = args\n+ \n+ def launch(self):\n+ record = self.record\n+ record.start_time = time.time()\n+\n+ # l = Logger()\n+ # with contextualize(l):\n+ # self.function(*self.args, **record.parameters.as_dict())\n+ \n+ # record.stdout_stderr = l.out\n+\n+ out = StringIO()\n+ with Redirect(out):\n+ self.function(*self.args, **record.parameters.as_dict())\n+ \n+ print out.getvalue()\n+ record.stdout_stderr = out.getvalue()\n+ record.duration = time.time() - record.start_time\n+\n+ record.output_data = record.datastore.find_new_data(record.timestamp)\n+\n+ with contextualize(SMTLock(self.project)):\n+ self.project.add_record(record)\n+ self.project.save()\n ", + "datastore": { + "type": "FileSystemDataStore", + "parameters": { + "root": "./Data/657c0ca2b696" + } + }, + "input_datastore": { + "type": "FileSystemDataStore", + "parameters": { + "root": "/" + } + }, + "executable": { + "path": "/home/wd15/.virtualenvs/default/bin/python", + "version": "2.7.3", + "name": "Python", + "options": "" + }, + "parameters": { + "content": "totalSteps = 1\ndatadir = \"./Data/657c0ca2b696\"", + "type": "SimpleParameterSet" + }, + "label": "657c0ca2b696", + "version": "dbe0f00a15307cd92b19e14677d61097315669fb", + "stdout_stderr": "[ 1. 1. 1. 1.]\n[ 0.34738209 0.61535499 0.01923836 0.00971058]\n[ 1.23729704e-01 2.14204081e-01 1.88311438e-04 1.55991524e-03]\n\ntheta 0.0\ncBar_supp 1.0\ncBar_cu 1.0\npotentialBar 1.0\nmin(extension) 7.22965473284e-08\nmin(depositionRate) 2.09114908795e-09\nmin(current) 56.8350759862\nmin(cupric) 997.266139623\nmin(baseCurrent) 56.9323002935\nmax(interfaceTheta) - 1: -0.973021297371\nmin(interfaceTheta) 0.0\nmin(I0) 38.9208518948\ndt 0.011\nelapsed time 0.0\nstep 0\n\n", + "repository": { + "url": "/home/wd15/git/extremefill-data", + "type": "GitRepository", + "upstream": "git@github.com:wd15/extremefill-data.git" + }, + "tags": [ + "test" + ], + "timestamp": "2013-02-16 22:32:16", + "reason": "testing SMT class", + "dependencies": [ + { + "name": "Cython", + "module": "python", + "source": "attribute", + "version": "0.16", + "diff": "", + "path": "/usr/lib/python2.7/dist-packages/Cython" + }, + { + "name": "IPython", + "module": "python", + "source": "attribute", + "version": "0.13.1.rc2", + "diff": "", + "path": "/usr/lib/python2.7/dist-packages/IPython" + }, + { + "name": "PIL", + "module": "python", + "source": null, + "version": "unknown", + "diff": "", + "path": "/usr/lib/python2.7/dist-packages/PIL" + }, + { + "name": "PyQt4", + "module": "python", + "source": null, + "version": "unknown", + "diff": "", + "path": "/usr/lib/python2.7/dist-packages/PyQt4" + }, + { + "name": "PyTrilinos", + "module": "python", + "source": "attribute", + "version": "4.8d", + "diff": "", + "path": "/home/wd15/.virtualenvs/fipy/lib/python2.7/site-packages/PyTrilinos" + }, + { + "name": "dateutil", + "module": "python", + "source": "attribute", + "version": "1.5", + "diff": "", + "path": "/usr/lib/python2.7/dist-packages/dateutil" + }, + { + "name": "distutils", + "module": "python", + "source": "attribute", + "version": "2.7.3", + "diff": "", + "path": "/home/wd15/.virtualenvs/default/lib/python2.7/distutils" + }, + { + "name": "django", + "module": "python", + "source": "attribute", + "version": "1.4.1", + "diff": "", + "path": "/usr/lib/python2.7/dist-packages/django" + }, + { + "name": "docutils", + "module": "python", + "source": "attribute", + "version": "0.10", + "diff": "", + "path": "/home/wd15/.virtualenvs/fipy/lib/python2.7/site-packages/docutils" + }, + { + "name": "encodings", + "module": "python", + "source": null, + "version": "unknown", + "diff": "", + "path": "/home/wd15/.virtualenvs/default/lib/python2.7/encodings" + }, + { + "name": "extremefill", + "module": "python", + "source": "/home/wd15/git/extremefill", + "version": "549c969edb113d0b3e9804612bfa53e91319c0ea", + "diff": "diff --git a/data/viewer.py b/data/viewer.py\nindex 68f60e0..d9ab7c2 100644\n--- a/data/viewer.py\n+++ b/data/viewer.py\n@@ -122,7 +122,7 @@ class ContourViewer(BaseViewer):\n self.times = times\n self.contours = contours\n self.data = []\n- super(ContourViewer, self).__init__(branches=branches, datafile=datafiles, datafiles=datafiles)\n+ super(ContourViewer, self).__init__(branches=branches, datafile=datafile, datafiles=datafiles)\n \n def plot(self):\n import matplotlib.pyplot as plt\n@@ -152,6 +152,24 @@ class ContourViewer(BaseViewer):\n phi = np.reshape(phi, shape)\n self.data.append((x, y, phi))\n \n+def datafilesFromBranches(branches, datafile):\n+ cwd = os.getcwd()\n+ for count, branch in enumerate(branches):\n+ print 'branch',branch\n+ tempdir = gitCloneToTemp(branch=branch, repositoryPath='ssh://wd15@genie.nist.gov/users/wd15/git/extremefill')\n+ repopath = os.path.join(tempdir, 'extremefill')\n+ datapath = os.path.join(repopath, datafile)\n+ gitMediaSync()\n+ if count == 0:\n+ self.addBaseData(datapath)\n+ basetempdir = tempdir\n+ else:\n+ self.addData(datapath, branch)\n+ cleanTempRepo(tempdir) \n+\n+ cleanTempRepo(basetempdir)\n+ os.chdir(cwd)\n+\n def plotNx():\n branches = ('Nx600', 'Nx300', 'Nx150')\n datafile = os.path.join('data', 'data.h5')\n@@ -174,13 +192,13 @@ def plotCFL():\n \n def plotContour():\n # branches = ('CFL0.0125', 'CFL0.025', 'CFL0.05', 'CFL0.1', 'CFL0.2', 'CFL0.4', 'CFL0.8', 'CFL1.6')\n- branches = ('Nx600', 'Nx150')\n+ branches = ('Nx300', 'Nx150')\n # branches = ('CFL0.025', 'CFL0.05')\n datafile = os.path.join('data', 'data.h5')\n times = (0,)\n- # times = (0., 1000., 2000., 3000., 4000.)\n- # viewer = ContourViewer(times=times, branches=branches, datafile=datafile)\n- viewer = ContourViewer(times=times, branches=branches, datafile=datafile, datafiles=('data150.h5', 'data600.h5'))\n+ times = (0., 1000., 2000., 3000., 4000.)\n+ viewer = ContourViewer(times=times, branches=branches, datafile=datafile)\n+ #viewer = ContourViewer(times=times, branches=branches, datafile=datafile, datafiles=('data150.h5', 'data600.h5'))\n viewer.plot()\n \n if __name__ == '__main__':\n@@ -188,6 +206,6 @@ if __name__ == '__main__':\n # from profiler import calibrate_profiler\n # fudge = calibrate_profiler(10000)\n # profile = Profiler('profile', fudge=fudge)\n- plotCFL()\n+ plotContour()\n # profile.stop()\n ", + "path": "/home/wd15/git/extremefill/extremefill" + }, + { + "name": "fipy", + "module": "python", + "source": "/home/wd15/git/fipy", + "version": "8c51478a3e8c30618b3a96c132612a46735c7548", + "diff": "", + "path": "/home/wd15/git/fipy/fipy" + }, + { + "name": "gi", + "module": "python", + "source": "attribute", + "version": "3.4.0", + "diff": "", + "path": "/usr/lib/python2.7/dist-packages/gi" + }, + { + "name": "glib", + "module": "python", + "source": null, + "version": "unknown", + "diff": "", + "path": "/usr/lib/python2.7/dist-packages/glib" + }, + { + "name": "gobject", + "module": "python", + "source": null, + "version": "unknown", + "diff": "", + "path": "/usr/lib/python2.7/dist-packages/gobject" + }, + { + "name": "google", + "module": "python", + "source": null, + "version": "unknown", + "diff": "", + "path": "/usr/lib/python2.7/dist-packages/google" + }, + { + "name": "gtk", + "module": "python", + "source": null, + "version": "unknown", + "diff": "", + "path": "/usr/lib/python2.7/dist-packages/gtk-2.0/gtk" + }, + { + "name": "httplib2", + "module": "python", + "source": "attribute", + "version": "0.7.4", + "diff": "", + "path": "/usr/lib/python2.7/dist-packages/httplib2" + }, + { + "name": "lockfile", + "module": "python", + "source": "egg-info", + "version": "0.9.1", + "diff": "", + "path": "/home/wd15/.virtualenvs/default/lib/python2.7/site-packages/lockfile-0.9.1-py2.7.egg/lockfile" + }, + { + "name": "lxml", + "module": "python", + "source": null, + "version": "unknown", + "diff": "", + "path": "/usr/lib/python2.7/dist-packages/lxml" + }, + { + "name": "matplotlib", + "module": "python", + "source": "attribute", + "version": "1.1.1", + "diff": "", + "path": "/usr/lib/pymodules/python2.7/matplotlib" + }, + { + "name": "mayavi", + "module": "python", + "source": "attribute", + "version": "4.1.0", + "diff": "", + "path": "/usr/lib/python2.7/dist-packages/mayavi" + }, + { + "name": "mpi4py", + "module": "python", + "source": "attribute", + "version": "1.3", + "diff": "", + "path": "/usr/lib/python2.7/dist-packages/mpi4py" + }, + { + "name": "mpl_toolkits", + "module": "python", + "source": null, + "version": "unknown", + "diff": "", + "path": "/usr/lib/pymodules/python2.7/mpl_toolkits" + }, + { + "name": "mx", + "module": "python", + "source": "attribute", + "version": "3.2.1", + "diff": "", + "path": "/usr/lib/python2.7/dist-packages/mx" + }, + { + "name": "nose", + "module": "python", + "source": "attribute", + "version": "1.2.1", + "diff": "", + "path": "/home/wd15/.virtualenvs/fipy/lib/python2.7/site-packages/nose" + }, + { + "name": "numexpr", + "module": "python", + "source": "attribute", + "version": "2.0.1", + "diff": "", + "path": "/usr/lib/python2.7/dist-packages/numexpr" + }, + { + "name": "numpy", + "module": "python", + "source": "attribute", + "version": "1.6.2", + "diff": "", + "path": "/usr/lib/python2.7/dist-packages/numpy" + }, + { + "name": "pyamg", + "module": "python", + "source": "attribute", + "version": "2.0.4.dev", + "diff": "", + "path": "/home/wd15/.virtualenvs/fipy/lib/python2.7/site-packages/pyamg" + }, + { + "name": "pylsmlib", + "module": "python", + "source": "/home/wd15/git/LSMLIB", + "version": "6f5d969bb27530aa37452a8b096e538a5cf7b993", + "diff": "", + "path": "/home/wd15/git/LSMLIB/pylsmlib/pylsmlib" + }, + { + "name": "pysparse", + "module": "python", + "source": "attribute", + "version": "1.1", + "diff": "", + "path": "/usr/lib/python2.7/dist-packages/pysparse" + }, + { + "name": "pytz", + "module": "python", + "source": "attribute", + "version": "2011k", + "diff": "", + "path": "/usr/lib/python2.7/dist-packages/pytz" + }, + { + "name": "scipy", + "module": "python", + "source": "attribute", + "version": "0.10.1", + "diff": "", + "path": "/usr/lib/python2.7/dist-packages/scipy" + }, + { + "name": "setuptools", + "module": "python", + "source": "attribute", + "version": "0.6", + "diff": "", + "path": "/home/wd15/.virtualenvs/default/local/lib/python2.7/site-packages/distribute-0.6.24-py2.7.egg/setuptools" + }, + { + "name": "simplejson", + "module": "python", + "source": "attribute", + "version": "2.6.1", + "diff": "", + "path": "/usr/lib/python2.7/dist-packages/simplejson" + }, + { + "name": "skfmm", + "module": "python", + "source": "/home/wd15/git/scikit-fmm", + "version": "467e5982fbd9d4eb32495f826d6bda65da498e13", + "diff": "", + "path": "/home/wd15/git/scikit-fmm/skfmm" + }, + { + "name": "sumatra", + "module": "python", + "source": "attribute", + "version": "0.5.0dev", + "diff": "", + "path": "/home/wd15/.virtualenvs/default/lib/python2.7/site-packages/Sumatra-0.5.0dev-py2.7.egg/sumatra" + }, + { + "name": "tables", + "module": "python", + "source": "attribute", + "version": "2.3.1", + "diff": "", + "path": "/usr/lib/python2.7/dist-packages/tables" + }, + { + "name": "tagging", + "module": "python", + "source": "attribute", + "version": "0.3.1", + "diff": "", + "path": "/home/wd15/.virtualenvs/fipy/lib/python2.7/site-packages/tagging" + }, + { + "name": "tornado", + "module": "python", + "source": "attribute", + "version": "2.3", + "diff": "", + "path": "/usr/lib/python2.7/dist-packages/tornado" + }, + { + "name": "traits", + "module": "python", + "source": "attribute", + "version": "4.1.0", + "diff": "", + "path": "/usr/lib/python2.7/dist-packages/traits" + }, + { + "name": "tvtk", + "module": "python", + "source": null, + "version": "unknown", + "diff": "", + "path": "/usr/lib/python2.7/dist-packages/tvtk" + }, + { + "name": "vtk", + "module": "python", + "source": null, + "version": "unknown", + "diff": "", + "path": "/usr/lib/pymodules/python2.7/vtk" + }, + { + "name": "wx", + "module": "python", + "source": "attribute", + "version": "2.8.12.1", + "diff": "", + "path": "/usr/lib/python2.7/dist-packages/wx-2.8-gtk2-unicode/wx" + }, + { + "name": "yaml", + "module": "python", + "source": "attribute", + "version": "3.10", + "diff": "", + "path": "/usr/lib/python2.7/dist-packages/yaml" + }, + { + "name": "zmq", + "module": "python", + "source": "attribute", + "version": "2.2.0", + "diff": "", + "path": "/usr/lib/python2.7/dist-packages/zmq" + } + ], + "user": "Daniel Wheeler ", + "output_data": [ + { + "path": "data.h5", + "digest": "b01055cc659eaafb43a83445579924e9e2d4e010", + "metadata": { + "mimetype": null, + "size": 102992, + "encoding": null + } + } + ], + "input_data": [], + "launch_mode": { + "type": "SerialLaunchMode", + "parameters": { + "working_directory": "/home/wd15/git/extremefill-data" + } + }, + "main_file": "script.py", + "outcome": "" +}, +{ + "script_arguments": "", + "platforms": [ + { + "system_name": "Linux", + "machine": "x86_64", + "version": "#35-Ubuntu SMP Thu Jan 24 13:15:40 UTC 2013", + "ip_addr": "127.0.0.1", + "architecture_bits": "64bit", + "architecture_linkage": "ELF", + "release": "3.5.0-23-generic", + "network_name": "loki", + "processor": "x86_64" + } + ], + "duration": 2.551832914352417, + "diff": "diff --git a/script.py b/script.py\nindex cd4453d..a2a7a03 100644\n--- a/script.py\n+++ b/script.py\n@@ -32,5 +32,5 @@ def run(totalSteps=10,\n \n from smt import SMTSimulation\n \n-SMTSimulation(run, kwargs={'totalSteps' : 1}, tags=('test',), reason=\"testing decorator\", main_file=__file__)\n-\n+smtsim = SMTSimulation(run, kwargs={'totalSteps' : 1}, tags=('test',), reason=\"testing SMT class\", main_file=__file__)\n+smtsim.launch()\ndiff --git a/smt.py b/smt.py\nindex cdc7015..40f0664 100644\n--- a/smt.py\n+++ b/smt.py\n@@ -22,6 +22,7 @@ On laptop use http://129.6.153.60:8000\n import time\n import os\n import sys\n+from contextlib import contextmanager\n \n \n from sumatra.projects import load_project\n@@ -30,43 +31,107 @@ from sumatra.projects import _get_project_file\n import lockfile\n \n \n-class Writer(object):\n- log = []\n+class Logger(object):\n+ def __init__(self, logging_on=True):\n+ self.logging_on = logging_on\n+ self.log = []\n+ \n def write(self, data):\n self.log.append(data)\n \n+ def start(self):\n+ self.stdout_stderr = sys.stdout, sys.stderr\n+ if self.logging_on:\n+ sys.stdout, sys.stderr = self, self\n \n-def SMTSimulation(function, args=(), kwargs={}, tags=(), reason='', main_file=__file__):\n- project = load_project()\n- record = project.new_record(parameters=SimpleParameterSet(kwargs),\n- main_file=main_file,\n- reason=reason)\n+ def stop(self):\n+ sys.stdout, sys.stderr = self.stdout_stderr\n+ print self.out\n+ \n+ @property\n+ def out(self):\n+ return ''.join(self.log)\n \n- record.datastore.root = os.path.join(record.datastore.root, record.label)\n- record.parameters.update({'datadir': record.datastore.root})\n \n- for tag in tags:\n- record.tags.add(tag)\n+class SMTLock(object):\n+ def __init__(self, project):\n+ self.lock = lockfile.FileLock(os.path.split(_get_project_file(project.path))[0])\n \n- record.start_time = time.time()\n+ def start(self):\n+ self.lock.acquire()\n \n- ## http://stackoverflow.com/questions/4675728/redirect-stdout-to-a-file-in-python\n- ## see the last post in this thread\n- logger = Writer()\n- stdout_stderr = sys.stdout, sys.stderr\n- sys.stdout, sys.stderr = logger, logger\n+ def stop(self):\n+ self.lock.release()\n \n- function(*args, **record.parameters.as_dict())\n \n- sys.stdout, sys.stderr = stdout_stderr\n- record.stdout_stderr = logger.log\n- print logger.log\n- record.duration = time.time() - record.start_time\n- record.output_data = record.datastore.find_new_data(record.timestamp)\n+@contextmanager\n+def contextualize(l):\n+ l.start()\n+ try:\n+ yield\n+ finally:\n+ l.stop()\n+ return\n \n- lock = lockfile.FileLock(os.path.split(_get_project_file(project.path))[0])\n- lock.acquire()\n- project.add_record(record)\n- project.save()\n- lock.release()\n+import sys\n+from StringIO import StringIO\n+class redirect_stdout:\n+ def __init__(self, target):\n+ self.stdout = sys.stdout\n+ self.target = target\n+\n+ def __enter__(self):\n+ sys.stdout = self.target\n+\n+ def __exit__(self, type, value, tb):\n+ sys.stdout = self.stdout\n+\n+# out = StringIO()\n+# with redirect_stdout(out):\n+# print 'Test'\n+\n+ ###out.getvalue() == 'Test\\n'\n+\n+class SMTSimulation(object):\n+ def __init__(self, function, args=(), kwargs={}, tags=(), reason='', main_file=__file__):\n+ project = load_project()\n+ record = project.new_record(parameters=SimpleParameterSet(kwargs),\n+ main_file=main_file,\n+ reason=reason)\n+\n+ record.datastore.root = os.path.join(record.datastore.root, record.label)\n+ record.parameters.update({'datadir': record.datastore.root})\n+\n+ for tag in tags:\n+ record.tags.add(tag)\n+\n+ self.record = record\n+ self.project = project\n+ self.function = function\n+ self.args = args\n+ \n+ def launch(self):\n+ record = self.record\n+ record.start_time = time.time()\n+\n+ # l = Logger()\n+ # with contextualize(l):\n+ # self.function(*self.args, **record.parameters.as_dict())\n+ \n+ # record.stdout_stderr = l.out\n+\n+\n+ out = StringIO()\n+ with redirect_stdout(out):\n+ self.function(*self.args, **record.parameters.as_dict())\n+\n+ print out.getvalue()\n+ record.stdout_stderr = out.getvalue()\n+ record.duration = time.time() - record.start_time\n+\n+ record.output_data = record.datastore.find_new_data(record.timestamp)\n+\n+ with contextualize(SMTLock(self.project)):\n+ self.project.add_record(record)\n+ self.project.save()\n ", + "datastore": { + "type": "FileSystemDataStore", + "parameters": { + "root": "./Data/eeed4fbc4dce" + } + }, + "input_datastore": { + "type": "FileSystemDataStore", + "parameters": { + "root": "/" + } + }, + "executable": { + "path": "/home/wd15/.virtualenvs/default/bin/python", + "version": "2.7.3", + "name": "Python", + "options": "" + }, + "parameters": { + "content": "totalSteps = 1\ndatadir = \"./Data/eeed4fbc4dce\"", + "type": "SimpleParameterSet" + }, + "label": "eeed4fbc4dce", + "version": "dbe0f00a15307cd92b19e14677d61097315669fb", + "stdout_stderr": "[ 1. 1. 1. 1.]\n[ 0.34738209 0.61535499 0.01923836 0.00971058]\n[ 1.23729704e-01 2.14204081e-01 1.88311438e-04 1.55991524e-03]\n\ntheta 0.0\ncBar_supp 1.0\ncBar_cu 1.0\npotentialBar 1.0\nmin(extension) 7.22965473284e-08\nmin(depositionRate) 2.09114908795e-09\nmin(current) 56.8350759862\nmin(cupric) 997.266139623\nmin(baseCurrent) 56.9323002935\nmax(interfaceTheta) - 1: -0.973021297371\nmin(interfaceTheta) 0.0\nmin(I0) 38.9208518948\ndt 0.011\nelapsed time 0.0\nstep 0\n\n", + "repository": { + "url": "/home/wd15/git/extremefill-data", + "type": "GitRepository", + "upstream": "git@github.com:wd15/extremefill-data.git" + }, + "tags": [ + "test" + ], + "timestamp": "2013-02-16 22:14:37", + "reason": "testing SMT class", + "dependencies": [ + { + "name": "Cython", + "module": "python", + "source": "attribute", + "version": "0.16", + "diff": "", + "path": "/usr/lib/python2.7/dist-packages/Cython" + }, + { + "name": "IPython", + "module": "python", + "source": "attribute", + "version": "0.13.1.rc2", + "diff": "", + "path": "/usr/lib/python2.7/dist-packages/IPython" + }, + { + "name": "PIL", + "module": "python", + "source": null, + "version": "unknown", + "diff": "", + "path": "/usr/lib/python2.7/dist-packages/PIL" + }, + { + "name": "PyQt4", + "module": "python", + "source": null, + "version": "unknown", + "diff": "", + "path": "/usr/lib/python2.7/dist-packages/PyQt4" + }, + { + "name": "PyTrilinos", + "module": "python", + "source": "attribute", + "version": "4.8d", + "diff": "", + "path": "/home/wd15/.virtualenvs/fipy/lib/python2.7/site-packages/PyTrilinos" + }, + { + "name": "dateutil", + "module": "python", + "source": "attribute", + "version": "1.5", + "diff": "", + "path": "/usr/lib/python2.7/dist-packages/dateutil" + }, + { + "name": "distutils", + "module": "python", + "source": "attribute", + "version": "2.7.3", + "diff": "", + "path": "/home/wd15/.virtualenvs/default/lib/python2.7/distutils" + }, + { + "name": "django", + "module": "python", + "source": "attribute", + "version": "1.4.1", + "diff": "", + "path": "/usr/lib/python2.7/dist-packages/django" + }, + { + "name": "docutils", + "module": "python", + "source": "attribute", + "version": "0.10", + "diff": "", + "path": "/home/wd15/.virtualenvs/fipy/lib/python2.7/site-packages/docutils" + }, + { + "name": "encodings", + "module": "python", + "source": null, + "version": "unknown", + "diff": "", + "path": "/home/wd15/.virtualenvs/default/lib/python2.7/encodings" + }, + { + "name": "extremefill", + "module": "python", + "source": "/home/wd15/git/extremefill", + "version": "549c969edb113d0b3e9804612bfa53e91319c0ea", + "diff": "diff --git a/data/viewer.py b/data/viewer.py\nindex 68f60e0..d9ab7c2 100644\n--- a/data/viewer.py\n+++ b/data/viewer.py\n@@ -122,7 +122,7 @@ class ContourViewer(BaseViewer):\n self.times = times\n self.contours = contours\n self.data = []\n- super(ContourViewer, self).__init__(branches=branches, datafile=datafiles, datafiles=datafiles)\n+ super(ContourViewer, self).__init__(branches=branches, datafile=datafile, datafiles=datafiles)\n \n def plot(self):\n import matplotlib.pyplot as plt\n@@ -152,6 +152,24 @@ class ContourViewer(BaseViewer):\n phi = np.reshape(phi, shape)\n self.data.append((x, y, phi))\n \n+def datafilesFromBranches(branches, datafile):\n+ cwd = os.getcwd()\n+ for count, branch in enumerate(branches):\n+ print 'branch',branch\n+ tempdir = gitCloneToTemp(branch=branch, repositoryPath='ssh://wd15@genie.nist.gov/users/wd15/git/extremefill')\n+ repopath = os.path.join(tempdir, 'extremefill')\n+ datapath = os.path.join(repopath, datafile)\n+ gitMediaSync()\n+ if count == 0:\n+ self.addBaseData(datapath)\n+ basetempdir = tempdir\n+ else:\n+ self.addData(datapath, branch)\n+ cleanTempRepo(tempdir) \n+\n+ cleanTempRepo(basetempdir)\n+ os.chdir(cwd)\n+\n def plotNx():\n branches = ('Nx600', 'Nx300', 'Nx150')\n datafile = os.path.join('data', 'data.h5')\n@@ -174,13 +192,13 @@ def plotCFL():\n \n def plotContour():\n # branches = ('CFL0.0125', 'CFL0.025', 'CFL0.05', 'CFL0.1', 'CFL0.2', 'CFL0.4', 'CFL0.8', 'CFL1.6')\n- branches = ('Nx600', 'Nx150')\n+ branches = ('Nx300', 'Nx150')\n # branches = ('CFL0.025', 'CFL0.05')\n datafile = os.path.join('data', 'data.h5')\n times = (0,)\n- # times = (0., 1000., 2000., 3000., 4000.)\n- # viewer = ContourViewer(times=times, branches=branches, datafile=datafile)\n- viewer = ContourViewer(times=times, branches=branches, datafile=datafile, datafiles=('data150.h5', 'data600.h5'))\n+ times = (0., 1000., 2000., 3000., 4000.)\n+ viewer = ContourViewer(times=times, branches=branches, datafile=datafile)\n+ #viewer = ContourViewer(times=times, branches=branches, datafile=datafile, datafiles=('data150.h5', 'data600.h5'))\n viewer.plot()\n \n if __name__ == '__main__':\n@@ -188,6 +206,6 @@ if __name__ == '__main__':\n # from profiler import calibrate_profiler\n # fudge = calibrate_profiler(10000)\n # profile = Profiler('profile', fudge=fudge)\n- plotCFL()\n+ plotContour()\n # profile.stop()\n ", + "path": "/home/wd15/git/extremefill/extremefill" + }, + { + "name": "fipy", + "module": "python", + "source": "/home/wd15/git/fipy", + "version": "8c51478a3e8c30618b3a96c132612a46735c7548", + "diff": "", + "path": "/home/wd15/git/fipy/fipy" + }, + { + "name": "gi", + "module": "python", + "source": "attribute", + "version": "3.4.0", + "diff": "", + "path": "/usr/lib/python2.7/dist-packages/gi" + }, + { + "name": "glib", + "module": "python", + "source": null, + "version": "unknown", + "diff": "", + "path": "/usr/lib/python2.7/dist-packages/glib" + }, + { + "name": "gobject", + "module": "python", + "source": null, + "version": "unknown", + "diff": "", + "path": "/usr/lib/python2.7/dist-packages/gobject" + }, + { + "name": "google", + "module": "python", + "source": null, + "version": "unknown", + "diff": "", + "path": "/usr/lib/python2.7/dist-packages/google" + }, + { + "name": "gtk", + "module": "python", + "source": null, + "version": "unknown", + "diff": "", + "path": "/usr/lib/python2.7/dist-packages/gtk-2.0/gtk" + }, + { + "name": "httplib2", + "module": "python", + "source": "attribute", + "version": "0.7.4", + "diff": "", + "path": "/usr/lib/python2.7/dist-packages/httplib2" + }, + { + "name": "lockfile", + "module": "python", + "source": "egg-info", + "version": "0.9.1", + "diff": "", + "path": "/home/wd15/.virtualenvs/default/lib/python2.7/site-packages/lockfile-0.9.1-py2.7.egg/lockfile" + }, + { + "name": "lxml", + "module": "python", + "source": null, + "version": "unknown", + "diff": "", + "path": "/usr/lib/python2.7/dist-packages/lxml" + }, + { + "name": "matplotlib", + "module": "python", + "source": "attribute", + "version": "1.1.1", + "diff": "", + "path": "/usr/lib/pymodules/python2.7/matplotlib" + }, + { + "name": "mayavi", + "module": "python", + "source": "attribute", + "version": "4.1.0", + "diff": "", + "path": "/usr/lib/python2.7/dist-packages/mayavi" + }, + { + "name": "mpi4py", + "module": "python", + "source": "attribute", + "version": "1.3", + "diff": "", + "path": "/usr/lib/python2.7/dist-packages/mpi4py" + }, + { + "name": "mpl_toolkits", + "module": "python", + "source": null, + "version": "unknown", + "diff": "", + "path": "/usr/lib/pymodules/python2.7/mpl_toolkits" + }, + { + "name": "mx", + "module": "python", + "source": "attribute", + "version": "3.2.1", + "diff": "", + "path": "/usr/lib/python2.7/dist-packages/mx" + }, + { + "name": "nose", + "module": "python", + "source": "attribute", + "version": "1.2.1", + "diff": "", + "path": "/home/wd15/.virtualenvs/fipy/lib/python2.7/site-packages/nose" + }, + { + "name": "numexpr", + "module": "python", + "source": "attribute", + "version": "2.0.1", + "diff": "", + "path": "/usr/lib/python2.7/dist-packages/numexpr" + }, + { + "name": "numpy", + "module": "python", + "source": "attribute", + "version": "1.6.2", + "diff": "", + "path": "/usr/lib/python2.7/dist-packages/numpy" + }, + { + "name": "pyamg", + "module": "python", + "source": "attribute", + "version": "2.0.4.dev", + "diff": "", + "path": "/home/wd15/.virtualenvs/fipy/lib/python2.7/site-packages/pyamg" + }, + { + "name": "pylsmlib", + "module": "python", + "source": "/home/wd15/git/LSMLIB", + "version": "6f5d969bb27530aa37452a8b096e538a5cf7b993", + "diff": "", + "path": "/home/wd15/git/LSMLIB/pylsmlib/pylsmlib" + }, + { + "name": "pysparse", + "module": "python", + "source": "attribute", + "version": "1.1", + "diff": "", + "path": "/usr/lib/python2.7/dist-packages/pysparse" + }, + { + "name": "pytz", + "module": "python", + "source": "attribute", + "version": "2011k", + "diff": "", + "path": "/usr/lib/python2.7/dist-packages/pytz" + }, + { + "name": "scipy", + "module": "python", + "source": "attribute", + "version": "0.10.1", + "diff": "", + "path": "/usr/lib/python2.7/dist-packages/scipy" + }, + { + "name": "setuptools", + "module": "python", + "source": "attribute", + "version": "0.6", + "diff": "", + "path": "/home/wd15/.virtualenvs/default/local/lib/python2.7/site-packages/distribute-0.6.24-py2.7.egg/setuptools" + }, + { + "name": "simplejson", + "module": "python", + "source": "attribute", + "version": "2.6.1", + "diff": "", + "path": "/usr/lib/python2.7/dist-packages/simplejson" + }, + { + "name": "skfmm", + "module": "python", + "source": "/home/wd15/git/scikit-fmm", + "version": "467e5982fbd9d4eb32495f826d6bda65da498e13", + "diff": "", + "path": "/home/wd15/git/scikit-fmm/skfmm" + }, + { + "name": "sumatra", + "module": "python", + "source": "attribute", + "version": "0.5.0dev", + "diff": "", + "path": "/home/wd15/.virtualenvs/default/lib/python2.7/site-packages/Sumatra-0.5.0dev-py2.7.egg/sumatra" + }, + { + "name": "tables", + "module": "python", + "source": "attribute", + "version": "2.3.1", + "diff": "", + "path": "/usr/lib/python2.7/dist-packages/tables" + }, + { + "name": "tagging", + "module": "python", + "source": "attribute", + "version": "0.3.1", + "diff": "", + "path": "/home/wd15/.virtualenvs/fipy/lib/python2.7/site-packages/tagging" + }, + { + "name": "tornado", + "module": "python", + "source": "attribute", + "version": "2.3", + "diff": "", + "path": "/usr/lib/python2.7/dist-packages/tornado" + }, + { + "name": "traits", + "module": "python", + "source": "attribute", + "version": "4.1.0", + "diff": "", + "path": "/usr/lib/python2.7/dist-packages/traits" + }, + { + "name": "tvtk", + "module": "python", + "source": null, + "version": "unknown", + "diff": "", + "path": "/usr/lib/python2.7/dist-packages/tvtk" + }, + { + "name": "vtk", + "module": "python", + "source": null, + "version": "unknown", + "diff": "", + "path": "/usr/lib/pymodules/python2.7/vtk" + }, + { + "name": "wx", + "module": "python", + "source": "attribute", + "version": "2.8.12.1", + "diff": "", + "path": "/usr/lib/python2.7/dist-packages/wx-2.8-gtk2-unicode/wx" + }, + { + "name": "yaml", + "module": "python", + "source": "attribute", + "version": "3.10", + "diff": "", + "path": "/usr/lib/python2.7/dist-packages/yaml" + }, + { + "name": "zmq", + "module": "python", + "source": "attribute", + "version": "2.2.0", + "diff": "", + "path": "/usr/lib/python2.7/dist-packages/zmq" + } + ], + "user": "Daniel Wheeler ", + "output_data": [ + { + "path": "data.h5", + "digest": "e586216fc245dbf2c7cd23553c562c574bc72c45", + "metadata": { + "mimetype": null, + "size": 102992, + "encoding": null + } + } + ], + "input_data": [], + "launch_mode": { + "type": "SerialLaunchMode", + "parameters": { + "working_directory": "/home/wd15/git/extremefill-data" + } + }, + "main_file": "script.py", + "outcome": "" +}, +{ + "script_arguments": "", + "platforms": [ + { + "system_name": "Linux", + "machine": "x86_64", + "version": "#35-Ubuntu SMP Thu Jan 24 13:15:40 UTC 2013", + "ip_addr": "127.0.0.1", + "architecture_bits": "64bit", + "architecture_linkage": "ELF", + "release": "3.5.0-23-generic", + "network_name": "loki", + "processor": "x86_64" + } + ], + "duration": 2.410646915435791, + "diff": "diff --git a/script.py b/script.py\nindex cd4453d..a2a7a03 100644\n--- a/script.py\n+++ b/script.py\n@@ -32,5 +32,5 @@ def run(totalSteps=10,\n \n from smt import SMTSimulation\n \n-SMTSimulation(run, kwargs={'totalSteps' : 1}, tags=('test',), reason=\"testing decorator\", main_file=__file__)\n-\n+smtsim = SMTSimulation(run, kwargs={'totalSteps' : 1}, tags=('test',), reason=\"testing SMT class\", main_file=__file__)\n+smtsim.launch()\ndiff --git a/smt.py b/smt.py\nindex cdc7015..304e38d 100644\n--- a/smt.py\n+++ b/smt.py\n@@ -22,6 +22,7 @@ On laptop use http://129.6.153.60:8000\n import time\n import os\n import sys\n+from contextlib import contextmanager\n \n \n from sumatra.projects import load_project\n@@ -30,43 +31,106 @@ from sumatra.projects import _get_project_file\n import lockfile\n \n \n-class Writer(object):\n- log = []\n+class Logger(object):\n+ def __init__(self, logging_on=True):\n+ self.logging_on = logging_on\n+ self.log = []\n+ \n def write(self, data):\n self.log.append(data)\n \n+ def start(self):\n+ self.stdout_stderr = sys.stdout, sys.stderr\n+ if self.logging_on:\n+ sys.stdout, sys.stderr = self, self\n \n-def SMTSimulation(function, args=(), kwargs={}, tags=(), reason='', main_file=__file__):\n- project = load_project()\n- record = project.new_record(parameters=SimpleParameterSet(kwargs),\n- main_file=main_file,\n- reason=reason)\n+ def stop(self):\n+ sys.stdout, sys.stderr = self.stdout_stderr\n+ print self.out\n+ \n+ @property\n+ def out(self):\n+ return ''.join(self.log)\n \n- record.datastore.root = os.path.join(record.datastore.root, record.label)\n- record.parameters.update({'datadir': record.datastore.root})\n \n- for tag in tags:\n- record.tags.add(tag)\n+class SMTLock(object):\n+ def __init__(self, project):\n+ self.lock = lockfile.FileLock(os.path.split(_get_project_file(project.path))[0])\n \n- record.start_time = time.time()\n+ def start(self):\n+ self.lock.acquire()\n \n- ## http://stackoverflow.com/questions/4675728/redirect-stdout-to-a-file-in-python\n- ## see the last post in this thread\n- logger = Writer()\n- stdout_stderr = sys.stdout, sys.stderr\n- sys.stdout, sys.stderr = logger, logger\n+ def stop(self):\n+ self.lock.release()\n \n- function(*args, **record.parameters.as_dict())\n \n- sys.stdout, sys.stderr = stdout_stderr\n- record.stdout_stderr = logger.log\n- print logger.log\n- record.duration = time.time() - record.start_time\n- record.output_data = record.datastore.find_new_data(record.timestamp)\n+@contextmanager\n+def contextualize(l):\n+ l.start()\n+ try:\n+ yield\n+ finally:\n+ l.stop()\n+ return\n \n- lock = lockfile.FileLock(os.path.split(_get_project_file(project.path))[0])\n- lock.acquire()\n- project.add_record(record)\n- project.save()\n- lock.release()\n+import sys\n+from StringIO import StringIO\n+class redirect_stdout:\n+ def __init__(self, target):\n+ self.stdout = sys.stdout\n+ self.target = target\n+\n+ def __enter__(self):\n+ sys.stdout = self.target\n+\n+ def __exit__(self, type, value, tb):\n+ sys.stdout = self.stdout\n+\n+# out = StringIO()\n+# with redirect_stdout(out):\n+# print 'Test'\n+\n+ ###out.getvalue() == 'Test\\n'\n+\n+class SMTSimulation(object):\n+ def __init__(self, function, args=(), kwargs={}, tags=(), reason='', main_file=__file__):\n+ project = load_project()\n+ record = project.new_record(parameters=SimpleParameterSet(kwargs),\n+ main_file=main_file,\n+ reason=reason)\n+\n+ record.datastore.root = os.path.join(record.datastore.root, record.label)\n+ record.parameters.update({'datadir': record.datastore.root})\n+\n+ for tag in tags:\n+ record.tags.add(tag)\n+\n+ self.record = record\n+ self.project = project\n+ self.function = function\n+ self.args = args\n+ \n+ def launch(self):\n+ record = self.record\n+ record.start_time = time.time()\n+\n+ # l = Logger()\n+ # with contextualize(l):\n+ # self.function(*self.args, **record.parameters.as_dict())\n+ \n+ # record.stdout_stderr = l.out\n+\n+\n+ out = StringIO()\n+ with redirect_stdout(out):\n+ self.function(*self.args, **record.parameters.as_dict())\n+\n+ record.stdout_stderr = out.getvalue()\n+ record.duration = time.time() - record.start_time\n+\n+ record.output_data = record.datastore.find_new_data(record.timestamp)\n+\n+ with contextualize(SMTLock(self.project)):\n+ self.project.add_record(record)\n+ self.project.save()\n ", + "datastore": { + "type": "FileSystemDataStore", + "parameters": { + "root": "./Data/6408cb1e3795" + } + }, + "input_datastore": { + "type": "FileSystemDataStore", + "parameters": { + "root": "/" + } + }, + "executable": { + "path": "/home/wd15/.virtualenvs/default/bin/python", + "version": "2.7.3", + "name": "Python", + "options": "" + }, + "parameters": { + "content": "totalSteps = 1\ndatadir = \"./Data/6408cb1e3795\"", + "type": "SimpleParameterSet" + }, + "label": "6408cb1e3795", + "version": "dbe0f00a15307cd92b19e14677d61097315669fb", + "stdout_stderr": "[ 1. 1. 1. 1.]\n[ 0.34738209 0.61535499 0.01923836 0.00971058]\n[ 1.23729704e-01 2.14204081e-01 1.88311438e-04 1.55991524e-03]\n\ntheta 0.0\ncBar_supp 1.0\ncBar_cu 1.0\npotentialBar 1.0\nmin(extension) 7.22965473284e-08\nmin(depositionRate) 2.09114908795e-09\nmin(current) 56.8350759862\nmin(cupric) 997.266139623\nmin(baseCurrent) 56.9323002935\nmax(interfaceTheta) - 1: -0.973021297371\nmin(interfaceTheta) 0.0\nmin(I0) 38.9208518948\ndt 0.011\nelapsed time 0.0\nstep 0\n\n", + "repository": { + "url": "/home/wd15/git/extremefill-data", + "type": "GitRepository", + "upstream": "git@github.com:wd15/extremefill-data.git" + }, + "tags": [ + "test" + ], + "timestamp": "2013-02-16 22:13:36", + "reason": "testing SMT class", + "dependencies": [ + { + "name": "Cython", + "module": "python", + "source": "attribute", + "version": "0.16", + "diff": "", + "path": "/usr/lib/python2.7/dist-packages/Cython" + }, + { + "name": "IPython", + "module": "python", + "source": "attribute", + "version": "0.13.1.rc2", + "diff": "", + "path": "/usr/lib/python2.7/dist-packages/IPython" + }, + { + "name": "PIL", + "module": "python", + "source": null, + "version": "unknown", + "diff": "", + "path": "/usr/lib/python2.7/dist-packages/PIL" + }, + { + "name": "PyQt4", + "module": "python", + "source": null, + "version": "unknown", + "diff": "", + "path": "/usr/lib/python2.7/dist-packages/PyQt4" + }, + { + "name": "PyTrilinos", + "module": "python", + "source": "attribute", + "version": "4.8d", + "diff": "", + "path": "/home/wd15/.virtualenvs/fipy/lib/python2.7/site-packages/PyTrilinos" + }, + { + "name": "dateutil", + "module": "python", + "source": "attribute", + "version": "1.5", + "diff": "", + "path": "/usr/lib/python2.7/dist-packages/dateutil" + }, + { + "name": "distutils", + "module": "python", + "source": "attribute", + "version": "2.7.3", + "diff": "", + "path": "/home/wd15/.virtualenvs/default/lib/python2.7/distutils" + }, + { + "name": "django", + "module": "python", + "source": "attribute", + "version": "1.4.1", + "diff": "", + "path": "/usr/lib/python2.7/dist-packages/django" + }, + { + "name": "docutils", + "module": "python", + "source": "attribute", + "version": "0.10", + "diff": "", + "path": "/home/wd15/.virtualenvs/fipy/lib/python2.7/site-packages/docutils" + }, + { + "name": "encodings", + "module": "python", + "source": null, + "version": "unknown", + "diff": "", + "path": "/home/wd15/.virtualenvs/default/lib/python2.7/encodings" + }, + { + "name": "extremefill", + "module": "python", + "source": "/home/wd15/git/extremefill", + "version": "549c969edb113d0b3e9804612bfa53e91319c0ea", + "diff": "diff --git a/data/viewer.py b/data/viewer.py\nindex 68f60e0..d9ab7c2 100644\n--- a/data/viewer.py\n+++ b/data/viewer.py\n@@ -122,7 +122,7 @@ class ContourViewer(BaseViewer):\n self.times = times\n self.contours = contours\n self.data = []\n- super(ContourViewer, self).__init__(branches=branches, datafile=datafiles, datafiles=datafiles)\n+ super(ContourViewer, self).__init__(branches=branches, datafile=datafile, datafiles=datafiles)\n \n def plot(self):\n import matplotlib.pyplot as plt\n@@ -152,6 +152,24 @@ class ContourViewer(BaseViewer):\n phi = np.reshape(phi, shape)\n self.data.append((x, y, phi))\n \n+def datafilesFromBranches(branches, datafile):\n+ cwd = os.getcwd()\n+ for count, branch in enumerate(branches):\n+ print 'branch',branch\n+ tempdir = gitCloneToTemp(branch=branch, repositoryPath='ssh://wd15@genie.nist.gov/users/wd15/git/extremefill')\n+ repopath = os.path.join(tempdir, 'extremefill')\n+ datapath = os.path.join(repopath, datafile)\n+ gitMediaSync()\n+ if count == 0:\n+ self.addBaseData(datapath)\n+ basetempdir = tempdir\n+ else:\n+ self.addData(datapath, branch)\n+ cleanTempRepo(tempdir) \n+\n+ cleanTempRepo(basetempdir)\n+ os.chdir(cwd)\n+\n def plotNx():\n branches = ('Nx600', 'Nx300', 'Nx150')\n datafile = os.path.join('data', 'data.h5')\n@@ -174,13 +192,13 @@ def plotCFL():\n \n def plotContour():\n # branches = ('CFL0.0125', 'CFL0.025', 'CFL0.05', 'CFL0.1', 'CFL0.2', 'CFL0.4', 'CFL0.8', 'CFL1.6')\n- branches = ('Nx600', 'Nx150')\n+ branches = ('Nx300', 'Nx150')\n # branches = ('CFL0.025', 'CFL0.05')\n datafile = os.path.join('data', 'data.h5')\n times = (0,)\n- # times = (0., 1000., 2000., 3000., 4000.)\n- # viewer = ContourViewer(times=times, branches=branches, datafile=datafile)\n- viewer = ContourViewer(times=times, branches=branches, datafile=datafile, datafiles=('data150.h5', 'data600.h5'))\n+ times = (0., 1000., 2000., 3000., 4000.)\n+ viewer = ContourViewer(times=times, branches=branches, datafile=datafile)\n+ #viewer = ContourViewer(times=times, branches=branches, datafile=datafile, datafiles=('data150.h5', 'data600.h5'))\n viewer.plot()\n \n if __name__ == '__main__':\n@@ -188,6 +206,6 @@ if __name__ == '__main__':\n # from profiler import calibrate_profiler\n # fudge = calibrate_profiler(10000)\n # profile = Profiler('profile', fudge=fudge)\n- plotCFL()\n+ plotContour()\n # profile.stop()\n ", + "path": "/home/wd15/git/extremefill/extremefill" + }, + { + "name": "fipy", + "module": "python", + "source": "/home/wd15/git/fipy", + "version": "8c51478a3e8c30618b3a96c132612a46735c7548", + "diff": "", + "path": "/home/wd15/git/fipy/fipy" + }, + { + "name": "gi", + "module": "python", + "source": "attribute", + "version": "3.4.0", + "diff": "", + "path": "/usr/lib/python2.7/dist-packages/gi" + }, + { + "name": "glib", + "module": "python", + "source": null, + "version": "unknown", + "diff": "", + "path": "/usr/lib/python2.7/dist-packages/glib" + }, + { + "name": "gobject", + "module": "python", + "source": null, + "version": "unknown", + "diff": "", + "path": "/usr/lib/python2.7/dist-packages/gobject" + }, + { + "name": "google", + "module": "python", + "source": null, + "version": "unknown", + "diff": "", + "path": "/usr/lib/python2.7/dist-packages/google" + }, + { + "name": "gtk", + "module": "python", + "source": null, + "version": "unknown", + "diff": "", + "path": "/usr/lib/python2.7/dist-packages/gtk-2.0/gtk" + }, + { + "name": "httplib2", + "module": "python", + "source": "attribute", + "version": "0.7.4", + "diff": "", + "path": "/usr/lib/python2.7/dist-packages/httplib2" + }, + { + "name": "lockfile", + "module": "python", + "source": "egg-info", + "version": "0.9.1", + "diff": "", + "path": "/home/wd15/.virtualenvs/default/lib/python2.7/site-packages/lockfile-0.9.1-py2.7.egg/lockfile" + }, + { + "name": "lxml", + "module": "python", + "source": null, + "version": "unknown", + "diff": "", + "path": "/usr/lib/python2.7/dist-packages/lxml" + }, + { + "name": "matplotlib", + "module": "python", + "source": "attribute", + "version": "1.1.1", + "diff": "", + "path": "/usr/lib/pymodules/python2.7/matplotlib" + }, + { + "name": "mayavi", + "module": "python", + "source": "attribute", + "version": "4.1.0", + "diff": "", + "path": "/usr/lib/python2.7/dist-packages/mayavi" + }, + { + "name": "mpi4py", + "module": "python", + "source": "attribute", + "version": "1.3", + "diff": "", + "path": "/usr/lib/python2.7/dist-packages/mpi4py" + }, + { + "name": "mpl_toolkits", + "module": "python", + "source": null, + "version": "unknown", + "diff": "", + "path": "/usr/lib/pymodules/python2.7/mpl_toolkits" + }, + { + "name": "mx", + "module": "python", + "source": "attribute", + "version": "3.2.1", + "diff": "", + "path": "/usr/lib/python2.7/dist-packages/mx" + }, + { + "name": "nose", + "module": "python", + "source": "attribute", + "version": "1.2.1", + "diff": "", + "path": "/home/wd15/.virtualenvs/fipy/lib/python2.7/site-packages/nose" + }, + { + "name": "numexpr", + "module": "python", + "source": "attribute", + "version": "2.0.1", + "diff": "", + "path": "/usr/lib/python2.7/dist-packages/numexpr" + }, + { + "name": "numpy", + "module": "python", + "source": "attribute", + "version": "1.6.2", + "diff": "", + "path": "/usr/lib/python2.7/dist-packages/numpy" + }, + { + "name": "pyamg", + "module": "python", + "source": "attribute", + "version": "2.0.4.dev", + "diff": "", + "path": "/home/wd15/.virtualenvs/fipy/lib/python2.7/site-packages/pyamg" + }, + { + "name": "pylsmlib", + "module": "python", + "source": "/home/wd15/git/LSMLIB", + "version": "6f5d969bb27530aa37452a8b096e538a5cf7b993", + "diff": "", + "path": "/home/wd15/git/LSMLIB/pylsmlib/pylsmlib" + }, + { + "name": "pysparse", + "module": "python", + "source": "attribute", + "version": "1.1", + "diff": "", + "path": "/usr/lib/python2.7/dist-packages/pysparse" + }, + { + "name": "pytz", + "module": "python", + "source": "attribute", + "version": "2011k", + "diff": "", + "path": "/usr/lib/python2.7/dist-packages/pytz" + }, + { + "name": "scipy", + "module": "python", + "source": "attribute", + "version": "0.10.1", + "diff": "", + "path": "/usr/lib/python2.7/dist-packages/scipy" + }, + { + "name": "setuptools", + "module": "python", + "source": "attribute", + "version": "0.6", + "diff": "", + "path": "/home/wd15/.virtualenvs/default/local/lib/python2.7/site-packages/distribute-0.6.24-py2.7.egg/setuptools" + }, + { + "name": "simplejson", + "module": "python", + "source": "attribute", + "version": "2.6.1", + "diff": "", + "path": "/usr/lib/python2.7/dist-packages/simplejson" + }, + { + "name": "skfmm", + "module": "python", + "source": "/home/wd15/git/scikit-fmm", + "version": "467e5982fbd9d4eb32495f826d6bda65da498e13", + "diff": "", + "path": "/home/wd15/git/scikit-fmm/skfmm" + }, + { + "name": "sumatra", + "module": "python", + "source": "attribute", + "version": "0.5.0dev", + "diff": "", + "path": "/home/wd15/.virtualenvs/default/lib/python2.7/site-packages/Sumatra-0.5.0dev-py2.7.egg/sumatra" + }, + { + "name": "tables", + "module": "python", + "source": "attribute", + "version": "2.3.1", + "diff": "", + "path": "/usr/lib/python2.7/dist-packages/tables" + }, + { + "name": "tagging", + "module": "python", + "source": "attribute", + "version": "0.3.1", + "diff": "", + "path": "/home/wd15/.virtualenvs/fipy/lib/python2.7/site-packages/tagging" + }, + { + "name": "tornado", + "module": "python", + "source": "attribute", + "version": "2.3", + "diff": "", + "path": "/usr/lib/python2.7/dist-packages/tornado" + }, + { + "name": "traits", + "module": "python", + "source": "attribute", + "version": "4.1.0", + "diff": "", + "path": "/usr/lib/python2.7/dist-packages/traits" + }, + { + "name": "tvtk", + "module": "python", + "source": null, + "version": "unknown", + "diff": "", + "path": "/usr/lib/python2.7/dist-packages/tvtk" + }, + { + "name": "vtk", + "module": "python", + "source": null, + "version": "unknown", + "diff": "", + "path": "/usr/lib/pymodules/python2.7/vtk" + }, + { + "name": "wx", + "module": "python", + "source": "attribute", + "version": "2.8.12.1", + "diff": "", + "path": "/usr/lib/python2.7/dist-packages/wx-2.8-gtk2-unicode/wx" + }, + { + "name": "yaml", + "module": "python", + "source": "attribute", + "version": "3.10", + "diff": "", + "path": "/usr/lib/python2.7/dist-packages/yaml" + }, + { + "name": "zmq", + "module": "python", + "source": "attribute", + "version": "2.2.0", + "diff": "", + "path": "/usr/lib/python2.7/dist-packages/zmq" + } + ], + "user": "Daniel Wheeler ", + "output_data": [ + { + "path": "data.h5", + "digest": "9acd5759c3c1375b9e1538ed9a768f5dd57c150c", + "metadata": { + "mimetype": null, + "size": 102992, + "encoding": null + } + } + ], + "input_data": [], + "launch_mode": { + "type": "SerialLaunchMode", + "parameters": { + "working_directory": "/home/wd15/git/extremefill-data" + } + }, + "main_file": "script.py", + "outcome": "" +}, +{ + "script_arguments": "", + "platforms": [ + { + "system_name": "Linux", + "machine": "x86_64", + "version": "#35-Ubuntu SMP Thu Jan 24 13:15:40 UTC 2013", + "ip_addr": "127.0.0.1", + "architecture_bits": "64bit", + "architecture_linkage": "ELF", + "release": "3.5.0-23-generic", + "network_name": "loki", + "processor": "x86_64" + } + ], + "duration": 2.4220449924468994, + "diff": "diff --git a/script.py b/script.py\nindex cd4453d..a2a7a03 100644\n--- a/script.py\n+++ b/script.py\n@@ -32,5 +32,5 @@ def run(totalSteps=10,\n \n from smt import SMTSimulation\n \n-SMTSimulation(run, kwargs={'totalSteps' : 1}, tags=('test',), reason=\"testing decorator\", main_file=__file__)\n-\n+smtsim = SMTSimulation(run, kwargs={'totalSteps' : 1}, tags=('test',), reason=\"testing SMT class\", main_file=__file__)\n+smtsim.launch()\ndiff --git a/smt.py b/smt.py\nindex cdc7015..51197e2 100644\n--- a/smt.py\n+++ b/smt.py\n@@ -22,6 +22,7 @@ On laptop use http://129.6.153.60:8000\n import time\n import os\n import sys\n+from contextlib import contextmanager\n \n \n from sumatra.projects import load_project\n@@ -30,43 +31,82 @@ from sumatra.projects import _get_project_file\n import lockfile\n \n \n-class Writer(object):\n- log = []\n+class Logger(object):\n+ def __init__(self, logging_on=True):\n+ self.logging_on = logging_on\n+ self.log = []\n+ \n def write(self, data):\n self.log.append(data)\n \n-\n-def SMTSimulation(function, args=(), kwargs={}, tags=(), reason='', main_file=__file__):\n- project = load_project()\n- record = project.new_record(parameters=SimpleParameterSet(kwargs),\n- main_file=main_file,\n- reason=reason)\n-\n- record.datastore.root = os.path.join(record.datastore.root, record.label)\n- record.parameters.update({'datadir': record.datastore.root})\n-\n- for tag in tags:\n- record.tags.add(tag)\n-\n- record.start_time = time.time()\n-\n- ## http://stackoverflow.com/questions/4675728/redirect-stdout-to-a-file-in-python\n- ## see the last post in this thread\n- logger = Writer()\n- stdout_stderr = sys.stdout, sys.stderr\n- sys.stdout, sys.stderr = logger, logger\n-\n- function(*args, **record.parameters.as_dict())\n-\n- sys.stdout, sys.stderr = stdout_stderr\n- record.stdout_stderr = logger.log\n- print logger.log\n- record.duration = time.time() - record.start_time\n- record.output_data = record.datastore.find_new_data(record.timestamp)\n-\n- lock = lockfile.FileLock(os.path.split(_get_project_file(project.path))[0])\n- lock.acquire()\n- project.add_record(record)\n- project.save()\n- lock.release()\n+ def start(self):\n+ self.stdout_stderr = sys.stdout, sys.stderr\n+ if self.logging_on:\n+ sys.stdout, sys.stderr = self, self\n+\n+ def stop(self):\n+ sys.stdout, sys.stderr = self.stdout_stderr\n+ print self.out\n+ \n+ @property\n+ def out(self):\n+ return ''.join(self.log)\n+\n+\n+class SMTLock(object):\n+ def __init__(self, project):\n+ self.lock = lockfile.FileLock(os.path.split(_get_project_file(project.path))[0])\n+\n+ def start(self):\n+ self.lock.acquire()\n+\n+ def stop(self):\n+ self.lock.release()\n+\n+ \n+@contextmanager\n+def contextualize(l):\n+ l.start()\n+ try:\n+ yield\n+ finally:\n+ l.stop()\n+ \n+ \n+class SMTSimulation(object):\n+ def __init__(self, function, args=(), kwargs={}, tags=(), reason='', main_file=__file__):\n+ project = load_project()\n+ record = project.new_record(parameters=SimpleParameterSet(kwargs),\n+ main_file=main_file,\n+ reason=reason)\n+\n+ record.datastore.root = os.path.join(record.datastore.root, record.label)\n+ record.parameters.update({'datadir': record.datastore.root})\n+\n+ for tag in tags:\n+ record.tags.add(tag)\n+\n+ self.record = record\n+ self.project = project\n+ self.function = function\n+ self.args = args\n+ \n+ def launch(self):\n+ record = self.record\n+ record.start_time = time.time()\n+ \n+ l = Logger()\n+\n+ with contextualize(l):\n+ self.function(*self.args, **record.parameters.as_dict())\n+ \n+ record.stdout_stderr = l.out\n+ record.duration = time.time() - record.start_time\n+\n+ record.output_data = record.datastore.find_new_data(record.timestamp)\n+\n+ with contextualize(SMTLock(self.project)):\n+ self.project.add_record(record)\n+ self.project.save()\n+ print self.world\n ", + "datastore": { + "type": "FileSystemDataStore", + "parameters": { + "root": "./Data/9cc20c7350ed" + } + }, + "input_datastore": { + "type": "FileSystemDataStore", + "parameters": { + "root": "/" + } + }, + "executable": { + "path": "/home/wd15/.virtualenvs/default/bin/python", + "version": "2.7.3", + "name": "Python", + "options": "" + }, + "parameters": { + "content": "totalSteps = 1\ndatadir = \"./Data/9cc20c7350ed\"", + "type": "SimpleParameterSet" + }, + "label": "9cc20c7350ed", + "version": "dbe0f00a15307cd92b19e14677d61097315669fb", + "stdout_stderr": "[ 1. 1. 1. 1.]\n[ 0.34738209 0.61535499 0.01923836 0.00971058]\n[ 1.23729704e-01 2.14204081e-01 1.88311438e-04 1.55991524e-03]\n\ntheta 0.0\ncBar_supp 1.0\ncBar_cu 1.0\npotentialBar 1.0\nmin(extension) 7.22965473284e-08\nmin(depositionRate) 2.09114908795e-09\nmin(current) 56.8350759862\nmin(cupric) 997.266139623\nmin(baseCurrent) 56.9323002935\nmax(interfaceTheta) - 1: -0.973021297371\nmin(interfaceTheta) 0.0\nmin(I0) 38.9208518948\ndt 0.011\nelapsed time 0.0\nstep 0\n\n", + "repository": { + "url": "/home/wd15/git/extremefill-data", + "type": "GitRepository", + "upstream": "git@github.com:wd15/extremefill-data.git" + }, + "tags": [ + "test" + ], + "timestamp": "2013-02-16 21:50:04", + "reason": "testing SMT class", + "dependencies": [ + { + "name": "Cython", + "module": "python", + "source": "attribute", + "version": "0.16", + "diff": "", + "path": "/usr/lib/python2.7/dist-packages/Cython" + }, + { + "name": "IPython", + "module": "python", + "source": "attribute", + "version": "0.13.1.rc2", + "diff": "", + "path": "/usr/lib/python2.7/dist-packages/IPython" + }, + { + "name": "PIL", + "module": "python", + "source": null, + "version": "unknown", + "diff": "", + "path": "/usr/lib/python2.7/dist-packages/PIL" + }, + { + "name": "PyQt4", + "module": "python", + "source": null, + "version": "unknown", + "diff": "", + "path": "/usr/lib/python2.7/dist-packages/PyQt4" + }, + { + "name": "PyTrilinos", + "module": "python", + "source": "attribute", + "version": "4.8d", + "diff": "", + "path": "/home/wd15/.virtualenvs/fipy/lib/python2.7/site-packages/PyTrilinos" + }, + { + "name": "dateutil", + "module": "python", + "source": "attribute", + "version": "1.5", + "diff": "", + "path": "/usr/lib/python2.7/dist-packages/dateutil" + }, + { + "name": "distutils", + "module": "python", + "source": "attribute", + "version": "2.7.3", + "diff": "", + "path": "/home/wd15/.virtualenvs/default/lib/python2.7/distutils" + }, + { + "name": "django", + "module": "python", + "source": "attribute", + "version": "1.4.1", + "diff": "", + "path": "/usr/lib/python2.7/dist-packages/django" + }, + { + "name": "docutils", + "module": "python", + "source": "attribute", + "version": "0.10", + "diff": "", + "path": "/home/wd15/.virtualenvs/fipy/lib/python2.7/site-packages/docutils" + }, + { + "name": "encodings", + "module": "python", + "source": null, + "version": "unknown", + "diff": "", + "path": "/home/wd15/.virtualenvs/default/lib/python2.7/encodings" + }, + { + "name": "extremefill", + "module": "python", + "source": "/home/wd15/git/extremefill", + "version": "549c969edb113d0b3e9804612bfa53e91319c0ea", + "diff": "diff --git a/data/viewer.py b/data/viewer.py\nindex 68f60e0..d9ab7c2 100644\n--- a/data/viewer.py\n+++ b/data/viewer.py\n@@ -122,7 +122,7 @@ class ContourViewer(BaseViewer):\n self.times = times\n self.contours = contours\n self.data = []\n- super(ContourViewer, self).__init__(branches=branches, datafile=datafiles, datafiles=datafiles)\n+ super(ContourViewer, self).__init__(branches=branches, datafile=datafile, datafiles=datafiles)\n \n def plot(self):\n import matplotlib.pyplot as plt\n@@ -152,6 +152,24 @@ class ContourViewer(BaseViewer):\n phi = np.reshape(phi, shape)\n self.data.append((x, y, phi))\n \n+def datafilesFromBranches(branches, datafile):\n+ cwd = os.getcwd()\n+ for count, branch in enumerate(branches):\n+ print 'branch',branch\n+ tempdir = gitCloneToTemp(branch=branch, repositoryPath='ssh://wd15@genie.nist.gov/users/wd15/git/extremefill')\n+ repopath = os.path.join(tempdir, 'extremefill')\n+ datapath = os.path.join(repopath, datafile)\n+ gitMediaSync()\n+ if count == 0:\n+ self.addBaseData(datapath)\n+ basetempdir = tempdir\n+ else:\n+ self.addData(datapath, branch)\n+ cleanTempRepo(tempdir) \n+\n+ cleanTempRepo(basetempdir)\n+ os.chdir(cwd)\n+\n def plotNx():\n branches = ('Nx600', 'Nx300', 'Nx150')\n datafile = os.path.join('data', 'data.h5')\n@@ -174,13 +192,13 @@ def plotCFL():\n \n def plotContour():\n # branches = ('CFL0.0125', 'CFL0.025', 'CFL0.05', 'CFL0.1', 'CFL0.2', 'CFL0.4', 'CFL0.8', 'CFL1.6')\n- branches = ('Nx600', 'Nx150')\n+ branches = ('Nx300', 'Nx150')\n # branches = ('CFL0.025', 'CFL0.05')\n datafile = os.path.join('data', 'data.h5')\n times = (0,)\n- # times = (0., 1000., 2000., 3000., 4000.)\n- # viewer = ContourViewer(times=times, branches=branches, datafile=datafile)\n- viewer = ContourViewer(times=times, branches=branches, datafile=datafile, datafiles=('data150.h5', 'data600.h5'))\n+ times = (0., 1000., 2000., 3000., 4000.)\n+ viewer = ContourViewer(times=times, branches=branches, datafile=datafile)\n+ #viewer = ContourViewer(times=times, branches=branches, datafile=datafile, datafiles=('data150.h5', 'data600.h5'))\n viewer.plot()\n \n if __name__ == '__main__':\n@@ -188,6 +206,6 @@ if __name__ == '__main__':\n # from profiler import calibrate_profiler\n # fudge = calibrate_profiler(10000)\n # profile = Profiler('profile', fudge=fudge)\n- plotCFL()\n+ plotContour()\n # profile.stop()\n ", + "path": "/home/wd15/git/extremefill/extremefill" + }, + { + "name": "fipy", + "module": "python", + "source": "/home/wd15/git/fipy", + "version": "8c51478a3e8c30618b3a96c132612a46735c7548", + "diff": "", + "path": "/home/wd15/git/fipy/fipy" + }, + { + "name": "gi", + "module": "python", + "source": "attribute", + "version": "3.4.0", + "diff": "", + "path": "/usr/lib/python2.7/dist-packages/gi" + }, + { + "name": "glib", + "module": "python", + "source": null, + "version": "unknown", + "diff": "", + "path": "/usr/lib/python2.7/dist-packages/glib" + }, + { + "name": "gobject", + "module": "python", + "source": null, + "version": "unknown", + "diff": "", + "path": "/usr/lib/python2.7/dist-packages/gobject" + }, + { + "name": "google", + "module": "python", + "source": null, + "version": "unknown", + "diff": "", + "path": "/usr/lib/python2.7/dist-packages/google" + }, + { + "name": "gtk", + "module": "python", + "source": null, + "version": "unknown", + "diff": "", + "path": "/usr/lib/python2.7/dist-packages/gtk-2.0/gtk" + }, + { + "name": "httplib2", + "module": "python", + "source": "attribute", + "version": "0.7.4", + "diff": "", + "path": "/usr/lib/python2.7/dist-packages/httplib2" + }, + { + "name": "lockfile", + "module": "python", + "source": "egg-info", + "version": "0.9.1", + "diff": "", + "path": "/home/wd15/.virtualenvs/default/lib/python2.7/site-packages/lockfile-0.9.1-py2.7.egg/lockfile" + }, + { + "name": "lxml", + "module": "python", + "source": null, + "version": "unknown", + "diff": "", + "path": "/usr/lib/python2.7/dist-packages/lxml" + }, + { + "name": "matplotlib", + "module": "python", + "source": "attribute", + "version": "1.1.1", + "diff": "", + "path": "/usr/lib/pymodules/python2.7/matplotlib" + }, + { + "name": "mayavi", + "module": "python", + "source": "attribute", + "version": "4.1.0", + "diff": "", + "path": "/usr/lib/python2.7/dist-packages/mayavi" + }, + { + "name": "mpi4py", + "module": "python", + "source": "attribute", + "version": "1.3", + "diff": "", + "path": "/usr/lib/python2.7/dist-packages/mpi4py" + }, + { + "name": "mpl_toolkits", + "module": "python", + "source": null, + "version": "unknown", + "diff": "", + "path": "/usr/lib/pymodules/python2.7/mpl_toolkits" + }, + { + "name": "mx", + "module": "python", + "source": "attribute", + "version": "3.2.1", + "diff": "", + "path": "/usr/lib/python2.7/dist-packages/mx" + }, + { + "name": "nose", + "module": "python", + "source": "attribute", + "version": "1.2.1", + "diff": "", + "path": "/home/wd15/.virtualenvs/fipy/lib/python2.7/site-packages/nose" + }, + { + "name": "numexpr", + "module": "python", + "source": "attribute", + "version": "2.0.1", + "diff": "", + "path": "/usr/lib/python2.7/dist-packages/numexpr" + }, + { + "name": "numpy", + "module": "python", + "source": "attribute", + "version": "1.6.2", + "diff": "", + "path": "/usr/lib/python2.7/dist-packages/numpy" + }, + { + "name": "pyamg", + "module": "python", + "source": "attribute", + "version": "2.0.4.dev", + "diff": "", + "path": "/home/wd15/.virtualenvs/fipy/lib/python2.7/site-packages/pyamg" + }, + { + "name": "pylsmlib", + "module": "python", + "source": "/home/wd15/git/LSMLIB", + "version": "6f5d969bb27530aa37452a8b096e538a5cf7b993", + "diff": "", + "path": "/home/wd15/git/LSMLIB/pylsmlib/pylsmlib" + }, + { + "name": "pysparse", + "module": "python", + "source": "attribute", + "version": "1.1", + "diff": "", + "path": "/usr/lib/python2.7/dist-packages/pysparse" + }, + { + "name": "pytz", + "module": "python", + "source": "attribute", + "version": "2011k", + "diff": "", + "path": "/usr/lib/python2.7/dist-packages/pytz" + }, + { + "name": "scipy", + "module": "python", + "source": "attribute", + "version": "0.10.1", + "diff": "", + "path": "/usr/lib/python2.7/dist-packages/scipy" + }, + { + "name": "setuptools", + "module": "python", + "source": "attribute", + "version": "0.6", + "diff": "", + "path": "/home/wd15/.virtualenvs/default/local/lib/python2.7/site-packages/distribute-0.6.24-py2.7.egg/setuptools" + }, + { + "name": "simplejson", + "module": "python", + "source": "attribute", + "version": "2.6.1", + "diff": "", + "path": "/usr/lib/python2.7/dist-packages/simplejson" + }, + { + "name": "skfmm", + "module": "python", + "source": "/home/wd15/git/scikit-fmm", + "version": "467e5982fbd9d4eb32495f826d6bda65da498e13", + "diff": "", + "path": "/home/wd15/git/scikit-fmm/skfmm" + }, + { + "name": "sumatra", + "module": "python", + "source": "attribute", + "version": "0.5.0dev", + "diff": "", + "path": "/home/wd15/.virtualenvs/default/lib/python2.7/site-packages/Sumatra-0.5.0dev-py2.7.egg/sumatra" + }, + { + "name": "tables", + "module": "python", + "source": "attribute", + "version": "2.3.1", + "diff": "", + "path": "/usr/lib/python2.7/dist-packages/tables" + }, + { + "name": "tagging", + "module": "python", + "source": "attribute", + "version": "0.3.1", + "diff": "", + "path": "/home/wd15/.virtualenvs/fipy/lib/python2.7/site-packages/tagging" + }, + { + "name": "tornado", + "module": "python", + "source": "attribute", + "version": "2.3", + "diff": "", + "path": "/usr/lib/python2.7/dist-packages/tornado" + }, + { + "name": "traits", + "module": "python", + "source": "attribute", + "version": "4.1.0", + "diff": "", + "path": "/usr/lib/python2.7/dist-packages/traits" + }, + { + "name": "tvtk", + "module": "python", + "source": null, + "version": "unknown", + "diff": "", + "path": "/usr/lib/python2.7/dist-packages/tvtk" + }, + { + "name": "vtk", + "module": "python", + "source": null, + "version": "unknown", + "diff": "", + "path": "/usr/lib/pymodules/python2.7/vtk" + }, + { + "name": "wx", + "module": "python", + "source": "attribute", + "version": "2.8.12.1", + "diff": "", + "path": "/usr/lib/python2.7/dist-packages/wx-2.8-gtk2-unicode/wx" + }, + { + "name": "yaml", + "module": "python", + "source": "attribute", + "version": "3.10", + "diff": "", + "path": "/usr/lib/python2.7/dist-packages/yaml" + }, + { + "name": "zmq", + "module": "python", + "source": "attribute", + "version": "2.2.0", + "diff": "", + "path": "/usr/lib/python2.7/dist-packages/zmq" + } + ], + "user": "Daniel Wheeler ", + "output_data": [ + { + "path": "data.h5", + "digest": "f3c34a2772ef05c9022180c7575aeb65b4d357ef", + "metadata": { + "mimetype": null, + "size": 102992, + "encoding": null + } + } + ], + "input_data": [], + "launch_mode": { + "type": "SerialLaunchMode", + "parameters": { + "working_directory": "/home/wd15/git/extremefill-data" + } + }, + "main_file": "script.py", + "outcome": "" +}, +{ + "script_arguments": "", + "platforms": [ + { + "system_name": "Linux", + "machine": "x86_64", + "version": "#35-Ubuntu SMP Thu Jan 24 13:15:40 UTC 2013", + "ip_addr": "127.0.0.1", + "architecture_bits": "64bit", + "architecture_linkage": "ELF", + "release": "3.5.0-23-generic", + "network_name": "loki", + "processor": "x86_64" + } + ], + "duration": 2.433500051498413, + "diff": "diff --git a/script.py b/script.py\nindex cd4453d..a2a7a03 100644\n--- a/script.py\n+++ b/script.py\n@@ -32,5 +32,5 @@ def run(totalSteps=10,\n \n from smt import SMTSimulation\n \n-SMTSimulation(run, kwargs={'totalSteps' : 1}, tags=('test',), reason=\"testing decorator\", main_file=__file__)\n-\n+smtsim = SMTSimulation(run, kwargs={'totalSteps' : 1}, tags=('test',), reason=\"testing SMT class\", main_file=__file__)\n+smtsim.launch()\ndiff --git a/smt.py b/smt.py\nindex cdc7015..c55a003 100644\n--- a/smt.py\n+++ b/smt.py\n@@ -22,6 +22,7 @@ On laptop use http://129.6.153.60:8000\n import time\n import os\n import sys\n+from contextlib import contextmanager\n \n \n from sumatra.projects import load_project\n@@ -30,43 +31,82 @@ from sumatra.projects import _get_project_file\n import lockfile\n \n \n-class Writer(object):\n- log = []\n+class Logger(object):\n+ def __init__(self, logging_on=True):\n+ self.logging_on = logging_on\n+ self.log = []\n+ \n def write(self, data):\n self.log.append(data)\n \n-\n-def SMTSimulation(function, args=(), kwargs={}, tags=(), reason='', main_file=__file__):\n- project = load_project()\n- record = project.new_record(parameters=SimpleParameterSet(kwargs),\n- main_file=main_file,\n- reason=reason)\n-\n- record.datastore.root = os.path.join(record.datastore.root, record.label)\n- record.parameters.update({'datadir': record.datastore.root})\n-\n- for tag in tags:\n- record.tags.add(tag)\n-\n- record.start_time = time.time()\n-\n- ## http://stackoverflow.com/questions/4675728/redirect-stdout-to-a-file-in-python\n- ## see the last post in this thread\n- logger = Writer()\n- stdout_stderr = sys.stdout, sys.stderr\n- sys.stdout, sys.stderr = logger, logger\n-\n- function(*args, **record.parameters.as_dict())\n-\n- sys.stdout, sys.stderr = stdout_stderr\n- record.stdout_stderr = logger.log\n- print logger.log\n- record.duration = time.time() - record.start_time\n- record.output_data = record.datastore.find_new_data(record.timestamp)\n-\n- lock = lockfile.FileLock(os.path.split(_get_project_file(project.path))[0])\n- lock.acquire()\n- project.add_record(record)\n- project.save()\n- lock.release()\n+ def start(self):\n+ self.stdout_stderr = sys.stdout, sys.stderr\n+ if self.logging_on:\n+ sys.stdout, sys.stderr = self, self\n+\n+ def stop(self):\n+ sys.stdout, sys.stderr = self.stdout_stderr\n+ print self.out\n+ \n+ @property\n+ def out(self):\n+ return ''.join(self.log)\n+\n+\n+class SMTLock(object):\n+ def __init__(self, project):\n+ self.lock = lockfile.FileLock(os.path.split(_get_project_file(project.path))[0])\n+\n+ def start(self):\n+ self.lock.acquire()\n+\n+ def stop(self):\n+ self.lock.release()\n+\n+ \n+@contextmanager\n+def contextualize(l):\n+ l.start()\n+ try:\n+ yield\n+ finally:\n+ l.stop()\n+ \n+ \n+class SMTSimulation(object):\n+ def __init__(self, function, args=(), kwargs={}, tags=(), reason='', main_file=__file__):\n+ project = load_project()\n+ record = project.new_record(parameters=SimpleParameterSet(kwargs),\n+ main_file=main_file,\n+ reason=reason)\n+\n+ record.datastore.root = os.path.join(record.datastore.root, record.label)\n+ record.parameters.update({'datadir': record.datastore.root})\n+\n+ for tag in tags:\n+ record.tags.add(tag)\n+\n+ self.record = record\n+ self.project = project\n+ self.function = function\n+ self.args = args\n+ \n+ def launch(self):\n+ record = self.record\n+ record.start_time = time.time()\n+ \n+ l = Logger()\n+\n+ with contextualize(l):\n+ self.function(*self.args, **record.parameters.as_dict())\n+ \n+ record.stdout_stderr = l.out\n+ record.duration = time.time() - record.start_time\n+\n+ record.output_data = record.datastore.find_new_data(record.timestamp)\n+\n+ with contextualize(SMTLock(self.project)):\n+ self.project.add_record(record)\n+ self.project.save()\n+ raw_input('stopped')\n ", + "datastore": { + "type": "FileSystemDataStore", + "parameters": { + "root": "./Data/769adf448270" + } + }, + "input_datastore": { + "type": "FileSystemDataStore", + "parameters": { + "root": "/" + } + }, + "executable": { + "path": "/home/wd15/.virtualenvs/default/bin/python", + "version": "2.7.3", + "name": "Python", + "options": "" + }, + "parameters": { + "content": "totalSteps = 1\ndatadir = \"./Data/769adf448270\"", + "type": "SimpleParameterSet" + }, + "label": "769adf448270", + "version": "dbe0f00a15307cd92b19e14677d61097315669fb", + "stdout_stderr": "[ 1. 1. 1. 1.]\n[ 0.34738209 0.61535499 0.01923836 0.00971058]\n[ 1.23729704e-01 2.14204081e-01 1.88311438e-04 1.55991524e-03]\n\ntheta 0.0\ncBar_supp 1.0\ncBar_cu 1.0\npotentialBar 1.0\nmin(extension) 7.22965473284e-08\nmin(depositionRate) 2.09114908795e-09\nmin(current) 56.8350759862\nmin(cupric) 997.266139623\nmin(baseCurrent) 56.9323002935\nmax(interfaceTheta) - 1: -0.973021297371\nmin(interfaceTheta) 0.0\nmin(I0) 38.9208518948\ndt 0.011\nelapsed time 0.0\nstep 0\n\n", + "repository": { + "url": "/home/wd15/git/extremefill-data", + "type": "GitRepository", + "upstream": "git@github.com:wd15/extremefill-data.git" + }, + "tags": [ + "test" + ], + "timestamp": "2013-02-16 21:49:13", + "reason": "testing SMT class", + "dependencies": [ + { + "name": "Cython", + "module": "python", + "source": "attribute", + "version": "0.16", + "diff": "", + "path": "/usr/lib/python2.7/dist-packages/Cython" + }, + { + "name": "IPython", + "module": "python", + "source": "attribute", + "version": "0.13.1.rc2", + "diff": "", + "path": "/usr/lib/python2.7/dist-packages/IPython" + }, + { + "name": "PIL", + "module": "python", + "source": null, + "version": "unknown", + "diff": "", + "path": "/usr/lib/python2.7/dist-packages/PIL" + }, + { + "name": "PyQt4", + "module": "python", + "source": null, + "version": "unknown", + "diff": "", + "path": "/usr/lib/python2.7/dist-packages/PyQt4" + }, + { + "name": "PyTrilinos", + "module": "python", + "source": "attribute", + "version": "4.8d", + "diff": "", + "path": "/home/wd15/.virtualenvs/fipy/lib/python2.7/site-packages/PyTrilinos" + }, + { + "name": "dateutil", + "module": "python", + "source": "attribute", + "version": "1.5", + "diff": "", + "path": "/usr/lib/python2.7/dist-packages/dateutil" + }, + { + "name": "distutils", + "module": "python", + "source": "attribute", + "version": "2.7.3", + "diff": "", + "path": "/home/wd15/.virtualenvs/default/lib/python2.7/distutils" + }, + { + "name": "django", + "module": "python", + "source": "attribute", + "version": "1.4.1", + "diff": "", + "path": "/usr/lib/python2.7/dist-packages/django" + }, + { + "name": "docutils", + "module": "python", + "source": "attribute", + "version": "0.10", + "diff": "", + "path": "/home/wd15/.virtualenvs/fipy/lib/python2.7/site-packages/docutils" + }, + { + "name": "encodings", + "module": "python", + "source": null, + "version": "unknown", + "diff": "", + "path": "/home/wd15/.virtualenvs/default/lib/python2.7/encodings" + }, + { + "name": "extremefill", + "module": "python", + "source": "/home/wd15/git/extremefill", + "version": "549c969edb113d0b3e9804612bfa53e91319c0ea", + "diff": "diff --git a/data/viewer.py b/data/viewer.py\nindex 68f60e0..d9ab7c2 100644\n--- a/data/viewer.py\n+++ b/data/viewer.py\n@@ -122,7 +122,7 @@ class ContourViewer(BaseViewer):\n self.times = times\n self.contours = contours\n self.data = []\n- super(ContourViewer, self).__init__(branches=branches, datafile=datafiles, datafiles=datafiles)\n+ super(ContourViewer, self).__init__(branches=branches, datafile=datafile, datafiles=datafiles)\n \n def plot(self):\n import matplotlib.pyplot as plt\n@@ -152,6 +152,24 @@ class ContourViewer(BaseViewer):\n phi = np.reshape(phi, shape)\n self.data.append((x, y, phi))\n \n+def datafilesFromBranches(branches, datafile):\n+ cwd = os.getcwd()\n+ for count, branch in enumerate(branches):\n+ print 'branch',branch\n+ tempdir = gitCloneToTemp(branch=branch, repositoryPath='ssh://wd15@genie.nist.gov/users/wd15/git/extremefill')\n+ repopath = os.path.join(tempdir, 'extremefill')\n+ datapath = os.path.join(repopath, datafile)\n+ gitMediaSync()\n+ if count == 0:\n+ self.addBaseData(datapath)\n+ basetempdir = tempdir\n+ else:\n+ self.addData(datapath, branch)\n+ cleanTempRepo(tempdir) \n+\n+ cleanTempRepo(basetempdir)\n+ os.chdir(cwd)\n+\n def plotNx():\n branches = ('Nx600', 'Nx300', 'Nx150')\n datafile = os.path.join('data', 'data.h5')\n@@ -174,13 +192,13 @@ def plotCFL():\n \n def plotContour():\n # branches = ('CFL0.0125', 'CFL0.025', 'CFL0.05', 'CFL0.1', 'CFL0.2', 'CFL0.4', 'CFL0.8', 'CFL1.6')\n- branches = ('Nx600', 'Nx150')\n+ branches = ('Nx300', 'Nx150')\n # branches = ('CFL0.025', 'CFL0.05')\n datafile = os.path.join('data', 'data.h5')\n times = (0,)\n- # times = (0., 1000., 2000., 3000., 4000.)\n- # viewer = ContourViewer(times=times, branches=branches, datafile=datafile)\n- viewer = ContourViewer(times=times, branches=branches, datafile=datafile, datafiles=('data150.h5', 'data600.h5'))\n+ times = (0., 1000., 2000., 3000., 4000.)\n+ viewer = ContourViewer(times=times, branches=branches, datafile=datafile)\n+ #viewer = ContourViewer(times=times, branches=branches, datafile=datafile, datafiles=('data150.h5', 'data600.h5'))\n viewer.plot()\n \n if __name__ == '__main__':\n@@ -188,6 +206,6 @@ if __name__ == '__main__':\n # from profiler import calibrate_profiler\n # fudge = calibrate_profiler(10000)\n # profile = Profiler('profile', fudge=fudge)\n- plotCFL()\n+ plotContour()\n # profile.stop()\n ", + "path": "/home/wd15/git/extremefill/extremefill" + }, + { + "name": "fipy", + "module": "python", + "source": "/home/wd15/git/fipy", + "version": "8c51478a3e8c30618b3a96c132612a46735c7548", + "diff": "", + "path": "/home/wd15/git/fipy/fipy" + }, + { + "name": "gi", + "module": "python", + "source": "attribute", + "version": "3.4.0", + "diff": "", + "path": "/usr/lib/python2.7/dist-packages/gi" + }, + { + "name": "glib", + "module": "python", + "source": null, + "version": "unknown", + "diff": "", + "path": "/usr/lib/python2.7/dist-packages/glib" + }, + { + "name": "gobject", + "module": "python", + "source": null, + "version": "unknown", + "diff": "", + "path": "/usr/lib/python2.7/dist-packages/gobject" + }, + { + "name": "google", + "module": "python", + "source": null, + "version": "unknown", + "diff": "", + "path": "/usr/lib/python2.7/dist-packages/google" + }, + { + "name": "gtk", + "module": "python", + "source": null, + "version": "unknown", + "diff": "", + "path": "/usr/lib/python2.7/dist-packages/gtk-2.0/gtk" + }, + { + "name": "httplib2", + "module": "python", + "source": "attribute", + "version": "0.7.4", + "diff": "", + "path": "/usr/lib/python2.7/dist-packages/httplib2" + }, + { + "name": "lockfile", + "module": "python", + "source": "egg-info", + "version": "0.9.1", + "diff": "", + "path": "/home/wd15/.virtualenvs/default/lib/python2.7/site-packages/lockfile-0.9.1-py2.7.egg/lockfile" + }, + { + "name": "lxml", + "module": "python", + "source": null, + "version": "unknown", + "diff": "", + "path": "/usr/lib/python2.7/dist-packages/lxml" + }, + { + "name": "matplotlib", + "module": "python", + "source": "attribute", + "version": "1.1.1", + "diff": "", + "path": "/usr/lib/pymodules/python2.7/matplotlib" + }, + { + "name": "mayavi", + "module": "python", + "source": "attribute", + "version": "4.1.0", + "diff": "", + "path": "/usr/lib/python2.7/dist-packages/mayavi" + }, + { + "name": "mpi4py", + "module": "python", + "source": "attribute", + "version": "1.3", + "diff": "", + "path": "/usr/lib/python2.7/dist-packages/mpi4py" + }, + { + "name": "mpl_toolkits", + "module": "python", + "source": null, + "version": "unknown", + "diff": "", + "path": "/usr/lib/pymodules/python2.7/mpl_toolkits" + }, + { + "name": "mx", + "module": "python", + "source": "attribute", + "version": "3.2.1", + "diff": "", + "path": "/usr/lib/python2.7/dist-packages/mx" + }, + { + "name": "nose", + "module": "python", + "source": "attribute", + "version": "1.2.1", + "diff": "", + "path": "/home/wd15/.virtualenvs/fipy/lib/python2.7/site-packages/nose" + }, + { + "name": "numexpr", + "module": "python", + "source": "attribute", + "version": "2.0.1", + "diff": "", + "path": "/usr/lib/python2.7/dist-packages/numexpr" + }, + { + "name": "numpy", + "module": "python", + "source": "attribute", + "version": "1.6.2", + "diff": "", + "path": "/usr/lib/python2.7/dist-packages/numpy" + }, + { + "name": "pyamg", + "module": "python", + "source": "attribute", + "version": "2.0.4.dev", + "diff": "", + "path": "/home/wd15/.virtualenvs/fipy/lib/python2.7/site-packages/pyamg" + }, + { + "name": "pylsmlib", + "module": "python", + "source": "/home/wd15/git/LSMLIB", + "version": "6f5d969bb27530aa37452a8b096e538a5cf7b993", + "diff": "", + "path": "/home/wd15/git/LSMLIB/pylsmlib/pylsmlib" + }, + { + "name": "pysparse", + "module": "python", + "source": "attribute", + "version": "1.1", + "diff": "", + "path": "/usr/lib/python2.7/dist-packages/pysparse" + }, + { + "name": "pytz", + "module": "python", + "source": "attribute", + "version": "2011k", + "diff": "", + "path": "/usr/lib/python2.7/dist-packages/pytz" + }, + { + "name": "scipy", + "module": "python", + "source": "attribute", + "version": "0.10.1", + "diff": "", + "path": "/usr/lib/python2.7/dist-packages/scipy" + }, + { + "name": "setuptools", + "module": "python", + "source": "attribute", + "version": "0.6", + "diff": "", + "path": "/home/wd15/.virtualenvs/default/local/lib/python2.7/site-packages/distribute-0.6.24-py2.7.egg/setuptools" + }, + { + "name": "simplejson", + "module": "python", + "source": "attribute", + "version": "2.6.1", + "diff": "", + "path": "/usr/lib/python2.7/dist-packages/simplejson" + }, + { + "name": "skfmm", + "module": "python", + "source": "/home/wd15/git/scikit-fmm", + "version": "467e5982fbd9d4eb32495f826d6bda65da498e13", + "diff": "", + "path": "/home/wd15/git/scikit-fmm/skfmm" + }, + { + "name": "sumatra", + "module": "python", + "source": "attribute", + "version": "0.5.0dev", + "diff": "", + "path": "/home/wd15/.virtualenvs/default/lib/python2.7/site-packages/Sumatra-0.5.0dev-py2.7.egg/sumatra" + }, + { + "name": "tables", + "module": "python", + "source": "attribute", + "version": "2.3.1", + "diff": "", + "path": "/usr/lib/python2.7/dist-packages/tables" + }, + { + "name": "tagging", + "module": "python", + "source": "attribute", + "version": "0.3.1", + "diff": "", + "path": "/home/wd15/.virtualenvs/fipy/lib/python2.7/site-packages/tagging" + }, + { + "name": "tornado", + "module": "python", + "source": "attribute", + "version": "2.3", + "diff": "", + "path": "/usr/lib/python2.7/dist-packages/tornado" + }, + { + "name": "traits", + "module": "python", + "source": "attribute", + "version": "4.1.0", + "diff": "", + "path": "/usr/lib/python2.7/dist-packages/traits" + }, + { + "name": "tvtk", + "module": "python", + "source": null, + "version": "unknown", + "diff": "", + "path": "/usr/lib/python2.7/dist-packages/tvtk" + }, + { + "name": "vtk", + "module": "python", + "source": null, + "version": "unknown", + "diff": "", + "path": "/usr/lib/pymodules/python2.7/vtk" + }, + { + "name": "wx", + "module": "python", + "source": "attribute", + "version": "2.8.12.1", + "diff": "", + "path": "/usr/lib/python2.7/dist-packages/wx-2.8-gtk2-unicode/wx" + }, + { + "name": "yaml", + "module": "python", + "source": "attribute", + "version": "3.10", + "diff": "", + "path": "/usr/lib/python2.7/dist-packages/yaml" + }, + { + "name": "zmq", + "module": "python", + "source": "attribute", + "version": "2.2.0", + "diff": "", + "path": "/usr/lib/python2.7/dist-packages/zmq" + } + ], + "user": "Daniel Wheeler ", + "output_data": [ + { + "path": "data.h5", + "digest": "a6f2add0e26d967c180fbf80c63e6c2a07a20ad3", + "metadata": { + "mimetype": null, + "size": 102992, + "encoding": null + } + } + ], + "input_data": [], + "launch_mode": { + "type": "SerialLaunchMode", + "parameters": { + "working_directory": "/home/wd15/git/extremefill-data" + } + }, + "main_file": "script.py", + "outcome": "" +}, +{ + "script_arguments": "", + "platforms": [ + { + "system_name": "Linux", + "machine": "x86_64", + "version": "#35-Ubuntu SMP Thu Jan 24 13:15:40 UTC 2013", + "ip_addr": "127.0.0.1", + "architecture_bits": "64bit", + "architecture_linkage": "ELF", + "release": "3.5.0-23-generic", + "network_name": "loki", + "processor": "x86_64" + } + ], + "duration": 2.5128660202026367, + "diff": "diff --git a/script.py b/script.py\nindex cd4453d..a2a7a03 100644\n--- a/script.py\n+++ b/script.py\n@@ -32,5 +32,5 @@ def run(totalSteps=10,\n \n from smt import SMTSimulation\n \n-SMTSimulation(run, kwargs={'totalSteps' : 1}, tags=('test',), reason=\"testing decorator\", main_file=__file__)\n-\n+smtsim = SMTSimulation(run, kwargs={'totalSteps' : 1}, tags=('test',), reason=\"testing SMT class\", main_file=__file__)\n+smtsim.launch()\ndiff --git a/smt.py b/smt.py\nindex cdc7015..50b2ed0 100644\n--- a/smt.py\n+++ b/smt.py\n@@ -22,6 +22,7 @@ On laptop use http://129.6.153.60:8000\n import time\n import os\n import sys\n+from contextlib import contextmanager\n \n \n from sumatra.projects import load_project\n@@ -30,43 +31,81 @@ from sumatra.projects import _get_project_file\n import lockfile\n \n \n-class Writer(object):\n- log = []\n+class Logger(object):\n+ def __init__(self, logging_on=True):\n+ self.logging_on = logging_on\n+ self.log = []\n+ \n def write(self, data):\n self.log.append(data)\n \n-\n-def SMTSimulation(function, args=(), kwargs={}, tags=(), reason='', main_file=__file__):\n- project = load_project()\n- record = project.new_record(parameters=SimpleParameterSet(kwargs),\n- main_file=main_file,\n- reason=reason)\n-\n- record.datastore.root = os.path.join(record.datastore.root, record.label)\n- record.parameters.update({'datadir': record.datastore.root})\n-\n- for tag in tags:\n- record.tags.add(tag)\n-\n- record.start_time = time.time()\n-\n- ## http://stackoverflow.com/questions/4675728/redirect-stdout-to-a-file-in-python\n- ## see the last post in this thread\n- logger = Writer()\n- stdout_stderr = sys.stdout, sys.stderr\n- sys.stdout, sys.stderr = logger, logger\n-\n- function(*args, **record.parameters.as_dict())\n-\n- sys.stdout, sys.stderr = stdout_stderr\n- record.stdout_stderr = logger.log\n- print logger.log\n- record.duration = time.time() - record.start_time\n- record.output_data = record.datastore.find_new_data(record.timestamp)\n-\n- lock = lockfile.FileLock(os.path.split(_get_project_file(project.path))[0])\n- lock.acquire()\n- project.add_record(record)\n- project.save()\n- lock.release()\n+ def start(self):\n+ self.stdout_stderr = sys.stdout, sys.stderr\n+ if self.logging_on:\n+ sys.stdout, sys.stderr = self, self\n+\n+ def stop(self):\n+ sys.stdout, sys.stderr = self.stdout_stderr\n+ print self.out\n+ \n+ @property\n+ def out(self):\n+ return ''.join(self.log)\n+\n+\n+class SMTLock(object):\n+ def __init__(self, project):\n+ self.lock = lockfile.FileLock(os.path.split(_get_project_file(project.path))[0])\n+\n+ def start(self):\n+ self.lock.acquire()\n+\n+ def stop(self):\n+ self.lock.release()\n+\n+ \n+@contextmanager\n+def contextualize(l):\n+ l.start()\n+ try:\n+ yield\n+ finally:\n+ l.stop()\n+ \n+ \n+class SMTSimulation(object):\n+ def __init__(self, function, args=(), kwargs={}, tags=(), reason='', main_file=__file__):\n+ project = load_project()\n+ record = project.new_record(parameters=SimpleParameterSet(kwargs),\n+ main_file=main_file,\n+ reason=reason)\n+\n+ record.datastore.root = os.path.join(record.datastore.root, record.label)\n+ record.parameters.update({'datadir': record.datastore.root})\n+\n+ for tag in tags:\n+ record.tags.add(tag)\n+\n+ self.record = record\n+ self.project = project\n+ self.function = function\n+ self.args = args\n+ \n+ def launch(self):\n+ record = self.record\n+ record.start_time = time.time()\n+ \n+ l = Logger()\n+\n+ with contextualize(l):\n+ self.function(*self.args, **record.parameters.as_dict())\n+ \n+ record.stdout_stderr = l.out\n+ record.duration = time.time() - record.start_time\n+\n+ record.output_data = record.datastore.find_new_data(record.timestamp)\n+\n+ with contextualize(SMTLock(self.project)):\n+ self.project.add_record(record)\n+ self.project.save()\n ", + "datastore": { + "type": "FileSystemDataStore", + "parameters": { + "root": "./Data/4bc8dc146695" + } + }, + "input_datastore": { + "type": "FileSystemDataStore", + "parameters": { + "root": "/" + } + }, + "executable": { + "path": "/home/wd15/.virtualenvs/default/bin/python", + "version": "2.7.3", + "name": "Python", + "options": "" + }, + "parameters": { + "content": "totalSteps = 1\ndatadir = \"./Data/4bc8dc146695\"", + "type": "SimpleParameterSet" + }, + "label": "4bc8dc146695", + "version": "dbe0f00a15307cd92b19e14677d61097315669fb", + "stdout_stderr": "[ 1. 1. 1. 1.]\n[ 0.34738209 0.61535499 0.01923836 0.00971058]\n[ 1.23729704e-01 2.14204081e-01 1.88311438e-04 1.55991524e-03]\n\ntheta 0.0\ncBar_supp 1.0\ncBar_cu 1.0\npotentialBar 1.0\nmin(extension) 7.22965473284e-08\nmin(depositionRate) 2.09114908795e-09\nmin(current) 56.8350759862\nmin(cupric) 997.266139623\nmin(baseCurrent) 56.9323002935\nmax(interfaceTheta) - 1: -0.973021297371\nmin(interfaceTheta) 0.0\nmin(I0) 38.9208518948\ndt 0.011\nelapsed time 0.0\nstep 0\n\n", + "repository": { + "url": "/home/wd15/git/extremefill-data", + "type": "GitRepository", + "upstream": "git@github.com:wd15/extremefill-data.git" + }, + "tags": [ + "test" + ], + "timestamp": "2013-02-16 21:44:19", + "reason": "testing SMT class", + "dependencies": [ + { + "name": "Cython", + "module": "python", + "source": "attribute", + "version": "0.16", + "diff": "", + "path": "/usr/lib/python2.7/dist-packages/Cython" + }, + { + "name": "IPython", + "module": "python", + "source": "attribute", + "version": "0.13.1.rc2", + "diff": "", + "path": "/usr/lib/python2.7/dist-packages/IPython" + }, + { + "name": "PIL", + "module": "python", + "source": null, + "version": "unknown", + "diff": "", + "path": "/usr/lib/python2.7/dist-packages/PIL" + }, + { + "name": "PyQt4", + "module": "python", + "source": null, + "version": "unknown", + "diff": "", + "path": "/usr/lib/python2.7/dist-packages/PyQt4" + }, + { + "name": "PyTrilinos", + "module": "python", + "source": "attribute", + "version": "4.8d", + "diff": "", + "path": "/home/wd15/.virtualenvs/fipy/lib/python2.7/site-packages/PyTrilinos" + }, + { + "name": "dateutil", + "module": "python", + "source": "attribute", + "version": "1.5", + "diff": "", + "path": "/usr/lib/python2.7/dist-packages/dateutil" + }, + { + "name": "distutils", + "module": "python", + "source": "attribute", + "version": "2.7.3", + "diff": "", + "path": "/home/wd15/.virtualenvs/default/lib/python2.7/distutils" + }, + { + "name": "django", + "module": "python", + "source": "attribute", + "version": "1.4.1", + "diff": "", + "path": "/usr/lib/python2.7/dist-packages/django" + }, + { + "name": "docutils", + "module": "python", + "source": "attribute", + "version": "0.10", + "diff": "", + "path": "/home/wd15/.virtualenvs/fipy/lib/python2.7/site-packages/docutils" + }, + { + "name": "encodings", + "module": "python", + "source": null, + "version": "unknown", + "diff": "", + "path": "/home/wd15/.virtualenvs/default/lib/python2.7/encodings" + }, + { + "name": "extremefill", + "module": "python", + "source": "/home/wd15/git/extremefill", + "version": "549c969edb113d0b3e9804612bfa53e91319c0ea", + "diff": "diff --git a/data/viewer.py b/data/viewer.py\nindex 68f60e0..d9ab7c2 100644\n--- a/data/viewer.py\n+++ b/data/viewer.py\n@@ -122,7 +122,7 @@ class ContourViewer(BaseViewer):\n self.times = times\n self.contours = contours\n self.data = []\n- super(ContourViewer, self).__init__(branches=branches, datafile=datafiles, datafiles=datafiles)\n+ super(ContourViewer, self).__init__(branches=branches, datafile=datafile, datafiles=datafiles)\n \n def plot(self):\n import matplotlib.pyplot as plt\n@@ -152,6 +152,24 @@ class ContourViewer(BaseViewer):\n phi = np.reshape(phi, shape)\n self.data.append((x, y, phi))\n \n+def datafilesFromBranches(branches, datafile):\n+ cwd = os.getcwd()\n+ for count, branch in enumerate(branches):\n+ print 'branch',branch\n+ tempdir = gitCloneToTemp(branch=branch, repositoryPath='ssh://wd15@genie.nist.gov/users/wd15/git/extremefill')\n+ repopath = os.path.join(tempdir, 'extremefill')\n+ datapath = os.path.join(repopath, datafile)\n+ gitMediaSync()\n+ if count == 0:\n+ self.addBaseData(datapath)\n+ basetempdir = tempdir\n+ else:\n+ self.addData(datapath, branch)\n+ cleanTempRepo(tempdir) \n+\n+ cleanTempRepo(basetempdir)\n+ os.chdir(cwd)\n+\n def plotNx():\n branches = ('Nx600', 'Nx300', 'Nx150')\n datafile = os.path.join('data', 'data.h5')\n@@ -174,13 +192,13 @@ def plotCFL():\n \n def plotContour():\n # branches = ('CFL0.0125', 'CFL0.025', 'CFL0.05', 'CFL0.1', 'CFL0.2', 'CFL0.4', 'CFL0.8', 'CFL1.6')\n- branches = ('Nx600', 'Nx150')\n+ branches = ('Nx300', 'Nx150')\n # branches = ('CFL0.025', 'CFL0.05')\n datafile = os.path.join('data', 'data.h5')\n times = (0,)\n- # times = (0., 1000., 2000., 3000., 4000.)\n- # viewer = ContourViewer(times=times, branches=branches, datafile=datafile)\n- viewer = ContourViewer(times=times, branches=branches, datafile=datafile, datafiles=('data150.h5', 'data600.h5'))\n+ times = (0., 1000., 2000., 3000., 4000.)\n+ viewer = ContourViewer(times=times, branches=branches, datafile=datafile)\n+ #viewer = ContourViewer(times=times, branches=branches, datafile=datafile, datafiles=('data150.h5', 'data600.h5'))\n viewer.plot()\n \n if __name__ == '__main__':\n@@ -188,6 +206,6 @@ if __name__ == '__main__':\n # from profiler import calibrate_profiler\n # fudge = calibrate_profiler(10000)\n # profile = Profiler('profile', fudge=fudge)\n- plotCFL()\n+ plotContour()\n # profile.stop()\n ", + "path": "/home/wd15/git/extremefill/extremefill" + }, + { + "name": "fipy", + "module": "python", + "source": "/home/wd15/git/fipy", + "version": "8c51478a3e8c30618b3a96c132612a46735c7548", + "diff": "", + "path": "/home/wd15/git/fipy/fipy" + }, + { + "name": "gi", + "module": "python", + "source": "attribute", + "version": "3.4.0", + "diff": "", + "path": "/usr/lib/python2.7/dist-packages/gi" + }, + { + "name": "glib", + "module": "python", + "source": null, + "version": "unknown", + "diff": "", + "path": "/usr/lib/python2.7/dist-packages/glib" + }, + { + "name": "gobject", + "module": "python", + "source": null, + "version": "unknown", + "diff": "", + "path": "/usr/lib/python2.7/dist-packages/gobject" + }, + { + "name": "google", + "module": "python", + "source": null, + "version": "unknown", + "diff": "", + "path": "/usr/lib/python2.7/dist-packages/google" + }, + { + "name": "gtk", + "module": "python", + "source": null, + "version": "unknown", + "diff": "", + "path": "/usr/lib/python2.7/dist-packages/gtk-2.0/gtk" + }, + { + "name": "httplib2", + "module": "python", + "source": "attribute", + "version": "0.7.4", + "diff": "", + "path": "/usr/lib/python2.7/dist-packages/httplib2" + }, + { + "name": "lockfile", + "module": "python", + "source": "egg-info", + "version": "0.9.1", + "diff": "", + "path": "/home/wd15/.virtualenvs/default/lib/python2.7/site-packages/lockfile-0.9.1-py2.7.egg/lockfile" + }, + { + "name": "lxml", + "module": "python", + "source": null, + "version": "unknown", + "diff": "", + "path": "/usr/lib/python2.7/dist-packages/lxml" + }, + { + "name": "matplotlib", + "module": "python", + "source": "attribute", + "version": "1.1.1", + "diff": "", + "path": "/usr/lib/pymodules/python2.7/matplotlib" + }, + { + "name": "mayavi", + "module": "python", + "source": "attribute", + "version": "4.1.0", + "diff": "", + "path": "/usr/lib/python2.7/dist-packages/mayavi" + }, + { + "name": "mpi4py", + "module": "python", + "source": "attribute", + "version": "1.3", + "diff": "", + "path": "/usr/lib/python2.7/dist-packages/mpi4py" + }, + { + "name": "mpl_toolkits", + "module": "python", + "source": null, + "version": "unknown", + "diff": "", + "path": "/usr/lib/pymodules/python2.7/mpl_toolkits" + }, + { + "name": "mx", + "module": "python", + "source": "attribute", + "version": "3.2.1", + "diff": "", + "path": "/usr/lib/python2.7/dist-packages/mx" + }, + { + "name": "nose", + "module": "python", + "source": "attribute", + "version": "1.2.1", + "diff": "", + "path": "/home/wd15/.virtualenvs/fipy/lib/python2.7/site-packages/nose" + }, + { + "name": "numexpr", + "module": "python", + "source": "attribute", + "version": "2.0.1", + "diff": "", + "path": "/usr/lib/python2.7/dist-packages/numexpr" + }, + { + "name": "numpy", + "module": "python", + "source": "attribute", + "version": "1.6.2", + "diff": "", + "path": "/usr/lib/python2.7/dist-packages/numpy" + }, + { + "name": "pyamg", + "module": "python", + "source": "attribute", + "version": "2.0.4.dev", + "diff": "", + "path": "/home/wd15/.virtualenvs/fipy/lib/python2.7/site-packages/pyamg" + }, + { + "name": "pylsmlib", + "module": "python", + "source": "/home/wd15/git/LSMLIB", + "version": "6f5d969bb27530aa37452a8b096e538a5cf7b993", + "diff": "", + "path": "/home/wd15/git/LSMLIB/pylsmlib/pylsmlib" + }, + { + "name": "pysparse", + "module": "python", + "source": "attribute", + "version": "1.1", + "diff": "", + "path": "/usr/lib/python2.7/dist-packages/pysparse" + }, + { + "name": "pytz", + "module": "python", + "source": "attribute", + "version": "2011k", + "diff": "", + "path": "/usr/lib/python2.7/dist-packages/pytz" + }, + { + "name": "scipy", + "module": "python", + "source": "attribute", + "version": "0.10.1", + "diff": "", + "path": "/usr/lib/python2.7/dist-packages/scipy" + }, + { + "name": "setuptools", + "module": "python", + "source": "attribute", + "version": "0.6", + "diff": "", + "path": "/home/wd15/.virtualenvs/default/local/lib/python2.7/site-packages/distribute-0.6.24-py2.7.egg/setuptools" + }, + { + "name": "simplejson", + "module": "python", + "source": "attribute", + "version": "2.6.1", + "diff": "", + "path": "/usr/lib/python2.7/dist-packages/simplejson" + }, + { + "name": "skfmm", + "module": "python", + "source": "/home/wd15/git/scikit-fmm", + "version": "467e5982fbd9d4eb32495f826d6bda65da498e13", + "diff": "", + "path": "/home/wd15/git/scikit-fmm/skfmm" + }, + { + "name": "sumatra", + "module": "python", + "source": "attribute", + "version": "0.5.0dev", + "diff": "", + "path": "/home/wd15/.virtualenvs/default/lib/python2.7/site-packages/Sumatra-0.5.0dev-py2.7.egg/sumatra" + }, + { + "name": "tables", + "module": "python", + "source": "attribute", + "version": "2.3.1", + "diff": "", + "path": "/usr/lib/python2.7/dist-packages/tables" + }, + { + "name": "tagging", + "module": "python", + "source": "attribute", + "version": "0.3.1", + "diff": "", + "path": "/home/wd15/.virtualenvs/fipy/lib/python2.7/site-packages/tagging" + }, + { + "name": "tornado", + "module": "python", + "source": "attribute", + "version": "2.3", + "diff": "", + "path": "/usr/lib/python2.7/dist-packages/tornado" + }, + { + "name": "traits", + "module": "python", + "source": "attribute", + "version": "4.1.0", + "diff": "", + "path": "/usr/lib/python2.7/dist-packages/traits" + }, + { + "name": "tvtk", + "module": "python", + "source": null, + "version": "unknown", + "diff": "", + "path": "/usr/lib/python2.7/dist-packages/tvtk" + }, + { + "name": "vtk", + "module": "python", + "source": null, + "version": "unknown", + "diff": "", + "path": "/usr/lib/pymodules/python2.7/vtk" + }, + { + "name": "wx", + "module": "python", + "source": "attribute", + "version": "2.8.12.1", + "diff": "", + "path": "/usr/lib/python2.7/dist-packages/wx-2.8-gtk2-unicode/wx" + }, + { + "name": "yaml", + "module": "python", + "source": "attribute", + "version": "3.10", + "diff": "", + "path": "/usr/lib/python2.7/dist-packages/yaml" + }, + { + "name": "zmq", + "module": "python", + "source": "attribute", + "version": "2.2.0", + "diff": "", + "path": "/usr/lib/python2.7/dist-packages/zmq" + } + ], + "user": "Daniel Wheeler ", + "output_data": [ + { + "path": "data.h5", + "digest": "26790c36c896c3e1881d82f42a1818a37e253196", + "metadata": { + "mimetype": null, + "size": 102992, + "encoding": null + } + } + ], + "input_data": [], + "launch_mode": { + "type": "SerialLaunchMode", + "parameters": { + "working_directory": "/home/wd15/git/extremefill-data" + } + }, + "main_file": "script.py", + "outcome": "" +}, +{ + "script_arguments": "", + "platforms": [ + { + "system_name": "Linux", + "machine": "x86_64", + "version": "#35-Ubuntu SMP Thu Jan 24 13:15:40 UTC 2013", + "ip_addr": "127.0.0.1", + "architecture_bits": "64bit", + "architecture_linkage": "ELF", + "release": "3.5.0-23-generic", + "network_name": "loki", + "processor": "x86_64" + } + ], + "duration": 2.6057169437408447, + "diff": "diff --git a/script.py b/script.py\nindex cd4453d..a2a7a03 100644\n--- a/script.py\n+++ b/script.py\n@@ -32,5 +32,5 @@ def run(totalSteps=10,\n \n from smt import SMTSimulation\n \n-SMTSimulation(run, kwargs={'totalSteps' : 1}, tags=('test',), reason=\"testing decorator\", main_file=__file__)\n-\n+smtsim = SMTSimulation(run, kwargs={'totalSteps' : 1}, tags=('test',), reason=\"testing SMT class\", main_file=__file__)\n+smtsim.launch()\ndiff --git a/smt.py b/smt.py\nindex cdc7015..311664e 100644\n--- a/smt.py\n+++ b/smt.py\n@@ -22,6 +22,7 @@ On laptop use http://129.6.153.60:8000\n import time\n import os\n import sys\n+from contextlib import contextmanager\n \n \n from sumatra.projects import load_project\n@@ -30,43 +31,72 @@ from sumatra.projects import _get_project_file\n import lockfile\n \n \n-class Writer(object):\n- log = []\n+class Logger(object):\n+ def __init__(self, logging_on=True):\n+ self.logging_on = logging_on\n+ self.log = []\n+ \n def write(self, data):\n self.log.append(data)\n \n-\n-def SMTSimulation(function, args=(), kwargs={}, tags=(), reason='', main_file=__file__):\n- project = load_project()\n- record = project.new_record(parameters=SimpleParameterSet(kwargs),\n- main_file=main_file,\n- reason=reason)\n-\n- record.datastore.root = os.path.join(record.datastore.root, record.label)\n- record.parameters.update({'datadir': record.datastore.root})\n-\n- for tag in tags:\n- record.tags.add(tag)\n-\n- record.start_time = time.time()\n-\n- ## http://stackoverflow.com/questions/4675728/redirect-stdout-to-a-file-in-python\n- ## see the last post in this thread\n- logger = Writer()\n- stdout_stderr = sys.stdout, sys.stderr\n- sys.stdout, sys.stderr = logger, logger\n-\n- function(*args, **record.parameters.as_dict())\n-\n- sys.stdout, sys.stderr = stdout_stderr\n- record.stdout_stderr = logger.log\n- print logger.log\n- record.duration = time.time() - record.start_time\n- record.output_data = record.datastore.find_new_data(record.timestamp)\n-\n- lock = lockfile.FileLock(os.path.split(_get_project_file(project.path))[0])\n- lock.acquire()\n- project.add_record(record)\n- project.save()\n- lock.release()\n+ def start(self):\n+ self.stdout_stderr = sys.stdout, sys.stderr\n+ if self.logging_on:\n+ sys.stdout, sys.stderr = self, self\n+\n+ def stop(self):\n+ sys.stdout, sys.stderr = self.stdout_stderr\n+ print self.out\n+ \n+ @property\n+ def out(self):\n+ return ''.join(self.log)\n+\n+ \n+@contextmanager\n+def logger(l):\n+ l.start()\n+ try:\n+ yield\n+ finally:\n+ l.stop()\n+ \n+ \n+class SMTSimulation(object):\n+ def __init__(self, function, args=(), kwargs={}, tags=(), reason='', main_file=__file__):\n+ project = load_project()\n+ record = project.new_record(parameters=SimpleParameterSet(kwargs),\n+ main_file=main_file,\n+ reason=reason)\n+\n+ record.datastore.root = os.path.join(record.datastore.root, record.label)\n+ record.parameters.update({'datadir': record.datastore.root})\n+\n+ for tag in tags:\n+ record.tags.add(tag)\n+\n+ self.record = record\n+ self.project = project\n+ self.function = function\n+ self.args = args\n+ \n+ def launch(self):\n+ record = self.record\n+ record.start_time = time.time()\n+ \n+ l = Logger()\n+\n+ with logger(l):\n+ self.function(*self.args, **record.parameters.as_dict())\n+\n+ record.stdout_stderr = l.out\n+ record.duration = time.time() - record.start_time\n+\n+ record.output_data = record.datastore.find_new_data(record.timestamp)\n+\n+ lock = lockfile.FileLock(os.path.split(_get_project_file(self.project.path))[0])\n+ lock.acquire()\n+ self.project.add_record(record)\n+ self.project.save()\n+ lock.release()\n ", + "datastore": { + "type": "FileSystemDataStore", + "parameters": { + "root": "./Data/1154aec81e7d" + } + }, + "input_datastore": { + "type": "FileSystemDataStore", + "parameters": { + "root": "/" + } + }, + "executable": { + "path": "/home/wd15/.virtualenvs/default/bin/python", + "version": "2.7.3", + "name": "Python", + "options": "" + }, + "parameters": { + "content": "totalSteps = 1\ndatadir = \"./Data/1154aec81e7d\"", + "type": "SimpleParameterSet" + }, + "label": "1154aec81e7d", + "version": "dbe0f00a15307cd92b19e14677d61097315669fb", + "stdout_stderr": "[ 1. 1. 1. 1.]\n[ 0.34738209 0.61535499 0.01923836 0.00971058]\n[ 1.23729704e-01 2.14204081e-01 1.88311438e-04 1.55991524e-03]\n\ntheta 0.0\ncBar_supp 1.0\ncBar_cu 1.0\npotentialBar 1.0\nmin(extension) 7.22965473284e-08\nmin(depositionRate) 2.09114908795e-09\nmin(current) 56.8350759862\nmin(cupric) 997.266139623\nmin(baseCurrent) 56.9323002935\nmax(interfaceTheta) - 1: -0.973021297371\nmin(interfaceTheta) 0.0\nmin(I0) 38.9208518948\ndt 0.011\nelapsed time 0.0\nstep 0\n\n", + "repository": { + "url": "/home/wd15/git/extremefill-data", + "type": "GitRepository", + "upstream": "git@github.com:wd15/extremefill-data.git" + }, + "tags": [ + "test" + ], + "timestamp": "2013-02-16 21:31:00", + "reason": "testing SMT class", + "dependencies": [ + { + "name": "Cython", + "module": "python", + "source": "attribute", + "version": "0.16", + "diff": "", + "path": "/usr/lib/python2.7/dist-packages/Cython" + }, + { + "name": "IPython", + "module": "python", + "source": "attribute", + "version": "0.13.1.rc2", + "diff": "", + "path": "/usr/lib/python2.7/dist-packages/IPython" + }, + { + "name": "PIL", + "module": "python", + "source": null, + "version": "unknown", + "diff": "", + "path": "/usr/lib/python2.7/dist-packages/PIL" + }, + { + "name": "PyQt4", + "module": "python", + "source": null, + "version": "unknown", + "diff": "", + "path": "/usr/lib/python2.7/dist-packages/PyQt4" + }, + { + "name": "PyTrilinos", + "module": "python", + "source": "attribute", + "version": "4.8d", + "diff": "", + "path": "/home/wd15/.virtualenvs/fipy/lib/python2.7/site-packages/PyTrilinos" + }, + { + "name": "dateutil", + "module": "python", + "source": "attribute", + "version": "1.5", + "diff": "", + "path": "/usr/lib/python2.7/dist-packages/dateutil" + }, + { + "name": "distutils", + "module": "python", + "source": "attribute", + "version": "2.7.3", + "diff": "", + "path": "/home/wd15/.virtualenvs/default/lib/python2.7/distutils" + }, + { + "name": "django", + "module": "python", + "source": "attribute", + "version": "1.4.1", + "diff": "", + "path": "/usr/lib/python2.7/dist-packages/django" + }, + { + "name": "docutils", + "module": "python", + "source": "attribute", + "version": "0.10", + "diff": "", + "path": "/home/wd15/.virtualenvs/fipy/lib/python2.7/site-packages/docutils" + }, + { + "name": "encodings", + "module": "python", + "source": null, + "version": "unknown", + "diff": "", + "path": "/home/wd15/.virtualenvs/default/lib/python2.7/encodings" + }, + { + "name": "extremefill", + "module": "python", + "source": "/home/wd15/git/extremefill", + "version": "549c969edb113d0b3e9804612bfa53e91319c0ea", + "diff": "diff --git a/data/viewer.py b/data/viewer.py\nindex 68f60e0..d9ab7c2 100644\n--- a/data/viewer.py\n+++ b/data/viewer.py\n@@ -122,7 +122,7 @@ class ContourViewer(BaseViewer):\n self.times = times\n self.contours = contours\n self.data = []\n- super(ContourViewer, self).__init__(branches=branches, datafile=datafiles, datafiles=datafiles)\n+ super(ContourViewer, self).__init__(branches=branches, datafile=datafile, datafiles=datafiles)\n \n def plot(self):\n import matplotlib.pyplot as plt\n@@ -152,6 +152,24 @@ class ContourViewer(BaseViewer):\n phi = np.reshape(phi, shape)\n self.data.append((x, y, phi))\n \n+def datafilesFromBranches(branches, datafile):\n+ cwd = os.getcwd()\n+ for count, branch in enumerate(branches):\n+ print 'branch',branch\n+ tempdir = gitCloneToTemp(branch=branch, repositoryPath='ssh://wd15@genie.nist.gov/users/wd15/git/extremefill')\n+ repopath = os.path.join(tempdir, 'extremefill')\n+ datapath = os.path.join(repopath, datafile)\n+ gitMediaSync()\n+ if count == 0:\n+ self.addBaseData(datapath)\n+ basetempdir = tempdir\n+ else:\n+ self.addData(datapath, branch)\n+ cleanTempRepo(tempdir) \n+\n+ cleanTempRepo(basetempdir)\n+ os.chdir(cwd)\n+\n def plotNx():\n branches = ('Nx600', 'Nx300', 'Nx150')\n datafile = os.path.join('data', 'data.h5')\n@@ -174,13 +192,13 @@ def plotCFL():\n \n def plotContour():\n # branches = ('CFL0.0125', 'CFL0.025', 'CFL0.05', 'CFL0.1', 'CFL0.2', 'CFL0.4', 'CFL0.8', 'CFL1.6')\n- branches = ('Nx600', 'Nx150')\n+ branches = ('Nx300', 'Nx150')\n # branches = ('CFL0.025', 'CFL0.05')\n datafile = os.path.join('data', 'data.h5')\n times = (0,)\n- # times = (0., 1000., 2000., 3000., 4000.)\n- # viewer = ContourViewer(times=times, branches=branches, datafile=datafile)\n- viewer = ContourViewer(times=times, branches=branches, datafile=datafile, datafiles=('data150.h5', 'data600.h5'))\n+ times = (0., 1000., 2000., 3000., 4000.)\n+ viewer = ContourViewer(times=times, branches=branches, datafile=datafile)\n+ #viewer = ContourViewer(times=times, branches=branches, datafile=datafile, datafiles=('data150.h5', 'data600.h5'))\n viewer.plot()\n \n if __name__ == '__main__':\n@@ -188,6 +206,6 @@ if __name__ == '__main__':\n # from profiler import calibrate_profiler\n # fudge = calibrate_profiler(10000)\n # profile = Profiler('profile', fudge=fudge)\n- plotCFL()\n+ plotContour()\n # profile.stop()\n ", + "path": "/home/wd15/git/extremefill/extremefill" + }, + { + "name": "fipy", + "module": "python", + "source": "/home/wd15/git/fipy", + "version": "8c51478a3e8c30618b3a96c132612a46735c7548", + "diff": "", + "path": "/home/wd15/git/fipy/fipy" + }, + { + "name": "gi", + "module": "python", + "source": "attribute", + "version": "3.4.0", + "diff": "", + "path": "/usr/lib/python2.7/dist-packages/gi" + }, + { + "name": "glib", + "module": "python", + "source": null, + "version": "unknown", + "diff": "", + "path": "/usr/lib/python2.7/dist-packages/glib" + }, + { + "name": "gobject", + "module": "python", + "source": null, + "version": "unknown", + "diff": "", + "path": "/usr/lib/python2.7/dist-packages/gobject" + }, + { + "name": "google", + "module": "python", + "source": null, + "version": "unknown", + "diff": "", + "path": "/usr/lib/python2.7/dist-packages/google" + }, + { + "name": "gtk", + "module": "python", + "source": null, + "version": "unknown", + "diff": "", + "path": "/usr/lib/python2.7/dist-packages/gtk-2.0/gtk" + }, + { + "name": "httplib2", + "module": "python", + "source": "attribute", + "version": "0.7.4", + "diff": "", + "path": "/usr/lib/python2.7/dist-packages/httplib2" + }, + { + "name": "lockfile", + "module": "python", + "source": "egg-info", + "version": "0.9.1", + "diff": "", + "path": "/home/wd15/.virtualenvs/default/lib/python2.7/site-packages/lockfile-0.9.1-py2.7.egg/lockfile" + }, + { + "name": "lxml", + "module": "python", + "source": null, + "version": "unknown", + "diff": "", + "path": "/usr/lib/python2.7/dist-packages/lxml" + }, + { + "name": "matplotlib", + "module": "python", + "source": "attribute", + "version": "1.1.1", + "diff": "", + "path": "/usr/lib/pymodules/python2.7/matplotlib" + }, + { + "name": "mayavi", + "module": "python", + "source": "attribute", + "version": "4.1.0", + "diff": "", + "path": "/usr/lib/python2.7/dist-packages/mayavi" + }, + { + "name": "mpi4py", + "module": "python", + "source": "attribute", + "version": "1.3", + "diff": "", + "path": "/usr/lib/python2.7/dist-packages/mpi4py" + }, + { + "name": "mpl_toolkits", + "module": "python", + "source": null, + "version": "unknown", + "diff": "", + "path": "/usr/lib/pymodules/python2.7/mpl_toolkits" + }, + { + "name": "mx", + "module": "python", + "source": "attribute", + "version": "3.2.1", + "diff": "", + "path": "/usr/lib/python2.7/dist-packages/mx" + }, + { + "name": "nose", + "module": "python", + "source": "attribute", + "version": "1.2.1", + "diff": "", + "path": "/home/wd15/.virtualenvs/fipy/lib/python2.7/site-packages/nose" + }, + { + "name": "numexpr", + "module": "python", + "source": "attribute", + "version": "2.0.1", + "diff": "", + "path": "/usr/lib/python2.7/dist-packages/numexpr" + }, + { + "name": "numpy", + "module": "python", + "source": "attribute", + "version": "1.6.2", + "diff": "", + "path": "/usr/lib/python2.7/dist-packages/numpy" + }, + { + "name": "pyamg", + "module": "python", + "source": "attribute", + "version": "2.0.4.dev", + "diff": "", + "path": "/home/wd15/.virtualenvs/fipy/lib/python2.7/site-packages/pyamg" + }, + { + "name": "pylsmlib", + "module": "python", + "source": "/home/wd15/git/LSMLIB", + "version": "6f5d969bb27530aa37452a8b096e538a5cf7b993", + "diff": "", + "path": "/home/wd15/git/LSMLIB/pylsmlib/pylsmlib" + }, + { + "name": "pysparse", + "module": "python", + "source": "attribute", + "version": "1.1", + "diff": "", + "path": "/usr/lib/python2.7/dist-packages/pysparse" + }, + { + "name": "pytz", + "module": "python", + "source": "attribute", + "version": "2011k", + "diff": "", + "path": "/usr/lib/python2.7/dist-packages/pytz" + }, + { + "name": "scipy", + "module": "python", + "source": "attribute", + "version": "0.10.1", + "diff": "", + "path": "/usr/lib/python2.7/dist-packages/scipy" + }, + { + "name": "setuptools", + "module": "python", + "source": "attribute", + "version": "0.6", + "diff": "", + "path": "/home/wd15/.virtualenvs/default/local/lib/python2.7/site-packages/distribute-0.6.24-py2.7.egg/setuptools" + }, + { + "name": "simplejson", + "module": "python", + "source": "attribute", + "version": "2.6.1", + "diff": "", + "path": "/usr/lib/python2.7/dist-packages/simplejson" + }, + { + "name": "skfmm", + "module": "python", + "source": "/home/wd15/git/scikit-fmm", + "version": "467e5982fbd9d4eb32495f826d6bda65da498e13", + "diff": "", + "path": "/home/wd15/git/scikit-fmm/skfmm" + }, + { + "name": "sumatra", + "module": "python", + "source": "attribute", + "version": "0.5.0dev", + "diff": "", + "path": "/home/wd15/.virtualenvs/default/lib/python2.7/site-packages/Sumatra-0.5.0dev-py2.7.egg/sumatra" + }, + { + "name": "tables", + "module": "python", + "source": "attribute", + "version": "2.3.1", + "diff": "", + "path": "/usr/lib/python2.7/dist-packages/tables" + }, + { + "name": "tagging", + "module": "python", + "source": "attribute", + "version": "0.3.1", + "diff": "", + "path": "/home/wd15/.virtualenvs/fipy/lib/python2.7/site-packages/tagging" + }, + { + "name": "tornado", + "module": "python", + "source": "attribute", + "version": "2.3", + "diff": "", + "path": "/usr/lib/python2.7/dist-packages/tornado" + }, + { + "name": "traits", + "module": "python", + "source": "attribute", + "version": "4.1.0", + "diff": "", + "path": "/usr/lib/python2.7/dist-packages/traits" + }, + { + "name": "tvtk", + "module": "python", + "source": null, + "version": "unknown", + "diff": "", + "path": "/usr/lib/python2.7/dist-packages/tvtk" + }, + { + "name": "vtk", + "module": "python", + "source": null, + "version": "unknown", + "diff": "", + "path": "/usr/lib/pymodules/python2.7/vtk" + }, + { + "name": "wx", + "module": "python", + "source": "attribute", + "version": "2.8.12.1", + "diff": "", + "path": "/usr/lib/python2.7/dist-packages/wx-2.8-gtk2-unicode/wx" + }, + { + "name": "yaml", + "module": "python", + "source": "attribute", + "version": "3.10", + "diff": "", + "path": "/usr/lib/python2.7/dist-packages/yaml" + }, + { + "name": "zmq", + "module": "python", + "source": "attribute", + "version": "2.2.0", + "diff": "", + "path": "/usr/lib/python2.7/dist-packages/zmq" + } + ], + "user": "Daniel Wheeler ", + "output_data": [ + { + "path": "data.h5", + "digest": "e6115e08eca6fbe015ceb763edd1c8aef016f4d8", + "metadata": { + "mimetype": null, + "size": 102992, + "encoding": null + } + } + ], + "input_data": [], + "launch_mode": { + "type": "SerialLaunchMode", + "parameters": { + "working_directory": "/home/wd15/git/extremefill-data" + } + }, + "main_file": "script.py", + "outcome": "" +}, +{ + "script_arguments": "", + "platforms": [ + { + "system_name": "Linux", + "machine": "x86_64", + "version": "#35-Ubuntu SMP Thu Jan 24 13:15:40 UTC 2013", + "ip_addr": "127.0.0.1", + "architecture_bits": "64bit", + "architecture_linkage": "ELF", + "release": "3.5.0-23-generic", + "network_name": "loki", + "processor": "x86_64" + } + ], + "duration": 2.5144550800323486, + "diff": "diff --git a/script.py b/script.py\nindex cd4453d..a2a7a03 100644\n--- a/script.py\n+++ b/script.py\n@@ -32,5 +32,5 @@ def run(totalSteps=10,\n \n from smt import SMTSimulation\n \n-SMTSimulation(run, kwargs={'totalSteps' : 1}, tags=('test',), reason=\"testing decorator\", main_file=__file__)\n-\n+smtsim = SMTSimulation(run, kwargs={'totalSteps' : 1}, tags=('test',), reason=\"testing SMT class\", main_file=__file__)\n+smtsim.launch()\ndiff --git a/smt.py b/smt.py\nindex cdc7015..7b92c77 100644\n--- a/smt.py\n+++ b/smt.py\n@@ -22,6 +22,7 @@ On laptop use http://129.6.153.60:8000\n import time\n import os\n import sys\n+from contextlib import contextmanager\n \n \n from sumatra.projects import load_project\n@@ -30,43 +31,72 @@ from sumatra.projects import _get_project_file\n import lockfile\n \n \n-class Writer(object):\n- log = []\n+class Logger(object):\n+ def __init__(self, logging_on=True):\n+ self.logging_on = logging_on\n+ self.log = []\n+ \n def write(self, data):\n self.log.append(data)\n \n-\n-def SMTSimulation(function, args=(), kwargs={}, tags=(), reason='', main_file=__file__):\n- project = load_project()\n- record = project.new_record(parameters=SimpleParameterSet(kwargs),\n- main_file=main_file,\n- reason=reason)\n-\n- record.datastore.root = os.path.join(record.datastore.root, record.label)\n- record.parameters.update({'datadir': record.datastore.root})\n-\n- for tag in tags:\n- record.tags.add(tag)\n-\n- record.start_time = time.time()\n-\n- ## http://stackoverflow.com/questions/4675728/redirect-stdout-to-a-file-in-python\n- ## see the last post in this thread\n- logger = Writer()\n- stdout_stderr = sys.stdout, sys.stderr\n- sys.stdout, sys.stderr = logger, logger\n-\n- function(*args, **record.parameters.as_dict())\n-\n- sys.stdout, sys.stderr = stdout_stderr\n- record.stdout_stderr = logger.log\n- print logger.log\n- record.duration = time.time() - record.start_time\n- record.output_data = record.datastore.find_new_data(record.timestamp)\n-\n- lock = lockfile.FileLock(os.path.split(_get_project_file(project.path))[0])\n- lock.acquire()\n- project.add_record(record)\n- project.save()\n- lock.release()\n+ def start(self):\n+ self.stdout_stderr = sys.stdout, sys.stderr\n+ if self.logging_on:\n+ sys.stdout, sys.stderr = self, self\n+\n+ def stop(self):\n+ sys.stdout, sys.stderr = self.stdout_stderr\n+ print self.out\n+ \n+ @property\n+ def out(self):\n+ return ''.join(self.log)\n+\n+\n+@contextmanager\n+def log(logger):\n+ logger.start()\n+ try:\n+ yield\n+ finally:\n+ logger.stop()\n+ \n+ \n+class SMTSimulation(object):\n+ def __init__(self, function, args=(), kwargs={}, tags=(), reason='', main_file=__file__):\n+ project = load_project()\n+ record = project.new_record(parameters=SimpleParameterSet(kwargs),\n+ main_file=main_file,\n+ reason=reason)\n+\n+ record.datastore.root = os.path.join(record.datastore.root, record.label)\n+ record.parameters.update({'datadir': record.datastore.root})\n+\n+ for tag in tags:\n+ record.tags.add(tag)\n+\n+ self.record = record\n+ self.project = project\n+ self.function = function\n+ self.args = args\n+ \n+ def launch(self):\n+ record = self.record\n+ record.start_time = time.time()\n+ \n+ logger = Logger()\n+\n+ with log(logger):\n+ self.function(*self.args, **record.parameters.as_dict())\n+\n+ record.stdout_stderr = logger.out\n+ record.duration = time.time() - record.start_time\n+\n+ record.output_data = record.datastore.find_new_data(record.timestamp)\n+\n+ lock = lockfile.FileLock(os.path.split(_get_project_file(self.project.path))[0])\n+ lock.acquire()\n+ self.project.add_record(record)\n+ self.project.save()\n+ lock.release()\n ", + "datastore": { + "type": "FileSystemDataStore", + "parameters": { + "root": "./Data/85857498bf83" + } + }, + "input_datastore": { + "type": "FileSystemDataStore", + "parameters": { + "root": "/" + } + }, + "executable": { + "path": "/home/wd15/.virtualenvs/default/bin/python", + "version": "2.7.3", + "name": "Python", + "options": "" + }, + "parameters": { + "content": "totalSteps = 1\ndatadir = \"./Data/85857498bf83\"", + "type": "SimpleParameterSet" + }, + "label": "85857498bf83", + "version": "dbe0f00a15307cd92b19e14677d61097315669fb", + "stdout_stderr": "[ 1. 1. 1. 1.]\n[ 0.34738209 0.61535499 0.01923836 0.00971058]\n[ 1.23729704e-01 2.14204081e-01 1.88311438e-04 1.55991524e-03]\n\ntheta 0.0\ncBar_supp 1.0\ncBar_cu 1.0\npotentialBar 1.0\nmin(extension) 7.22965473284e-08\nmin(depositionRate) 2.09114908795e-09\nmin(current) 56.8350759862\nmin(cupric) 997.266139623\nmin(baseCurrent) 56.9323002935\nmax(interfaceTheta) - 1: -0.973021297371\nmin(interfaceTheta) 0.0\nmin(I0) 38.9208518948\ndt 0.011\nelapsed time 0.0\nstep 0\n\n", + "repository": { + "url": "/home/wd15/git/extremefill-data", + "type": "GitRepository", + "upstream": "git@github.com:wd15/extremefill-data.git" + }, + "tags": [ + "test" + ], + "timestamp": "2013-02-16 21:09:48", + "reason": "testing SMT class", + "dependencies": [ + { + "name": "Cython", + "module": "python", + "source": "attribute", + "version": "0.16", + "diff": "", + "path": "/usr/lib/python2.7/dist-packages/Cython" + }, + { + "name": "IPython", + "module": "python", + "source": "attribute", + "version": "0.13.1.rc2", + "diff": "", + "path": "/usr/lib/python2.7/dist-packages/IPython" + }, + { + "name": "PIL", + "module": "python", + "source": null, + "version": "unknown", + "diff": "", + "path": "/usr/lib/python2.7/dist-packages/PIL" + }, + { + "name": "PyQt4", + "module": "python", + "source": null, + "version": "unknown", + "diff": "", + "path": "/usr/lib/python2.7/dist-packages/PyQt4" + }, + { + "name": "PyTrilinos", + "module": "python", + "source": "attribute", + "version": "4.8d", + "diff": "", + "path": "/home/wd15/.virtualenvs/fipy/lib/python2.7/site-packages/PyTrilinos" + }, + { + "name": "dateutil", + "module": "python", + "source": "attribute", + "version": "1.5", + "diff": "", + "path": "/usr/lib/python2.7/dist-packages/dateutil" + }, + { + "name": "distutils", + "module": "python", + "source": "attribute", + "version": "2.7.3", + "diff": "", + "path": "/home/wd15/.virtualenvs/default/lib/python2.7/distutils" + }, + { + "name": "django", + "module": "python", + "source": "attribute", + "version": "1.4.1", + "diff": "", + "path": "/usr/lib/python2.7/dist-packages/django" + }, + { + "name": "docutils", + "module": "python", + "source": "attribute", + "version": "0.10", + "diff": "", + "path": "/home/wd15/.virtualenvs/fipy/lib/python2.7/site-packages/docutils" + }, + { + "name": "encodings", + "module": "python", + "source": null, + "version": "unknown", + "diff": "", + "path": "/home/wd15/.virtualenvs/default/lib/python2.7/encodings" + }, + { + "name": "extremefill", + "module": "python", + "source": "/home/wd15/git/extremefill", + "version": "549c969edb113d0b3e9804612bfa53e91319c0ea", + "diff": "diff --git a/data/viewer.py b/data/viewer.py\nindex 68f60e0..d9ab7c2 100644\n--- a/data/viewer.py\n+++ b/data/viewer.py\n@@ -122,7 +122,7 @@ class ContourViewer(BaseViewer):\n self.times = times\n self.contours = contours\n self.data = []\n- super(ContourViewer, self).__init__(branches=branches, datafile=datafiles, datafiles=datafiles)\n+ super(ContourViewer, self).__init__(branches=branches, datafile=datafile, datafiles=datafiles)\n \n def plot(self):\n import matplotlib.pyplot as plt\n@@ -152,6 +152,24 @@ class ContourViewer(BaseViewer):\n phi = np.reshape(phi, shape)\n self.data.append((x, y, phi))\n \n+def datafilesFromBranches(branches, datafile):\n+ cwd = os.getcwd()\n+ for count, branch in enumerate(branches):\n+ print 'branch',branch\n+ tempdir = gitCloneToTemp(branch=branch, repositoryPath='ssh://wd15@genie.nist.gov/users/wd15/git/extremefill')\n+ repopath = os.path.join(tempdir, 'extremefill')\n+ datapath = os.path.join(repopath, datafile)\n+ gitMediaSync()\n+ if count == 0:\n+ self.addBaseData(datapath)\n+ basetempdir = tempdir\n+ else:\n+ self.addData(datapath, branch)\n+ cleanTempRepo(tempdir) \n+\n+ cleanTempRepo(basetempdir)\n+ os.chdir(cwd)\n+\n def plotNx():\n branches = ('Nx600', 'Nx300', 'Nx150')\n datafile = os.path.join('data', 'data.h5')\n@@ -174,13 +192,13 @@ def plotCFL():\n \n def plotContour():\n # branches = ('CFL0.0125', 'CFL0.025', 'CFL0.05', 'CFL0.1', 'CFL0.2', 'CFL0.4', 'CFL0.8', 'CFL1.6')\n- branches = ('Nx600', 'Nx150')\n+ branches = ('Nx300', 'Nx150')\n # branches = ('CFL0.025', 'CFL0.05')\n datafile = os.path.join('data', 'data.h5')\n times = (0,)\n- # times = (0., 1000., 2000., 3000., 4000.)\n- # viewer = ContourViewer(times=times, branches=branches, datafile=datafile)\n- viewer = ContourViewer(times=times, branches=branches, datafile=datafile, datafiles=('data150.h5', 'data600.h5'))\n+ times = (0., 1000., 2000., 3000., 4000.)\n+ viewer = ContourViewer(times=times, branches=branches, datafile=datafile)\n+ #viewer = ContourViewer(times=times, branches=branches, datafile=datafile, datafiles=('data150.h5', 'data600.h5'))\n viewer.plot()\n \n if __name__ == '__main__':\n@@ -188,6 +206,6 @@ if __name__ == '__main__':\n # from profiler import calibrate_profiler\n # fudge = calibrate_profiler(10000)\n # profile = Profiler('profile', fudge=fudge)\n- plotCFL()\n+ plotContour()\n # profile.stop()\n ", + "path": "/home/wd15/git/extremefill/extremefill" + }, + { + "name": "fipy", + "module": "python", + "source": "/home/wd15/git/fipy", + "version": "8c51478a3e8c30618b3a96c132612a46735c7548", + "diff": "", + "path": "/home/wd15/git/fipy/fipy" + }, + { + "name": "gi", + "module": "python", + "source": "attribute", + "version": "3.4.0", + "diff": "", + "path": "/usr/lib/python2.7/dist-packages/gi" + }, + { + "name": "glib", + "module": "python", + "source": null, + "version": "unknown", + "diff": "", + "path": "/usr/lib/python2.7/dist-packages/glib" + }, + { + "name": "gobject", + "module": "python", + "source": null, + "version": "unknown", + "diff": "", + "path": "/usr/lib/python2.7/dist-packages/gobject" + }, + { + "name": "google", + "module": "python", + "source": null, + "version": "unknown", + "diff": "", + "path": "/usr/lib/python2.7/dist-packages/google" + }, + { + "name": "gtk", + "module": "python", + "source": null, + "version": "unknown", + "diff": "", + "path": "/usr/lib/python2.7/dist-packages/gtk-2.0/gtk" + }, + { + "name": "httplib2", + "module": "python", + "source": "attribute", + "version": "0.7.4", + "diff": "", + "path": "/usr/lib/python2.7/dist-packages/httplib2" + }, + { + "name": "lockfile", + "module": "python", + "source": "egg-info", + "version": "0.9.1", + "diff": "", + "path": "/home/wd15/.virtualenvs/default/lib/python2.7/site-packages/lockfile-0.9.1-py2.7.egg/lockfile" + }, + { + "name": "lxml", + "module": "python", + "source": null, + "version": "unknown", + "diff": "", + "path": "/usr/lib/python2.7/dist-packages/lxml" + }, + { + "name": "matplotlib", + "module": "python", + "source": "attribute", + "version": "1.1.1", + "diff": "", + "path": "/usr/lib/pymodules/python2.7/matplotlib" + }, + { + "name": "mayavi", + "module": "python", + "source": "attribute", + "version": "4.1.0", + "diff": "", + "path": "/usr/lib/python2.7/dist-packages/mayavi" + }, + { + "name": "mpi4py", + "module": "python", + "source": "attribute", + "version": "1.3", + "diff": "", + "path": "/usr/lib/python2.7/dist-packages/mpi4py" + }, + { + "name": "mpl_toolkits", + "module": "python", + "source": null, + "version": "unknown", + "diff": "", + "path": "/usr/lib/pymodules/python2.7/mpl_toolkits" + }, + { + "name": "mx", + "module": "python", + "source": "attribute", + "version": "3.2.1", + "diff": "", + "path": "/usr/lib/python2.7/dist-packages/mx" + }, + { + "name": "nose", + "module": "python", + "source": "attribute", + "version": "1.2.1", + "diff": "", + "path": "/home/wd15/.virtualenvs/fipy/lib/python2.7/site-packages/nose" + }, + { + "name": "numexpr", + "module": "python", + "source": "attribute", + "version": "2.0.1", + "diff": "", + "path": "/usr/lib/python2.7/dist-packages/numexpr" + }, + { + "name": "numpy", + "module": "python", + "source": "attribute", + "version": "1.6.2", + "diff": "", + "path": "/usr/lib/python2.7/dist-packages/numpy" + }, + { + "name": "pyamg", + "module": "python", + "source": "attribute", + "version": "2.0.4.dev", + "diff": "", + "path": "/home/wd15/.virtualenvs/fipy/lib/python2.7/site-packages/pyamg" + }, + { + "name": "pylsmlib", + "module": "python", + "source": "/home/wd15/git/LSMLIB", + "version": "6f5d969bb27530aa37452a8b096e538a5cf7b993", + "diff": "", + "path": "/home/wd15/git/LSMLIB/pylsmlib/pylsmlib" + }, + { + "name": "pysparse", + "module": "python", + "source": "attribute", + "version": "1.1", + "diff": "", + "path": "/usr/lib/python2.7/dist-packages/pysparse" + }, + { + "name": "pytz", + "module": "python", + "source": "attribute", + "version": "2011k", + "diff": "", + "path": "/usr/lib/python2.7/dist-packages/pytz" + }, + { + "name": "scipy", + "module": "python", + "source": "attribute", + "version": "0.10.1", + "diff": "", + "path": "/usr/lib/python2.7/dist-packages/scipy" + }, + { + "name": "setuptools", + "module": "python", + "source": "attribute", + "version": "0.6", + "diff": "", + "path": "/home/wd15/.virtualenvs/default/local/lib/python2.7/site-packages/distribute-0.6.24-py2.7.egg/setuptools" + }, + { + "name": "simplejson", + "module": "python", + "source": "attribute", + "version": "2.6.1", + "diff": "", + "path": "/usr/lib/python2.7/dist-packages/simplejson" + }, + { + "name": "skfmm", + "module": "python", + "source": "/home/wd15/git/scikit-fmm", + "version": "467e5982fbd9d4eb32495f826d6bda65da498e13", + "diff": "", + "path": "/home/wd15/git/scikit-fmm/skfmm" + }, + { + "name": "sumatra", + "module": "python", + "source": "attribute", + "version": "0.5.0dev", + "diff": "", + "path": "/home/wd15/.virtualenvs/default/lib/python2.7/site-packages/Sumatra-0.5.0dev-py2.7.egg/sumatra" + }, + { + "name": "tables", + "module": "python", + "source": "attribute", + "version": "2.3.1", + "diff": "", + "path": "/usr/lib/python2.7/dist-packages/tables" + }, + { + "name": "tagging", + "module": "python", + "source": "attribute", + "version": "0.3.1", + "diff": "", + "path": "/home/wd15/.virtualenvs/fipy/lib/python2.7/site-packages/tagging" + }, + { + "name": "tornado", + "module": "python", + "source": "attribute", + "version": "2.3", + "diff": "", + "path": "/usr/lib/python2.7/dist-packages/tornado" + }, + { + "name": "traits", + "module": "python", + "source": "attribute", + "version": "4.1.0", + "diff": "", + "path": "/usr/lib/python2.7/dist-packages/traits" + }, + { + "name": "tvtk", + "module": "python", + "source": null, + "version": "unknown", + "diff": "", + "path": "/usr/lib/python2.7/dist-packages/tvtk" + }, + { + "name": "vtk", + "module": "python", + "source": null, + "version": "unknown", + "diff": "", + "path": "/usr/lib/pymodules/python2.7/vtk" + }, + { + "name": "wx", + "module": "python", + "source": "attribute", + "version": "2.8.12.1", + "diff": "", + "path": "/usr/lib/python2.7/dist-packages/wx-2.8-gtk2-unicode/wx" + }, + { + "name": "yaml", + "module": "python", + "source": "attribute", + "version": "3.10", + "diff": "", + "path": "/usr/lib/python2.7/dist-packages/yaml" + }, + { + "name": "zmq", + "module": "python", + "source": "attribute", + "version": "2.2.0", + "diff": "", + "path": "/usr/lib/python2.7/dist-packages/zmq" + } + ], + "user": "Daniel Wheeler ", + "output_data": [ + { + "path": "data.h5", + "digest": "73ce31b5ebe1093843c65d7ee70010cf37e1cb49", + "metadata": { + "mimetype": null, + "size": 102992, + "encoding": null + } + } + ], + "input_data": [], + "launch_mode": { + "type": "SerialLaunchMode", + "parameters": { + "working_directory": "/home/wd15/git/extremefill-data" + } + }, + "main_file": "script.py", + "outcome": "" +}, +{ + "script_arguments": "", + "platforms": [ + { + "system_name": "Linux", + "machine": "x86_64", + "version": "#35-Ubuntu SMP Thu Jan 24 13:15:40 UTC 2013", + "ip_addr": "127.0.0.1", + "architecture_bits": "64bit", + "architecture_linkage": "ELF", + "release": "3.5.0-23-generic", + "network_name": "loki", + "processor": "x86_64" + } + ], + "duration": 6.42143988609314, + "diff": "diff --git a/script.py b/script.py\nindex cd4453d..a2a7a03 100644\n--- a/script.py\n+++ b/script.py\n@@ -32,5 +32,5 @@ def run(totalSteps=10,\n \n from smt import SMTSimulation\n \n-SMTSimulation(run, kwargs={'totalSteps' : 1}, tags=('test',), reason=\"testing decorator\", main_file=__file__)\n-\n+smtsim = SMTSimulation(run, kwargs={'totalSteps' : 1}, tags=('test',), reason=\"testing SMT class\", main_file=__file__)\n+smtsim.launch()\ndiff --git a/smt.py b/smt.py\nindex cdc7015..e1bf4bc 100644\n--- a/smt.py\n+++ b/smt.py\n@@ -22,6 +22,7 @@ On laptop use http://129.6.153.60:8000\n import time\n import os\n import sys\n+from contextlib import contextmanager\n \n \n from sumatra.projects import load_project\n@@ -30,43 +31,77 @@ from sumatra.projects import _get_project_file\n import lockfile\n \n \n-class Writer(object):\n- log = []\n+class Logger(object):\n+ def __init__(self, logging_on=True):\n+ self.logging_on = logging_on\n+ self.log = []\n+ \n def write(self, data):\n self.log.append(data)\n \n-\n-def SMTSimulation(function, args=(), kwargs={}, tags=(), reason='', main_file=__file__):\n- project = load_project()\n- record = project.new_record(parameters=SimpleParameterSet(kwargs),\n- main_file=main_file,\n- reason=reason)\n-\n- record.datastore.root = os.path.join(record.datastore.root, record.label)\n- record.parameters.update({'datadir': record.datastore.root})\n-\n- for tag in tags:\n- record.tags.add(tag)\n-\n- record.start_time = time.time()\n-\n- ## http://stackoverflow.com/questions/4675728/redirect-stdout-to-a-file-in-python\n- ## see the last post in this thread\n- logger = Writer()\n- stdout_stderr = sys.stdout, sys.stderr\n- sys.stdout, sys.stderr = logger, logger\n-\n- function(*args, **record.parameters.as_dict())\n-\n- sys.stdout, sys.stderr = stdout_stderr\n- record.stdout_stderr = logger.log\n- print logger.log\n- record.duration = time.time() - record.start_time\n- record.output_data = record.datastore.find_new_data(record.timestamp)\n-\n- lock = lockfile.FileLock(os.path.split(_get_project_file(project.path))[0])\n- lock.acquire()\n- project.add_record(record)\n- project.save()\n- lock.release()\n+ def start(self):\n+ self.stdout_stderr = sys.stdout, sys.stderr\n+ if self.logging_on:\n+ sys.stdout, sys.stderr = self, self\n+\n+ def stop(self):\n+ sys.stdout, sys.stderr = self.stdout_stderr\n+ print self.out\n+ \n+ @property\n+ def out(self):\n+ return ''.join(self.log)\n+\n+\n+@contextmanager\n+def log(logger):\n+ logger.start()\n+ try:\n+ yield\n+ except:\n+ logger.stop()\n+ raise\n+ else:\n+ logger.stop()\n+ \n+ \n+class SMTSimulation(object):\n+ def __init__(self, function, args=(), kwargs={}, tags=(), reason='', main_file=__file__):\n+ project = load_project()\n+ record = project.new_record(parameters=SimpleParameterSet(kwargs),\n+ main_file=main_file,\n+ reason=reason)\n+\n+ record.datastore.root = os.path.join(record.datastore.root, record.label)\n+ record.parameters.update({'datadir': record.datastore.root})\n+\n+ for tag in tags:\n+ record.tags.add(tag)\n+\n+ self.record = record\n+ self.project = project\n+ self.function = function\n+ self.args = args\n+ \n+ def launch(self):\n+ record = self.record\n+ record.start_time = time.time()\n+ \n+ logger = Logger()\n+\n+ with log(logger):\n+ self.function(*self.args, **record.parameters.as_dict())\n+\n+ print logger.log\n+ raw_input('stopped')\n+ record.stdout_stderr = logger.out\n+ record.duration = time.time() - record.start_time\n+\n+ record.output_data = record.datastore.find_new_data(record.timestamp)\n+\n+ lock = lockfile.FileLock(os.path.split(_get_project_file(self.project.path))[0])\n+ lock.acquire()\n+ self.project.add_record(record)\n+ self.project.save()\n+ lock.release()\n ", + "datastore": { + "type": "FileSystemDataStore", + "parameters": { + "root": "./Data/53288cc2c2fb" + } + }, + "input_datastore": { + "type": "FileSystemDataStore", + "parameters": { + "root": "/" + } + }, + "executable": { + "path": "/home/wd15/.virtualenvs/default/bin/python", + "version": "2.7.3", + "name": "Python", + "options": "" + }, + "parameters": { + "content": "totalSteps = 1\ndatadir = \"./Data/53288cc2c2fb\"", + "type": "SimpleParameterSet" + }, + "label": "53288cc2c2fb", + "version": "dbe0f00a15307cd92b19e14677d61097315669fb", + "stdout_stderr": "[ 1. 1. 1. 1.]\n[ 0.34738209 0.61535499 0.01923836 0.00971058]\n[ 1.23729704e-01 2.14204081e-01 1.88311438e-04 1.55991524e-03]\n\ntheta 0.0\ncBar_supp 1.0\ncBar_cu 1.0\npotentialBar 1.0\nmin(extension) 7.22965473284e-08\nmin(depositionRate) 2.09114908795e-09\nmin(current) 56.8350759862\nmin(cupric) 997.266139623\nmin(baseCurrent) 56.9323002935\nmax(interfaceTheta) - 1: -0.973021297371\nmin(interfaceTheta) 0.0\nmin(I0) 38.9208518948\ndt 0.011\nelapsed time 0.0\nstep 0\n\n", + "repository": { + "url": "/home/wd15/git/extremefill-data", + "type": "GitRepository", + "upstream": "git@github.com:wd15/extremefill-data.git" + }, + "tags": [ + "test" + ], + "timestamp": "2013-02-16 20:32:29", + "reason": "testing SMT class", + "dependencies": [ + { + "name": "Cython", + "module": "python", + "source": "attribute", + "version": "0.16", + "diff": "", + "path": "/usr/lib/python2.7/dist-packages/Cython" + }, + { + "name": "IPython", + "module": "python", + "source": "attribute", + "version": "0.13.1.rc2", + "diff": "", + "path": "/usr/lib/python2.7/dist-packages/IPython" + }, + { + "name": "PIL", + "module": "python", + "source": null, + "version": "unknown", + "diff": "", + "path": "/usr/lib/python2.7/dist-packages/PIL" + }, + { + "name": "PyQt4", + "module": "python", + "source": null, + "version": "unknown", + "diff": "", + "path": "/usr/lib/python2.7/dist-packages/PyQt4" + }, + { + "name": "PyTrilinos", + "module": "python", + "source": "attribute", + "version": "4.8d", + "diff": "", + "path": "/home/wd15/.virtualenvs/fipy/lib/python2.7/site-packages/PyTrilinos" + }, + { + "name": "dateutil", + "module": "python", + "source": "attribute", + "version": "1.5", + "diff": "", + "path": "/usr/lib/python2.7/dist-packages/dateutil" + }, + { + "name": "distutils", + "module": "python", + "source": "attribute", + "version": "2.7.3", + "diff": "", + "path": "/home/wd15/.virtualenvs/default/lib/python2.7/distutils" + }, + { + "name": "django", + "module": "python", + "source": "attribute", + "version": "1.4.1", + "diff": "", + "path": "/usr/lib/python2.7/dist-packages/django" + }, + { + "name": "docutils", + "module": "python", + "source": "attribute", + "version": "0.10", + "diff": "", + "path": "/home/wd15/.virtualenvs/fipy/lib/python2.7/site-packages/docutils" + }, + { + "name": "encodings", + "module": "python", + "source": null, + "version": "unknown", + "diff": "", + "path": "/home/wd15/.virtualenvs/default/lib/python2.7/encodings" + }, + { + "name": "extremefill", + "module": "python", + "source": "/home/wd15/git/extremefill", + "version": "549c969edb113d0b3e9804612bfa53e91319c0ea", + "diff": "diff --git a/data/viewer.py b/data/viewer.py\nindex 68f60e0..d9ab7c2 100644\n--- a/data/viewer.py\n+++ b/data/viewer.py\n@@ -122,7 +122,7 @@ class ContourViewer(BaseViewer):\n self.times = times\n self.contours = contours\n self.data = []\n- super(ContourViewer, self).__init__(branches=branches, datafile=datafiles, datafiles=datafiles)\n+ super(ContourViewer, self).__init__(branches=branches, datafile=datafile, datafiles=datafiles)\n \n def plot(self):\n import matplotlib.pyplot as plt\n@@ -152,6 +152,24 @@ class ContourViewer(BaseViewer):\n phi = np.reshape(phi, shape)\n self.data.append((x, y, phi))\n \n+def datafilesFromBranches(branches, datafile):\n+ cwd = os.getcwd()\n+ for count, branch in enumerate(branches):\n+ print 'branch',branch\n+ tempdir = gitCloneToTemp(branch=branch, repositoryPath='ssh://wd15@genie.nist.gov/users/wd15/git/extremefill')\n+ repopath = os.path.join(tempdir, 'extremefill')\n+ datapath = os.path.join(repopath, datafile)\n+ gitMediaSync()\n+ if count == 0:\n+ self.addBaseData(datapath)\n+ basetempdir = tempdir\n+ else:\n+ self.addData(datapath, branch)\n+ cleanTempRepo(tempdir) \n+\n+ cleanTempRepo(basetempdir)\n+ os.chdir(cwd)\n+\n def plotNx():\n branches = ('Nx600', 'Nx300', 'Nx150')\n datafile = os.path.join('data', 'data.h5')\n@@ -174,13 +192,13 @@ def plotCFL():\n \n def plotContour():\n # branches = ('CFL0.0125', 'CFL0.025', 'CFL0.05', 'CFL0.1', 'CFL0.2', 'CFL0.4', 'CFL0.8', 'CFL1.6')\n- branches = ('Nx600', 'Nx150')\n+ branches = ('Nx300', 'Nx150')\n # branches = ('CFL0.025', 'CFL0.05')\n datafile = os.path.join('data', 'data.h5')\n times = (0,)\n- # times = (0., 1000., 2000., 3000., 4000.)\n- # viewer = ContourViewer(times=times, branches=branches, datafile=datafile)\n- viewer = ContourViewer(times=times, branches=branches, datafile=datafile, datafiles=('data150.h5', 'data600.h5'))\n+ times = (0., 1000., 2000., 3000., 4000.)\n+ viewer = ContourViewer(times=times, branches=branches, datafile=datafile)\n+ #viewer = ContourViewer(times=times, branches=branches, datafile=datafile, datafiles=('data150.h5', 'data600.h5'))\n viewer.plot()\n \n if __name__ == '__main__':\n@@ -188,6 +206,6 @@ if __name__ == '__main__':\n # from profiler import calibrate_profiler\n # fudge = calibrate_profiler(10000)\n # profile = Profiler('profile', fudge=fudge)\n- plotCFL()\n+ plotContour()\n # profile.stop()\n ", + "path": "/home/wd15/git/extremefill/extremefill" + }, + { + "name": "fipy", + "module": "python", + "source": "/home/wd15/git/fipy", + "version": "8c51478a3e8c30618b3a96c132612a46735c7548", + "diff": "", + "path": "/home/wd15/git/fipy/fipy" + }, + { + "name": "gi", + "module": "python", + "source": "attribute", + "version": "3.4.0", + "diff": "", + "path": "/usr/lib/python2.7/dist-packages/gi" + }, + { + "name": "glib", + "module": "python", + "source": null, + "version": "unknown", + "diff": "", + "path": "/usr/lib/python2.7/dist-packages/glib" + }, + { + "name": "gobject", + "module": "python", + "source": null, + "version": "unknown", + "diff": "", + "path": "/usr/lib/python2.7/dist-packages/gobject" + }, + { + "name": "google", + "module": "python", + "source": null, + "version": "unknown", + "diff": "", + "path": "/usr/lib/python2.7/dist-packages/google" + }, + { + "name": "gtk", + "module": "python", + "source": null, + "version": "unknown", + "diff": "", + "path": "/usr/lib/python2.7/dist-packages/gtk-2.0/gtk" + }, + { + "name": "httplib2", + "module": "python", + "source": "attribute", + "version": "0.7.4", + "diff": "", + "path": "/usr/lib/python2.7/dist-packages/httplib2" + }, + { + "name": "lockfile", + "module": "python", + "source": "egg-info", + "version": "0.9.1", + "diff": "", + "path": "/home/wd15/.virtualenvs/default/lib/python2.7/site-packages/lockfile-0.9.1-py2.7.egg/lockfile" + }, + { + "name": "lxml", + "module": "python", + "source": null, + "version": "unknown", + "diff": "", + "path": "/usr/lib/python2.7/dist-packages/lxml" + }, + { + "name": "matplotlib", + "module": "python", + "source": "attribute", + "version": "1.1.1", + "diff": "", + "path": "/usr/lib/pymodules/python2.7/matplotlib" + }, + { + "name": "mayavi", + "module": "python", + "source": "attribute", + "version": "4.1.0", + "diff": "", + "path": "/usr/lib/python2.7/dist-packages/mayavi" + }, + { + "name": "mpi4py", + "module": "python", + "source": "attribute", + "version": "1.3", + "diff": "", + "path": "/usr/lib/python2.7/dist-packages/mpi4py" + }, + { + "name": "mpl_toolkits", + "module": "python", + "source": null, + "version": "unknown", + "diff": "", + "path": "/usr/lib/pymodules/python2.7/mpl_toolkits" + }, + { + "name": "mx", + "module": "python", + "source": "attribute", + "version": "3.2.1", + "diff": "", + "path": "/usr/lib/python2.7/dist-packages/mx" + }, + { + "name": "nose", + "module": "python", + "source": "attribute", + "version": "1.2.1", + "diff": "", + "path": "/home/wd15/.virtualenvs/fipy/lib/python2.7/site-packages/nose" + }, + { + "name": "numexpr", + "module": "python", + "source": "attribute", + "version": "2.0.1", + "diff": "", + "path": "/usr/lib/python2.7/dist-packages/numexpr" + }, + { + "name": "numpy", + "module": "python", + "source": "attribute", + "version": "1.6.2", + "diff": "", + "path": "/usr/lib/python2.7/dist-packages/numpy" + }, + { + "name": "pyamg", + "module": "python", + "source": "attribute", + "version": "2.0.4.dev", + "diff": "", + "path": "/home/wd15/.virtualenvs/fipy/lib/python2.7/site-packages/pyamg" + }, + { + "name": "pylsmlib", + "module": "python", + "source": "/home/wd15/git/LSMLIB", + "version": "6f5d969bb27530aa37452a8b096e538a5cf7b993", + "diff": "", + "path": "/home/wd15/git/LSMLIB/pylsmlib/pylsmlib" + }, + { + "name": "pysparse", + "module": "python", + "source": "attribute", + "version": "1.1", + "diff": "", + "path": "/usr/lib/python2.7/dist-packages/pysparse" + }, + { + "name": "pytz", + "module": "python", + "source": "attribute", + "version": "2011k", + "diff": "", + "path": "/usr/lib/python2.7/dist-packages/pytz" + }, + { + "name": "scipy", + "module": "python", + "source": "attribute", + "version": "0.10.1", + "diff": "", + "path": "/usr/lib/python2.7/dist-packages/scipy" + }, + { + "name": "setuptools", + "module": "python", + "source": "attribute", + "version": "0.6", + "diff": "", + "path": "/home/wd15/.virtualenvs/default/local/lib/python2.7/site-packages/distribute-0.6.24-py2.7.egg/setuptools" + }, + { + "name": "simplejson", + "module": "python", + "source": "attribute", + "version": "2.6.1", + "diff": "", + "path": "/usr/lib/python2.7/dist-packages/simplejson" + }, + { + "name": "skfmm", + "module": "python", + "source": "/home/wd15/git/scikit-fmm", + "version": "467e5982fbd9d4eb32495f826d6bda65da498e13", + "diff": "", + "path": "/home/wd15/git/scikit-fmm/skfmm" + }, + { + "name": "sumatra", + "module": "python", + "source": "attribute", + "version": "0.5.0dev", + "diff": "", + "path": "/home/wd15/.virtualenvs/default/lib/python2.7/site-packages/Sumatra-0.5.0dev-py2.7.egg/sumatra" + }, + { + "name": "tables", + "module": "python", + "source": "attribute", + "version": "2.3.1", + "diff": "", + "path": "/usr/lib/python2.7/dist-packages/tables" + }, + { + "name": "tagging", + "module": "python", + "source": "attribute", + "version": "0.3.1", + "diff": "", + "path": "/home/wd15/.virtualenvs/fipy/lib/python2.7/site-packages/tagging" + }, + { + "name": "tornado", + "module": "python", + "source": "attribute", + "version": "2.3", + "diff": "", + "path": "/usr/lib/python2.7/dist-packages/tornado" + }, + { + "name": "traits", + "module": "python", + "source": "attribute", + "version": "4.1.0", + "diff": "", + "path": "/usr/lib/python2.7/dist-packages/traits" + }, + { + "name": "tvtk", + "module": "python", + "source": null, + "version": "unknown", + "diff": "", + "path": "/usr/lib/python2.7/dist-packages/tvtk" + }, + { + "name": "vtk", + "module": "python", + "source": null, + "version": "unknown", + "diff": "", + "path": "/usr/lib/pymodules/python2.7/vtk" + }, + { + "name": "wx", + "module": "python", + "source": "attribute", + "version": "2.8.12.1", + "diff": "", + "path": "/usr/lib/python2.7/dist-packages/wx-2.8-gtk2-unicode/wx" + }, + { + "name": "yaml", + "module": "python", + "source": "attribute", + "version": "3.10", + "diff": "", + "path": "/usr/lib/python2.7/dist-packages/yaml" + }, + { + "name": "zmq", + "module": "python", + "source": "attribute", + "version": "2.2.0", + "diff": "", + "path": "/usr/lib/python2.7/dist-packages/zmq" + } + ], + "user": "Daniel Wheeler ", + "output_data": [ + { + "path": "data.h5", + "digest": "a5242a386be82c68c124b8e2c6aac654763919b3", + "metadata": { + "mimetype": null, + "size": 102992, + "encoding": null + } + } + ], + "input_data": [], + "launch_mode": { + "type": "SerialLaunchMode", + "parameters": { + "working_directory": "/home/wd15/git/extremefill-data" + } + }, + "main_file": "script.py", + "outcome": "" +}, +{ + "script_arguments": "", + "platforms": [ + { + "system_name": "Linux", + "machine": "x86_64", + "version": "#35-Ubuntu SMP Thu Jan 24 13:15:40 UTC 2013", + "ip_addr": "127.0.0.1", + "architecture_bits": "64bit", + "architecture_linkage": "ELF", + "release": "3.5.0-23-generic", + "network_name": "loki", + "processor": "x86_64" + } + ], + "duration": 2.5626721382141113, + "diff": "diff --git a/script.py b/script.py\nindex cd4453d..a2a7a03 100644\n--- a/script.py\n+++ b/script.py\n@@ -32,5 +32,5 @@ def run(totalSteps=10,\n \n from smt import SMTSimulation\n \n-SMTSimulation(run, kwargs={'totalSteps' : 1}, tags=('test',), reason=\"testing decorator\", main_file=__file__)\n-\n+smtsim = SMTSimulation(run, kwargs={'totalSteps' : 1}, tags=('test',), reason=\"testing SMT class\", main_file=__file__)\n+smtsim.launch()\ndiff --git a/smt.py b/smt.py\nindex cdc7015..14c0f73 100644\n--- a/smt.py\n+++ b/smt.py\n@@ -22,6 +22,7 @@ On laptop use http://129.6.153.60:8000\n import time\n import os\n import sys\n+from contextlib import contextmanager\n \n \n from sumatra.projects import load_project\n@@ -30,43 +31,75 @@ from sumatra.projects import _get_project_file\n import lockfile\n \n \n-class Writer(object):\n- log = []\n+class Logger(object):\n+ def __init__(self, logging_on=True):\n+ self.logging_on = logging_on\n+ self.log = []\n+ \n def write(self, data):\n self.log.append(data)\n \n-\n-def SMTSimulation(function, args=(), kwargs={}, tags=(), reason='', main_file=__file__):\n- project = load_project()\n- record = project.new_record(parameters=SimpleParameterSet(kwargs),\n- main_file=main_file,\n- reason=reason)\n-\n- record.datastore.root = os.path.join(record.datastore.root, record.label)\n- record.parameters.update({'datadir': record.datastore.root})\n-\n- for tag in tags:\n- record.tags.add(tag)\n-\n- record.start_time = time.time()\n-\n- ## http://stackoverflow.com/questions/4675728/redirect-stdout-to-a-file-in-python\n- ## see the last post in this thread\n- logger = Writer()\n- stdout_stderr = sys.stdout, sys.stderr\n- sys.stdout, sys.stderr = logger, logger\n-\n- function(*args, **record.parameters.as_dict())\n-\n- sys.stdout, sys.stderr = stdout_stderr\n- record.stdout_stderr = logger.log\n- print logger.log\n- record.duration = time.time() - record.start_time\n- record.output_data = record.datastore.find_new_data(record.timestamp)\n-\n- lock = lockfile.FileLock(os.path.split(_get_project_file(project.path))[0])\n- lock.acquire()\n- project.add_record(record)\n- project.save()\n- lock.release()\n+ def start(self):\n+ self.stdout_stderr = sys.stdout, sys.stderr\n+ if self.logging_on:\n+ sys.stdout, sys.stderr = self, self\n+\n+ def stop(self):\n+ sys.stdout, sys.stderr = self.stdout_stderr\n+ print self.out\n+ \n+ @property\n+ def out(self):\n+ return ''.join(self.log)\n+\n+\n+@contextmanager\n+def log(logger):\n+ logger.start()\n+ try:\n+ yield\n+ except:\n+ logger.stop()\n+ raise\n+ else:\n+ logger.stop()\n+ \n+ \n+class SMTSimulation(object):\n+ def __init__(self, function, args=(), kwargs={}, tags=(), reason='', main_file=__file__):\n+ project = load_project()\n+ record = project.new_record(parameters=SimpleParameterSet(kwargs),\n+ main_file=main_file,\n+ reason=reason)\n+\n+ record.datastore.root = os.path.join(record.datastore.root, record.label)\n+ record.parameters.update({'datadir': record.datastore.root})\n+\n+ for tag in tags:\n+ record.tags.add(tag)\n+\n+ self.record = record\n+ self.project = project\n+ self.function = function\n+ self.args = args\n+ \n+ def launch(self):\n+ record = self.record\n+ record.start_time = time.time()\n+ \n+ logger = Logger(False)\n+\n+ with log(logger):\n+ self.function(*self.args, **record.parameters.as_dict())\n+\n+ record.stdout_stderr = logger.out\n+ record.duration = time.time() - record.start_time\n+\n+ record.output_data = record.datastore.find_new_data(record.timestamp)\n+\n+ lock = lockfile.FileLock(os.path.split(_get_project_file(self.project.path))[0])\n+ lock.acquire()\n+ self.project.add_record(record)\n+ self.project.save()\n+ lock.release()\n ", + "datastore": { + "type": "FileSystemDataStore", + "parameters": { + "root": "./Data/4b2dd7bba98d" + } + }, + "input_datastore": { + "type": "FileSystemDataStore", + "parameters": { + "root": "/" + } + }, + "executable": { + "path": "/home/wd15/.virtualenvs/default/bin/python", + "version": "2.7.3", + "name": "Python", + "options": "" + }, + "parameters": { + "content": "totalSteps = 1\ndatadir = \"./Data/4b2dd7bba98d\"", + "type": "SimpleParameterSet" + }, + "label": "4b2dd7bba98d", + "version": "dbe0f00a15307cd92b19e14677d61097315669fb", + "stdout_stderr": "", + "repository": { + "url": "/home/wd15/git/extremefill-data", + "type": "GitRepository", + "upstream": "git@github.com:wd15/extremefill-data.git" + }, + "tags": [ + "test" + ], + "timestamp": "2013-02-16 20:28:33", + "reason": "testing SMT class", + "dependencies": [ + { + "name": "Cython", + "module": "python", + "source": "attribute", + "version": "0.16", + "diff": "", + "path": "/usr/lib/python2.7/dist-packages/Cython" + }, + { + "name": "IPython", + "module": "python", + "source": "attribute", + "version": "0.13.1.rc2", + "diff": "", + "path": "/usr/lib/python2.7/dist-packages/IPython" + }, + { + "name": "PIL", + "module": "python", + "source": null, + "version": "unknown", + "diff": "", + "path": "/usr/lib/python2.7/dist-packages/PIL" + }, + { + "name": "PyQt4", + "module": "python", + "source": null, + "version": "unknown", + "diff": "", + "path": "/usr/lib/python2.7/dist-packages/PyQt4" + }, + { + "name": "PyTrilinos", + "module": "python", + "source": "attribute", + "version": "4.8d", + "diff": "", + "path": "/home/wd15/.virtualenvs/fipy/lib/python2.7/site-packages/PyTrilinos" + }, + { + "name": "dateutil", + "module": "python", + "source": "attribute", + "version": "1.5", + "diff": "", + "path": "/usr/lib/python2.7/dist-packages/dateutil" + }, + { + "name": "distutils", + "module": "python", + "source": "attribute", + "version": "2.7.3", + "diff": "", + "path": "/home/wd15/.virtualenvs/default/lib/python2.7/distutils" + }, + { + "name": "django", + "module": "python", + "source": "attribute", + "version": "1.4.1", + "diff": "", + "path": "/usr/lib/python2.7/dist-packages/django" + }, + { + "name": "docutils", + "module": "python", + "source": "attribute", + "version": "0.10", + "diff": "", + "path": "/home/wd15/.virtualenvs/fipy/lib/python2.7/site-packages/docutils" + }, + { + "name": "encodings", + "module": "python", + "source": null, + "version": "unknown", + "diff": "", + "path": "/home/wd15/.virtualenvs/default/lib/python2.7/encodings" + }, + { + "name": "extremefill", + "module": "python", + "source": "/home/wd15/git/extremefill", + "version": "549c969edb113d0b3e9804612bfa53e91319c0ea", + "diff": "diff --git a/data/viewer.py b/data/viewer.py\nindex 68f60e0..d9ab7c2 100644\n--- a/data/viewer.py\n+++ b/data/viewer.py\n@@ -122,7 +122,7 @@ class ContourViewer(BaseViewer):\n self.times = times\n self.contours = contours\n self.data = []\n- super(ContourViewer, self).__init__(branches=branches, datafile=datafiles, datafiles=datafiles)\n+ super(ContourViewer, self).__init__(branches=branches, datafile=datafile, datafiles=datafiles)\n \n def plot(self):\n import matplotlib.pyplot as plt\n@@ -152,6 +152,24 @@ class ContourViewer(BaseViewer):\n phi = np.reshape(phi, shape)\n self.data.append((x, y, phi))\n \n+def datafilesFromBranches(branches, datafile):\n+ cwd = os.getcwd()\n+ for count, branch in enumerate(branches):\n+ print 'branch',branch\n+ tempdir = gitCloneToTemp(branch=branch, repositoryPath='ssh://wd15@genie.nist.gov/users/wd15/git/extremefill')\n+ repopath = os.path.join(tempdir, 'extremefill')\n+ datapath = os.path.join(repopath, datafile)\n+ gitMediaSync()\n+ if count == 0:\n+ self.addBaseData(datapath)\n+ basetempdir = tempdir\n+ else:\n+ self.addData(datapath, branch)\n+ cleanTempRepo(tempdir) \n+\n+ cleanTempRepo(basetempdir)\n+ os.chdir(cwd)\n+\n def plotNx():\n branches = ('Nx600', 'Nx300', 'Nx150')\n datafile = os.path.join('data', 'data.h5')\n@@ -174,13 +192,13 @@ def plotCFL():\n \n def plotContour():\n # branches = ('CFL0.0125', 'CFL0.025', 'CFL0.05', 'CFL0.1', 'CFL0.2', 'CFL0.4', 'CFL0.8', 'CFL1.6')\n- branches = ('Nx600', 'Nx150')\n+ branches = ('Nx300', 'Nx150')\n # branches = ('CFL0.025', 'CFL0.05')\n datafile = os.path.join('data', 'data.h5')\n times = (0,)\n- # times = (0., 1000., 2000., 3000., 4000.)\n- # viewer = ContourViewer(times=times, branches=branches, datafile=datafile)\n- viewer = ContourViewer(times=times, branches=branches, datafile=datafile, datafiles=('data150.h5', 'data600.h5'))\n+ times = (0., 1000., 2000., 3000., 4000.)\n+ viewer = ContourViewer(times=times, branches=branches, datafile=datafile)\n+ #viewer = ContourViewer(times=times, branches=branches, datafile=datafile, datafiles=('data150.h5', 'data600.h5'))\n viewer.plot()\n \n if __name__ == '__main__':\n@@ -188,6 +206,6 @@ if __name__ == '__main__':\n # from profiler import calibrate_profiler\n # fudge = calibrate_profiler(10000)\n # profile = Profiler('profile', fudge=fudge)\n- plotCFL()\n+ plotContour()\n # profile.stop()\n ", + "path": "/home/wd15/git/extremefill/extremefill" + }, + { + "name": "fipy", + "module": "python", + "source": "/home/wd15/git/fipy", + "version": "8c51478a3e8c30618b3a96c132612a46735c7548", + "diff": "", + "path": "/home/wd15/git/fipy/fipy" + }, + { + "name": "gi", + "module": "python", + "source": "attribute", + "version": "3.4.0", + "diff": "", + "path": "/usr/lib/python2.7/dist-packages/gi" + }, + { + "name": "glib", + "module": "python", + "source": null, + "version": "unknown", + "diff": "", + "path": "/usr/lib/python2.7/dist-packages/glib" + }, + { + "name": "gobject", + "module": "python", + "source": null, + "version": "unknown", + "diff": "", + "path": "/usr/lib/python2.7/dist-packages/gobject" + }, + { + "name": "google", + "module": "python", + "source": null, + "version": "unknown", + "diff": "", + "path": "/usr/lib/python2.7/dist-packages/google" + }, + { + "name": "gtk", + "module": "python", + "source": null, + "version": "unknown", + "diff": "", + "path": "/usr/lib/python2.7/dist-packages/gtk-2.0/gtk" + }, + { + "name": "httplib2", + "module": "python", + "source": "attribute", + "version": "0.7.4", + "diff": "", + "path": "/usr/lib/python2.7/dist-packages/httplib2" + }, + { + "name": "lockfile", + "module": "python", + "source": "egg-info", + "version": "0.9.1", + "diff": "", + "path": "/home/wd15/.virtualenvs/default/lib/python2.7/site-packages/lockfile-0.9.1-py2.7.egg/lockfile" + }, + { + "name": "lxml", + "module": "python", + "source": null, + "version": "unknown", + "diff": "", + "path": "/usr/lib/python2.7/dist-packages/lxml" + }, + { + "name": "matplotlib", + "module": "python", + "source": "attribute", + "version": "1.1.1", + "diff": "", + "path": "/usr/lib/pymodules/python2.7/matplotlib" + }, + { + "name": "mayavi", + "module": "python", + "source": "attribute", + "version": "4.1.0", + "diff": "", + "path": "/usr/lib/python2.7/dist-packages/mayavi" + }, + { + "name": "mpi4py", + "module": "python", + "source": "attribute", + "version": "1.3", + "diff": "", + "path": "/usr/lib/python2.7/dist-packages/mpi4py" + }, + { + "name": "mpl_toolkits", + "module": "python", + "source": null, + "version": "unknown", + "diff": "", + "path": "/usr/lib/pymodules/python2.7/mpl_toolkits" + }, + { + "name": "mx", + "module": "python", + "source": "attribute", + "version": "3.2.1", + "diff": "", + "path": "/usr/lib/python2.7/dist-packages/mx" + }, + { + "name": "nose", + "module": "python", + "source": "attribute", + "version": "1.2.1", + "diff": "", + "path": "/home/wd15/.virtualenvs/fipy/lib/python2.7/site-packages/nose" + }, + { + "name": "numexpr", + "module": "python", + "source": "attribute", + "version": "2.0.1", + "diff": "", + "path": "/usr/lib/python2.7/dist-packages/numexpr" + }, + { + "name": "numpy", + "module": "python", + "source": "attribute", + "version": "1.6.2", + "diff": "", + "path": "/usr/lib/python2.7/dist-packages/numpy" + }, + { + "name": "pyamg", + "module": "python", + "source": "attribute", + "version": "2.0.4.dev", + "diff": "", + "path": "/home/wd15/.virtualenvs/fipy/lib/python2.7/site-packages/pyamg" + }, + { + "name": "pylsmlib", + "module": "python", + "source": "/home/wd15/git/LSMLIB", + "version": "6f5d969bb27530aa37452a8b096e538a5cf7b993", + "diff": "", + "path": "/home/wd15/git/LSMLIB/pylsmlib/pylsmlib" + }, + { + "name": "pysparse", + "module": "python", + "source": "attribute", + "version": "1.1", + "diff": "", + "path": "/usr/lib/python2.7/dist-packages/pysparse" + }, + { + "name": "pytz", + "module": "python", + "source": "attribute", + "version": "2011k", + "diff": "", + "path": "/usr/lib/python2.7/dist-packages/pytz" + }, + { + "name": "scipy", + "module": "python", + "source": "attribute", + "version": "0.10.1", + "diff": "", + "path": "/usr/lib/python2.7/dist-packages/scipy" + }, + { + "name": "setuptools", + "module": "python", + "source": "attribute", + "version": "0.6", + "diff": "", + "path": "/home/wd15/.virtualenvs/default/local/lib/python2.7/site-packages/distribute-0.6.24-py2.7.egg/setuptools" + }, + { + "name": "simplejson", + "module": "python", + "source": "attribute", + "version": "2.6.1", + "diff": "", + "path": "/usr/lib/python2.7/dist-packages/simplejson" + }, + { + "name": "skfmm", + "module": "python", + "source": "/home/wd15/git/scikit-fmm", + "version": "467e5982fbd9d4eb32495f826d6bda65da498e13", + "diff": "", + "path": "/home/wd15/git/scikit-fmm/skfmm" + }, + { + "name": "sumatra", + "module": "python", + "source": "attribute", + "version": "0.5.0dev", + "diff": "", + "path": "/home/wd15/.virtualenvs/default/lib/python2.7/site-packages/Sumatra-0.5.0dev-py2.7.egg/sumatra" + }, + { + "name": "tables", + "module": "python", + "source": "attribute", + "version": "2.3.1", + "diff": "", + "path": "/usr/lib/python2.7/dist-packages/tables" + }, + { + "name": "tagging", + "module": "python", + "source": "attribute", + "version": "0.3.1", + "diff": "", + "path": "/home/wd15/.virtualenvs/fipy/lib/python2.7/site-packages/tagging" + }, + { + "name": "tornado", + "module": "python", + "source": "attribute", + "version": "2.3", + "diff": "", + "path": "/usr/lib/python2.7/dist-packages/tornado" + }, + { + "name": "traits", + "module": "python", + "source": "attribute", + "version": "4.1.0", + "diff": "", + "path": "/usr/lib/python2.7/dist-packages/traits" + }, + { + "name": "tvtk", + "module": "python", + "source": null, + "version": "unknown", + "diff": "", + "path": "/usr/lib/python2.7/dist-packages/tvtk" + }, + { + "name": "vtk", + "module": "python", + "source": null, + "version": "unknown", + "diff": "", + "path": "/usr/lib/pymodules/python2.7/vtk" + }, + { + "name": "wx", + "module": "python", + "source": "attribute", + "version": "2.8.12.1", + "diff": "", + "path": "/usr/lib/python2.7/dist-packages/wx-2.8-gtk2-unicode/wx" + }, + { + "name": "yaml", + "module": "python", + "source": "attribute", + "version": "3.10", + "diff": "", + "path": "/usr/lib/python2.7/dist-packages/yaml" + }, + { + "name": "zmq", + "module": "python", + "source": "attribute", + "version": "2.2.0", + "diff": "", + "path": "/usr/lib/python2.7/dist-packages/zmq" + } + ], + "user": "Daniel Wheeler ", + "output_data": [ + { + "path": "data.h5", + "digest": "dbce8142612fdb73ece4d25760ba0e92c8d2e70f", + "metadata": { + "mimetype": null, + "size": 102992, + "encoding": null + } + } + ], + "input_data": [], + "launch_mode": { + "type": "SerialLaunchMode", + "parameters": { + "working_directory": "/home/wd15/git/extremefill-data" + } + }, + "main_file": "script.py", + "outcome": "" +}, +{ + "script_arguments": "", + "platforms": [ + { + "system_name": "Linux", + "machine": "x86_64", + "version": "#35-Ubuntu SMP Thu Jan 24 13:15:40 UTC 2013", + "ip_addr": "127.0.0.1", + "architecture_bits": "64bit", + "architecture_linkage": "ELF", + "release": "3.5.0-23-generic", + "network_name": "loki", + "processor": "x86_64" + } + ], + "duration": 5.062745094299316, + "diff": "diff --git a/script.py b/script.py\nindex cd4453d..a2a7a03 100644\n--- a/script.py\n+++ b/script.py\n@@ -32,5 +32,5 @@ def run(totalSteps=10,\n \n from smt import SMTSimulation\n \n-SMTSimulation(run, kwargs={'totalSteps' : 1}, tags=('test',), reason=\"testing decorator\", main_file=__file__)\n-\n+smtsim = SMTSimulation(run, kwargs={'totalSteps' : 1}, tags=('test',), reason=\"testing SMT class\", main_file=__file__)\n+smtsim.launch()\ndiff --git a/smt.py b/smt.py\nindex cdc7015..80e7ed7 100644\n--- a/smt.py\n+++ b/smt.py\n@@ -30,43 +30,67 @@ from sumatra.projects import _get_project_file\n import lockfile\n \n \n-class Writer(object):\n- log = []\n+class Logger(object):\n+ def __init__(self, logging_on=True):\n+ self.logging_on = logging_on\n+ self.log = []\n+ \n def write(self, data):\n self.log.append(data)\n \n-\n-def SMTSimulation(function, args=(), kwargs={}, tags=(), reason='', main_file=__file__):\n- project = load_project()\n- record = project.new_record(parameters=SimpleParameterSet(kwargs),\n- main_file=main_file,\n- reason=reason)\n-\n- record.datastore.root = os.path.join(record.datastore.root, record.label)\n- record.parameters.update({'datadir': record.datastore.root})\n-\n- for tag in tags:\n- record.tags.add(tag)\n-\n- record.start_time = time.time()\n-\n- ## http://stackoverflow.com/questions/4675728/redirect-stdout-to-a-file-in-python\n- ## see the last post in this thread\n- logger = Writer()\n- stdout_stderr = sys.stdout, sys.stderr\n- sys.stdout, sys.stderr = logger, logger\n-\n- function(*args, **record.parameters.as_dict())\n-\n- sys.stdout, sys.stderr = stdout_stderr\n- record.stdout_stderr = logger.log\n- print logger.log\n- record.duration = time.time() - record.start_time\n- record.output_data = record.datastore.find_new_data(record.timestamp)\n-\n- lock = lockfile.FileLock(os.path.split(_get_project_file(project.path))[0])\n- lock.acquire()\n- project.add_record(record)\n- project.save()\n- lock.release()\n+ def start(self):\n+ self.stdout_stderr = sys.stdout, sys.stderr\n+ if self.logging_on:\n+ sys.stdout, sys.stderr = self, self\n+\n+ def stop(self):\n+ sys.stdout, sys.stderr = self.stdout_stderr\n+\n+ @property\n+ def out(self):\n+ return ''.join(self.log)\n+ \n+class SMTSimulation(object):\n+ def __init__(self, function, args=(), kwargs={}, tags=(), reason='', main_file=__file__):\n+ project = load_project()\n+ record = project.new_record(parameters=SimpleParameterSet(kwargs),\n+ main_file=main_file,\n+ reason=reason)\n+\n+ record.datastore.root = os.path.join(record.datastore.root, record.label)\n+ record.parameters.update({'datadir': record.datastore.root})\n+\n+ for tag in tags:\n+ record.tags.add(tag)\n+\n+ self.record = record\n+ self.project = project\n+ self.function = function\n+ self.args = args\n+ \n+ def launch(self):\n+ record = self.record\n+ record.start_time = time.time()\n+ \n+ logger = Logger(False)\n+ logger.start()\n+ try:\n+ self.function(*self.args, **record.parameters.as_dict())\n+ except:\n+ logger.stop()\n+ raise\n+ else:\n+ logger.stop()\n+ record.stdout_stderr = logger.out\n+ print logger.out\n+ \n+ record.duration = time.time() - record.start_time\n+\n+ record.output_data = record.datastore.find_new_data(record.timestamp)\n+\n+ lock = lockfile.FileLock(os.path.split(_get_project_file(self.project.path))[0])\n+ lock.acquire()\n+ self.project.add_record(record)\n+ self.project.save()\n+ lock.release()\n ", + "datastore": { + "type": "FileSystemDataStore", + "parameters": { + "root": "./Data/ffeee173e287" + } + }, + "input_datastore": { + "type": "FileSystemDataStore", + "parameters": { + "root": "/" + } + }, + "executable": { + "path": "/home/wd15/.virtualenvs/default/bin/python", + "version": "2.7.3", + "name": "Python", + "options": "" + }, + "parameters": { + "content": "totalSteps = 1\ndatadir = \"./Data/ffeee173e287\"", + "type": "SimpleParameterSet" + }, + "label": "ffeee173e287", + "version": "dbe0f00a15307cd92b19e14677d61097315669fb", + "stdout_stderr": "", + "repository": { + "url": "/home/wd15/git/extremefill-data", + "type": "GitRepository", + "upstream": "git@github.com:wd15/extremefill-data.git" + }, + "tags": [ + "test" + ], + "timestamp": "2013-02-16 19:57:20", + "reason": "testing SMT class", + "dependencies": [ + { + "name": "Cython", + "module": "python", + "source": "attribute", + "version": "0.16", + "diff": "", + "path": "/usr/lib/python2.7/dist-packages/Cython" + }, + { + "name": "IPython", + "module": "python", + "source": "attribute", + "version": "0.13.1.rc2", + "diff": "", + "path": "/usr/lib/python2.7/dist-packages/IPython" + }, + { + "name": "PIL", + "module": "python", + "source": null, + "version": "unknown", + "diff": "", + "path": "/usr/lib/python2.7/dist-packages/PIL" + }, + { + "name": "PyQt4", + "module": "python", + "source": null, + "version": "unknown", + "diff": "", + "path": "/usr/lib/python2.7/dist-packages/PyQt4" + }, + { + "name": "PyTrilinos", + "module": "python", + "source": "attribute", + "version": "4.8d", + "diff": "", + "path": "/home/wd15/.virtualenvs/fipy/lib/python2.7/site-packages/PyTrilinos" + }, + { + "name": "dateutil", + "module": "python", + "source": "attribute", + "version": "1.5", + "diff": "", + "path": "/usr/lib/python2.7/dist-packages/dateutil" + }, + { + "name": "distutils", + "module": "python", + "source": "attribute", + "version": "2.7.3", + "diff": "", + "path": "/home/wd15/.virtualenvs/default/lib/python2.7/distutils" + }, + { + "name": "django", + "module": "python", + "source": "attribute", + "version": "1.4.1", + "diff": "", + "path": "/usr/lib/python2.7/dist-packages/django" + }, + { + "name": "docutils", + "module": "python", + "source": "attribute", + "version": "0.10", + "diff": "", + "path": "/home/wd15/.virtualenvs/fipy/lib/python2.7/site-packages/docutils" + }, + { + "name": "encodings", + "module": "python", + "source": null, + "version": "unknown", + "diff": "", + "path": "/home/wd15/.virtualenvs/default/lib/python2.7/encodings" + }, + { + "name": "extremefill", + "module": "python", + "source": "/home/wd15/git/extremefill", + "version": "549c969edb113d0b3e9804612bfa53e91319c0ea", + "diff": "diff --git a/data/viewer.py b/data/viewer.py\nindex 68f60e0..d9ab7c2 100644\n--- a/data/viewer.py\n+++ b/data/viewer.py\n@@ -122,7 +122,7 @@ class ContourViewer(BaseViewer):\n self.times = times\n self.contours = contours\n self.data = []\n- super(ContourViewer, self).__init__(branches=branches, datafile=datafiles, datafiles=datafiles)\n+ super(ContourViewer, self).__init__(branches=branches, datafile=datafile, datafiles=datafiles)\n \n def plot(self):\n import matplotlib.pyplot as plt\n@@ -152,6 +152,24 @@ class ContourViewer(BaseViewer):\n phi = np.reshape(phi, shape)\n self.data.append((x, y, phi))\n \n+def datafilesFromBranches(branches, datafile):\n+ cwd = os.getcwd()\n+ for count, branch in enumerate(branches):\n+ print 'branch',branch\n+ tempdir = gitCloneToTemp(branch=branch, repositoryPath='ssh://wd15@genie.nist.gov/users/wd15/git/extremefill')\n+ repopath = os.path.join(tempdir, 'extremefill')\n+ datapath = os.path.join(repopath, datafile)\n+ gitMediaSync()\n+ if count == 0:\n+ self.addBaseData(datapath)\n+ basetempdir = tempdir\n+ else:\n+ self.addData(datapath, branch)\n+ cleanTempRepo(tempdir) \n+\n+ cleanTempRepo(basetempdir)\n+ os.chdir(cwd)\n+\n def plotNx():\n branches = ('Nx600', 'Nx300', 'Nx150')\n datafile = os.path.join('data', 'data.h5')\n@@ -174,13 +192,13 @@ def plotCFL():\n \n def plotContour():\n # branches = ('CFL0.0125', 'CFL0.025', 'CFL0.05', 'CFL0.1', 'CFL0.2', 'CFL0.4', 'CFL0.8', 'CFL1.6')\n- branches = ('Nx600', 'Nx150')\n+ branches = ('Nx300', 'Nx150')\n # branches = ('CFL0.025', 'CFL0.05')\n datafile = os.path.join('data', 'data.h5')\n times = (0,)\n- # times = (0., 1000., 2000., 3000., 4000.)\n- # viewer = ContourViewer(times=times, branches=branches, datafile=datafile)\n- viewer = ContourViewer(times=times, branches=branches, datafile=datafile, datafiles=('data150.h5', 'data600.h5'))\n+ times = (0., 1000., 2000., 3000., 4000.)\n+ viewer = ContourViewer(times=times, branches=branches, datafile=datafile)\n+ #viewer = ContourViewer(times=times, branches=branches, datafile=datafile, datafiles=('data150.h5', 'data600.h5'))\n viewer.plot()\n \n if __name__ == '__main__':\n@@ -188,6 +206,6 @@ if __name__ == '__main__':\n # from profiler import calibrate_profiler\n # fudge = calibrate_profiler(10000)\n # profile = Profiler('profile', fudge=fudge)\n- plotCFL()\n+ plotContour()\n # profile.stop()\n ", + "path": "/home/wd15/git/extremefill/extremefill" + }, + { + "name": "fipy", + "module": "python", + "source": "/home/wd15/git/fipy", + "version": "8c51478a3e8c30618b3a96c132612a46735c7548", + "diff": "", + "path": "/home/wd15/git/fipy/fipy" + }, + { + "name": "gi", + "module": "python", + "source": "attribute", + "version": "3.4.0", + "diff": "", + "path": "/usr/lib/python2.7/dist-packages/gi" + }, + { + "name": "glib", + "module": "python", + "source": null, + "version": "unknown", + "diff": "", + "path": "/usr/lib/python2.7/dist-packages/glib" + }, + { + "name": "gobject", + "module": "python", + "source": null, + "version": "unknown", + "diff": "", + "path": "/usr/lib/python2.7/dist-packages/gobject" + }, + { + "name": "google", + "module": "python", + "source": null, + "version": "unknown", + "diff": "", + "path": "/usr/lib/python2.7/dist-packages/google" + }, + { + "name": "gtk", + "module": "python", + "source": null, + "version": "unknown", + "diff": "", + "path": "/usr/lib/python2.7/dist-packages/gtk-2.0/gtk" + }, + { + "name": "httplib2", + "module": "python", + "source": "attribute", + "version": "0.7.4", + "diff": "", + "path": "/usr/lib/python2.7/dist-packages/httplib2" + }, + { + "name": "lockfile", + "module": "python", + "source": "egg-info", + "version": "0.9.1", + "diff": "", + "path": "/home/wd15/.virtualenvs/default/lib/python2.7/site-packages/lockfile-0.9.1-py2.7.egg/lockfile" + }, + { + "name": "lxml", + "module": "python", + "source": null, + "version": "unknown", + "diff": "", + "path": "/usr/lib/python2.7/dist-packages/lxml" + }, + { + "name": "matplotlib", + "module": "python", + "source": "attribute", + "version": "1.1.1", + "diff": "", + "path": "/usr/lib/pymodules/python2.7/matplotlib" + }, + { + "name": "mayavi", + "module": "python", + "source": "attribute", + "version": "4.1.0", + "diff": "", + "path": "/usr/lib/python2.7/dist-packages/mayavi" + }, + { + "name": "mpi4py", + "module": "python", + "source": "attribute", + "version": "1.3", + "diff": "", + "path": "/usr/lib/python2.7/dist-packages/mpi4py" + }, + { + "name": "mpl_toolkits", + "module": "python", + "source": null, + "version": "unknown", + "diff": "", + "path": "/usr/lib/pymodules/python2.7/mpl_toolkits" + }, + { + "name": "mx", + "module": "python", + "source": "attribute", + "version": "3.2.1", + "diff": "", + "path": "/usr/lib/python2.7/dist-packages/mx" + }, + { + "name": "nose", + "module": "python", + "source": "attribute", + "version": "1.2.1", + "diff": "", + "path": "/home/wd15/.virtualenvs/fipy/lib/python2.7/site-packages/nose" + }, + { + "name": "numexpr", + "module": "python", + "source": "attribute", + "version": "2.0.1", + "diff": "", + "path": "/usr/lib/python2.7/dist-packages/numexpr" + }, + { + "name": "numpy", + "module": "python", + "source": "attribute", + "version": "1.6.2", + "diff": "", + "path": "/usr/lib/python2.7/dist-packages/numpy" + }, + { + "name": "pyamg", + "module": "python", + "source": "attribute", + "version": "2.0.4.dev", + "diff": "", + "path": "/home/wd15/.virtualenvs/fipy/lib/python2.7/site-packages/pyamg" + }, + { + "name": "pylsmlib", + "module": "python", + "source": "/home/wd15/git/LSMLIB", + "version": "6f5d969bb27530aa37452a8b096e538a5cf7b993", + "diff": "", + "path": "/home/wd15/git/LSMLIB/pylsmlib/pylsmlib" + }, + { + "name": "pysparse", + "module": "python", + "source": "attribute", + "version": "1.1", + "diff": "", + "path": "/usr/lib/python2.7/dist-packages/pysparse" + }, + { + "name": "pytz", + "module": "python", + "source": "attribute", + "version": "2011k", + "diff": "", + "path": "/usr/lib/python2.7/dist-packages/pytz" + }, + { + "name": "scipy", + "module": "python", + "source": "attribute", + "version": "0.10.1", + "diff": "", + "path": "/usr/lib/python2.7/dist-packages/scipy" + }, + { + "name": "setuptools", + "module": "python", + "source": "attribute", + "version": "0.6", + "diff": "", + "path": "/home/wd15/.virtualenvs/default/local/lib/python2.7/site-packages/distribute-0.6.24-py2.7.egg/setuptools" + }, + { + "name": "simplejson", + "module": "python", + "source": "attribute", + "version": "2.6.1", + "diff": "", + "path": "/usr/lib/python2.7/dist-packages/simplejson" + }, + { + "name": "skfmm", + "module": "python", + "source": "/home/wd15/git/scikit-fmm", + "version": "467e5982fbd9d4eb32495f826d6bda65da498e13", + "diff": "", + "path": "/home/wd15/git/scikit-fmm/skfmm" + }, + { + "name": "sumatra", + "module": "python", + "source": "attribute", + "version": "0.5.0dev", + "diff": "", + "path": "/home/wd15/.virtualenvs/default/lib/python2.7/site-packages/Sumatra-0.5.0dev-py2.7.egg/sumatra" + }, + { + "name": "tables", + "module": "python", + "source": "attribute", + "version": "2.3.1", + "diff": "", + "path": "/usr/lib/python2.7/dist-packages/tables" + }, + { + "name": "tagging", + "module": "python", + "source": "attribute", + "version": "0.3.1", + "diff": "", + "path": "/home/wd15/.virtualenvs/fipy/lib/python2.7/site-packages/tagging" + }, + { + "name": "tornado", + "module": "python", + "source": "attribute", + "version": "2.3", + "diff": "", + "path": "/usr/lib/python2.7/dist-packages/tornado" + }, + { + "name": "traits", + "module": "python", + "source": "attribute", + "version": "4.1.0", + "diff": "", + "path": "/usr/lib/python2.7/dist-packages/traits" + }, + { + "name": "tvtk", + "module": "python", + "source": null, + "version": "unknown", + "diff": "", + "path": "/usr/lib/python2.7/dist-packages/tvtk" + }, + { + "name": "vtk", + "module": "python", + "source": null, + "version": "unknown", + "diff": "", + "path": "/usr/lib/pymodules/python2.7/vtk" + }, + { + "name": "wx", + "module": "python", + "source": "attribute", + "version": "2.8.12.1", + "diff": "", + "path": "/usr/lib/python2.7/dist-packages/wx-2.8-gtk2-unicode/wx" + }, + { + "name": "yaml", + "module": "python", + "source": "attribute", + "version": "3.10", + "diff": "", + "path": "/usr/lib/python2.7/dist-packages/yaml" + }, + { + "name": "zmq", + "module": "python", + "source": "attribute", + "version": "2.2.0", + "diff": "", + "path": "/usr/lib/python2.7/dist-packages/zmq" + } + ], + "user": "Daniel Wheeler ", + "output_data": [ + { + "path": "data.h5", + "digest": "19bec66fbad18e5aeae03f69028e805ae8bbdc34", + "metadata": { + "mimetype": null, + "size": 102992, + "encoding": null + } + } + ], + "input_data": [], + "launch_mode": { + "type": "SerialLaunchMode", + "parameters": { + "working_directory": "/home/wd15/git/extremefill-data" + } + }, + "main_file": "script.py", + "outcome": "" +}, +{ + "script_arguments": "", + "platforms": [ + { + "system_name": "Linux", + "machine": "x86_64", + "version": "#35-Ubuntu SMP Thu Jan 24 13:15:40 UTC 2013", + "ip_addr": "127.0.0.1", + "architecture_bits": "64bit", + "architecture_linkage": "ELF", + "release": "3.5.0-23-generic", + "network_name": "loki", + "processor": "x86_64" + } + ], + "duration": 4.854737043380737, + "diff": "diff --git a/script.py b/script.py\nindex cd4453d..a2a7a03 100644\n--- a/script.py\n+++ b/script.py\n@@ -32,5 +32,5 @@ def run(totalSteps=10,\n \n from smt import SMTSimulation\n \n-SMTSimulation(run, kwargs={'totalSteps' : 1}, tags=('test',), reason=\"testing decorator\", main_file=__file__)\n-\n+smtsim = SMTSimulation(run, kwargs={'totalSteps' : 1}, tags=('test',), reason=\"testing SMT class\", main_file=__file__)\n+smtsim.launch()\ndiff --git a/smt.py b/smt.py\nindex cdc7015..6847f51 100644\n--- a/smt.py\n+++ b/smt.py\n@@ -30,43 +30,63 @@ from sumatra.projects import _get_project_file\n import lockfile\n \n \n-class Writer(object):\n- log = []\n+class Logger(object):\n+ def __init__(self, logging_on=True):\n+ self.logging_on = logging_on\n+ self.log = []\n+ \n def write(self, data):\n self.log.append(data)\n \n-\n-def SMTSimulation(function, args=(), kwargs={}, tags=(), reason='', main_file=__file__):\n- project = load_project()\n- record = project.new_record(parameters=SimpleParameterSet(kwargs),\n- main_file=main_file,\n- reason=reason)\n-\n- record.datastore.root = os.path.join(record.datastore.root, record.label)\n- record.parameters.update({'datadir': record.datastore.root})\n-\n- for tag in tags:\n- record.tags.add(tag)\n-\n- record.start_time = time.time()\n-\n- ## http://stackoverflow.com/questions/4675728/redirect-stdout-to-a-file-in-python\n- ## see the last post in this thread\n- logger = Writer()\n- stdout_stderr = sys.stdout, sys.stderr\n- sys.stdout, sys.stderr = logger, logger\n-\n- function(*args, **record.parameters.as_dict())\n-\n- sys.stdout, sys.stderr = stdout_stderr\n- record.stdout_stderr = logger.log\n- print logger.log\n- record.duration = time.time() - record.start_time\n- record.output_data = record.datastore.find_new_data(record.timestamp)\n-\n- lock = lockfile.FileLock(os.path.split(_get_project_file(project.path))[0])\n- lock.acquire()\n- project.add_record(record)\n- project.save()\n- lock.release()\n+ def start(self):\n+ self.stdout_stderr = sys.stdout, sys.stderr\n+ if self.logging_on:\n+ sys.stdout, sys.stderr = self, self\n+\n+ def stop(self):\n+ sys.stdout, sys.stderr = self.stdout_stderr\n+\n+ @property\n+ def out(self):\n+ return ''.join(self.log)\n+ \n+class SMTSimulation(object):\n+ def __init__(self, function, args=(), kwargs={}, tags=(), reason='', main_file=__file__):\n+ project = load_project()\n+ record = project.new_record(parameters=SimpleParameterSet(kwargs),\n+ main_file=main_file,\n+ reason=reason)\n+\n+ record.datastore.root = os.path.join(record.datastore.root, record.label)\n+ record.parameters.update({'datadir': record.datastore.root})\n+\n+ for tag in tags:\n+ record.tags.add(tag)\n+\n+ self.record = record\n+ self.project = project\n+ self.function = function\n+ self.args = args\n+ \n+ def launch(self):\n+ record = self.record\n+\n+\n+ logger = Logger(False)\n+ logger.start()\n+ record.start_time = time.time()\n+ self.function(*self.args, **record.parameters.as_dict())\n+ record.duration = time.time() - record.start_time\n+ logger.stop()\n+\n+ record.stdout_stderr = logger.out\n+ print logger.out\n+\n+ record.output_data = record.datastore.find_new_data(record.timestamp)\n+\n+ lock = lockfile.FileLock(os.path.split(_get_project_file(self.project.path))[0])\n+ lock.acquire()\n+ self.project.add_record(record)\n+ self.project.save()\n+ lock.release()\n ", + "datastore": { + "type": "FileSystemDataStore", + "parameters": { + "root": "./Data/ee9a43b2218e" + } + }, + "input_datastore": { + "type": "FileSystemDataStore", + "parameters": { + "root": "/" + } + }, + "executable": { + "path": "/home/wd15/.virtualenvs/default/bin/python", + "version": "2.7.3", + "name": "Python", + "options": "" + }, + "parameters": { + "content": "totalSteps = 1\ndatadir = \"./Data/ee9a43b2218e\"", + "type": "SimpleParameterSet" + }, + "label": "ee9a43b2218e", + "version": "dbe0f00a15307cd92b19e14677d61097315669fb", + "stdout_stderr": "", + "repository": { + "url": "/home/wd15/git/extremefill-data", + "type": "GitRepository", + "upstream": "git@github.com:wd15/extremefill-data.git" + }, + "tags": [ + "test" + ], + "timestamp": "2013-02-15 22:28:32", + "reason": "testing SMT class", + "dependencies": [ + { + "name": "Cython", + "module": "python", + "source": "attribute", + "version": "0.16", + "diff": "", + "path": "/usr/lib/python2.7/dist-packages/Cython" + }, + { + "name": "IPython", + "module": "python", + "source": "attribute", + "version": "0.13.1.rc2", + "diff": "", + "path": "/usr/lib/python2.7/dist-packages/IPython" + }, + { + "name": "PIL", + "module": "python", + "source": null, + "version": "unknown", + "diff": "", + "path": "/usr/lib/python2.7/dist-packages/PIL" + }, + { + "name": "PyQt4", + "module": "python", + "source": null, + "version": "unknown", + "diff": "", + "path": "/usr/lib/python2.7/dist-packages/PyQt4" + }, + { + "name": "PyTrilinos", + "module": "python", + "source": "attribute", + "version": "4.8d", + "diff": "", + "path": "/home/wd15/.virtualenvs/fipy/lib/python2.7/site-packages/PyTrilinos" + }, + { + "name": "dateutil", + "module": "python", + "source": "attribute", + "version": "1.5", + "diff": "", + "path": "/usr/lib/python2.7/dist-packages/dateutil" + }, + { + "name": "distutils", + "module": "python", + "source": "attribute", + "version": "2.7.3", + "diff": "", + "path": "/home/wd15/.virtualenvs/default/lib/python2.7/distutils" + }, + { + "name": "django", + "module": "python", + "source": "attribute", + "version": "1.4.1", + "diff": "", + "path": "/usr/lib/python2.7/dist-packages/django" + }, + { + "name": "docutils", + "module": "python", + "source": "attribute", + "version": "0.10", + "diff": "", + "path": "/home/wd15/.virtualenvs/fipy/lib/python2.7/site-packages/docutils" + }, + { + "name": "encodings", + "module": "python", + "source": null, + "version": "unknown", + "diff": "", + "path": "/home/wd15/.virtualenvs/default/lib/python2.7/encodings" + }, + { + "name": "extremefill", + "module": "python", + "source": "/home/wd15/git/extremefill", + "version": "549c969edb113d0b3e9804612bfa53e91319c0ea", + "diff": "diff --git a/data/viewer.py b/data/viewer.py\nindex 68f60e0..d9ab7c2 100644\n--- a/data/viewer.py\n+++ b/data/viewer.py\n@@ -122,7 +122,7 @@ class ContourViewer(BaseViewer):\n self.times = times\n self.contours = contours\n self.data = []\n- super(ContourViewer, self).__init__(branches=branches, datafile=datafiles, datafiles=datafiles)\n+ super(ContourViewer, self).__init__(branches=branches, datafile=datafile, datafiles=datafiles)\n \n def plot(self):\n import matplotlib.pyplot as plt\n@@ -152,6 +152,24 @@ class ContourViewer(BaseViewer):\n phi = np.reshape(phi, shape)\n self.data.append((x, y, phi))\n \n+def datafilesFromBranches(branches, datafile):\n+ cwd = os.getcwd()\n+ for count, branch in enumerate(branches):\n+ print 'branch',branch\n+ tempdir = gitCloneToTemp(branch=branch, repositoryPath='ssh://wd15@genie.nist.gov/users/wd15/git/extremefill')\n+ repopath = os.path.join(tempdir, 'extremefill')\n+ datapath = os.path.join(repopath, datafile)\n+ gitMediaSync()\n+ if count == 0:\n+ self.addBaseData(datapath)\n+ basetempdir = tempdir\n+ else:\n+ self.addData(datapath, branch)\n+ cleanTempRepo(tempdir) \n+\n+ cleanTempRepo(basetempdir)\n+ os.chdir(cwd)\n+\n def plotNx():\n branches = ('Nx600', 'Nx300', 'Nx150')\n datafile = os.path.join('data', 'data.h5')\n@@ -174,13 +192,13 @@ def plotCFL():\n \n def plotContour():\n # branches = ('CFL0.0125', 'CFL0.025', 'CFL0.05', 'CFL0.1', 'CFL0.2', 'CFL0.4', 'CFL0.8', 'CFL1.6')\n- branches = ('Nx600', 'Nx150')\n+ branches = ('Nx300', 'Nx150')\n # branches = ('CFL0.025', 'CFL0.05')\n datafile = os.path.join('data', 'data.h5')\n times = (0,)\n- # times = (0., 1000., 2000., 3000., 4000.)\n- # viewer = ContourViewer(times=times, branches=branches, datafile=datafile)\n- viewer = ContourViewer(times=times, branches=branches, datafile=datafile, datafiles=('data150.h5', 'data600.h5'))\n+ times = (0., 1000., 2000., 3000., 4000.)\n+ viewer = ContourViewer(times=times, branches=branches, datafile=datafile)\n+ #viewer = ContourViewer(times=times, branches=branches, datafile=datafile, datafiles=('data150.h5', 'data600.h5'))\n viewer.plot()\n \n if __name__ == '__main__':\n@@ -188,6 +206,6 @@ if __name__ == '__main__':\n # from profiler import calibrate_profiler\n # fudge = calibrate_profiler(10000)\n # profile = Profiler('profile', fudge=fudge)\n- plotCFL()\n+ plotContour()\n # profile.stop()\n ", + "path": "/home/wd15/git/extremefill/extremefill" + }, + { + "name": "fipy", + "module": "python", + "source": "/home/wd15/git/fipy", + "version": "8c51478a3e8c30618b3a96c132612a46735c7548", + "diff": "", + "path": "/home/wd15/git/fipy/fipy" + }, + { + "name": "gi", + "module": "python", + "source": "attribute", + "version": "3.4.0", + "diff": "", + "path": "/usr/lib/python2.7/dist-packages/gi" + }, + { + "name": "glib", + "module": "python", + "source": null, + "version": "unknown", + "diff": "", + "path": "/usr/lib/python2.7/dist-packages/glib" + }, + { + "name": "gobject", + "module": "python", + "source": null, + "version": "unknown", + "diff": "", + "path": "/usr/lib/python2.7/dist-packages/gobject" + }, + { + "name": "google", + "module": "python", + "source": null, + "version": "unknown", + "diff": "", + "path": "/usr/lib/python2.7/dist-packages/google" + }, + { + "name": "gtk", + "module": "python", + "source": null, + "version": "unknown", + "diff": "", + "path": "/usr/lib/python2.7/dist-packages/gtk-2.0/gtk" + }, + { + "name": "httplib2", + "module": "python", + "source": "attribute", + "version": "0.7.4", + "diff": "", + "path": "/usr/lib/python2.7/dist-packages/httplib2" + }, + { + "name": "lockfile", + "module": "python", + "source": "egg-info", + "version": "0.9.1", + "diff": "", + "path": "/home/wd15/.virtualenvs/default/lib/python2.7/site-packages/lockfile-0.9.1-py2.7.egg/lockfile" + }, + { + "name": "lxml", + "module": "python", + "source": null, + "version": "unknown", + "diff": "", + "path": "/usr/lib/python2.7/dist-packages/lxml" + }, + { + "name": "matplotlib", + "module": "python", + "source": "attribute", + "version": "1.1.1", + "diff": "", + "path": "/usr/lib/pymodules/python2.7/matplotlib" + }, + { + "name": "mayavi", + "module": "python", + "source": "attribute", + "version": "4.1.0", + "diff": "", + "path": "/usr/lib/python2.7/dist-packages/mayavi" + }, + { + "name": "mpi4py", + "module": "python", + "source": "attribute", + "version": "1.3", + "diff": "", + "path": "/usr/lib/python2.7/dist-packages/mpi4py" + }, + { + "name": "mpl_toolkits", + "module": "python", + "source": null, + "version": "unknown", + "diff": "", + "path": "/usr/lib/pymodules/python2.7/mpl_toolkits" + }, + { + "name": "mx", + "module": "python", + "source": "attribute", + "version": "3.2.1", + "diff": "", + "path": "/usr/lib/python2.7/dist-packages/mx" + }, + { + "name": "nose", + "module": "python", + "source": "attribute", + "version": "1.2.1", + "diff": "", + "path": "/home/wd15/.virtualenvs/fipy/lib/python2.7/site-packages/nose" + }, + { + "name": "numexpr", + "module": "python", + "source": "attribute", + "version": "2.0.1", + "diff": "", + "path": "/usr/lib/python2.7/dist-packages/numexpr" + }, + { + "name": "numpy", + "module": "python", + "source": "attribute", + "version": "1.6.2", + "diff": "", + "path": "/usr/lib/python2.7/dist-packages/numpy" + }, + { + "name": "pyamg", + "module": "python", + "source": "attribute", + "version": "2.0.4.dev", + "diff": "", + "path": "/home/wd15/.virtualenvs/fipy/lib/python2.7/site-packages/pyamg" + }, + { + "name": "pylsmlib", + "module": "python", + "source": "/home/wd15/git/LSMLIB", + "version": "6f5d969bb27530aa37452a8b096e538a5cf7b993", + "diff": "", + "path": "/home/wd15/git/LSMLIB/pylsmlib/pylsmlib" + }, + { + "name": "pysparse", + "module": "python", + "source": "attribute", + "version": "1.1", + "diff": "", + "path": "/usr/lib/python2.7/dist-packages/pysparse" + }, + { + "name": "pytz", + "module": "python", + "source": "attribute", + "version": "2011k", + "diff": "", + "path": "/usr/lib/python2.7/dist-packages/pytz" + }, + { + "name": "scipy", + "module": "python", + "source": "attribute", + "version": "0.10.1", + "diff": "", + "path": "/usr/lib/python2.7/dist-packages/scipy" + }, + { + "name": "setuptools", + "module": "python", + "source": "attribute", + "version": "0.6", + "diff": "", + "path": "/home/wd15/.virtualenvs/default/local/lib/python2.7/site-packages/distribute-0.6.24-py2.7.egg/setuptools" + }, + { + "name": "simplejson", + "module": "python", + "source": "attribute", + "version": "2.6.1", + "diff": "", + "path": "/usr/lib/python2.7/dist-packages/simplejson" + }, + { + "name": "skfmm", + "module": "python", + "source": "/home/wd15/git/scikit-fmm", + "version": "467e5982fbd9d4eb32495f826d6bda65da498e13", + "diff": "", + "path": "/home/wd15/git/scikit-fmm/skfmm" + }, + { + "name": "sumatra", + "module": "python", + "source": "attribute", + "version": "0.5.0dev", + "diff": "", + "path": "/home/wd15/.virtualenvs/default/lib/python2.7/site-packages/Sumatra-0.5.0dev-py2.7.egg/sumatra" + }, + { + "name": "tables", + "module": "python", + "source": "attribute", + "version": "2.3.1", + "diff": "", + "path": "/usr/lib/python2.7/dist-packages/tables" + }, + { + "name": "tagging", + "module": "python", + "source": "attribute", + "version": "0.3.1", + "diff": "", + "path": "/home/wd15/.virtualenvs/fipy/lib/python2.7/site-packages/tagging" + }, + { + "name": "tornado", + "module": "python", + "source": "attribute", + "version": "2.3", + "diff": "", + "path": "/usr/lib/python2.7/dist-packages/tornado" + }, + { + "name": "traits", + "module": "python", + "source": "attribute", + "version": "4.1.0", + "diff": "", + "path": "/usr/lib/python2.7/dist-packages/traits" + }, + { + "name": "tvtk", + "module": "python", + "source": null, + "version": "unknown", + "diff": "", + "path": "/usr/lib/python2.7/dist-packages/tvtk" + }, + { + "name": "vtk", + "module": "python", + "source": null, + "version": "unknown", + "diff": "", + "path": "/usr/lib/pymodules/python2.7/vtk" + }, + { + "name": "wx", + "module": "python", + "source": "attribute", + "version": "2.8.12.1", + "diff": "", + "path": "/usr/lib/python2.7/dist-packages/wx-2.8-gtk2-unicode/wx" + }, + { + "name": "yaml", + "module": "python", + "source": "attribute", + "version": "3.10", + "diff": "", + "path": "/usr/lib/python2.7/dist-packages/yaml" + }, + { + "name": "zmq", + "module": "python", + "source": "attribute", + "version": "2.2.0", + "diff": "", + "path": "/usr/lib/python2.7/dist-packages/zmq" + } + ], + "user": "Daniel Wheeler ", + "output_data": [ + { + "path": "data.h5", + "digest": "42b2f89711a41d118d81dc8429ec537d7f01774b", + "metadata": { + "mimetype": null, + "size": 102992, + "encoding": null + } + } + ], + "input_data": [], + "launch_mode": { + "type": "SerialLaunchMode", + "parameters": { + "working_directory": "/home/wd15/git/extremefill-data" + } + }, + "main_file": "script.py", + "outcome": "" +}, +{ + "script_arguments": "", + "platforms": [ + { + "system_name": "Linux", + "machine": "x86_64", + "version": "#35-Ubuntu SMP Thu Jan 24 13:15:40 UTC 2013", + "ip_addr": "127.0.0.1", + "architecture_bits": "64bit", + "architecture_linkage": "ELF", + "release": "3.5.0-23-generic", + "network_name": "loki", + "processor": "x86_64" + } + ], + "duration": 4.7951109409332275, + "diff": "diff --git a/smt.py b/smt.py\nindex cdc7015..9f1764a 100644\n--- a/smt.py\n+++ b/smt.py\n@@ -30,11 +30,22 @@ from sumatra.projects import _get_project_file\n import lockfile\n \n \n-class Writer(object):\n+class Logger(object):\n log = []\n def write(self, data):\n self.log.append(data)\n \n+ def start(self):\n+ self.stdout_stderr = sys.stdout, sys.stderr\n+ sys.stdout, sys.stderr = self, self\n+\n+ def stop(self):\n+ sys.stdout, sys.stderr = self.stdout_stderr\n+\n+ @property\n+ def out(self):\n+ return ''.join(self.log)\n+ \n \n def SMTSimulation(function, args=(), kwargs={}, tags=(), reason='', main_file=__file__):\n project = load_project()\n@@ -52,15 +63,14 @@ def SMTSimulation(function, args=(), kwargs={}, tags=(), reason='', main_file=__\n \n ## http://stackoverflow.com/questions/4675728/redirect-stdout-to-a-file-in-python\n ## see the last post in this thread\n- logger = Writer()\n- stdout_stderr = sys.stdout, sys.stderr\n- sys.stdout, sys.stderr = logger, logger\n \n+ logger = Logger()\n+ logger.start()\n function(*args, **record.parameters.as_dict())\n+ logger.stop()\n \n- sys.stdout, sys.stderr = stdout_stderr\n- record.stdout_stderr = logger.log\n- print logger.log\n+ record.stdout_stderr = logger.out\n+ print logger.out\n record.duration = time.time() - record.start_time\n record.output_data = record.datastore.find_new_data(record.timestamp)\n ", + "datastore": { + "type": "FileSystemDataStore", + "parameters": { + "root": "./Data/2cdd8509bc71" + } + }, + "input_datastore": { + "type": "FileSystemDataStore", + "parameters": { + "root": "/" + } + }, + "executable": { + "path": "/home/wd15/.virtualenvs/default/bin/python", + "version": "2.7.3", + "name": "Python", + "options": "" + }, + "parameters": { + "content": "totalSteps = 1\ndatadir = \"./Data/2cdd8509bc71\"", + "type": "SimpleParameterSet" + }, + "label": "2cdd8509bc71", + "version": "dbe0f00a15307cd92b19e14677d61097315669fb", + "stdout_stderr": "[ 1. 1. 1. 1.]\n[ 0.34738209 0.61535499 0.01923836 0.00971058]\n[ 1.23729704e-01 2.14204081e-01 1.88311438e-04 1.55991524e-03]\n\ntheta 0.0\ncBar_supp 1.0\ncBar_cu 1.0\npotentialBar 1.0\nmin(extension) 7.22965473284e-08\nmin(depositionRate) 2.09114908795e-09\nmin(current) 56.8350759862\nmin(cupric) 997.266139623\nmin(baseCurrent) 56.9323002935\nmax(interfaceTheta) - 1: -0.973021297371\nmin(interfaceTheta) 0.0\nmin(I0) 38.9208518948\ndt 0.011\nelapsed time 0.0\nstep 0\n\n", + "repository": { + "url": "/home/wd15/git/extremefill-data", + "type": "GitRepository", + "upstream": "git@github.com:wd15/extremefill-data.git" + }, + "tags": [ + "test" + ], + "timestamp": "2013-02-15 22:05:25", + "reason": "testing decorator", + "dependencies": [ + { + "name": "Cython", + "module": "python", + "source": "attribute", + "version": "0.16", + "diff": "", + "path": "/usr/lib/python2.7/dist-packages/Cython" + }, + { + "name": "IPython", + "module": "python", + "source": "attribute", + "version": "0.13.1.rc2", + "diff": "", + "path": "/usr/lib/python2.7/dist-packages/IPython" + }, + { + "name": "PIL", + "module": "python", + "source": null, + "version": "unknown", + "diff": "", + "path": "/usr/lib/python2.7/dist-packages/PIL" + }, + { + "name": "PyQt4", + "module": "python", + "source": null, + "version": "unknown", + "diff": "", + "path": "/usr/lib/python2.7/dist-packages/PyQt4" + }, + { + "name": "PyTrilinos", + "module": "python", + "source": "attribute", + "version": "4.8d", + "diff": "", + "path": "/home/wd15/.virtualenvs/fipy/lib/python2.7/site-packages/PyTrilinos" + }, + { + "name": "dateutil", + "module": "python", + "source": "attribute", + "version": "1.5", + "diff": "", + "path": "/usr/lib/python2.7/dist-packages/dateutil" + }, + { + "name": "distutils", + "module": "python", + "source": "attribute", + "version": "2.7.3", + "diff": "", + "path": "/home/wd15/.virtualenvs/default/lib/python2.7/distutils" + }, + { + "name": "django", + "module": "python", + "source": "attribute", + "version": "1.4.1", + "diff": "", + "path": "/usr/lib/python2.7/dist-packages/django" + }, + { + "name": "docutils", + "module": "python", + "source": "attribute", + "version": "0.10", + "diff": "", + "path": "/home/wd15/.virtualenvs/fipy/lib/python2.7/site-packages/docutils" + }, + { + "name": "encodings", + "module": "python", + "source": null, + "version": "unknown", + "diff": "", + "path": "/home/wd15/.virtualenvs/default/lib/python2.7/encodings" + }, + { + "name": "extremefill", + "module": "python", + "source": "/home/wd15/git/extremefill", + "version": "549c969edb113d0b3e9804612bfa53e91319c0ea", + "diff": "diff --git a/data/viewer.py b/data/viewer.py\nindex 68f60e0..d9ab7c2 100644\n--- a/data/viewer.py\n+++ b/data/viewer.py\n@@ -122,7 +122,7 @@ class ContourViewer(BaseViewer):\n self.times = times\n self.contours = contours\n self.data = []\n- super(ContourViewer, self).__init__(branches=branches, datafile=datafiles, datafiles=datafiles)\n+ super(ContourViewer, self).__init__(branches=branches, datafile=datafile, datafiles=datafiles)\n \n def plot(self):\n import matplotlib.pyplot as plt\n@@ -152,6 +152,24 @@ class ContourViewer(BaseViewer):\n phi = np.reshape(phi, shape)\n self.data.append((x, y, phi))\n \n+def datafilesFromBranches(branches, datafile):\n+ cwd = os.getcwd()\n+ for count, branch in enumerate(branches):\n+ print 'branch',branch\n+ tempdir = gitCloneToTemp(branch=branch, repositoryPath='ssh://wd15@genie.nist.gov/users/wd15/git/extremefill')\n+ repopath = os.path.join(tempdir, 'extremefill')\n+ datapath = os.path.join(repopath, datafile)\n+ gitMediaSync()\n+ if count == 0:\n+ self.addBaseData(datapath)\n+ basetempdir = tempdir\n+ else:\n+ self.addData(datapath, branch)\n+ cleanTempRepo(tempdir) \n+\n+ cleanTempRepo(basetempdir)\n+ os.chdir(cwd)\n+\n def plotNx():\n branches = ('Nx600', 'Nx300', 'Nx150')\n datafile = os.path.join('data', 'data.h5')\n@@ -174,13 +192,13 @@ def plotCFL():\n \n def plotContour():\n # branches = ('CFL0.0125', 'CFL0.025', 'CFL0.05', 'CFL0.1', 'CFL0.2', 'CFL0.4', 'CFL0.8', 'CFL1.6')\n- branches = ('Nx600', 'Nx150')\n+ branches = ('Nx300', 'Nx150')\n # branches = ('CFL0.025', 'CFL0.05')\n datafile = os.path.join('data', 'data.h5')\n times = (0,)\n- # times = (0., 1000., 2000., 3000., 4000.)\n- # viewer = ContourViewer(times=times, branches=branches, datafile=datafile)\n- viewer = ContourViewer(times=times, branches=branches, datafile=datafile, datafiles=('data150.h5', 'data600.h5'))\n+ times = (0., 1000., 2000., 3000., 4000.)\n+ viewer = ContourViewer(times=times, branches=branches, datafile=datafile)\n+ #viewer = ContourViewer(times=times, branches=branches, datafile=datafile, datafiles=('data150.h5', 'data600.h5'))\n viewer.plot()\n \n if __name__ == '__main__':\n@@ -188,6 +206,6 @@ if __name__ == '__main__':\n # from profiler import calibrate_profiler\n # fudge = calibrate_profiler(10000)\n # profile = Profiler('profile', fudge=fudge)\n- plotCFL()\n+ plotContour()\n # profile.stop()\n ", + "path": "/home/wd15/git/extremefill/extremefill" + }, + { + "name": "fipy", + "module": "python", + "source": "/home/wd15/git/fipy", + "version": "8c51478a3e8c30618b3a96c132612a46735c7548", + "diff": "", + "path": "/home/wd15/git/fipy/fipy" + }, + { + "name": "gi", + "module": "python", + "source": "attribute", + "version": "3.4.0", + "diff": "", + "path": "/usr/lib/python2.7/dist-packages/gi" + }, + { + "name": "glib", + "module": "python", + "source": null, + "version": "unknown", + "diff": "", + "path": "/usr/lib/python2.7/dist-packages/glib" + }, + { + "name": "gobject", + "module": "python", + "source": null, + "version": "unknown", + "diff": "", + "path": "/usr/lib/python2.7/dist-packages/gobject" + }, + { + "name": "google", + "module": "python", + "source": null, + "version": "unknown", + "diff": "", + "path": "/usr/lib/python2.7/dist-packages/google" + }, + { + "name": "gtk", + "module": "python", + "source": null, + "version": "unknown", + "diff": "", + "path": "/usr/lib/python2.7/dist-packages/gtk-2.0/gtk" + }, + { + "name": "httplib2", + "module": "python", + "source": "attribute", + "version": "0.7.4", + "diff": "", + "path": "/usr/lib/python2.7/dist-packages/httplib2" + }, + { + "name": "lockfile", + "module": "python", + "source": "egg-info", + "version": "0.9.1", + "diff": "", + "path": "/home/wd15/.virtualenvs/default/lib/python2.7/site-packages/lockfile-0.9.1-py2.7.egg/lockfile" + }, + { + "name": "lxml", + "module": "python", + "source": null, + "version": "unknown", + "diff": "", + "path": "/usr/lib/python2.7/dist-packages/lxml" + }, + { + "name": "matplotlib", + "module": "python", + "source": "attribute", + "version": "1.1.1", + "diff": "", + "path": "/usr/lib/pymodules/python2.7/matplotlib" + }, + { + "name": "mayavi", + "module": "python", + "source": "attribute", + "version": "4.1.0", + "diff": "", + "path": "/usr/lib/python2.7/dist-packages/mayavi" + }, + { + "name": "mpi4py", + "module": "python", + "source": "attribute", + "version": "1.3", + "diff": "", + "path": "/usr/lib/python2.7/dist-packages/mpi4py" + }, + { + "name": "mpl_toolkits", + "module": "python", + "source": null, + "version": "unknown", + "diff": "", + "path": "/usr/lib/pymodules/python2.7/mpl_toolkits" + }, + { + "name": "mx", + "module": "python", + "source": "attribute", + "version": "3.2.1", + "diff": "", + "path": "/usr/lib/python2.7/dist-packages/mx" + }, + { + "name": "nose", + "module": "python", + "source": "attribute", + "version": "1.2.1", + "diff": "", + "path": "/home/wd15/.virtualenvs/fipy/lib/python2.7/site-packages/nose" + }, + { + "name": "numexpr", + "module": "python", + "source": "attribute", + "version": "2.0.1", + "diff": "", + "path": "/usr/lib/python2.7/dist-packages/numexpr" + }, + { + "name": "numpy", + "module": "python", + "source": "attribute", + "version": "1.6.2", + "diff": "", + "path": "/usr/lib/python2.7/dist-packages/numpy" + }, + { + "name": "pyamg", + "module": "python", + "source": "attribute", + "version": "2.0.4.dev", + "diff": "", + "path": "/home/wd15/.virtualenvs/fipy/lib/python2.7/site-packages/pyamg" + }, + { + "name": "pylsmlib", + "module": "python", + "source": "/home/wd15/git/LSMLIB", + "version": "6f5d969bb27530aa37452a8b096e538a5cf7b993", + "diff": "", + "path": "/home/wd15/git/LSMLIB/pylsmlib/pylsmlib" + }, + { + "name": "pysparse", + "module": "python", + "source": "attribute", + "version": "1.1", + "diff": "", + "path": "/usr/lib/python2.7/dist-packages/pysparse" + }, + { + "name": "pytz", + "module": "python", + "source": "attribute", + "version": "2011k", + "diff": "", + "path": "/usr/lib/python2.7/dist-packages/pytz" + }, + { + "name": "scipy", + "module": "python", + "source": "attribute", + "version": "0.10.1", + "diff": "", + "path": "/usr/lib/python2.7/dist-packages/scipy" + }, + { + "name": "setuptools", + "module": "python", + "source": "attribute", + "version": "0.6", + "diff": "", + "path": "/home/wd15/.virtualenvs/default/local/lib/python2.7/site-packages/distribute-0.6.24-py2.7.egg/setuptools" + }, + { + "name": "simplejson", + "module": "python", + "source": "attribute", + "version": "2.6.1", + "diff": "", + "path": "/usr/lib/python2.7/dist-packages/simplejson" + }, + { + "name": "skfmm", + "module": "python", + "source": "/home/wd15/git/scikit-fmm", + "version": "467e5982fbd9d4eb32495f826d6bda65da498e13", + "diff": "", + "path": "/home/wd15/git/scikit-fmm/skfmm" + }, + { + "name": "sumatra", + "module": "python", + "source": "attribute", + "version": "0.5.0dev", + "diff": "", + "path": "/home/wd15/.virtualenvs/default/lib/python2.7/site-packages/Sumatra-0.5.0dev-py2.7.egg/sumatra" + }, + { + "name": "tables", + "module": "python", + "source": "attribute", + "version": "2.3.1", + "diff": "", + "path": "/usr/lib/python2.7/dist-packages/tables" + }, + { + "name": "tagging", + "module": "python", + "source": "attribute", + "version": "0.3.1", + "diff": "", + "path": "/home/wd15/.virtualenvs/fipy/lib/python2.7/site-packages/tagging" + }, + { + "name": "tornado", + "module": "python", + "source": "attribute", + "version": "2.3", + "diff": "", + "path": "/usr/lib/python2.7/dist-packages/tornado" + }, + { + "name": "traits", + "module": "python", + "source": "attribute", + "version": "4.1.0", + "diff": "", + "path": "/usr/lib/python2.7/dist-packages/traits" + }, + { + "name": "tvtk", + "module": "python", + "source": null, + "version": "unknown", + "diff": "", + "path": "/usr/lib/python2.7/dist-packages/tvtk" + }, + { + "name": "vtk", + "module": "python", + "source": null, + "version": "unknown", + "diff": "", + "path": "/usr/lib/pymodules/python2.7/vtk" + }, + { + "name": "wx", + "module": "python", + "source": "attribute", + "version": "2.8.12.1", + "diff": "", + "path": "/usr/lib/python2.7/dist-packages/wx-2.8-gtk2-unicode/wx" + }, + { + "name": "yaml", + "module": "python", + "source": "attribute", + "version": "3.10", + "diff": "", + "path": "/usr/lib/python2.7/dist-packages/yaml" + }, + { + "name": "zmq", + "module": "python", + "source": "attribute", + "version": "2.2.0", + "diff": "", + "path": "/usr/lib/python2.7/dist-packages/zmq" + } + ], + "user": "Daniel Wheeler ", + "output_data": [ + { + "path": "data.h5", + "digest": "a69d3622fe5323d333a978930cb38c8b1ee4b1af", + "metadata": { + "mimetype": null, + "size": 102992, + "encoding": null + } + } + ], + "input_data": [], + "launch_mode": { + "type": "SerialLaunchMode", + "parameters": { + "working_directory": "/home/wd15/git/extremefill-data" + } + }, + "main_file": "script.py", + "outcome": "" +}, +{ + "script_arguments": "", + "platforms": [ + { + "system_name": "Linux", + "machine": "x86_64", + "version": "#35-Ubuntu SMP Thu Jan 24 13:15:40 UTC 2013", + "ip_addr": "127.0.0.1", + "architecture_bits": "64bit", + "architecture_linkage": "ELF", + "release": "3.5.0-23-generic", + "network_name": "loki", + "processor": "x86_64" + } + ], + "duration": 4.799339056015015, + "diff": "diff --git a/smt.py b/smt.py\nindex cdc7015..815bfce 100644\n--- a/smt.py\n+++ b/smt.py\n@@ -30,11 +30,22 @@ from sumatra.projects import _get_project_file\n import lockfile\n \n \n-class Writer(object):\n+class Logger(object):\n log = []\n def write(self, data):\n self.log.append(data)\n \n+ def start(self):\n+ self.stdout_stderr = sys.stdout, sys.stderr\n+ sys.stdout, sys.stderr = self, self\n+\n+ def stop(self):\n+ sys.stdout, sys.stderr = self.stdout_stderr\n+\n+ @property\n+ def out(self):\n+ return ''.join(self.log)\n+ \n \n def SMTSimulation(function, args=(), kwargs={}, tags=(), reason='', main_file=__file__):\n project = load_project()\n@@ -52,14 +63,13 @@ def SMTSimulation(function, args=(), kwargs={}, tags=(), reason='', main_file=__\n \n ## http://stackoverflow.com/questions/4675728/redirect-stdout-to-a-file-in-python\n ## see the last post in this thread\n- logger = Writer()\n- stdout_stderr = sys.stdout, sys.stderr\n- sys.stdout, sys.stderr = logger, logger\n \n+ logger = Logger()\n+ logger.start()\n function(*args, **record.parameters.as_dict())\n+ logger.stop()\n \n- sys.stdout, sys.stderr = stdout_stderr\n- record.stdout_stderr = logger.log\n+ record.stdout_stderr = logger.out\n print logger.log\n record.duration = time.time() - record.start_time\n record.output_data = record.datastore.find_new_data(record.timestamp)", + "datastore": { + "type": "FileSystemDataStore", + "parameters": { + "root": "./Data/d0472a2539cc" + } + }, + "input_datastore": { + "type": "FileSystemDataStore", + "parameters": { + "root": "/" + } + }, + "executable": { + "path": "/home/wd15/.virtualenvs/default/bin/python", + "version": "2.7.3", + "name": "Python", + "options": "" + }, + "parameters": { + "content": "totalSteps = 1\ndatadir = \"./Data/d0472a2539cc\"", + "type": "SimpleParameterSet" + }, + "label": "d0472a2539cc", + "version": "dbe0f00a15307cd92b19e14677d61097315669fb", + "stdout_stderr": "[ 1. 1. 1. 1.]\n[ 0.34738209 0.61535499 0.01923836 0.00971058]\n[ 1.23729704e-01 2.14204081e-01 1.88311438e-04 1.55991524e-03]\n\ntheta 0.0\ncBar_supp 1.0\ncBar_cu 1.0\npotentialBar 1.0\nmin(extension) 7.22965473284e-08\nmin(depositionRate) 2.09114908795e-09\nmin(current) 56.8350759862\nmin(cupric) 997.266139623\nmin(baseCurrent) 56.9323002935\nmax(interfaceTheta) - 1: -0.973021297371\nmin(interfaceTheta) 0.0\nmin(I0) 38.9208518948\ndt 0.011\nelapsed time 0.0\nstep 0\n\n", + "repository": { + "url": "/home/wd15/git/extremefill-data", + "type": "GitRepository", + "upstream": "git@github.com:wd15/extremefill-data.git" + }, + "tags": [ + "test" + ], + "timestamp": "2013-02-15 22:04:09", + "reason": "testing decorator", + "dependencies": [ + { + "name": "Cython", + "module": "python", + "source": "attribute", + "version": "0.16", + "diff": "", + "path": "/usr/lib/python2.7/dist-packages/Cython" + }, + { + "name": "IPython", + "module": "python", + "source": "attribute", + "version": "0.13.1.rc2", + "diff": "", + "path": "/usr/lib/python2.7/dist-packages/IPython" + }, + { + "name": "PIL", + "module": "python", + "source": null, + "version": "unknown", + "diff": "", + "path": "/usr/lib/python2.7/dist-packages/PIL" + }, + { + "name": "PyQt4", + "module": "python", + "source": null, + "version": "unknown", + "diff": "", + "path": "/usr/lib/python2.7/dist-packages/PyQt4" + }, + { + "name": "PyTrilinos", + "module": "python", + "source": "attribute", + "version": "4.8d", + "diff": "", + "path": "/home/wd15/.virtualenvs/fipy/lib/python2.7/site-packages/PyTrilinos" + }, + { + "name": "dateutil", + "module": "python", + "source": "attribute", + "version": "1.5", + "diff": "", + "path": "/usr/lib/python2.7/dist-packages/dateutil" + }, + { + "name": "distutils", + "module": "python", + "source": "attribute", + "version": "2.7.3", + "diff": "", + "path": "/home/wd15/.virtualenvs/default/lib/python2.7/distutils" + }, + { + "name": "django", + "module": "python", + "source": "attribute", + "version": "1.4.1", + "diff": "", + "path": "/usr/lib/python2.7/dist-packages/django" + }, + { + "name": "docutils", + "module": "python", + "source": "attribute", + "version": "0.10", + "diff": "", + "path": "/home/wd15/.virtualenvs/fipy/lib/python2.7/site-packages/docutils" + }, + { + "name": "encodings", + "module": "python", + "source": null, + "version": "unknown", + "diff": "", + "path": "/home/wd15/.virtualenvs/default/lib/python2.7/encodings" + }, + { + "name": "extremefill", + "module": "python", + "source": "/home/wd15/git/extremefill", + "version": "549c969edb113d0b3e9804612bfa53e91319c0ea", + "diff": "diff --git a/data/viewer.py b/data/viewer.py\nindex 68f60e0..d9ab7c2 100644\n--- a/data/viewer.py\n+++ b/data/viewer.py\n@@ -122,7 +122,7 @@ class ContourViewer(BaseViewer):\n self.times = times\n self.contours = contours\n self.data = []\n- super(ContourViewer, self).__init__(branches=branches, datafile=datafiles, datafiles=datafiles)\n+ super(ContourViewer, self).__init__(branches=branches, datafile=datafile, datafiles=datafiles)\n \n def plot(self):\n import matplotlib.pyplot as plt\n@@ -152,6 +152,24 @@ class ContourViewer(BaseViewer):\n phi = np.reshape(phi, shape)\n self.data.append((x, y, phi))\n \n+def datafilesFromBranches(branches, datafile):\n+ cwd = os.getcwd()\n+ for count, branch in enumerate(branches):\n+ print 'branch',branch\n+ tempdir = gitCloneToTemp(branch=branch, repositoryPath='ssh://wd15@genie.nist.gov/users/wd15/git/extremefill')\n+ repopath = os.path.join(tempdir, 'extremefill')\n+ datapath = os.path.join(repopath, datafile)\n+ gitMediaSync()\n+ if count == 0:\n+ self.addBaseData(datapath)\n+ basetempdir = tempdir\n+ else:\n+ self.addData(datapath, branch)\n+ cleanTempRepo(tempdir) \n+\n+ cleanTempRepo(basetempdir)\n+ os.chdir(cwd)\n+\n def plotNx():\n branches = ('Nx600', 'Nx300', 'Nx150')\n datafile = os.path.join('data', 'data.h5')\n@@ -174,13 +192,13 @@ def plotCFL():\n \n def plotContour():\n # branches = ('CFL0.0125', 'CFL0.025', 'CFL0.05', 'CFL0.1', 'CFL0.2', 'CFL0.4', 'CFL0.8', 'CFL1.6')\n- branches = ('Nx600', 'Nx150')\n+ branches = ('Nx300', 'Nx150')\n # branches = ('CFL0.025', 'CFL0.05')\n datafile = os.path.join('data', 'data.h5')\n times = (0,)\n- # times = (0., 1000., 2000., 3000., 4000.)\n- # viewer = ContourViewer(times=times, branches=branches, datafile=datafile)\n- viewer = ContourViewer(times=times, branches=branches, datafile=datafile, datafiles=('data150.h5', 'data600.h5'))\n+ times = (0., 1000., 2000., 3000., 4000.)\n+ viewer = ContourViewer(times=times, branches=branches, datafile=datafile)\n+ #viewer = ContourViewer(times=times, branches=branches, datafile=datafile, datafiles=('data150.h5', 'data600.h5'))\n viewer.plot()\n \n if __name__ == '__main__':\n@@ -188,6 +206,6 @@ if __name__ == '__main__':\n # from profiler import calibrate_profiler\n # fudge = calibrate_profiler(10000)\n # profile = Profiler('profile', fudge=fudge)\n- plotCFL()\n+ plotContour()\n # profile.stop()\n ", + "path": "/home/wd15/git/extremefill/extremefill" + }, + { + "name": "fipy", + "module": "python", + "source": "/home/wd15/git/fipy", + "version": "8c51478a3e8c30618b3a96c132612a46735c7548", + "diff": "", + "path": "/home/wd15/git/fipy/fipy" + }, + { + "name": "gi", + "module": "python", + "source": "attribute", + "version": "3.4.0", + "diff": "", + "path": "/usr/lib/python2.7/dist-packages/gi" + }, + { + "name": "glib", + "module": "python", + "source": null, + "version": "unknown", + "diff": "", + "path": "/usr/lib/python2.7/dist-packages/glib" + }, + { + "name": "gobject", + "module": "python", + "source": null, + "version": "unknown", + "diff": "", + "path": "/usr/lib/python2.7/dist-packages/gobject" + }, + { + "name": "google", + "module": "python", + "source": null, + "version": "unknown", + "diff": "", + "path": "/usr/lib/python2.7/dist-packages/google" + }, + { + "name": "gtk", + "module": "python", + "source": null, + "version": "unknown", + "diff": "", + "path": "/usr/lib/python2.7/dist-packages/gtk-2.0/gtk" + }, + { + "name": "httplib2", + "module": "python", + "source": "attribute", + "version": "0.7.4", + "diff": "", + "path": "/usr/lib/python2.7/dist-packages/httplib2" + }, + { + "name": "lockfile", + "module": "python", + "source": "egg-info", + "version": "0.9.1", + "diff": "", + "path": "/home/wd15/.virtualenvs/default/lib/python2.7/site-packages/lockfile-0.9.1-py2.7.egg/lockfile" + }, + { + "name": "lxml", + "module": "python", + "source": null, + "version": "unknown", + "diff": "", + "path": "/usr/lib/python2.7/dist-packages/lxml" + }, + { + "name": "matplotlib", + "module": "python", + "source": "attribute", + "version": "1.1.1", + "diff": "", + "path": "/usr/lib/pymodules/python2.7/matplotlib" + }, + { + "name": "mayavi", + "module": "python", + "source": "attribute", + "version": "4.1.0", + "diff": "", + "path": "/usr/lib/python2.7/dist-packages/mayavi" + }, + { + "name": "mpi4py", + "module": "python", + "source": "attribute", + "version": "1.3", + "diff": "", + "path": "/usr/lib/python2.7/dist-packages/mpi4py" + }, + { + "name": "mpl_toolkits", + "module": "python", + "source": null, + "version": "unknown", + "diff": "", + "path": "/usr/lib/pymodules/python2.7/mpl_toolkits" + }, + { + "name": "mx", + "module": "python", + "source": "attribute", + "version": "3.2.1", + "diff": "", + "path": "/usr/lib/python2.7/dist-packages/mx" + }, + { + "name": "nose", + "module": "python", + "source": "attribute", + "version": "1.2.1", + "diff": "", + "path": "/home/wd15/.virtualenvs/fipy/lib/python2.7/site-packages/nose" + }, + { + "name": "numexpr", + "module": "python", + "source": "attribute", + "version": "2.0.1", + "diff": "", + "path": "/usr/lib/python2.7/dist-packages/numexpr" + }, + { + "name": "numpy", + "module": "python", + "source": "attribute", + "version": "1.6.2", + "diff": "", + "path": "/usr/lib/python2.7/dist-packages/numpy" + }, + { + "name": "pyamg", + "module": "python", + "source": "attribute", + "version": "2.0.4.dev", + "diff": "", + "path": "/home/wd15/.virtualenvs/fipy/lib/python2.7/site-packages/pyamg" + }, + { + "name": "pylsmlib", + "module": "python", + "source": "/home/wd15/git/LSMLIB", + "version": "6f5d969bb27530aa37452a8b096e538a5cf7b993", + "diff": "", + "path": "/home/wd15/git/LSMLIB/pylsmlib/pylsmlib" + }, + { + "name": "pysparse", + "module": "python", + "source": "attribute", + "version": "1.1", + "diff": "", + "path": "/usr/lib/python2.7/dist-packages/pysparse" + }, + { + "name": "pytz", + "module": "python", + "source": "attribute", + "version": "2011k", + "diff": "", + "path": "/usr/lib/python2.7/dist-packages/pytz" + }, + { + "name": "scipy", + "module": "python", + "source": "attribute", + "version": "0.10.1", + "diff": "", + "path": "/usr/lib/python2.7/dist-packages/scipy" + }, + { + "name": "setuptools", + "module": "python", + "source": "attribute", + "version": "0.6", + "diff": "", + "path": "/home/wd15/.virtualenvs/default/local/lib/python2.7/site-packages/distribute-0.6.24-py2.7.egg/setuptools" + }, + { + "name": "simplejson", + "module": "python", + "source": "attribute", + "version": "2.6.1", + "diff": "", + "path": "/usr/lib/python2.7/dist-packages/simplejson" + }, + { + "name": "skfmm", + "module": "python", + "source": "/home/wd15/git/scikit-fmm", + "version": "467e5982fbd9d4eb32495f826d6bda65da498e13", + "diff": "", + "path": "/home/wd15/git/scikit-fmm/skfmm" + }, + { + "name": "sumatra", + "module": "python", + "source": "attribute", + "version": "0.5.0dev", + "diff": "", + "path": "/home/wd15/.virtualenvs/default/lib/python2.7/site-packages/Sumatra-0.5.0dev-py2.7.egg/sumatra" + }, + { + "name": "tables", + "module": "python", + "source": "attribute", + "version": "2.3.1", + "diff": "", + "path": "/usr/lib/python2.7/dist-packages/tables" + }, + { + "name": "tagging", + "module": "python", + "source": "attribute", + "version": "0.3.1", + "diff": "", + "path": "/home/wd15/.virtualenvs/fipy/lib/python2.7/site-packages/tagging" + }, + { + "name": "tornado", + "module": "python", + "source": "attribute", + "version": "2.3", + "diff": "", + "path": "/usr/lib/python2.7/dist-packages/tornado" + }, + { + "name": "traits", + "module": "python", + "source": "attribute", + "version": "4.1.0", + "diff": "", + "path": "/usr/lib/python2.7/dist-packages/traits" + }, + { + "name": "tvtk", + "module": "python", + "source": null, + "version": "unknown", + "diff": "", + "path": "/usr/lib/python2.7/dist-packages/tvtk" + }, + { + "name": "vtk", + "module": "python", + "source": null, + "version": "unknown", + "diff": "", + "path": "/usr/lib/pymodules/python2.7/vtk" + }, + { + "name": "wx", + "module": "python", + "source": "attribute", + "version": "2.8.12.1", + "diff": "", + "path": "/usr/lib/python2.7/dist-packages/wx-2.8-gtk2-unicode/wx" + }, + { + "name": "yaml", + "module": "python", + "source": "attribute", + "version": "3.10", + "diff": "", + "path": "/usr/lib/python2.7/dist-packages/yaml" + }, + { + "name": "zmq", + "module": "python", + "source": "attribute", + "version": "2.2.0", + "diff": "", + "path": "/usr/lib/python2.7/dist-packages/zmq" + } + ], + "user": "Daniel Wheeler ", + "output_data": [ + { + "path": "data.h5", + "digest": "4e67045c7485288a01107a123021ae0e93417e1a", + "metadata": { + "mimetype": null, + "size": 102992, + "encoding": null + } + } + ], + "input_data": [], + "launch_mode": { + "type": "SerialLaunchMode", + "parameters": { + "working_directory": "/home/wd15/git/extremefill-data" + } + }, + "main_file": "script.py", + "outcome": "" +}, +{ + "script_arguments": "", + "platforms": [ + { + "system_name": "Linux", + "machine": "x86_64", + "version": "#35-Ubuntu SMP Thu Jan 24 13:15:40 UTC 2013", + "ip_addr": "127.0.0.1", + "architecture_bits": "64bit", + "architecture_linkage": "ELF", + "release": "3.5.0-23-generic", + "network_name": "loki", + "processor": "x86_64" + } + ], + "duration": 4.890116214752197, + "diff": "", + "datastore": { + "type": "FileSystemDataStore", + "parameters": { + "root": "./Data/94115fce6a7a" + } + }, + "input_datastore": { + "type": "FileSystemDataStore", + "parameters": { + "root": "/" + } + }, + "executable": { + "path": "/home/wd15/.virtualenvs/default/bin/python", + "version": "2.7.3", + "name": "Python", + "options": "" + }, + "parameters": { + "content": "totalSteps = 1\ndatadir = \"./Data/94115fce6a7a\"", + "type": "SimpleParameterSet" + }, + "label": "94115fce6a7a", + "version": "dbe0f00a15307cd92b19e14677d61097315669fb", + "stdout_stderr": "['[ 1. 1. 1. 1.]', '\\n', '[ 0.34738209 0.61535499 0.01923836 0.00971058]', '\\n', '[ 1.23729704e-01 2.14204081e-01 1.88311438e-04 1.55991524e-03]', '\\n', '\\n', 'theta', ' ', '0.0', '\\n', 'cBar_supp', ' ', '1.0', '\\n', 'cBar_cu', ' ', '1.0', '\\n', 'potentialBar', ' ', '1.0', '\\n', 'min(extension)', ' ', '7.22965473284e-08', '\\n', 'min(depositionRate)', ' ', '2.09114908795e-09', '\\n', 'min(current)', ' ', '56.8350759862', '\\n', 'min(cupric)', ' ', '997.266139623', '\\n', 'min(baseCurrent)', ' ', '56.9323002935', '\\n', 'max(interfaceTheta) - 1:', ' ', '-0.973021297371', '\\n', 'min(interfaceTheta)', ' ', '0.0', '\\n', 'min(I0)', ' ', '38.9208518948', '\\n', 'dt', ' ', '0.011', '\\n', 'elapsed time', ' ', '0.0', '\\n', 'step', ' ', '0', '\\n', '\\n']", + "repository": { + "url": "/home/wd15/git/extremefill-data", + "type": "GitRepository", + "upstream": "git@github.com:wd15/extremefill-data.git" + }, + "tags": [ + "test" + ], + "timestamp": "2013-02-15 21:32:44", + "reason": "testing decorator", + "dependencies": [ + { + "name": "Cython", + "module": "python", + "source": "attribute", + "version": "0.16", + "diff": "", + "path": "/usr/lib/python2.7/dist-packages/Cython" + }, + { + "name": "IPython", + "module": "python", + "source": "attribute", + "version": "0.13.1.rc2", + "diff": "", + "path": "/usr/lib/python2.7/dist-packages/IPython" + }, + { + "name": "PIL", + "module": "python", + "source": null, + "version": "unknown", + "diff": "", + "path": "/usr/lib/python2.7/dist-packages/PIL" + }, + { + "name": "PyQt4", + "module": "python", + "source": null, + "version": "unknown", + "diff": "", + "path": "/usr/lib/python2.7/dist-packages/PyQt4" + }, + { + "name": "PyTrilinos", + "module": "python", + "source": "attribute", + "version": "4.8d", + "diff": "", + "path": "/home/wd15/.virtualenvs/fipy/lib/python2.7/site-packages/PyTrilinos" + }, + { + "name": "dateutil", + "module": "python", + "source": "attribute", + "version": "1.5", + "diff": "", + "path": "/usr/lib/python2.7/dist-packages/dateutil" + }, + { + "name": "distutils", + "module": "python", + "source": "attribute", + "version": "2.7.3", + "diff": "", + "path": "/home/wd15/.virtualenvs/default/lib/python2.7/distutils" + }, + { + "name": "django", + "module": "python", + "source": "attribute", + "version": "1.4.1", + "diff": "", + "path": "/usr/lib/python2.7/dist-packages/django" + }, + { + "name": "docutils", + "module": "python", + "source": "attribute", + "version": "0.10", + "diff": "", + "path": "/home/wd15/.virtualenvs/fipy/lib/python2.7/site-packages/docutils" + }, + { + "name": "encodings", + "module": "python", + "source": null, + "version": "unknown", + "diff": "", + "path": "/home/wd15/.virtualenvs/default/lib/python2.7/encodings" + }, + { + "name": "extremefill", + "module": "python", + "source": "/home/wd15/git/extremefill", + "version": "549c969edb113d0b3e9804612bfa53e91319c0ea", + "diff": "diff --git a/data/viewer.py b/data/viewer.py\nindex 68f60e0..d9ab7c2 100644\n--- a/data/viewer.py\n+++ b/data/viewer.py\n@@ -122,7 +122,7 @@ class ContourViewer(BaseViewer):\n self.times = times\n self.contours = contours\n self.data = []\n- super(ContourViewer, self).__init__(branches=branches, datafile=datafiles, datafiles=datafiles)\n+ super(ContourViewer, self).__init__(branches=branches, datafile=datafile, datafiles=datafiles)\n \n def plot(self):\n import matplotlib.pyplot as plt\n@@ -152,6 +152,24 @@ class ContourViewer(BaseViewer):\n phi = np.reshape(phi, shape)\n self.data.append((x, y, phi))\n \n+def datafilesFromBranches(branches, datafile):\n+ cwd = os.getcwd()\n+ for count, branch in enumerate(branches):\n+ print 'branch',branch\n+ tempdir = gitCloneToTemp(branch=branch, repositoryPath='ssh://wd15@genie.nist.gov/users/wd15/git/extremefill')\n+ repopath = os.path.join(tempdir, 'extremefill')\n+ datapath = os.path.join(repopath, datafile)\n+ gitMediaSync()\n+ if count == 0:\n+ self.addBaseData(datapath)\n+ basetempdir = tempdir\n+ else:\n+ self.addData(datapath, branch)\n+ cleanTempRepo(tempdir) \n+\n+ cleanTempRepo(basetempdir)\n+ os.chdir(cwd)\n+\n def plotNx():\n branches = ('Nx600', 'Nx300', 'Nx150')\n datafile = os.path.join('data', 'data.h5')\n@@ -174,13 +192,13 @@ def plotCFL():\n \n def plotContour():\n # branches = ('CFL0.0125', 'CFL0.025', 'CFL0.05', 'CFL0.1', 'CFL0.2', 'CFL0.4', 'CFL0.8', 'CFL1.6')\n- branches = ('Nx600', 'Nx150')\n+ branches = ('Nx300', 'Nx150')\n # branches = ('CFL0.025', 'CFL0.05')\n datafile = os.path.join('data', 'data.h5')\n times = (0,)\n- # times = (0., 1000., 2000., 3000., 4000.)\n- # viewer = ContourViewer(times=times, branches=branches, datafile=datafile)\n- viewer = ContourViewer(times=times, branches=branches, datafile=datafile, datafiles=('data150.h5', 'data600.h5'))\n+ times = (0., 1000., 2000., 3000., 4000.)\n+ viewer = ContourViewer(times=times, branches=branches, datafile=datafile)\n+ #viewer = ContourViewer(times=times, branches=branches, datafile=datafile, datafiles=('data150.h5', 'data600.h5'))\n viewer.plot()\n \n if __name__ == '__main__':\n@@ -188,6 +206,6 @@ if __name__ == '__main__':\n # from profiler import calibrate_profiler\n # fudge = calibrate_profiler(10000)\n # profile = Profiler('profile', fudge=fudge)\n- plotCFL()\n+ plotContour()\n # profile.stop()\n ", + "path": "/home/wd15/git/extremefill/extremefill" + }, + { + "name": "fipy", + "module": "python", + "source": "/home/wd15/git/fipy", + "version": "8c51478a3e8c30618b3a96c132612a46735c7548", + "diff": "", + "path": "/home/wd15/git/fipy/fipy" + }, + { + "name": "gi", + "module": "python", + "source": "attribute", + "version": "3.4.0", + "diff": "", + "path": "/usr/lib/python2.7/dist-packages/gi" + }, + { + "name": "glib", + "module": "python", + "source": null, + "version": "unknown", + "diff": "", + "path": "/usr/lib/python2.7/dist-packages/glib" + }, + { + "name": "gobject", + "module": "python", + "source": null, + "version": "unknown", + "diff": "", + "path": "/usr/lib/python2.7/dist-packages/gobject" + }, + { + "name": "google", + "module": "python", + "source": null, + "version": "unknown", + "diff": "", + "path": "/usr/lib/python2.7/dist-packages/google" + }, + { + "name": "gtk", + "module": "python", + "source": null, + "version": "unknown", + "diff": "", + "path": "/usr/lib/python2.7/dist-packages/gtk-2.0/gtk" + }, + { + "name": "httplib2", + "module": "python", + "source": "attribute", + "version": "0.7.4", + "diff": "", + "path": "/usr/lib/python2.7/dist-packages/httplib2" + }, + { + "name": "lockfile", + "module": "python", + "source": "egg-info", + "version": "0.9.1", + "diff": "", + "path": "/home/wd15/.virtualenvs/default/lib/python2.7/site-packages/lockfile-0.9.1-py2.7.egg/lockfile" + }, + { + "name": "lxml", + "module": "python", + "source": null, + "version": "unknown", + "diff": "", + "path": "/usr/lib/python2.7/dist-packages/lxml" + }, + { + "name": "matplotlib", + "module": "python", + "source": "attribute", + "version": "1.1.1", + "diff": "", + "path": "/usr/lib/pymodules/python2.7/matplotlib" + }, + { + "name": "mayavi", + "module": "python", + "source": "attribute", + "version": "4.1.0", + "diff": "", + "path": "/usr/lib/python2.7/dist-packages/mayavi" + }, + { + "name": "mpi4py", + "module": "python", + "source": "attribute", + "version": "1.3", + "diff": "", + "path": "/usr/lib/python2.7/dist-packages/mpi4py" + }, + { + "name": "mpl_toolkits", + "module": "python", + "source": null, + "version": "unknown", + "diff": "", + "path": "/usr/lib/pymodules/python2.7/mpl_toolkits" + }, + { + "name": "mx", + "module": "python", + "source": "attribute", + "version": "3.2.1", + "diff": "", + "path": "/usr/lib/python2.7/dist-packages/mx" + }, + { + "name": "nose", + "module": "python", + "source": "attribute", + "version": "1.2.1", + "diff": "", + "path": "/home/wd15/.virtualenvs/fipy/lib/python2.7/site-packages/nose" + }, + { + "name": "numexpr", + "module": "python", + "source": "attribute", + "version": "2.0.1", + "diff": "", + "path": "/usr/lib/python2.7/dist-packages/numexpr" + }, + { + "name": "numpy", + "module": "python", + "source": "attribute", + "version": "1.6.2", + "diff": "", + "path": "/usr/lib/python2.7/dist-packages/numpy" + }, + { + "name": "pyamg", + "module": "python", + "source": "attribute", + "version": "2.0.4.dev", + "diff": "", + "path": "/home/wd15/.virtualenvs/fipy/lib/python2.7/site-packages/pyamg" + }, + { + "name": "pylsmlib", + "module": "python", + "source": "/home/wd15/git/LSMLIB", + "version": "6f5d969bb27530aa37452a8b096e538a5cf7b993", + "diff": "", + "path": "/home/wd15/git/LSMLIB/pylsmlib/pylsmlib" + }, + { + "name": "pysparse", + "module": "python", + "source": "attribute", + "version": "1.1", + "diff": "", + "path": "/usr/lib/python2.7/dist-packages/pysparse" + }, + { + "name": "pytz", + "module": "python", + "source": "attribute", + "version": "2011k", + "diff": "", + "path": "/usr/lib/python2.7/dist-packages/pytz" + }, + { + "name": "scipy", + "module": "python", + "source": "attribute", + "version": "0.10.1", + "diff": "", + "path": "/usr/lib/python2.7/dist-packages/scipy" + }, + { + "name": "setuptools", + "module": "python", + "source": "attribute", + "version": "0.6", + "diff": "", + "path": "/home/wd15/.virtualenvs/default/local/lib/python2.7/site-packages/distribute-0.6.24-py2.7.egg/setuptools" + }, + { + "name": "simplejson", + "module": "python", + "source": "attribute", + "version": "2.6.1", + "diff": "", + "path": "/usr/lib/python2.7/dist-packages/simplejson" + }, + { + "name": "skfmm", + "module": "python", + "source": "/home/wd15/git/scikit-fmm", + "version": "467e5982fbd9d4eb32495f826d6bda65da498e13", + "diff": "", + "path": "/home/wd15/git/scikit-fmm/skfmm" + }, + { + "name": "sumatra", + "module": "python", + "source": "attribute", + "version": "0.5.0dev", + "diff": "", + "path": "/home/wd15/.virtualenvs/default/lib/python2.7/site-packages/Sumatra-0.5.0dev-py2.7.egg/sumatra" + }, + { + "name": "tables", + "module": "python", + "source": "attribute", + "version": "2.3.1", + "diff": "", + "path": "/usr/lib/python2.7/dist-packages/tables" + }, + { + "name": "tagging", + "module": "python", + "source": "attribute", + "version": "0.3.1", + "diff": "", + "path": "/home/wd15/.virtualenvs/fipy/lib/python2.7/site-packages/tagging" + }, + { + "name": "tornado", + "module": "python", + "source": "attribute", + "version": "2.3", + "diff": "", + "path": "/usr/lib/python2.7/dist-packages/tornado" + }, + { + "name": "traits", + "module": "python", + "source": "attribute", + "version": "4.1.0", + "diff": "", + "path": "/usr/lib/python2.7/dist-packages/traits" + }, + { + "name": "tvtk", + "module": "python", + "source": null, + "version": "unknown", + "diff": "", + "path": "/usr/lib/python2.7/dist-packages/tvtk" + }, + { + "name": "vtk", + "module": "python", + "source": null, + "version": "unknown", + "diff": "", + "path": "/usr/lib/pymodules/python2.7/vtk" + }, + { + "name": "wx", + "module": "python", + "source": "attribute", + "version": "2.8.12.1", + "diff": "", + "path": "/usr/lib/python2.7/dist-packages/wx-2.8-gtk2-unicode/wx" + }, + { + "name": "yaml", + "module": "python", + "source": "attribute", + "version": "3.10", + "diff": "", + "path": "/usr/lib/python2.7/dist-packages/yaml" + }, + { + "name": "zmq", + "module": "python", + "source": "attribute", + "version": "2.2.0", + "diff": "", + "path": "/usr/lib/python2.7/dist-packages/zmq" + } + ], + "user": "Daniel Wheeler ", + "output_data": [ + { + "path": "data.h5", + "digest": "c334bd859bd29710e6099ac2a7abe2197f9aeb91", + "metadata": { + "mimetype": null, + "size": 102992, + "encoding": null + } + } + ], + "input_data": [], + "launch_mode": { + "type": "SerialLaunchMode", + "parameters": { + "working_directory": "/home/wd15/git/extremefill-data" + } + }, + "main_file": "script.py", + "outcome": "" +}] diff --git a/ddsmdb/data/zero.json b/ddsmdb/data/zero.json index e69de29..9e1b78b 100644 --- a/ddsmdb/data/zero.json +++ b/ddsmdb/data/zero.json @@ -0,0 +1,4 @@ +[ + {'a' : 1}, + {'b' : 2} +] diff --git a/ddsmdb/dbhandler.py b/ddsmdb/dbhandler.py new file mode 100644 index 0000000..21736e6 --- /dev/null +++ b/ddsmdb/dbhandler.py @@ -0,0 +1,103 @@ +import subprocess +import pymongo +import os +import time + +class DBHandler(object): + """ + Class to start up and shutdown the database. The class also can + add data for test purposes. It is used as by the dbhandler.py + script and the test suite. It can fire up a database instance on + the current host, but also connect to an exisisting database. + + Start up the Mongo deamon and create a connection. + + >>> from test import config + >>> testport = config.MONGODB_SETTINGS['port'] + >>> dbname = config.MONGODB_SETTINGS['db'] + >>> handler = DBHandler(port=testport, verbose=False) + + Create a new database, check that it exists, delete it and + shutdown the daemon. + + >>> handler.create(dbname) + >>> assert dbname in handler.info() + + Add some data to the database. + + >>> handler.set_data(dbname, {'my data' : 1}) + >>> assert handler.get_data(dbname)[0]['my data'] == 1 + + """ + def __init__(self, port=None, dbpath=None, host=None, launch=True, verbose=False): + if not dbpath: + dbpath = os.getenv("MONGO_DBPATH", None) + if launch: + self.launch(port=port, dbpath=dbpath, verbose=verbose) + if host is None: + host = 'localhost' + for count in range(4, 0, -1): + try: + self.client = pymongo.MongoClient(host, port) + except pymongo.errors.ConnectionFailure: + if count == 1: + raise + time.sleep(5) + else: + break + + self.dbpath = dbpath + self.verbose = verbose + + def launch(self, port=None, dbpath=None, verbose=False): + command = ['mongod'] + if dbpath: + command.append('--dbpath') + command.append(dbpath) + if port: + command.append('--port') + command.append(str(port)) + if verbose: + stdout = None + else: + stdout = open(os.devnull, 'w') + subprocess.Popen(command, stdout=stdout) + + def create(self, dbname): + db = self.client[dbname] + self.delete(dbname) + db = self.client[dbname] + collection = db.test + collection.insert({}) + collection.drop() + + def info(self): + return self.client.database_names() + + def delete(self, dbname): + self.client.drop_database(dbname) + + def set_data(self, dbname, data): + db = self.client[dbname] + collection = db.test + collection.drop() + collection = db.test + collection.insert(data) + + def get_data(self, dbname): + db = self.client[dbname] + return list(db.test.find()) + + def shutdown(self): + command = ['mongod'] + command.append('--shutdown') + if self.dbpath: + command.append('--dbpath') + command.append(self.dbpath) + if self.verbose: + stdout = None + else: + stdout = open(os.devnull, 'w') + subprocess.Popen(command, stdout=stdout) + + diff --git a/ddsmdb/test/integrate.py b/ddsmdb/test/config.py similarity index 79% rename from ddsmdb/test/integrate.py rename to ddsmdb/test/config.py index 3245a8c..bcba4a3 100644 --- a/ddsmdb/test/integrate.py +++ b/ddsmdb/test/config.py @@ -6,14 +6,14 @@ DEBUG = True TESTING = True -LIVESERVER_PORT = 5000 +LIVESERVER_PORT = 5200 APP_TITLE = 'Data Driven Simulation Management Database' VERSION = '0.1-dev' MONGODB_SETTINGS = { - 'db': 'ddsm-integrate', + 'db': 'ddsm-test', 'host': 'localhost', - 'port': 27017 -} \ No newline at end of file + 'port': 27018 +} diff --git a/ddsmdb/test/test_backend.py b/ddsmdb/test/test_backend.py index 4a51455..1a4f01c 100644 --- a/ddsmdb/test/test_backend.py +++ b/ddsmdb/test/test_backend.py @@ -1,22 +1,15 @@ from ddsmdb.common.core import setup_app -from flask.ext.testing import LiveServerTestCase -import twill - -class DatabaseTest(LiveServerTestCase): +from ddsmdb.dbhandler import DBHandler +from flask.ext.testing import TestCase +from flask.ext.testing import Twill +import config +class DatabaseTest(TestCase): def create_app(self): - try: - browser = twill.get_browser() - browser.go("http://localhost:5200/") - app = setup_app(__name__, 'ddsmdb.test.integrate') - app.config['LIVESERVER_PORT'] = 5210 - app.config['TESTING'] = True - app.config['MONGODB_SETTINGS'] = {'db': 'ddsm-integrate','host': 'localhost','port': 27017} - except: - app = setup_app(__name__, 'ddsmdb.test.integrate') - app.config['LIVESERVER_PORT'] = 5200 - app.config['TESTING'] = True - app.config['MONGODB_SETTINGS'] = {'db': 'ddsm-integrate','host': 'localhost','port': 27017} + testport = config.MONGODB_SETTINGS['port'] + testhost = config.MONGODB_SETTINGS['host'] + self.handler = DBHandler(port=testport, host=testhost) + app = setup_app(__name__, 'ddsmdb.test.config') return app def setUp(self): @@ -24,14 +17,18 @@ def setUp(self): print "Supposed to setup the testcase." print "Which probably means to push some testing records in the database." - def test_Database(self): - - print "This is a test to check that the api endpoints are working properly." - browser = twill.get_browser() - browser.go("http://localhost:27017/") - self.assertTrue(browser.get_code() in (200, 201)) + def test_db(self): + """ + Test that the database endpoints are available. + """ + t = Twill(self.app, host='localhost', port=27018) + t.browser.go(t.url("/")) + self.assertTrue(t.browser.get_code() in (200, 201)) def tearDown(self): + dbname = config.MONGODB_SETTINGS['db'] + self.handler.delete(dbname) + self.handler.client.close() del self.app - print "Supposed to tear down the testcase." - print "Which most likely means to clear the database of all records." \ No newline at end of file + + diff --git a/ddsmdb/test/test_dbhandler.py b/ddsmdb/test/test_dbhandler.py new file mode 100644 index 0000000..8164579 --- /dev/null +++ b/ddsmdb/test/test_dbhandler.py @@ -0,0 +1,30 @@ +import os +from ddsmdb.dbhandler import DBHandler +import json +from . import config + + +def test(): + """ + Load a small json file and then check that the data is in the + database. The test needs the check that a JSON object that is a + list is read into the database correctly and extracted correctly. + """ + + + base = os.path.split(__file__)[0] + filepath = os.path.join(base, os.pardir, 'data', 'test.json') + with open(filepath, 'r') as f: + data = json.load(f) + + testport = config.MONGODB_SETTINGS['port'] + dbname = config.MONGODB_SETTINGS['db'] + + handler = DBHandler(port=testport, verbose=False) + + handler.create(dbname) + handler.set_data(dbname, data) + new_data = handler.get_data(dbname) + + + assert data == new_data diff --git a/ddsmdb/test/test_mongodb.py b/ddsmdb/test/test_mongodb.py deleted file mode 100644 index 1f752e9..0000000 --- a/ddsmdb/test/test_mongodb.py +++ /dev/null @@ -1,52 +0,0 @@ -from pymongo import MongoClient -from ddsmdb.common.core import setup_app -from flask.ext.testing import TestCase -import time -import twill - -class MongodbTest(TestCase): - - def create_app(self): - try: - browser = twill.get_browser() - browser.go("http://localhost:5200/") - app = setup_app(__name__, 'ddsmdb.test.integrate') - app.config['LIVESERVER_PORT'] = 5210 - app.config['TESTING'] = True - app.config['MONGODB_SETTINGS'] = {'db': 'ddsm-integrate','host': 'localhost','port': 27017} - except: - app = setup_app(__name__, 'ddsmdb.test.integrate') - app.config['LIVESERVER_PORT'] = 5200 - app.config['TESTING'] = True - app.config['MONGODB_SETTINGS'] = {'db': 'ddsm-integrate','host': 'localhost','port': 27017} - return app - - def setUp(self): - self.client = MongoClient('localhost', 27017) - self.db = self.client['ddsm-integrate'] - self.user_collection = self.db['usermodel'] - self.project_collection = self.db['projectmodel'] - self.record_collection = self.db['recordmodel'] - # Put some dummy things in the db. - print "Supposed to setup the testcase." - print "Which probably means to push some testing records in the database." - - def test_Mongodb(self): - - print "This is a test to check that the api endpoints are working properly." - # time.sleep(30) - browser = twill.get_browser() - browser.go("http://localhost:27017/") - self.assertTrue(browser.get_code() in (200, 201)) - - def test_MongodbRest(self): - - print "This is a test to check that the api endpoints are working properly." - # time.sleep(30) - browser = twill.get_browser() - browser.go("http://localhost:28017/") - self.assertTrue(browser.get_code() in (200, 201)) - - def tearDown(self): - print "Supposed to tear down the testcase." - print "Which most likely means to clear the database of all records." \ No newline at end of file