Conduit - LLNL-Collaboration/uiuc2015 GitHub Wiki

Project Repository

Motivation

Conduit provides a hierarchical model for describing scientific data that is being incorporated into several aspects of next generation high performance computing (HPC) workflows at LLNL. We will use the tests in the Conduit source tree (described below) to provide a mock HPC application that produces data that we can then visualize or interact with from a web browser.

Summary of Main Tasks

  • Compile and get Conduit up and running
  • Run the two examples to verify that the embedded web server is working
  • Work on mocking up the Lorenz connection
    • Set up simple web server
    • Students write a small library that is called from Conduit example to open secure connection to the stand-in server
    • Allow web browser or IPython to connect to server and interact with Conduit example
  • Once OpenLorenz is up and running, move the connection to that framework

Getting Started Building Conduit

The best resource for getting up and running with Conduit is the documentation hosted on Github, here is a link to the "how to build" section.

If you run into issues building Conduit, contact Cyrus.

Conduit I/O Web Unit Test Examples

Conduit includes unit tests that exercise two ways to display info from Conduit "nodes" to a web browser.

The functionality tested in these examples lives in the "conduit_io" library and uses civetweb as an embedded webserver. The "conduit_io" library is built with these features enabled by default. After building Conduit, here are the two examples you should verify are working:

Conduit Test #1

The first example uses D3 and a restful API to provide an interactive viewer of the structure and contents of a Conduit node. You can find the source for this example here or in your git checkout at conduit/src/tests/conduit_io/conduit_io_rest.cpp.

To run, use the following command inside "build-debug": ./tests/conduit_io/conduit_io_rest launch. You should see output similar to the following:

[==========] Running 1 test from 1 test case.
[----------] Global test environment set-up.
[----------] 1 test from conduit_io_rest
[ RUN      ] conduit_io_rest.rest_server
[/Users/harrison37/Work/conduit/src/libs/conduit_io/conduit_web.cpp : 667]
 Starting WebServer instance with doc root = /Users/harrison37/Work/conduit/src/libs/conduit_io/web_clients/rest_client
[/Users/harrison37/Work/conduit/src/libs/conduit_io/conduit_web.cpp : 695]
 conduit::io::WebServer instance active on port: 8080

You can then open your web browser to "http://localhost:8080" and view the interface. If you are interested, you can find the front-end html and javascript code here.

Conduit Test #2

The second example streams messages to a web browser using WebSockets. In the example, a png image is base64-encoded and sent for display in the browser. You can find the source for this example here or in your git checkout at conduit/src/tests/conduit_io/conduit_io_websocket.cpp.

To run, use the following command inside "build-debug": ./tests/conduit_io/conduit_io_websocket launch. You should see output similar to the following:

[==========] Running 1 test from 1 test case.
[----------] Global test environment set-up.
[----------] 1 test from conduit_io_websocket
[ RUN ] conduit_io_websocket.websocket_test
[/Users/harrison37/Work/conduit/src/tests/conduit_io/conduit_io_websocket.cpp : 79]
png path:/Users/harrison37/Work/conduit/src/libs/conduit_io/web_clients/wsock_test/example.png
[/Users/harrison37/Work/conduit/src/libs/conduit_io/conduit_web.cpp : 667]
Starting WebServer instance with doc root = /Users/harrison37/Work/conduit/src/libs/conduit_io/web_clients/wsock_test
[/Users/harrison37/Work/conduit/src/libs/conduit_io/conduit_web.cpp : 695]
conduit::io::WebServer instance active on port: 8081

You can then open your web browser to "http://localhost:8081" and view the data as it streams from the process. If you are interested, you can find the front-end html and javascript code here.