Check out the demo video on YouTube to see how NiCE's plugins for CAEBAT work. Don't forget to report any bugs that you find!
Table of Contents
You will need some experience with the Linux shell to follow the instructions below because MOOSE is a Linux-based framework.
This document is designed to outline the basic steps of setting up and using the CAEBAT plugins in NiCE. There are two different tasks for the input generation and launching of CAEBAT within NiCE:
You should have the MOOSE environment installed, either your local machine or on a remote machine. Instructions can be found here.
NiCE looks for MOOSE and CAEBAT in your home directory. If you checked out MOOSE from the repository, your directory structure should be
/home
/username
/moose
/trunk
/CAEBAT
It doesn't matter if you are running CAEBAT locally or remotely, you must have this directory structure on any machine.
If MOOSE is installed elsewhere on your existing machine, you can just link to it using a symbolic link. From your home directory, execute
ln -s moose_install_directory moose
NiCE is not currently configured to run a debug build of CAEBAT and it only looks for the CAEBAT-opt executable.
When you run NiCE for the first time, it will create a subdirectory in your home directory call ICEFiles. You need to generate CAEBAT's YAML specification and put it in ICEFiles/default/MOOSE before NiCE can generate CAEBAT input files. You can generate the CAEBAT YAML spec by running
./CAEBAT-opt --yaml; CAEBAT.yaml
from the CAEBAT install directory. Move the CAEBAT.yaml file to ICEFiles/default/MOOSE on your LOCAL machine. If the MOOSE directory doesn't exist, you can create it.
We're currently looking at the possibility of distributing this and other files with NiCE so that this step won't be required in the future.
If you encounter a bug, you can report it at our Sourceforge.net page for bug tracking. We'll make every effort to get it resolved quickly.
After NiCE is properly installed and configured, the first step in utilizing the CAEBAT plugins is using NiCE to generate the appropriate input files for the CAEBAT simulations.
This tutorial will demonstrate the general procedure for generating CAEBAT input in NiCE.
To begin, launch NiCE (if it isn't already running), and you should be presented with an empty workbench.
We must first create a MOOSE Model Builder item. NiCE provides three options for creating new items (all highlighted in blue below). The user may click on the green plus icon (+) located near the top-right corner of the Item Viewer, click on the New Item button in the main NiCE toolbar, or choose File > Create an Item.
This will launch a dialog prompting you to select a task (or Item) to create. Find MOOSE Model Builder in the Item Selector list (you may need to scroll down) and select OK.
A MOOSE Model Builder will appear in the main workspace, and the Input Data -- Tree View will be activated in the left-hand column. If any YAML files for MOOSE-based application exist in the ICEFiles/default/MOOSE/ directory, they will appear in the main workbench window.
From the available MOOSE-based application, select CAEBAT and save the form by clicking the Save button in the toolbar, or press Ctrl+S on your keyboard.
You can now begin adding specifics to your CAEBAT input model. To add bounds to your CAEBAT model, select Bounds in the Input Data -- Tree View column on the left, and click the the Add Child button above.
This will prompt you with a list of bounds to select from. Simply choose the bound you would like to add, and click OK.
Once a child is added to the tree view, you can edit its parameters. Select the component by clicking its name, and a number of specific parameters will be displayed in the Properties view.
You can now edit the parameters as you see fit. (If for any reason you cannot see the Properties view, you can reveal it by navigating from the main NiCE toolbar at the top: Window > Show View > Other... > General > Properties. You can then drag the Properties view around to anywhere in the workbench that is convenient for you.)
Continue adding children to the tree view and editing parameters in the same manner until you have created a satisfactory plant model.
The last step involved before launching a CAEBAT job is actually generating the input files based on the model just created.
First, use the Output File Name field to specify the name of your CAEBAT file. Apply the name by clicking the floppy-disk Save button mentioned earlier.
Next, you must select which nodes in our CAEBAT model tree you'd like to be written into an input file. To do so, go through the tree and select the nodes you'd like to use by clicking the checkbox next to its name. Note: You only need to select the top-level nodes (i.e. Components, CoupledProblems, Debug, EoS, etc.); the children will be automatically added.
Lastly, find the Process drop-down menu located in the top right-hand corner of your MOOSE Model Builder tab. Select Write MOOSE File from the menu, and press the Go! button. Doing this will launch a script in the background to convert your input parameters into a file format that CAEBAT can understand. This operation should take no more than a second or two, and the message "Done!" should appear near the top of the MOOSE Model Builder tab when it is complete.
This file will be created in your /home/<user>/ICEFiles/default/ directory and will have the file name you specified. It's important to note that if you have a previously generated CAEBAT input file in your default directory, generating another input file with the same name will overwrite your existing file without warning.
This completes the CAEBAT input generation task. The file generated will be used in the next step by the CAEBAT Launcher to run the CAEBAT problem. However, if you'd like to review your input file before launching, you can do so by opening the File > Open File... menu in NiCE, and navigating to the file. Once opened, you will be able to review the input file generated.
Once you've generated appropriate input files, launching CAEBAT is a relatively simple task.
To get started, click the green "+" button once more to create a new NiCE Item. Select CAEBAT Launcher from the menu and click OK.
A form will appear in the main NiCE workbench area. This form contains the information necessary for launching a CAEBAT problem.
The first piece of necessary information is to specify an input file. If you created your own input file in the previous step using the MOOSE Model Builder, this file should appear in the list of available files.
If you are using an input file that was created elsewhere, it must be in your /home/<user>/ICEFiles/default/ directory prior to creating the CAEBAT Launcher Item or you will need to import it. To do this, click "File->Import File" and pick the file that you want to import. It will appear in the list of input files in the CAEBAT launcher.
From the Input File drop-down menu, select an appropriate CAEBAT file.
The next step is to specify on which machine CAEBAT will be run, either locally or remotely. A list of hosts used at ORNL is displayed by default, however, additional hosts can be added by clicking the "+" button to the right of the Hosts table. When adding hosts, set the Execution Path to the /trunk/CAEBAT/ directory of the machine's CAEBAT installation. If you are launching on a remote machine, also be sure that you have appropriate privileges for the CAEBAT install directory.
Optionally, if you'd like to take advantage of parallel processing, you may specify the number of MPI process and/or Intel Thread Building Block (TBB) threads.
To use multiple MPI processes, change the marked field to an integer value anywhere between 1 and 10000. Note that mpirun must be specified in the host machine's PATH variable. If you choose not to change this field, the default value of 1 MPI process is used.
To use multiple TBB threads, change the marked field to an integer value anywhere between 1 and 256. Note that the host machine must have Intel TBB support. If you choose not to change this field, the default value of 1 TBB thread is used.
Once the input file and host is specified, apply your settings by clicking the floppy disk button located in the upper-left corner of the NiCE workbench, which is the Save button.
If you make any subsequent changes to the CAEBAT Launcher form, you will have to re-apply them by saving the form in the same way.
Lastly, use the Process menu in the upper right-hand corner; select the Launch the Job task from the drop-down menu and click the Go! button. Depending on your host machine's configuration, you may be prompted for login credentials.
This section requires VisIt 2.8, which may or may not be released at press time. Contact the NiCE team if you need a pre-release copy.
The output produced by a CAEBAT job can be visually analyzed in NiCE by utilizing the Visualization perspective. Select Window > Perspective > Other... from the menu bar at the top of the NiCE workbench. From the resulting dialog, select Visualization and press OK.
An empty Visualization perspective will replace the existing NiCE perspective in the workbench.
Rendering in NiCE's Visualization perspective is executed through a connection to the external visualization software application, VisIt. To establish this connection, click Launch VisIt near the upper-right corner of the NiCE workbench.
A dialog for connecting to VisIt will appear. This dialog allows the user to start a new instance of VisIt on their local machine or a remote machine. The dialog additionally allows the user to connect to an already running instance of VisIt. Select a connection option and enter the appropriate parameters before clicking "OK".
If the connection to VisIt is successful, a Visualization Editor will be opened in the main workbench area. Click the Open File button from the Visualization File Viewer in the right-hand column of the workbench.
A dialog for exploring the local file system will appear. Navigate to and select the .e file produced by the CAEBAT job execution. (Note: This may require adjusting the file extension filter in the dialog to get the file to appear.) After dismissing the file dialog, ensure that the file is selected in the Visualization File Viewer. Click the Add Plot button in the Plot Viewer on the left-hand side of the workbench.
A dialog for selecting plots to add to the Plot Viewer will appear. Check any number of plots to add and click OK.
To display a plot in the Visualization Editor, select the plot in the Plot Viewer. Click and drag on the image to manipulate its orientation.