main.tex 7.62 KB
 amccaskey committed Feb 24, 2016 1 \documentclass{article}  amccaskey committed Feb 25, 2016 2 %\documentclass[11pt,letterpaper,twoside,english,final]{article}  amccaskey committed Feb 24, 2016 3 \usepackage{graphicx}  amccaskey committed Feb 24, 2016 4 5 \usepackage{caption} \usepackage{subcaption}  amccaskey committed Feb 25, 2016 6 \usepackage{hyperref}  amccaskey committed Feb 24, 2016 7 8 9  \begin{document}  amccaskey committed Feb 25, 2016 10 \section*{The Eclipse ICE Developer Menu}  amccaskey committed Feb 24, 2016 11   amccaskey committed Feb 25, 2016 12 \subsection*{Overview}  amccaskey committed Feb 24, 2016 13 14 15 16 The Eclipse Integrated Computational Environment (ICE) has had a great track record of providing a comprehensive environment for general scientific computing. Tasks such as model input generation, local and remote simulation execution, and post-simulation data analysis and visualization are all very well  Taylor Patterson committed Mar 01, 2016 17 18 19 20 supported in the application. These tasks take care of the majority of needs for \emph{using} general scientific computing codes, but what about \emph{developing} those applications to begin with? Is there any way ICE can be extended to provide support for the development of science codes?  amccaskey committed Feb 24, 2016 21   amccaskey committed Feb 25, 2016 22 23 24 25 \begin{figure}[h] \includegraphics[width=\textwidth]{figures/icemenu.png} \centering \caption{The ICE Developer Menu}  amccaskey committed Feb 24, 2016 26 \label{fig:devmenu}  amccaskey committed Feb 25, 2016 27 \end{figure}  amccaskey committed Feb 24, 2016 28   amccaskey committed Feb 24, 2016 29 30 31 32 33 34 35 36 37 38 39 40 41 42 The answer is yes! In 2015 ICE was extended to provide support for scientific application \emph{development} through a custom, extensible \textbf{Developer} top-level menu. This menu is shown in Figure \ref{fig:devmenu} and provides custom actions that enable efficient scientific application development for both novice and expert users of a given science code. The Developer Menu is completely customizable through Eclipse Extension Points. Specifically, ICE exposes a new extension point: \emph{org.eclipse.ice.developer.code}. This extension point provides the means to specify details about a scientific code: its name, category (Framework, Nuclear, Other, etc\ldots), and where its repository is hosted, just to name a few. This point also enables the addition of \emph{commands} that point to some custom subclass of \emph{org.eclipse.core.commands.AbstractHandler} that  Taylor Patterson committed Mar 01, 2016 43 performs some task related to the development of the code.  amccaskey committed Feb 24, 2016 44   amccaskey committed Feb 25, 2016 45 With these extensions exposed as part of an ICE product execution, ICE  amccaskey committed Feb 24, 2016 46 handles all the complexity of picking them up and populating the Developer Menu  Taylor Patterson committed Mar 01, 2016 47 48 49 50 51 52 53 54 dynamically at runtime. This feature is shown in Figure \ref{fig:devcloneice}, with an ICE category for ICE development, and another for scientific frameworks. This process is exactly how ICE developers work on ICE itself - by pulling down the ICE binary and leveraging the Developer Menu to clone and build ICE, all within ICE. ICE also provides these hooks for other scientific codes, like the Multiphysics Object Oriented Simulation Environment (MOOSE) for general finite-element simulations. ICE provides a hook for cloning MOOSE and for forking a templated repository for MOOSE Application development.  amccaskey committed Feb 24, 2016 55   amccaskey committed Feb 25, 2016 56 \begin{figure}[h]  amccaskey committed Feb 24, 2016 57 \includegraphics[width=\textwidth]{figures/menu.png}  amccaskey committed Feb 25, 2016 58 \caption{The Developer Menu ICE and MOOSE Actions}  amccaskey committed Feb 24, 2016 59 \label{fig:devcloneice}  amccaskey committed Feb 25, 2016 60 \end{figure}  amccaskey committed Feb 24, 2016 61 62  Extending the Developer Menu is easy, and relies on simply creating a new plugin  Taylor Patterson committed Mar 01, 2016 63 and exposing a new extension. Let's see how to do this task in detail:  amccaskey committed Feb 24, 2016 64   amccaskey committed Feb 25, 2016 65 \subsection*{Extending the ICE Developer Menu}  amccaskey committed Feb 25, 2016 66 67 68 69 70 71 72 73 74 For this tutorial, we are going to create a hook into the Developer menu to clone a scientific code called Fern. Fern is an application that provides an efficient nuclear reaction network solver. It is hosted at \url{https://github.com/jayjaybillings/fern}. To get started, we need to download the ICE plugins to our workspace, which we can actually do through the Developer menu (pretty cool to use the Developer menu to extend the Developer menu!). Click Developer $>$ ICE $>$ Clone ICE to get all of ICE's plugins into the workspace. With ICE cloned to the workspace,  Taylor Patterson committed Mar 01, 2016 75 76 we can now begin to extend the Developer menu. First, we will need to create a new plugin.  amccaskey committed Feb 25, 2016 77   amccaskey committed Feb 25, 2016 78 \subsubsection*{Create a New Plugin Project}  amccaskey committed Feb 25, 2016 79 80 81 Creating a new plugin for an extension to the ICE Developer menu is simple, just click File $>$ New $>$ Plugin Project (or Other, then select Plugin Project). When the wizard opens, name your new plugin with something similar to Figure  Taylor Patterson committed Mar 01, 2016 82 83 \ref{fig:newplugin} and deselect the Generate an activation button. On the next page, simply uncheck the create a plugin from template button and click Finish.  amccaskey committed Feb 25, 2016 84 \begin{figure}[h]  amccaskey committed Feb 25, 2016 85 \includegraphics[width=\textwidth]{figures/combinedplugin.png}  amccaskey committed Feb 25, 2016 86 \caption{Creating a new Plugin Project}  amccaskey committed Feb 25, 2016 87 \label{fig:newplugin}  amccaskey committed Feb 25, 2016 88 \end{figure}  amccaskey committed Feb 25, 2016 89 90 91 92 93  When the MANIFEST.MF file editor opens up, add the \emph{org.eclipse.ice.developer} plugin as a Required Plugin on the Dependencies tab.  amccaskey committed Feb 25, 2016 94 95 96 97 \subsubsection*{Create a New ICE Developer Extension} Now let's create a new Extension to connect ICE and the Developer Menu with a Clone Fern action. To do so, go to the Extensions tab of the plugin MANIFEST file and click add. ICE provides an  Taylor Patterson committed Mar 01, 2016 98 org.eclipse.ice.developer.code extension point that lets users define various  amccaskey committed Feb 25, 2016 99 100 101 102 103 104 105 106 107 108 109 details about their codes. % \ref{fig:createExtPt} and click Finish. % \begin{figure}[h] % \includegraphics[width=\textwidth]{figures/extensionPt.png} % \caption{Create a new ICE Scientific Code Extension} % \label{fig:createExtPt} % \end{figure} You will then be presented with the view in Figure \ref{fig:config1}. Enter a descriptive ID and Name for this extension and click Save. \begin{figure}[h]  amccaskey committed Feb 25, 2016 110 \includegraphics[width=\textwidth]{figures/extptconfig1.png}  amccaskey committed Feb 25, 2016 111 \caption{Configure the ID and Name of this Code Extension.}  amccaskey committed Feb 25, 2016 112 \label{fig:config1}  amccaskey committed Feb 25, 2016 113 \end{figure}  amccaskey committed Feb 25, 2016 114   amccaskey committed Feb 25, 2016 115 116 To define your scientific application, right click on the org.eclipse.ice.developer.code extension in the All Extensions section and  Taylor Patterson committed Mar 01, 2016 117 118 119 select New $>$ Code in the context menu. This action will present you with the view in Figure \ref{fig:config2} where you can select the code category, code display name, the repository URL, and the branch you would like to work with.  amccaskey committed Feb 25, 2016 120   amccaskey committed Feb 25, 2016 121 122 123 124 125 126 127 \begin{figure}[h] \includegraphics[width=\textwidth]{figures/comb.png} \caption{Create a new Code description for this extension.} \label{fig:config2} \end{figure} To create a new developer action for your code, right click the code element of  Taylor Patterson committed Mar 01, 2016 128 the extension tree and select New $>$ Command. You will then be presented  amccaskey committed Feb 25, 2016 129 with the view at the top of Figure \ref{fig:config2} where you can input the  Taylor Patterson committed Mar 01, 2016 130 131 132 133 name of this action and the AbstractHandler subclass that performs the action. ICE provides a default GitCloneHandler that you may select. For this tutorial, select that and click Save. You should now have a view similar to the bottom of Figure \ref{fig:config2}.  amccaskey committed Feb 25, 2016 134 135 136 137 138 139 140 141  % \begin{figure}[h] % \includegraphics[width=.9\textwidth]{figures/extptconfig4.png} % \caption{Create a new command for this code extension.} % \label{fig:config4} % \end{figure} \subsubsection*{Setup ICE to Run with the New Plugin}  Taylor Patterson committed Mar 01, 2016 142 To see this new Developer command in action, we need to launch a new instance of  amccaskey committed Mar 04, 2016 143 ICE. This can be done by opening the Run Configurations Wizard in Run $>$ Run  amccaskey committed Feb 25, 2016 144 145 Configurations. Under the Eclipse Applications element in the tree on the left, select the ICE launch configuration for your OS. Open the Plugins tab and add  Taylor Patterson committed Mar 01, 2016 146 your new developer plugin (see Figure \ref{fig:launch}) by enabling it. Then,  amccaskey committed Feb 25, 2016 147 148 click Run to launch ICE with your developer plugin. \begin{figure}[h]  amccaskey committed Feb 25, 2016 149 \includegraphics[width=\textwidth]{figures/launch.png}  amccaskey committed Mar 04, 2016 150 \caption{Add your plugin to the run configuration.}  amccaskey committed Feb 25, 2016 151 \label{fig:launch}  amccaskey committed Feb 25, 2016 152 153 154 155 156 \end{figure} With ICE running, navigate to the Developer menu and select Nuclear $>$ Fern $>$ Clone Fern (see Figure \ref{fig:clonefern}). \begin{figure}[h] \includegraphics[width=\textwidth]{figures/cloned.png}  amccaskey committed Mar 04, 2016 157 \caption{Use the Developer Menu to Clone ICE.}  amccaskey committed Feb 25, 2016 158 159 160 161 162 163 164 165 166 167 \label{fig:clonefern} \end{figure} This will kick off the action you specified to clone the Fern repository and pull in any Eclipse projects to the workspace, as shown in Figure % \ref{fig:result} % \begin{figure}[h] % \includegraphics[width=\textwidth]{figures/result.png} % \label{fig:result} % \end{figure}  amccaskey committed Feb 24, 2016 168 \end{document}