Creating BISON Input Files with ICE
Check out the demo video on YouTube to see how ICE's plugins for BISON work. Don't forget to report any bugs that you find!
You will need some experience with the Linux shell to follow the instructions below because MOOSE is a Linux-based framework.
- 1 Getting Started
- 2 Creating Input
- 3 Launching a BISON job
- 4 Visualizing Output
This document is designed to outline the basic steps of setting up and using the BISON plugins in ICE. There are two different tasks for the input generation and launching of BISON within ICE:
- MOOSE Model Builder - Generates a set of input files necessary to launch a BISON job.
- BISON Launcher - Initiates the BISON codes to run on a local or remote system using the files generated from the MOOSE Model Builder.
You should have the MOOSE environment installed, either your local machine or on a remote machine. Instructions can be found here.
ICE looks for MOOSE and BISON in your home directory. If you checked out MOOSE from the repository, your directory structure should be
/home /username /moose /trunk /bison
It doesn't matter if you are running BISON 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
ICE is not currently configured to run a debug build of BISON and it only looks for the bison-opt executable.
When you run ICE for the first time, it will create a subdirectory in your home directory call ICEFiles. You need to generate BISON's YAML specification and put it in ICEFiles/default/MOOSE before ICE can generate BISON input files. You can generate the BISON YAML spec by running
./bison-opt --yaml; bison.yaml
from the BISON install directory. Move the bison.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 ICE so that this step won't be required in the future.
Where do I report bugs?
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 ICE is properly installed and configured, the first step in utilizing the BISON plugins is using ICE to generate the appropriate input files for the BISON simulations.
This tutorial will demonstrate the general procedure for generating BISON input in ICE.
To begin, launch ICE (if it isn't already running), and you should be presented with an empty workbench.
We must first create a MOOSE Model Builder item. ICE 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 ICE 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.
Defining and modifying input parameters
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 BISON 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 BISON input model. To add bounds to your BISON 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 ICE 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.
Generating BISON input files
The last step involved before launching a BISON 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 BISON file. Apply the name by clicking the floppy-disk Save button mentioned earlier.
Next, you must select which nodes in our BISON 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 BISON 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 BISON input file in your default directory, generating another input file with the same name will overwrite your existing file without warning.
This completes the BISON input generation task. The file generated will be used in the next step by the Bison Launcher to run the BISON 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 ICE, and navigating to the file. Once opened, you will be able to review the input file generated.
Launching a BISON job
Once you've generated appropriate input files, launching BISON is a relatively simple task.
To get started, click the green "+" button once more to create a new ICE Item. Select BISON Launcher from the menu and click OK.
A form will appear in the main ICE workbench area. This form contains the information necessary for launching a BISON problem.
Setting the input file and host
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 BISON 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 BISON launcher.
From the Input File drop-down menu, select an appropriate BISON file.
The next step is to specify on which machine BISON 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/bison/ directory of the machine's BISON installation. If you are launching on a remote machine, also be sure that you have appropriate privileges for the BISON install directory.
Setting parallel execution (optional)
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 BISON 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 ICE team if you need a pre-release copy.
The output produced by a BISON 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 ICE workbench. From the resulting dialog, select Visualization and press OK.
An empty Visualization perspective will replace the existing ICE perspective in the workbench.
Rendering in ICE'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 BISON 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.