Random Eclipse Questions

Isn’t Eclipse really hard to use?

No.

Why won’t my generated EMF Model Editor let me add children!?

If you have a model where one element should have children and the generated editor won’t let you add children, make sure that the “Containment” box is checked in the properties view for the association (the arrow) between the two elements. emfContainment

Here’s a link to a good, working model from Lar Vogel’s tutorial on EMF. I missed his containment remark in his text, but I found it in his ECore model:

https://github.com/vogellacompany/vogella/blob/master/de.vogella.emf.webpage.model/model/webpage.ecore

How do I set the base package name of my EMF model?

One of the things I hate about EMF is that it has options for everything, but hides them in crazy places. I should be able to set the package name just by changing the package name! The solution is simple enough, but just took me a bit to figure out. Open your genmodel, select your package, open the “All” section in its properties and set the package name to what you want.

emfBasePackageName

Advertisements

Eclipse ICE news + EAVP! – 20160327

Happy Easter!

I logged on for a couple of minutes to make some tweaks to my article on my paternal family history and I thought I might take a few minutes to update you on what’s happening in my slice of the Eclipse World.

Eclipse ICE is going well. I just returned from a trip to SOS20 where I had the opportunity to present on ICE, Triquetrum and several other Science Working Group projects during the Workflows Session. There was very good feedback overall and I am looking forward to collaborating with everyone from the conference. What I enjoyed best was the sense of a shared vision and a strong desire to enable multiple tool stacks that are unified through common data management and provenance models.

We have a new project with ICE starting up as part of the Department of Energy’s High Performance Computing for Advanced Manufacturing (HPC4Mfg) program out of the Advanced Manufacturing Office. My team and I will be joining forces with the Awesim team from OSC to create a new high-performance version of their Weld Predictor App. Part of this work will include deploying ICE for mesh generation and editing. ICE might see a little time in the post-processing side of things, and, of course, we will use ICE for all of the code development work on the ORNL side.

I’m also happy to announce that the Eclipse Advanced Visualization Project (EAVP) is now fully decoupled from ICE and available on its own GitHub project. This project is all about developing advanced, high performance visualization technology under the banner of the Science Working Group.

More as I know it!

Coming to an EclipseCon 2016 near you: Science!

I’m pretty psyched about EclipseCon 2016 in North America, which is happening March 7-10 in Reston VA (more info on the conference page). It was my distinct privilege to serve on the Program Committee this year, especially with such an awesome group of committee members. We worked really hard to put together an awesome program, but what has me most excited this year is all the Science! 😀

The Eclipse Foundation is home to the Science Working Group and this year the group is coming out in force at EclipseCon. Following on the success of the “Science Track” at EclipseCon Europe in November 2015, we decided to have a track at EclipseCon North America too. This works much better for the working group than a dedicated day of talks because we scientists won’t spend a whole day in our own room missing the rest of the conference.

The Science track covers tooling for scientific workbenches, performing data analysis, visualization, modeling in a scientific field and really any science-related topic. We have 11 standard talks and one tutorial at EclipseCon 2016. This is in addition to all the normal shenanigans, like cool stickers (courtesy Tim Jagenberg),

800px-ScienceSh--

and failed experiments mixing coffee, ice cream and beer,

jay_labCoat1

The full list of talks is available on the Session Page. While I’m very excited for all of the talks, here are the three that I want to see the most:

  • Eclipse Tooling in Julia, Tobias Verbeke – I’m excited about this talk because I tried to use Julia a few months back, but got turned off by the lack of tooling. Tobias’ company, Open Analytics NV, developed some very snazzy tools for working with R, so I can’t wait to see what they have for Julia. For those who don’t know, Julia is a language for high-performance numerical and scientific computing.
  • How computers have broken science (and how we can fix it), Greg Watson – This talk is focusing on a subject near and dear to my heart… er… PhD thesis: Simulation Lifecycle Management. Greg and I have talked about this for awhile now, so I’m interested to see his take on it and what he thinks about how the Eclipse Platform can become *the* SLM tool.
  • Multi-Mission Operations and Planning, Regent L Acheveque – I’m an astrophysicist and this talk on Symphony combines Eclipse and outer space. How can I resist? Even if I didn’t know about Symphony from a great lunch time discussion with Regent last year, space plus Eclipse is totally irresistible to me.

The single tutorial from Science this year is on Eclipse ICE, (which is a project that I lead). This is ICE’s first “big” tutorial and it should cover most of what there is to learn about working with Eclipse for scientific computing. It includes tutorial information for ICE, the Parallel Tools Platform and the Eclipse Advanced Visualization Project.

The Science Working Group has several other things planned for the conference this year, including our Annual Meeting where we will discuss the state of the group and where the group’s Steering Committee will elect its officers for next year. The group is completely open to everyone, so if you want to join us for any of this additional stuff then please do.

I hope this post excites you about the Science talks at Eclipse Con 2016 and that I get to see you in Reston in March! If you have any questions or comments, please send them my way on Twitter to @jayjaybillings or to @EclipseScience for the whole community.

Launching Eclipse in a Browser with the GTK Broadway backend

I recently published a video on my YouTube page showing what Eclipse looks like in a web browser when launched with the GTK Broadway backend on Linux. That video is embedded below and this article is meant to provide some more details on how you can run this on your own machine. The discussion below assumes that you have some familiarity with both Eclipse and the command line.

Special Thanks

I want to say thanks to my colleagues at Red Hat – Sopot Cela, Alexander Kurtakov and Eric Williams – who helped me do this. They are the experts and I’m just a guy with a video camera and a keyboard! 😉

Configuration

I used an up-to-date install of Fedora 23 that was running the latest version of GTK 3, KDE 5 and Firefox. Only the most recent versions of Eclipse will work for this, so make sure that you have the Neon M4a build (RCP or RAP developers version) or something more recent, like a nightly build (with Plugin Development Tools installed).

There may be some issues with this on the latest version of KDE. As you will see in the screenshots below, the menu and file bar didn’t render at all on my machine, but both rendered fine for Alex Kurtakov.

Running Broadway

You need to manually launch the Broadway server. You should also pick the port offset on which you want Broadway to run. By default it will launch on port 8080, so if you want it run on port 8085 use “:5” for the port offset. You can then launch Broadway with the following command at the prompt:

$ broadwayd :5

You should get a message that it is listening on a port that looks like this:

broadwayTerminal

Launching Eclipse on Broadway from Eclipse

The best way to launch Eclipse on Broadway is to actually use Eclipse! This is pretty straightforward since Eclipse can launch itself through its own run configurations menu if the Plugin Development Tools are installed. The important reason for launching Eclipse from Eclipse is so that you can get all the error logs and launch it in debug mode if necessary.

Open the run configuration menu, select the “Eclipse Application” section on the left with the Eclipse logo next to it. Above the search bar that says “type filter text” you will see a small icon that looks like a piece of white paper with a golden plus (+) sign on it. Click this to create a new Eclipse Application Run Configuration. The only thing left to do now is to edit the environment variables for your run configuration. See the picture below for a reference on how this should look and make sure that BROADWAY_DISPLAY=:5 (or whatever your port offset is) and GDK_BACKEND=broadway.

broadwayRunConfiguration

After that, just click “Apply” and “Run” and you’re off to the races! You can view Eclipse in your browser by going to http://localhost:8085 if your port offset is :5 and 8080 + your port offset if it is something else.

Here are a couple additional pics from Alex showing what it currently looks like in the latest nightly for the SWT devs.

Helping Out

I think this is a pretty cool way to use Eclipse and we are actively pursuing it at ORNL for use with Eclipse ICE and our internal cloud infrastructure, CADES. The Red Hat crew is working hard to get SWT up to snuff for Wayland. If you want to help out, just join in! The main bug for tracking SWT support for Wayland is on Bugzilla and it includes links to the smaller bugs on which it depends. We also hope that there are some brave souls out there that would be willing to try this on Windows with the latest win32 GTK build.

I hope you enjoyed this article and the video. Please send your questions or comments to me on Twitter where my handle is @jayjaybillings and please subscribe.

For more information, you might also checkout Eric Williams’ blog on Eclipse on Wayland.

The brand new Neutron Reflectivity Simulator in Eclipse ICE and what it took to make it

I’m really excited about one of the newest capabilities that we have added to Eclipse ICE: a neutron reflectivity simulator!

ICE's new Neutron Reflectivity Calculator showing the material table and the output plots.
ICE’s new Neutron Reflectivity Calculator showing the material table and the output plots.

About a year ago a colleague of mine, Bobby Sumpter, got in touch with me and told me that some of our other colleagues needed a hand porting an Excel-based neutron reflectivity calculator to ICE. The author of that code, John Ankner, and I sat down with the rest of our colleagues sometime later and then the real truth came out. Not only was their code implemented in Excel, but it was using a fair amount of Visual Basic on the back end!

Challenge accepted, which in retrospect was not the best idea when also running six other projects and working on a PhD, but it was pretty awesome. It just looked so cool and I really wanted to see how “Excel-like” we could make Eclipse ICE while keeping our cross-platform mandate (read: no cheating by hooking up COM in the Workbench).

I am going to walk you through this new capability and provide you with some links for more information. Let me take a step back first and give you a brief description of neutron reflectivity and why we care about it. Wikipedia can provide you more of the gory details, but essentially neutron reflectivity, (or sometimes neutron reflectometry), is the practice of bouncing neutrons off of thin films of materials and measuring how they scatter. The pattern that results tells you about the structure of the thin films. It is the materials science equivalent of subatomic bowling (although the bowling ball is actually a wave) and in practice requires massive facilities like ORNL’s Spallation Neutron Source.

ORNL's Spallation Neutron Source
ORNL’s Spallation Neutron Source

Such big facilities are required because the amount of neutrons required is a “the more the merrier” type thing: the more neutrons you have, the quicker you can get the reflectivity information you need. Neutrons are rather ideal for this work because they are electrically neutral and will not be deflected by electromagnetic properties of the thin films.

In addition to a worksheet to calculate the reflectivity, the spreadsheet also had a dedicated materials database, a stoichiometry calculator and other capabilities built into it. Our goal when doing the port was to make sure we brought all of these capabilities to the workbench, but to do it in a way that also took advantage of the workbench. Here’s what we had to do:

  • Port the reflectivity calculator from Visual Basic in Excel to Java.
  • Create a new materials database, built right into the Eclipse Platform, that is universally accessible.
  • Create a stoichiometry calculator.
  • Embed plots in Eclipse Forms, right next to the tables.

At the same time, there were several requirements of Eclipse ICE that we needed to maintain:

  • ICE must be cross-platform (so again, no COM)
  • New data structures, UI widgets and other pieces in ICE must be as reusable as possible.

I decided that the best way to merge both sets of requirements was to bring in some extra pieces of the Eclipse ecosystem to help out. The biggest challenge was actually figuring out how we could have a materials database that could accommodate one set of materials properties and instances of those materials used by the reflectivity calculator that had both the original properties and a secondary set of thin-film specific quantities. This means that the properties that show up in the materials database are a different set of properties, in whole or part, than those that show up in the reflectivity calculator. Under the hood this can be accommodated by a map that contains the union of both sets, but the big question was how to display different sets without explicitly marking the properties?

I turned to the GlazedLists library and Nattable to pull this off. GlazedLists provides several different types of lists against which listeners can be registered as well as Table Formatters that show different properties in different scenarios. Nattable can draw GlazedLists with a very small amount of code and additional layers can be added for sorting and searching. The combination of these libraries work so well that we have started reimplementing some of ICE’s older data structures to take advantage of the new code, which is smaller, generic, better tested and easier to maintain.

We extended ICE’s workbench to better support SWT-XY-Graph to get the embedded plots. Instead of putting the plots in a separate tab of the FormEditor, or even separate views, we used a SashForm and embedded them directly under the table. This is very “Excel-ish” when you’re using it and works great. If I could have my cake and eat it too, I would really like to figure out a way to make it possible to move the plots around with dynamic resizing instead of only being able to manipulate them within the SashForm.

The final piece of the puzzle was figuring out how we could make it possible to edit entries in the Reflectivity Calculator’s Layer Table programmatically. Imagine that you want to apply a formula to the thickness of the top layer of the materials such that its total thickness is X and the total thickness of all the layers is Y. This places a constraint that the thickness of all the layers under the top layer to to have a total thickness Z = Y – X. Alternatively you might say that a middle layer has a thickness equal to the average of the layer above it and the layer below it. These types of operations are easily done in Excel, but there is currently no way to click on the cells of a Nattable and apply formulas. In lieu of writing such a layer we decided to provide a scripting terminal with the Eclipse Advanced Scripting Environment (EASE) so that users could just write Javascript or Python to do whatever they wanted. This also makes it possible to do really cool things like generate and execute ensembles of calculations.

And… that’s about it. Everything works pretty amazing, considering the rather small amount of time that we spent on this. We have had an Eclipse Con Europe presentation accepted as an Early Bird Talk and ICE will be part of its first SNS User Tutorial in October. These make for very exciting times on the project and this new capability is so slick that I can’t help looking forward to what comes next!

You can check out our YouTube channel in the next few weeks for a video tutorial or our project page for more information. There is also a dedicated tutorial on our wiki. Of course, if you happen to be at EclipseCon Europe you can come by our talk too!

The Eclipse Integrated Computational Environment (ICE)

In what may be the longest overdue blog post I’ll ever write, I would like to take some time to everyone about the Eclipse Integrated Computational Environment (ICE). Most of what I am going to write below is adapted from an article that I wrote for the Eclipse Newsletter in January 2015.

The tldr; version of this post is that Eclipse ICE is a scientific workbench and workflow environment that we have developed over the past few years to improve the user experience for computational scientists; to make it possible for developers to deploy rich, graphical, interactive capabilities for their science codes; and to integrate many different scientific computing technologies in one common, cross-platform user environment. I’d like to think we’ve done a good job accomplishing those tasks.

The long version of the former statement is that Scientific Computing can be roughly divided into several different areas, one of which is Modeling and Simulation (M&S). Modeling and Simulation is a field that has existed, from a computing perspective, since World War II and finds its roots in government laboratories and academia. It is a field that encompasses both the art and the science of encoding the physical world into computers. What M&S lacks is good usability.

Eclipse is not used in modeling and simulation as much as it is in other areas, but it is widely known. Several years ago we asked the question, “What if the tools in Eclipse that are used for authoring scientific software could be repurposed for using scientific software?” The result is the Eclipse Integrated Computational Environment (ICE); a general purpose, easily extended M&S platform that significantly updates the way computational scientists interact with their software. It improves productivity and streamlines the workflow for computational scientists when they need to create input files, launch jobs on local or remote machines, and process output. Since it is based on the Eclipse Rich Client Platform, developers can update it to support new codes or add new tools just as easily as users can perform simulations of nuclear fuels or visualize neutron scattering data.

Design and Implementation

ICE is designed around the idea that each task performed by a computational scientist – creating an input file, launching a job, post-processing data, etc. – can be done equally as well by an intelligent delegate that has the required data and knows the instructions necessary to perform the task. For example, writing an input file is more about knowing what information should go in the file than how it should be written. Likewise, launching a massively parallel job is more about knowing what should be launched than the details of how to execute it. Each “intelligent delegate” in ICE is an Eclipse Plugin that inherits from an Item base class and provides a normal, pluggable OSGi service.

ICE also includes some tools that are just, simply, tools and not part of the normal task-based design. Each case is directly related to manipulating or generating data, not using it, so some commonality does exist. These include tools, for example, for 3D visualization and editing ICE’s materials database. Even though these tools are, in a sense, standalone tools, they are still integrated with the platform as OSGi services and used by the Items.

Examples: Nuclear Plant Simulations and 3D Visualization

The first example is visualization. ICE provides tools that allow users to visualize their data using some of the most advanced visualization capabilities available, namely those of the VisIt suite. Users can perform custom analysis operations, such as slicing, via a built-in visualization console and other widgets. The view is completely interactive with rotation and zooming just a click away.

A 3D tire rendered in VisIt.
A 3D tire rendered in VisIt.

The second example is input generation and one good example is the area of balance-of-plant or plant-level simulations for nuclear reactors. ICE has plugins for generating input for these simulations with the RELAP-7 simulator, based on MOOSE from Idaho National Laboratory, as well as launching RELAP-7 and viewing its results. Since the whole goal is to make everything very easy and push the state of the art, ICE takes this a step further by providing plant-level visualizations of the input.

Input rendered from a MOOSE data file for RELAP7 in ICE's plant editor.
Input rendered from a MOOSE data file for RELAP7 in ICE’s plant editor.

In both cases, care has been taken to make it possible to reuse the new workbench extensions in other parts of the platform so that future releases will see embedded 3D visualizations in Eclipse Forms and plant-level views that are updated with simulation results in real-time, for example.

Availability and Contributions

Eclipse ICE is an Eclipse Technology project and the source code is available at https://github.com/eclipse/ice. Documentation on the project is available at http://www.eclipse.org/ice and http://wiki.eclipse.org/ice.

The Eclipse ICE team welcomes contributions in any form from the community, (so long as they follow the Eclipse Contribution process, if it applies), so anyone with a good idea should speak up in the forums or on the Eclipse ICE users list, ice-users@eclipse.org.

Acknowledgements
I gratefully acknowledge the support of our sponsors in the U.S. Deparment of Energy, Office of Nuclear Energy, Advanced Modeling and Simulation (NEAMS); the Department of Energy, Office of Energy Efficiency and Renewable Energy, Computer-Aided Engineering for Batteries (CAEBAT) project; the Consortium for Advanced Simulation of Light Water Reactors (CASL); and the Oak Ridge National Laboratory’s Directors Research and Development Fund.

Here's another screenshot just for fun of Alex McCaskey and I running ICE on ORNL's EVEREST powerwall. Maybe the biggest screen size ever used for Eclipse! We're looking at an ABTR core and spoofing a similar silhouette picture by John Turner and Tom Evans.
Here’s another screenshot just for fun of Alex McCaskey and I running ICE on ORNL’s EVEREST powerwall. Maybe the biggest screen size ever used for Eclipse! We’re looking at an ABTR core and spoofing a similar silhouette picture by John Turner and Tom Evans.