sales@scenomics.com +1 650 396 9674

Implement New Commands

NOTE: This exercise assumes you have completed the previous exercise.

In this exercise you'll learn to implement Scenome application commands that form an integral part of the user experience. The first command loads files from disk and stores them below the <WorkloadNode> we created during the previous exercise, the second command allows you to toggle the debug state of the <WorkloadNode> so you can test and debug workloads, and the third command allows you to disable the <WorkloadNode> so that it won't be processed at all. The new commands are simple, but they greatly increase quality of life for application developers.

Start The Shell Application

  1. Start the Shell app. (Start » Programs » Scenomics » Shell) or (Windows® key and then type 'Shell' to find the app icon.)

    The application displays a splash screen and then the application desktop appears. The main menu is composed of three items that contain commands relevant to the current context (which is an empty document). The interface changes when you create a new file or load a file from disk.

    This is a picture of the desktop.

Get The <WorkloadNode> Macro Library Script Path

  1. Examine the main menu and select File » Get Application Script Path from the listed options.

    The application displays a dialog that allows you to search for application scripts.

    This is a picture of the app script search box.
  2. Type type_workload_node_scripts.ssl in the text entry.

    Copy Text To Clipboard

    type_workload_node_scripts.ssl

    The script entry appears in the dialog.

  3. Left click the entry named type_workload_node_scripts.ssl and click OK or hit ENTER when you are finished.

    The application copies the script path to the Windows® clipboard.

Open The <WorkloadNode> Macro Library Script

  1. Return to the text editor and select the option to open a file from disk.
  2. Select CTRL + V to paste the script command library file path (into the place in the dialog where you specify the file to open).
  3. Open the file.

    The script appears in the text editor.

    ///////////////////////////////////////////////////////////////////////////////
    //
    // $author           Scenomics LLC
    // $description      Implements commands for WorkloadNode.
    //
    // Copyright 2004-2021 Scenomics LLC. All Rights Reserved.
    //
    ///////////////////////////////////////////////////////////////////////////////
    
    import library "app_service_assert_util.ssl";
    import library "app_service_console_util.ssl";
    
    ///////////////////////////////////////////////////////////////////////////////
    // macro
    ///////////////////////////////////////////////////////////////////////////////
    
    function void WorkloadNodeCommand_OnUpdate( CommandPresentationModuleInfo commandInfo )
    {
       ValidateNodeCommandContext.TestSelection( commandInfo, WorkloadNode, 1, true,
          "This command..." );
    }
    
    macro WorkloadNodeCommand()
    [Category="WorkloadNode Commands", Guid="{A444313A-3446-427D-9924-836E81B8CE47}", Image=".\\icons\\generic_script_icon.bmp"]
    {
       // Do something here...
    }
    

    Let's review the contents of this script file.

    Table 1.1. New Commands

    Section Description
    Header A brief description of the document.
    Imports Library imports that allow us to call functions implemented in other function libraries.
    WorkloadNodeCommand_OnUpdate This function is invoked when the command is presented in the user interface. In this case, the function tests the selection and makes sure a single <WorkloadNode> is selected, and if so, sets the hint text that appears when the user selects the command in the user interface. If a <WorkloadNode> is not selected, then this command remains 'grayed out' in the user interface, and cannot be selected by the user.
    macro WorkloadNodeCommand This macro is a placeholder that doesn't do anything yet. We're going to rewrite this macro so that it prompts the user to select files on disk, and then creates one or more <FileNode> objects that represent the files. These files will be the input for our GPU compute workload.

Modify The Imports

  1. Go to the text editor and find the script type_workload_node_scripts.ssl.

    Rather than make you add the imports one-by-one, we'll just add them all at once. In the future, when you're writing your own scripts, you'll learn to add them one-by-one on your own. For the purposes of this exercise, it's easier to just add them all at once.

  2. Find the import statements:

    import library "app_service_assert_util.ssl";
    import library "app_service_console_util.ssl";
    
  3. Replace all the import statements with the following:

    Copy Text To Clipboard

    import library "app_service_assert_util.ssl";
    import library "app_service_console_util.ssl";
    import library "app_service_main_util.ssl";
    import library "type_service_create_util.ssl";
    import library "type_service_enumeration_util.ssl";
    import library "type_service_select_includes.ssl";
    import library "type_service_select_util.ssl";
    import library "type_workload_node_algorithms.ssl";
    
  4. Save the script with the text editor.

Modify Function 'WorkloadNodeCommand_OnUpdate'

  1. Go to the text editor and find the script type_workload_node_scripts.ssl.
  2. Find the function named WorkloadNodeCommand_OnUpdate.

    We're going to change the name of the function and the hint text that appears when the user selects the command in the user interface.

    function void WorkloadNodeCommand_OnUpdate( CommandPresentationModuleInfo commandInfo )
    {
       ValidateNodeCommandContext.TestSelection( commandInfo, WorkloadNode, 1, true,
          "This command..." );
    }
    
  3. Replace the entire WorkloadNodeCommand_OnUpdate function with following code:

    Copy Text To Clipboard

    function void WorkloadNodeLoadFilesFromDisk_OnUpdate( CommandPresentationModuleInfo commandInfo )
    {
       ValidateNodeCommandContext.TestSelection( commandInfo, WorkloadNode, 1, true,
          "Prompts you to select files from disk used as inputs for a GPU compute workload" );
    }
  4. Save the script in the text editor.

Modify macro 'WorkloadNodeCommand'

  1. Go to the text editor and find the script type_workload_node_scripts.ssl.
  2. Find the macro named WorkloadNodeCommand.

    We're going to change the name of the command macro and make it print something to the output window.

    macro WorkloadNodeCommand()
    [Category="WorkloadNode Commands", Guid="{A444313A-3446-427D-9924-836E81B8CE47}", Image=".\\icons\\generic_script_icon.bmp"]
    {
       // Do something here...
    }
    
  3. Replace the entire WorkloadNodeCommand macro with following code:

    Copy Text To Clipboard

    macro WorkloadNodeLoadFilesFromDisk()
    [Category="WorkloadNode Commands", Guid="{A444313A-3446-427D-9924-836E81B8CE47}", Image=".\\icons\\generic_script_icon.bmp"]
    {
       Console.Out( "Executed " + Script.Runtime.CurrentFunction.Name );
    }
    

    The macro will print the macro name in the output window when it is executed. This will let us know that the command is working when we install it in the user interface and test it.

  4. Save the script in the text editor.

Implement Command 'WorkloadNodeToggleDebug'

  1. Go to the text editor and find the script type_workload_node_scripts.ssl.
  2. Go to the end of the file and insert the following code:

    Copy Text To Clipboard

    ///////////////////////////////////////////////////////////////////////////////
    // macro
    ///////////////////////////////////////////////////////////////////////////////
    
    function void WorkloadNodeToggleDebug_OnUpdate( CommandPresentationModuleInfo commandInfo )
    {
       ValidateNodeCommandContext.TestSelection( commandInfo, WorkloadNode, -1, true,
          "Toggles a <WorkloadNode> object's debug flag true/false" );
    }
    
    macro WorkloadNodeToggleDebug()
    [Category="WorkloadNode Commands", Guid="{90F3C26B-D7D4-432F-949D-134EF8E4BCA8}", Image=".\\icons\\generic_script_icon.bmp"]
    {
       auto NodeBuffer nodes = LibSelection.EditSelected( WorkloadNode );
       LibWorkloadNodeAlgorithms.ToggleDebug( nodes );
    }

    The first line of the macro implementation populates a <NodeBuffer> object with any selected <WorkloadNode> objects, and opens editing actions for any selected nodes. The second line toggles the debug flag on all the items in the collection. We automatically get undo/redo since we are toggling the debug flag on objects for which editing actions have been opened. This is a small stylistic point, but we generally want to avoid having loops to perform modifications in basic editing commands because we can't easily call code from within macros (except when the command is executed).

  3. Save the script in the text editor.

Get The <WorkloadNode> Algorithms Path

  1. Return to the running Shell application.
  2. Examine the main menu and select File » Get Application Script Path from the listed options.

    The application displays a dialog that allows you to search for application scripts.

    This is a picture of the app script search box.
  3. Type app_octopus_scripts.ssl in the text entry.

    Copy Text To Clipboard

    type_workload_node_algorithms.ssl

    The script entry appears in the dialog.

  4. Left click the entry named type_workload_node_algorithms.ssl and click OK or hit ENTER when you are finished.

    The application copies the script path to the Windows® clipboard.

Implement The 'ToggleDebug' Algorithm

  1. Return to the running text editor and select the option to open a file from disk.
  2. Select CTRL + V to paste the utility library file path (into the place in the dialog where you specify the file to open).
  3. Open the file.

    The script appears in the text editor.

    ///////////////////////////////////////////////////////////////////////////////
    //
    // $author           Scenomics LLC
    // $description      Implements algorithms for WorkloadNode.
    //
    // Copyright 2004-2021 Scenomics LLC. All Rights Reserved.
    //
    ///////////////////////////////////////////////////////////////////////////////
    
    library LibWorkloadNodeAlgorithms;
    
    import library "type_service_enumeration_util.ssl";
    import library "app_service_console_util.ssl";
    import library "type_workload_node_util.ssl";
    
  4. Insert the following code at the end of the script, leaving a single line between the import declarations and the new code.

    Copy Text To Clipboard

    ///////////////////////////////////////////////////////////////////////////////
    // function
    ///////////////////////////////////////////////////////////////////////////////
    
    function void ToggleDebug( NodeBuffer p_apNodes )
    {
       for( int i = 0; i < p_apNodes.GetCount(); ++i )
       {
          WorkloadNode a_oNode = (WorkloadNode)p_apNodes.Get( i );
          a_oNode.Debug = !a_oNode.Debug;
       }
    }
    

Test Code Changes

  1. Return to the running copy of the Shell application.
  2. Select Desktop » Refresh Scripts from the main menu. ( ALT + D + R )

    The application displays script compiler messages in the output window:

    Start loading scripts
    Done loading scripts; 10 loaded in 1.29 ms; avg 0.09
    

    If there are any script compiler errors, undo your changes in the text editor, go back to the previous step, and follow the instructions again. Here is an example of what error messages might look like:

    Start loading scripts
    D:\release6\scripts\app_shell_util.ssl(1770) : error: newline in constant
    Done loading scripts; 10 loaded in 1.29 ms; avg 0.09
    

Open The <WorkloadNode> Command Menu Document

  1. Return to the running copy of the Shell application.
  2. Select File » Open From Common... from the main menu.

    The software presents a dialog that allows you to select a .BOX file from disk.

  3. Type WorkloadNode ( Standard ) Context Menu.box Copy and click Open or hit ENTER when you are finished.

    The document opens. You can see the command menu layout, which includes a <ContextMenuElementNode>, <ItemElementNode> objects, and <SeparatorElementNode> objects. This file is processed during the application shell build process and turned into XML that describes the layout of the application.

    This is a picture of the WorkloadNode command menu.

    NOTE: There is also a WorkloadNode ( Basic ) Context Menu.box document that contains a command menu with very few options. The 'basic' command menu is used for applications where the <WorkloadNode> isn't used, or in use cases such as the shell that appears when you first start any Scenome application. For this use case, we definitely need to use WorkloadNode ( Standard ) Context Menu.box.

Get macro WorkloadNodeLoadFilesFromDisk GUID

  1. Go to the text editor and find the script type_workload_node_scripts.ssl.
  2. Find the line immediately below the macro declaration:

    [Category="WorkloadNode Commands", Guid="{A444313A-3446-427D-9924-836E81B8CE47}", Image=".\\icons\\generic_script_icon.bmp"]

    We want to copy out only the GUID, which includes the start and end curly braces ( { and } ), but does not include the quotation marks:

    Copy Text To Clipboard

    {A444313A-3446-427D-9924-836E81B8CE47}

Install The Command In The Context Menu

  1. Return to the Shell application.
  2. Examine the hierarchy and right click over the <ContextMenuElementNode> named WorkloadNode.

    The software displays a command menu.

    This is a picture of the WorkloadNode command menu.
  3. Select Create Command Item From Guid... from the listed options.

    The software displays a text entry dialog that allows you to specify the GUID of the command instance you wish to create. This is a picture of the dialog that allows you to specify the GUID of the command you wish to create.

  4. Use CTRL + V to paste the GUID into the dialog and click OK or hit ENTER when you are finished.

    The dialog appears again so that you can enter another GUID.

  5. Hit ENTER to finish (even though the text entry field is blank) since we don't want to enter another GUID.

    The software adds to the document an <ItemElementNode> named WorkloadNodeLoadFilesFromDisk representing the new command. You can see it at the end of the child list.

    This is a picture of the new command item in the user interface.

    By default, the <ItemElementNode> uses the macro name. We'll change this next.

Change The <ItemElementNode> Name

  1. Examine the hierarchy and right click over the <ItemElementNode> named WorkloadNodeLoadFilesFromDisk.
  2. Select Rename... from the listed options.

    The software displays a text entry dialog that allows you to change the name of the node. This is a picture of the name change dialog.

  3. Type Load Files From Disk... Copy and click OK or hit ENTER when you are finished.

    The node is renamed.

Reposition The <ItemElementNode>

  1. Examine the hierarchy.

    The <ItemElementNode> named Load Files From Disk... is selected.

  2. Select Graph » Move » Move To Top from the main menu.

    The <ItemElementNode> moves to the top position in the child list.

    This is a picture of the hierarchy.
  3. Select File » Save from the main menu.

Get macro WorkloadNodeToggleDebug GUID

  1. Go to the text editor and find the script type_workload_node_scripts.ssl.
  2. Find the line immediately below the macro declaration:

    [Category="WorkloadNode Commands", Guid="{90F3C26B-D7D4-432F-949D-134EF8E4BCA8}", Image=".\\icons\\generic_script_icon.bmp"]

    We want to copy out only the GUID, which includes the start and end curly braces ( { and } ), but does not include the quotation marks:

    Copy Text To Clipboard

    {90F3C26B-D7D4-432F-949D-134EF8E4BCA8}

Install The Command In The Context Menu

  1. Return to the Shell application.
  2. Examine the hierarchy and find the <ContextMenuElementNode> named WorkloadNode.
  3. Right click and select Create Command Item From Guid... from the listed options.

    The software displays a text entry dialog that allows you to specify the GUID of the command instance you wish to create. This is a picture of the dialog that allows you to specify the GUID of the command you wish to create.

  4. Use CTRL + V to paste the GUID into the dialog and click OK or hit ENTER when you are finished.

    The dialog appears again so that you can enter another GUID.

  5. Hit ENTER to finish (even though the text entry field is blank) since we don't want to enter another GUID.

    The software adds to the document an <ItemElementNode> named WorkloadNodeToggleDebug representing the new command. You can see it at the end of the child list.

    This is a picture of the new command item in the user interface.

    By default, the <ItemElementNode> uses the macro name. We'll change this next.

Change The <ItemElementNode> Name

  1. Examine the hierarchy and right click over the <ItemElementNode> named WorkloadNodeToggleDebug.
  2. Select Rename... from the listed options.

    The software displays a text entry dialog that allows you to change the name of the node. This is a picture of the name change dialog.

  3. Type Toggle Debu&amp;g Copy and click OK or hit ENTER when you are finished.

    The node is renamed.

Reposition The <ItemElementNode>

  1. Examine the hierarchy.

    The <ItemElementNode> named Toggle Debu&amp;g is selected.

  2. Select Graph » Move » Move To Top from the main menu.

    The <ItemElementNode> moves to the top position in the child list.

    This is a picture of the hierarchy.
  3. Select File » Save from the main menu.

Get macro ToggleVisible GUID

  1. Copy the following GUID.

    This GUID is from macro ToggleVisible() which is found in type_group_scripts.ssl. We won't open the script in this exercise, but that is where you could find it if needed.

    Copy Text To Clipboard

    {1F91F995-F612-46D4-A453-4B81096121A9}

Install The Command In The Context Menu

  1. Return to the Shell application.
  2. Examine the hierarchy and find the <ContextMenuElementNode> named WorkloadNode.
  3. Right click and select Create Command Item From Guid... from the listed options.

    The software displays a text entry dialog that allows you to specify the GUID of the command instance you wish to create. This is a picture of the dialog that allows you to specify the GUID of the command you wish to create.

  4. Use CTRL + V to paste the GUID into the dialog and click OK or hit ENTER when you are finished.

    The dialog appears again so that you can enter another GUID.

  5. Hit ENTER to finish (even though the text entry field is blank) since we don't want to enter another GUID.

    The software adds to the document an <ItemElementNode> named ToggleVisible representing the new command. You can see it at the end of the child list.

    This is a picture of the new command item in the user interface.

    By default, the <ItemElementNode> uses the macro name. We'll change this next.

Change The <ItemElementNode> Name

  1. Examine the hierarchy and right click over the <ItemElementNode> named ToggleVisible.
  2. Select Rename... from the listed options.

    The software displays a text entry dialog that allows you to change the name of the node. This is a picture of the name change dialog.

  3. Type Toggle &amp;Visible Copy and click OK or hit ENTER when you are finished.

    The node is renamed.

Reposition The <ItemElementNode>

  1. Examine the hierarchy.

    The <ItemElementNode> named Toggle Debu&amp;g is selected.

  2. Select Graph » Move » Move To Top from the main menu.

    The <ItemElementNode> moves to the top position in the child list.

    This is a picture of the hierarchy.
  3. Select File » Save from the main menu.

Rebuild The Octopus App User Interface

  1. Return to the running copy of the Shell application.
  2. Select File » Open From Applications... from the main menu.

    The software presents a dialog box that allows you to select a file to load from disk. In this case you'll see a directory for each Scenome app installed on your computer.

  3. Navigate into the Octopus folder and open Octopus.box.

    The Octopus app user interface layout appears in the hierarchy:

    This is a picture of the hierarchy.
  4. Select Graph » Build All from the main menu.

    The software builds the application and displays build information in the output window.

    --- <Building Project 'D:\Release6\Content\Applications\Octopus\Octopus.box'> ---
    
    Wrote the interface definition to disk at the following location: D:\release6\content\applications\octopus\v0_octopus.xml
    Wrote the interface definition to disk at the following location: D:\release6\content\applications\octopus\v1_octopus.xml
    
    Saved the interface definition and wrote build script entry for the following application: 'Octopus'
    
    Saved the interface definition and wrote build script entry for the following application: 'Octopus'
    Ran the build script at the following location: D:\Release6\Content\Applications\Octopus\app_build.bat ( via shell execute ).
    Start loading scripts
    Done loading scripts; 0 loaded in 2.75 ms; avg inf
    

Start The Octopus App

  1. Examine the hierarchy and right click over the <ApplicationConfigNode> named Interface.
  2. Select Run Application from the listed options.

    A splash screen appears and the Octopus application starts.

Test The Command Menu

  1. Select File » Open from the main menu.

    The software presents a dialog that allows you to select a file to open. You'll see a single directory with the name of the project we created earlier: Western-Washington-Mt-Baker-Terrain-Analysis

  2. Go inside that directory and open Western-Washington-Mt-Baker-Terrain-Analysis.box.

    The document appears in the hierarchy:

    This is a picture of the hierarchy.
  3. Select Desktop » Clear Output from the main menu.

    This clears the output window so that we can easily test our new command.

  4. Right click over the <WorkloadNode> named Western-Washington-Mt-Baker-Terrain-Analysis and select Load File From Disk... from the listed options.

    You will see the following text in the output window.

    Executed WorkloadNodeLoadFilesFromDisk

    Now that we know our command is working, it's time to make the command do something useful.

Implement The Command

  1. Go to the text editor and find the script type_workload_node_scripts.ssl.
  2. Find the macro implementation:

    macro WorkloadNodeLoadFilesFromDisk()
    [Category="WorkloadNode Commands", Guid="{A444313A-3446-427D-9924-836E81B8CE47}", Image=".\\icons\\generic_script_icon.bmp"]
    {
       Console.Out( "Executed " + Script.Runtime.CurrentFunction.Name );
    }
    
  3. Replace the code in the macro body (everything inside the start curly brace { and end curly brace }) with the following:

    Copy Text To Clipboard

    // Choose the default path. The file dialog will
    // browse this folder when it appears. We'll use
    // a pretty general path so the user can go load
    // all kinds of files.
    auto FilePath a_oDefaultPath = new FilePath(
       Application.GetApplicationDocumentsPath() );
    
    // Allocate a Strlist to store our file paths.
    auto StrList a_slFiles;
    // Set the filter text used in the dialog.
    // In this case it will be "|All Files (*.*)|*.*||";
    // because we want the user to be able to load
    // a file of any type.
    string a_sFilter = LibAppServiceMain.GetAllFileTypesExt();
    string a_sTitle = "Choose Files:";
    
    // Present the dialog the user so they can select
    // one or more files to load from disk. This dialog
    // populates the StrList a_slFiles with the
    // absolute paths to the files on disk selected
    // by the user.
    if( Application.BrowseFileOpen(
       Enum.OSFD_CustomFilter(),
       Enum.OSFS_MultiFile(),
       a_sFilter,
       a_oDefaultPath.GetPath(),
       a_sTitle,
       a_slFiles ) == "" )
    {
       // User cancelled.
       return;
    }
    

    This code sets up a default path, does some configuration work, and then presents a file dialog so the user can choose files to load from the disk. Next we'll do part 2 of this simple implementation.

    NOTE: Try to maintain clean code formatting. That means indenting the code so that it appears to be located inside the curly braces.

  4. Insert the following code immediately after the code we just inserted.

    Copy Text To Clipboard

    // Get the selected WorkloadNode. We're going to
    // create some new nodes and add them to the document
    // as child nodes of the selected WorkloadNode.
    WorkloadNode a_oSelected = LibSelect.FirstWorkloadNode();
    
    // Loop over our file paths...
    for( int i = 0; i < a_slFiles.GetCount(); ++i )
    {
       // Create a FilePath object so we can
       // easily work with the file path. This
       // is much nicer than using a string.
       auto FilePath a_oSrcFile = new FilePath( a_slFiles.GetAt( i ) );
       // Make the file path relative to the document.
       a_oSrcFile.MakeRelativeToModel( Model );
    
       // Allocate a new FileNode object and configure
       // its data members so it correctly represents
       // the file on disk.
       FileNode a_oFile = LibCreate.NewFileNode();
       a_oFile.Name = a_oSrcFile.GetFileName();
       a_oFile.FilePath = a_oSrcFile.GetPath();
       // This signals that we should be
       // specifying a .TIF file. It's just
       // a hint for the user or for the code.
       a_oFile.FileExtensionFilter = "tif";
    
       // Transfer ownership of the FileNode to
       // the document as a child node of the
       // selected WorkloadNode. We will leak
       // memory if we don't transfer ownership,
       // or call delete on the FileNode
       // we just created. It wouldn't make
       // sense to delete them so we must
       // transfer ownership to the Model.
       Model.AddNode( a_oFile, a_oSelected, -1 );
    }

    This code simply loops over the file paths selected by the user and creates a new <FileNode> for each file path.

  5. Save the script with the text editor.

Test Code Changes

  1. Return to the running Octopus app.
  2. Select Desktop » Refresh Scripts from the main menu. ( ALT + D + R )

    The application displays script compiler messages in the output window:

    Start loading scripts
    Done loading scripts; 10 loaded in 1.29 ms; avg 0.09
    

    If there are any script compiler errors, undo your changes in the text editor, go back to the previous step, and follow the instructions again. Here is an example of what error messages might look like:

    Start loading scripts
    D:\release6\scripts\app_shell_util.ssl(1770) : error: newline in constant
    Done loading scripts; 10 loaded in 1.29 ms; avg 0.09
    
  3. Examine the hierarchy and find the <WorkloadNode> named Western-Washington-Mt-Baker-Terrain-Analysis.
  4. Right click over the <WorkloadNode> named Western-Washington-Mt-Baker-Terrain-Analysis and select Load Files From Disk... from the listed options.

    The software presents a dialog that allows you to select files from disk.

  5. Enter the directory named Library.
  6. Enter the directory named Textures.
  7. Enter the directory named Elevation.
  8. Left click the .TIF file named USGS_13_n49w122.tif and click Open or hit ENTER when you are finished.

    The software creates a new <FileNode> as a child of the <WorkloadNode> named Western-Washington-Mt-Baker-Terrain-Analysis.

  9. Examine the hierarchy and expand the + to the left of the <WorkloadNode> named Western-Washington-Mt-Baker-Terrain-Analysis

    You can see the new <FileNode> created by the command.

    This is a picture of the hierarchy.

    You can move the mouse over the new <FileNode> to see the path on disk to the file.

  10. Select File » Save from the main menu.
  11. Select Graph » Build All from the main menu.

    The application builds the document and displays information in the output window.

    --- <Building Project 'D:\Release6\Content\Library\Octopus\Western-Washington-Mt-Baker-Terrain-Analysis\Western-Washington-Mt-Baker-Terrain-Analysis.box'> ---
    
    Doing build work...
    
    Build completed.
    

    Now we have an application, we have data, but our build command doesn't do anything. Recall that when we created this document, the document create command also created a script for us named app_octopus_workload_terrain_util.ssl. This script is still open in the text editor. One of our goals is to make this GPU compute app fairly general so that you can design and execute many different types of GPU compute workloads. The build command currently just prints some text in the output window. We need to make the build command execute the script app_octopus_workload_terrain_util.ssl, and we need to do it in a fairly generic way so that the user can create new files, specify files for the workload, and then simply run the application build command that we've just written. For this work, it's very important that the application build command know as little as possible about the details of the compute workloads.

  12. Select File » Save from the main menu.

    This exercise is complete. Please proceed to the next exercise.